haiku-atelier-2024/web/app/themes/haiku-atelier-2024/assets/js/gaffe.D-pnUQKx.js
2025-12-13 16:21:57 +01:00

2 lines
No EOL
44 KiB
JavaScript

import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as ee,M as te,N as f,O as p,P as m,Q as ne,R as re,S as ie,T as ae,U as h,V as oe,W as se,X as ce,Y as g,Z as le,_ as ue,a as _,at as de,b as fe,c as pe,ct as v,d as y,et as b,f as me,g as he,h as x,i as ge,it as _e,j as S,k as C,l as ve,lt as w,m as ye,n as be,nt as xe,o as Se,ot as Ce,p as we,q as T,r as Te,rt as E,s as Ee,st as De,t as D,tt as Oe,u as ke,ut as Ae,v as je,w as O,x as Me,y as Ne,z as Pe}from"./BzRP-TfT.js";import{n as Fe,t as Ie}from"./ClMiastP.js";var k={},Le={};function A(e,t){k[e]=k[e]||[],k[e].push(t)}function j(e,t){if(!Le[e]){Le[e]=!0;try{t()}catch(t){w&&E.error(`Error while instrumenting ${e}`,t)}}}function M(e,t){let n=e&&k[e];if(n)for(let r of n)try{r(t)}catch(t){w&&E.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${b(r)}\nError:`,t)}}var N=null;function Re(e){let t=`error`;A(t,e),j(t,ze)}function ze(){N=v.onerror,v.onerror=function(e,t,n,r,i){return M(`error`,{column:r,error:i,line:n,msg:e,url:t}),N?N.apply(this,arguments):!1},v.onerror.__SENTRY_INSTRUMENTED__=!0}var P=null;function Be(e){let t=`unhandledrejection`;A(t,e),j(t,Ve)}function Ve(){P=v.onunhandledrejection,v.onunhandledrejection=function(e){return M(`unhandledrejection`,e),P?P.apply(this,arguments):!0},v.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function He(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}function Ue(e){E.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function We(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(Ke(n)){if(C(e.description,n))return w&&Ue(e),!0;continue}if(!n.name&&!n.op)continue;let t=n.name?C(e.description,n.name):!0,r=n.op?e.op&&C(e.op,n.op):!0;if(t&&r)return w&&Ue(e),!0}return!1}function Ge(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Ke(e){return typeof e==`string`||e instanceof RegExp}function F(e,t=[]){return[e,t]}function qe(e,t){let[n,r]=e;return[n,[...r,t]]}function Je(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Ye(e){let t=Ce(v);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Xe(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Ye(r),e]:r.push(typeof e==`string`?Ye(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Se(n))}i(e)}}return typeof r==`string`?r:Ze(r)}function Ze(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Qe(e){let t=typeof e.data==`string`?Ye(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var $e={session:`session`,sessions:`session`,attachment:`attachment`,transaction:`transaction`,event:`error`,client_report:`internal`,user_report:`default`,profile:`profile`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,feedback:`feedback`,span:`span`,raw_security:`security`,log:`log_item`,metric:`metric`,trace_metric:`metric`};function et(e){return $e[e]}function tt(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function nt(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:y(r)},...i&&{trace:i}}}function rt(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function it(e,t,n,r){let i=tt(n);return F({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:y(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function at(e,t,n,r){let i=tt(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;rt(e,n?.sdk);let o=nt(e,i,r,t);return delete e.sdkProcessingMetadata,F(o,[[{type:a},e]])}var ot=`7`;function st(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function ct(e){return`${st(e)}${e.projectId}/envelope/`}function lt(e,t){let n={sentry_version:ot};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function ut(e,t,n){return t||`${ct(e)}?${lt(e,n)}`}var dt=[];function ft(e,t){let n={};return t.forEach(t=>{t&&mt(e,t,n)}),n}function pt(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function mt(e,t,n){if(n[t.name]){w&&E.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!dt.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),dt.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}w&&E.log(`Integration installed: ${t.name}`)}function I(e){return e}function ht(e){return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{items:e}]}function gt(e,t,n,r){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=y(r)),F(i,[ht(e)])}function _t(e,t){let n=t??vt(e)??[];if(n.length===0)return;let r=e.getOptions(),i=gt(n,r._metadata,r.tunnel,e.getDsn());yt().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function vt(e){return yt().get(e)}function yt(){return de(`clientToLogBufferMap`,()=>new WeakMap)}function bt(e){return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{items:e}]}function xt(e,t,n,r){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=y(r)),F(i,[bt(e)])}function St(e,t){let n=t??Ct(e)??[];if(n.length===0)return;let r=e.getOptions(),i=xt(n,r._metadata,r.tunnel,e.getDsn());wt().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function Ct(e){return wt().get(e)}function wt(){return de(`clientToMetricBufferMap`,()=>new WeakMap)}var L=Symbol.for(`SentryBufferFullError`);function Tt(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return ge(L);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return _(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>setTimeout(()=>t(!1),e))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var Et=60*1e3;function Dt(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Et:r-t}function Ot(e,t){return e[t]||e.all||0}function kt(e,t,n=Date.now()){return Ot(e,t)>n}function At(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+Dt(o,r):t===429&&(i.all=r+60*1e3);return i}function jt(e,t,n=Tt(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(Je(i,(t,n)=>{let i=et(n);kt(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=F(i[0],a),s=t=>{Je(o,(n,r)=>{e.recordDroppedEvent(t,et(r))})};return n.add(()=>t({body:Xe(o)}).then(e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&w&&E.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=At(r,e),e),e=>{throw s(`network_error`),w&&E.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===L)return w&&E.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function Mt(e,t,n){let r=[{type:`client_report`},{timestamp:n||ie(),discarded_events:e}];return F(t?{dsn:t}:{},[r])}function Nt(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Pt(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[ye],exclusive_time:o?.[we],measurements:e.measurements,is_segment:!0}}function Ft(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var It=`Not capturing exception because it's already been captured.`,Lt=`Discarded session because of missing or non-string release`,Rt=Symbol.for(`SentryInternalError`),zt=Symbol.for(`SentryDoNotSendEventError`),Bt=5e3;function R(e){return{message:e,[Rt]:!0}}function Vt(e){return{message:e,[zt]:!0}}function Ht(e){return!!e&&typeof e==`object`&&Rt in e}function Ut(e){return!!e&&typeof e==`object`&&zt in e}function Wt(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{a+=r(t),a>=8e5?i(e):s||(s=!0,o=setTimeout(()=>{i(e)},Bt))}),e.on(`flush`,()=>{i(e)})}var Gt=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Tt(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=me(e.dsn):w&&E.warn(`No DSN provided, client will not send events.`),this._dsn){let t=ut(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Wt(this,`afterCaptureLog`,`flushLogs`,Zt,_t),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Wt(this,`afterCaptureMetric`,`flushMetrics`,Xt,St)}captureException(e,t,n){let r=p();if(a(e))return w&&E.log(It),r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),`error`),i.event_id}captureMessage(e,t,n,r){let i={event_id:p(),...n},a=s(e)?e:String(e),o=T(e),c=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>c.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=p();if(t?.originalException&&a(t.originalException))return w&&E.log(It),r;let i={event_id:r,...t},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=Kt(e.type);return this._process(()=>this._captureEvent(e,i,s||n,c),l),i.event_id}captureSession(e){this.sendSession(e),Me(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(!t)return!0;this.emit(`flush`);let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];mt(this,e,this._integrations),t||pt(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=at(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=qe(n,Qe(e));this.sendEnvelope(n).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=ve}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t){w&&E.warn(Lt);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){w&&E.warn(Lt);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=it(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;w&&E.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:``}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return w&&E.error(`Error while sending envelope:`,e),{}}return w&&E.error(`Transport disabled`),{}}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=ft(this,e),pt(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(Me(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a?.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Te(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:je(n),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:pe(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=he(),r=ue()){return w&&z(e)&&E.log(`Captured error event \`${Nt(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{w&&(Ut(e)?E.log(e.message):Ht(e)?E.warn(e.message):E.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Yt(e),s=z(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:He(a);if(s&&typeof l==`number`&&Math.random()>l)return this.recordDroppedEvent(`sample_rate`,`error`),ge(Vt(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=Kt(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Vt("An event processor returned `null`, will not send event.");return t.data&&t.data.__sentry__===!0?e:qt(Jt(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw Vt(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw Ut(e)||Ht(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),R(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===L&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){w&&E.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){w&&E.log(`No outcomes to send`);return}if(!this._dsn){w&&E.log(`No dsn provided, will not send outcomes`);return}w&&E.log(`Sending outcomes:`,e);let t=Mt(e,this._options.tunnel&&y(this._dsn));this.sendEnvelope(t)}};function Kt(e){return e===`replay_event`?`replay`:e||`error`}function qt(e,t){let n=`${t} must return \`null\` or a valid event.`;if(ce(e))return e.then(e=>{if(!d(e)&&e!==null)throw R(n);return e},e=>{throw R(`${t} rejected with ${e}`)});if(!d(e)&&e!==null)throw R(n);return e}function Jt(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o,ignoreSpans:s}=t,c=n;if(z(c)&&i)return i(c,r);if(Yt(c)){if(o||s){let t=Pt(c);if(s?.length&&We(t,s))return null;if(o){let e=o(t);e?c=fe(n,Ft(e)):ke()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(s?.length&&We(e,s)){Ge(n,e);continue}if(o){let n=o(e);n?t.push(n):(ke(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function z(e){return e.type===void 0}function Yt(e){return e.type===`transaction`}function Xt(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Qt(e.attributes)}function Zt(e){let t=0;return e.message&&(t+=e.message.length*2),t+Qt(e.attributes)}function Qt(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*$t(e[0]):T(e)?t+=$t(e):t+=100}),t}function $t(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}var en=`thismessage:/`;function tn(e){return`isRelative`in e}function nn(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?en:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function B(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function rn(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return on(e,n)||an(e,r)}function an(e,t){return t?sn(e)===sn(t):!1}function on(e,t){let n=nn(e);return!n||tn(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function sn(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function cn(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function ln(e,t,n=[t],r=`npm`){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:De})),version:De}),e._metadata=i}var un=100;function V(e,t){let n=x(),r=ue();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=un}=n.getOptions();if(a<=0)return;let o={timestamp:ie(),...e},s=i?xe(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var dn,fn=`FunctionToString`,pn=new WeakMap,mn=I((()=>({name:fn,setupOnce(){dn=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=m(this),n=pn.has(x())&&t!==void 0?t:this;return dn.apply(n,e)}}catch{}},setup(e){pn.set(e,!0)}})));function hn(e,t,n,r,i,a){if(!i.exception?.values||!a||!se(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=H(e,t,r,a.originalException,n,i.exception.values,o,0))}function H(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(se(r[i],Error)){gn(o,s);let a=e(t,r[i]),l=c.length;_n(a,i,l,s),c=H(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(se(r,Error)){gn(o,s);let l=e(t,r),u=c.length;_n(l,`errors[${a}]`,u,s),c=H(e,t,n,r,i,[l,...c],l,u)}}),c}function gn(e,t){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...e.mechanism,...e.type===`AggregateError`&&{is_exception_group:!0},exception_id:t}}function _n(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function vn(e){let t=`console`;A(t,e),j(t,yn)}function yn(){`console`in v&&Oe.forEach(function(e){e in v.console&&f(v.console,e,function(t){return _e[e]=t,function(...t){M(`console`,{args:t,level:e}),_e[e]?.apply(v.console,t)}})})}function U(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var bn=`CaptureConsole`,xn=I(((e={})=>{let t=e.levels||Oe,n=e.handled??!0;return{name:bn,setup(e){`console`in v&&vn(({args:r,level:i})=>{x()!==e||!t.includes(i)||Sn(r,i,n)})}}}));function Sn(e,n,r){let i=U(n),a=Error(),o={level:U(n),extra:{arguments:e}};Ne(s=>{if(s.addEventProcessor(e=>(e.logger=`console`,O(e,{handled:r,type:`auto.core.capture_console`}),e)),n===`assert`){if(!e[0]){let n=`Assertion failed: ${t(e.slice(1),` `)||`console.assert`}`;s.setExtra(`arguments`,e.slice(1)),s.captureMessage(n,i,{captureContext:o,syntheticException:a})}return}let c=e.find(e=>e instanceof Error);if(c){be(c,o);return}let l=t(e,` `);s.captureMessage(l,i,{captureContext:o,syntheticException:a})})}var Cn=`Dedupe`,wn=I((()=>{let e;return{name:Cn,processEvent(t){if(t.type)return t;try{if(Tn(t,e))return w&&E.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function Tn(e,t){return t?!!(En(e,t)||Dn(e,t)):!1}function En(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!kn(e,t)||!On(e,t))}function Dn(e,t){let n=An(t),r=An(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!kn(e,t)||!On(e,t))}function On(t,n){let r=e(t),i=e(n);if(!r&&!i)return!0;if(r&&!i||!r&&i||(r=r,i=i,i.length!==r.length))return!1;for(let e=0;e<i.length;e++){let t=i[e],n=r[e];if(t.filename!==n.filename||t.lineno!==n.lineno||t.colno!==n.colno||t.function!==n.function)return!1}return!0}function kn(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function An(e){return e.exception?.values?.[0]}function jn(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var W=v;function Mn(){return`history`in W&&!!W.history}function Nn(){if(!(`fetch`in W))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Pn(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Fn(){if(typeof EdgeRuntime==`string`)return!0;if(!Nn())return!1;if(Pn(W.fetch))return!0;let e=!1,t=W.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Pn(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){w&&E.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function In(e,t){let n=`fetch`;A(n,e),j(n,()=>Ln(void 0,t))}function Ln(e,t=!1){t&&!Fn()||f(v,`fetch`,function(t){return function(...n){let i=Error(),{method:a,url:o}=zn(n),s={args:n,fetchData:{method:a,url:o},startTimestamp:r()*1e3,virtualError:i,headers:Bn(n)};return e||M(`fetch`,{...s}),t.apply(v,n).then(async t=>(e?e(t):M(`fetch`,{...s,endTimestamp:r()*1e3,response:t}),t),e=>{if(M(`fetch`,{...s,endTimestamp:r()*1e3,error:e}),oe(e)&&e.stack===void 0&&(e.stack=i.stack,S(e,`framesToPop`,1)),e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let t=new URL(s.fetchData.url);e.message=`${e.message} (${t.host})`}catch{}throw e})}})}function G(e,t){return!!e&&typeof e==`object`&&!!e[t]}function Rn(e){return typeof e==`string`?e:e?G(e,`url`)?e.url:e.toString?e.toString():``:``}function zn(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Rn(t),method:G(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:Rn(t),method:G(t,`method`)?String(t.method).toUpperCase():`GET`}}function Bn(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(u(t))return new Headers(t.headers)}catch{}}function Vn(){return`npm`}var K=v,q=0;function Hn(){return q>0}function Un(){q++,setTimeout(()=>{q--})}function J(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(m(e))return e}catch{return e}let r=function(...n){try{let r=n.map(e=>J(e,t));return e.apply(this,r)}catch(e){throw Un(),Ne(r=>{r.addEventProcessor(e=>(t.mechanism&&(ae(e,void 0,void 0),O(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),be(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}o(r,e),S(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,`name`,{get(){return e.name}})}catch{}return r}function Wn(){let e=ee(),{referrer:t}=K.document||{},{userAgent:n}=K.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Y(e,t){let n=qn(e,t),r={type:Qn(t),value:$n(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Gn(e,t,n,r){let i=x()?.getOptions().normalizeDepth,a=or(t),o={__serialized__:Ee(t,i)};if(a)return{exception:{values:[Y(e,a)]},extra:o};let s={exception:{values:[{type:h(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:ir(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=qn(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function Kn(e,t){return{exception:{values:[Y(e,t)]}}}function qn(e,t){let n=t.stacktrace||t.stack||``,r=Yn(t),i=Xn(t);try{return e(n,r,i)}catch{}return[]}var Jn=/Minified React error #\d+;/i;function Yn(e){return e&&Jn.test(e.message)?1:0}function Xn(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function Zn(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function Qn(e){let t=e?.name;return!t&&Zn(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function $n(e){let t=e?.message;return Zn(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?t.error.message:t:`No error message`}function er(e,t,n,r){let i=nr(e,t,n?.syntheticException||void 0,r);return O(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),_(i)}function tr(e,t,n=`info`,r,i){let a=rr(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),_(a)}function nr(e,t,r,i,a){let o;if(c(t)&&t.error)return Kn(e,t.error);if(Pe(t)||n(t)){let n=t;if(`stack`in t)o=Kn(e,t);else{let t=n.name||(Pe(n)?`DOMError`:`DOMException`),a=n.message?`${t}: ${n.message}`:t;o=rr(e,a,r,i),ae(o,a)}return`code`in n&&(o.tags={...o.tags,"DOMException.code":`${n.code}`}),o}return oe(t)?Kn(e,t):d(t)||h(t)?(o=Gn(e,t,r,a),O(o,{synthetic:!0}),o):(o=rr(e,t,r,i),ae(o,`${t}`,void 0),O(o,{synthetic:!0}),o)}function rr(e,t,n,r){let i={};if(r&&n){let r=qn(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),O(i,{synthetic:!0})}if(s(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function ir(e,{isUnhandledRejection:t}){let n=te(e),r=t?`promise rejection`:`exception`;return c(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:h(e)?`Event \`${ar(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function ar(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function or(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}var sr=class extends Gt{constructor(e){let t=cr(e);ln(t,`browser`,[`browser`],K.SENTRY_SDK_SOURCE||Vn()),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?`auto`:`never`,...t._metadata.sdk.settings}),super(t);let{sendDefaultPii:n,sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;K.document&&(r||i||s)&&K.document.addEventListener(`visibilitychange`,()=>{K.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&_t(this),s&&St(this))}),n&&this.on(`beforeSendSession`,cn)}eventFromException(e,t){return er(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return tr(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function cr(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:K.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var X=v,lr=1e3,ur,dr,fr;function pr(e){A(`dom`,e),j(`dom`,mr)}function mr(){if(!X.document)return;let e=M.bind(null,`dom`),t=_r(e,!0);X.document.addEventListener(`click`,t,!1),X.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=X[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(f(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=_r(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),f(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function hr(e){if(e.type!==dr)return!1;try{if(!e.target||e.target._sentryId!==fr)return!1}catch{}return!0}function gr(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function _r(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=vr(n);if(gr(n.type,r))return;S(n,`_sentryCaptured`,!0),r&&!r._sentryId&&S(r,`_sentryId`,p());let i=n.type===`keypress`?`input`:n.type;hr(n)||(e({event:n,name:i,global:t}),dr=n.type,fr=r?r._sentryId:void 0),clearTimeout(ur),ur=X.setTimeout(()=>{fr=void 0,dr=void 0},lr)}}function vr(e){try{return e.target}catch{return null}}var Z;function yr(e){let t=`history`;A(t,e),j(t,br)}function br(){if(X.addEventListener(`popstate`,()=>{let e=X.location.href,t=Z;Z=e,t!==e&&M(`history`,{from:t,to:e})}),!Mn())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Z,i=xr(String(n));if(Z=i,r===i)return e.apply(this,t);M(`history`,{from:r,to:i})}return e.apply(this,t)}}f(X.history,`pushState`,e),f(X.history,`replaceState`,e)}function xr(e){try{return new URL(e,X.location.origin).toString()}catch{return e}}var Q=`__sentry_xhr_v3__`;function Sr(e){A(`xhr`,e),j(`xhr`,Cr)}function Cr(){if(!X.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let i=Error(),a=r()*1e3,o=g(n[0])?n[0].toUpperCase():void 0,s=wr(n[1]);if(!o||!s)return e.apply(t,n);t[Q]={method:o,url:s,request_headers:{}},o===`POST`&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let c=()=>{let e=t[Q];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}M(`xhr`,{endTimestamp:r()*1e3,startTimestamp:a,xhr:t,virtualError:i})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return c(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,c),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[Q];return a&&g(r)&&g(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let i=t[Q];return i?(n[0]!==void 0&&(i.body=n[0]),M(`xhr`,{startTimestamp:r()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function wr(e){if(g(e))return e;try{return e.toString()}catch{}}var Tr=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Er=30,Dr=50;function Or(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var kr=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ar=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,jr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Mr=/at (.+?) ?\(data:(.+?),/,Nr=[Er,e=>{let t=e.match(Mr);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=kr.exec(e);if(n){let[,e,t,r]=n;return Or(e,`?`,+t,+r)}let r=Ar.exec(e);if(r){if(r[2]&&r[2].indexOf(`eval`)===0){let e=jr.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Lr(r[1]||`?`,r[2]);return Or(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Pr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Fr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ir=ne(Nr,[Dr,e=>{let t=Pr.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Fr.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Lr(n,e),Or(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Lr=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},$=1024,Rr=`Breadcrumbs`,zr=I(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Rr,setup(e){t.console&&vn(Hr(e)),t.dom&&pr(Vr(e,t.dom)),t.xhr&&Sr(Ur(e)),t.fetch&&In(Wr(e)),t.history&&yr(Gr(e)),t.sentry&&e.on(`beforeSendEvent`,Br(e))}}}));function Br(e){return function(t){x()===e&&V({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:i(t)},{event:t})}}function Vr(e,t){return function(n){if(x()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>$&&(Tr&&E.warn(`\`dom.maxStringLength\` cannot exceed ${$}, but a value of ${o} was configured. Sentry will use ${$} instead.`),o=$),typeof a==`string`&&(a=[a]);try{let e=n.event,t=Kr(e)?e.target:e;r=re(t,{keyAttrs:a,maxStringLength:o}),i=l(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),V(s,{event:n.event,name:n.name,global:n.global})}}function Hr(e){return function(n){if(x()!==e)return;let r={category:`console`,data:{arguments:n.args,logger:`console`},level:U(n.level),message:t(n.args,` `)};if(n.level===`assert`)if(n.args[0]===!1)r.message=`Assertion failed: ${t(n.args.slice(1),` `)||`console.assert`}`,r.data.arguments=n.args.slice(1);else return;V(r,{input:n.args,level:n.level})}}function Ur(e){return function(t){if(x()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Q];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:jn(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),V(d,u)}}function Wr(e){return function(t){if(x()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.fetchData.method,t.fetchData.url,t.error){let i=t.fetchData,a={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},o={category:`fetch`,data:i,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,o,a),V(o,a)}else{let i=t.response,a={...t.fetchData,status_code:i?.status};t.fetchData.request_body_size,t.fetchData.response_body_size,i?.status;let o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:jn(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),V(s,o)}}}function Gr(e){return function(t){if(x()!==e)return;let n=t.from,r=t.to,i=B(K.location.href),a=n?B(n):void 0,o=B(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),V({category:`navigation`,data:{from:n,to:r}})}}function Kr(e){return!!e&&!!e.target}var qr=`EventTarget.Window.Node.ApplicationCache.AudioTrackList.BroadcastChannel.ChannelMergerNode.CryptoOperation.EventSource.FileReader.HTMLUnknownElement.IDBDatabase.IDBRequest.IDBTransaction.KeyOperation.MediaController.MessagePort.ModalWindow.Notification.SVGElementInstance.Screen.SharedWorker.TextTrack.TextTrackCue.TextTrackList.WebSocket.WebSocketWorker.Worker.XMLHttpRequest.XMLHttpRequestEventTarget.XMLHttpRequestUpload`.split(`.`),Jr=`BrowserApiErrors`,Yr=I(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Jr,setupOnce(){t.setTimeout&&f(K,`setTimeout`,Xr),t.setInterval&&f(K,`setInterval`,Xr),t.requestAnimationFrame&&f(K,`requestAnimationFrame`,Zr),t.XMLHttpRequest&&`XMLHttpRequest`in K&&f(XMLHttpRequest.prototype,`send`,Qr);let e=t.eventTarget;e&&(Array.isArray(e)?e:qr).forEach(e=>$r(e,t))}}}));function Xr(e){return function(...t){let n=t[0];return t[0]=J(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${b(e)}`}}),e.apply(this,t)}}function Zr(e){return function(t){return e.apply(this,[J(t,{mechanism:{data:{handler:b(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function Qr(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&f(n,e,function(t){let n={mechanism:{data:{handler:b(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=m(t);return r&&(n.mechanism.data.handler=b(r)),J(t,n)})}),e.apply(this,t)}}function $r(e,t){let n=K[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(f(n,`addEventListener`,function(n){return function(r,i,a){try{ei(i)&&(i.handleEvent=J(i.handleEvent,{mechanism:{data:{handler:b(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&ti(this,r,i),n.apply(this,[r,J(i,{mechanism:{data:{handler:b(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),f(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}function ei(e){return typeof e.handleEvent==`function`}function ti(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var ni=`GlobalHandlers`,ri=I(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:ni,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(ii(e),li(`onerror`)),t.onunhandledrejection&&(ai(e),li(`onunhandledrejection`))}}}));function ii(e){Re(t=>{let{stackParser:n,attachStacktrace:r}=ui();if(x()!==e||Hn())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=ci(nr(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,D(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function ai(e){Be(t=>{let{stackParser:n,attachStacktrace:r}=ui();if(x()!==e||Hn())return;let i=oi(t),a=T(i)?si(i):nr(n,i,void 0,r,!0);a.level=`error`,D(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function oi(e){if(T(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function si(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function ci(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[],l=r,u=n,d=di(t)??ee();return c.length===0&&c.push({colno:l,filename:d,function:`?`,in_app:!0,lineno:u}),e}function li(e){Tr&&E.log(`Global Handler attached: ${e}`)}function ui(){return x()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function di(e){if(!(!g(e)||e.length===0)){if(e.startsWith(`data:`)){let t=e.match(/^data:([^;]+)/);return`<data:${t?t[1]:`text/javascript`}${e.includes(`base64,`)?`,base64`:``}>`}return e}}var fi=I(()=>({name:`HttpContext`,preprocessEvent(e){if(!K.navigator&&!K.location&&!K.document)return;let t=Wn(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}})),pi=`cause`,mi=5,hi=`LinkedErrors`,gi=I(((e={})=>{let t=e.limit||mi,n=e.key||pi;return{name:hi,preprocessEvent(e,r,i){hn(Y,i.getOptions().stackParser,n,t,e,r)}}})),_i=`HttpClient`,vi=I(((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:_i,setup(e){Oi(e,t),ki(e,t)}}}));function yi(e,t,n,r,i){if(Ai(e,n.status,n.url)){let e=Mi(t,r),a,o,s,c;Ni()&&([a,s]=bi(`Cookie`,e),[o,c]=bi(`Set-Cookie`,n)),D(ji({url:e.url,method:e.method,status:n.status,requestHeaders:a,responseHeaders:o,requestCookies:s,responseCookies:c,error:i,type:`fetch`}))}}function bi(e,t){let n=wi(t.headers),r;try{let t=n[e]||n[e.toLowerCase()]||void 0;t&&(r=Ci(t))}catch{}return[n,r]}function xi(e,t,n,r,i){if(Ai(e,t.status,t.responseURL)){let e,a,o;if(Ni()){try{let e=t.getResponseHeader(`Set-Cookie`)||t.getResponseHeader(`set-cookie`)||void 0;e&&(a=Ci(e))}catch{}try{o=Ti(t)}catch{}e=r}D(ji({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:o,responseCookies:a,error:i,type:`xhr`}))}}function Si(e){if(e){let t=e[`Content-Length`]||e[`content-length`];if(t)return parseInt(t,10)}}function Ci(e){return e.split(`; `).reduce((e,t)=>{let[n,r]=t.split(`=`);return n&&r&&(e[n]=r),e},{})}function wi(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}function Ti(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return n&&r&&(e[n]=r),e},{}):{}}function Ei(e,t){return e.some(e=>typeof e==`string`?t.includes(e):e.test(t))}function Di(e,t){return e.some(e=>typeof e==`number`?e===t:t>=e[0]&&t<=e[1])}function Oi(e,t){Fn()&&In(n=>{if(x()!==e)return;let{response:r,args:i,error:a,virtualError:o}=n,[s,c]=i;r&&yi(t,s,r,c,a||o)},!1)}function ki(e,t){`XMLHttpRequest`in v&&Sr(n=>{if(x()!==e)return;let{error:r,virtualError:i}=n,a=n.xhr,o=a[Q];if(!o)return;let{method:s,request_headers:c}=o;try{xi(t,a,s,c,r||i)}catch(e){Tr&&E.warn(`Error while extracting response event form XHR response`,e)}})}function Ai(e,t,n){return Di(e.failedRequestStatusCodes,t)&&Ei(e.failedRequestTargets,n)&&!rn(n,x())}function ji(e){let t=x(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,a={message:i,exception:{values:[{type:`Error`,value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:Si(e.responseHeaders)}}};return O(a,{type:`auto.http.client.${e.type}`,handled:!1}),a}function Mi(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Ni(){let e=x();return e?!!e.getOptions().sendDefaultPii:!1}var Pi=new sr({dsn:`https://14362801769747a4b7c1e04eb0c7a3cc@collie.haikuatelier.com/1`,environment:`production`,integrations:[zr(),Yr(),xn({levels:[`warn`,`error`]}),wn(),mn(),ri(),vi({failedRequestStatusCodes:[[400,599]]}),fi(),gi()],sendDefaultPii:!0,stackParser:Ir,tracesSampleRate:1,transport:e=>jt(e,async t=>{let n={body:t.body,headers:e.headers??{},method:`POST`,mode:`no-cors`,referrerPolicy:`no-referrer`,...e.fetchOptions};return Ae(await fetch(e.url,n),e=>({headers:{[Ie]:e.headers.get(Ie),[Fe]:e.headers.get(Fe)},statusCode:e.status}))})});he().setClient(Pi),Pi.init();