1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/datadogRecorder-DSZ6ZvCf.js","assets/rolldown-runtime-B0Z9INg1.js","assets/esm-CVXXLFBE.js","assets/replayStats-ByMCAvYk.js","assets/datadogProfiler-Dbp0CZ-C.js"])))=>i.map(i=>d[i]); 2import{i as e,n as t,r as n,t as r}from"./rolldown-runtime-B0Z9INg1.js";import{C as i,E as a,T as o,b as s,w as c,x as l}from"./auth-CaniCbkh.js";import{$ as u,$n as d,An as f,Ar as p,At as m,Cn as h,Ct as g,En as _,Er as v,Et as y,Fr as b,G as x,Gr as S,Hn as C,Ht as w,Ir as ee,Jn as te,Jr as ne,Jt as re,K as ie,Kn as ae,Kr as oe,Kt as se,Lt as ce,Mn as T,Mr as le,Nn as ue,Nr as de,Nt as fe,Or as pe,Qn as me,Qr as he,Qt as ge,Rn as _e,Rr as ve,Sn as ye,U as be,Un as xe,Ur as Se,Ut as Ce,Vn as we,Vr as Te,Wr as Ee,Xn as De,Yr as Oe,Z as E,Zr as ke,Zt as Ae,_i as je,_n as Me,_t as Ne,an as Pe,at as Fe,bn as Ie,br as Le,bt as Re,c as ze,cn as Be,ct as Ve,di as He,dt as Ue,ei as We,en as Ge,er as Ke,et as qe,fi as Je,fn as Ye,fr as Xe,ft as Ze,gi as Qe,gn as $e,gr as et,gt as tt,hn as nt,i as rt,ii as it,in as at,it as ot,jn as st,jt as ct,kr as lt,l as ut,li as dt,lt as ft,mi as pt,mn as mt,mt as ht,ni as gt,nn as _t,nt as vt,oi as yt,or as bt,pi as xt,pn as St,pr as Ct,q as wt,qn as Tt,ri as Et,rr as Dt,s as Ot,sn as kt,t as At,ur as jt,vi as Mt,vn as Nt,wn as Pt,wr as Ft,wt as It,xn as Lt,xr as Rt,xt as D,yt as zt,z as Bt,zt as Vt}from"./esm-CVXXLFBE.js";import{i as Ht,o as Ut}from"./replayStats-ByMCAvYk.js";var Wt=e=>Object.entries(e),Gt=(e,t)=>{if(!t)return e;let n=new URLSearchParams;Wt(t).forEach(([e,t])=>{t!=null&&(Array.isArray(t)?t:[t]).forEach(t=>{t!=null&&n.append(e,String(t))})});let r=n.toString();if(!r)return e;let i=e.indexOf(`#`),a=i===-1?e:e.slice(0,i),o=i===-1?``:e.slice(i),s=`&`;return a.includes(`?`)?(a.endsWith(`?`)||a.endsWith(`&`))&&(s=``):s=`?`,`${a}${s}${r}${o}`},O=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,k=globalThis,Kt=`10.74.0`;function qt(){return Jt(k),k}function Jt(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.74.0`,t[Kt]=t[`10.74.0`]||{}}function Yt(e,t,n=k){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Kt]=r[`10.74.0`]||{};return i[e]||(i[e]=t())}var Xt=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],Zt=`Sentry Logger `,Qt={};function $t(e){if(!(`console`in k))return e();let t=k.console,n={},r=Object.keys(Qt);r.forEach(e=>{let r=Qt[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function en(){cn().enabled=!0}function tn(){cn().enabled=!1}function nn(){return cn().enabled}function rn(...e){sn(`log`,...e)}function an(...e){sn(`warn`,...e)}function on(...e){sn(`error`,...e)}function sn(e,...t){O&&nn()&&$t(()=>{k.console[e](`${Zt}[${e}]:`,...t)})}function cn(){return O?Yt(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var A={enable:en,disable:tn,isEnabled:nn,log:rn,warn:an,error:on},ln=50,un=/\(error: (.*)\)/,dn=/captureMessage|captureException/;function fn(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(` 3`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=un.test(n)?n.replace(un,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=ln+r)break}}return mn(i.slice(r))}}function pn(e){return Array.isArray(e)?fn(...e):e}function mn(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(hn(t).function||``)&&t.pop(),t.reverse(),dn.test(hn(t).function||``)&&(t.pop(),dn.test(hn(t).function||``)&&t.pop()),t.slice(0,ln).map(e=>({...e,filename:e.filename||hn(t).filename,function:e.function||`?`}))}function hn(e){return e[e.length-1]||{}}var gn=`<anonymous>`;function _n(e){try{return!e||typeof e!=`function`?gn:e.name||gn}catch{return gn}}function vn(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var yn={},bn={};function xn(e,t){return yn[e]=yn[e]||[],yn[e].push(t),()=>{let n=yn[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function Sn(e,t){if(!bn[e]){bn[e]=!0;try{t()}catch(t){O&&A.error(`Error while instrumenting ${e}`,t)}}}function Cn(e,t){let n=e&&yn[e];if(n)for(let r of n)try{r(t)}catch(t){O&&A.error(`Error while triggering instrumentation handler. 4Type: ${e} 5Name: ${_n(r)} 6Error:`,t)}}var wn=null;function Tn(e){let t=`error`;xn(t,e),Sn(t,En)}function En(){wn=k.onerror,k.onerror=function(e,t,n,r,i){return Cn(`error`,{column:r,error:i,line:n,msg:e,url:t}),wn?wn.apply(this,arguments):!1},k.onerror.__SENTRY_INSTRUMENTED__=!0}var Dn=null;function On(e){let t=`unhandledrejection`;xn(t,e),Sn(t,kn)}function kn(){Dn=k.onunhandledrejection,k.onunhandledrejection=function(e){return Cn(`unhandledrejection`,e),!Dn||Dn.apply(this,arguments)},k.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var An=Object.prototype.toString;function jn(e){switch(An.call(e)){case`[object Error]`:case`[object E
6xception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Wn(e,Error)}}function Mn(e,t){return An.call(e)===`[object ${t}]`}function Nn(e){return Mn(e,`ErrorEvent`)}function Pn(e){return Mn(e,`DOMError`)}function Fn(e){return Mn(e,`DOMException`)}function In(e){return Mn(e,`String`)}function Ln(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function Rn(e){return e===null||Ln(e)||typeof e!=`object`&&typeof e!=`function`}function zn(e){return Mn(e,`Object`)}function Bn(e){return typeof e==`object`&&!!e}function Vn(e){return typeof Event<`u`&&Wn(e,Event)}function Hn(e){return Mn(e,`RegExp`)}function Un(e){return!!(e?.then&&typeof e.then==`function`)}function Wn(e,t){try{return e instanceof t}catch{return!1}}function Gn(e){return typeof Request<`u`&&Wn(e,Request)}function Kn(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!=`function`)return;let i=n(r);typeof i==`function`&&qn(i,r);try{e[t]=i}catch{O&&A.log(`Failed to replace method "${t}" in object`,e)}}function j(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{O&&A.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function qn(e,t){try{e.prototype=t.prototype=t.prototype||{},j(e,`__sentry_original__`,t)}catch{}}function Jn(e){return e.__sentry_original__}function Yn(e){if(jn(e))return{message:e.message,name:e.name,stack:e.stack,...Xn(e)};if(Vn(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Xn(e)}}return e}function Xn(e){return Bn(e)?Object.fromEntries(Object.entries(e)):{}}function Zn(e){let t=Object.keys(Yn(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var Qn;function $n(e){if(Qn!==void 0)return Qn?Qn(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=k;return t in n&&typeof n[t]==`function`?(Qn=n[t],Qn(e)):(Qn=null,e())}function er(){return $n(()=>Math.random())}function tr(){return $n(()=>Date.now())}var nr=Symbol.for(`sentry.skipNormalization`),rr=Symbol.for(`sentry.overrideNormalizationDepth`);function ir(e){return!!e[nr]}function ar(e){let t=e[rr];return typeof t==`number`?t:void 0}var or;function sr(e){or=e}function cr(e,t=100,n=1/0){try{return ur(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function lr(e,t=3,n=102400){let r=cr(e,t);return mr(r)>n?lr(e,t-1,n):r}function ur(e,t,n=1/0,r=1/0,i=hr()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=dr(e,t);if(!s.startsWith(`[object `))return s;if(ir(t))return t;let c=ar(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return ur(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Yn(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=ur(e,t,l-1,r,i),f++}return o(t),d}function dr(e,t){try{if(or){let e=or(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${_n(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${fr(t)}]`}catch(e){return`**non-serializable** (${e})`}}function fr(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function pr(e){return~-encodeURI(e).split(/%..|./).length}function mr(e){return pr(JSON.stringify(e))}function hr(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function gr(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function _r(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];Rn(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(dr(void 0,r))}return n.join(t)}function vr(e,t,n=!1){return In(e)?Hn(t)?t.test(e):In(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function yr(e,t=[],n=!1){for(let r of t)if(vr(e,r,n))return!0;return!1}function br(){let e=k;return e.crypto||e.msCrypto}var xr;function Sr(){return er()*16}function Cr(e=br()){try{if(e?.randomUUID)return $n(()=>e.randomUUID()).replace(/-/g,``)}catch{}return xr||=`10000000100040008000100000000000`,xr.replace(/[018]/g,e=>(e^(Sr()&15)>>e/4).toString(16))}function wr(e){return e.exception?.values?.[0]}function Tr(e){let{message:t,event_id:n}=e;if(t)return t;let r=wr(e);return r?r.type&&r.value?`${r.type}: ${r.value}
6`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function Er(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function Dr(e,t){let n=wr(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function Or(e){if(kr(e))return!0;try{j(e,`__sentry_captured__`,!0)}catch{}return!1}function kr(e){try{return e.__sentry_captured__}catch{}}var Ar=1e3;function jr(){return tr()/Ar}function Mr(){let{performance:e}=k;if(!e?.now||!e.timeOrigin)return jr;let t=e.timeOrigin;return()=>(t+$n(()=>e.now()))/Ar}var Nr;function M(){return(Nr??=Mr())()}var Pr=null;function Fr(){let{performance:e}=k;if(!e?.now)return;let t=3e5,n=$n(()=>e.now()),r=tr(),i=e.timeOrigin;if(typeof i==`number`&&Math.abs(i+n-r)<t)return i;let a=e.timing?.navigationStart;return typeof a==`number`&&Math.abs(a+n-r)<t?a:r-n}function N(){return Pr===null&&(Pr=Fr()),Pr}function Ir(e){let t=M(),n={sid:Cr(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>zr(n)};return e&&Lr(n,e),n}function Lr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||M(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Cr()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Rr(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Lr(e,n)}function zr(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Br(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Br(r[e],t[e],n-1));return r}function Vr(){return Cr()}function Hr(){return Cr().substring(16)}function Ur(e){try{let t=k.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Wr(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var Gr=`_sentrySpan`;function Kr(e,t){t?j(e,Gr,Ur(t)):delete e[Gr]}function qr(e){return Wr(e[Gr])}var Jr=100,Yr=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Vr(),sampleRand:er()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Kr(t,qr(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Lr(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():zn(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Kr(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Vr(),sampleRand:er()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Jr;if(n<=0)return this;let r={timestamp:jr(),...e,message:e.message?gr(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:qr(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Br(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||Cr();if(!this._client)return O&&A.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||Cr();if(!this._client)return O&&A.warn(`No client configured on scope - will not capture message!`),r;let i=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=e.event_id||t?.event_id||Cr();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(O&&A.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEac
6h(e=>{e(this)}),!1)}};function Xr(){return Yt(`defaultCurrentScope`,()=>new Yr)}function Zr(){return Yt(`defaultIsolationScope`,()=>new Yr)}var Qr=e=>e instanceof Promise&&!e[$r],$r=Symbol(`chained PromiseLike`),ei=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Qr(r)&&Qr(e)?r:ti(e,r)},ti=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[$r]:!0}),t},ni=class{constructor(e,t){let n;n=e||new Yr;let r;r=t||new Yr,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Un(n)?ei(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function ri(){let e=Jt(qt());return e.stack=e.stack||new ni(Xr(),Zr())}function ii(e){return ri().withScope(e)}function ai(e,t){let n=ri();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function oi(e){return ri().withScope(()=>e(ri().getIsolationScope()))}function si(){return{withIsolationScope:oi,withScope:ii,withSetScope:ai,withSetIsolationScope:(e,t)=>oi(t),getCurrentScope:()=>ri().getScope(),getIsolationScope:()=>ri().getIsolationScope()}}function ci(e){let t=Jt(e);return t.acs?t.acs:si()}function li(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function ui(e,t){let{value:n,unit:r}=li(e)?e:{value:e,unit:void 0},i=fi(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function di(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=ui(i,t);e&&(n[r]=e)}return n}function fi(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}function pi(){return!1}function P(){return ci(qt()).getCurrentScope()}function mi(){return ci(qt()).getIsolationScope()}function hi(){return Yt(`globalScope`,()=>new Yr)}function gi(...e){let t=ci(qt());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function F(){return P().getClient()}function _i(e){let{traceId:t,parentSpanId:n,propagationSpanId:r}=e.getPropagationContext(),i={trace_id:t,span_id:r||Hr()};return n&&(i.parent_span_id=n),i}var vi=`sentry.source`,yi=`sentry.sample_rate`,bi=`sentry.previous_trace_sample_rate`,xi=`sentry.op`,I=`sentry.origin`,Si=`sentry.idle_span_finish_reason`,Ci=`sentry.measurement_unit`,wi=`sentry.measurement_value`,Ti=`sentry.custom_span_name`,Ei=`sentry.profile_id`,Di=`sentry.exclusive_time`,Oi=`sentry.link.type`,ki=`gen_ai.conversation.id`;function Ai(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:`unauthenticated`};case 403:return{code:2,message:`permission_denied`};case 404:return{code:2,message:`not_found`};case 409:return{code:2,message:`already_exists`};case 413:return{code:2,message:`failed_precondition`};case 429:return{code:2,message:`resource_exhausted`};case 499:return{code:2,message:`cancelled`};default:return{code:2,message:`invalid_argument`}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:`unimplemented`};case 503:return{code:2,message:`unavailable`};case 504:return{code:2,message:`deadline_exceeded`};default:return{code:2,message:`internal_error`}}return{code:2,message:`internal_error`}}function ji(e,t){e.setAttribute(`http.response.status_code`,t);let n=Ai(t);n.message!==`unknown_error`&&e.setStatus(n)}var Mi=`_sentryScope`,Ni=`_sentryIsolationScope`,Pi=Symbol.for(`sentry.otelSourceInference`),Fi=Symbol.for(`sentry.otelSourceExplicitlySet`),Ii=Symbol.for(`sentry.tracerProviderSpan`);function Li(e,t,n){e&&(j(e,Ni,Ur(n)),j(e,Mi,t))}function Ri(e){let t=e;return{scope:t[Mi],isolationScope:Wr(t[Ni])}}function zi(e){return e[Pi]===!0}function Bi(e){j(e,Fi,!0)}function Vi(e){return e[Ii]===!0}var Hi=`sentry-`;function Ui(e){let t=Gi(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function Wi(e){if(e)return qi(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Hi}${t}`]=n),e),{}))}function Gi(e){if(!(!e||!In(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>
6{let n=Ki(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Ki(e)}function Ki(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function qi(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],r)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=r===0?i:`${e},${i}`;return a.length>8192?(O&&A.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},``)}var Ji=/^o(\d+)\./,Yi=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Xi(e){return e===`http`||e===`https`}function Zi(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Qi(e){let t=Yi.exec(e);if(!t){$t(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return $i({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function $i(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function ea(e){if(!O)return!0;let{port:t,projectId:n,protocol:r}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(A.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?Xi(r)?t&&isNaN(parseInt(t,10))?(A.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(A.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(A.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ta(e){return e.match(Ji)?.[1]}function na(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=ta(n)),r}function ra(e){let t=typeof e==`string`?Qi(e):$i(e);if(!(!t||!ea(t)))return t}function ia(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}var aa=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function oa(e){if(!e)return;let t=e.match(aa);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function sa(e,t){let n=oa(e),r=Ui(t);if(!n?.traceId)return{traceId:Vr(),sampleRand:er()};let i=ua(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function ca(e=Vr(),t=Hr(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function la(e=Vr(),t=Hr(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function ua(e,t){let n=ia(t?.sample_rand);if(n!==void 0)return n;let r=ia(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?er()*r:r+er()*(1-r):er()}var da=!1;function fa(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=L(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function pa(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:L(e).parent_span_id,a=Ri(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||Hr():t,trace_id:n}}function ma(e){let{traceId:t,spanId:n}=e.spanContext();return ca(t,n,Ta(e))}function ha(e){let{traceId:t,spanId:n}=e.spanContext();return la(t,n,Ta(e))}function ga(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function _a(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function va(e){return typeof e==`number`?ya(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ya(e.getTime()):M()}function ya(e){return e>9999999999?e/1e3:e}function L(e){if(wa(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Ca(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:xa(e),start_timestamp:va(i),timestamp:va(o)||void 0,status:Ea(s),op:r[xi],origin:r[I],links:ga(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function ba(e){if(wa(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Ca(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:xa(e),start_timestamp:va(i),end_timestamp:va(o),is_segment:e===Pa(e),status:Da(s),attributes:Oa(r,s),links:_a(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,end_timestamp:0,status:`ok`,is_segment:e===Pa(e)}}function xa(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function Sa(e){return{...e,attributes:di(e.attributes),links:e.links?.map(e=>({...e,attributes:di(e.attributes)}))}}function Ca(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function wa(e){return typeof e.getSpanJSON==`function`}function Ta(e){let{traceFlags:t}=e.spanContext();return t===1}function Ea(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function Da(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}function Oa(e,t){let n=Da(t)===`error`?t?.message:void 0;return{...n&&{"sentry.status.message":n},...e}}var ka=`_sentryChildSpans`,Aa=`_sentryRootSpan`;function ja(e,t){let n=e[Aa]||e;j(t,Aa,n),Ta(e)&&(!e.isRecording()&&!n.isRecording()||(e[ka]?e[ka].add(t):j(e,ka,new Set([t]))))}function Ma(e,t){e[ka]&&e[ka].delete(t)}function Na(e){let t=new Set;function n(e){if(!t.has(e)&&Ta(e)){t.add(e);let r=e[ka]?Array.from(e[ka]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var R=Pa;function Pa(e){return e[Aa]||e}function Fa(){let e=ci(qt());return e.getActiveSpan?e.getActiveSpan():qr(P())}function Ia(){da||=($t(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}var La=!1;function Ra(){if(La)return;function e(){let e=Fa(),t=e&&R(e);if(t){let e=`internal_error`;O&&A.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}La=!0,Tn(e),On(e)}function za(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||F()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Ba(e){A.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Va(e,t){if(!t?.length)return!1;for(let n of t){if(Wa(n)){if(e.description&&vr(e.description,n))return O&&Ba(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let r=!n.name||e.description&&vr(e.description,n.name),i=!n.op||e.op&&vr(e.op,n.op),a=!n.attributes||Object.entries(n.attributes).every(([t,n])=>Ha(e.attributes?.[t],n));if(r&&i&&a)return O&&Ba(e),!0}return!1}function Ha(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?vr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Ua(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 Wa(e){return typeof e==`string`||e instanceof RegExp}var Ga=Symbol.for(`sentry.nonRecordingSpan`),Ka=class{constructor(e={}){this._traceId=e.traceId||Vr(),this._spanId=e.spanId||Hr(),this.dropReason=e.dropReason,j(this,Ga,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}
6addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function qa(e){return!!e&&e[Ga]===!0}var Ja=`production`,Ya=`_frozenDsc`;function Xa(e,t){j(e,Ya,t)}function Za(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:na(t)};return t.emit(`createDsc`,i),i}function Qa(e,t){let n=t.getPropagationContext();return n.dsc||Za(n.traceId,e)}function $a(e){let t=F();if(!t)return{};let n=R(e),r=L(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[Ya];if(c)return s(c);let l=qa(n),u=l&&n.dropReason===`ignored`;if(l&&(!za(t.getOptions())||u)){let e=Ri(n).scope;if(e){let n={...Qa(t,e)};return u&&(n.sampled=`false`),s(n)}}let d=a?.get(`sentry.dsc`),f=d&&Ui(d);if(f)return s(f);let p=Za(e.spanContext().traceId,t),m=i[`sentry.source`]??i[`sentry.segment.name.source`],h=r.description;return m!==`url`&&h&&(p.transaction=h),za()&&(p.sampled=String(Ta(n)),p.sample_rand=a?.get(`sentry.sample_rand`)??Ri(n).scope?.getPropagationContext().sampleRand.toString()),s(p),t.emit(`createDsc`,p,n),p}function eo(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function to(e,t=[]){return[e,t]}function no(e,t){let[n,r]=e;return[n,[...r,t]]}function ro(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 io(e,t){return ro(e,(e,n)=>t.includes(n))}function ao(e){let t=Jt(k);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function oo(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[ao(r),e]:r.push(typeof e==`string`?ao(e):e)}for(let e of n){let[t,n]=e;if(i(` 7${JSON.stringify(t)} 8`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(cr(n))}i(e)}}return typeof r==`string`?r:so(r)}function so(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 co(e){return[{type:`span`},e]}function lo(e){let t=typeof e.data==`string`?ao(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var uo={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function fo(e){return e in uo}function po(e){return fo(e)?uo[e]:e}function mo(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function ho(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(tr()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Zi(r)},...i&&{trace:i}}}function go(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 _o(e,t,n,r){let i=mo(n);return to({sent_at:new Date(tr()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Zi(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function vo(e,t,n,r){let i=mo(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;go(e,n?.sdk);let o=ho(e,i,r,t);return delete e.sdkProcessingMetadata,to(o,[[{type:a},e]])}function yo(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=$a(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date(tr()).toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:Zi(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=L(e);return!Va({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=L(e);return(eo(s)?t:s(t))||(Ia(),t)}:L,f=[];for(let e of l){let t=d(e);t&&f.push(co(t))}return to(o,f)}function bo(e){if(!O)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:r}=L(e),{spanId:i}=e.spanContext(),a=Ta(e),o=R(e),s=o===e,c=`[Tracing] Starting ${a?`sampled`:`unsampled`} ${s?`root `:``}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];
8if(r&&l.push(`parent ID: ${r}`),!s){let{op:e,description:t}=L(o);l.push(`root ID: ${o.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}A.log(`${c} 9 ${l.join(` 10 `)}`)}function xo(e){if(!O)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=L(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${R(e)===e?`root `:``}span "${t}" with ID ${r}`;A.log(i)}function So(e,t,n,r=Fa()){let i=r&&R(r);i&&(O&&A.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[wi]:t,[Ci]:n}))}function Co(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[Ci],i=n[wi];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function wo(){return Jt(qt()).segmentSpanCaptureStrategy}function To(e){return e.getOptions().traceLifecycle===`stream`}var Eo=1e3,Do=class{constructor(e={}){this._traceId=e.traceId||Vr(),this._spanId=e.spanId||Hr(),this._startTime=e.startTimestamp||M(),this._links=e.links,this._attributes={},this.setAttributes({[I]:`manual`,[xi]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return this._frozen?this:(t===void 0?delete this._attributes[e]:this._attributes[e]=t,e===`sentry.source`&&t!==void 0&&zi(this)&&Bi(this),this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=va(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen?this:(this._name=e,zi(this)||this.setAttribute(vi,`custom`),this)}end(e){if(this._endTime){this._frozen=Vi(this);return}this._endTime=va(e),xo(this),this._onSpanEnded(),this._frozen=Vi(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[xi],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ea(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[I],profile_id:this._attributes[Ei],exclusive_time:this._attributes[Di],measurements:Co(this._events),is_segment:this._isStandaloneSpan&&R(this)===this||void 0,segment_id:this._isStandaloneSpan?R(this).spanContext().spanId:void 0,links:ga(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===R(this),status:Da(this._status),attributes:Oa(this._attributes,this._status),links:_a(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){if(this._frozen)return this;O&&A.log(`[Tracing] Adding an event to span:`,e);let r=Oo(t)?t:n||M(),i=Oo(t)?{}:t||{},a={name:e,time:va(r),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=F();e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this));let t=R(this),n=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan){this._sampled?jo(yo([this],e)):(O&&A.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}if(!n){let e=wo();if(e){let n=Ri(this).scope||P();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&To(e)){e.emit(`afterSegmentSpanEnd`,this);return}let r=Ri(this).scope||P(),i=wo();if(i)i.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),r);else{let e=this._convertSpanToTransaction();e&&r.captureEvent(e)}}_convertSpanToTransaction(e={}){if(!ko(L(this)))return;this._name||=(O&&A.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:t,isolationScope:n}=Ri(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;e.onSpanCaptured?.(this);let i=[];for(let t of Na(this)){if(t===this||Ao(t)||e.isSpanAlreadyCaptured?.(t))continue;let n=L(t);ko(n)&&(e.onSpanCaptured?.(t),i.push(n))}let a=this._attributes[vi];delete this._attributes[Ti];let o=!1;
10i.forEach(e=>{delete e.data[Ti],e.op?.startsWith(`gen_ai.`)&&(o=!0)});let s={contexts:{trace:fa(this)},spans:i.length>Eo?i.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Eo):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:$a(this),hasGenAiSpans:o},request:r,...a&&{transaction_info:{source:a}}},c=Co(this._events);return c&&Object.keys(c).length&&(O&&A.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(c,void 0,2)),s.measurements=c),s}};function Oo(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function ko(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Ao(e){return e instanceof Do&&e.isStandaloneSpan()}function jo(e){let t=F();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function Mo(e,t,n){if(!za(e))return[!1];let r,i;typeof e.tracesSampler==`function`?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),r=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(i=e.tracesSampleRate,r=!0):i=t.parentSampled;let a=ia(i);if(a===void 0)return O&&A.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!a)return O&&A.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,a,r];let o=n<a;return o||O&&A.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,a,r]}var No=`__SENTRY_SUPPRESS_TRACING__`;function Po(e){let t=Vo();return t.startInactiveSpan?t.startInactiveSpan(e):Fo(e)}function Fo(e){let t=Bo(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?t=>gi(e.scope,t):r===void 0?e=>e():e=>Io(r,e))(()=>{let i=P(),a=Wo(i,r),o=F();return e.onlyIfParent&&!a?Ro(i,o):zo({parentSpan:a,spanArguments:t,forceTransaction:n,scope:i})})}function Io(e,t){let n=Vo();return n.withActiveSpan?n.withActiveSpan(e,t):gi(n=>(Kr(n,e||void 0),t(n)))}function Lo(e=P()){let t=Vo();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[No]===!0}function Ro(e,t){t?.recordDroppedEvent(`no_parent_span`,`span`);let n=new Ka({traceId:e.getPropagationContext().traceId});return Li(n,e,mi()),n}function zo({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){let i=mi();if(!za()){let t=r.getPropagationContext(),a=new Ka({traceId:e?e.spanContext().traceId:t.traceId});return e&&!n&&ja(e,a),Li(a,r,i),a}let a=F();if(Go(a,t)){Lo(r)||a?.recordDroppedEvent(`ignored`,`span`);let t=new Ka({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&ja(e,t),Li(t,r,i),t}let o;if(e&&!n)o=Uo(e,r,t,i),ja(e,o);else if(e){let n=$a(e),{traceId:a,spanId:s}=e.spanContext(),c=Ta(e);o=Ho({traceId:a,parentSpanId:s,...t},r,i,c),Xa(o,n)}else{let{traceId:e,dsc:n,parentSpanId:a,sampled:s}=r.getPropagationContext();o=Ho({traceId:e,parentSpanId:a,...t},r,i,s),n&&Xa(o,n)}return bo(o),o}function Bo(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=va(e.startTime),delete n.startTime,n}return t}function Vo(){return ci(qt())}function Ho(e,t,n,r){let i=F(),a=i?.getOptions()||{},{name:o=``}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:r};i?.emit(`beforeSampling`,s,{decision:!1});let c=s.parentSampled??r,l=s.spanAttributes,u=t.getPropagationContext(),d=Lo(t),[f,p,m]=d?[!1]:Mo(a,{name:o,parentSampled:c,attributes:l,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:ia(u.dsc?.sample_rate)},u.sampleRand),h=new Do({...e,attributes:{[vi]:`custom`,[yi]:p!==void 0&&m?p:void 0,...l},sampled:f});return!f&&i&&!d&&(O&&A.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),i.recordDroppedEvent(`sample_rate`,To(i)?`span`:`transaction`)),Li(h,t,n),i&&i.emit(`spanStart`,h),h}function Uo(e,t,n,r){let{spanId:i,traceId:a}=e.spanContext(),o=Lo(t),s=!o&&Ta(e),c=s?new Do({...n,parentSpanId:i,traceId:a,sampled:s}):new Ka({traceId:a});ja(e,c),Li(c,t,r);let l=F();return l?(To(l)&&qa(c)&&(qa(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,`span`)):o||(c.dropReason=`sample_rate`,l.recordDroppedEvent(`sample_rate`,`span`))),l.emit(`spanStart`,c),n.endTimestamp&&(l.emit(`spanEnd`,c),l.emit(`afterSpanEnd`,c)),c):c}function Wo(e,t){if(t)return t;if(t===null)return;let n=qr(e);if(!n)return;let r=F();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?R(n):n}function Go(e,t){let n=e?.getOptions().ignoreSpans;return!e||!To(e)||!n?.length?!1:Va({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function Ko(e){return qa(e)&&e.dropReason===`ignored`}var qo={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3}
10,Jo=`heartbeatFailed`,Yo=`idleTimeout`,Xo=`finalTimeout`,Zo=`externalFinish`;function Qo(e,t={}){let n=new Map,r=!1,i,a,o=Zo,s=!t.disableAutoFinish,c=[],{idleTimeout:l=qo.idleTimeout,finalTimeout:u=qo.finalTimeout,childSpanTimeout:d=qo.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:p=!0}=t,m=F(),h=P();if(!m||!za()){let e=new Ka({traceId:h.getPropagationContext().traceId});return Li(e,h,mi()),e}let g=Fa(),_=$o(e);_.end=new Proxy(_.end,{apply(e,t,n){if(f&&f(_),qa(t))return;let[r,...i]=n,a=va(r||M()),o=Na(_).filter(e=>e!==_),s=L(_);if(!o.length||!p)return w(a),Reflect.apply(e,t,[a,...i]);let c=m.getOptions().ignoreSpans,l=o?.reduce((e,t)=>{let n=L(t);return!n.timestamp||c&&Va({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=s.start_timestamp,h=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(a,l||1/0)));return w(h),Reflect.apply(e,t,[h,...i])}});function v(){i&&=(clearTimeout(i),void 0)}function y(){a&&=(clearTimeout(a),void 0)}function b(e){v(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=Yo,_.end(e))},l)}function x(e){y(),a=setTimeout(()=>{!r&&s&&(o=Jo,_.end(e))},d)}function S(e){v(),n.set(e,!0),x(M()+d/1e3)}function C(e){n.has(e)&&n.delete(e),n.size===0&&(b(M()+l/1e3),y())}function w(e){r=!0,n.clear(),c.forEach(e=>e()),Kr(h,g);let t=L(_),{start_timestamp:i}=t;if(!i)return;t.data[`sentry.idle_span_finish_reason`]||_.setAttribute(Si,o);let a=t.status;(!a||a===`unknown`)&&_.setStatus({code:1}),A.log(`[Tracing] Idle span "${t.op}" finished`);let s=Na(_).filter(e=>e!==_),d=0;s.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),O&&A.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:r=0}=L(t),i=r<=e,a=(u+l)/1e3,o=n-r<=a;if(O){let e=JSON.stringify(t,void 0,2);i?o||A.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):A.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!o||!i)&&(Ma(_,t),d++)}),d>0&&_.setAttribute(`sentry.idle_span_discarded_spans`,d)}return c.push(m.on(`spanStart`,e=>{r||e===_||L(e).timestamp||e instanceof Do&&e.isStandaloneSpan()||Na(_).includes(e)&&S(e.spanContext().spanId)})),c.push(m.on(`spanEnd`,e=>{r||C(e.spanContext().spanId)})),c.push(m.on(`idleSpanEnableAutoFinish`,e=>{e===_&&(s=!0,b(),n.size&&x())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(_.setStatus({code:2,message:`deadline_exceeded`}),o=Xo,_.end())},u),_}function $o(e){let t=Po(e);return Kr(P(),t),O&&A.log(`[Tracing] Started span is an idle span`),t}
10function es(e,t,n){let r,i,a,o=n?.maxWait?Math.max(n.maxWait,t):0,s=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function u(){return i!==void 0||a!==void 0?c():r}function d(){return i&&clearTimeout(i),i=s(c,t),o&&a===void 0&&(a=s(c,o)),r}return d.cancel=l,d.flush=u,d}function ts(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;as(e,t),r&&cs(e,r),ls(e,n),os(e,i),ss(e,a)}function ns(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;rs(e,`extra`,n),rs(e,`tags`,r),rs(e,`attributes`,i),rs(e,`user`,a),rs(e,`contexts`,o),e.sdkProcessingMetadata=Br(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function rs(e,t,n){e[t]=Br(e[t],n,1)}function is(e,t){let n=hi().getScopeData();return e&&ns(n,e.getScopeData()),t&&ns(n,t.getScopeData()),n}function as(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function os(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ss(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function cs(e,t){e.contexts={trace:pa(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:$a(t),...e.sdkProcessingMetadata};let n=L(R(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function ls(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var us=`http.url`,ds=`sentry.segment.name`,fs=`sentry.transaction`,ps=`url.full`,ms=`user_agent.original`;function hs(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}var gs=0,_s=1,vs=2;function ys(e){return new xs(t=>{t(e)})}function bs(e){return new xs((t,n)=>{n(e)})}var xs=class e{constructor(e){this._state=gs,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===gs)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===_s&&e[1](this._value),this._state===vs&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===gs){if(Un(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(_s,e)},r=e=>{t(vs,e)};try{e(n,r)}catch(e){r(e)}}};function Ss(e,t,n,r=0){try{let i=Cs(t,n,e,r);return Un(i)?i:ys(i)}catch(e){return bs(e)}}function Cs(e,t,n,r){let i=n[r];if(!e||!i)return e;let a=i({...e},t);return O&&a===null&&A.log(`Event processor "${i.id||`?`}" dropped event`),Un(a)?a.then(e=>Cs(e,t,n,r+1)):Cs(a,t,n,r+1)}var ws,Ts,Es,Ds;function Os(e){let t=k._sentryDebugIds,n=k._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(Ds&&r.length===Ts&&i.length===Es)return Ds;Ts=r.length,Es=i.length,Ds={},ws||={};let a=(t,n)=>{for(let r of t){let t=n[r],i=ws?.[r];if(i&&Ds&&t)Ds[i[0]]=t,ws&&(ws[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&Ds&&ws){Ds[i]=t,ws[r]=[i,t];break}}}}};return t&&a(r,t),n&&a(i,n),Ds}function ks(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Cr(),timestamp:t.timestamp||jr()},l=n.integrations||e.integrations.map(e=>e.name);As(c,e),Ns(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&js(c,e.stackParser);
10let u=Fs(r,n.captureContext);n.mechanism&&Dr(c,n.mechanism);let d=i?i.getEventProcessors():[],f=is(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),ts(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?ys(c):Ss(m,c,n)).then(e=>(e&&Ms(e),typeof o==`number`&&o>0?Ps(e,o,s):e))}function As(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=gr(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=gr(e.value,a)})}function js(e,t){let n=Os(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function Ms(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function Ns(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Ps(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:cr(e.data,t,n)}}))},...e.user&&{user:cr(e.user,t,n)},...e.contexts&&{contexts:cr(e.contexts,t,n)},...e.extra&&{extra:cr(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=cr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:cr(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=cr(e.contexts.flags,3,n)),r}function Fs(e,t){if(!t)return e;let n=e?e.clone():new Yr;return n.update(t),n}function Is(e){if(e)return Ls(e)||zs(e)?{captureContext:e}:e}function Ls(e){return e instanceof Yr||typeof e==`function`}var Rs=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function zs(e){return Object.keys(e).some(e=>Rs.includes(e))}function Bs(e,t){return P().captureException(e,Is(t))}function Vs(e,t){return P().captureEvent(e,t)}function Hs(e,t){mi().setContext(e,t)}function Us(){let e=F();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Ws(e){mi().addEventProcessor(e)}function Gs(e){let t=mi(),{user:n}=is(t,P()),{userAgent:r}=k.navigator||{},i=Ir({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return a?.status===`ok`&&Lr(a,{status:`exited`}),Ks(),t.setSession(i),i}function Ks(){let e=mi(),t=P().getSession()||e.getSession();t&&Rr(t),qs(),e.setSession()}function qs(){let e=mi(),t=F(),n=e.getSession();n&&t&&t.captureSession(n)}function Js(e=!1){if(e){Ks();return}qs()}function Ys(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function Xs(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Zs(e){return`${Xs(e)}${e.projectId}/envelope/`}function Qs(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function $s(e,t,n){return t||`${Zs(e)}?${Qs(e,n)}`}var ec=[];function tc(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function nc(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return tc(r)}function rc(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&ac(e,t,n)}),n}function ic(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function ac(e,t,n){if(n[t.name]){O&&A.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!ec.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),ec.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)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),O&&A.log(`Integration installed: ${t.name}`)}function oc(e){return e}function sc(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function cc(){return`npm`}function lc(){return!sc()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function uc(){return typeof window<`u`&&(!lc()||dc())}function dc(){return k.process?.type===`renderer`}function fc(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...uc()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function pc(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Zi(r)),to(a,[fc(e,i)])}function mc(e,t){let n=t??hc(e)??[];if(n.length===0)return;let r=e.getOptions(),i=pc(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);gc().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function hc(e){return gc().get(e)}function gc(){return Yt(`clientToLogBufferMap`,()=>new WeakMap)}function _c(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...uc()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function vc(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Zi(r)),to(a,[_c(e,i)])}function yc(e,t){let n=t??bc(e)??[];if(n.length===0)return;let r=e.getOptions(),i=vc(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);xc().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function bc(e){return xc().get(e)}function xc(){return Yt(`clientToMetricBufferMap`,()=>new WeakMap)}function Sc(e){return Sa({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function Cc(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||To(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(Sc(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...uc()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}var wc=Symbol.for(`SentryBufferFullError`);function Tc(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return bs(wc);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return ys(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Ys(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var Ec=6e4;function Dc(e,t=tr()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Ec:r-t}function Oc(e,t){return e[t]||e.all||0}function kc(e,t,n=tr()){return Oc(e,t)>n}function Ac(e,{statusCode:t,headers:n},r=tr()){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+Dc(o,r):t===429&&(i.all=r+6e4);return i}function jc(e,t,n=Tc(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(ro(i,(t,n)=>{let i=po(n);kc(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=to(i[0],a),s=t=>{if(io(o,[`client_report`])){O&&A.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}ro(o,(n,r)=>{e.recordDroppedEvent(t,po(r))})};return n.add(()=>t({body:oo(o)}).then(e=>e.statusCode===413?(O&&A.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),s(`send_error`),e):(O&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&A.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Ac(r,e),e),e=>{throw s(`network_error`),O&&A.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>
10{if(e===wc)return O&&A.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function Mc(e,t,n){let r=[{type:`client_report`},{timestamp:n||jr(),discarded_events:e}];return to(t?{dsn:t}:{},[r])}function Nc(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 Pc(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?.[Ei],exclusive_time:o?.[Di],measurements:e.measurements,is_segment:!0}}function Fc(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 Ic=[`forwarded`,`-ip`,`remote-`,`via`,`-user`];function Lc(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Ic},httpHeaders:{request:{deny:Ic},response:{deny:Ic}},httpBodies:[],urlQueryParams:{deny:Ic},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}var Rc={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function zc(e){let t=e.dataCollection==null?Lc(e.sendDefaultPii):Rc,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var Bc=`Not capturing exception because it's already been captured.`,Vc=`Discarded session because of missing or non-string release`,Hc=Symbol.for(`SentryInternalError`),Uc=Symbol.for(`SentryDoNotSendEventError`),Wc=5e3;function Gc(e){return{message:e,[Hc]:!0}}function Kc(e){return{message:e,[Uc]:!0}}function qc(e){return Bn(e)&&Hc in e}function Jc(e){return Bn(e)&&Uc in e}function Yc(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??Wc;t>0&&(s=!0,o=Ys(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var Xc=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Tc(e.transportOptions?.bufferSize??64),this._dataCollection=zc(e),e.dsn?this._dsn=ra(e.dsn):O&&A.warn(`No DSN provided, client will not send events.`),this._dsn){let t=$s(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??!0,this._options.enableLogs&&Yc(this,`afterCaptureLog`,`flushLogs`,rl,mc),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Yc(this,`afterCaptureMetric`,`flushMetrics`,nl,yc)}captureException(e,t,n){let r=Cr();if(Or(e))return O&&A.log(Bc),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:Cr(),...n}
10,a=Ln(e)?e:String(e),o=Rn(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=Cr();if(t?.originalException&&Or(t.originalException))return O&&A.log(Bc),r;let i={event_id:r,...t},a=e.sdkProcessingMetadata||{},o=a.capturedSpanScope,s=a.capturedSpanIsolationScope,c=Zc(e.type);return this._process(()=>this._captureEvent(e,i,o||n,s),c),i.event_id}captureSession(e){this.sendSession(e),Lr(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;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]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),ac(this,e,this._integrations),t||ic(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Cc(e,this),r=vo(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=no(r,lo(e));n&&(r=no(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=Ja}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t){O&&A.warn(Vc);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){O&&A.warn(Vc);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=_o(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}`;O&&A.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 O&&A.error(`Error while sending envelope:`,e),{}}return O&&A.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=rc(this,e),ic(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)&&(Lr(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=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),ks(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,..._i(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Qa(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=P(),r=mi()){return O&&el(e)&&A.log(`Captured error event \`${Nc(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{O&&(Jc(e)?A.log(e.message):qc(e)?A.warn(e.message):A.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=tl(e),s=el(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:ia(a),u=Zc(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Kc("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Qc($c(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 Kc(`${c} returned \`null\`, will not send event.`)}
10let d=n.getSession()||r.getSession();if(s&&d&&this._updateSessionFromEvent(d,i),s&&typeof l==`number`&&er()>l)throw this.recordDroppedEvent(`sample_rate`,`error`),Kc(`Discarding event because it's not included in the random sample (sampling rate = ${a})`);if(o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let f=i.transaction_info;return o&&f&&i.transaction!==e.transaction&&(i.transaction_info={...f,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw Jc(e)||qc(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),Gc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 11Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===wc&&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(){O&&A.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){O&&A.log(`No outcomes to send`);return}if(!this._dsn){O&&A.log(`No dsn provided, will not send outcomes`);return}O&&A.log(`Sending outcomes:`,e);let t=Mc(e,this._options.tunnel&&Zi(this._dsn));this.sendEnvelope(t)}};function Zc(e){return e===`replay_event`?`replay`:e||`error`}function Qc(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Un(e))return e.then(e=>{if(!zn(e)&&e!==null)throw Gc(n);return e},e=>{throw Gc(`${t} rejected with ${e}`)});if(!zn(e)&&e!==null)throw Gc(n);return e}function $c(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!eo(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(el(c)&&i)return i(c,r);if(tl(c)){if(s||o){let t=Pc(c);if(o?.length&&Va({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=Br(n,Fc(e)):Ia()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&Va({description:e.description,op:e.op,attributes:e.data},o)){Ua(n,e);continue}if(s){let n=s(e);n?t.push(n):(Ia(),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 el(e){return e.type===void 0}function tl(e){return e.type===`transaction`}function nl(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+il(e.attributes)}function rl(e){let t=0;return e.message&&(t+=e.message.length*2),t+il(e.attributes)}function il(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*al(e[0]):Rn(e)?t+=al(e):t+=100}),t}function al(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function ol(e,t){t.debug===!0&&(O?A.enable():$t(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),P().update(t.initialScope);let n=new e(t);return sl(n),n.init(),n}function sl(e){P().setClient(e)}var cl=`thismessage:/`;function ll(e){return`isRelative`in e}function ul(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?cl: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 dl(e){if(ll(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function fl(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 pl(e){return e.split(/[?#]/,1)[0]}function ml(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function hl(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return _l(e,n)||gl(e,r)}function gl(e,t){return t?yl(e)===yl(t):!1}function _l(e,t){let n=ul(e);return!n||ll(n)||!t?!1:vl(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function vl(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function yl(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function bl(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 xl(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:Kt})),i.version=Kt)}function Sl(e={}){let t=e.client||F();if(!Us()||!t)return{};
11let n=ci(qt());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||P(),i=e.span||Fa(),a=qa(i)&&!za(t.getOptions());if(!i&&pi())return{};let o=i&&!a?ma(i):Cl(r),s=Wi(i?$a(i):Qa(t,r));if(!aa.test(o))return A.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let c={"sentry-trace":o,baggage:s};return e.propagateTraceparent&&(c.traceparent=i&&!a?ha(i):wl(r)),c}function Cl(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ca(t,r,n)}function wl(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return la(t,r,n)}var Tl=100;function El(e,t){let n=F(),r=mi();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Tl}=n.getOptions();if(a<=0)return;let o={timestamp:jr(),...e},s=i?$t(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var Dl=`FunctionToString`,Ol=new WeakMap,kl=oc((()=>({name:Dl,setupOnce(){let e=Function.prototype.toString;try{Function.prototype.toString=function(...t){let n=Jn(this),r;try{Ol.has(F())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){Ol.set(e,!0)}}))),Al=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/Java exception was raised during method invocation$/,/Java object is gone$/],jl=`EventFilters`,Ml=oc((e={})=>{let t;return{name:jl,setup(n){t=Pl(e,n.getOptions())},processEvent(n,r,i){return t||=Pl(e,i.getOptions()),Fl(n,t)?null:n}}}),Nl=oc(((e={})=>({...Ml(e),name:`InboundFilters`})));function Pl(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Al],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Fl(e,t){if(!e.type){if(Il(e,t.ignoreErrors))return O&&A.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${Tr(e)}`),!0;if(Hl(e))return O&&A.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${Tr(e)}`),!0;if(Rl(e,t.denyUrls))return O&&A.warn(`Event dropped due to being matched by \`denyUrls\` option. 14Event: ${Tr(e)}. 15Url: ${Vl(e)}`),!0;if(!zl(e,t.allowUrls))return O&&A.warn(`Event dropped due to not being matched by \`allowUrls\` option. 16Event: ${Tr(e)}. 17Url: ${Vl(e)}`),!0}else if(e.type===`transaction`&&Ll(e,t.ignoreTransactions))return O&&A.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 18Event: ${Tr(e)}`),!0;return!1}function Il(e,t){return t?.length?Nc(e).some(e=>yr(e,t)):!1}function Ll(e,t){if(!t?.length)return!1;let n=e.transaction;return n?yr(n,t):!1}function Rl(e,t){if(!t?.length)return!1;let n=Vl(e);return n?yr(n,t):!1}function zl(e,t){if(!t?.length)return!0;let n=Vl(e);return!n||yr(n,t)}function Bl(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Vl(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?Bl(t):null}catch{return O&&A.error(`Cannot extract url for event ${Tr(e)}`),null}}function Hl(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function Ul(e,t,n,r,i,a){if(!i.exception?.values||!a||!jn(a.originalException))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=Wl(e,t,r,a.originalException,n,i.exception.values,o,0))}function Wl(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(jn(r[i])){Kl(o,s,r);let a=e(t,r[i]),l=c.length;ql(a,i,l,s),c=Wl(e,t,n,r[i],i,[a,...c],a,l)}
18return Gl(r)&&r.errors.forEach((a,l)=>{if(jn(a)){Kl(o,s,r);let u=e(t,a),d=c.length;ql(u,`errors[${l}]`,d,s),c=Wl(e,t,n,a,i,[u,...c],u,d)}}),c}function Gl(e){return Array.isArray(e.errors)}function Kl(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...Gl(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ql(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Jl(e){return jn(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Yl(e){return Jl(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Xl=new Set([]);function Zl(e){let t=`console`,n=xn(t,e);return Sn(t,$l),n}var Ql=new Set;function $l(){`console`in k&&Xt.forEach(function(e){Ql.has(e)||!(e in k.console)||(Ql.add(e),Kn(k.console,e,function(t){return Qt[e]=t,function(...t){let n=t[0],r=Qt[e],i=Xl.size&&typeof n==`string`&&yr(n,Xl);i||Cn(`console`,{args:t,level:e}),(!i||O&&A.isEnabled())&&r?.apply(k.console,t)}}))})}function eu(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var tu=`Dedupe`,nu=oc((()=>{let e;return{name:tu,processEvent(t){if(t.type)return t;try{if(ru(t,e))return O&&A.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function ru(e,t){return t?!!(iu(e,t)||au(e,t)):!1}function iu(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!su(e,t)||!ou(e,t))}function au(e,t){let n=cu(t),r=cu(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!su(e,t)||!ou(e,t))}function ou(e,t){let n=vn(e),r=vn(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function su(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 cu(e){return e.exception?.values?.[0]}var lu=`ConversationId`,uu=oc((()=>({name:lu,setup(e){e.on(`spanStart`,e=>{let t=P().getScopeData(),n=mi().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=L(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(ki,r)}})}})));function du(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=za()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(mu(n,e),fu(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=F(),d=!!Fa(),f=d||!!u&&To(u),p=s&&f?Po(vu(o,a,c)):new Ka,m=Ko(p)&&d?void 0:p;if(s&&!f&&u?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=pu(t,n,za()&&f?m:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(u){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit(`beforeOutgoingRequestSpan`,p,t)}return p}function fu(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function pu(e,t,n,r){let i=Sl({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Gn(e)?e.headers:void 0);if(!c)return{"sentry-trace":a,...o&&{baggage:o},...s&&{traceparent:s}};if(gu(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?hu(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}if(_u(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&hu(e[1]));return o&&!t&&e.push([`baggage`,o]),e}{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>hu(e)):hu(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,...i.length>0&&{baggage:i.join(`,`)}});return r&&s&&!t&&(u.traceparent=s),u}}function mu(e,t){if(t.response){ji(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function hu(e){return typeof e==`string`&&e.split(`,`).some(e=>e.trim().startsWith(Hi))}function gu(e){return typeof Headers<`u`&&Wn(e,Headers)}function _u(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function vu(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${ml(e)}`,attributes:yu(e,void 0,t,n)};let r=ul(e);return{name:`${t} ${r?dl(r):e}`,attributes:yu(e,r,t,n)}}function yu(e,t,n,r){let i={url:ml(e),type:`fetch`,"http.method":n,[I]:r,[xi]:`http.client`};return t&&(ll(t)||(i[us]=ml(t.href),i[ps]=ml(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}function bu(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var xu=k;function Su(){return`history`in xu&&!!xu.history}function Cu(){if(!(`fetch`in xu))return!1;
18try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function wu(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Tu(){if(typeof EdgeRuntime==`string`)return!0;if(!Cu())return!1;if(wu(xu.fetch))return!0;let e=!1,t=xu.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=wu(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){O&&A.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Eu(e,t){let n=`fetch`,r=xn(n,e);return Sn(n,()=>Ou(void 0,t)),r}function Du(e){let t=`fetch-body-resolved`,n=xn(t,e);return Sn(t,()=>Ou(Au)),n}function Ou(e,t=!1){t&&!Tu()||Kn(k,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=Nu(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:M()*1e3,virtualError:r,headers:Pu(n)};return e||Cn(`fetch`,{...o}),t.apply(k,n).then(async t=>(e?e(t):Cn(`fetch`,{...o,endTimestamp:M()*1e3,response:t}),t),e=>{Cn(`fetch`,{...o,endTimestamp:M()*1e3,error:e}),jn(e)&&e.stack===void 0&&(e.stack=r.stack,j(e,`framesToPop`,1));let t=F()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&jn(e)&&e.name===`TypeError`&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(o.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:j(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function ku(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function Au(e){let t;try{t=e.clone()}catch{return}ku(t,()=>{Cn(`fetch-body-resolved`,{endTimestamp:M()*1e3,response:e})})}function ju(e,t){return Bn(e)&&!!e[t]}function Mu(e){return typeof e==`string`?e:e?ju(e,`url`)?e.url:e.toString?e.toString():``:``}function Nu(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Mu(t),method:ju(n,`method`)?String(n.method).toUpperCase():Gn(t)&&ju(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Mu(t),method:ju(t,`method`)?String(t.method).toUpperCase():`GET`}}function Pu(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Gn(t))return new Headers(t.headers)}catch{}}var Fu=k;function Iu(){try{return Fu.document.location.href}catch{return``}}function Lu(e,t=5){if(!Fu.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}var z=k,Ru=0;function zu(){return Ru>0}function Bu(){Ru++,setTimeout(()=>{Ru--})}function Vu(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Jn(e))return e}catch{return e}let r=function(...n){k._sentryWrappedDepth=(k._sentryWrappedDepth||0)+1;try{let r=n.map(e=>Vu(e,t));return e.apply(this,r)}catch(e){throw Bu(),gi(r=>{r.addEventProcessor(e=>(t.mechanism&&(Er(e,void 0,void 0),Dr(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),Bs(e)}),e}finally{k._sentryWrappedDepth=(k._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}qn(r,e),j(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Hu(){let e=Iu(),{referrer:t}=z.document||{},{userAgent:n}=z.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Uu(e,t){let n=Ku(e,t),r={type:Zu(t),value:Qu(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Wu(e,t,n,r){let i=F()?.getOptions().normalizeDepth,a=ad(t),o={__serialized__:lr(t,i)};if(a)return{exception:{values:[Uu(e,a)]},extra:o};let s={exception:{values:[{type:Vn(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:rd(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=Ku(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function Gu(e,t){return{exception:{values:[Uu(e,t)]}}}function Ku(e,t){let n=t.stacktrace||t.stack||``,r=Ju(t),i=Yu(t);try{return e(n,r,i)}catch{}return[]}var qu=/Minified React error #\d+;/i;function Ju(e){return e&&qu.test(e.message)?1:0}function Yu(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function Xu(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Zu(e){let t=e?.name;return!t&&Xu(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function Qu(e){let t=e?.message;return Xu(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Yl(t.error):Yl(e):`No error message`}function $u(e,t,n,r){let i=td(e,t,n?.syntheticException||void 0,r);
18return Dr(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),ys(i)}function ed(e,t,n=`info`,r,i){let a=nd(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),ys(a)}function td(e,t,n,r,i){let a;if(Nn(t)&&t.error)return Gu(e,t.error);if(Pn(t)||Fn(t)){let i=t;if(`stack`in t){a=Gu(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=Ku(e,n);t.length&&(i.stacktrace={frames:t},Dr(a,{synthetic:!0}))}}else{let t=i.name||(Pn(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=nd(e,o,n,r),Er(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return jn(t)?Gu(e,t):zn(t)||Vn(t)?(a=Wu(e,t,n,i),Dr(a,{synthetic:!0}),a):(a=nd(e,t,n,r),Er(a,`${t}`,void 0),Dr(a,{synthetic:!0}),a)}function nd(e,t,n,r){let i={};if(r&&n){let r=Ku(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Dr(i,{synthetic:!0})}if(Ln(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 rd(e,{isUnhandledRejection:t}){let n=Zn(e),r=t?`promise rejection`:`exception`;return Nn(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Vn(e)?`Event \`${id(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function id(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ad(e){return Object.values(e).find(jn)}var od=class extends Xc{constructor(e){let t=sd(e);xl(t,`browser`,[`browser`],z.SENTRY_SDK_SOURCE||cc()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r}=this._options;z.document&&z.document.addEventListener(`visibilitychange`,()=>{z.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),n&&this.on(`beforeSendSession`,bl)}eventFromException(e,t){return $u(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return ed(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 sd(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:z.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var cd=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,B=k,ld=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,ud=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=ld(t.value,n),e(t)))}},dd=(e=!0)=>{let t=B.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},fd=()=>dd()?.activationStart??0;function pd(e,t,n){B.document&&B.addEventListener(e,t,n)}function md(e,t,n){B.document&&B.removeEventListener(e,t,n)}var hd=-1,gd=new Set,_d=()=>B.document?.visibilityState===`hidden`&&!B.document?.prerendering?0:1/0,vd=e=>{if(bd(e)&&hd>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of gd)e();isFinite(hd)||(hd=e.type===`visibilitychange`?e.timeStamp:0,md(`prerenderingchange`,vd,!0))}},yd=()=>{if(B.document&&hd<0){let e=fd();hd=(B.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??_d(),pd(`visibilitychange`,vd,!0),pd(`pagehide`,vd,!0),pd(`prerenderingchange`,vd,!0)}return{get firstHiddenTime(){return hd},onHidden(e){gd.add(e)}}};function bd(e){return e.type===`pagehide`||B.document?.visibilityState===`hidden`}var xd=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+0xe8d4a51000}`,Sd=(e,t=-1)=>{let n=dd(),r=`navigate`;return n&&(B.document?.prerendering||fd()>0?r=`prerender`:B.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:xd(),navigationType:r}},Cd=new WeakMap;function wd(e,t){try{return Cd.get(e)||Cd.set(e,new t),Cd.get(e)}catch{return new t}}var Td=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}},Ed=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Dd=e=>{let t=!1;return()=>{t||=(e(),!0)}},Od=e=>{B.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},kd=[1800,3e3],Ad=(e,t={})=>{Od(()=>{let n=yd(),r=Sd(`FCP`),i,a=Ed(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-fd(),0),r.entries.push(t),i(!0)))});a&&(i=ud(e,r,kd,t.reportAllChanges))})},jd=[.1,.25],Md=(e,t={})=>{Ad(Dd(()=>{let n=Sd(`CLS`,0),r,i=yd(),a=wd(t,Td),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>
18n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=Ed(`layout-shift`,o);s&&(r=ud(e,n,jd,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),B?.setTimeout?.(r))}))},Nd=0,Pd=1/0,Fd=0,Id=e=>{e.forEach(e=>{e.interactionId&&(Pd=Math.min(Pd,e.interactionId),Fd=Math.max(Fd,e.interactionId),Nd=Fd?(Fd-Pd)/7+1:0)})},Ld,Rd=()=>Ld?Nd:performance.interactionCount||0,zd=()=>{`interactionCount`in performance||Ld||(Ld=Ed(`event`,Id,{type:`event`,buffered:!0,durationThreshold:0}))},Bd=10,Vd=0,Hd=()=>Rd()-Vd,Ud=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Vd=Rd(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(Hd()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<Bd||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>Bd){let e=this._longestInteractionList.splice(Bd);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},Wd=e=>{let t=B.requestIdleCallback||B.setTimeout;B.document?.visibilityState===`hidden`?e():(e=Dd(e),pd(`visibilitychange`,e,{once:!0,capture:!0}),pd(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),md(`visibilitychange`,e,{capture:!0}),md(`pagehide`,e,{capture:!0})}))},Gd=[200,500],Kd=40,qd=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=yd();Od(()=>{zd();let r=Sd(`INP`),i,a=wd(t,Ud),o=e=>{Wd(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=Ed(`event`,o,{durationThreshold:t.durationThreshold??Kd});i=ud(e,r,Gd,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},Jd=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},Yd=[2500,4e3],Xd=(e,t={})=>{Od(()=>{let n=yd(),r=Sd(`LCP`),i,a=wd(t,Jd),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-fd(),0),r.entries=[t],i())},s=Ed(`largest-contentful-paint`,o);if(s){i=ud(e,r,Yd,t.reportAllChanges);let n=Dd(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(Wd(n),md(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])pd(e,a,{capture:!0})}})},Zd=[800,1800],Qd=e=>{B.document?.prerendering?Od(()=>Qd(e)):B.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>Qd(e),!0)},$d=(e,t={})=>{let n=Sd(`TTFB`),r=ud(e,n,Zd,t.reportAllChanges);Qd(()=>{let e=dd();e&&(n.value=Math.max(e.responseStart-fd(),0),n.entries=[e],r(!0))})},ef={},tf={},nf,rf,af,of;function sf(e,t=!1){return _f(`cls`,e,pf,nf,t)}function cf(e,t=!1){return _f(`lcp`,e,mf,rf,t)}function lf(e){return _f(`ttfb`,e,hf,af)}function uf(e){return _f(`inp`,e,gf,of)}function df(e,t){return yf(e,t),tf[e]||(vf(e),tf[e]=!0),bf(e,t)}function ff(e,t){let n=ef[e];if(n?.length)for(let r of n)try{r(t)}catch(t){cd&&A.error(`Error while triggering instrumentation handler. 19Type: ${e} 20Name: ${_n(r)} 21Error:`,t)}}function pf(){return Md(e=>{ff(`cls`,{metric:e}),nf=e},{reportAllChanges:!0})}function mf(){return Xd(e=>{ff(`lcp`,{metric:e}),rf=e},{reportAllChanges:!0})}function hf(){return $d(e=>{ff(`ttfb`,{metric:e}),af=e})}function gf(){return qd(e=>{ff(`inp`,{metric:e}),of=e})}function _f(e,t,n,r,i=!1){yf(e,t);let a;return tf[e]||(a=n(),tf[e]=!0),r&&t({metric:r}),bf(e,t,i?a:void 0)}function vf(e){let t={};e===`event`&&(t.durationThreshold=0),Ed(e,t=>{ff(e,{entries:t})},t)}function yf(e,t){ef[e]=ef[e]||[],ef[e].push(t)}function bf(e,t,n){return()=>{n&&n();let r=ef[e];
21if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function xf(e){return`duration`in e}var Sf=80,Cf={};try{typeof Node<`u`&&(Cf.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(Cf.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,Cf.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,Cf.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,Cf.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(Cf.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function wf(e,t,n){let r=Cf[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function V(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||Sf;for(;n&&i++<5&&(o=Tf(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=wf(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function Tf(e,t){let n=[],r=wf(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=wf(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>wf(e,`getAttribute`,t)).map(t=>[t,wf(e,`getAttribute`,t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=wf(e,`id`);t&&n.push(`#${t}`);let r=wf(e,`className`);if(r&&In(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=wf(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}var Ef=e=>{let t=t=>{(t.type===`pagehide`||B.document?.visibilityState===`hidden`)&&e(t)};pd(`visibilitychange`,t,{capture:!0,once:!0}),pd(`pagehide`,t,{capture:!0,once:!0})};function Df(e){return typeof e==`number`&&isFinite(e)}function Of(e,t,n,{...r}){let i=L(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),Io(e,()=>{let e=Po({startTime:t,...r});return e&&e.end(n),e})}function kf(e){let t=F();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=P(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return Po({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":B.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function Af(){return B.addEventListener&&B.performance}function H(e){return e/1e3}function jf(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function Mf(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Nf(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}Ef(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function Pf(e){let t=0,n;if(!Mf(`layout-shift`))return;let r=sf(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);Nf(e,(e,i)=>{Ff(t,n,i,e),r()})}function Ff(e,t,n,r){cd&&A.log(`Sending CLS span (${e})`);let i=t?H((N()||0)+t.startTime):M(),a=P().getScopeData().transactionName,o=t?V(t.sources[0]?.node):`Layout shift`,s={[I]:`auto.http.browser.cls`,[xi]:`ui.webvital.cls`,[Di]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=V(e.node)});let c=kf({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[Ci]:``,[wi]:e}),c.end(i))}function If(e){return e!=null&&e>0&&e<=6e4}function Lf(e){let t=0,n;if(!Mf(`largest-contentful-paint`))return;let r=cf(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!If(e.value)||(t=e.value,n=r)},!0);Nf(e,(e,i)=>{Rf(t,n,i,e),r()})}function Rf(e,t,n,r){if(!If(e))return;cd&&A.log(`Sending LCP span (${e})`);let i=H((N()||0)+(t?.startTime||0)),a=P().getScopeData().transactionName,o=t?V(t.element):`Largest contentful paint`,s={[I]:`auto.http.browser.lcp`,[xi]:`ui.webvital.lcp`,[Di]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=V(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=kf({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[Ci]:`millisecond`,[wi]:e}),c.end(i))}function zf(e){return e&&((N()||performance.timeOrigin)+e)/1e3}function Bf(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=jf(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return N()||Af()?.timeOrigin?Vf({...t,"http.request.redirect_start":zf(e.redirectStart),"http.request.redirect_end":zf(e.redirectEnd),"http.request.worker_start":zf(e.w
21orkerStart),"http.request.fetch_start":zf(e.fetchStart),"http.request.domain_lookup_start":zf(e.domainLookupStart),"http.request.domain_lookup_end":zf(e.domainLookupEnd),"http.request.connect_start":zf(e.connectStart),"http.request.secure_connection_start":zf(e.secureConnectionStart),"http.request.connection_end":zf(e.connectEnd),"http.request.request_start":zf(e.requestStart),"http.request.response_start":zf(e.responseStart),"http.request.response_end":zf(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function Vf(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var Hf=2147483647,Uf=0,Wf={},Gf,Kf;function qf({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=Af();if(r&&N()){r.mark&&B.performance.mark(`sentry-tracing-init`);let i=t?Lf(n):t===!1?Qf():void 0,a=e?Pf(n):e===!1?Zf():void 0,o=$f(),s=ep();return()=>{o(),s(),i?.(),a?.()}}return()=>void 0}function Jf(){df(`longtask`,({entries:e})=>{let t=Fa();if(!t)return;let{op:n,start_timestamp:r}=L(t);for(let i of e){let e=H(N()+i.startTime),a=H(i.duration);n===`navigation`&&r&&e<r||Of(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[I]:`auto.ui.browser.metrics`}})}})}function Yf(){new PerformanceObserver(e=>{let t=Fa();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=H(N()+n.startTime),{start_timestamp:r,op:i}=L(t);if(i===`navigation`&&r&&e<r)continue;let a=H(n.duration),o={[I]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),Of(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function Xf(){df(`event`,({entries:e})=>{let t=Fa();if(t){for(let n of e)if(n.name===`click`){let e=H(N()+n.startTime),r=H(n.duration),i={name:V(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[I]:`auto.ui.browser.metrics`}},a=Lu(n.target);a&&(i.attributes[`ui.component_name`]=a),Of(t,e,e+r,i)}}})}function Zf(){return sf(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Wf.cls={value:e.value,unit:``},Kf=t)},!0)}function Qf(){return cf(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!If(e.value)||(Wf.lcp={value:e.value,unit:`millisecond`},Gf=t)},!0)}function $f(){return lf(({metric:e})=>{e.entries[e.entries.length-1]&&(Wf.ttfb={value:e.value,unit:`millisecond`})})}function ep(){return df(`paint`,({entries:e})=>{let t=yd();for(let n of e){let e=n.startTime<t.firstHiddenTime;n.name===`first-paint`&&e&&(Wf.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&e&&(Wf.fcp={value:n.startTime,unit:`millisecond`})}})}function tp(e,t){let n=Af(),r=N();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o}=t,s=H(r),c=n.getEntries(),{op:l,start_timestamp:u}=L(e);c.slice(Uf).forEach(t=>{let n=H(t.startTime),r=H(Math.max(0,t.duration));if(!(l===`navigation`&&u&&s+n<u))switch(t.entryType){case`navigation`:sp(e,t,s);break;case`mark`:case`paint`:case`measure`:ap(e,t,n,r,s,a);break;case`resource`:dp(e,t,t.name,n,r,s,o)}}),Uf=Math.max(c.length-1,0),fp(e,i)}function np(e,t){let n=N();if(!Af()?.getEntries||!n){rp();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:a}=t,o=H(n);if(L(e).op===`pageload`){if(hp(Wf),r){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),cd&&A.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{Wf[e]&&t(e,Wf[e].value)}),Wf[`ttfb.requestTime`]&&t(`ttfb.requestTime`,Wf[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else i||delete Wf.cls,a||delete Wf.lcp,Object.entries(Wf).forEach(([t,n])=>{So(t,n.value,n.unit,e)}),pp(e,t);e.setAttribute(r?`browser.performance.time_origin`:`performance.timeOrigin`,o),e.setAttribute(r?`browser.performance.navigation.activation_start`:`performance.activationStart`,fd())}rp()}function rp(){Gf=void 0,Kf=void 0,Wf={}}function ip(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function ap(e,t,n,r,i,a){if(ip(t)||[`mark`,`measure`].includes(t.entryType)&&yr(t.name,a))return;let o=dd(!1),s=H(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[I]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),op(d,t),c<=u&&Of(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function op(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&Rn(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(Rn(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}
21function sp(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{cp(e,t,r,n)}),cp(e,t,`secureConnection`,n,`TLS/SSL`),cp(e,t,`fetch`,n,`cache`),cp(e,t,`domainLookup`,n,`DNS`),up(e,t,n)}function cp(e,t,n,r,i=n){let a=t[lp(n)],o=t[`${n}Start`];!o||!a||Of(e,r+H(o),r+H(a),{op:`browser.${i}`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function lp(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function up(e,t,n){let r=n+H(t.requestStart),i=n+H(t.responseEnd),a=n+H(t.responseStart);t.responseEnd&&(Of(e,r,i,{op:`browser.request`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`}}),Of(e,a,i,{op:`browser.response`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`}}))}function dp(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[I]:`auto.resource.browser.metrics`},l=fl(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(B.location.origin),c[ps]=n,mp(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...Bf(t)},d=a+r;Of(e,d,d+i,{name:n.replace(B.location.origin,``),op:s,attributes:u})}function fp(e,t){let n=B.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),Df(r.rtt)&&(t?e.setAttribute(`network.connection.rtt`,r.rtt):L(e).op===`pageload`&&So(`connection.rtt`,r.rtt,`millisecond`))),Df(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),Df(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function pp(e,t){Gf&&t.recordLcpOnPageloadSpan&&(Gf.element&&e.setAttribute(`lcp.element`,V(Gf.element)),Gf.id&&e.setAttribute(`lcp.id`,Gf.id),Gf.url&&e.setAttribute(`lcp.url`,Gf.url.trim().slice(0,200)),Gf.loadTime!=null&&e.setAttribute(`lcp.loadTime`,Gf.loadTime),Gf.renderTime!=null&&e.setAttribute(`lcp.renderTime`,Gf.renderTime),e.setAttribute(`lcp.size`,Gf.size)),Kf?.sources&&t.recordClsOnPageloadSpan&&Kf.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,V(t.node)))}function mp(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<Hf||typeof i==`string`)&&(t[r]=i)})}function hp(e){let t=dd(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var gp=[],_p=new Map,vp=new Map;function yp(){if(Af()&&N()){let e=xp();return()=>{e()}}return()=>void 0}var bp={click:`click`,pointerdown:`click`,pointerup:`click`,mousedown:`click`,mouseup:`click`,touchstart:`click`,touchend:`click`,mouseover:`hover`,mouseout:`hover`,mouseenter:`hover`,mouseleave:`hover`,pointerover:`hover`,pointerout:`hover`,pointerenter:`hover`,pointerleave:`hover`,dragstart:`drag`,dragend:`drag`,drag:`drag`,dragenter:`drag`,dragleave:`drag`,dragover:`drag`,drop:`drag`,keydown:`press`,keyup:`press`,keypress:`press`,input:`press`};function xp(){return uf(Sp)}var Sp=({metric:e})=>{if(e.value==null)return;let t=H(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&bp[t.name]);if(!n)return;let{interactionId:r}
21=n,i=bp[n.name],a=H(N()+n.startTime),o=Fa(),s=o?R(o):void 0,c=r==null?void 0:_p.get(r),l=c?.span||s,u=l?L(l).description:P().getScopeData().transactionName,d=kf({name:c?.elementName||V(n.target),transaction:u,attributes:{[I]:`auto.http.browser.inp`,[xi]:`ui.interaction.${i}`,[Di]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[Ci]:`millisecond`,[wi]:e.value}),d.end(a+t))};function Cp(e){return e==null?void 0:_p.get(e)}function wp(){let e=Object.keys(bp);uc()&&e.forEach(e=>{B.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=V(t),r=Math.round(e.timeStamp);if(vp.set(r,n),vp.size>50){let e=vp.keys().next().value;e!==void 0&&vp.delete(e)}}function n(e){let t=Math.round(e.startTime),n=vp.get(t);if(!n)for(let e=-5;e<=5;e++){let r=vp.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=Fa(),r=t&&R(t);e.forEach(e=>{if(!xf(e))return;let t=e.interactionId;if(t==null||_p.has(t))return;let i=e.target?V(e.target):n(e);if(gp.length>10){let e=gp.shift();_p.delete(e)}gp.push(t),_p.set(t,{span:r,elementName:i})})};df(`event`,r),df(`first-input`,r)}function Tp(e){let{name:t,op:n,origin:r,metricName:i,value:a,attributes:o,parentSpan:s,reportEvent:c,startTime:l,endTime:u}=e,d=P().getScopeData().transactionName,f={[I]:r,[xi]:n,[Di]:0,[`browser.web_vital.${i}.value`]:a,[fs]:d,[ds]:d,"user_agent.original":B.navigator?.userAgent,...o};s&&ba(s).attributes?.[`sentry.op`]===`pageload`&&(f[`sentry.pageload.span_id`]=s.spanContext().spanId),c&&(f[`browser.web_vital.${i}.report_event`]=c);let p=Po({name:t,attributes:f,startTime:l,parentSpan:s});p&&p.end(u??l)}function Ep(e){let t=0,n;if(!Mf(`largest-contentful-paint`))return;let r=cf(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!If(e.value)||(t=e.value,n=r)},!0);Nf(e,(e,i,a)=>{Dp(t,n,a,e),r()})}function Dp(e,t,n,r){if(!If(e))return;cd&&A.log(`Sending LCP span (${e})`);let i=N()||0,a=H(i),o=H(i+(t?.startTime||0)),s=t?V(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=V(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),Tp({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function Op(e){let t=0,n;if(!Mf(`layout-shift`))return;let r=sf(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);Nf(e,(e,i,a)=>{kp(t,n,a,e),r()})}function kp(e,t,n,r){cd&&A.log(`Sending CLS span (${e})`);let i=t?H((N()||0)+t.startTime):M(),a=t?V(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=V(e.node)}),Tp({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function Ap(){!Af()||!N()||uf(({metric:e})=>{if(e.value==null||H(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&bp[t.name]);t&&jp(e.value,t)})}function jp(e,t){cd&&A.log(`Sending INP span (${e})`);let n=H(N()+t.startTime),r=H(e),i=bp[t.name],a=Cp(t.interactionId),o=Fa(),s=o?R(o):void 0,c=a?.span||s,l=c?ba(c).name:P().getScopeData().transactionName;Tp({name:a?.elementName||V(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[Di]:t.duration,[fs]:l,[ds]:l},startTime:n,endTime:n+r,parentSpan:c})}var Mp=1e3,Np,Pp,Fp;function Ip(e){xn(`dom`,e),Sn(`dom`,Lp)}function Lp(){if(!B.document)return;let e=Cn.bind(null,`dom`),t=Bp(e,!0);B.document.addEventListener(`click`,t,!1),B.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=B[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Kn(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=Bp(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Kn(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 Rp(e){if(e.type!==Pp)return!1;try{if(!e.target||e.target._sentryId!==Fp)return!1}catch{}return!0}function zp(e,t){return e===`keypress`?!t?.tagName||!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function Bp(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Vp(n);if(zp(n.type,r))return;j(n,`_sentryCaptured`,!0),r&&!r._sentryId&&j(r,`_sentryId`,Cr());let i=n.type===`keypress`?`input`:n.type;Rp(n)||(e({event:n,name:i,global:t}),Pp=n.type,Fp=r?r._sentryId:void 0),clearTimeout(Np),Np=B.setTimeout(()=>{Fp=void 0,Pp=void 0},Mp)}}function Vp(e){try{return e.target}catch{return null}}var Hp;function Up(e){let t=`history`;xn(t,e),Sn(t,Wp)}function Wp(){if(B.addEventListener(`popstate`,()=>{let e=B.location.href,t=Hp;Hp=e,t!==e&&Cn(`history`,{from:t,to:e})}),!Su())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Hp,i=Gp(String(n));if(Hp=i,r===i)return e.apply(this,t);Cn(`history`,{from:r,to:i})}return e.apply(this,t)}}Kn(B.history,`pushState`,e),Kn(B.history,`replaceState`,e)}function Gp(e){try{return new URL(e,B.location.origin).toString()}catch{return e}}var Kp={};function qp(e){let t=Kp[e];if(t)return t;let n=B[e];if(wu(n))return Kp[e]=n.bind(B);let r=B.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){cd&&A.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Kp[e]=n.bind(B))}function Jp(e){Kp[e]=void 0}function Yp(...e){return qp(`setTimeout`)(...e)}var Xp=`__sentry_xhr_v3__`;function Zp(e){xn(`xhr`,e),Sn(`xhr`,Qp)}function Qp(){if(!B.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=M()*1e3,a=In(n[0])?n[0].toUpperCase():void 0,o=$p(n[1]);if(!a||!o)return e.apply(t,n);t[Xp]={method:a,url:o,request_headers:{}}
21,a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[Xp];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}Cn(`xhr`,{endTimestamp:M()*1e3,startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[Xp];return a&&In(r)&&In(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 r=t[Xp];return r?(n[0]!==void 0&&(r.body=n[0]),Cn(`xhr`,{startTimestamp:M()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function $p(e){if(In(e))return e;try{return e.toString()}catch{}}var em=Symbol.for(`sentry__originalRequestBody`);function tm(e){return new URLSearchParams(e).toString()}function nm(e,t=A){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[tm(e)];if(!e)return[void 0]}catch(n){return cd&&t.error(n,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return cd&&t.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function rm(e=[]){if(e.length>=2&&e[1]&&typeof e[1]==`object`&&`body`in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let t=e[0][em];return t===void 0?void 0:t}}function im(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return cd&&A.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r 22`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}function am(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var om=40;function sm(e,t=qp(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw Jp(`fetch`),e}finally{n-=a,r--}}return jc(e,i,Tc(e.bufferSize||om))}var cm=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,lm=30,um=50;function dm(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 fm=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,pm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,mm=/\((\S*)(?::(\d+))(?::(\d+))\)/,hm=/at (.+?) ?\(data:(.+?),/,gm=[lm,e=>{let t=e.match(hm);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=fm.exec(e);if(n){let[,e,t,r]=n;return dm(e,`?`,+t,+r)}let r=pm.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=mm.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=bm(r[1]||`?`,r[2]);return dm(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],_m=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ym=fn(gm,[um,e=>{let t=_m.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=vm.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]=bm(n,e),dm(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),bm=(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]},xm=1024,Sm=`Breadcrumbs`,Cm=oc(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Sm,setup(e){t.console&&Zl(Em(e)),t.dom&&Ip(Tm(e,t.dom)),t.xhr&&Zp(Dm(e)),t.fetch&&Eu(Om(e)),t.history&&Up(km(e)),t.sentry&&e.on(`beforeSendEvent`,wm(e))}}}));function wm(e){return function(t){F()===e&&El({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:Tr(t)},{event:t})}}function Tm(e,t){return function(n){if(F()!==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>xm&&(cm&&A.warn(`\`dom.maxStringLength\` cannot exceed ${xm}, but a value of ${o} was configured. Sentry will use ${xm} instead.`),o=xm),typeof a==`string`&&(a=[a]);try{let e=n.event,t=Am(e)?e.target:e;r=V(t,{keyAttrs:a,maxStringLength:o}),i=Lu(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};
22i&&(s.data={"ui.component_name":i}),El(s,{event:n.event,name:n.name,global:n.global})}}function Em(e){return function(t){if(F()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:eu(t.level),message:_r(t.args,` `)};if(t.level===`assert`){if(t.args[0]===!1)n.message=`Assertion failed: ${_r(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return}El(n,{input:t.args,level:t.level})}}function Dm(e){return function(t){if(F()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Xp];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:bu(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),El(d,u)}}function Om(e){return function(t){if(F()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`)){if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),El(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:bu(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),El(s,o)}}}}function km(e){return function(t){if(F()!==e)return;let n=t.from,r=t.to,i=fl(z.location.href),a=n?fl(n):void 0,o=fl(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),El({category:`navigation`,data:{from:n,to:r}})}}function Am(e){return!!e&&!!e.target}var jm=`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(`,`),Mm=`BrowserApiErrors`,Nm=oc(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Mm,setupOnce(){t.setTimeout&&Kn(z,`setTimeout`,Pm),t.setInterval&&Kn(z,`setInterval`,Pm),t.requestAnimationFrame&&Kn(z,`requestAnimationFrame`,Fm),t.XMLHttpRequest&&`XMLHttpRequest`in z&&Kn(XMLHttpRequest.prototype,`send`,Im);let e=t.eventTarget;e&&(Array.isArray(e)?e:jm).forEach(e=>Lm(e,t))}}}));function Pm(e){return function(...t){let n=t[0];return t[0]=Vu(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${_n(e)}`}}),e.apply(this,t)}}function Fm(e){return function(t){return e.apply(this,[Vu(t,{mechanism:{data:{handler:_n(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function Im(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Kn(n,e,function(t){let n={mechanism:{data:{handler:_n(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Jn(t);return r&&(n.mechanism.data.handler=_n(r)),Vu(t,n)})}),e.apply(this,t)}}function Lm(e,t){let n=z[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Kn(n,`addEventListener`,function(n){return function(r,i,a){try{Rm(i)&&(i.handleEvent=Vu(i.handleEvent,{mechanism:{data:{handler:_n(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&zm(this,r,i),n.apply(this,[r,Vu(i,{mechanism:{data:{handler:_n(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Kn(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function Rm(e){return typeof e.handleEvent==`function`}function zm(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var Bm=oc((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(z.document===void 0){cm&&A.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Gs({ignoreDuration:!0});let e=!1;Wd(()=>{e||=(Js(),!0)});let n=mi(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();(r?.id!==n?.id||r?.ip_address!==n?.ip_address)&&(r=n,e&&Js())}),t===`route`&&Up(({from:t,to:n})=>{t!==n&&(Gs({ignoreDuration:!0}),Js(),e=!0)})}}}),Vm=`CultureContext`,Hm=oc((()=>({name:Vm,preprocessEvent(e){let t=Um();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Um();t&&hs(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function Um(){try{let e=z.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Wm=`GlobalHandlers`,Gm=oc(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Wm,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(Km(e),Zm(`onerror`)),t.onunhandledrejection&&(qm(e),Zm(`onunhandledrejection`))}}}));function Km(e){Tn(t=>{let{stackParser:n,attachStacktrace:r}=Qm();if(F()!==e||zu())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=Xm(td(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Vs(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function qm(e){On(t=>{let{stackParser:n,attachStacktrace:r}=Qm();if(F()!==e||zu())return;let i=Jm(t),a=Rn(i)?Ym(i):td(n,i,void 0,r,!0);a.level=`error`,Vs(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function Jm(e){if(Rn(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 Ym(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Xm(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||[];
22return c.length===0&&c.push({colno:r,lineno:n,filename:$m(t)??Iu(),function:`?`,in_app:!0}),e}function Zm(e){cm&&A.log(`Global Handler attached: ${e}`)}function Qm(){return F()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function $m(e){if(!(!In(e)||e.length===0))return e.startsWith(`data:`)?`<${ml(e,!1)}>`:e}var eh=oc(()=>({name:`HttpContext`,preprocessEvent(e){if(!z.navigator&&!z.location&&!z.document)return;let t=Hu(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSpan(e){if(!z.navigator&&!z.location&&!z.document)return;let t=Hu();hs(e,{[ms]:t.headers[`User-Agent`],...e.is_segment&&{"url.full":e.attributes?.[`sentry.op`]===`http.client`?void 0:t.url,"http.request.header.referer":t.headers.Referer}})}})),th=`cause`,nh=5,rh=`LinkedErrors`,ih=oc(((e={})=>{let t=e.limit||nh,n=e.key||th;return{name:rh,preprocessEvent(e,r,i){Ul(Uu,i.getOptions().stackParser,n,t,e,r)}}})),ah=/^HTML(\w*)Element$/;function oh(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(am(e)){let t=sh(e);if(ah.test(t))return`[HTMLElement: ${V(e)}]`}}function sh(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function ch(){return lh()?(cm&&$t(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function lh(){if(z.window===void 0)return!1;let e=z;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=Iu();return!(z===z.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function uh(e){return[Nl(),kl(),uu(),Nm(),Cm(),Gm(),ih(),nu(),eh(),Hm(),Bm()]}function dh(e={}){let t=!e.skipBrowserExtensionCheck&&ch(),n=e.defaultIntegrations==null?uh():e.defaultIntegrations,r={...e,enabled:!t&&e.enabled,stackParser:pn(e.stackParser||ym),integrations:nc({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||sm};return sr(oh),ol(od,r)}var U=k,fh=`sentryReplaySession`,ph=`replay_event`,mh=`Unable to send Replay`,hh=3e5,gh=9e5,_h=5e3,vh=5500,yh=6e4,bh=5e3,xh=3,Sh=15e4,Ch=5e3,wh=3e3,Th=300,Eh=2e7,Dh=4999,Oh=5e4,kh=36e5,Ah=Object.defineProperty,jh=(e,t,n)=>t in e?Ah(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mh=(e,t,n)=>jh(e,typeof t==`symbol`?t:t+``,n),W=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(W||{});function Nh(e){return e.nodeType===e.ELEMENT_NODE}function Ph(e){return e?.host?.shadowRoot===e}function Fh(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function Ih(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function Lh(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function Rh(e){try{let t=e.rules||e.cssRules;return t?Ih(Array.from(t,Bh).join(``)):null}catch{return null}}function zh(e){let t=``;for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],a=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${a?` !important`:``};`}return`${e.selectorText} { ${t} }`}function Bh(e){let t;if(Hh(e))try{t=Rh(e.styleSheet)||Lh(e)}catch{}else if(Uh(e)){let t=e.cssText,n=e.selectorText.includes(`:`),r=typeof e.style.all==`string`&&e.style.all;if(r&&(t=zh(e)),n&&(t=Vh(t)),n||r)return t}return t||e.cssText}function Vh(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function Hh(e){return`styleSheet`in e}function Uh(e){return`selectorText`in e}var Wh=class{constructor(){Mh(this,`idNodeMap`,new Map),Mh(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);
22this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Gh(){return new Wh}function Kh({maskInputOptions:e,tagName:t,type:n}){return t===`OPTION`&&(t=`SELECT`),!!(e[t.toLowerCase()]||n&&e[n]||n===`password`||t===`INPUT`&&!n&&e.text)}function qh({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function Jh(e){return e.toLowerCase()}function Yh(e){return e.toUpperCase()}var Xh=`__rrweb_original__`;function Zh(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=Xh in i?i[Xh]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function Qh(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?Jh(t):null}function $h(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function eg(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}var tg={};function ng(e){let t=tg[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return tg[e]=r.bind(window)}function rg(...e){return ng(`setTimeout`)(...e)}function ig(...e){return ng(`clearTimeout`)(...e)}function ag(e){try{return e.contentDocument}catch{}}function og(e){try{return e.contentWindow}catch{}}var sg=1,cg=RegExp(`[^a-z0-9-_:]`),lg=-2;function ug(){return sg++}function dg(e){if(e instanceof HTMLFormElement)return`form`;let t=Jh(e.tagName);return cg.test(t)?`div`:t}function fg(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var pg,mg,hg=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,gg=/^(?:[a-z+]+:)?\/\//i,_g=/^www\..*/i,vg=/^(data:)([^,]*),(.*)/i;function yg(e,t){if(!e||t.size===0)return e;try{let n=e.split(`;`),r=[];for(let e of n){if(e=e.trim(),!e)continue;let n=e.indexOf(`:`);if(n===-1){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join(`; `)+(r.length>0&&e.endsWith(`;`)?`;`:``)}catch(t){return console.warn(`Error filtering CSS properties:`,t),e}}function bg(e,t){return(e||``).replace(hg,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(gg.test(s)||_g.test(s)||vg.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${fg(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var xg=/^[^ \t\n\r\u000c]+/,Sg=/^[, \t\n\r\u000c]+/;function Cg(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(Sg),!(n>=t.length);){let a=r(xg);if(a.slice(-1)===`,`)a=Tg(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=Tg(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}if(o)e===`)`&&(o=!1);else{if(e===`,`){n+=1,i.push((a+r).trim());break}e===`(`&&(o=!0)}r+=e,n+=1}}}return i.join(`, `)}var wg=new WeakMap;function Tg(e,t){return!t||t.trim()===``?t:Dg(e,t)}function Eg(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function Dg(e,t){let n=wg.get(e);if(n||(n=e.createElement(`a`),wg.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function Og(e,t,n,r,i,a,o){if(!r)return r;if(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`))return Tg(e,r);if(n===`srcset`)return Cg(e,r);if(n===`style`){let t=bg(r,Dg(e));return o&&o.size>0&&(t=yg(t,o)),t}return t===`object`&&n===`data`?Tg(e,r):typeof a==`function`?a(n,r,i):r}function kg(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function Ag(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function jg(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Mg(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Mg(e.parentNode,t,n,r+1)}function Ng(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(jg(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Pg(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;if(a){if(c=Mg(o,Ng(r,i)),c<0)return!0;s=Mg(o,Ng(t,n),c>=0?c:1/0)}else{if(s=Mg(o,Ng(t,n)),s<0)return!1;c=Mg(o,Ng(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function Fg(e,t,n){let r=og(e);
22if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=rg(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{ig(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return rg(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function Ig(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let a=rg(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{ig(a),r=!0,t()})}function Lg(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1,ignoreCSSAttributes:S}=t,C=Rg(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:W.Document,childNodes:[]}:{type:W.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:W.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return Bg(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:C,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:S});case e.TEXT_NODE:return zg(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:W.CDATA,textContent:``,rootId:C};case e.COMMENT_NODE:return{type:W.Comment,textContent:e.textContent||``,rootId:C};default:return!1}}function Rg(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function zg(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`||void 0,m=d===`SCRIPT`||void 0,h=d===`TEXTAREA`||void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=Rh(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=bg(f,Dg(t.doc))}m&&(f=`SCRIPT_PLACEHOLDER`);let g=Pg(e,r,a,i,o,n);return!p&&!m&&!h&&f&&g&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||g)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=qh({isMasked:Pg(e,r,a,i,o,Kh({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:W.Text,textContent:f||``,isStyle:p,rootId:u}}function Bg(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,x=Ag(e,r,i,a),S=dg(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!kg(S,r.name,r.value)&&(C[r.name]=Og(n,S,Jh(r.name),r.value,e,c,b))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=Rh(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=bg(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=Rh(e.sheet);t&&(C._cssText=bg(t,Dg(n)))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=Qh(t),r=$h(t,Yh(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=Pg(t,g,v,_,y,Kh({type:n,tagName:Yh(S),maskInputOptions:s}));C.value=qh({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)Zh(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){pg||(pg=n.createElement(`canvas`),mg=pg.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);
22try{pg.width=t.naturalWidth,pg.height=t.naturalHeight,mg.drawImage(t,0,0),C.rr_dataURL=pg.toDataURL(u.type,u.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?C.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(!x&&!ag(e)&&(C.rr_src=C.src),delete C.src);let ee;try{customElements.get(S)&&(ee=!0)}catch{}return{type:W.Element,tagName:S,attributes:C,childNodes:[],isSVG:Eg(e)||void 0,needBlock:x,rootId:h,isCustom:ee}}function G(e){return e==null?``:e.toLowerCase()}function Vg(e,t){return!!(t.comment&&e.type===W.Comment||e.type===W.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&eg(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(G(e.attributes.name).match(/^msapplication-tile(image|color)$/)||G(e.attributes.name)===`application-name`||G(e.attributes.rel)===`icon`||G(e.attributes.rel)===`apple-touch-icon`||G(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&G(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(G(e.attributes.property).match(/^(og|twitter|fb):/)||G(e.attributes.name).match(/^(og|twitter):/)||G(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(G(e.attributes.name)===`robots`||G(e.attributes.name)===`googlebot`||G(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(G(e.attributes.name)===`author`||G(e.attributes.name)===`generator`||G(e.attributes.name)===`framework`||G(e.attributes.name)===`publisher`||G(e.attributes.name)===`progid`||G(e.attributes.property).match(/^article:/)||G(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(G(e.attributes.name)===`google-site-verification`||G(e.attributes.name)===`yandex-verification`||G(e.attributes.name)===`csrf-token`||G(e.attributes.name)===`p:domain_verify`||G(e.attributes.name)===`verify-v1`||G(e.attributes.name)===`verification`||G(e.attributes.name)===`shopify-checkout-api-token`))))}function Hg(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onBlockedImageLoad:ee,onStylesheetLoad:te,stylesheetLoadTimeout:ne=5e3,keepIframeSrcFn:re=()=>!1,newlyAddedElement:ie=!1,ignoreCSSAttributes:ae}=t,{preserveWhiteSpace:oe=!0}=t,se=Lg(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:re,newlyAddedElement:ie,ignoreCSSAttributes:ae});if(!se)return console.warn(e,`not serialized`),null;let ce;ce=r.hasNode(e)?r.getId(e):Vg(se,v)||!oe&&se.type===W.Text&&!se.isStyle&&!se.textContent.trim().length?lg:ug();let T=Object.assign(se,{id:ce});if(r.add(e,T),ce===lg)return null;S&&S(e);let le=!f;if(T.type===W.Element){le&&=!T.needBlock;let t=e.shadowRoot;t&&Fh(t)&&(T.isShadowHost=!0)}if((T.type===W.Document||T.type===W.Element)&&le){v.headWhitespace&&T.type===W.Element&&T.tagName===`head`&&(oe=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:oe,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onBlockedImageLoad:ee,onStylesheetLoad:te,stylesheetLoadTimeout:ne,keepIframeSrcFn:re,ignoreCSSAttributes:ae},ie=e.childNodes?Array.from(e.childNodes):[];for(let e of ie){let n=Hg(e,t);n&&T.childNodes.push(n)}if(Nh(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=Hg(n,t);r&&(Fh(e.shadowRoot)&&(r.isShadow=!0),T.childNodes.push(r))}}if(e.parentNode&&Ph(e.parentNode)&&Fh(e.parentNode)&&(T.isShadow=!0),T.type===W.Element&&T.tagName===`iframe`&&!T.needBlock&&Fg(e,()=>{let t=ag(e);
22if(t&&C){let n=Hg(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:oe,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:te,stylesheetLoadTimeout:ne,keepIframeSrcFn:re,ignoreCSSAttributes:ae});n&&C(e,n)}},w),T.type===W.Element&&T.tagName===`img`&&!e.complete&&T.needBlock){let t=e,n=()=>{if(t.isConnected&&!t.complete&&ee)try{let e=t.getBoundingClientRect();e.width>0&&e.height>0&&ee(t,T,e)}catch{}t.removeEventListener(`load`,n)};t.isConnected&&t.addEventListener(`load`,n)}return T.type===W.Element&&T.tagName===`link`&&typeof T.attributes.rel==`string`&&(T.attributes.rel===`stylesheet`||T.attributes.rel===`preload`&&typeof T.attributes.href==`string`&&eg(T.attributes.href)===`css`)&&Ig(e,()=>{if(te){let t=Hg(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:oe,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:te,stylesheetLoadTimeout:ne,keepIframeSrcFn:re,ignoreCSSAttributes:ae});t&&te(e,t)}},ne),T.type===W.Element&&delete T.needBlock,T}function Ug(e,t){let{mirror:n=new Wh,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne=()=>!1,ignoreCSSAttributes:re=new Set([])}=t||{};return Hg(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,newlyAddedElement:!1,ignoreCSSAttributes:re})}function Wg(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Gg=`Please stop import mirror directly. Instead of that,\r 23now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 24or you can use record.mirror to access the mirror instance during recording.`,Kg={map:{},getId(){return console.error(Gg),-1},getNode(){return console.error(Gg),null},removeNodeFromMap(){console.error(Gg)},has(){return console.error(Gg),!1},reset(){console.error(Gg)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(Kg=new Proxy(Kg,{get(e,t,n){return t===`map`&&console.error(Gg),Reflect.get(e,t,n)}}));function qg(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(y_(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=v_(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function Jg(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){v_(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>Jg(e,t,a||{},!0)}function Yg(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var Xg=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Xg=()=>new Date().getTime());function Zg(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function Qg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $g(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function e_(e){if(!e)return null;
24try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function t_(e,t,n,r,i){if(!e)return!1;let a=e_(e);if(!a)return!1;let o=Ng(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=Mg(a,o),c=-1;return s<0?!1:(r&&(c=Mg(a,Ng(null,r))),s>-1&&c<0||s<c)}function n_(e,t){return t.getId(e)!==-1}function r_(e,t){return t.getId(e)===lg}function i_(e,t){if(Ph(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:!e.parentNode||i_(e.parentNode,t):!0}function a_(e){return!!e.changedTouches}function o_(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function s_(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function c_(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function l_(e){return!!e?.shadowRoot}var u_=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function d_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function f_(e){let t=e,n;for(;n=d_(t);)t=n;return t}function p_(e){let t=e.ownerDocument;if(!t)return!1;let n=f_(e);return t.contains(n)}function m_(e){let t=e.ownerDocument;return t?t.contains(e)||p_(e):!1}var h_={};function g_(e){let t=h_[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return h_[e]=r.bind(window)}function __(...e){return g_(`requestAnimationFrame`)(...e)}function v_(...e){return g_(`setTimeout`)(...e)}function y_(...e){return g_(`clearTimeout`)(...e)}var K=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(K||{}),q=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(q||{}),b_=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(b_||{}),x_=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(x_||{}),S_=(e=>(e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e))(S_||{}),C_;function w_(e){C_=e}function T_(){C_=void 0}for(var J=e=>C_?((...t)=>{try{return e(...t)}catch(e){if(C_&&C_(e)===!0)return()=>{};throw e}}):e,E_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,D_=typeof Uint8Array>`u`?[]:new Uint8Array(256),O_=0;O_<E_.length;O_++)D_[E_.charCodeAt(O_)]=O_;var k_=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function A_(e){try{return e.contentDocument}catch{}}function j_(e){try{return e.contentWindow}catch{}}var M_=class{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>`u`||typeof CSSStyleSheet.prototype.replaceSync!=`function`)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let n=t.cssRules[0];
24return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement(`span`);return t.setAttribute(`style`,e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function N_(e){return`__ln`in e}var P_=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&N_(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&N_(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},F_=(e,t)=>`${e}@${t}`,I_=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new P_,r=e=>{let t=e,n=lg;for(;n===lg;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!m_(i))return;let a=Ph(i.parentNode)?this.mirror.getId(d_(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=Hg(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{s_(e,this.mirror)&&!t_(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),c_(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),l_(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(t_(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let n=j_(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)R_(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(let e of this.addedSet)!B_(this.droppedSet,e)&&!R_(this.removes,e,this.mirror)||B_(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>
24({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!r_(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!t_(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Pg(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,e_(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=Qh(t),i=t.tagName;r=$h(t,i,n);let a=Kh({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=qh({isMasked:Pg(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(t_(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r)){if(!A_(t))n=`rr_src`;else return}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
24,this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!kg(t.tagName,n)&&(i.attributes[n]=Og(this.doc,Jh(t.tagName),Jh(n),r,t,this.maskAttributeFn),n===`style`)){let n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==(n?.getPropertyValue(e)||``)||a!==(n?.getPropertyPriority(e)||``)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}if(n)for(let e of Array.from(n))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(t_(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=Ph(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);t_(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r_(t,this.mirror)||!n_(t,this.mirror)||(this.addedSet.has(t)?(L_(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||i_(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[F_(n,r)]?L_(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:Ph(e.target)&&Fh(e.target)?!0:void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(r_(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[F_(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);t_(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),l_(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){`mutationCb.blockClass.blockSelector.unblockSelector.maskAllText.maskTextClass.unmaskTextClass.maskTextSelector.unmaskTextSelector.inlineStylesheet.maskInputOptions.maskAttributeFn.maskTextFn.maskInputFn.keepIframeSrcFn.recordCanvas.inlineImages.slimDOMOptions.dataURLOptions.doc.mirror.iframeManager.stylesheetManager.shadowDomManager.canvasManager.processedNodeManager.ignoreCSSAttributes`.split(`.`).forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new M_(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function L_(e,t){e.delete(t),t.childNodes?.forEach(t=>L_(e,t))}function R_(e,t,n){return e.length!==0&&z_(e,t,n)}function z_(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}function B_(e,t){return e.size!==0&&V_(e,t)}function V_(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:V_(e,n):!1}var H_=[];function U_(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function W_(e,t){let n=new I_;H_.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.(`MutationObserver`);i&&window[i]&&(r=window[i]);let a=new r(J(t=>{e.onMutation&&e.onMutation(t)===!1||n.processMutations.bind(n)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function G_({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=qg(J(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=J(qg(J(e=>{let t=U_(e),{clientX:n,clientY:i}=a_(e)?e.changedTouches[0]:e;s||=Xg(),o.push({x:n,y:i,id:r.getId(t),timeOffset:Xg()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?q.Drag:e instanceof MouseEvent?q.MouseMove:q.TouchMove)}),i,{trailing:!1})),u=[Wg(`mousemove`,l,n),Wg(`touchmove`,l,n),Wg(`drag`,l,n)];return J(()=>
24{u.forEach(e=>e())})}function K_({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=U_(o);if(t_(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=x_.Mouse;break;case`touch`:c=x_.Touch;break;case`pen`:c=x_.Pen}c===x_.Touch?b_[t]===b_.MouseDown?u=`TouchStart`:b_[t]===b_.MouseUp&&(u=`TouchEnd`):x_.Pen}else a_(o)&&(c=x_.Touch);c===null?b_[t]===b_.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===x_.Touch||u.startsWith(`Mouse`)&&c===x_.Mouse)&&(c=null));let d=a_(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;J(e)({type:b_[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(b_).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=Jh(e),r=u(e);if(window.PointerEvent)switch(b_[e]){case b_.MouseDown:case b_.MouseUp:n=n.replace(`mouse`,`pointer`);break;case b_.TouchStart:case b_.TouchEnd:return}c.push(Wg(n,r,t))}),J(()=>{c.forEach(e=>e())})}function q_({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return Wg(`scroll`,J(qg(J(o=>{let s=U_(o);if(!s||t_(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=Zg(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function J_({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Wg(`resize`,J(qg(J(()=>{let t=Qg(),i=$g();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var Y_=[`INPUT`,`TEXTAREA`,`SELECT`],X_=new WeakMap;function Z_({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=U_(e),u=e.isTrusted,g=n&&Yh(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||Y_.indexOf(g)<0||t_(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=Qh(n),b=$h(v,g,y),x=!1,S=Kh({maskInputOptions:c,tagName:g,type:y}),C=Pg(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=qh({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=qh({isMasked:C,element:e,value:$h(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=X_.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){X_.set(t,r);let i=n.getId(t);J(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>Wg(e,J(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>Jg(e[0],e[1],{set(){J(g)({target:this,isTrusted:!1})}},!1,y))),J(()=>{v.forEach(e=>e())})}function Q_(e){let t=[];function n(e,t){if(cv(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||cv(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||cv(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||cv(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function $_(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function ev({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:J((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=$_(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:J((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$_(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;
24r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:J((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$_(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:J((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$_(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};lv(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(lv(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),lv(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),lv(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:J((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=$_(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...Q_(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:J((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$_(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...Q_(i),o]}]}),r.apply(i,a)})})}),J(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function tv({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),J(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function nv({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:J((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=$_(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:Q_(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:J((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=$_(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:Q_(a.parentRule)}),i.apply(a,s)})}),J(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function rv({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=J(o=>qg(J(a=>{let s=U_(a);if(!s||t_(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[Wg(`play`,s(S_.Play),o),Wg(`pause`,s(S_.Pause),o),Wg(`seeked`,s(S_.Seeked),o),Wg(`volumechange`,s(S_.VolumeChange),o),Wg(`ratechange`,s(S_.RateChange),o)];return J(()=>{c.forEach(e=>e())})}function iv({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=Yg(t.fonts,`add`,function(t){return function(n){return v_(J(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),J(()=>
24{r.forEach(e=>e())})}function av(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=J(()=>{let e=t.getSelection();if(!e||s&&e?.isCollapsed)return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);t_(o,r,i,a,!0)||t_(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),Wg(`selectionchange`,c)}function ov({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Yg(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function sv(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=W_(e,e.doc));let i=G_(e),a=K_(e),o=q_(e),s=J_(e,{win:n}),c=Z_(e),l=rv(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=ev(e,{win:n}),d=tv(e,e.doc),f=nv(e,{win:n}),e.collectFonts&&(p=iv(e)));let m=av(e),h=ov(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return J(()=>{H_.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function cv(e){return window[e]!==void 0}function lv(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var uv=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
24getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},dv=class{constructor(){this.crossOriginIframeMirror=new uv(ug),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},fv=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new uv(ug),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new uv(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);let t=j_(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&j_(e)?.addEventListener(`message`,this.handleMessage.bind(this)),this.loadListener?.(e);let n=A_(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case K.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:K.IncrementalSnapshot,data:{source:q.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case K.Meta:case K.Load:case K.DomContentLoaded:return!1;case K.Plugin:return t;case K.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case K.IncrementalSnapshot:switch(t.data.source){case q.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case q.Drag:case q.TouchMove:case q.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case q.ViewportResize:return!1;case q.MediaInteraction:case q.MouseInteraction:case q.Scroll:case q.CanvasMutation:case q.Input:return this.replaceIds(t.data,e,[`id`]),t;case q.StyleSheetRule:case q.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case q.Font:return t;case q.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case q.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)!Array.isArray(t[i])&&typeof t[i]!=`number`||(t[i]=Array.isArray(t[i])?e.getIds(n,t[i]):e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEac
24h(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==W.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},pv=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},mv=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Fh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let n=W_({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(q_({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),v_(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(tv({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let t=A_(e),n=j_(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(Yg(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&m_(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},hv=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new u_,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:Bh(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},gv=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,__(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Y,_v;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var vv=Gh();function yv(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:ee,recordDOM:te=!0,recordCanvas:ne=!1,recordCrossOriginIframes:re=!1,recordAfter:ie=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ae=!1,collectFonts:oe=!1,inlineImages:se=!1,plugins:ce,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:le=new Set([]),errorHandler:ue,onMutation:de,getCanvasManager:fe}=e;w_(ue);let pe=!re||window.parent===window,me=!1;if(!pe)try{window.parent.document&&(me=!1)}catch{me=!0}if(pe&&!t)throw Error(`emit function is required`);if(!pe&&!me)return()=>{};
24ee!==void 0&&C.mousemove===void 0&&(C.mousemove=ee),vv.reset();let he=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,ge=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};o_();let _e,ve=0,ye=e=>{for(let t of ce||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!me&&(e=S(e)),e};Y=(e,i)=>{let a=e;if(a.timestamp=Xg(),H_[0]?.isFrozen()&&a.type!==K.FullSnapshot&&(a.type!==K.IncrementalSnapshot||a.data.source!==q.Mutation)&&H_.forEach(e=>e.unfreeze()),pe)t?.(ye(a),i);else if(me){let e={type:`rrweb`,event:ye(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===K.FullSnapshot)_e=a,ve=0;else if(a.type===K.IncrementalSnapshot){if(a.data.source===q.Mutation&&a.data.isAttachIframe)return;ve++;let e=r&&ve>=r,t=n&&_e&&a.timestamp-_e.timestamp>n;(e||t)&&Oe(!0)}};let be=e=>{Y({type:K.IncrementalSnapshot,data:{source:q.Mutation,...e}})},xe=e=>Y({type:K.IncrementalSnapshot,data:{source:q.Scroll,...e}}),Se=e=>Y({type:K.IncrementalSnapshot,data:{source:q.CanvasMutation,...e}}),Ce=new hv({mutationCb:be,adoptedStyleSheetCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.AdoptedStyleSheet,...e}})}),we=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new dv:new fv({mirror:vv,mutationCb:be,stylesheetManager:Ce,recordCrossOriginIframes:re,wrappedEmit:Y});for(let e of ce||[])e.getMirror&&e.getMirror({nodeMirror:vv,crossOriginIframeMirror:we.crossOriginIframeMirror,crossOriginIframeStyleMirror:we.crossOriginIframeStyleMirror});let Te=new gv,Ee=xv(fe,{mirror:vv,win:window,mutationCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.CanvasMutation,...e}}),recordCanvas:ne,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:ue}),De=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new pv:new mv({mutationCb:be,scrollCb:xe,bypassOptions:{onMutation:de,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:he,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:ne,inlineImages:se,sampling:C,slimDOMOptions:ge,iframeManager:we,stylesheetManager:Ce,canvasManager:Ee,keepIframeSrcFn:T,processedNodeManager:Te,ignoreCSSAttributes:le},mirror:vv}),Oe=(e=!1)=>{if(!te)return;Y({type:K.Meta,data:{href:window.location.href,width:$g(),height:Qg()}},e),Ce.reset(),De.init(),H_.forEach(e=>e.lock());let t=Ug(document,{mirror:vv,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:he,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:ge,dataURLOptions:w,recordCanvas:ne,inlineImages:se,onSerialize:e=>{s_(e,vv)&&we.addIframe(e),c_(e,vv)&&Ce.trackLinkElement(e),l_(e)&&De.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{we.attachIframe(e,t);let n=j_(e);n&&Ee.addWindow(n),De.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Ce.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{be({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:T,ignoreCSSAttributes:le});if(!t)return console.warn(`Failed to snapshot the document`);Y({type:K.FullSnapshot,data:{node:t,initialOffset:Zg(window)}}),H_.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,vv.getId(document))};_v=Oe;try{let e=[],t=e=>J(sv)({onMutation:de,mutationCb:be,mousemoveCb:(e,t)=>Y({type:K.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.MouseInteraction,...e}}),scrollCb:xe,viewportResizeCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.ViewportResize,...e}}),inputCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.Input,...e}}),mediaInteractionCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.MediaInteraction,...e}}),styleSheetRuleCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.StyleSheetRule,...e}}),styleDeclarationCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.StyleDeclaration,...e}}),canvasMutationCb:Se,fontCb:e=>Y({type:K.IncrementalSnapshot,data:{source:q.Font,...e}}),selectionCb:e=>{Y({type:K.IncrementalSnapshot,data:{source:q.Selection,...e}})},customElementCb:e=>{Y({type:K.IncrementalSnapshot,data:{source:q.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:he,inlineStylesheet:m,sampling:C,recordDOM:te,re
24cordCanvas:ne,inlineImages:se,userTriggeredOnInput:ae,collectFonts:oe,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:T,blockSelector:a,unblockSelector:o,slimDOMOptions:ge,dataURLOptions:w,mirror:vv,iframeManager:we,stylesheetManager:Ce,shadowDomManager:De,processedNodeManager:Te,canvasManager:Ee,ignoreCSSAttributes:le,plugins:ce?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>Y({type:K.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});we.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{Oe(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(Wg(`DOMContentLoaded`,()=>{Y({type:K.DomContentLoaded,data:{}}),ie===`DOMContentLoaded`&&n()})),e.push(Wg(`load`,()=>{Y({type:K.Load,data:{}}),ie===`load`&&n()},window))),()=>{e.forEach(e=>e()),Te.destroy(),_v=void 0,T_()}}catch(e){console.warn(e)}}function bv(e){if(!_v)throw Error(`please take full snapshot after start recording`);_v(e)}yv.mirror=vv,yv.takeFullSnapshot=bv;function xv(e,t){try{return e?e(t):new k_}catch{return console.warn(`Unable to initialize CanvasManager`),new k_}}var Sv;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(Sv||={});var Cv=3,wv=5;function Tv(e){return e>9999999999?e:e*1e3}function Ev(e){return e>9999999999?e/1e3:e}function Dv(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:K.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:cr(t,10,1e3)}}),t.category===`console`)))}var Ov=`button,a`;function kv(e){return e.closest(Ov)||e}function Av(e){let t=jv(e);return!t||!(t instanceof Element)?t:kv(t)}function jv(e){return Mv(e)?e.target:e}function Mv(e){return Bn(e)&&`target`in e}var Nv;function Pv(e){return Nv||(Nv=[],Fv()),Nv.push(e),()=>{let t=Nv?Nv.indexOf(e):-1;t>-1&&Nv.splice(t,1)}}function Fv(){Kn(U,`open`,function(e){return function(...t){if(Nv)try{Nv.forEach(e=>e())}catch{}return e.apply(U,t)}})}var Iv=new Set([q.Mutation,q.StyleSheetRule,q.StyleDeclaration,q.AdoptedStyleSheet,q.CanvasMutation,q.Selection,q.MediaInteraction]);function Lv(e,t,n){e.handleClick(t,n)}var Rv=class{constructor(e,t,n=Dv){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=Pv(()=>{this._lastMutation=Hv()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(Bv(t,this._ignoreSelector)||!Vv(e))return;let n={timestamp:Ev(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Ev(e)}registerScroll(e=Date.now()){this._lastScroll=Ev(e)}registerClick(e){let t=kv(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=Hv();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:U.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i);return}if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:U.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Yp(()=>this._checkClicks(),1e3)}},zv=[`A`,`BUTTON`,`INPUT`];function Bv(e,t){return!!(!zv.includes(e.tagName)||e.tagName===`INPUT`&&![`submit`,`button`].includes(e.getAttribute(`type`)||``)||e.tagName===`A`&&(e.hasAttribute(`download`)||e.hasAttribute(`target`)&&e.getAttribute(`target`)!==`_self`)||t&&e.matches(t))}
24function Vv(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function Hv(){return Date.now()/1e3}function Uv(e,t){try{if(!Wv(t))return;let{source:n}=t.data;if(Iv.has(n)&&e.registerMutation(t.timestamp),n===q.Scroll&&e.registerScroll(t.timestamp),Gv(t)){let{type:n,id:r}=t.data,i=yv.mirror.getNode(r);i instanceof HTMLElement&&n===b_.Click&&e.registerClick(i)}}catch{}}function Wv(e){return e.type===Cv}function Gv(e){return e.data.source===q.MouseInteraction}function Kv(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var qv=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(qv||{}),Jv=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]);function Yv(e){let t={};!e[`data-sentry-component`]&&e[`data-sentry-element`]&&(e[`data-sentry-component`]=e[`data-sentry-element`]);for(let n in e)if(Jv.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return t}var Xv=e=>t=>{if(!e.isEnabled())return;let n=Qv(t);if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&Lv(e.clickDetector,n,Av(t.event)),Dv(e,n)};function Zv(e,t){let n=yv.mirror.getId(e),r=n&&yv.mirror.getNode(n),i=r&&yv.mirror.getMeta(r),a=i&&ey(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===qv.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:Yv(a.attributes)}}:{}}}function Qv(e){let{target:t,message:n}=$v(e);return Kv({category:`ui.${e.name}`,...Zv(t,n)})}function $v(e){let t=e.name===`click`,n,r=null;try{r=t?Av(e.event):jv(e.event),n=V(r,{maxStringLength:200})||`<unknown>`}catch{n=`<unknown>`}return{target:r,message:n}}function ey(e){return e.type===qv.Element}function ty(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=ny(t);n&&Dv(e,n)}function ny(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a,target:o}=e;if(!o||ry(o)||!a)return null;let s=t||r||i,c=a.length===1;if(!s&&c)return null;let l=V(o,{maxStringLength:200})||`<unknown>`;return Kv({category:`ui.keyDown`,message:l,data:{...Zv(o,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a}})}function ry(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var iy={resource:dy,paint:ly,navigation:uy};function ay(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function oy(e){return e.map(sy).filter(Boolean)}function sy(e){let t=iy[e.entryType];return t?t(e):null}function cy(e){return((N()||U.performance.timeOrigin)+e)/1e3}function ly(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=cy(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function uy(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:cy(p),end:cy(a),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function dy(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:cy(a),end:cy(i),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function fy(e){let t=e.entries[e.entries.length-1];return gy(e,`largest-contentful-paint`,t?.element?[t.element]:void 0)}function py(e){return e.sources!==void 0}function my(e){let t=[],n=[];for(let r of e.entries)if(py(r)){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=yv.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return gy(e,`cumulative-layout-shift`,n,t)}function hy(e){let t=e.entries[e.entries.length-1];return gy(e,`interaction-to-next-paint`,t?.target?[t.target]:void 0)}function gy(e,t,n,r){let i=e.value,a=e.rating,o=cy(i);return{type:`web-vital`,name:t,start:o,end:o,data:{value:i,size:i,rating:a,nodeIds:n?n.map(e=>yv.mirror.getId(e)):void 0,attributions:r}}}function _y(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];
24return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(df(e,n))}),r.push(cf(ay(fy,e)),sf(ay(my,e)),uf(ay(hy,e))),()=>{r.forEach(e=>e())}}var X=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,vy=
vendor: 10,332 bytes, line 24
24`var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});`;
24function yy(){let e=new Blob([vy],{type:`text/javascript`});return URL.createObjectURL(e)}var by=[`log`,`warn`,`error`],xy=`[Replay] `;function Sy(e,t=`info`){El({category:`console`,data:{logger:`replay`},level:t,message:`${xy}${e}`},{level:t})}function Cy(){let e=!1,t=!1,n={exception:()=>void 0,infoTick:()=>void 0,setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return X?(by.forEach(e=>{n[e]=(...n)=>{A[e](xy,...n),t&&Sy(n.join(``),eu(e))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),A.error(xy,r),e?Bs(r,{mechanism:{handled:!0,type:`auto.function.replay.debug`}}):t&&Sy(r,`error`)},n.infoTick=(...e)=>{A.log(xy,...e),t&&setTimeout(()=>Sy(e[0]),0)}):by.forEach(e=>{n[e]=()=>void 0}),n}var Z=Cy(),wy=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Eh}.`)}},Ty=class extends Error{constructor(){super(`Worker destroyed`)}},Ey=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return`sync`}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Eh)throw new wy;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:Tv(e)}},Dy=class{constructor(e){this._onMessage=({data:e})=>{let t=e;if(typeof t.id!=`number`)return;let n=this._pending.get(t.id);if(!(!n||n.method!==t.method)){if(this._pending.delete(t.id),!t.success){X&&Z.error(`Error in compression worker: `,t.response),n.reject(Error(`Error in compression worker`));return}n.resolve(t.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener(`message`,this._onMessage)}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():(X&&Z.warn(`Received worker message with unsuccessful status`,n),t(Error(`Received worker message with unsuccessful status`)))},{once:!0}),this._worker.addEventListener(`error`,e=>{X&&Z.warn(`Failed to load Replay compression worker`,e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:`Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.`}`))},{once:!0})}),this._ensureReadyPromise}destroy(){X&&Z.log(`Destroying compression worker`),this._worker.removeEventListener(`message`,this._onMessage),this._pending.forEach(e=>e.reject(new Ty)),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{this._pending.set(n,{method:e,resolve:r,reject:i});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),i(e)}})}_getAndIncrementId(){return this._id++}},Oy=class{constructor(e){this._worker=new Dy(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return`worker`}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=Tv(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Eh?Promise.reject(new wy):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{X&&Z.exception(e,`Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},ky=class{constructor(e){this._fallback=new Ey,this._compression=new Oy(e),this._used=this._fallback,this._ensureWorkerIsLoadedProm
24ise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){X&&Z.exception(e,`Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){if(e instanceof Ty)return;X&&Z.exception(e,`Failed to add events when switching buffers.`)}}};function Ay({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=jy(t);if(e)return e}return X&&Z.log(`Using simple buffer`),new Ey}function jy(e){try{let t=e||My();return t?(X&&Z.log(`Using compression worker${e?` from ${e}`:``}`),new ky(new Worker(t))):void 0}catch(e){X&&Z.exception(e,`Failed to create compression worker`)}}function My(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?yy():``}function Ny(){try{return`sessionStorage`in U&&!!U.sessionStorage}catch{return!1}}function Py(e){Fy(),e.session=void 0}function Fy(){if(Ny())try{U.sessionStorage.removeItem(fh)}catch{}}function Iy(e){return e!==void 0&&Math.random()<e}function Ly(e){if(Ny())try{U.sessionStorage.setItem(fh,JSON.stringify(e))}catch{}}function Ry(e){let t=Date.now();return{id:e.id||Cr(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function zy(e,t){return Iy(e)?`session`:t?`buffer`:!1}function By({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=Ry({sampled:zy(e,t),previousSessionId:r});return n&&Ly(i),i}function Vy(){if(!Ny())return null;try{let e=U.sessionStorage.getItem(fh);if(!e)return null;let t=JSON.parse(e);return X&&Z.infoTick(`Loading existing session`),Ry(t)}catch{return null}}function Hy(e,t,n=+new Date){return e===null||t===void 0||t<0||t!==0&&e+t<=n}function Uy(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Hy(e.started,t,r)||Hy(e.lastActivity,n,r)}function Wy(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Uy(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function Gy({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&Vy();return i?Wy(i,{sessionIdleExpire:e,maxReplayDuration:t})?(X&&Z.infoTick(`Session in sessionStorage is expired, creating new one...`),By(r,{previousSessionId:i.id})):i:(X&&Z.infoTick(`Creating new session`),By(r,{previousSessionId:n}))}function Ky(e){return e.type===K.Custom}
24function qy(e,t,n){return Xy(e,t)?(Yy(e,t,n),!0):!1}function Jy(e,t,n){return Xy(e,t)?Yy(e,t,n):Promise.resolve(null)}async function Yy(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode===`buffer`;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let a=Zy(t,e.getOptions().beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(t){if(!e.isEnabled())return e.handleException(t),null;let n=t&&t instanceof wy,a=n?`eventBufferOverflow`:`eventBufferError`,o=F();if(o){let e=n?`buffer_overflow`:`internal_sdk_error`;o.recordDroppedEvent(e,`replay`)}if(n&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:a})}}function Xy(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=Tv(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(X&&Z.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Zy(e,t){try{if(typeof t==`function`&&Ky(e))return t(e)}catch(e){return X&&Z.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}var Qy=100;function $y(e,t,n){let r=e.getContext();t&&r.traceIds.size<Qy&&r.traceIds.add(t),n&&r.segmentNames.size<Qy&&r.segmentNames.add(n)}function eb(e){return t=>{e.isEnabled()&&$y(e,t.trace_id,t.name||void 0)}}function tb(e){return!e.type}function nb(e){return e.type===`transaction`}function rb(e){return e.type===`replay_event`}function ib(e){return e.type===`feedback`}function ab(e){return(t,n)=>{if(!e.isEnabled()||!tb(t)&&!nb(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(nb(t)){ob(e,t);return}sb(e,t)}}}function ob(e,t){$y(e,t.contexts?.trace?.trace_id,t.transaction)}function sb(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!t.tags?.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r==`function`&&!r(t)||Yp(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}function cb(e){return t=>{!e.isEnabled()||!tb(t)||lb(e,t)}}function lb(e,t){let n=t.exception?.values?.[0]?.value;typeof n==`string`&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&Dv(e,Kv({category:`replay.hydrate-error`,data:{url:Iu()}}))}function ub(e){let t=F();t&&t.on(`beforeAddBreadcrumb`,t=>db(e,t))}function db(e,t){if(!e.isEnabled()||!mb(t))return;let n=fb(t);n&&Dv(e,n)}function fb(e){return!mb(e)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(e.category)||e.category.startsWith(`ui.`)?null:e.category===`console`?pb(e):Kv(e)}function pb(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Kv(e);let n=!1,r=t.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>Ch?(n=!0,`${e.slice(0,Ch)}\u2026`):e;if(typeof e==`object`)try{let t=cr(e,7);return JSON.stringify(t).length>Ch?(n=!0,`${JSON.stringify(t,null,2).slice(0,Ch)}\u2026`):t}catch{}return e});return Kv({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function mb(e){return!!e.category}function hb(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function gb(){let e=P().getPropagationContext().dsc;e&&delete e.replay_id;let t=Fa();if(t){let e=$a(t);delete e.replay_id}}function _b(e){let t=P().getPropagationContext().dsc;t&&(t.replay_id=e);let n=Fa();if(n){let t=$a(n);t.replay_id=e}}function vb(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:K.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1))}function yb(e,t){return e.recordingMode!==`buffer`||t.message===mh||!t.exception||t.type?!1:Iy(e.getOptions().errorSampleRate)}function bb(e){return Object.assign((t,n)=>{if(e.session&&Wy(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire}
24)&&gb(),!e.isEnabled()||e.isPaused())return t;if(rb(t))return delete t.breadcrumbs,t;if(!tb(t)&&!nb(t)&&!ib(t))return t;if(!e.checkAndHandleExpiredSession())return gb(),t;if(ib(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),vb(e,t),t;if(hb(t,n)&&!e.getOptions()._experiments.captureExceptions)return X&&Z.log(`Ignoring error from rrweb internals`,t),null;let r=yb(e,t);if((r||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&e.recordingMode===`buffer`&&e.session?.sampled===`buffer`){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&Ly(t)}return t},{id:`Replay`})}function xb(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:K.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function Sb(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function Cb(e){return t=>{if(!e.isEnabled())return;let n=Sb(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(xb(e,[n]),!1)))}}function wb(e,t){return X&&e.getOptions()._experiments.traceInternals?!1:hl(t,F())}function Tb(e,t){e.isEnabled()&&t!==null&&(wb(e,t.name)||e.addUpdate(()=>(xb(e,[t]),!0)))}function Eb(e){if(!e)return;let t=new TextEncoder;try{if(typeof e==`string`)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=tm(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Db(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Ob(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function kb(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:a,statusCode:o,request:s,response:c}}}function Ab(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function jb(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=Nb(n);return r.body=i,a?.length&&(r._meta={warnings:a}),r}function Mb(e,t){return Object.entries(e).reduce((n,[r,i])=>{let a=r.toLowerCase();return t.includes(a)&&e[r]&&(n[a]=i),n},{})}function Nb(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>Sh,n=Pb(e);if(t){let t=e.slice(0,Sh);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}\u2026`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Pb(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function Fb(e,t){return yr(Ib(e),t)}function Ib(e,t=U.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(U.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}
24async function Lb(e,t,n){try{let r=kb(`resource.fetch`,await zb(e,t,n));Tb(n.replay,r)}catch(e){X&&Z.exception(e,`Failed to capture fetch breadcrumb`)}}function Rb(e,t){let{input:n,response:r}=t,i=Eb(n?rm(n):void 0),a=r?Db(r.headers.get(`content-length`)):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function zb(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=Fb(o,n.networkDetailAllowUrls)&&!Fb(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?Bb(n,t.input,l):Ab(l),response:await Vb(d,n,t.response,u)}}function Bb({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?Gb(n,t):{};if(!e)return jb(i,r,void 0);let[a,o]=nm(rm(n),Z),s=jb(i,r,a);return o?Ob(s,o):s}async function Vb(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Ab(i);let a=r?Wb(r.headers,n):{};if(!r||!t&&i!==void 0)return jb(a,i,void 0);let[o,s]=await Ub(r),c=Hb(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:a});return s?Ob(c,s):c}function Hb(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let a=e?.length&&n===void 0?Eb(e):n;return r?t?jb(i,a,e):jb(i,a,void 0):Ab(a)}catch(e){return X&&Z.exception(e,`Failed to serialize response body`),jb(i,n,void 0)}}async function Ub(e){let t=qb(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await Jb(t)]}catch(e){return e instanceof Error&&e.message.indexOf(`Timeout`)>-1?(X&&Z.warn(`Parsing text body from response timed out`),[void 0,`BODY_PARSE_TIMEOUT`]):(X&&Z.exception(e,`Failed to get text body from response`),[void 0,`BODY_PARSE_ERROR`])}}function Wb(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function Gb(e,t){return e.length===1&&typeof e[0]!=`string`?Kb(e[0],t):e.length===2?Kb(e[1],t):{}}function Kb(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Wb(n,t):Array.isArray(n)?{}:Mb(n,t):{}}function qb(e){try{return e.clone()}catch(e){X&&Z.exception(e,`Failed to clone response body`)}}function Jb(e){return new Promise((t,n)=>{let r=Yp(()=>n(Error(`Timeout while trying to read response body`)),500);Yb(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function Yb(e){return await e.text()}async function Xb(e,t,n){try{let r=kb(`resource.xhr`,Qb(e,t,n));Tb(n.replay,r)}catch(e){X&&Z.exception(e,`Failed to capture xhr breadcrumb`)}}function Zb(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=Eb(r),a=n.getResponseHeader(`content-length`)?Db(n.getResponseHeader(`content-length`)):tx(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}function Qb(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!Fb(c,n.networkDetailAllowUrls)||Fb(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:Ab(d),response:Ab(f)};let p=s[Xp],m=p?Mb(p.request_headers,n.networkRequestHeaders):{},h=Mb(im(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?nm(o,Z):[void 0],[v,y]=n.networkCaptureBodies?$b(s):[void 0],b=jb(m,d,g),x=jb(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?Ob(b,_):b,response:y?Ob(x,y):x}}function $b(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return ex(e.response,e.responseType)}catch(e){t.push(e)}return X&&Z.warn(`Failed to get xhr response body`,...t),[void 0]}function ex(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&Bn(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return X&&Z.exception(t,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return X&&Z.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function tx(e,t){try{return Eb(t===`json`&&Bn(e)?JSON.stringify(e):e)}catch{return}}function nx(e){let t=F();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on(`beforeAddBreadcrumb`,(e,t)=>rx(s,e,t))}catch{}}function rx(e,t,n){if(t.data)try{ix(t)&&ox(n)&&(Zb(t,n),Xb(t,n,e)),ax(t)&&sx(n)&&(Rb(t,n),Lb(t,n,e))}catch(e){X&&Z.exception(e,`Error when enriching network breadcrumb`)}}function ix(e){return e.category===`xhr`}function ax(e){return e.category===`fetch`}function ox(e){return e?.xhr}function sx(e){return e?.input!==void 0}function cx(e){let t=F();Ip(Xv(e)),Up(Cb(e)),ub(e),nx(e),Ws(bb(e)),t&&(t.on(`beforeSendEvent`,cb(e)),t.on(`afterSendEvent`,ab(e)),t.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on(`processSegmentSpan`,eb(e)),t.on(`spanStart`,t=>{e.lastActiveSpan=t}),t.on(`spanEnd`,t=>{e.lastActiveSpan=t}),t.on(`beforeSendFeedback`,async(t,n)=>{let r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&(t.contexts.feedback.source===`api`&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on(`openFeedbackWidget`,async()=>{await e.sendBufferedReplayOrFlush()}))}async function lx(e){try{return Promise.all(xb(e,[ux(U.performance.memory)]))}catch{return[]}}function ux(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}
24function dx(e,t,n){return es(e,t,{...n,setTimeoutImpl:Yp})}var fx=k.navigator;function px(){return/iPhone|iPad|iPod/i.test(fx?.userAgent??``)||/Macintosh/i.test(fx?.userAgent??``)&&fx?.maxTouchPoints&&fx?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function mx(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){X&&Z.warn(`Received replay event after session expired.`);return}let i=r||!t;t=!0,hx(n),e.clickDetector&&Uv(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!qy(e,n,i))return!0;if(!i)return!1;let t=e.session;if(_x(e,i),e.recordingMode===`buffer`&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(X&&Z.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Ly(t))}return t?.previousSessionId||e.recordingMode===`session`&&e.flush(),!0})}catch(t){e.handleException(t)}}}function hx(e){let t=e.data;if(!(e.type!==K.IncrementalSnapshot||!t||typeof t!=`object`||!(`source`in t)||t.source!==q.Mutation||!(`attributes`in t)||!Array.isArray(t.attributes)))for(let e of t.attributes){let t=yv.mirror.getNode(e.id),n=t&&yv.mirror.getMeta(t);if(n?.type===qv.Element)for(let[t,r]of Object.entries(e.attributes))r===null?delete n.attributes[t]:n.attributes[t]=r}}function gx(e){let t=e.getOptions();return{type:K.Custom,timestamp:Date.now(),data:{tag:`options`,payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type===`worker`:!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function _x(e,t){!t||e.session?.segmentId!==0||qy(e,gx(e),!1)}function vx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function yx(e,t,n,r){return to(ho(e,mo(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function bx({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)} 25`;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function xx({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit(`preprocessEvent`,r,i);let a=await ks(e.getOptions(),r,i,t,e,mi());if(!a)return null;e.emit(`postprocessEvent`,a,i),a.platform=a.platform||`javascript`;let{name:o,version:s,settings:c}=e.getSdkMetadata()?.sdk||{};return a.sdk={...a.sdk,name:o||`sentry.javascript.unknown`,version:s||`0.0.0`,settings:c},a}async function Sx({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=bx({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,segmentNames:u,initialTimestamp:d}=r,f=F(),p=P(),m=f?.getTransport(),h=f?.getDsn();if(!f||!m||!h||!a.sampled)return Promise.resolve({});let g=await xx({scope:p,client:f,replayId:t,event:{type:ph,replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,segment_names:u,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled}});if(!g)return f.recordDroppedEvent(`event_processor`,`replay`),X&&Z.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;let _=yx(g,o,h,f.getOptions().tunnel),v;try{v=await m.send(_)}catch(e){let t=Error(mh);try{t.cause=e}catch{}throw t}let y=Ac({},v);if(kc(y,`replay`))throw new wx(y);if(typeof v.statusCode==`number`&&(v.statusCode<200||v.statusCode>=300))throw new Cx(v.statusCode);return v}var Cx=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}}
25,wx=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}},Tx=class extends Error{constructor(){super(`Session is too long, not sending replay`)}};async function Ex(e,t={count:0,interval:bh}){let{recordingData:n,onError:r}=e;if(n.length)try{return await Sx(e),!0}catch(n){if(n instanceof Cx||n instanceof wx)throw n;if(Hs(`Replays`,{_retryCount:t.count}),r&&r(n),t.count>=xh){let e=Error(`${mh} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{Yp(async()=>{try{await Ex(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var Dx=`__THROTTLED`,Ox=`__SKIPPED`;function kx(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?Ox:Dx}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var Ax=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:hh,sessionIdleExpire:gh},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=t,this._options=e,this._debouncedFlush=dx(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=kx((e,t)=>Jy(this,e,t),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(wh,n),timeout:n,scrollTimeout:Th,ignoreSelector:r?r.join(`,`):``}:void 0;if(i&&(this.clickDetector=new Rv(this,i)),X){let t=e._experiments;Z.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{U.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=Kv({category:`ui.blur`});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=Kv({category:`ui.focus`});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{ty(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){X&&Z.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){X&&Z.exception(Error(`Unable to initialize and create session`));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,X&&Z.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode===`session`){X&&Z.log(`Recording is already in progress`);return}if(this._isEnabled&&this.recordingMode===`buffer`){X&&Z.log("Buffering is in progress, call `flush()` to save the replay");return}X&&Z.infoTick(`Starting replay in session mode`),this._updateUserActivity();let e=Gy({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode=`session`,this._initializeRecording()}startBuffering(){if(this._isEnabled){X&&Z.log("Buffering is in progress, call `flush()` to save the replay");return}X&&Z.infoTick(`Starting replay in buffer mode`);let e=Gy({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=yv({...this._recordingOptions,...this.recordingMode===`buffer`?{checkoutEveryNms:yh}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:mx(this),...px(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&=(this._stopRecording(),void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode=`buffer`;let n=t??`manual`;F()?.emit(`replayEnd`,{sessionId:this.session?.id,reason:n});try{X&&Z.log(`Stopping Replay triggered by ${n}`),gb(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Py(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),X&&Z.log(`Pausing replay`))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),X&&Z.log(`Resuming replay`))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();
25X&&Z.log(`Converting buffer to session`),await this.flushImmediate();let n=this.stopRecording();!e||!n||this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),_b(this.session.id)),this.startRecording())}addUpdate(e){let t=e();this.recordingMode===`buffer`||!this._isEnabled||t!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode===`buffer`?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Hy(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled===`session`){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${U.location.pathname}${U.location.hash}${U.location.search}`,t=`${U.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===Dx){let e=Kv({category:`replay.throttled`});this.addUpdate(()=>!qy(this,{type:wv,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||Fa(),t=e&&R(e),n=(t&&L(t).data||{})[vi];if(!(!t||!n||![`route`,`custom`].includes(n)))return L(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ay({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&F()?.emit(`replayStart`,{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode===`session`&&this.session&&_b(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=Gy({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return!Wy(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`sessionExpired`}),this.initializeSampling(e.id))}_addListeners(){try{U.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),U.addEventListener(`blur`,this._handleWindowBlur),U.addEventListener(`focus`,this._handleWindowFocus),U.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(cx(this),!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=_y(this)}_removeListeners(){try{U.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),U.removeEventListener(`blur`,this._handleWindowBlur),U.removeEventListener(`focus`,this._handleWindowFocus),U.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(this.session){if(Wy(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){gb();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){X&&Z.log(`Document has become active, but session has expired`);return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:K.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=oy(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.
25initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(xb(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){X&&Z.error(`No session or eventBuffer found to flush.`);return}if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await lx(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Tx;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await Ex({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:`sendError`});let t=F();if(t){let n;n=e instanceof wx?`ratelimit_backoff`:e instanceof Tx?`invalid`:`send_error`,t.recordDroppedEvent(n,`replay`)}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){X&&Z.error(`Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){X&&Z.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`),r&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&X&&Z.log(`Flushing initial segment without checkout.`);let o=!!this._flushLock;this._flushLock||=this._runFlush();try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ly(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{let n=vx(e.target),r=t.join(`,`);return n?.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=r&&n>r;if(n>i||a){let e=Kv({category:`replay.mutations`,data:{count:n,limit:a}});this._createCustomBreadcrumb(e)}return!a||(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1)}};function jx(e,t){return[...e,...t].join(`,`)}function Mx({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:jx(e,[`.sentry-mask`,`[data-sentry-mask]`]),unmaskTextSelector:jx(t,[]),blockSelector:jx(n,[`.sentry-block`,`[data-sentry-block]`,`base`,`iframe[srcdoc]:not([src])`]),unblockSelector:jx(r,[]),ignoreSelector:jx(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`])}}function Nx({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return a;let o=n.includes(t),s=r&&t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``);return o||s?a.replace(/[\S]/g,`*`):a}var Px=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,Fx=[`content-length`,`content-type`,`accept`],Ix=Symbol.for(`sentry__originalRequestBody`),Lx=!1,Rx=!1;function zx(){if(typeof Request>`u`||Rx)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return n?.body!=null&&(r[Ix]=n.body),r};t.prototype=e.prototype,k.Request=t,Rx=!0}catch{}}var Bx=(e=>new Vx(e)),Vx=class{constructor({flushMinDelay:e=_h,flushMaxDelay:t=vh,minReplayDuration:n=Dh,maxReplayDuration:r=kh,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:f=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:x=[`title`,`placeholder`,`aria-label`],unmask:S=[],block:C=[],unblock:w=[],ignore:ee=[],maskFn:te,beforeAddRecordingEvent:ne,beforeErrorSampling:re,onError:ie,attachRawBodyFromRequest:ae=!1}={}){this.name=`Replay`;let oe=Mx({mask:b,unmask:S,block:C,unblock:w,ignore:ee});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:te,maskInputFn:te,maskAttributeFn:(e,t,n)=>Nx({maskAttributes:x,maskAllText:c,privacyOptions:oe,key:e,value:t,el:n}),...oe,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!s.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Oh),maxReplayDuration:Math.min(r,kh),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:f,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:h,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:Ux(v),networkResponseHeaders:Ux(y),beforeAddRecordingEvent:ne,beforeErrorSampling:re,onError:ie,attachRawBodyFromRequest:ae,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Px}`:Px,this._recordingOptions.ignoreCSSAttributes=new Set([`background-image`])),this._isInitialized&&uc())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return Lx}set _isInitialized(e){Lx=e}afterAllSetup(e){!uc()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&zx(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}
25startBuffering(){this._replay&&this._replay.startBuffering()}stop(e){return this._replay?this._replay.stop({forceFlush:e?.flush??this._replay.recordingMode===`session`,reason:`manual`}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&(hs(e,{"sentry.replay_id":t}),this.getRecordingMode()===`buffer`&&hs(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=Hx(this._initialOptions,e);this._replay=new Ax({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName(`ReplayCanvas`);if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function Hx(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=ia(n.replaysSessionSampleRate),a=ia(n.replaysOnErrorSampleRate);return i==null&&a==null&&$t(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function Ux(e){return[...Fx,...e.map(e=>e.toLowerCase())]}function Wx(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function Gx(e){try{return new URL(e,z.location.origin).href}catch{return}}function Kx(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function qx(e){try{return new Headers(e)}catch{return}}var Jx={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Yx(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}
25={...Jx,...t},l=typeof i==`function`?i:e=>!0,u=e=>Qx(e,o),d={},f=e.getOptions().propagateTraceparent;n&&Eu(t=>{let n=du(t,l,u,d,{propagateTraceparent:f,onRequestSpanEnd:c});if(n){let r=Gx(t.fetchData.url),i=r?fl(r).host:void 0,o=r?ml(r):void 0;n.setAttributes({[us]:o,[ps]:o,"server.address":i}),a&&Zx(n,e),s?.(n,{headers:t.headers})}}),r&&Zp(t=>{let n=$x(t,l,u,d,f,c);n&&(a&&Zx(n,e),s?.(n,{headers:qx(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var Xx=300;function Zx(e,t){let{url:n}=L(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(To(t)){let t=e.end.bind(e);e.end=e=>{let n=e??M(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,Xx)}}let i=df(`resource`,({entries:t})=>{t.forEach(t=>{Kx(t)&&t.name.endsWith(n)&&(e.setAttributes(Bf(t)),r())})})}function Qx(e,t){let n=Iu();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?yr(r.toString(),t)||a&&yr(r.pathname,t):a}{let n=!!e.match(/^\/(?!\/)/);return t?yr(e,t):n}}function $x(e,t,n,r,i,a){let o=e.xhr,s=o?.[Xp];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=za()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(ji(n,s.status_code),n.end(),a?.(n,{headers:qx(im(o)),error:e.error})),delete r[t]);return}let d=Gx(c),f=fl(d||c),p=d?ml(d):void 0,m=ml(pl(c)),h=F(),g=!!Fa(),_=g||!!h&&To(h),v=u&&_?Po({name:`${l} ${m}`,attributes:{url:ml(c),type:`xhr`,"http.method":l,"http.url":p,[ps]:p,"server.address":f?.host,[I]:`auto.http.browser`,[xi]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Ka,y=Ko(v)&&g?void 0:v;return u&&!_&&h?.recordDroppedEvent(`no_parent_span`,`span`),o.__sentry_xhr_span_id__=v.spanContext().spanId,r[o.__sentry_xhr_span_id__]=v,n(c)&&eS(o,za()&&_?y:void 0,i),h&&h.emit(`beforeOutgoingRequestSpan`,v,e),v}function eS(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=Sl({span:t,propagateTraceparent:n});r&&tS(e,r,i,a)}function tS(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!Wx(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}var nS=new WeakMap,rS=new WeakMap,iS=9e4,aS=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],oS=oc(()=>({name:`FetchStreamPerformance`,setup(){Du(e=>{if(e.response){let t=nS.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=rS.get(e.response);n&&clearTimeout(n)}}}),Eu(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get(`content-type`)||``;if(e.response.headers?.get(`content-length`)||!aS.some(e=>
25t.startsWith(e)))return;let n=e.fetchData?.url||``,r=e.fetchData?.method||`GET`,i=ul(n),a=Po({name:`${r} ${n.startsWith(`data:`)?ml(n):i?dl(i):n}`,startTime:e.endTimestamp,attributes:{url:ml(n),"http.method":r,type:`fetch`,[xi]:`http.client.stream`,[I]:`auto.http.browser.stream`}});nS.set(e.response,a);let o=setTimeout(()=>{a.isRecording()&&a.end()},iS);rS.set(e.response,o)}})}})),sS=`WebVitals`,cS=oc((e={})=>{let t=new Set(e.ignore??[]);return{name:sS,setup(n){let r=To(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:a}=e._experiments??{},o=r||t.has(`cls`)?void 0:i||!1,s=r||t.has(`lcp`)?void 0:a||!1,c=qf({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:s,client:n}),l=new WeakSet;n.on(`afterStartPageLoadSpan`,e=>{l.add(e)}),n.on(`spanEnd`,e=>{l.delete(e)&&(c(),np(e,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:s===!1,spanStreamingEnabled:r}))}),r?(t.has(`lcp`)||Ep(n),t.has(`cls`)||Op(n),t.has(`inp`)||Ap()):t.has(`inp`)||yp()},afterAllSetup(){t.has(`inp`)||wp()}}});function lS(){z.document?z.document.addEventListener(`visibilitychange`,()=>{let e=Fa();if(!e)return;let t=R(e);if(z.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=L(t);cm&&A.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}}):cm&&A.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var uS=`sentry_previous_trace`,dS=`sentry.previous_trace`;function fS(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?hS():void 0;e.on(`spanStart`,e=>{if(R(e)!==e)return;let t=P().getPropagationContext();i=pS(i,e,t),r&&mS(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=P(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(gS(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=gS(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[bi]:i.sampleRate}})}function pS(e,t,n){let r=L(t);function i(){try{let e=Number(r.data?.[`sentry.sample_rate`]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(cm&&A.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[Oi]:`previous_trace`}}),t.setAttribute(dS,`${o.traceId}-${o.spanId}-${+!!gS(o)}`)),a)}function mS(e){try{z.sessionStorage.setItem(uS,JSON.stringify(e))}catch(e){cm&&A.warn(`Could not store previous trace in sessionStorage`,e)}}function hS(){try{let e=z.sessionStorage?.getItem(uS);return JSON.parse(e)}catch{return}}function gS(e){return e.traceFlags===1}var _S=`BrowserTracing`,vS=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function yS(){let e=z.navigator;return e?.userAgent?vS.test(e.userAgent):!1}var bS={...qo,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Jx},xS=((e={})=>{`enableElementTiming`in e&&$t(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=z.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:a,_experiments:{enableInteractions:o,enableStandaloneClsSpans:s,enableStandaloneLcpSpans:c},beforeStartSpan:l,idleTimeout:u,finalTimeout:d,childSpanTimeout:f,markBackgroundSpan:p,traceFetch:m,traceXHR:h,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:_,enableHTTPTimings:v,ignoreResourceSpans:y,ignorePerformanceApiSpans:b,instrumentPageLoad:x,instrumentNavigation:S,detectRedirects:C,linkPreviousTrace:w,consistentTraceSampling:ee,enableReportPageLoaded:te,onRequestSpanStart:ne,onRequestSpanEnd:re}={...bS,...e},ie=yS(),ae,oe;function se(e,r,i=!0,a){let o=r.op===`pageload`,s=r.name,c=l?l(r):r,p=ul(a||Iu()),m={...p?.pathname&&{"url.path":p.pathname},...p&&!ll(p)&&{"url.full":p.href},...c.attributes};if(s!==c.name&&(m[vi]=`custom`),c.attributes=m,!i){let e=jr();Po({...c,startTime:e}).end(e);return}t.name=c.name,t.source=m[vi];let h=Qo(c,{idleTimeout:u,finalTimeout:d,childSpanTimeout:f,disableAutoFinish:o,beforeSpanEnd:t=>{tp(t,{ignoreResourceSpans:y,ignorePerformanceApiSpans:b,spanStreamingEnabled:To(e)}),kS(e,void 0);let n=P(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:h.spanContext().traceId,sampled:Ta(h),dsc:$a(t)}),o&&(oe=void 0)},trimIdleSpanEndTimestamp:!te});o&&te&&(oe=h),kS(e,h);function g(){n&&[`interactive`,`complete`].includes(n.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,h),n.removeEventListener(`readystatechange`,g))}o&&!te&&n&&(n.addEventListener(`readystatechange`,g),g())}return{name:_S,setup(e){if(ie){cm&&A.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(Ra(),a&&k.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?Yf():i&&Jf(),o&&Xf(),C&&n){let e=()=>{ae=M()};addEventListener(`click`,e,{capture:!0}
25),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function t(){let t=OS(e);t&&!L(t).timestamp&&(cm&&A.log(`[Tracing] Finishing current active span with op: ${L(t).op}`),t.setAttribute(Si,`cancelled`),t.end())}e.on(`startNavigationSpan`,(n,r)=>{if(F()!==e)return;if(r?.isRedirect){cm&&A.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),se(e,{op:`navigation.redirect`,...n},!1,r.url);return}ae=void 0,t();let i=P();i.setPropagationContext({traceId:Vr(),sampleRand:Math.random(),propagationSpanId:za()?void 0:Hr()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),se(e,{op:`navigation`,...n,parentSpan:null,forceTransaction:!0},!0,r?.url)}),e.on(`startPageLoadSpan`,(n,r={})=>{if(F()!==e)return;t();let i=sa(r.sentryTrace||wS(`sentry-trace`)||TS(`sentry-trace`),r.baggage||wS(`baggage`)||TS(`baggage`)),a=P();a.setPropagationContext(i),za()||(a.getPropagationContext().propagationSpanId=Hr()),a.setSDKProcessingMetadata({normalizedRequest:Hu()}),se(e,{op:`pageload`,...n})}),e.on(`endPageloadSpan`,()=>{te&&oe&&(oe.setAttribute(Si,`reportPageLoaded`),oe.end())})},afterAllSetup(e){if(ie)return;e.addIntegration&&!e.getIntegrationByName?.(`WebVitals`)&&e.addIntegration(cS({ignore:r?[]:[`inp`],_experiments:{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:c}}));let n=Iu();if(w!==`off`&&fS(e,{linkPreviousTrace:w,consistentTraceSampling:ee}),z.location){if(x){let t=N();SS(e,{name:z.location.pathname,startTime:t?t/1e3:void 0,attributes:{[vi]:`url`,[I]:`auto.pageload.browser`}})}S&&Up(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=ul(t),a=OS(e),o=a&&C&&jS(a,ae);CS(e,{name:i?.pathname||z.location.pathname,attributes:{[vi]:`url`,[I]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}p&&lS(),o&&ES(e,u,d,f,t),Yx(e,{traceFetch:m,traceXHR:h,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_,enableHTTPTimings:v,onRequestSpanStart:ne,onRequestSpanEnd:re}),g&&e.addIntegration(oS())}}});function SS(e,t,n){e.emit(`startPageLoadSpan`,t,n),P().setTransactionName(t.name);let r=OS(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function CS(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i,url:r}),e.emit(`startNavigationSpan`,t,{isRedirect:i,url:r});let a=P();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...Hu(),url:r}}),OS(e)}function wS(e){return(z.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function TS(e){return(z.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function ES(e,t,n,r,i){let a=z.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=OS(e);if(s){let e=L(s).op;if([`navigation`,`pageload`].includes(e)){cm&&A.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(Si,`interactionInterrupted`),o.end(),void 0),!i.name){cm&&A.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=Qo({name:i.name,op:a,attributes:{[vi]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var DS=`_sentry_idleSpan`;function OS(e){return e[DS]}function kS(e,t){j(e,DS,t)}var AS=1.5;function jS(e,t){let n=L(e),r=jr();return!(r-n.start_timestamp>AS||t&&r-t<=AS)}function MS(e){return zn(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}var{version:NS}=await c(`react`);function PS(e){let t={...e};xl(t,`react`),Hs(`react`,{version:NS});let n=dh(t);return sr(FS),n}function FS(e){return MS(e)?`[SyntheticEvent]`:oh(e)}var IS=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.proxyFor=e.DATADOG_SITE=void 0,e.DATADOG_SITE=`datadoghq.eu`,e.proxyFor=({environment:e,path:t,parameters:n})=>`${e===`production`?`https://www.storebrand.no/dd`:`https://www-t.storebrand.no/dd`}/${t}?${decodeURI(n)}`})),LS=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.filterViewName=e.filterUnknown=e.filterContext=e.filterString=e.maskedValues=e.ninReplacement=e.birthdateFormat=e.personNumberFormat=e.ssnFormat=e.ninFormatWithOptionalSpace=e.filter=e.filterLogBeforeSend=e.filterRumBeforeSend=void 0,e.filterRumBeforeSend=(t,r)=>(n(t),t.type===`resource`&&(t.resource.url=(0,e.filterString)(t.resource.url)),t.type===`error`&&(t.error.message=(0,e.filterString)(t.error.message)),!0),e.filterLogBeforeSend=e=>{console.debug(`filterLogBeforeSend`),t(e)};var t=n=>(console.debug(`filterLog context`,n),n===void 0?{}:Object.entries(n).reduce((n,[r,i])=>typeof i==`string`?r.toLowerCase().includes(`fornavn`)||r.toLowerCase().includes(`etternavn`)||r.toLowerCase().includes(`firstname`)||r.toLowerCase().includes(`lastname`)||r.toLowerCase().includes(`ssn`)||r.toLowerCase().includes(`personnumber`)||r.toLowerCase().includes(`birthdate`)?Object.assign(Object.assign({},n),{[r]:`***`}):Object.assign(Object.assign({},n),{[r]:(0,e.filterString)(i)}):typeof i==`object`&&i?Object.assign(Object.assign({},n),{[r]:t(i)}
25):Array.isArray(i)&&i!==null?Object.assign(Object.assign({},n),{[r]:i.map(e=>t(e))}):Object.assign(Object.assign({},n),{[r]:i}),{})),n=t=>{t.view.url=(0,e.filterString)(t.view.url),t.view.referrer=(0,e.filter)(t.view.referrer)};e.filter=t=>{if(t)return(0,e.filterString)(t)},e.ninFormatWithOptionalSpace=/(\d{6})\s?(\d{5})/g,e.ssnFormat=/\d{6}-\d{4}/g,e.personNumberFormat=/\d{4}/g,e.birthdateFormat=/\d{4}-\d{2}-\d{2}/g,e.ninReplacement=`*********`,e.maskedValues=`****`,e.filterString=t=>(t=t.replace(e.ninFormatWithOptionalSpace,e.ninReplacement),t=t.replace(e.ssnFormat,e.maskedValues),t=t.replace(e.personNumberFormat,e.maskedValues),t=t.replace(e.birthdateFormat,e.maskedValues),t),e.filterContext=t=>{if(t!==void 0)return Object.entries(t).reduce((t,[n,r])=>typeof r==`string`?Object.assign(Object.assign({},t),{[n]:(0,e.filterString)(r)}):typeof r==`object`&&r?Object.assign(Object.assign({},t),{[n]:(0,e.filterContext)(r)}):Array.isArray(r)&&r!==null?Object.assign(Object.assign({},t),{[n]:r.map(t=>(0,e.filterContext)(t))}):Object.assign(Object.assign({},t),{[n]:r}),{})},e.filterUnknown=t=>{if(t instanceof Error){let n=t,r=(0,e.filterString)(n.message||``),i=(0,e.filterString)(n.stack||``),a=(0,e.filterString)(n.name||``),o=Error(r);return o.stack=i,o.name=a,o}return t},e.filterViewName=t=>(0,e.filterString)(t)}));function RS(e,t){let n=0,r=[],i,a=!0,o=0,s=[],c=t,{stop:l}=Dt(e,`message`,({data:e})=>{if(e.type!==`wrote`||e.streamId!==c)return;let t=s[0];t&&(t.id===e.id?(s.shift(),n+=e.additionalBytesCount,r.push(e.result),i=e.trailer,t.writeCallback?t.writeCallback(e.result.byteLength):t.finishCallback&&t.finishCallback()):t.id<e.id&&l())});function u(){let e=r.length===0?new Uint8Array:Ke(r.concat(i)),t={rawBytesCount:n,output:e,outputBytesCount:e.byteLength,encoding:`deflate`};return n=0,r=[],t}function d(){a||=(e.postMessage({action:`reset`,streamId:t}),!0)}return{isAsync:!0,get isEmpty(){return a},write(n,r){e.postMessage({action:`write`,id:o,data:n,streamId:t}),s.push({id:o,writeCallback:r,data:n}),a=!1,o+=1},finish(e){d(),s.length?(s.forEach(e=>{delete e.writeCallback}),s[s.length-1].finishCallback=()=>e(u())):e(u())},finishSync(){d();let e=s.map(e=>e.data).join(``);return s.length=0,{...u(),pendingData:e}},estimateEncodedBytesCount(e){return e.length/8},stop(){l()}}}var zS=t((()=>{E()}));function BS({configuredUrl:e,error:t,source:n,scriptType:r}){if(it.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&VS(t.message)){let t;t=e?`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:`Please make sure CSP is correctly configured.`,it.error(`${t} See documentation at ${xt}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r===`worker`&&$e(t)}function VS(e){return e.includes(`Content Security Policy`)||e.includes(`requires 'TrustedScriptURL'`)}var HS=t((()=>{E()}));function US(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob([`(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t?.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;
25for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},D=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},M=!1,j=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},C=j,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},T={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=C,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=T[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;
vendor: 8,957 bytes, line 25
25for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?j(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=O(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t?.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){M||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),M=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t?.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra?.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>
25=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t?.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(T[n]);if(t.header&&(e=this.strm,a=t.header,e?.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t?.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);
25i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(T[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch{t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"7.9.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=(new TextEncoder).encode(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();`])))}function WS(e,t,n){switch(Q.status===0&&KS(e,t),Q.status){case 1:return Q.initializationFailureCallbacks.push(n),Q.worker;case 3:return Q.worker}}function GS(){return Q.status}function KS(e,t){try{let n=v(US)(e),{stop:r}=Dt(n,`error`,n=>{YS(e,t,n)}),{stop:i}=Dt(n,`message`,({data:n})=>{n.type===`errored`?YS(e,t,n.error,n.streamId):n.type===`initialized`&&JS(n.version)});n.postMessage({action:`init`}),Le(()=>qS(t),XS),Q={status:1,worker:n,stop:()=>{r(),i()},initializationFailureCallbacks:[]}}catch(n){YS(e,t,n)}}function qS(e){Q.status===1&&(it.error(`${e} failed to start: a timeout occurred while initializing the Worker`),Q.initializationFailureCallbacks.forEach(e=>e()),Q={status:2})}function JS(e){Q.status===1&&(Q={status:3,worker:Q.worker,stop:Q.stop,version:e})}function YS(e,t,n,r){Q.status===1||Q.status===0?(BS({configuredUrl:e.workerUrl,error:n,source:t,scriptType:`worker`}),Q.status===1&&Q.initializationFailureCallbacks.forEach(e=>e()),Q={status:2}):$e(n,{worker_version:Q.status===3&&Q.version,stream_id:r})}var XS,Q,ZS=t((()=>{HS(),E(),Ee(),XS=30*ve,Q={status:0}})),QS=t((()=>{ZS()}));function $S(e,t,n,r){let i=t.findTrackedSession(),a=eC(e,i,r),o=n.findView();return rt(e,{viewContext:o,errorType:a,session:i})}function eC(e,t,n){if(!t)return`rum-not-tracked`;if(ut(t,e)===ze.OFF)return`incorrect-session-plan`;if(!n)return`replay-not-started`}var tC=t((()=>{At()}));function nC(e,t){if(!e.metricsEnabled)return{stop:et};let n,r,i,{unsubscribe:a}=t.subscribe(e=>{switch(e.type){case`start`:n={forced:e.forced,timestamp:S()},r=void 0,i=void 0;break;case`document-ready`:n&&(r=Se(n.timestamp,S()));break;case`recorder-settled`:n&&(i=Se(n.timestamp,S()));break;case`aborted`:case`deflate-encoder-load-failed`:case`recorder-load-failed`:case`succeeded`:a(),n&&Me(Ye.RECORDER_INIT_METRICS_TELEMETRY_NAME,{metrics:rC(n.forced,i,Se(n.timestamp,S()),e.type,r)})}});return{stop:a}}function rC(e,t,n,r,i){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:n,result:r,waitForDocReadyDuration:i}}var iC=t((()=>{E(),Ee()}));async function aC(){try{return await v(oC)()}catch(e){BS({error:e,source:`Recorder`,scriptType:`module`})}}async function oC(){return(await o(async()=>{let{startRecording:e}=await import(`./datadogRecorder-DSZ6ZvCf.js`);return{startRecording:e}},__vite__mapDeps([0,1,2,3]))).startRecording}var sC=t((()=>{HS(),E(),a()}));function cC(e,t,n,r,i,a){let o=0,s;t.subscribe(Bt.SESSION_EXPIRED,()=>{(o===2||o===3)&&(d(),o=1)}),t.subscribe(Bt.SESSION_RENEWED,()=>{o===1&&u()});let c=new he;nC(a,c);let l=async l=>{c.notify({type:`start`,forced:l});let[u]=await Promise.all([fC(c,{type:`recorder-settled`},aC()),fC(c,{type:`document-ready`},fe(`interactive`))]);if(o!==2){c.notify({type:`aborted`});return}if(!u){o=0,c.notify({type:`recorder-load-failed`});return}let d=i();if(!d){o=0,c.notify({type:`deflate-encoder-load-failed`});return}({stop:s}=u(t,e,n,r,d,a)),o=3,c.notify({type:`succeeded`})};function u(t){let r=n.findTrackedSession(),i=r?ut(r,e):void 0;if(!lC(i,t)){o=1;return}if(uC(o))return;o=2;let a=dC(i,t)||!1;
25l(a).catch(Et),a&&n.updateSessionState({forcedReplay:`1`})}function d(){o===3&&s?.(),o=0}return{start:u,stop:d,getSessionReplayLink(){return $S(e,n,r,o!==0)},isRecording:()=>o===3}}function lC(e,t){return e!==void 0&&(e!==ze.OFF||t?.force)}function uC(e){return e===2||e===3}function dC(e,t){return t&&t.force&&e===ze.OFF}async function fC(e,t,n){try{return await n}finally{e.notify(t)}}var pC=t((()=>{tC(),iC(),sC(),At(),E()}));function mC(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:et},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}var hC=t((()=>{E()}));function gC(){if(T()&&!st(f.RECORDS))return{start:et,stop:et,getReplayStats:()=>void 0,onRumStart:et,isRecording:()=>!1,getSessionReplayLink:()=>void 0};let{strategy:e,shouldStartImmediately:t}=mC();return{start:t=>e.start(t),stop:()=>e.stop(),getSessionReplayLink:()=>e.getSessionReplayLink(),onRumStart:n,isRecording:()=>GS()===3&&e.isRecording(),getReplayStats:e=>GS()===3?Ht(e):void 0};function n(n,r,i,a,o,s){let c;function l(){return c||(o??=WS(r,`Datadog Session Replay`,()=>e.stop()),o&&(c=RS(o,qe.REPLAY))),c}e=cC(r,n,i,a,l,s),t(r)&&e.start()}}var _C=t((()=>{Ut(),zS(),ZS(),QS(),pC(),hC(),E()}));function vC(){return dt.Profiler!==void 0}var yC=t((()=>{E()}));function bC(e){let t={status:`starting`};return e.assemble.register(({eventType:e})=>e!==wt.VIEW&&e!==wt.LONG_TASK&&e!==wt.ACTION&&e!==wt.VITAL?h:{type:e,_dd:{profiling:t}}),{get:()=>t,set:e=>{t=e}}}var xC=t((()=>{At(),Lt()}));async function SC(){try{return await v(CC)()}catch(e){BS({error:e,source:`Profiler`,scriptType:`module`})}}async function CC(){return(await o(async()=>{let{createRumProfiler:e}=await import(`./datadogProfiler-Dbp0CZ-C.js`);return{createRumProfiler:e}},__vite__mapDeps([4,1,2]))).createRumProfiler}var wC=t((()=>{HS(),E(),a()}));function TC(){let e;function t(t,n,r,i,a,o){let s=i.findTrackedSession();if(!s||!EC(r,s))return;let c=bC(n);if(!v(vC)()){c.set({status:`error`,error_reason:`not-supported-by-browser`});return}v(SC)().then(n=>{if(!n){c.set({status:`error`,error_reason:`failed-to-lazy-load`});return}e=n(r,t,i,c,o,a,void 0),e.start()}).catch(Et)}return{onRumStart:t,stop:()=>{e?.stop()}}}function EC(e,t){return T()?st(f.PROFILES):re(t.id,se(e.sessionSampleRate,e.profilingSampleRate))}var DC=t((()=>{yC(),xC(),wC(),E()})),OC=n({DEFAULT_TRACKED_RESOURCE_HEADERS:()=>be,DefaultPrivacyLevel:()=>p,datadogRum:()=>jC}),kC,AC,jC,MC=t((()=>{zS(),ZS(),QS(),_C(),DC(),At(),E(),kC=gC(),AC=TC(),jC=Ot(kC,AC,{startDeflateWorker:WS,createDeflateEncoder:RS,sdkName:`rum`}),_t(dt,`DD_RUM`,jC)})),NC=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.originWhitelist=void 0,e.originWhitelist=[/http:\/\/localhost.*/,/https:\/\/www-t\.storebrand\.no\/kjop-forsikring.*/]})),PC=r((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addError=t.startView=t.configure=t.composeRumBeforeSend=void 0;var n=IS(),r=LS(),i=(MC(),e(OC)),a=NC();t.composeRumBeforeSend=e=>(t,n)=>((0,r.filterRumBeforeSend)(t,n),e?e(t,n)?((0,r.filterRumBeforeSend)(t,n),!0):!1:!0),t.configure=({appId:e,appName:r,appVersion:o,clientPublicToken:s,environment:c,trackViewsManually:l=!1,user:u,plugins:d,beforeSend:f})=>{i.datadogRum.init({allowedTracingUrls:a.originWhitelist,applicationId:e,beforeSend:(0,t.composeRumBeforeSend)(f),clientToken:s,defaultPrivacyLevel:`mask`,env:c,plugins:d,proxy:e=>(0,n.proxyFor)(Object.assign(Object.assign({environment:c},e),{path:`rum`})),service:r,sessionReplaySampleRate:0,sessionSampleRate:100,silentMultipleInit:!0,site:n.DATADOG_SITE,telemetrySampleRate:20,traceSampleRate:100,trackLongTasks:!0,trackResources:!0,trackUserInteractions:!1,trackViewsManually:l,version:o}),u?.cmid&&i.datadogRum.setUser({cmid:u.cmid})},t.startView=({name:e})=>{let t=(0,r.filterViewName)(e);i.datadogRum.startView(t)},t.addError=(e,t)=>{let n=(0,r.filterUnknown)(e),a=(0,r.filterContext)(t);i.datadogRum.addError(n,a)}}));function FC(e,t,n){let r=n.getHandler(),i=Array.isArray(r)?r:[r];return IC[e]>=IC[n.getLevel()]&&i.includes(t)}var $,IC,LC=t((()=>{$={ok:`ok`,debug:`debug`,info:`info`,notice:`notice`,warn:`warn`,error:`error`,critical:`critical`,alert:`alert`,emerg:`emerg`},IC={[$.ok]:0,[$.debug]:1,[$.info]:2,[$.notice]:4,[$.warn]:5,[$.error]:6,[$.critical]:7,[$.alert]:8,[$.emerg]:9}}));function RC(e,{includeMessage:t=!1}={}){return{stack:e.stack,kind:e.type,message:t?e.message:void 0,causes:e.causes,fingerprint:e.fingerprint,handling:e.handling}}var zC=t((()=>{}));function BC(e){return function(t,n,r){let i;FC(e,VC.http,this)&&(i=jt(`log`)),this.logImplementation(t,n,e,r,i)}}var VC,HC,UC,WC=t((()=>{LC(),zC(),E(),yt(),Ee(),VC={console:`console`,http:`http`,silent:`silent`},HC=Object.keys($),UC=class{constructor(e,t,n=VC.http,r=$.debug,i={}){this.handleLogStrategy=e,this.handlerType=n,this.level=r,this.contextManager=y(`logger`),this.tags=[],this.contextManager.setContext(i),t&&this.contextManager.setContextProperty(`logger`,{name:t})}logImplementation(e,t,n=$.info,r,i){We(()=>{let a=me(t),o;if(r!=null){let e=kt({originalError:r,nonErrorPrefix:xe.PROVIDED,source:C.LOGGER,handling:we.HANDLED,startClocks:Te()});o=je({error:RC(e,{includeMessage:!0})},e.context,a)}else o=a;this.handleLogStrategy({message:me(e),context:o,status:n},this,i)})}log(e,t,n=$.info,r){let i;FC(n,VC.http,this)&&(i=jt(`log`)),this.logImplementation(e,t,n,r,i)}setContext(e){this.contextManager.setContext(e)}getContext(){return this.contextManager.getContext()}setContextProperty(e,t){this.contextManager.setContextProperty(e,t)}
25removeContextProperty(e){this.contextManager.removeContextProperty(e)}clearContext(){this.contextManager.clearContext()}addTag(e,t){this.tags.push(Tt(e,t))}removeTagsWithKey(e){let t=De(e);this.tags=this.tags.filter(e=>e!==t&&!e.startsWith(`${t}:`))}getTags(){return this.tags.slice()}setHandler(e){this.handlerType=e}getHandler(){return this.handlerType}setLevel(e){this.level=e}getLevel(){return this.level}},UC.prototype.ok=BC($.ok),UC.prototype.debug=BC($.debug),UC.prototype.info=BC($.info),UC.prototype.notice=BC($.notice),UC.prototype.warn=BC($.warn),UC.prototype.error=BC($.error),UC.prototype.critical=BC($.critical),UC.prototype.alert=BC($.alert),UC.prototype.emerg=BC($.emerg)}));function GC(){return He?{}:{view:{referrer:document.referrer,url:window.location.href}}}var KC=t((()=>{E()})),qC,JC=t((()=>{E(),qC=Vt}));function YC(e,t,n,r,i,a){let o=HC.concat([`custom`]),s={};o.forEach(e=>{s[e]=ce(e,i,a)}),t.subscribe(0,({rawLogsEvent:i,messageContext:a=void 0,savedCommonContext:o=void 0,domainContext:c,ddtags:l=[]})=>{let u=oe(i.date),d=o||r(),f=n.trigger({startTime:u});if(f===`DISCARDED`)return;let p=te(e),m=je({view:d.view},f,i,a,{ddtags:p.concat(l).join(`,`)});e.beforeSend?.(m,c)===!1||m.origin!==C.AGENT&&(s[m.status]??s.custom).isLimitReached()||t.notify(1,m)})}var XC=t((()=>{WC(),E(),yt(),Ee(),Lt()}));function ZC(e,t,n){let r=n.subscribe(({data:n,type:r})=>{if(r!==vt.CONSOLE||!e.forwardConsoleLogs.includes(n.api))return;let i={rawLogsEvent:{date:S(),message:n.message,origin:C.CONSOLE,error:n.error&&RC(n.error),status:QC[n.api]},messageContext:n.error?.context,domainContext:{handlingStack:n.handlingStack}};t.notify(0,i)});return{stop:()=>r.unsubscribe()}}var QC,$C=t((()=>{LC(),zC(),E(),yt(),Ee(),QC={[Je.log]:$.info,[Je.debug]:$.debug,[Je.info]:$.info,[Je.warn]:$.warn,[Je.error]:$.error}}));function ew(e,t){let n=ge(e.forwardReports).subscribe(e=>{let n=e.message,r,i=e.originalError.type===`deprecation`?$.warn:$.error;i===$.error?r=RC(e):e.stack&&(n+=` Found in ${Be(e.stack)}`),t.notify(0,{rawLogsEvent:{date:S(),message:n,origin:C.REPORT,error:r,status:i}})});return{stop:()=>{n.unsubscribe()}}}var tw=t((()=>{LC(),zC(),E(),Ee()}));function nw(e,t,n){if(!e.forwardErrorsToLogs)return{stop:et};ct({responseBodyAction:e=>i(e)?m.COLLECT:m.IGNORE});let r=n.subscribe(({data:e,type:t})=>{t===vt.FETCH&&e.state===`resolve`?a(Fe.FETCH,e):t===vt.XHR&&e.state===`complete`&&a(Fe.XHR,e)});function i(e){return!ne(e.url)&&!e.isAborted&&(rw(e)||_e(e.status))}function a(e,n){if(!i(n))return;let r=`error`in n&&n.error?Xe(Ct(n.error)):n.responseBody||`Failed to load`,a={handlingStack:n.handlingStack};t.notify(0,{rawLogsEvent:{message:`${iw(e)} error ${n.method} ${n.url}`,date:n.startClocks.timeStamp,error:{stack:pe(r,aw,`...`),handling:void 0},http:{method:n.method,status_code:n.status,url:n.url},status:$.error,origin:C.NETWORK},domainContext:a})}return{stop:()=>r.unsubscribe()}}function rw(e){return e.status===0&&e.responseType!==`opaque`}function iw(e){return Fe.XHR===e?`XHR`:`Fetch`}var aw,ow=t((()=>{LC(),E(),de(),aw=32*d}));function sw(e,t,n){if(!e.forwardErrorsToLogs)return{stop:et};let r=n.subscribe(e=>{if(e.type===vt.RUNTIME_ERROR){let n=e.data;t.notify(0,{rawLogsEvent:{message:n.message,date:n.startClocks.timeStamp,error:RC(n),origin:C.SOURCE,status:$.error},messageContext:n.context})}});return{stop:()=>{r.unsubscribe()}}}var cw=t((()=>{LC(),zC(),E()}));function lw(e){function t(t,n,r,i,a){let o=je(n.getContext(),t.context);if(FC(t.status,VC.console,n)&&uw(t,o),FC(t.status,VC.http,n)){let s={rawLogsEvent:{date:a||S(),message:t.message,status:t.status,origin:C.LOGGER},messageContext:o,savedCommonContext:i,ddtags:n.getTags()};r&&(s.domainContext={handlingStack:r}),e.notify(0,s)}}return{handleLog:t}}function uw({status:e,message:t},n){Qe[dw[e]].call(pt,t,n)}var dw,fw=t((()=>{LC(),WC(),E(),yt(),Ee(),dw={[$.ok]:Je.debug,[$.debug]:Je.debug,[$.info]:Je.info,[$.notice]:Je.info,[$.warn]:Je.warn,[$.error]:Je.error,[$.critical]:Je.error,[$.alert]:Je.error,[$.emerg]:Je.error}}));function pw(e,t,n,r){let i=[b(e,`logs`)],a=ee(e,`logs`);a&&i.push(a);let o=_({endpoints:i,reportError:n});return r.expireObservable.subscribe(()=>o.forceFlush(`session_expire`)),t.subscribe(1,e=>{o.add(e)}),o}var mw=t((()=>{E(),de()}));function hw(e){let t=ue();e.subscribe(1,e=>{t.send(`log`,e)})}var gw=t((()=>{E()}));function _w(e){return{get:t=>{let n=e.findTrackedSession(t);if(n)return{session_id:n.id}}}}var vw=t((()=>{}));function yw(e){return t=>{e.notify(0,{rawLogsEvent:{message:t,date:S(),origin:C.AGENT,status:$.error}}),nt(`Error reported to customer`,{"error.message":t})}}var bw=t((()=>{LC(),E(),Ee()}));function xw(e){let t=dt;e.assemble.register(({startTime:e})=>n(e)||h),e.assembleTelemetry.register(({startTime:e})=>{let t=n(e);return t?{application:{id:t.application_id},view:{id:t.view?.id},action:{id:t.user_action?.id}}:h});function n(e){let n=r(e,Ve()?t.DD_RUM_SYNTHETICS:t.DD_RUM);if(n)return n}function r(e,t){if(t?.getInternalContext)return t.getInternalContext(e)}}var Sw=t((()=>
25{E(),Lt()}));function Cw(e,t,n){e.register(({startTime:e})=>{let r=n.findTrackedSession(e);return n.findTrackedSession(e,{returnInactive:!0,maxAge:1/0})?{service:t.service,session_id:r?r.id:void 0,session:r?{id:r.id}:void 0}:ye})}var ww=t((()=>{Lt()}));function Tw(e,t,n,r,i){let a=new qC,o=[];a.subscribe(1,e=>ae(`logs`,e));let s=yw(a),c=i.assemble;Cw(c,e,t);let l=zt(c,e,Ew),u=Ue(c,e,t,Ew),d=ht(c,e,Ew,!1);xw(i),tt(c),nw(e,a,r),sw(e,a,r),ZC(e,a,r),r.unbuffer(),ew(e,a);let{handleLog:f}=lw(a);if(YC(e,a,c,n,s),T())hw(a);else{let{stop:n}=pw(e,a,s,t);o.push(()=>n())}return{handleLog:f,getInternalContext:_w(t).get,accountContext:l,globalContext:d,userContext:u,stop:()=>{o.forEach(e=>e())}}}var Ew,Dw=t((()=>{JC(),XC(),$C(),tw(),ow(),cw(),fw(),mw(),gw(),vw(),bw(),Sw(),ww(),E(),Ew=`logs`}));function Ow(){return{assemble:Pt(),assembleTelemetry:Pt()}}var kw=t((()=>{Lt()}));function Aw(e){let t=ie(e,Mw,it);if(t)return{...t,beforeSend:t.beforeSend?Pe(t.beforeSend,`beforeSend threw an error:`):void 0}}function jw(e){let t=le(e);return{forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,...t}}var Mw,Nw=t((()=>{E(),yt(),x(),Mw={...lt,forwardErrorsToLogs:{type:`boolean`,default:!0,strict:!1},forwardConsoleLogs:{type:`enum`,values:Je,multiple:!0,allowAll:!0,default:[]},forwardReports:{type:`enum`,values:Ae,multiple:!0,allowAll:!0,default:[]}}}));function Pw(e,t){function n(){return t.isGranted()?h:ye}e.assemble.register(n),e.assembleTelemetry.register(n)}var Fw=t((()=>{Lt()}));function Iw(e,t,n,r){let i=new ke(500,e=>{nt(`preStartLogs buffer data lost`,{count:e})}),a=Ze();g(a,D.globalContext,i);let o=Ne();g(o,D.accountContext,i);let s=ft();g(s,D.userContext,i);let c,l,d,f=Ow(),p=t.observable.subscribe(m);function m(){if(!l||!c||!d)return;p.unsubscribe();let e=n(l,d,f);i.subscribe(t=>t(e)),i.unbuffer()}return{init(e,n){if(!e){it.error(`Missing configuration`);return}if(Rt(e.enableExperimentalFeatures),bt(e.allowUntrustedEvents),T()&&(e=Lw(e)),c=e,l){Ge(`DD_LOGS`,e);return}let i=Aw(e);!i||!Ft(i,n??``)||(l=i,t.tryToInit(i.trackingConsent),t.onGrantedOnce(()=>{Pw(f,t),v(Ie)(St.LOGS,i,f.assembleTelemetry,r),(T()?Ce():v(w)(i,t)).then(t=>{t&&(d=t,u(f.assembleTelemetry,d),mt(jw(e)),m())}).catch(Et)}))},get initConfiguration(){return c},globalContext:a,accountContext:o,userContext:s,getInternalContext:et,handleLog(t,n,r,a=e(),o=S()){i.notify(e=>e.handleLog(t,n,r,a,o))}}}function Lw(e){return{...e,clientToken:`empty`}}var Rw=t((()=>{kw(),Nw(),Fw(),E(),Ee()}));function zw(e={}){let t=Oe(),n=ot().observable,r=Iw(GC,t,(e,t,i)=>{let a=v(Tw)(e,t,GC,n,i);return r=Bw(r,a),a},e.sdkName),i=()=>r,a={},o=new UC((...e)=>r.handleLog(...e));return at({logger:o,init:e=>{let t=Error().stack;We(()=>r.init(e,t))},setTrackingConsent:gt(e=>{t.update(e),Nt({feature:`set-tracking-consent`,tracking_consent:e})}),getGlobalContext:It(i,D.globalContext,Re.getContext),setGlobalContext:It(i,D.globalContext,Re.setContext),setGlobalContextProperty:It(i,D.globalContext,Re.setContextProperty),removeGlobalContextProperty:It(i,D.globalContext,Re.removeContextProperty),clearGlobalContext:It(i,D.globalContext,Re.clearContext),createLogger:gt((e,t={})=>(a[e]=new UC((...e)=>r.handleLog(...e),me(e),t.handler,t.level,me(t.context)),a[e])),getLogger:gt(e=>a[e]),getInitConfiguration:gt(()=>Mt(r.initConfiguration)),getInternalContext:gt(e=>r.getInternalContext(e)),setUser:It(i,D.userContext,Re.setContext),getUser:It(i,D.userContext,Re.getContext),setUserProperty:It(i,D.userContext,Re.setContextProperty),removeUserProperty:It(i,D.userContext,Re.removeContextProperty),clearUser:It(i,D.userContext,Re.clearContext),setAccount:It(i,D.accountContext,Re.setContext),getAccount:It(i,D.accountContext,Re.getContext),setAccountProperty:It(i,D.accountContext,Re.setContextProperty),removeAccountProperty:It(i,D.accountContext,Re.removeContextProperty),clearAccount:It(i,D.accountContext,Re.clearContext)})}function Bw(e,t){return{...e,init:e=>{Ge(`DD_LOGS`,e)},getInternalContext:t.getInternalContext,globalContext:t.globalContext,userContext:t.userContext,accountContext:t.accountContext}}var Vw=t((()=>{WC(),KC(),Dw(),Rw(),E(),yt()})),Hw=n({HandlerType:()=>VC,Logger:()=>UC,StatusType:()=>$,datadogLogs:()=>Uw}),Uw,Ww=t((()=>{LC(),WC(),Vw(),E(),Uw=zw({sdkName:`logs`}),_t(dt,`DD_LOGS`,Uw)})),Gw=r((t=>
25{Object.defineProperty(t,"__esModule",{value:!0}),t.configure=t.getDatadogLogger=void 0;var n=IS(),r=(Ww(),e(Hw)),i=LS();t.getDatadogLogger=()=>r.datadogLogs.logger,t.configure=({environment:e,clientPublicToken:t,appName:o,appVersion:s,beforeSend:c,forwardConsoleLogs:l=`all`})=>{r.datadogLogs.init({beforeSend:e=>(console.debug(`beforeSend log: `,e),c&&(console.debug(`customBeforeSend`),c(e)),(0,i.filterLogBeforeSend)(e),!0),clientToken:t,env:e,forwardConsoleLogs:l,forwardErrorsToLogs:!0,proxy:t=>(0,n.proxyFor)(Object.assign(Object.assign({environment:e},t),{path:`logs`})),service:o,sessionSampleRate:100,site:n.DATADOG_SITE,telemetrySampleRate:20,version:s}),console.debug=()=>{},a()};var a=()=>{window.onerror=function(e,t,n,i,a){r.datadogLogs.logger.error(a?.message||``,{error:{stack:a?.stack}},a)}}})),Kw=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.logError=e.pageView=e.configureLogging=e.getDatadogLogger=e.configureDatadog=void 0;var t=PC(),n=Gw(),r=PC();e.configureDatadog=({appId:e,appName:t,appVersion:i,clientPublicToken:a,environment:o,trackViewsManually:s=!1,configureLogging:c=!1,forwardConsoleLogs:l=`all`,plugins:u,user:d,beforeSend:f})=>{(0,r.configure)({appId:e,appName:t,appVersion:i,beforeSend:f,clientPublicToken:a,environment:o,plugins:u,trackViewsManually:s,user:d}),c&&(0,n.configure)({appName:t,appVersion:i,clientPublicToken:a,environment:o,forwardConsoleLogs:l})};var i=Gw();Object.defineProperty(e,"getDatadogLogger",{enumerable:!0,get:function(){return i.getDatadogLogger}});var a=Gw();Object.defineProperty(e,"configureLogging",{enumerable:!0,get:function(){return a.configure}}),e.pageView=({name:e})=>{(0,t.startView)({name:e})},e.logError=(e,n)=>{(0,t.addError)(e,n)}}))(),qw=class extends Error{correlationId;data;headers;requestUrl;status;constructor(e,t){super(e),this.name=`FetchError`,this.correlationId=t.correlationId,this.data=t.data,this.headers=t.headers,this.requestUrl=t.requestUrl,this.status=t.status}},Jw=i({key:`bank-foundation-fetch-session-id`,area:`session`,raw:!0}),Yw=()=>{let e=Jw.get();if(e)return e;let t=new Date().toISOString();return Jw.set(t),t},Xw=e=>e instanceof Headers?[...e.entries()]:Array.isArray(e)?e:Wt(e),Zw=(...e)=>{let t=new Headers;return e.forEach(e=>{e&&Xw(e).forEach(([e,n])=>{t.set(e,n)})}),t},Qw=e=>typeof e==`string`||e instanceof Blob||e instanceof ArrayBuffer||e instanceof FormData||e instanceof URLSearchParams||typeof ReadableStream<`u`&&e instanceof ReadableStream||ArrayBuffer.isView(e),$w=e=>e==null?{body:null}:Qw(e)?{body:e}:{body:JSON.stringify(e),contentType:`application/json`},eT=async e=>{try{let t=await e.text();if(!t)return;try{return JSON.parse(t)}catch{return t}}catch{return}},tT=async(e,t,n,r)=>{switch(t){case`text`:return await e.text();case`blob`:return await e.blob();case`arrayBuffer`:return await e.arrayBuffer();case`void`:return null;default:{let t=await e.text();try{return t?JSON.parse(t):null}catch{throw new qw(`Failed to parse JSON response from ${n}`,{correlationId:r,data:t,headers:e.headers,requestUrl:n,status:e.status})}}}},nT=e=>{let{clientId:t,getToken:n,onError:r}=e,i=Yw(),a=()=>`${t}-${i}-${crypto.randomUUID()}`;async function o(e){let i=a(),{url:o,method:s,body:c,headers:l,signal:u,params:d,auth:f=!0}=e,p=e.responseType??`json`,m=Gt(o,d),{body:h,contentType:g}=$w(c),_=f&&n?{Authorization:`Bearer ${await n()}`}:{},v=Zw({ClientId:t,"x-correlation-id":i},_,g?{"Content-Type":g}:void 0,l),y=await globalThis.fetch(m,{body:h,headers:v,method:s,signal:u}),b=y.headers.get(`x-correlation-id`)??i;if(!y.ok){let e=new qw(`HTTP error ${y.status}`,{correlationId:b,data:await eT(y),headers:y.headers,requestUrl:m,status:y.status});throw r?.(e),e}return{data:await tT(y,p,m,b).catch(e=>{throw e instanceof qw&&r?.(e),e}),status:y.status,statusText:y.statusText}}return{get:e=>o({...e,method:`GET`}),post:e=>o({...e,method:`POST`}),put:e=>o({...e,method:`PUT`}),patch:e=>o({...e,method:`PATCH`}),del:e=>o({...e,method:`DELETE`})}},rT=e=>e instanceof qw?{correlationId:e.correlationId,requestUrl:e.requestUrl,responseData:e.data}:{correlationId:void 0,requestUrl:void 0,responseData:void 0},iT=e=>{typeof e==`object`&&e&&Object.defineProperty(e,"__sentry_skip_normalization__",{configurable:!0,value:!0,writable:!0})},aT=({responseData:e,requestUrl:t,correlationId:n})=>({axios_custom_context:{request_url:t,response_data:e,x_correlation_id:n}}),oT=({responseData:e,requestUrl:t,correlationId:n})=>(iT(e),{level:`error`,contexts:{"Custom Context":{"Response data":e}},tags:{request_url:t,x_correlation_id:n}}),sT=e=>{if(e instanceof Error)return e.message||e.name||`Unknown error`;if(typeof e==`string`)return e;if(e&&typeof e==`object`){if(`message`in e){let t=e.message;if(typeof t==`string`)return t}if(`error`in e){let t=e.error;if(t&&typeof t.message==`string`)return t.message}}try{let t=JSON.stringify(e);return typeof t==`string`?t:`Unknown error (no message)`}catch{return`Unknown exception (unserializable object)`}},cT=new Set([`date`,`ddsource`,`ddtags`,`env`,`error`,`host`,`logger`,`message`,`service`,`session_id`,`source`,`span_id`,`status`,`trace_id`,`usr`,`version`,`view`]),lT=`data_`,uT=(e,t,n
25)=>{let r=`${lT}${e}`;for(;Object.hasOwn(t,r)||Object.hasOwn(n,r);)r=`${lT}${r}`;return r},dT=e=>{let t={};for(let n of Object.keys(e)){let r=cT.has(n)?uT(n,e,t):n;t[r]=e[n]}return t},fT={prod:`production`,test:`client-t`},pT=()=>void 0,mT=(e,t)=>{console.info(`[event] ${e}`,t)},hT=({environment:e,datadog:t,sentry:n})=>{if(e===`dev`)return{logError:e=>{console.error(e??sT(e))},logEvent:pT,logEntry:pT,logInfo:pT,initMonitoring:pT};let r=t!==void 0,i=n!==void 0,a=fT[e],o=!1,s=!1,c=e=>{let t=sT(e);if(console.error(e??t),!(!r&&!i))try{let n=rT(e);r&&(0,Kw.getDatadogLogger)().error(t,aT(n),e instanceof Error?e:void 0),i&&Bs(e??t,oT(n))}catch(e){console.error(`Sending exception to monitoring platform failed: ${sT(e)}`)}},l=(e,t={})=>{if(!r){mT(e,t);return}try{(0,Kw.getDatadogLogger)().info(e,{...dT(t),environment:a})}catch(n){mT(e,t),console.error(`Sending event to monitoring platform failed: ${sT(n)}`)}};return{logError:c,logEvent:l,logEntry:(e={})=>{l(`event:entered_solution`,{...e})},logInfo:e=>{if(!r){console.info(e);return}try{(0,Kw.getDatadogLogger)().info(e,{environment:a})}catch{console.info(e)}},initMonitoring:({cmid:e}={})=>{let r;if(t&&!o)try{(0,Kw.configureDatadog)({appId:t.appId,appName:t.appName,appVersion:t.appVersion,clientPublicToken:t.clientPublicToken,configureLogging:t.configureLogging??!0,environment:a,user:{cmid:e}}),o=!0}catch(e){r=e}if(n&&!s)try{let t=n.replaysSessionSampleRate!==void 0||n.replaysOnErrorSampleRate!==void 0;PS({dsn:n.dsn,environment:a,integrations:t?[xS(),Bx()]:[xS()],release:n.release,tracesSampleRate:n.tracesSampleRate??1,replaysSessionSampleRate:n.replaysSessionSampleRate,replaysOnErrorSampleRate:n.replaysOnErrorSampleRate,initialScope:{user:{cmid:e}}}),s=!0}catch(e){r??=e}if(r!==void 0)throw r}}},gT={gitSha:null,gitShaShort:null,packageVersion:`0.0.0`,sentryRelease:`localhost`},{logError:_T,logEvent:vT,logInfo:yT,initMonitoring:bT}=hT({environment:s(),datadog:{appId:window.env.DATADOG_APP_ID,appName:window.env.CLIENT_ID,appVersion:gT.packageVersion,clientPublicToken:window.env.DATADOG_PUBLIC_TOKEN},sentry:{dsn:window.env.SENTRY_DSN,release:gT.sentryRelease,tracesSampleRate:l?.25:1}});export{Gt as a,nT as i,_T as n,vT as r,bT as t}; 26//# sourceMappingURL=monitoring-D_WcZ8RR.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.