@wellesley/sentry 1.0.20 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +19 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
|
-
import{logErrorToSentry as va}from"https://cdn.jsdelivr.net/npm/@wellesley/sentry@1.0.20";import{version as Ia,useEffect as Ta}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{useSelector as ls}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{createSlice as wa}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";const F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Fe="8.48.0",x=globalThis;function _n(e,t,n){const r=x,s=r.__SENTRY__=r.__SENTRY__||{},o=s[Fe]=s[Fe]||{};return o[e]||(o[e]=t())}const We=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ka="Sentry Logger ",Qn=["debug","info","warn","error","log","assert","trace"],tn={};function xe(e){if(!("console"in x))return e();const t=x.console,n={},r=Object.keys(tn);r.forEach((e=>{const r=tn[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function Ra(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return We?Qn.forEach((n=>{t[n]=(...t)=>{e&&xe((()=>{x.console[n](`${ka}[${n}]:`,...t)}))}})):Qn.forEach((e=>{t[e]=()=>{}})),t}const S=_n("logger",Ra),ki=50,Be="?",ds=/\(error: (.*)\)/,fs=/captureMessage|captureException/;function Ri(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const s=[],o=e.split("\n");for(let e=n;e<o.length;e++){const n=o[e];if(n.length>1024)continue;const i=ds.test(n)?n.replace(ds,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){s.push(t);break}}if(s.length>=50+r)break}}return Ca(s.slice(r))}}function Ma(e){return Array.isArray(e)?Ri(...e):e}function Ca(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Ft(t).function||"")&&t.pop(),t.reverse(),fs.test(Ft(t).function||"")&&(t.pop(),fs.test(Ft(t).function||"")&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||Ft(t).filename,function:e.function||Be})))}function Ft(e){return e[e.length-1]||{}}const jn="<anonymous>";function Te(e){try{return e&&"function"==typeof e&&e.name||jn}catch{return jn}}function ps(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}const Xt={},hs={};function ze(e,t){Xt[e]=Xt[e]||[],Xt[e].push(t)}function Ge(e,t){if(!hs[e]){hs[e]=!0;try{t()}catch(t){We&&S.error(`Error while instrumenting ${e}`,t)}}}function pe(e,t){const n=e&&Xt[e];if(n)for(const r of n)try{r(t)}catch(t){We&&S.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Te(r)}\nError:`,t)}}let Hn=null;function Oa(e){const t="error";ze(t,e),Ge(t,Da)}function Da(){Hn=x.onerror,x.onerror=function(e,t,n,r,s){return pe("error",{column:r,error:s,line:n,msg:e,url:t}),!!Hn&&Hn.apply(this,arguments)},x.onerror.__SENTRY_INSTRUMENTED__=!0}let $n=null;function Aa(e){const t="unhandledrejection";ze(t,e),Ge(t,xa)}function xa(){$n=x.onunhandledrejection,x.onunhandledrejection=function(e){return pe("unhandledrejection",e),!$n||$n.apply(this,arguments)},x.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function wt(){return Mr(x),x}function Mr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Fe,t[Fe]=t[Fe]||{}}const Mi=Object.prototype.toString;function Cr(e){switch(Mi.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return je(e,Error)}}function lt(e,t){return Mi.call(e)===`[object ${t}]`}function Ci(e){return lt(e,"ErrorEvent")}function ms(e){return lt(e,"DOMError")}function Na(e){return lt(e,"DOMException")}function be(e){return lt(e,"String")}function Or(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Dr(e){return null===e||Or(e)||"object"!=typeof e&&"function"!=typeof e}function tt(e){return lt(e,"Object")}function gn(e){return typeof Event<"u"&&je(e,Event)}function La(e){return typeof Element<"u"&&je(e,Element)}function Pa(e){return lt(e,"RegExp")}function yn(e){return!(!e||!e.then||"function"!=typeof e.then)}function Ua(e){return tt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function je(e,t){try{return e instanceof t}catch{return!1}}function Oi(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Ar=x,Fa=80;function En(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=Ba(n,u),!("html"===l||o>1&&i+s.length*c+l.length>=d));)s.push(l),i+=l.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Ba(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Ar.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(s&&s.length)s.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&be(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function Di(){try{return Ar.document.location.href}catch{return""}}function ja(e){if(!Ar.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function et(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function _s(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Oi(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Ha(e,t,n=!1){return!!be(e)&&(Pa(t)?t.test(e):!!be(t)&&(n?e===t:e.includes(t)))}function kt(e,t=[],n=!1){return t.some((t=>Ha(e,t,n)))}function ee(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);"function"==typeof s&&Ai(s,r);try{e[t]=s}catch{We&&S.log(`Failed to replace method "${t}" in object`,e)}}function He(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{We&&S.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ai(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,He(e,"__sentry_original__",t)}catch{}}function xr(e){return e.__sentry_original__}function xi(e){if(Cr(e))return{message:e.message,name:e.name,stack:e.stack,...ys(e)};if(gn(e)){const t={type:e.type,target:gs(e.target),currentTarget:gs(e.currentTarget),...ys(e)};return typeof CustomEvent<"u"&&je(e,CustomEvent)&&(t.detail=e.detail),t}return e}function gs(e){try{return La(e)?En(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ys(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function $a(e,t=40){const n=Object.keys(xi(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return et(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:et(r,t)}return""}function te(e){return Zn(e,new Map)}function Zn(e,t){if(Wa(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))typeof e[n]<"u"&&(r[n]=Zn(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(Zn(e,t))})),r}return e}function Wa(e){if(!tt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}const Ni=1e3;function Rt(){return Date.now()/Ni}function za(){const{performance:e}=x;if(!e||!e.now)return Rt;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/Ni}const ve=za(),Ga=(()=>{const{performance:e}=x;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,a="number"==typeof i?Math.abs(i+n-r):t;return o||a<t?s<=a?e.timeOrigin:i:r})();function se(){const e=x,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function Li(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ke(e){const{message:t,event_id:n}=e;if(t)return t;const r=Li(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function er(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function nt(e,t){const n=Li(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function Es(e){if(Ya(e))return!0;try{He(e,"__sentry_captured__",!0)}catch{}return!1}function Ya(e){try{return e.__sentry_captured__}catch{}}var Ee;function we(e){return new ae((t=>{t(e)}))}function nn(e){return new ae(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Ee||(Ee={}));class ae{constructor(e){ae.prototype.__init.call(this),ae.prototype.__init2.call(this),ae.prototype.__init3.call(this),ae.prototype.__init4.call(this),this._state=Ee.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new ae(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new ae(((t,n)=>{let r,s;return this.then((t=>{s=!1,r=t,e&&e()}),(t=>{s=!0,r=t,e&&e()})).then((()=>{s?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(Ee.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Ee.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Ee.PENDING){if(yn(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ee.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===Ee.RESOLVED&&e[1](this._value),this._state===Ee.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function Ka(e){const t=ve(),n={sid:se(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>qa(n)};return rt(n,e),n}function rt(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||ve(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:se()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const 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),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Va(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),rt(e,n)}function qa(e){return te({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${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 Ss(){return se()}function tr(){return se().substring(16)}function Sn(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Sn(r[e],t[e],n-1));return r}const nr="_sentrySpan";function bs(e,t){t?He(e,nr,t):delete e[nr]}function rr(e){return e[nr]}const Ja=100;class Nr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ss(),spanId:tr()}}clone(){const e=new Nr;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,bs(e,rr(this)),e}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&&rt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},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 null===t?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(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof $e?[t.getScopeData(),t.getRequestSession()]:tt(t)?[e,e.requestSession]:[],{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,bs(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ss()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:Ja;if(n<=0)return this;const r={timestamp:Rt(),...e},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>n?s.slice(-n):s,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,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:rr(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Sn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:tr(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:se();if(!this._client)return S.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:se();if(!this._client)return S.warn("No client configured on scope - will not capture message!"),r;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:se();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(S.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const $e=Nr;function Xa(){return _n("defaultCurrentScope",(()=>new $e))}function Qa(){return _n("defaultIsolationScope",(()=>new $e))}class Za{constructor(e,t){let n,r;n=e||new $e,r=t||new $e,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return yn(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(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(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function st(){const e=Mr(wt());return e.stack=e.stack||new Za(Xa(),Qa())}function ec(e){return st().withScope(e)}function tc(e,t){const n=st();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function vs(e){return st().withScope((()=>e(st().getIsolationScope())))}function nc(){return{withIsolationScope:vs,withScope:ec,withSetScope:tc,withSetIsolationScope:(e,t)=>vs(t),getCurrentScope:()=>st().getScope(),getIsolationScope:()=>st().getIsolationScope()}}function bn(e){const t=Mr(e);return t.acs?t.acs:nc()}function ie(){return bn(wt()).getCurrentScope()}function _e(){return bn(wt()).getIsolationScope()}function rc(){return _n("globalScope",(()=>new $e))}function sc(...e){const t=bn(wt());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function K(){return ie().getClient()}function ic(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:s}=t;return te({trace_id:n,span_id:r,parent_span_id:s})}const oc="_sentryMetrics";function ac(e){const t=e[oc];if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(te(r));return n}const Pi="sentry.source",cc="sentry.sample_rate",uc="sentry.op",lc="sentry.origin",dc=0,fc=1,pc="sentry-",hc=/^sentry-/;function mc(e){const t=_c(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(hc)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function _c(e){if(e&&(be(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=Is(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):Is(e)}function Is(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const gc=1;let Ts=!1;function yc(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return te({parent_span_id:r?t:Et(e).parent_span_id,span_id:r?tr():t,trace_id:n})}function ws(e){return"number"==typeof e?ks(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ks(e.getTime()):ve()}function ks(e){return e>9999999999?e/1e3:e}function Et(e){if(Sc(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(Ec(e)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:a,status:c}=e;return te({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:ws(s),timestamp:ws(i)||void 0,status:vc(c),op:r[uc],origin:r[lc],_metrics_summary:ac(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Ec(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function Sc(e){return"function"==typeof e.getSpanJSON}function bc(e){const{traceFlags:t}=e.spanContext();return 1===t}function vc(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Ic="_sentryRootSpan";function Lr(e){return e[Ic]||e}function Ui(){const e=bn(wt());return e.getActiveSpan?e.getActiveSpan():rr(ie())}function Tc(){Ts||(xe((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),Ts=!0)}function wc(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=K(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const Pr="production",kc="_frozenDsc";function Fi(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=te({environment:n.environment||Pr,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function Rc(e,t){const n=t.getPropagationContext();return n.dsc||Fi(n.traceId,e)}function Bi(e){const t=K();if(!t)return{};const n=Lr(e),r=n[kc];if(r)return r;const s=n.spanContext().traceState,o=s&&s.get("sentry.dsc"),i=o&&mc(o);if(i)return i;const a=Fi(e.spanContext().traceId,t),c=Et(n),l=c.data||{},u=l[cc];null!=u&&(a.sample_rate=`${u}`);const d=l[Pi],p=c.description;return"url"!==d&&p&&(a.transaction=p),wc()&&(a.sampled=String(bc(n))),t.emit("createDsc",a,n),a}function sr(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;F&&S.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}const Mc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Cc(e){return"http"===e||"https"===e}function vn(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Oc(e){const t=Mc.exec(e);if(!t)return void xe((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return ji({host:o,pass:s,path:c,projectId:l,port:i,protocol:n,publicKey:r})}function ji(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Dc(e){if(!We)return!0;const{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(S.error(`Invalid Sentry Dsn: ${t} missing`),!0)))&&(n.match(/^\d+$/)?Cc(r)?!t||!isNaN(parseInt(t,10))||(S.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(S.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(S.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}function Ac(e){const t="string"==typeof e?Oc(e):ji(e);if(t&&Dc(t))return t}function xc(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}function de(e,t=100,n=1/0){try{return ir("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Hi(e,t=3,n=102400){const r=de(e,t);return Uc(r)>n?Hi(e,t-1,n):r}function ir(e,t,n=1/0,r=1/0,s=xc()){const[o,i]=s;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=Nc(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return ir("",l.toJSON(),c-1,r,s)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const p=xi(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=p[e];u[e]=ir(e,t,c-1,r,s),d++}return i(t),u}function Nc(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Oi(t))return"[VueViewModel]";if(Ua(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Te(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=Lc(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function Lc(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Pc(e){return~-encodeURI(e).split(/%..|./).length}function Uc(e){return Pc(JSON.stringify(e))}function dt(e,t=[]){return[e,t]}function Fc(e,t){const[n,r]=e;return[n,[...r,t]]}function Rs(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function or(e){return x.__SENTRY__&&x.__SENTRY__.encodePolyfill?x.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function Bc(e){const[t,n]=e;let r=JSON.stringify(t);function s(e){"string"==typeof r?r="string"==typeof e?r+e:[or(r),e]:r.push("string"==typeof e?or(e):e)}for(const e of n){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(de(n))}s(e)}}return"string"==typeof r?r:jc(r)}function jc(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}function Hc(e){const t="string"==typeof e.data?or(e.data):e.data;return[te({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const $c={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Ms(e){return $c[e]}function Ur(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function $i(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:vn(r)},...s&&{trace:te({...s})}}}function Wc(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function zc(e,t,n,r){const s=Ur(n);return dt({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:vn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}function Gc(e,t,n,r){const s=Ur(n),o=e.type&&"replay_event"!==e.type?e.type:"event";Wc(e,n&&n.sdk);const i=$i(e,s,r,t);return delete e.sdkProcessingMetadata,dt(i,[[{type:o},e]])}function ar(e,t,n,r=0){return new ae(((s,o)=>{const i=e[r];if(null===t||"function"!=typeof i)s(t);else{const a=i({...t},n);F&&i.id&&null===a&&S.log(`Event processor "${i.id}" dropped event`),yn(a)?a.then((t=>ar(e,t,n,r+1).then(s))).then(null,o):ar(e,a,n,r+1).then(s).then(null,o)}}))}let Bt,Cs,jt;function Yc(e){const t=x._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return jt&&n.length===Cs||(Cs=n.length,jt=n.reduce(((n,r)=>{Bt||(Bt={});const s=Bt[r];if(s)n[s[0]]=s[1];else{const s=e(r);for(let e=s.length-1;e>=0;e--){const o=s[e],i=o&&o.filename,a=t[r];if(i&&a){n[i]=a,Bt[r]=[i,a];break}}}return n}),{})),jt}function Kc(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;Vc(e,t),r&&Xc(e,r),Qc(e,n),qc(e,s),Jc(e,o)}function Os(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:p,transactionName:m,span:h}=t;Ht(e,"extra",n),Ht(e,"tags",r),Ht(e,"user",s),Ht(e,"contexts",o),e.sdkProcessingMetadata=Sn(e.sdkProcessingMetadata,a,2),i&&(e.level=i),m&&(e.transactionName=m),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Ht(e,t,n){e[t]=Sn(e[t],n,1)}function Vc(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=te(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=te(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=te(s);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=te(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&"transaction"!==e.type&&(e.transaction=a)}function qc(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Jc(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Xc(e,t){e.contexts={trace:yc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Bi(t),...e.sdkProcessingMetadata};const n=Et(Lr(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}function Qc(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Wi(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||se(),timestamp:t.timestamp||Rt()},l=n.integrations||e.integrations.map((e=>e.name));Zc(c,e),nu(c,l),s&&s.emit("applyFrameMetadata",t),void 0===t.type&&eu(c,e.stackParser);const u=su(r,n.captureContext);n.mechanism&&nt(c,n.mechanism);const d=s?s.getEventProcessors():[],p=rc().getScopeData();if(o){Os(p,o.getScopeData())}if(u){Os(p,u.getScopeData())}const m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),Kc(c,p);return ar([...d,...p.eventProcessors],c,n).then((e=>(e&&tu(e),"number"==typeof i&&i>0?ru(e,i,a):e)))}function Zc(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;e.environment=e.environment||n||Pr,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s),e.message&&(e.message=et(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=et(i.value,o));const a=e.request;a&&a.url&&(a.url=et(a.url,o))}function eu(e,t){const n=Yc(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}function tu(e){const t={};try{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)}))}))}catch{}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function nu(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function ru(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:de(e.data,t,n)}})))},...e.user&&{user:de(e.user,t,n)},...e.contexts&&{contexts:de(e.contexts,t,n)},...e.extra&&{extra:de(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=de(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:de(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=de(e.contexts.flags,3,n)),r}function su(e,t){if(!t)return e;const n=e?e.clone():new $e;return n.update(t),n}function Fr(e,t){return ie().captureException(e,void 0)}function iu(e,t){const n={captureContext:t};return ie().captureMessage(e,void 0,n)}function zi(e,t){return ie().captureEvent(e,t)}function Gi(e,t){_e().setContext(e,t)}function ou(e,t){_e().setExtra(e,t)}function au(e){_e().setUser(e)}function cu(e){_e().addEventProcessor(e)}function Ds(e){const t=K(),n=_e(),r=ie(),{release:s,environment:o=Pr}=t&&t.getOptions()||{},{userAgent:i}=x.navigator||{},a=Ka({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&"ok"===c.status&&rt(c,{status:"exited"}),Yi(),n.setSession(a),r.setSession(a),a}function Yi(){const e=_e(),t=ie(),n=t.getSession()||e.getSession();n&&Va(n),Ki(),e.setSession(),t.setSession()}function Ki(){const e=_e(),t=ie(),n=K(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function As(e=!1){e?Yi():Ki()}const uu="7";function lu(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function du(e){return`${lu(e)}${e.projectId}/envelope/`}function fu(e,t){const n={sentry_version:uu};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function pu(e,t,n){return t||`${du(e)}?${fu(e,n)}`}const xs=[];function hu(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}function mu(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;const s=hu(r),o=s.findIndex((e=>"Debug"===e.name));if(o>-1){const[e]=s.splice(o,1);s.push(e)}return s}function _u(e,t){const n={};return t.forEach((t=>{t&&Vi(e,t,n)})),n}function Ns(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Vi(e,t,n){if(n[t.name])F&&S.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===xs.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),xs.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}F&&S.log(`Integration installed: ${t.name}`)}}function gu(e,t,n){return dt(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Rt(),discarded_events:e}]])}class he extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const Ls="Not capturing exception because it's already been captured.";class yu{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Ac(e.dsn):F&&S.warn("No DSN provided, client will not send events."),this._dsn){const t=pu(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})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));t&&xe((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){const r=se();if(Es(e))return F&&S.log(Ls),r;const s={event_id:r,...t};return this._process(this.eventFromException(e,s).then((e=>this._captureEvent(e,s,n)))),s.event_id}captureMessage(e,t,n,r){const s={event_id:se(),...n},o=Or(e)?e:String(e),i=Dr(e)?this.eventFromMessage(o,t,s):this.eventFromException(e,s);return this._process(i.then((e=>this._captureEvent(e,s,r)))),s.event_id}captureEvent(e,t,n){const r=se();if(t&&t.originalException&&Es(t.originalException))return F&&S.log(Ls),r;const s={event_id:r,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,s,o||n)),s.event_id}captureSession(e){"string"!=typeof e.release?F&&S.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),rt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):we(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];Vi(this,e,this._integrations),t||Ns(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=Gc(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Fc(n,Hc(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=zc(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,s=`${e}:${t}`;F&&S.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(F&&S.error("Error while sending envelope:",e),e))):(F&&S.error("Transport disabled"),we({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=_u(this,e),Ns(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1;const s=t.exception&&t.exception.values;if(s){r=!0;for(const e of s){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(rt(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ae((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=ie(),r=_e()){const s=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Wi(s,e,t,n,this,r).then((e=>{if(null===e)return e;e.contexts={trace:ic(n),...e.contexts};const t=Rc(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(F){const t=e;"log"===t.logLevel?S.log(t.message):S.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:s}=r,o=Ji(e),i=qi(e),a=e.type||"error",c=`before send for type \`${a}\``,l=typeof s>"u"?void 0:sr(s);if(i&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),nn(new he(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const u="replay_event"===a?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new he("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;return Eu(Su(this,r,n,t),c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",u,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new he(`${c} returned \`null\`, will not send event.`,"log")}const s=n&&n.getSession();if(!o&&s&&this._updateSessionFromEvent(s,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const i=r.transaction_info;if(o&&i&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...i,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{throw e instanceof he?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new he(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){F&&S.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(F&&S.log("No outcomes to send"));if(!this._dsn)return void(F&&S.log("No dsn provided, will not send outcomes"));F&&S.log("Sending outcomes:",e);const t=gu(e,this._options.tunnel&&vn(this._dsn));this.sendEnvelope(t)}}function Eu(e,t){const n=`${t} must return \`null\` or a valid event.`;if(yn(e))return e.then((e=>{if(!tt(e)&&null!==e)throw new he(n);return e}),(e=>{throw new he(`${t} rejected with ${e}`)}));if(!tt(e)&&null!==e)throw new he(n);return e}function Su(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=t;if(qi(n)&&s)return s(n,r);if(Ji(n)){if(n.spans&&i){const t=[];for(const r of n.spans){const n=i(r);n?t.push(n):(Tc(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(o){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(n,r)}}return n}function qi(e){return void 0===e.type}function Ji(e){return"transaction"===e.type}function bu(e,t){!0===t.debug&&(F?S.enable():xe((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),ie().update(t.initialScope);const n=new e(t);return vu(n),n.init(),n}function vu(e){ie().setClient(e)}function Iu(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return nn(new he("Not adding Promise because buffer limit was reached."));const s=r();return-1===t.indexOf(s)&&t.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(e){return new ae(((n,r)=>{let s=t.length;if(!s)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{we(e).then((()=>{--s||(clearTimeout(o),n(!0))}),r)}))}))}}}const Tu=6e4;function wu(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Tu:r-t}function ku(e,t){return e[t]||e.all||0}function Xi(e,t,n=Date.now()){return ku(e,t)>n}function Qi(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(s[e]=r+a):s[e]=r+a;else s.all=r+a}else i?s.all=r+wu(i,r):429===t&&(s.all=r+6e4);return s}const Ru=64;function Mu(e,t,n=Iu(e.bufferSize||64)){let r={};return{send:function(s){const o=[];if(Rs(s,((t,n)=>{const s=Ms(n);if(Xi(r,s)){const r=Ps(t,n);e.recordDroppedEvent("ratelimit_backoff",s,r)}else o.push(t)})),0===o.length)return we({});const i=dt(s[0],o),a=t=>{Rs(i,((n,r)=>{const s=Ps(n,r);e.recordDroppedEvent(t,Ms(r),s)}))};return n.add((()=>t({body:Bc(i)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&F&&S.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Qi(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof he)return F&&S.error("Skipped sending event because buffer is full."),a("queue_overflow"),we({});throw e}))},flush:e=>n.drain(e)}}function Ps(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Cu(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Du(e,n)||Ou(e,r)}function Ou(e,t){return!!t&&Us(e)===Us(t)}function Du(e,t){return!!t&&e.includes(t.host)}function Us(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Zi(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:Fe}))),version:Fe}),e._metadata=s}const Au=100;function Ae(e,t){const n=K(),r=_e();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Au}=n.getOptions();if(o<=0)return;const i={timestamp:Rt(),...e},a=s?xe((()=>s(i,t))):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}let Fs;const xu="FunctionToString",Bs=new WeakMap,Nu=()=>({name:xu,setupOnce(){Fs=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=xr(this),n=Bs.has(K())&&void 0!==t?t:this;return Fs.apply(n,e)}}catch{}},setup(e){Bs.set(e,!0)}}),Lu=Nu,Pu=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],Uu="InboundFilters",Fu=(e={})=>({name:Uu,processEvent(t,n,r){const s=r.getOptions();return Hu(t,ju(e,s))?null:t}}),Bu=Fu;function ju(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Pu],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}function Hu(e,t){return t.ignoreInternal&&Ku(e)?(F&&S.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${ke(e)}`),!0):$u(e,t.ignoreErrors)?(F&&S.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ke(e)}`),!0):qu(e)?(F&&S.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${ke(e)}`),!0):Wu(e,t.ignoreTransactions)?(F&&S.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ke(e)}`),!0):zu(e,t.denyUrls)?(F&&S.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ke(e)}.\nUrl: ${rn(e)}`),!0):!Gu(e,t.allowUrls)&&(F&&S.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ke(e)}.\nUrl: ${rn(e)}`),!0)}function $u(e,t){return!(e.type||!t||!t.length)&&Yu(e).some((e=>kt(e,t)))}function Wu(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&kt(n,t)}function zu(e,t){if(!t||!t.length)return!1;const n=rn(e);return!!n&&kt(n,t)}function Gu(e,t){if(!t||!t.length)return!0;const n=rn(e);return!n||kt(n,t)}function Yu(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function Ku(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}function Vu(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}function rn(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Vu(t):null}catch{return F&&S.error(`Cannot extract url for event ${ke(e)}`),null}}function qu(e){return!(e.type||!e.exception||!e.exception.values||0===e.exception.values.length)&&(!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)))}function Ju(e,t,n=250,r,s,o,i){if(!(o.exception&&o.exception.values&&i&&je(i.originalException,Error)))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=Xu(cr(e,t,s,i.originalException,r,o.exception.values,a,0),n))}function cr(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(je(r[s],Error)){js(i,a);const o=e(t,r[s]),l=c.length;Hs(o,s,l,a),c=cr(e,t,n,r[s],s,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(je(r,Error)){js(i,a);const l=e(t,r),u=c.length;Hs(l,`errors[${o}]`,u,a),c=cr(e,t,n,r,s,[l,...c],l,u)}})),c}function js(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Hs(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Xu(e,t){return e.map((e=>(e.value&&(e.value=et(e.value,t)),e)))}function Wn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const 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 Qu(e){const t="console";ze(t,e),Ge(t,Zu)}function Zu(){"console"in x&&Qn.forEach((function(e){e in x.console&&ee(x.console,e,(function(t){return tn[e]=t,function(...t){pe("console",{args:t,level:e});const n=tn[e];n&&n.apply(x.console,t)}}))}))}function eo(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const el="Dedupe",tl=()=>{let e;return{name:el,processEvent(t){if(t.type)return t;try{if(nl(t,e))return F&&S.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},to=tl;function nl(e,t){return!!t&&!(!rl(e,t)&&!sl(e,t))}function rl(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ro(e,t)||!no(e,t))}function sl(e,t){const n=$s(t),r=$s(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&ro(e,t)&&no(e,t))}function no(e,t){let n=ps(e),r=ps(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],s=n[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function ro(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function $s(e){return e.exception&&e.exception.values&&e.exception.values[0]}function so(e){if(void 0!==e)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ur=x;function io(){if(!("fetch"in ur))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function lr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function il(){if("string"==typeof EdgeRuntime)return!0;if(!io())return!1;if(lr(ur.fetch))return!0;let e=!1;const t=ur.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=lr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){We&&S.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function ol(e,t){const n="fetch";ze(n,e),Ge(n,(()=>al(void 0,t)))}function al(e,t=!1){t&&!il()||ee(x,"fetch",(function(e){return function(...t){const n=new Error,{method:r,url:s}=cl(t),o={args:t,fetchData:{method:r,url:s},startTimestamp:1e3*ve(),virtualError:n};return pe("fetch",{...o}),e.apply(x,t).then((async e=>(pe("fetch",{...o,endTimestamp:1e3*ve(),response:e}),e)),(e=>{throw pe("fetch",{...o,endTimestamp:1e3*ve(),error:e}),Cr(e)&&void 0===e.stack&&(e.stack=n.stack,He(e,"framesToPop",1)),e}))}}))}function dr(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Ws(e){return"string"==typeof e?e:e?dr(e,"url")?e.url:e.toString?e.toString():"":""}function cl(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ws(t),method:dr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Ws(t),method:dr(t,"method")?String(t.method).toUpperCase():"GET"}}function ul(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function ll(){return"npm"}function dl(){return!ul()&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function zs(){return typeof window<"u"&&(!dl()||fl())}function fl(){const e=x.process;return!!e&&"renderer"===e.type}const $t=x;function pl(){const e=$t.chrome,t=e&&e.app&&e.app.runtime,n="history"in $t&&!!$t.history.pushState&&!!$t.history.replaceState;return!t&&n}function hl(e,t){return e??t()}function Qt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const B=x;let fr=0;function oo(){return fr>0}function ml(){fr++,setTimeout((()=>{fr--}))}function it(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(xr(e))return e}catch{return e}const n=function(...n){try{const r=n.map((e=>it(e,t)));return e.apply(this,r)}catch(e){throw ml(),sc((r=>{r.addEventProcessor((e=>(t.mechanism&&(er(e,void 0),nt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),Fr(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Ai(n,e),He(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Br(e,t){const n=jr(e,t),r={type:Sl(t),value:bl(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function _l(e,t,n,r){const s=K(),o=s&&s.getOptions().normalizeDepth,i=kl(t),a={__serialized__:Hi(t,o)};if(i)return{exception:{values:[Br(e,i)]},extra:a};const c={exception:{values:[{type:gn(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Tl(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=jr(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function zn(e,t){return{exception:{values:[Br(e,t)]}}}function jr(e,t){const n=t.stacktrace||t.stack||"",r=yl(t),s=El(t);try{return e(n,r,s)}catch{}return[]}const gl=/Minified React error #\d+;/i;function yl(e){return e&&gl.test(e.message)?1:0}function El(e){return"number"==typeof e.framesToPop?e.framesToPop:0}function ao(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"&&e instanceof WebAssembly.Exception}function Sl(e){const t=e&&e.name;return!t&&ao(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function bl(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:ao(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function vl(e,t,n,r){const s=Hr(e,t,n&&n.syntheticException||void 0,r);return nt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),we(s)}function Il(e,t,n="info",r,s){const o=pr(e,t,r&&r.syntheticException||void 0,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),we(o)}function Hr(e,t,n,r,s){let o;if(Ci(t)&&t.error)return zn(e,t.error);if(ms(t)||Na(t)){const s=t;if("stack"in t)o=zn(e,t);else{const t=s.name||(ms(s)?"DOMError":"DOMException"),i=s.message?`${t}: ${s.message}`:t;o=pr(e,i,n,r),er(o,i)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return Cr(t)?zn(e,t):tt(t)||gn(t)?(o=_l(e,t,n,s),nt(o,{synthetic:!0}),o):(o=pr(e,t,n,r),er(o,`${t}`),nt(o,{synthetic:!0}),o)}function pr(e,t,n,r){const s={};if(r&&n){const r=jr(e,n);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]}),nt(s,{synthetic:!0})}if(Or(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function Tl(e,{isUnhandledRejection:t}){const n=$a(e),r=t?"promise rejection":"exception";return Ci(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:gn(e)?`Event \`${wl(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function wl(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function kl(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Rl(e,{metadata:t,tunnel:n,dsn:r}){return dt({event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:vn(r)}},[Ml(e)])}function Ml(e){return[{type:"user_report"},e]}class Cl extends yu{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};Zi(t,"browser",["browser"],B.SENTRY_SDK_SOURCE||ll()),super(t),t.sendClientReports&&B.document&&B.document.addEventListener("visibilitychange",(()=>{"hidden"===B.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return vl(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return Il(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Mt&&S.warn("SDK not enabled, will not capture user feedback."));const t=Rl(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const co=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ol=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Ct=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s||0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=Ol(t.value,n),e(t)))}},M=x,Dl=()=>`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,uo=(e=!0)=>{const t=M.performance&&M.performance.getEntriesByType&&M.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},$r=()=>{const e=uo();return e&&e.activationStart||0},Ot=(e,t)=>{const n=uo();let r="navigate";return n&&(M.document&&M.document.prerendering||$r()>0?r="prerender":M.document&&M.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Dl(),navigationType:r}},Ye=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Dt=e=>{const t=t=>{("pagehide"===t.type||M.document&&"hidden"===M.document.visibilityState)&&e(t)};M.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},In=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let ht=-1;const Al=()=>"hidden"!==M.document.visibilityState||M.document.prerendering?1/0:0,sn=e=>{"hidden"===M.document.visibilityState&&ht>-1&&(ht="visibilitychange"===e.type?e.timeStamp:0,Nl())},xl=()=>{addEventListener("visibilitychange",sn,!0),addEventListener("prerenderingchange",sn,!0)},Nl=()=>{removeEventListener("visibilitychange",sn,!0),removeEventListener("prerenderingchange",sn,!0)},Wr=()=>(M.document&&ht<0&&(ht=Al(),xl()),{get firstHiddenTime(){return ht}}),Tn=e=>{M.document&&M.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Ll=[1800,3e3],Pl=(e,t={})=>{Tn((()=>{const n=Wr(),r=Ot("FCP");let s;const o=Ye("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-$r(),0),r.entries.push(e),s(!0)))}))}));o&&(s=Ct(e,r,Ll,t.reportAllChanges))}))},Ul=[.1,.25],Fl=(e,t={})=>{Pl(In((()=>{const n=Ot("CLS",0);let r,s=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];s&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,o.push(e)):(s=e.value,o=[e])}})),s>n.value&&(n.value=s,n.entries=o,r())},a=Ye("layout-shift",i);a&&(r=Ct(e,n,Ul,t.reportAllChanges),Dt((()=>{i(a.takeRecords()),r(!0)})),setTimeout(r,0))})))},Bl=[100,300],jl=(e,t={})=>{Tn((()=>{const n=Wr(),r=Ot("FID");let s;const o=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),s(!0))},i=e=>{e.forEach(o)},a=Ye("first-input",i);s=Ct(e,r,Bl,t.reportAllChanges),a&&Dt(In((()=>{i(a.takeRecords()),a.disconnect()})))}))};let lo=0,Gn=1/0,Wt=0;const Hl=e=>{e.forEach((e=>{e.interactionId&&(Gn=Math.min(Gn,e.interactionId),Wt=Math.max(Wt,e.interactionId),lo=Wt?(Wt-Gn)/7+1:0)}))};let hr;const $l=()=>hr?lo:performance.interactionCount||0,Wl=()=>{"interactionCount"in performance||hr||(hr=Ye("event",Hl,{type:"event",buffered:!0,durationThreshold:0}))},Se=[],Yn=new Map,zl=40;let Gl=0;const Yl=()=>$l()-Gl,Kl=()=>{const e=Math.min(Se.length-1,Math.floor(Yl()/50));return Se[e]},Kn=10,Vl=[],ql=e=>{if(Vl.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const t=Se[Se.length-1],n=Yn.get(e.interactionId);if(n||Se.length<10||t&&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]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};Yn.set(t.id,t),Se.push(t)}Se.sort(((e,t)=>t.latency-e.latency)),Se.length>10&&Se.splice(10).forEach((e=>Yn.delete(e.id)))}},fo=e=>{const t=M.requestIdleCallback||M.setTimeout;let n=-1;return e=In(e),M.document&&"hidden"===M.document.visibilityState?e():(n=t(e),Dt(e)),n},Jl=[200,500],Xl=(e,t={})=>{"PerformanceEventTiming"in M&&"interactionId"in PerformanceEventTiming.prototype&&Tn((()=>{Wl();const n=Ot("INP");let r;const s=e=>{fo((()=>{e.forEach(ql);const t=Kl();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},o=Ye("event",s,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=Ct(e,n,Jl,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),Dt((()=>{s(o.takeRecords()),r(!0)})))}))},Ql=[2500,4e3],Gs={},Zl=(e,t={})=>{Tn((()=>{const n=Wr(),r=Ot("LCP");let s;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-$r(),0),r.entries=[e],s())}))},i=Ye("largest-contentful-paint",o);if(i){s=Ct(e,r,Ql,t.reportAllChanges);const n=In((()=>{Gs[r.id]||(o(i.takeRecords()),i.disconnect(),Gs[r.id]=!0,s(!0))}));["keydown","click"].forEach((e=>{M.document&&addEventListener(e,(()=>fo(n)),{once:!0,capture:!0})})),Dt(n)}}))},mt={},on={};let po,ho,mo,_o;function ed(e,t=!1){return wn("cls",e,id,po,t)}function td(e,t=!1){return wn("lcp",e,ad,mo,t)}function nd(e){return wn("fid",e,od,ho)}function rd(e){return wn("inp",e,cd,_o)}function sd(e,t){return go(e,t),on[e]||(ud(e),on[e]=!0),yo(e,t)}function At(e,t){const n=mt[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){co&&S.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Te(r)}\nError:`,t)}}function id(){return Fl((e=>{At("cls",{metric:e}),po=e}),{reportAllChanges:!0})}function od(){return jl((e=>{At("fid",{metric:e}),ho=e}))}function ad(){return Zl((e=>{At("lcp",{metric:e}),mo=e}),{reportAllChanges:!0})}function cd(){return Xl((e=>{At("inp",{metric:e}),_o=e}))}function wn(e,t,n,r,s=!1){let o;return go(e,t),on[e]||(o=n(),on[e]=!0),r&&t({metric:r}),yo(e,t,s?o:void 0)}function ud(e){const t={};"event"===e&&(t.durationThreshold=0),Ye(e,(t=>{At(e,{entries:t})}),t)}function go(e,t){mt[e]=mt[e]||[],mt[e].push(t)}function yo(e,t,n){return()=>{n&&n();const r=mt[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}const ld=1e3;let Ys,mr,_r,zt;function Eo(e){ze("dom",e),Ge("dom",dd)}function dd(){if(!M.document)return;const e=pe.bind(null,"dom"),t=Ks(e,!0);M.document.addEventListener("click",t,!1),M.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=M[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(ee(r,"addEventListener",(function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=Ks(e);o.handler=r,t.call(this,n,r,s)}o.refCount++}catch{}return t.call(this,n,r,s)}})),ee(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function fd(e){if(e.type!==mr)return!1;try{if(!e.target||e.target._sentryId!==_r)return!1}catch{}return!0}function pd(e,t){return"keypress"===e&&(!t||!t.tagName||!("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}function Ks(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=hd(n);if(pd(n.type,r))return;He(n,"_sentryCaptured",!0),r&&!r._sentryId&&He(r,"_sentryId",se());const s="keypress"===n.type?"input":n.type;fd(n)||(e({event:n,name:s,global:t}),mr=n.type,_r=r?r._sentryId:void 0),clearTimeout(Ys),Ys=M.setTimeout((()=>{_r=void 0,mr=void 0}),ld)}}function hd(e){try{return e.target}catch{return null}}function zr(e){const t="history";ze(t,e),Ge(t,md)}function md(){if(!pl())return;const e=M.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=zt,t=String(n);zt=t,pe("history",{from:e,to:t})}return e.apply(this,t)}}M.onpopstate=function(...t){const n=M.location.href,r=zt;if(zt=n,pe("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},ee(M.history,"pushState",t),ee(M.history,"replaceState",t)}const Zt={};function So(e){const t=Zt[e];if(t)return t;let n=M[e];if(lr(n))return Zt[e]=n.bind(M);const r=M.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(t)}catch(t){co&&S.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Zt[e]=n.bind(M))}function Vs(e){Zt[e]=void 0}function ot(...e){return So("setTimeout")(...e)}const qe="__sentry_xhr_v3__";function _d(e){ze("xhr",e),Ge("xhr",gd)}function gd(){if(!M.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,s=1e3*ve(),o=be(n[0])?n[0].toUpperCase():void 0,i=yd(n[1]);if(!o||!i)return e.apply(t,n);t[qe]={method:o,url:i,request_headers:{}},"POST"===o&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[qe];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}pe("xhr",{endTimestamp:1e3*ve(),startTimestamp:s,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,s]=n,o=t[qe];return o&&be(r)&&be(s)&&(o.request_headers[r.toLowerCase()]=s),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[qe];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return pe("xhr",{startTimestamp:1e3*ve(),xhr:t}),e.apply(t,n)}})}function yd(e){if(be(e))return e;try{return e.toString()}catch{}}function Ed(e,t=So("fetch")){let n=0,r=0;return Mu(e,(function(s){const o=s.body.length;n+=o,r++;const i={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Vs("fetch"),nn("No fetch implementation available");try{return t(e.url,i).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return Vs("fetch"),n-=o,r--,nn(e)}}))}const Sd=30,bd=50;function gr(e,t,n,r){const s={filename:e,function:"<anonymous>"===t?Be:t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const vd=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Id=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Td=/\((\S*)(?::(\d+))(?::(\d+))\)/,wd=e=>{const t=vd.exec(e);if(t){const[,e,n,r]=t;return gr(e,Be,+n,+r)}const n=Id.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Td.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=bo(n[1]||Be,n[2]);return gr(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},kd=[30,wd],Rd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Md=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Cd=e=>{const t=Rd.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Md.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]||Be;return[n,e]=bo(n,e),gr(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Od=[50,Cd],Dd=[kd,Od],Ad=Ri(...Dd),bo=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Be,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Gt=1024,xd="Breadcrumbs",Nd=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:xd,setup(e){t.console&&Qu(Fd(e)),t.dom&&Eo(Ud(e,t.dom)),t.xhr&&_d(Bd(e)),t.fetch&&ol(jd(e)),t.history&&zr(Hd(e)),t.sentry&&e.on("beforeSendEvent",Pd(e))}}},Ld=Nd;function Pd(e){return function(t){K()===e&&Ae({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ke(t)},{event:t})}}function Ud(e,t){return function(n){if(K()!==e)return;let r,s,o="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>Gt&&(Mt&&S.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Gt),"string"==typeof o&&(o=[o]);try{const e=n.event,t=$d(e)?e.target:e;r=En(t,{keyAttrs:o,maxStringLength:i}),s=ja(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),Ae(a,{event:n.event,name:n.name,global:n.global})}}function Fd(e){return function(t){if(K()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:eo(t.level),message:_s(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${_s(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Ae(n,{input:t.args,level:t.level})}}function Bd(e){return function(t){if(K()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,s=t.xhr[qe];if(!n||!r||!s)return;const{method:o,url:i,status_code:a,body:c}=s,l={method:o,url:i,status_code:a},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Ae({category:"xhr",data:l,type:"http",level:so(a)},u)}}function jd(e){return function(t){if(K()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Ae({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response,s={...t.fetchData,status_code:e&&e.status},o={input:t.args,response:e,startTimestamp:n,endTimestamp:r};Ae({category:"fetch",data:s,type:"http",level:so(s.status_code)},o)}}}function Hd(e){return function(t){if(K()!==e)return;let n=t.from,r=t.to;const s=Wn(B.location.href);let o=n?Wn(n):void 0;const i=Wn(r);(!o||!o.path)&&(o=s),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),Ae({category:"navigation",data:{from:n,to:r}})}}function $d(e){return!!e&&!!e.target}const Wd=["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"],zd="BrowserApiErrors",Gd=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:zd,setupOnce(){t.setTimeout&&ee(B,"setTimeout",qs),t.setInterval&&ee(B,"setInterval",qs),t.requestAnimationFrame&&ee(B,"requestAnimationFrame",Yd),t.XMLHttpRequest&&"XMLHttpRequest"in B&&ee(XMLHttpRequest.prototype,"send",Kd);const e=t.eventTarget;e&&(Array.isArray(e)?e:Wd).forEach(Vd)}}},vo=Gd;function qs(e){return function(...t){const n=t[0];return t[0]=it(n,{mechanism:{data:{function:Te(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Yd(e){return function(t){return e.apply(this,[it(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Te(e)},handled:!1,type:"instrument"}})])}}function Kd(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&ee(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Te(t)},handled:!1,type:"instrument"}},r=xr(t);return r&&(n.mechanism.data.handler=Te(r)),it(t,n)}))})),e.apply(this,t)}}function Vd(e){const t=B[e],n=t&&t.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ee(n,"addEventListener",(function(t){return function(n,r,s){try{qd(r)&&(r.handleEvent=it(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Te(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,it(r,{mechanism:{data:{function:"addEventListener",handler:Te(r),target:e},handled:!1,type:"instrument"}}),s])}})),ee(n,"removeEventListener",(function(e){return function(t,n,r){try{const s=n.__sentry_wrapped__;s&&e.call(this,t,s,r)}catch{}return e.call(this,t,n,r)}})))}function qd(e){return"function"==typeof e.handleEvent}const Jd=()=>({name:"BrowserSession",setupOnce(){typeof B.document>"u"?Mt&&S.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(Ds({ignoreDuration:!0}),As(),zr((({from:e,to:t})=>{void 0!==e&&e!==t&&(Ds({ignoreDuration:!0}),As())})))}}),Xd="GlobalHandlers",Qd=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Xd,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(ef(e),Js("onerror")),t.onunhandledrejection&&(tf(e),Js("onunhandledrejection"))}}},Zd=Qd;function ef(e){Oa((t=>{const{stackParser:n,attachStacktrace:r}=Io();if(K()!==e||oo())return;const{msg:s,url:o,line:i,column:a,error:c}=t,l=sf(Hr(n,c||s,void 0,r,!1),o,i,a);l.level="error",zi(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}))}function tf(e){Aa((t=>{const{stackParser:n,attachStacktrace:r}=Io();if(K()!==e||oo())return;const s=nf(t),o=Dr(s)?rf(s):Hr(n,s,void 0,r,!0);o.level="error",zi(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}function nf(e){if(Dr(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 rf(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function sf(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],l=r,u=n,d=be(t)&&t.length>0?t:Di();return 0===c.length&&c.push({colno:l,filename:d,function:Be,in_app:!0,lineno:u}),e}function Js(e){Mt&&S.log(`Global Handler attached: ${e}`)}function Io(){const e=K();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const of=()=>({name:"HttpContext",preprocessEvent(e){if(!B.navigator&&!B.location&&!B.document)return;const t=e.request&&e.request.url||B.location&&B.location.href,{referrer:n}=B.document||{},{userAgent:r}=B.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),af="cause",cf=5,uf="LinkedErrors",lf=(e={})=>{const t=e.limit||5,n=e.key||af;return{name:uf,preprocessEvent(e,r,s){const o=s.getOptions();Ju(Br,o.stackParser,o.maxValueLength,n,t,e,r)}}},df=lf;function ff(e){const t=[Bu(),Lu(),vo(),Ld(),Zd(),df(),to(),of()];return!1!==e.autoSessionTracking&&t.push(Jd()),t}function pf(e={}){const t={defaultIntegrations:ff(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:B.SENTRY_RELEASE&&B.SENTRY_RELEASE.id?B.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}function hf(){const e=typeof B.window<"u"&&B;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,r=B.location&&B.location.href||"",s=!!n&&B===B.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>r.startsWith(`${e}//`))),o=typeof e.nw<"u";return!!n&&!s&&!o}function mf(e={}){const t=pf(e);if(!t.skipBrowserExtensionCheck&&hf())return void xe((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));Mt&&(io()||S.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:Ma(t.stackParser||Ad),integrations:mu(t),transport:t.transport||Ed};return bu(Cl,n)}const H=x,Gr="sentryReplaySession",_f="replay_event",Yr="Unable to send Replay",gf=3e5,yf=9e5,Ef=5e3,Sf=5500,bf=6e4,vf=5e3,If=3,Xs=15e4,Yt=5e3,Tf=3e3,wf=300,Kr=2e7,kf=4999,Rf=15e3,Qs=36e5;function yr(e,t){return e??t()}function St(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}var X;function Mf(e){return e.nodeType===e.ELEMENT_NODE}function _t(e){const t=St([e,"optionalAccess",e=>e.host]);return St([t,"optionalAccess",e=>e.shadowRoot])===e}function gt(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Cf(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 Of(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const 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 an(e){try{const t=e.rules||e.cssRules;return t?Cf(Array.from(t,To).join("")):null}catch{return null}}function Df(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],o=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function To(e){let t;if(xf(e))try{t=an(e.styleSheet)||Of(e)}catch{}else if(Nf(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=Df(e)),n&&(t=Af(t)),n||r)return t}return t||e.cssText}function Af(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function xf(e){return"styleSheet"in e}function Nf(e){return"selectorText"in e}!function(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"}(X||(X={}));class wo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return yr(St([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),(()=>-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){const t=this.getId(e);this.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){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const 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 Lf(){return new wo}function kn({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function bt({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function at(e){return e.toLowerCase()}function Er(e){return e.toUpperCase()}const Zs="__rrweb_original__";function Pf(e){const 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){const s=t.getImageData,o=Zs in s?s[Zs]:s;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0}function Vr(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?at(t):null}function cn(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function ko(e,t){let n;try{n=new URL(e,yr(t,(()=>window.location.href)))}catch{return null}return yr(St([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),(()=>null))}const ei={};function Ro(e){const t=ei[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return ei[e]=r.bind(window)}function Sr(...e){return Ro("setTimeout")(...e)}function Mo(...e){return Ro("clearTimeout")(...e)}function Co(e){try{return e.contentDocument}catch{}}let Uf=1;const Ff=new RegExp("[^a-z0-9-_:]"),vt=-2;function qr(){return Uf++}function Bf(e){if(e instanceof HTMLFormElement)return"form";const t=at(e.tagName);return Ff.test(t)?"div":t}function jf(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}let Ke,ti;const Hf=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,$f=/^(?:[a-z+]+:)?\/\//i,Wf=/^www\..*/i,zf=/^(data:)([^,]*),(.*)/i;function un(e,t){return(e||"").replace(Hf,((e,n,r,s,o,i)=>{const a=r||o||i,c=n||s||"";if(!a)return e;if($f.test(a)||Wf.test(a))return`url(${c}${a}${c})`;if(zf.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${jf(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const Gf=/^[^ \t\n\r\u000c]+/,Yf=/^[, \t\n\r\u000c]+/;function Kf(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const s=e.exec(t.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(Yf),!(n>=t.length);){let o=r(Gf);if(","===o.slice(-1))o=Je(e,o.substring(0,o.length-1)),s.push(o);else{let r="";o=Je(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){s.push((o+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,s.push((o+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return s.join(", ")}const ni=new WeakMap;function Je(e,t){return t&&""!==t.trim()?Rn(e,t):t}function Vf(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function Rn(e,t){let n=ni.get(e);if(n||(n=e.createElement("a"),ni.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Oo(e,t,n,r,s,o){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t)?Je(e,r):"srcset"===n?Kf(e,r):"style"===n?un(r,Rn(e)):"object"===t&&"data"===n?Je(e,r):"function"==typeof o?o(n,r,s):r)}function Do(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function qf(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Jf(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ue(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ue(e.parentNode,t,n,r+1)}function Xe(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(Jf(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function ct(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(o){if(c=Ue(i,Xe(r,s)),c<0)return!0;a=Ue(i,Xe(t,n),c>=0?c:1/0)}else{if(a=Ue(i,Xe(t,n)),a<0)return!1;c=Ue(i,Xe(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!o}catch{}return!!o}function Xf(e,t,n){const r=e.contentWindow;if(!r)return;let s,o=!1;try{s=r.document.readyState}catch{return}if("complete"!==s){const r=Sr((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{Mo(r),o=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return Sr(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Qf(e,t,n){let r,s=!1;try{r=e.sheet}catch{return}if(r)return;const o=Sr((()=>{s||(t(),s=!0)}),n);e.addEventListener("load",(()=>{Mo(o),s=!0,t()}))}function Zf(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:h={},maskTextFn:f,maskInputFn:g,dataURLOptions:_={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,E=ep(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:X.Document,childNodes:[],compatMode:e.compatMode}:{type:X.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return np(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:_,inlineImages:y,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:E,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return tp(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:f,maskInputOptions:h,maskInputFn:g,rootId:E});case e.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:X.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}function ep(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}function tp(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const m="STYLE"===d||void 0,h="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(m&&p){try{e.nextSibling||e.previousSibling||St([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=an(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=un(p,Rn(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");const g=ct(e,r,o,s,i,n);if(!m&&!h&&!f&&p&&g&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),f&&p&&(c.textarea||g)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p){p=bt({isMasked:ct(e,r,o,s,i,kn({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:l})}return{type:X.Text,textContent:p||"",isStyle:m,rootId:u}}function np(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h=!1,rootId:f,maskAllText:g,maskTextClass:_,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:b}=t,S=qf(e,r,s,o),E=Bf(e);let k={};const w=e.attributes.length;for(let t=0;t<w;t++){const r=e.attributes[t];r.name&&!Do(E,r.name,r.value)&&(k[r.name]=Oo(n,E,at(r.name),r.value,e,c))}if("link"===E&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=an(t)),r&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=un(r,t.href))}if("style"===E&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=an(e.sheet);t&&(k._cssText=un(t,Rn(n)))}if("input"===E||"textarea"===E||"select"===E||"option"===E){const t=e,n=Vr(t),r=cn(t,Er(E),n),s=t.checked;if("submit"!==n&&"button"!==n&&r){const e=ct(t,_,v,y,b,kn({type:n,tagName:Er(E),maskInputOptions:a}));k.value=bt({isMasked:e,element:t,value:r,maskInputFn:l})}s&&(k.checked=s)}if("option"===E&&(e.selected&&!a.select?k.selected=!0:delete k.selected),"canvas"===E&&p)if("2d"===e.__context)Pf(e)||(k.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const 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)&&(k.rr_dataURL=t)}if("img"===E&&d){Ke||(Ke=n.createElement("canvas"),ti=Ke.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",s=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Ke.width=t.naturalWidth,Ke.height=t.naturalHeight,ti.drawImage(t,0,0),k.rr_dataURL=Ke.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(s?k.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if(("audio"===E||"video"===E)&&(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),S){const{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}let I;"iframe"===E&&!m(k.src)&&(!S&&!Co(e)&&(k.rr_src=k.src),delete k.src);try{customElements.get(E)&&(I=!0)}catch{}return{type:X.Element,tagName:E,attributes:k,childNodes:[],isSVG:Vf(e)||void 0,needBlock:S,rootId:f,isCustom:I}}function j(e){return null==e?"":e.toLowerCase()}function rp(e,t){if(t.comment&&e.type===X.Comment)return!0;if(e.type===X.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===ko(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(j(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===j(e.attributes.name)||"icon"===j(e.attributes.rel)||"apple-touch-icon"===j(e.attributes.rel)||"shortcut icon"===j(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&j(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(j(e.attributes.property).match(/^(og|twitter|fb):/)||j(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===j(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===j(e.attributes.name)||"googlebot"===j(e.attributes.name)||"bingbot"===j(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===j(e.attributes.name)||"generator"===j(e.attributes.name)||"framework"===j(e.attributes.name)||"publisher"===j(e.attributes.name)||"progid"===j(e.attributes.name)||j(e.attributes.property).match(/^article:/)||j(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===j(e.attributes.name)||"yandex-verification"===j(e.attributes.name)||"csrf-token"===j(e.attributes.name)||"p:domain_verify"===j(e.attributes.name)||"verify-v1"===j(e.attributes.name)||"verification"===j(e.attributes.name)||"shopify-checkout-api-token"===j(e.attributes.name)))return!0}}return!1}function Qe(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:h={},maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:E,onIframeLoad:k,iframeLoadTimeout:w=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:M=!1}=t;let{preserveWhiteSpace:C=!0}=t;const R=Zf(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:x,newlyAddedElement:M});if(!R)return console.warn(e,"not serialized"),null;let D;D=r.hasNode(e)?r.getId(e):rp(R,y)||!C&&R.type===X.Text&&!R.isStyle&&!R.textContent.replace(/^\s+|\s+$/gm,"").length?-2:qr();const O=Object.assign(R,{id:D});if(r.add(e,O),-2===D)return null;E&&E(e);let A=!p;if(O.type===X.Element){A=A&&!O.needBlock,delete O.needBlock;const t=e.shadowRoot;t&>(t)&&(O.isShadowHost=!0)}if((O.type===X.Document||O.type===X.Element)&&A){y.headWhitespace&&O.type===X.Element&&"head"===O.tagName&&(C=!1);const t={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:T,keepIframeSrcFn:x};for(const n of Array.from(e.childNodes)){const e=Qe(n,t);e&&O.childNodes.push(e)}if(Mf(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Qe(n,t);r&&(gt(e.shadowRoot)&&(r.isShadow=!0),O.childNodes.push(r))}}return e.parentNode&&_t(e.parentNode)&>(e.parentNode)&&(O.isShadow=!0),O.type===X.Element&&"iframe"===O.tagName&&Xf(e,(()=>{const t=Co(e);if(t&&k){const n=Qe(t,{doc:t,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:T,keepIframeSrcFn:x});n&&k(e,n)}}),w),O.type===X.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===ko(O.attributes.href))&&Qf(e,(()=>{if(I){const t=Qe(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:T,keepIframeSrcFn:x});t&&I(e,t)}}),T),O}function sp(e,t){const{mirror:n=new wo,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:h=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOM:y=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:E,iframeLoadTimeout:k,onStylesheetLoad:w,stylesheetLoadTimeout:I,keepIframeSrcFn:T=()=>!1}=t;return Qe(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===h?{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}:!1===h?{}:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:E,iframeLoadTimeout:k,onStylesheetLoad:w,stylesheetLoadTimeout:I,keepIframeSrcFn:T,newlyAddedElement:!1})}function Re(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function Z(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ve="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ri={map:{},getId:()=>(console.error(Ve),-1),getNode:()=>(console.error(Ve),null),removeNodeFromMap(){console.error(Ve)},has:()=>(console.error(Ve),!1),reset(){console.error(Ve)}};function It(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&!1===n.leading&&(s=i);const a=t-(i-s),c=this;a<=0||a>t?(r&&(dp(r),r=null),s=i,e.apply(c,o)):!r&&!1!==n.trailing&&(r=Mn((()=>{s=!1===n.leading?0:Date.now(),r=null,e.apply(c,o)}),a))}}function Ao(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(e){Mn((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>Ao(e,t,o||{},!0)}function Jr(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(ri=new Proxy(ri,{get:(e,t,n)=>("map"===t&&console.error(Ve),Reflect.get(e,t,n))}));let ln=Date.now;function xo(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:Re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:Re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function No(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Lo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Po(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function re(e,t,n,r,s){if(!e)return!1;const o=Po(e);if(!o)return!1;const i=Xe(t,n);if(!s){const e=r&&o.matches(r);return i(o)&&!e}const a=Ue(o,i);let c=-1;return!(a<0)&&(r&&(c=Ue(o,Xe(null,r))),a>-1&&c<0||a<c)}function ip(e,t){return-1!==t.getId(e)}function Vn(e,t){return-2===t.getId(e)}function Uo(e,t){if(_t(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Uo(e.parentNode,t))}function br(e){return!!e.changedTouches}function op(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 new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}function Fo(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function Bo(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function vr(e){return!!Re([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(ln=()=>(new Date).getTime());class ap{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return hl(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=void 0===t?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 jo(e){let t=null;return Re([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function cp(e){let t,n=e;for(;t=jo(n);)n=t;return n}function up(e){const t=e.ownerDocument;if(!t)return!1;const n=cp(e);return t.contains(n)}function Ho(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||up(e))}const si={};function Xr(e){const t=si[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return si[e]=r.bind(window)}function lp(...e){return Xr("requestAnimationFrame")(...e)}function Mn(...e){return Xr("setTimeout")(...e)}function dp(...e){return Xr("clearTimeout")(...e)}var ii,oi,R=(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))(R||{}),I=(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))(I||{}),Q=(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))(Q||{}),ye=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ye||{});function Qr(e){try{return e.contentDocument}catch{}}function fp(e){try{return e.contentWindow}catch{}}function pp(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function ai(e){return"__ln"in e}!function(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"}(ii||(ii={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(oi||(oi={}));class hp{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=pp([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&ai(e.previousSibling)){const 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&&ai(e.nextSibling)&&e.nextSibling.__ln.previous){const 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;null===t.next&&(this.tail=t),this.length++}removeNode(e){const 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--)}}const ci=(e,t)=>`${e}@${t}`;class mp{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;const e=[],t=new Set,n=new hp,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},s=s=>{if(!s.parentNode||!Ho(s))return;const o=_t(s.parentNode)?this.mirror.getId(jo(s)):this.mirror.getId(s.parentNode),i=r(s);if(-1===o||-1===i)return n.addNode(s);const a=Qe(s,{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=>{Fo(e,this.mirror)&&!re(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),Bo(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),vr(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{re(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:o,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)ui(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||s(e);for(const e of this.addedSet)!li(this.droppedSet,e)&&!ui(this.removes,e,this.mirror)||li(this.movedSet,e)?s(e):this.droppedSet.add(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),s(e.value)}const i={texts:this.texts.map((e=>({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=>{const{attributes:t}=e;if("string"==typeof t.style){const 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};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.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(i))},this.processMutation=e=>{if(!Vn(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!re(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ct(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Po(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Vr(t),s=t.tagName;r=cn(t,s,n);const o=kn({maskInputOptions:this.maskInputOptions,tagName:s,type:n});r=bt({isMasked:ct(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(re(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(Qr(t))return;n="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Do(t.tagName,n)&&(s.attributes[n]=Oo(this.doc,at(t.tagName),at(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?s.styleDiff[e]=""===o?r:[r,o]:s._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}break}case"childList":if(re(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=_t(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);re(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Vn(t,this.mirror)||!ip(t,this.mirror)||(this.addedSet.has(t)?(Ir(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Uo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ci(n,r)]?Ir(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!_t(e.target)||!gt(e.target))||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(Vn(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[ci(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);re(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),vr(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"].forEach((t=>{this[t]=e[t]}))}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 Ir(e,t){e.delete(t),t.childNodes.forEach((t=>Ir(e,t)))}function ui(e,t,n){return 0!==e.length&&_p(e,t,n)}function _p(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}function li(e,t){return 0!==e.size&&$o(e,t)}function $o(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||$o(e,n))}let yt;function gp(e){yt=e}function yp(){yt=void 0}const D=e=>yt?(...t)=>{try{return e(...t)}catch(e){if(yt&&!0===yt(e))return()=>{};throw e}}:e;function fe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const Ze=[];function xt(e){try{if("composedPath"in e){const 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 Wo(e,t){const n=new mp;Ze.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=fe([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(r=window[s]);const o=new r(D((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ep({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=It(D((t=>{const n=Date.now()-i;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],i=null})),o),l=D(It(D((e=>{const t=xt(e),{clientX:n,clientY:s}=br(e)?e.changedTouches[0]:e;i||(i=ln()),a.push({x:n,y:s,id:r.getId(t),timeOffset:ln()-i}),c(typeof DragEvent<"u"&&e instanceof DragEvent?I.Drag:e instanceof MouseEvent?I.MouseMove:I.TouchMove)})),s,{trailing:!1})),u=[Z("mousemove",l,n),Z("touchmove",l,n),Z("drag",l,n)];return D((()=>{u.forEach((e=>e()))}))}function Sp({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(Q).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=at(i);const u=(t=>i=>{const a=xt(i);if(re(a,r,s,o,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=ye.Mouse;break;case"touch":c=ye.Touch;break;case"pen":c=ye.Pen}c===ye.Touch?Q[t]===Q.MouseDown?u="TouchStart":Q[t]===Q.MouseUp&&(u="TouchEnd"):ye.Pen}else br(i)&&(c=ye.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===ye.Touch||u.startsWith("Mouse")&&c===ye.Mouse)&&(c=null)):Q[t]===Q.Click&&(c=l,l=null);const d=br(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:m,clientY:h}=d;D(e)({type:Q[u],id:p,x:m,y:h,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(Q[i]){case Q.MouseDown:case Q.MouseUp:a=a.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}c.push(Z(a,u,t))})),D((()=>{c.forEach((e=>e()))}))}function zo({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){return Z("scroll",D(It(D((i=>{const a=xt(i);if(!a||re(a,r,s,o,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=xo(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}function bp({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Z("resize",D(It(D((()=>{const t=No(),s=Lo();(n!==t||r!==s)&&(e({width:Number(s),height:Number(t)}),n=t,r=s)})),200)),t)}const vp=["INPUT","TEXTAREA","SELECT"],di=new WeakMap;function Ip({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:m,maskTextSelector:h,unmaskTextSelector:f}){function g(e){let n=xt(e);const u=e.isTrusted,g=n&&Er(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||vp.indexOf(g)<0||re(n,r,s,o,!0))return;const y=n;if(y.classList.contains(i)||a&&y.matches(a))return;const v=Vr(n);let b=cn(y,g,v),S=!1;const E=kn({maskInputOptions:c,tagName:g,type:v}),k=ct(n,p,h,m,f,E);("radio"===v||"checkbox"===v)&&(S=n.checked),b=bt({isMasked:k,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:S,userTriggered:u}:{text:b,isChecked:S});const w=n.name;"radio"===v&&w&&S&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach((e=>{if(e!==n){const t=bt({isMasked:k,element:e,value:cn(e,g,v),maskInputFn:l});_(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}}))}function _(t,r){const s=di.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){di.set(t,r);const s=n.getId(t);D(e)({...r,id:s})}}const y=("last"===u.input?["change"]:["input","change"]).map((e=>Z(e,D(g),t))),v=t.defaultView;if(!v)return()=>{y.forEach((e=>e()))};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&y.push(...S.map((e=>Ao(e[0],e[1],{set(){D(g)({target:this,isTrusted:!1})}},!1,v)))),D((()=>{y.forEach((e=>e()))}))}function dn(e){return function(e,t){if(Kt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Kt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Kt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Kt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Me(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Tp({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:D(((r,s,o)=>{const[i,a]=o,{id:c,styleId:l}=Me(s,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(s,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:D(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(s,o)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:D(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(s,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:D(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(s,o)}))}));const c={};Vt("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Vt("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Vt("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Vt("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach((([r,s])=>{l[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(l[r].insertRule,{apply:D(((r,s,o)=>{const[i,a]=o,{id:c,styleId:l}=Me(s.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...dn(s),a||0]}]}),r.apply(s,o)}))}),s.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:D(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...dn(s),i]}]}),r.apply(s,o)}))})})),D((()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}function Go({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const s="#document"===n.nodeName?fe([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):fe([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=fe([s,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(fe([s,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return fe([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=fe([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch{}return n}}),D((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))):()=>{}}function wp({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:D(((s,i,a)=>{const[c,l,u]=a;if(n.has(c))return o.apply(i,[c,l,u]);const{id:d,styleId:p}=Me(fe([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:l,priority:u},index:dn(i.parentRule)}),s.apply(i,a)}))});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:D(((s,o,a)=>{const[c]=a;if(n.has(c))return i.apply(o,[c]);const{id:l,styleId:u}=Me(fe([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:dn(o.parentRule)}),s.apply(o,a)}))}),D((()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i}))}function kp({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const a=D((i=>It(D((o=>{const a=xt(o);if(!a||re(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:s.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})})),o.media||500))),c=[Z("play",a(0),i),Z("pause",a(1),i),Z("seeked",a(2),i),Z("volumechange",a(3),i),Z("ratechange",a(4),i)];return D((()=>{c.forEach((e=>e()))}))}function Rp({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return s.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=Jr(t.fonts,"add",(function(t){return function(n){return Mn(D((()=>{const t=s.get(n);t&&(e(t),s.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(i),D((()=>{r.forEach((e=>e()))}))}function Mp(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=D((()=>{const e=t.getSelection();if(!e||a&&fe([e,"optionalAccess",e=>e.isCollapsed]))return;a=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:u,endOffset:d}=i;re(a,r,s,o,!0)||re(u,r,s,o,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})}));return c(),Z("selectionchange",c)}function Cp({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?Jr(n.customElements,"define",(function(e){return function(n,r,s){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,s])}})):()=>{}}function Op(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Wo(e,e.doc));const s=Ep(e),o=Sp(e),i=zo(e),a=bp(e,{win:n}),c=Ip(e),l=kp(e);let u=()=>{},d=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(u=Tp(e,{win:n}),d=Go(e,e.doc),p=wp(e,{win:n}),e.collectFonts&&(m=Rp(e)));const h=Mp(e),f=Cp(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return D((()=>{Ze.forEach((e=>e.reset())),fe([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),s(),o(),i(),a(),c(),l(),u(),d(),p(),m(),h(),f(),g.forEach((e=>e()))}))}function Kt(e){return typeof window[e]<"u"}function Vt(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Tr{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const s=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let i=s.get(t);return i||(i=this.generateIdFn(),s.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);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}}function fi(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}class Dp{constructor(){this.crossOriginIframeMirror=new Tr(qr),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Ap{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Tr(qr),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Tr(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),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,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}),fi([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=Qr(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case I.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const 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 I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case I.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),fi([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const s of r)!Array.isArray(t[s])&&"number"!=typeof t[s]||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));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.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type!==X.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class xp{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Np{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(!gt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Wo({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(zo({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Mn((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Go({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=Qr(e),n=fp(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Jr(e.prototype,"attachShadow",(function(e){return function(r){const s=e.call(this,r);return this.shadowRoot&&Ho(this)&&n.addShadowRoot(this.shadowRoot,t),s}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class pi{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Lp{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new ap,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(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const 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:To(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){}}class Pp{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,lp((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let V,fn;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Qt([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const le=Lf();function Ie(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:h=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:E,sampling:k={},dataURLOptions:w={},mousemoveWait:T,recordDOM:x=!0,recordCanvas:M=!1,recordCrossOriginIframes:C=!1,recordAfter:O=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:A=!1,collectFonts:N=!1,inlineImages:L=!1,plugins:P,keepIframeSrcFn:j=()=>!1,ignoreCSSAttributes:U=new Set([]),errorHandler:F,onMutation:B,getCanvasManager:H}=e;gp(F);const $=!C||window.parent===window;let z=!1;if(!$)try{window.parent.document&&(z=!1)}catch{z=!0}if($&&!t)throw new Error("emit function is required");if(!$&&!z)return()=>{};void 0!==T&&void 0===k.mousemove&&(k.mousemove=T),le.reset();const W=!0===f?{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}:void 0!==g?g:{},K=!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===_,headMetaDescKeywords:"all"===_}:_||{};op();let Y,G=0;const J=e=>{for(const t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return E&&!z&&(e=E(e)),e};V=(e,s)=>{const o=e;if(o.timestamp=ln(),Qt([Ze,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&o.type!==R.FullSnapshot&&!(o.type===R.IncrementalSnapshot&&o.data.source===I.Mutation)&&Ze.forEach((e=>e.unfreeze())),$)Qt([t,"optionalCall",e=>e(J(o),s)]);else if(z){const e={type:"rrweb",event:J(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===R.FullSnapshot)Y=o,G=0;else if(o.type===R.IncrementalSnapshot){if(o.data.source===I.Mutation&&o.data.isAttachIframe)return;G++;const e=r&&G>=r,t=n&&Y&&o.timestamp-Y.timestamp>n;(e||t)&&oe(!0)}};const q=e=>{V({type:R.IncrementalSnapshot,data:{source:I.Mutation,...e}})},X=e=>V({type:R.IncrementalSnapshot,data:{source:I.Scroll,...e}}),Q=e=>V({type:R.IncrementalSnapshot,data:{source:I.CanvasMutation,...e}}),ee=new Lp({mutationCb:q,adoptedStyleSheetCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.AdoptedStyleSheet,...e}})}),te="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Dp:new Ap({mirror:le,mutationCb:q,stylesheetManager:ee,recordCrossOriginIframes:C,wrappedEmit:V});for(const e of P||[])e.getMirror&&e.getMirror({nodeMirror:le,crossOriginIframeMirror:te.crossOriginIframeMirror,crossOriginIframeStyleMirror:te.crossOriginIframeStyleMirror});const ne=new Pp,re=Fp(H,{mirror:le,win:window,mutationCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.CanvasMutation,...e}}),recordCanvas:M,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:S,sampling:k.canvas,dataURLOptions:w,errorHandler:F}),se="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new xp:new Np({mutationCb:q,scrollCb:X,bypassOptions:{onMutation:B,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:h,maskInputOptions:W,dataURLOptions:w,maskAttributeFn:y,maskTextFn:b,maskInputFn:v,recordCanvas:M,inlineImages:L,sampling:k,slimDOMOptions:K,iframeManager:te,stylesheetManager:ee,canvasManager:re,keepIframeSrcFn:j,processedNodeManager:ne},mirror:le}),oe=(e=!1)=>{if(!x)return;V({type:R.Meta,data:{href:window.location.href,width:Lo(),height:No()}},e),ee.reset(),se.init(),Ze.forEach((e=>e.lock()));const t=sp(document,{mirror:le,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:h,maskAllInputs:W,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,slimDOM:K,dataURLOptions:w,recordCanvas:M,inlineImages:L,onSerialize:e=>{Fo(e,le)&&te.addIframe(e),Bo(e,le)&&ee.trackLinkElement(e),vr(e)&&se.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{te.attachIframe(e,t),e.contentWindow&&re.addWindow(e.contentWindow),se.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{ee.attachLinkElement(e,t)},keepIframeSrcFn:j});if(!t)return console.warn("Failed to snapshot the document");V({type:R.FullSnapshot,data:{node:t,initialOffset:xo(window)}}),Ze.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ee.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};fn=oe;try{const e=[],t=e=>D(Op)({onMutation:B,mutationCb:q,mousemoveCb:(e,t)=>V({type:R.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.MouseInteraction,...e}}),scrollCb:X,viewportResizeCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.ViewportResize,...e}}),inputCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.Input,...e}}),mediaInteractionCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.MediaInteraction,...e}}),styleSheetRuleCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.StyleSheetRule,...e}}),styleDeclarationCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.StyleDeclaration,...e}}),canvasMutationCb:Q,fontCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.Font,...e}}),selectionCb:e=>{V({type:R.IncrementalSnapshot,data:{source:I.Selection,...e}})},customElementCb:e=>{V({type:R.IncrementalSnapshot,data:{source:I.CustomElement,...e}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:W,inlineStylesheet:h,sampling:k,recordDOM:x,recordCanvas:M,inlineImages:L,userTriggeredOnInput:A,collectFonts:N,doc:e,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:j,blockSelector:o,unblockSelector:i,slimDOMOptions:K,dataURLOptions:w,mirror:le,iframeManager:te,stylesheetManager:ee,shadowDomManager:se,processedNodeManager:ne,canvasManager:re,ignoreCSSAttributes:U,plugins:Qt([P,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>V({type:R.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});te.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{oe(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Z("DOMContentLoaded",(()=>{V({type:R.DomContentLoaded,data:{}}),"DOMContentLoaded"===O&&n()}))),e.push(Z("load",(()=>{V({type:R.Load,data:{}}),"load"===O&&n()}),window))),()=>{e.forEach((e=>e())),ne.destroy(),fn=void 0,yp()}}catch(e){console.warn(e)}}function Up(e){if(!fn)throw new Error("please take full snapshot after start recording");fn(e)}function Fp(e,t){try{return e?e(t):new pi}catch{return console.warn("Unable to initialize CanvasManager"),new pi}}Ie.mirror=le,Ie.takeFullSnapshot=Up;const Bp=3,jp=5;function Zr(e){return e>9999999999?e:1e3*e}function qn(e){return e>9999999999?e/1e3:e}function Nt(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:R.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:de(t,10,1e3)}}),"console"===t.category))))}const Hp="button,a";function Yo(e){return e.closest(Hp)||e}function Ko(e){const t=Vo(e);return t&&t instanceof Element?Yo(t):t}function Vo(e){return $p(e)?e.target:e}function $p(e){return"object"==typeof e&&!!e&&"target"in e}let Ce;function Wp(e){return Ce||(Ce=[],zp()),Ce.push(e),()=>{const t=Ce?Ce.indexOf(e):-1;t>-1&&Ce.splice(t,1)}}function zp(){ee(H,"open",(function(e){return function(...t){if(Ce)try{Ce.forEach((e=>e()))}catch{}return e.apply(H,t)}}))}const Gp=new Set([I.Mutation,I.StyleSheetRule,I.StyleDeclaration,I.AdoptedStyleSheet,I.CanvasMutation,I.Selection,I.MediaInteraction]);function Yp(e,t,n){e.handleClick(t,n)}class Kp{constructor(e,t,n=Nt){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(){const e=Wp((()=>{this._lastMutation=hi()}));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(qp(t,this._ignoreSelector)||!Jp(e))return;const n={timestamp:qn(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),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=qn(e)}registerScroll(e=Date.now()){this._lastScroll=qn(e)}registerClick(e){const t=Yo(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=hi();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(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!n&&!r,{clickCount:o,clickBreadcrumb:i}=e;if(s){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:H.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};this._addBreadcrumbEvent(t,s)}else if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:H.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ot((()=>this._checkClicks()),1e3)}}const Vp=["A","BUTTON","INPUT"];function qp(e,t){return!!(!Vp.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||"A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target"))||t&&e.matches(t))}function Jp(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}function hi(){return Date.now()/1e3}function Xp(e,t){try{if(!Qp(t))return;const{source:n}=t.data;if(Gp.has(n)&&e.registerMutation(t.timestamp),n===I.Scroll&&e.registerScroll(t.timestamp),Zp(t)){const{type:n,id:r}=t.data,s=Ie.mirror.getNode(r);s instanceof HTMLElement&&n===Q.Click&&e.registerClick(s)}}catch{}}function Qp(e){return 3===e.type}function Zp(e){return e.data.source===I.MouseInteraction}function me(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var pn;!function(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"}(pn||(pn={}));const eh=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function th(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(eh.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}const nh=e=>t=>{if(!e.isEnabled())return;const n=rh(t);if(!n)return;const r="click"===t.name,s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Yp(e.clickDetector,n,Ko(t.event)),Nt(e,n)};function qo(e,t){const n=Ie.mirror.getId(e),r=n&&Ie.mirror.getNode(n),s=r&&Ie.mirror.getMeta(r),o=s&&ih(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===pn.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:th(o.attributes)}}:{}}}function rh(e){const{target:t,message:n}=sh(e);return me({category:`ui.${e.name}`,...qo(t,n)})}function sh(e){const t="click"===e.name;let n,r=null;try{r=t?Ko(e.event):Vo(e.event),n=En(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function ih(e){return e.type===pn.Element}function oh(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=ah(t);n&&Nt(e,n)}function ah(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||ch(i)||!o)return null;const a=t||r||s,c=1===o.length;if(!a&&c)return null;const l=En(i,{maxStringLength:200})||"<unknown>";return me({category:"ui.keyDown",message:l,data:{...qo(i,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function ch(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}const uh={resource:hh,paint:fh,navigation:ph};function qt(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function lh(e){return e.map(dh).filter(Boolean)}function dh(e){const t=uh[e.entryType];return t?t(e):null}function ut(e){return((Ga||H.performance.timeOrigin)+e)/1e3}function fh(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=ut(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function ph(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:m,transferSize:h,type:f}=e;return 0===s?null:{type:`${t}.${f}`,start:ut(m),end:ut(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:p}}}function hh(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:ut(o),end:ut(s),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function mh(e){const t=e.entries[e.entries.length-1];return Cn(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function _h(e){return void 0!==e.sources}function gh(e){const t=[],n=[];for(const r of e.entries)if(_h(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=Ie.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return Cn(e,"cumulative-layout-shift",n,t)}function yh(e){const t=e.entries[e.entries.length-1];return Cn(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function Eh(e){const t=e.entries[e.entries.length-1];return Cn(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function Cn(e,t,n,r){const s=e.value,o=e.rating,i=ut(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map((e=>Ie.mirror.getId(e))):void 0,attributions:r}}}function Sh(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(sd(e,n))})),r.push(td(qt(mh,e)),ed(qt(gh,e)),nd(qt(yh,e)),rd(qt(Eh,e))),()=>{r.forEach((e=>e()))}}const b=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,bh='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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(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,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,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=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=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:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}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 a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,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[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,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[a[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=p,P=g,Q=y,R=w;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;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}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];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}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-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(a[t]^a[t+1]<<A^a[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||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),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(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[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|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),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(a),32768),this.s.z=n.length-a+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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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});';function vh(){const e=new Blob([bh]);return URL.createObjectURL(e)}const mi=["info","warn","error","log"],en="[Replay] ";function Jn(e,t="info"){Ae({category:"console",data:{logger:"replay"},level:t,message:`${en}${e}`},{level:t})}function Ih(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return b?(mi.forEach((e=>{n[e]=(...n)=>{S[e](en,...n),t&&Jn(n.join(""),eo(e))}})),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),S.error(en,r),e?Fr(r):t&&Jn(r,"error")},n.infoTick=(...e)=>{S.info(en,...e),t&&setTimeout((()=>Jn(e[0])),0)}):mi.forEach((e=>{n[e]=()=>{}})),n}const v=Ih();class es extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Kr}.`)}}class Jo{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){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Kr)throw new es;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?Zr(e):null}}class Th{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){b&&v.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,s)=>{const o=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",o),!i.success)return b&&v.error("Error in compression worker: ",i.response),void s(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class wh{constructor(e){this._worker=new Th(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){const t=Zr(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Kr?Promise.reject(new es):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{b&&v.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class kh{constructor(e){this._fallback=new Jo,this._compression=new wh(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=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){return void(b&&v.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const 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){b&&v.exception(e,"Failed to add events when switching buffers.")}}}function Rh({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=Mh(t);if(e)return e}return b&&v.info("Using simple buffer"),new Jo}function Mh(e){try{const t=e||Ch();if(!t)return;b&&v.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new kh(n)}catch(e){b&&v.exception(e,"Failed to create compression worker")}}function Ch(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?vh():""}function ts(){try{return"sessionStorage"in H&&!!H.sessionStorage}catch{return!1}}function Oh(e){Dh(),e.session=void 0}function Dh(){if(ts())try{H.sessionStorage.removeItem(Gr)}catch{}}function Xo(e){return void 0!==e&&Math.random()<e}function Qo(e){const t=Date.now();return{id:e.id||se(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function ns(e){if(ts())try{H.sessionStorage.setItem(Gr,JSON.stringify(e))}catch{}}function Ah(e,t){return Xo(e)?"session":!!t&&"buffer"}function _i({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Qo({sampled:Ah(e,t),previousSessionId:r});return n&&ns(s),s}function xh(){if(!ts())return null;try{const e=H.sessionStorage.getItem(Gr);if(!e)return null;const t=JSON.parse(e);return b&&v.infoTick("Loading existing session"),Qo(t)}catch{return null}}function wr(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function Zo(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return wr(e.started,t,r)||wr(e.lastActivity,n,r)}function ea(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Zo(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function Xn({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&xh();return s?ea(s,{sessionIdleExpire:e,maxReplayDuration:t})?(b&&v.infoTick("Session in sessionStorage is expired, creating new one..."),_i(r,{previousSessionId:s.id})):s:(b&&v.infoTick("Creating new session"),_i(r,{previousSessionId:n}))}function Nh(e){return e.type===R.Custom}function rs(e,t,n){return!!na(e,t)&&(ta(e,t,n),!0)}function Lh(e,t,n){return na(e,t)?ta(e,t,n):Promise.resolve(null)}async function ta(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s="buffer"===e.recordingMode;try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=Ph(t,e.getOptions().beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(t){const n=t&&t instanceof es,o=n?"addEventSizeExceeded":"addEvent";if(n&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o});const i=K();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function na(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Zr(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(b&&v.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function Ph(e,t){try{if("function"==typeof t&&Nh(e))return t(e)}catch(e){return b&&v.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function ss(e){return!e.type}function kr(e){return"transaction"===e.type}function Uh(e){return"replay_event"===e.type}function gi(e){return"feedback"===e.type}function Fh(e){return(t,n)=>{if(!e.isEnabled()||!ss(t)&&!kr(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(kr(t))return void Bh(e,t);jh(e,t)}}}function Bh(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function jh(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();"function"==typeof r&&!r(t)||ot((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}function Hh(e){return t=>{!e.isEnabled()||!ss(t)||$h(e,t)}}function $h(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"==typeof n&&(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))){Nt(e,me({category:"replay.hydrate-error",data:{url:Di()}}))}}function Wh(e){const t=K();t&&t.on("beforeAddBreadcrumb",(t=>zh(e,t)))}function zh(e,t){if(!e.isEnabled()||!ra(t))return;const n=Gh(t);n&&Nt(e,n)}function Gh(e){return!ra(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?Yh(e):me(e)}function Yh(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return me(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Yt?(n=!0,`${e.slice(0,Yt)}…`):e;if("object"==typeof e)try{const t=de(e,7);return JSON.stringify(t).length>Yt?(n=!0,`${JSON.stringify(t,null,2).slice(0,Yt)}…`):t}catch{}return e}));return me({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ra(e){return!!e.category}function Kh(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function sa(){const e=ie().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ui();if(t){delete Bi(t).replay_id}}function Vh(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:R.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function qh(e,t){return!("buffer"!==e.recordingMode||t.message===Yr||!t.exception||t.type)&&Xo(e.getOptions().errorSampleRate)}function Jh(e){return Object.assign(((t,n)=>!e.isEnabled()||e.isPaused()?t:Uh(t)?(delete t.breadcrumbs,t):ss(t)||kr(t)||gi(t)?e.checkAndHandleExpiredSession()?gi(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Vh(e,t),t):Kh(t,n)&&!e.getOptions()._experiments.captureExceptions?(b&&v.log("Ignoring error from rrweb internals",t),null):((qh(e,t)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(sa(),t):t),{id:"Replay"})}function On(e,t){return t.map((({type:t,start:n,end:r,name:s,data:o})=>{const i=e.throttledAddEvent({type:R.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:s,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof i?Promise.resolve(null):i}))}function Xh(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Qh(e){return t=>{if(!e.isEnabled())return;const n=Xh(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(On(e,[n]),!1))))}}function Zh(e,t){return(!b||!e.getOptions()._experiments.traceInternals)&&Cu(t,K())}function ia(e,t){e.isEnabled()&&null!==t&&(Zh(e,t.name)||e.addUpdate((()=>(On(e,[t]),!0))))}function Dn(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=ua(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function oa(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function aa(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ua(e)];if(!e)return[void 0]}catch(t){return b&&v.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return b&&v.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function hn(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function ca(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:te({method:o,statusCode:i,request:a,response:c})}}function Tt(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function De(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=em(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function Rr(e,t){return Object.entries(e).reduce(((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n}),{})}function ua(e){return new URLSearchParams(e).toString()}function em(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>Xs,n=tm(e);if(t){const t=e.slice(0,Xs);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function tm(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}function mn(e,t){return kt(nm(e),t)}function nm(e,t=H.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(H.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function rm(e,t,n){try{const r=ca("resource.fetch",await im(e,t,n));ia(n.replay,r)}catch(e){b&&v.exception(e,"Failed to capture fetch breadcrumb")}}function sm(e,t){const{input:n,response:r}=t,s=Dn(n?la(n):void 0),o=r?oa(r.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}async function im(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=mn(i,n.networkDetailAllowUrls)&&!mn(i,n.networkDetailDenyUrls);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:d?om(n,t.input,l):Tt(l),response:await am(d,n,t.response,u)}}function om({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?lm(n,t):{};if(!e)return De(s,r,void 0);const o=la(n),[i,a]=aa(o),c=De(s,r,i);return a?hn(c,a):c}async function am(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&void 0!==s)return Tt(s);const o=r?da(r.headers,n):{};if(!r||!t&&void 0!==s)return De(o,s,void 0);const[i,a]=await um(r),c=cm(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return a?hn(c,a):c}function cm(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e&&e.length&&void 0===n?Dn(e):n;return r?De(s,o,t?e:void 0):Tt(o)}catch(e){return b&&v.exception(e,"Failed to serialize response body"),De(s,n,void 0)}}async function um(e){const t=dm(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await fm(t)]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(b&&v.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(b&&v.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function la(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function da(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function lm(e,t){return 1===e.length&&"string"!=typeof e[0]?yi(e[0],t):2===e.length?yi(e[1],t):{}}function yi(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?da(n,t):Array.isArray(n)?{}:Rr(n,t):{}}function dm(e){try{return e.clone()}catch(e){b&&v.exception(e,"Failed to clone response body")}}function fm(e){return new Promise(((t,n)=>{const r=ot((()=>n(new Error("Timeout while trying to read response body"))),500);pm(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}async function pm(e){return await e.text()}async function hm(e,t,n){try{const r=ca("resource.xhr",_m(e,t,n));ia(n.replay,r)}catch(e){b&&v.exception(e,"Failed to capture xhr breadcrumb")}}function mm(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Dn(r),o=n.getResponseHeader("content-length")?oa(n.getResponseHeader("content-length")):Sm(n.response,n.responseType);void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}function _m(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!mn(c,n.networkDetailAllowUrls)||mn(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:Tt(d),response:Tt(p)}}const m=a[qe],h=m?Rr(m.request_headers,n.networkRequestHeaders):{},f=Rr(gm(a),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?aa(i):[void 0],[y,v]=n.networkCaptureBodies?ym(a):[void 0],b=De(h,d,g),S=De(f,p,y);return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:_?hn(b,_):b,response:v?hn(S,v):S}}function gm(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}function ym(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return Em(e.response,e.responseType)}catch(e){t.push(e)}return b&&v.warn("Failed to get xhr response body",...t),[void 0]}function Em(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return b&&v.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return b&&v.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Sm(e,t){try{return Dn("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}function bm(e){const t=K();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>vm(a,e,t)))}catch{}}function vm(e,t,n){if(t.data)try{Im(t)&&wm(n)&&(mm(t,n),hm(t,n,e)),Tm(t)&&km(n)&&(sm(t,n),rm(t,n,e))}catch(e){b&&v.exception(e,"Error when enriching network breadcrumb")}}function Im(e){return"xhr"===e.category}function Tm(e){return"fetch"===e.category}function wm(e){return e&&e.xhr}function km(e){return e&&e.response}function Rm(e){const t=K();Eo(nh(e)),zr(Qh(e)),Wh(e),bm(e);cu(Jh(e)),t&&(t.on("beforeSendEvent",Hh(e)),t.on("afterSendEvent",Fh(e)),t.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}async function Mm(e){try{return Promise.all(On(e,[Cm(H.performance.memory)]))}catch{return[]}}function Cm(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Om(e,t,n){let r,s,o;const i=n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){void 0!==s&&clearTimeout(s),void 0!==o&&clearTimeout(o),s=o=void 0}function l(){return s&&clearTimeout(s),s=ot(a,t),i&&void 0===o&&(o=ot(a,i)),r}return l.cancel=c,l.flush=function(){return void 0!==s||void 0!==o?a():r},l}function Dm(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(b&&v.warn("Received replay event after session expired."));const s=r||!t;t=!0,e.clickDetector&&Xp(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!rs(e,n,s))return!0;if(!s)return!1;const t=e.session;if(xm(e,s),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(b&&v.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&ns(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}function Am(e){const t=e.getOptions();return{type:R.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&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function xm(e,t){!t||!e.session||0!==e.session.segmentId||rs(e,Am(e),!1)}function Nm(e,t,n,r){return dt($i(e,Ur(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}function Lm({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function Pm({client:e,scope:t,replayId:n,event:r}){const s={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,s);const o=await Wi(e.getOptions(),r,s,t,e,_e());if(!o)return null;o.platform=o.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c}=i&&i.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},o}async function Um({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=Lm({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=K(),p=ie(),m=d&&d.getTransport(),h=d&&d.getDsn();if(!(d&&m&&h&&o.sampled))return we({});const f={type:_f,replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},g=await Pm({scope:p,client:d,replayId:t,event:f});if(!g)return d.recordDroppedEvent("event_processor","replay",f),b&&v.info("An event processor returned `null`, will not send event."),we({});delete g.sdkProcessingMetadata;const _=Nm(g,i,h,d.getOptions().tunnel);let y;try{y=await m.send(_)}catch(e){const t=new Error(Yr);try{t.cause=e}catch{}throw t}if("number"==typeof y.statusCode&&(y.statusCode<200||y.statusCode>=300))throw new fa(y.statusCode);const S=Qi({},y);if(Xi(S,"replay"))throw new is(S);return y}class fa extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class is extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function pa(e,t={count:0,interval:vf}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Um(e),!0}catch(n){if(n instanceof fa||n instanceof is)throw n;if(Gi("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${Yr} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{ot((async()=>{try{await pa(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const ha="__THROTTLED",Fm="__SKIPPED";function Bm(e,t,n){const r=new Map;let s=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(i),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=s;return s=!0,e?Fm:ha}s=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...o)}}class Oe{constructor({options:e,recordingOptions:t}){Oe.prototype.__init.call(this),Oe.prototype.__init2.call(this),Oe.prototype.__init3.call(this),Oe.prototype.__init4.call(this),Oe.prototype.__init5.call(this),Oe.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:gf,sessionIdleExpire:yf},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=Om((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Bm(((e,t)=>Lh(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(Tf,n),timeout:n,scrollTimeout:wf,ignoreSelector:r?r.join(","):""}:void 0;if(s&&(this.clickDetector=new Kp(this,s)),b){const t=e._experiments;v.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){b&&v.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session)return void(b&&v.exception(new Error("Unable to initialize and create session")));!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",b&&v.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(b&&v.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(b&&v.info("Buffering is in progress, call `flush()` to save the replay"));b&&v.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Xn({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(b&&v.info("Buffering is in progress, call `flush()` to save the replay"));b&&v.infoTick("Starting replay in buffer mode");const e=Xn({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{const e=this._canvas;this._stopRecording=Ie({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:bf}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Dm(this),onMutation:this._onMutationHandler,...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(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{b&&v.info("Stopping Replay"+(t?` triggered by ${t}`:"")),sa(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Oh(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),b&&v.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),b&&v.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();b&&v.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&wr(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${H.location.pathname}${H.location.hash}${H.location.search}`,t=`${H.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){const n=this._throttledAddEvent(e,t);if(n===ha){const e=me({category:"replay.throttled"});this.addUpdate((()=>!rs(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Ui(),t=e&&Lr(e),n=(t&&Et(t).data||{})[Pi];if(t&&n&&["route","custom"].includes(n))return Et(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Rh({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Xn({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;const e=this.session;return!ea(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{H.document.addEventListener("visibilitychange",this._handleVisibilityChange),H.addEventListener("blur",this._handleWindowBlur),H.addEventListener("focus",this._handleWindowFocus),H.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Rm(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=Sh(this)}_removeListeners(){try{H.document.removeEventListener("visibilitychange",this._handleVisibilityChange),H.removeEventListener("blur",this._handleWindowBlur),H.removeEventListener("focus",this._handleWindowFocus),H.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===H.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=me({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=me({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{oh(this,e)}}_doChangeToBackgroundTasks(e){!this.session||Zo(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):b&&v.info("Document has become active, but session has expired"))}_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:R.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=lh(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(On(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await Mm(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await pa({replayId:e,recordingData:s,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=K();if(t){const n=e instanceof is?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else b&&v.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(b&&v.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,s=n>this._options.maxReplayDuration+5e3;if(r||s)return b&&v.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&b&&v.info("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&ns(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=me({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function pt(e,t){return[...e,...t].join(",")}function jm({mask:e,unmask:t,block:n,unblock:r,ignore:s}){return{maskTextSelector:pt(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:pt(t,[]),blockSelector:pt(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:pt(r,[]),ignoreSelector:pt(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Hm({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const Ei='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',$m=["content-length","content-type","accept"];let Si=!1;const Wm=e=>new An(e);class An{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=Ef,flushMaxDelay:t=Sf,minReplayDuration:n=kf,maxReplayDuration:r=Qs,stickySession:s=!0,useCompression:o=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:y=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder"],unmask:E=[],block:k=[],unblock:w=[],ignore:I=[],maskFn:T,beforeAddRecordingEvent:x,beforeErrorSampling:M,onError:C}={}){this.name=An.id;const R=jm({mask:b,unmask:E,block:k,unblock:w,ignore:I});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>Hm({maskAttributes:S,maskAllText:c,privacyOptions:R,key:e,value:t,el:n}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Rf),maxReplayDuration:Math.min(r,Qs),stickySession:s,useCompression:o,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:m,slowClickIgnoreSelectors:h,networkDetailAllowUrls:f,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:bi(y),networkResponseHeaders:bi(v),beforeAddRecordingEvent:x,beforeErrorSampling:M,onError:C,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ei}`:Ei),this._isInitialized&&zs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Si}set _isInitialized(e){Si=e}afterAllSetup(e){!zs()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=zm(this._initialOptions,e);this._replay=new Oe({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function zm(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...te(e)},s=sr(n.replaysSessionSampleRate),o=sr(n.replaysOnErrorSampleRate);return null==s&&null==o&&xe((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=s&&(r.sessionSampleRate=s),null!=o&&(r.errorSampleRate=o),r}function bi(e){return[...$m,...e.map((e=>e.toLowerCase()))]}function Gm(e){const t={...e};return Zi(t,"react"),Gi("react",{version:Ia}),mf(t)}An.__initStatic();const ma=()=>"object"!=typeof window;var Ym={DISTRIB_RELEASE:"24.04",JDK_18:"/usr/lib/jvm/java-1.8.0-amazon-corretto",TEAMCITY_PROJECT_NAME:"Web Apps",USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.14.0 linux x64 workspaces/false ci/teamcity",rvm_pretty_print_flag:"0",NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS:"20",TEAMCITY_PROCESS_PARENT_FLOW_ID:"",ANDROID_SDK_HOME:"/home/teamcity/android-sdk-linux",DOTNET_CLI_TELEMETRY_OPTOUT:"true",JDK_11_x64:"/usr/lib/jvm/java-11-amazon-corretto",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.14.0/bin/node",SHLVL:"0",npm_config_noproxy:"",BUILD_VCS_NUMBER:"3a72b67929d7dd6a462bc24b987e95205f714acd",HOME:"/home/teamcity",OLDPWD:"/",BUILD_URL:"https://wellesley.teamcity.com/build/15176",JRE_HOME:"/usr/lib/jvm/java-21-amazon-corretto",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",ANDROID_SDKMANAGER_PATH:"/home/teamcity/android-sdk-linux/cmdline-tools/latest/bin/sdkmanager",TEAMCITY_BUILD_PROPERTIES_FILE:"/mnt/agent/temp/buildTmp/teamcity.build.parameters",npm_package_engines_node:">=20.2.0",rvm_stored_umask:"0022",GRADLE_HOME:"/opt/gradle",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",npm_config_userconfig:"/home/teamcity/.npmrc",rvm_user_install_flag:"1",BUILD_VCS_NUMBER_WebApps:"3a72b67929d7dd6a462bc24b987e95205f714acd",GOROOT:"/opt/go",JDK_18_x64:"/usr/lib/jvm/java-1.8.0-amazon-corretto",SYSTEMD_EXEC_PID:"1347",COLOR:"1",TEAMCITY_BUILDCONF_NAME:"Apps",DISTRIB_DESCRIPTION:"Ubuntu 24.04.2 LTS",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"true",TMPDIR:"/mnt/agent/temp/buildTmp",LOGNAME:"teamcity",JOURNAL_STREAM:"8:9625",TEMP:"/mnt/agent/temp/buildTmp",_:"/usr/bin/nohup",npm_config_npm_version:"10.9.2",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.14.0",rvm_bin_path:"/home/teamcity/.rvm/bin",IRBRC:"/home/teamcity/.rvm/rubies/ruby-3.3.7/.irbrc",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/teamcity-agent.service/memory.pressure",P4CONFIG:".p4config",RUBY_VERSION:"ruby-3.3.7",npm_config_cache:"/home/teamcity/.npm",DOTNET_ROOT:"/usr/share/dotnet",JDK_1_8:"/usr/lib/jvm/java-1.8.0-amazon-corretto",MNT_MOUNT:"/dev/nvme1n1 on /mnt type ext4 (rw,noatime)",TEAMCITY_GIT_PATH:"/usr/local/bin/git",AWS_SHARED_CREDENTIALS_FILE:"/mnt/agent/temp/agentTmp/aws.credentials",DISTRIB_ID:"Ubuntu",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.14.0/bin",INVOCATION_ID:"590ade4223074ffc9fe95e97f1514199",JDK_11_0:"/usr/lib/jvm/java-11-amazon-corretto",NODE:"/home/teamcity/.nvm/versions/node/v22.14.0/bin/node",TEAMCITY_CAPTURE_ENV:'"/usr/lib/jvm/java-21-amazon-corretto/bin/java" -jar "/home/teamcity/agent/plugins/environment-fetcher/lib/environment-fetcher-bin-2024.12-174504-jar-with-dependencies.jar"',TURBO_HASH:"ffeb52eb5553bcbd",npm_package_name:"@wellesley/sentry",DISTRIB_CODENAME:"noble",JDK_21_0:"/usr/lib/jvm/java-21-amazon-corretto",npm_config_color:"always",DOMAIN_ENV:"test",MY_RUBY_HOME:"/home/teamcity/.rvm/rubies/ruby-3.3.7",TEAMCITY_VERSION:"2024.12.2 (build 174504)",LANG:"en_US.UTF-8",GROOVY_HOME:"/opt/groovy",TMP:"/mnt/agent/temp/buildTmp",npm_lifecycle_script:"tsc && vite build",BUILD_NUMBER:"2140",NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS:"20",UID:"1001",AWS_PROFILE:"default",GOPATH:"/home/teamcity/go",JDK_17_0:"/usr/lib/jvm/java-17-amazon-corretto",SHELL:"/bin/bash",TEAMCITY_AGENT_OPTS:"-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../logs/agent_%p.hprof -Dteamcity.internal.hosted.server.technicalName=PREINIT_AGENT",npm_lifecycle_event:"build",npm_package_version:"1.0.20",JDK_1_8_x64:"/usr/lib/jvm/java-1.8.0-amazon-corretto",rvm_loaded_flag:"1",rvm_prefix:"/home/teamcity",GEM_HOME:"/home/teamcity/.rvm/gems/ruby-3.3.7",TURBO_INVOCATION_DIR:"/mnt/agent/work/70fcd8585843667f",JDK_11_0_x64:"/usr/lib/jvm/java-11-amazon-corretto",JDK_21_0_x64:"/usr/lib/jvm/java-21-amazon-corretto",rvm_version:"1.29.12 (latest)",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.14.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",GEM_PATH:"/home/teamcity/.rvm/gems/ruby-3.3.7:/home/teamcity/.rvm/gems/ruby-3.3.7@global",JAVA_HOME:"/usr/lib/jvm/java-21-amazon-corretto",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",TEAMCITY_AGENT_MEM_OPTS:"-Xmx512m",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/bin/npm-cli.js",ANDROID_HOME:"/home/teamcity/android-sdk-linux",JDK_11:"/usr/lib/jvm/java-11-amazon-corretto",TEAMCITY_GIT_VERSION:"2.47.1.0",XDG_DATA_DIRS:"/usr/local/share:/usr/share:/var/lib/snapd/desktop",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.14.0",TEAMCITY_PROCESS_FLOW_ID:"898657134747",npm_command:"run-script",JDK_17_0_x64:"/usr/lib/jvm/java-17-amazon-corretto",rvm_ruby_string:"ruby-3.3.7",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",rvm_path:"/home/teamcity/.rvm",EDITOR:"vi",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",JDK_HOME:"/usr/lib/jvm/java-21-amazon-corretto",rvm_delete_flag:"0",NODE_ENV:"production",APP_NAME:"@wellesley/sentry"};const Km=()=>!!Ym.JEST_WORKER_ID,vi=["debug","info","warn","error"],Vm=(e,t)=>{const n=vi.indexOf(e);return vi.indexOf(t)>=n},Jt=(e,t,n,...r)=>{Vm(t,e)&&console.log(`[${e}] ${n}`,...r)},qm=()=>null==window?void 0:window.localStorage.getItem("logger_lvl"),Jm=(e=!ma()&&qm()||"warn")=>{let t=e;return{debug:(e,...n)=>Jt("debug",t,e,...n),info:(e,...n)=>Jt("info",t,e,...n),warn:(e,...n)=>Jt("warn",t,e,...n),error:(e,...n)=>(va(e,...n),Jt("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},Xm=Jm();var Ii={DISTRIB_RELEASE:"24.04",JDK_18:"/usr/lib/jvm/java-1.8.0-amazon-corretto",TEAMCITY_PROJECT_NAME:"Web Apps",USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.14.0 linux x64 workspaces/false ci/teamcity",rvm_pretty_print_flag:"0",NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS:"20",TEAMCITY_PROCESS_PARENT_FLOW_ID:"",ANDROID_SDK_HOME:"/home/teamcity/android-sdk-linux",DOTNET_CLI_TELEMETRY_OPTOUT:"true",JDK_11_x64:"/usr/lib/jvm/java-11-amazon-corretto",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.14.0/bin/node",SHLVL:"0",npm_config_noproxy:"",BUILD_VCS_NUMBER:"3a72b67929d7dd6a462bc24b987e95205f714acd",HOME:"/home/teamcity",OLDPWD:"/",BUILD_URL:"https://wellesley.teamcity.com/build/15176",JRE_HOME:"/usr/lib/jvm/java-21-amazon-corretto",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",ANDROID_SDKMANAGER_PATH:"/home/teamcity/android-sdk-linux/cmdline-tools/latest/bin/sdkmanager",TEAMCITY_BUILD_PROPERTIES_FILE:"/mnt/agent/temp/buildTmp/teamcity.build.parameters",npm_package_engines_node:">=20.2.0",rvm_stored_umask:"0022",GRADLE_HOME:"/opt/gradle",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",npm_config_userconfig:"/home/teamcity/.npmrc",rvm_user_install_flag:"1",BUILD_VCS_NUMBER_WebApps:"3a72b67929d7dd6a462bc24b987e95205f714acd",GOROOT:"/opt/go",JDK_18_x64:"/usr/lib/jvm/java-1.8.0-amazon-corretto",SYSTEMD_EXEC_PID:"1347",COLOR:"1",TEAMCITY_BUILDCONF_NAME:"Apps",DISTRIB_DESCRIPTION:"Ubuntu 24.04.2 LTS",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"true",TMPDIR:"/mnt/agent/temp/buildTmp",LOGNAME:"teamcity",JOURNAL_STREAM:"8:9625",TEMP:"/mnt/agent/temp/buildTmp",_:"/usr/bin/nohup",npm_config_npm_version:"10.9.2",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.14.0",rvm_bin_path:"/home/teamcity/.rvm/bin",IRBRC:"/home/teamcity/.rvm/rubies/ruby-3.3.7/.irbrc",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/teamcity-agent.service/memory.pressure",P4CONFIG:".p4config",RUBY_VERSION:"ruby-3.3.7",npm_config_cache:"/home/teamcity/.npm",DOTNET_ROOT:"/usr/share/dotnet",JDK_1_8:"/usr/lib/jvm/java-1.8.0-amazon-corretto",MNT_MOUNT:"/dev/nvme1n1 on /mnt type ext4 (rw,noatime)",TEAMCITY_GIT_PATH:"/usr/local/bin/git",AWS_SHARED_CREDENTIALS_FILE:"/mnt/agent/temp/agentTmp/aws.credentials",DISTRIB_ID:"Ubuntu",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.14.0/bin",INVOCATION_ID:"590ade4223074ffc9fe95e97f1514199",JDK_11_0:"/usr/lib/jvm/java-11-amazon-corretto",NODE:"/home/teamcity/.nvm/versions/node/v22.14.0/bin/node",TEAMCITY_CAPTURE_ENV:'"/usr/lib/jvm/java-21-amazon-corretto/bin/java" -jar "/home/teamcity/agent/plugins/environment-fetcher/lib/environment-fetcher-bin-2024.12-174504-jar-with-dependencies.jar"',TURBO_HASH:"ffeb52eb5553bcbd",npm_package_name:"@wellesley/sentry",DISTRIB_CODENAME:"noble",JDK_21_0:"/usr/lib/jvm/java-21-amazon-corretto",npm_config_color:"always",DOMAIN_ENV:"test",MY_RUBY_HOME:"/home/teamcity/.rvm/rubies/ruby-3.3.7",TEAMCITY_VERSION:"2024.12.2 (build 174504)",LANG:"en_US.UTF-8",GROOVY_HOME:"/opt/groovy",TMP:"/mnt/agent/temp/buildTmp",npm_lifecycle_script:"tsc && vite build",BUILD_NUMBER:"2140",NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS:"20",UID:"1001",AWS_PROFILE:"default",GOPATH:"/home/teamcity/go",JDK_17_0:"/usr/lib/jvm/java-17-amazon-corretto",SHELL:"/bin/bash",TEAMCITY_AGENT_OPTS:"-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../logs/agent_%p.hprof -Dteamcity.internal.hosted.server.technicalName=PREINIT_AGENT",npm_lifecycle_event:"build",npm_package_version:"1.0.20",JDK_1_8_x64:"/usr/lib/jvm/java-1.8.0-amazon-corretto",rvm_loaded_flag:"1",rvm_prefix:"/home/teamcity",GEM_HOME:"/home/teamcity/.rvm/gems/ruby-3.3.7",TURBO_INVOCATION_DIR:"/mnt/agent/work/70fcd8585843667f",JDK_11_0_x64:"/usr/lib/jvm/java-11-amazon-corretto",JDK_21_0_x64:"/usr/lib/jvm/java-21-amazon-corretto",rvm_version:"1.29.12 (latest)",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.14.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",GEM_PATH:"/home/teamcity/.rvm/gems/ruby-3.3.7:/home/teamcity/.rvm/gems/ruby-3.3.7@global",JAVA_HOME:"/usr/lib/jvm/java-21-amazon-corretto",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",TEAMCITY_AGENT_MEM_OPTS:"-Xmx512m",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/bin/npm-cli.js",ANDROID_HOME:"/home/teamcity/android-sdk-linux",JDK_11:"/usr/lib/jvm/java-11-amazon-corretto",TEAMCITY_GIT_VERSION:"2.47.1.0",XDG_DATA_DIRS:"/usr/local/share:/usr/share:/var/lib/snapd/desktop",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.14.0",TEAMCITY_PROCESS_FLOW_ID:"898657134747",npm_command:"run-script",JDK_17_0_x64:"/usr/lib/jvm/java-17-amazon-corretto",rvm_ruby_string:"ruby-3.3.7",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",rvm_path:"/home/teamcity/.rvm",EDITOR:"vi",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",JDK_HOME:"/usr/lib/jvm/java-21-amazon-corretto",rvm_delete_flag:"0",NODE_ENV:"production",APP_NAME:"@wellesley/sentry"};const Qm=e=>`${e||"wlsy"}-${Ii.DOMAIN_ENV}#${Ii.BUILD_NUMBER}`;var _a={DISTRIB_RELEASE:"24.04",JDK_18:"/usr/lib/jvm/java-1.8.0-amazon-corretto",TEAMCITY_PROJECT_NAME:"Web Apps",USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.14.0 linux x64 workspaces/false ci/teamcity",rvm_pretty_print_flag:"0",NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS:"20",TEAMCITY_PROCESS_PARENT_FLOW_ID:"",ANDROID_SDK_HOME:"/home/teamcity/android-sdk-linux",DOTNET_CLI_TELEMETRY_OPTOUT:"true",JDK_11_x64:"/usr/lib/jvm/java-11-amazon-corretto",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.14.0/bin/node",SHLVL:"0",npm_config_noproxy:"",BUILD_VCS_NUMBER:"3a72b67929d7dd6a462bc24b987e95205f714acd",HOME:"/home/teamcity",OLDPWD:"/",BUILD_URL:"https://wellesley.teamcity.com/build/15176",JRE_HOME:"/usr/lib/jvm/java-21-amazon-corretto",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",ANDROID_SDKMANAGER_PATH:"/home/teamcity/android-sdk-linux/cmdline-tools/latest/bin/sdkmanager",TEAMCITY_BUILD_PROPERTIES_FILE:"/mnt/agent/temp/buildTmp/teamcity.build.parameters",npm_package_engines_node:">=20.2.0",rvm_stored_umask:"0022",GRADLE_HOME:"/opt/gradle",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",npm_config_userconfig:"/home/teamcity/.npmrc",rvm_user_install_flag:"1",BUILD_VCS_NUMBER_WebApps:"3a72b67929d7dd6a462bc24b987e95205f714acd",GOROOT:"/opt/go",JDK_18_x64:"/usr/lib/jvm/java-1.8.0-amazon-corretto",SYSTEMD_EXEC_PID:"1347",COLOR:"1",TEAMCITY_BUILDCONF_NAME:"Apps",DISTRIB_DESCRIPTION:"Ubuntu 24.04.2 LTS",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"true",TMPDIR:"/mnt/agent/temp/buildTmp",LOGNAME:"teamcity",JOURNAL_STREAM:"8:9625",TEMP:"/mnt/agent/temp/buildTmp",_:"/usr/bin/nohup",npm_config_npm_version:"10.9.2",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.14.0",rvm_bin_path:"/home/teamcity/.rvm/bin",IRBRC:"/home/teamcity/.rvm/rubies/ruby-3.3.7/.irbrc",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/teamcity-agent.service/memory.pressure",P4CONFIG:".p4config",RUBY_VERSION:"ruby-3.3.7",npm_config_cache:"/home/teamcity/.npm",DOTNET_ROOT:"/usr/share/dotnet",JDK_1_8:"/usr/lib/jvm/java-1.8.0-amazon-corretto",MNT_MOUNT:"/dev/nvme1n1 on /mnt type ext4 (rw,noatime)",TEAMCITY_GIT_PATH:"/usr/local/bin/git",AWS_SHARED_CREDENTIALS_FILE:"/mnt/agent/temp/agentTmp/aws.credentials",DISTRIB_ID:"Ubuntu",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.14.0/bin",INVOCATION_ID:"590ade4223074ffc9fe95e97f1514199",JDK_11_0:"/usr/lib/jvm/java-11-amazon-corretto",NODE:"/home/teamcity/.nvm/versions/node/v22.14.0/bin/node",TEAMCITY_CAPTURE_ENV:'"/usr/lib/jvm/java-21-amazon-corretto/bin/java" -jar "/home/teamcity/agent/plugins/environment-fetcher/lib/environment-fetcher-bin-2024.12-174504-jar-with-dependencies.jar"',TURBO_HASH:"ffeb52eb5553bcbd",npm_package_name:"@wellesley/sentry",DISTRIB_CODENAME:"noble",JDK_21_0:"/usr/lib/jvm/java-21-amazon-corretto",npm_config_color:"always",DOMAIN_ENV:"test",MY_RUBY_HOME:"/home/teamcity/.rvm/rubies/ruby-3.3.7",TEAMCITY_VERSION:"2024.12.2 (build 174504)",LANG:"en_US.UTF-8",GROOVY_HOME:"/opt/groovy",TMP:"/mnt/agent/temp/buildTmp",npm_lifecycle_script:"tsc && vite build",BUILD_NUMBER:"2140",NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS:"20",UID:"1001",AWS_PROFILE:"default",GOPATH:"/home/teamcity/go",JDK_17_0:"/usr/lib/jvm/java-17-amazon-corretto",SHELL:"/bin/bash",TEAMCITY_AGENT_OPTS:"-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../logs/agent_%p.hprof -Dteamcity.internal.hosted.server.technicalName=PREINIT_AGENT",npm_lifecycle_event:"build",npm_package_version:"1.0.20",JDK_1_8_x64:"/usr/lib/jvm/java-1.8.0-amazon-corretto",rvm_loaded_flag:"1",rvm_prefix:"/home/teamcity",GEM_HOME:"/home/teamcity/.rvm/gems/ruby-3.3.7",TURBO_INVOCATION_DIR:"/mnt/agent/work/70fcd8585843667f",JDK_11_0_x64:"/usr/lib/jvm/java-11-amazon-corretto",JDK_21_0_x64:"/usr/lib/jvm/java-21-amazon-corretto",rvm_version:"1.29.12 (latest)",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.14.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",GEM_PATH:"/home/teamcity/.rvm/gems/ruby-3.3.7:/home/teamcity/.rvm/gems/ruby-3.3.7@global",JAVA_HOME:"/usr/lib/jvm/java-21-amazon-corretto",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",TEAMCITY_AGENT_MEM_OPTS:"-Xmx512m",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.14.0/lib/node_modules/npm/bin/npm-cli.js",ANDROID_HOME:"/home/teamcity/android-sdk-linux",JDK_11:"/usr/lib/jvm/java-11-amazon-corretto",TEAMCITY_GIT_VERSION:"2.47.1.0",XDG_DATA_DIRS:"/usr/local/share:/usr/share:/var/lib/snapd/desktop",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.14.0",TEAMCITY_PROCESS_FLOW_ID:"898657134747",npm_command:"run-script",JDK_17_0_x64:"/usr/lib/jvm/java-17-amazon-corretto",rvm_ruby_string:"ruby-3.3.7",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",rvm_path:"/home/teamcity/.rvm",EDITOR:"vi",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",JDK_HOME:"/usr/lib/jvm/java-21-amazon-corretto",rvm_delete_flag:"0",NODE_ENV:"production",APP_NAME:"@wellesley/sentry"};const Zm=_a.DOMAIN_ENV;ma()||(window.build=_a.BUILD_NUMBER);const os=()=>!Km(),e_=[Wm(),vo(),to()],t_=({dsn:e,release:t,integrations:n=e_,...r})=>{if(os()&&e)try{Gm({dsn:e,integrations:n,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,release:Qm(t),environment:Zm,maxValueLength:1024,...r})}catch(e){return void Xm.error("Sentry init error: ",e)}},ga=e=>{if(os()&&e){const{email:t,username:n,userId:r}=e;au({email:t,username:n,id:r})}},o_=Object.freeze(Object.defineProperty({__proto__:null,init:t_,isEnabled:os,setUser:ga},Symbol.toStringTag,{value:"Module"})),Ti={data:null,isError:!1,isPending:!1,isSuccess:!1},wi=wa({name:"user",initialState:Ti,reducers:{reset:e=>{Object.assign(e,Ti)},setData:(e,{payload:t})=>{e.data=t},updateData:(e,{payload:t})=>{e.data&&Object.assign(e.data,t)},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setPending:(e,{payload:t})=>{e.isPending=t},setIsError:(e,{payload:t})=>{e.isError=t},setError:(e,{payload:t})=>{e.error=t},updateUser:(e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess,selectIsAdmin:e=>{var t;return"ADMIN"===(null==(t=e.data)?void 0:t.account.role)}}}),a_=()=>{const e=ls(wi.selectors.selectAccount),t=ls(wi.selectors.selectCurrentUser),{email:n}=e||{},{username:r,id:s}=t||{};Ta((()=>{n&&r&&s&&ga({email:n,username:r,userId:s})}),[n,r,s])},c_=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return ou("exceptionMessage",t),void Fr(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}iu(t)};export{c_ as logErrorToSentry,o_ as sentryClient,a_ as useSentryUser};
|
|
1
|
+
function Zo(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const kr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,lt="8.48.0",ie=globalThis;function pn(e,t,n){const r=ie,s=r.__SENTRY__=r.__SENTRY__||{},o=s[lt]=s[lt]||{};return o[e]||(o[e]=t())}const Ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ea="Sentry Logger ",rs=["debug","info","warn","error","log","assert","trace"],ss={};function Ir(e){if(!("console"in ie))return e();const t=ie.console,n={},r=Object.keys(ss);r.forEach((e=>{const r=ss[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function ta(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ct?rs.forEach((n=>{t[n]=(...t)=>{e&&Ir((()=>{ie.console[n](`${ea}[${n}]:`,...t)}))}})):rs.forEach((e=>{t[e]=()=>{}})),t}const ce=pn("logger",ta),Pn="<anonymous>";function Oe(e){try{return e&&"function"==typeof e&&e.name||Pn}catch{return Pn}}function is(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}const Xt={},os={};function yi(e,t){Xt[e]=Xt[e]||[],Xt[e].push(t)}function _i(e,t){if(!os[e]){os[e]=!0;try{t()}catch(t){Ct&&ce.error(`Error while instrumenting ${e}`,t)}}}function Jn(e,t){const n=e&&Xt[e];if(n)for(const r of n)try{r(t)}catch(t){Ct&&ce.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Oe(r)}\nError:`,t)}}function Tt(){return Cr(ie),ie}function Cr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||lt,t[lt]=t[lt]||{}}const Si=Object.prototype.toString;function na(e){switch(Si.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return mn(e,Error)}}function Tr(e,t){return Si.call(e)===`[object ${t}]`}function Zt(e){return Tr(e,"String")}function Rr(e){return Tr(e,"Object")}function ra(e){return typeof Event<"u"&&mn(e,Event)}function sa(e){return typeof Element<"u"&&mn(e,Element)}function ia(e){return Tr(e,"RegExp")}function Mr(e){return!(!e||!e.then||"function"!=typeof e.then)}function oa(e){return Rr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function mn(e,t){try{return e instanceof t}catch{return!1}}function aa(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Ei=ie,ca=80;function xr(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(u=ua(n,l),!("html"===u||o>1&&i+s.length*c+u.length>=d));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function ua(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Ei.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(s&&s.length)s.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&Zt(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function la(){try{return Ei.document.location.href}catch{return""}}function Fn(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function da(e,t,n=!1){return!!Zt(e)&&(ia(t)?t.test(e):!!Zt(t)&&(n?e===t:e.includes(t)))}function fa(e,t=[],n=!1){return t.some((t=>da(e,t,n)))}function me(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);"function"==typeof s&&bi(s,r);try{e[t]=s}catch{Ct&&ce.log(`Failed to replace method "${t}" in object`,e)}}function gt(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ct&&ce.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function bi(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,gt(e,"__sentry_original__",t)}catch{}}function vi(e){return e.__sentry_original__}function ha(e){if(na(e))return{message:e.message,name:e.name,stack:e.stack,...cs(e)};if(ra(e)){const t={type:e.type,target:as(e.target),currentTarget:as(e.currentTarget),...cs(e)};return typeof CustomEvent<"u"&&mn(e,CustomEvent)&&(t.detail=e.detail),t}return e}function as(e){try{return sa(e)?xr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function cs(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Ee(e){return Qn(e,new Map)}function Qn(e,t){if(pa(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))typeof e[n]<"u"&&(r[n]=Qn(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(Qn(e,t))})),r}return e}function pa(e){if(!Rr(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}const wi=1e3;function gn(){return Date.now()/wi}function ma(){const{performance:e}=ie;if(!e||!e.now)return gn;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/wi}const ki=ma(),ga=(()=>{const{performance:e}=ie;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,a="number"==typeof i?Math.abs(i+n-r):t;return o||a<t?s<=a?e.timeOrigin:i:r})();function Me(){const e=ie,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function ya(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function _a(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=""),o.type||(o.type="Error")}function Ii(e,t){const n=ya(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}var Ie;function us(e){return new Re((t=>{t(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Ie||(Ie={}));class Re{constructor(e){Re.prototype.__init.call(this),Re.prototype.__init2.call(this),Re.prototype.__init3.call(this),Re.prototype.__init4.call(this),this._state=Ie.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Re(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new Re(((t,n)=>{let r,s;return this.then((t=>{s=!1,r=t,e&&e()}),(t=>{s=!0,r=t,e&&e()})).then((()=>{s?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(Ie.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Ie.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Ie.PENDING){if(Mr(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ie.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===Ie.RESOLVED&&e[1](this._value),this._state===Ie.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function Sa(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||ki(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Me()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const 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),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ls(){return Me()}function Zn(){return Me().substring(16)}function yn(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=yn(r[e],t[e],n-1));return r}const er="_sentrySpan";function ds(e,t){t?gt(e,er,t):delete e[er]}function tr(e){return e[er]}const Ea=100;class Or{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ls(),spanId:Zn()}}clone(){const e=new Or;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,ds(e,tr(this)),e}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&&Sa(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},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 null===t?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(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof We?[t.getScopeData(),t.getRequestSession()]:Rr(t)?[e,e.requestSession]:[],{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l}=n||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,ds(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ls()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:Ea;if(n<=0)return this;const r={timestamp:gn(),...e},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>n?s.slice(-n):s,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,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:tr(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=yn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Zn(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Me();if(!this._client)return ce.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Me();if(!this._client)return ce.warn("No client configured on scope - will not capture message!"),r;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Me();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ce.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const We=Or;function ba(){return pn("defaultCurrentScope",(()=>new We))}function va(){return pn("defaultIsolationScope",(()=>new We))}class wa{constructor(e,t){let n,r;n=e||new We,r=t||new We,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return Mr(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(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(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Ze(){const e=Cr(Tt());return e.stack=e.stack||new wa(ba(),va())}function ka(e){return Ze().withScope(e)}function Ia(e,t){const n=Ze();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function fs(e){return Ze().withScope((()=>e(Ze().getIsolationScope())))}function Ca(){return{withIsolationScope:fs,withScope:ka,withSetScope:Ia,withSetIsolationScope:(e,t)=>fs(t),getCurrentScope:()=>Ze().getScope(),getIsolationScope:()=>Ze().getIsolationScope()}}function _n(e){const t=Cr(e);return t.acs?t.acs:Ca()}function at(){return _n(Tt()).getCurrentScope()}function Rt(){return _n(Tt()).getIsolationScope()}function Ta(){return pn("globalScope",(()=>new We))}function Ra(...e){const t=_n(Tt());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function we(){return at().getClient()}const Ma="_sentryMetrics";function xa(e){const t=e[Ma];if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(Ee(r));return n}const Ci="sentry.source",Oa="sentry.sample_rate",Aa="sentry.op",Da="sentry.origin",Na=0,La=1,Pa="sentry-",Fa=/^sentry-/;function Ua(e){const t=Ba(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(Fa)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function Ba(e){if(e&&(Zt(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=hs(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):hs(e)}function hs(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const za=1;function ja(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return Ee({parent_span_id:r?t:yt(e).parent_span_id,span_id:r?Zn():t,trace_id:n})}function ps(e){return"number"==typeof e?ms(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ms(e.getTime()):ki()}function ms(e){return e>9999999999?e/1e3:e}function yt(e){if(Ha(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if($a(e)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:a,status:c}=e;return Ee({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:ps(s),timestamp:ps(i)||void 0,status:qa(c),op:r[Aa],origin:r[Da],_metrics_summary:xa(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function $a(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function Ha(e){return"function"==typeof e.getSpanJSON}function Wa(e){const{traceFlags:t}=e.spanContext();return 1===t}function qa(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Va="_sentryRootSpan";function Ar(e){return e[Va]||e}function Ti(){const e=_n(Tt());return e.getActiveSpan?e.getActiveSpan():tr(at())}function Ga(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=we(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const Ri="production",Ya="_frozenDsc";function Ka(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=Ee({environment:n.environment||Ri,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function Mi(e){const t=we();if(!t)return{};const n=Ar(e),r=n[Ya];if(r)return r;const s=n.spanContext().traceState,o=s&&s.get("sentry.dsc"),i=o&&Ua(o);if(i)return i;const a=Ka(e.spanContext().traceId,t),c=yt(n),u=c.data||{},l=u[Oa];null!=l&&(a.sample_rate=`${l}`);const d=u[Ci],p=c.description;return"url"!==d&&p&&(a.transaction=p),Ga()&&(a.sampled=String(Wa(n))),t.emit("createDsc",a,n),a}function gs(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;kr&&ce.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}function Xa(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Ja(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}function Ce(e,t=100,n=1/0){try{return nr("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function nr(e,t,n=1/0,r=1/0,s=Ja()){const[o,i]=s;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=Qa(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&"function"==typeof u.toJSON)try{return nr("",u.toJSON(),c-1,r,s)}catch{}const l=Array.isArray(t)?[]:{};let d=0;const p=ha(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){l[e]="[MaxProperties ~]";break}const t=p[e];l[e]=nr(e,t,c-1,r,s),d++}return i(t),l}function Qa(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(aa(t))return"[VueViewModel]";if(oa(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Oe(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=Za(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function Za(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function ec(e,t=[]){return[e,t]}function tc(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function nc(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Xa(r)},...s&&{trace:Ee({...s})}}}function rr(e,t,n,r=0){return new Re(((s,o)=>{const i=e[r];if(null===t||"function"!=typeof i)s(t);else{const a=i({...t},n);kr&&i.id&&null===a&&ce.log(`Event processor "${i.id}" dropped event`),Mr(a)?a.then((t=>rr(e,t,n,r+1).then(s))).then(null,o):rr(e,a,n,r+1).then(s).then(null,o)}}))}let Ft,ys,Ut;function rc(e){const t=ie._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Ut&&n.length===ys||(ys=n.length,Ut=n.reduce(((n,r)=>{Ft||(Ft={});const s=Ft[r];if(s)n[s[0]]=s[1];else{const s=e(r);for(let e=s.length-1;e>=0;e--){const o=s[e],i=o&&o.filename,a=t[r];if(i&&a){n[i]=a,Ft[r]=[i,a];break}}}return n}),{})),Ut}function sc(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;ic(e,t),r&&cc(e,r),uc(e,n),oc(e,s),ac(e,o)}function _s(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:f}=t;Bt(e,"extra",n),Bt(e,"tags",r),Bt(e,"user",s),Bt(e,"contexts",o),e.sdkProcessingMetadata=yn(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Bt(e,t,n){e[t]=yn(e[t],n,1)}function ic(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=Ee(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=Ee(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const l=Ee(s);l&&Object.keys(l).length&&(e.user={...l,...e.user});const d=Ee(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&"transaction"!==e.type&&(e.transaction=a)}function oc(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ac(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function cc(e,t){e.contexts={trace:ja(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Mi(t),...e.sdkProcessingMetadata};const n=yt(Ar(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}function uc(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function lc(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Me(),timestamp:t.timestamp||gn()},u=n.integrations||e.integrations.map((e=>e.name));dc(c,e),pc(c,u),s&&s.emit("applyFrameMetadata",t),void 0===t.type&&fc(c,e.stackParser);const l=gc(r,n.captureContext);n.mechanism&&Ii(c,n.mechanism);const d=s?s.getEventProcessors():[],p=Ta().getScopeData();if(o){_s(p,o.getScopeData())}if(l){_s(p,l.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),sc(c,p);return rr([...d,...p.eventProcessors],c,n).then((e=>(e&&hc(e),"number"==typeof i&&i>0?mc(e,i,a):e)))}function dc(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;e.environment=e.environment||n||Ri,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s),e.message&&(e.message=Fn(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=Fn(i.value,o));const a=e.request;a&&a.url&&(a.url=Fn(a.url,o))}function fc(e,t){const n=rc(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}function hc(e){const t={};try{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)}))}))}catch{}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function pc(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function mc(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Ce(e.data,t,n)}})))},...e.user&&{user:Ce(e.user,t,n)},...e.contexts&&{contexts:Ce(e.contexts,t,n)},...e.extra&&{extra:Ce(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ce(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:Ce(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Ce(e.contexts.flags,3,n)),r}function gc(e,t){if(!t)return e;const n=e?e.clone():new We;return n.update(t),n}function Dr(e,t){return at().captureException(e,void 0)}function yc(e,t){const n={captureContext:t};return at().captureMessage(e,void 0,n)}function _c(e,t){Rt().setContext(e,t)}function Sc(e,t){Rt().setExtra(e,t)}function Ec(e){Rt().addEventProcessor(e)}const bc=6e4;function vc(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?bc:r-t}function wc(e,t){return e[t]||e.all||0}function kc(e,t,n=Date.now()){return wc(e,t)>n}function Ic(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(s[e]=r+a):s[e]=r+a;else s.all=r+a}else i?s.all=r+vc(i,r):429===t&&(s.all=r+6e4);return s}function Cc(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Rc(e,n)||Tc(e,r)}function Tc(e,t){return!!t&&Ss(e)===Ss(t)}function Rc(e,t){return!!t&&e.includes(t.host)}function Ss(e){return"/"===e[e.length-1]?e.slice(0,-1):e}const Mc=100;function xc(e,t){const n=we(),r=Rt();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Mc}=n.getOptions();if(o<=0)return;const i={timestamp:gn(),...e},a=s?Ir((()=>s(i,t))):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}function Oc(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Ac="Dedupe",Dc=()=>{let e;return{name:Ac,processEvent(t){if(t.type)return t;try{if(Lc(t,e))return kr&&ce.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Nc=Dc;function Lc(e,t){return!!t&&!(!Pc(e,t)&&!Fc(e,t))}function Pc(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Oi(e,t)||!xi(e,t))}function Fc(e,t){const n=Es(t),r=Es(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&Oi(e,t)&&xi(e,t))}function xi(e,t){let n=is(e),r=is(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],s=n[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function Oi(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Es(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Uc(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Bc(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function zc(){return!Bc()&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function bs(){return typeof window<"u"&&(!zc()||jc())}function jc(){const e=ie.process;return!!e&&"renderer"===e.type}const zt=ie;function $c(){const e=zt.chrome,t=e&&e.app&&e.app.runtime,n="history"in zt&&!!zt.history.pushState&&!!zt.history.replaceState;return!t&&n}function Hc(e,t){return e??t()}function Jt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const ut=ie;function Wc(){setTimeout((()=>{}))}function et(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(vi(e))return e}catch{return e}const n=function(...n){try{const r=n.map((e=>et(e,t)));return e.apply(this,r)}catch(e){throw Wc(),Ra((r=>{r.addEventProcessor((e=>(t.mechanism&&(_a(e),Ii(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),Dr(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}bi(n,e),gt(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Ai=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qc=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Mt=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s||0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=qc(t.value,n),e(t)))}},N=ie,Vc=()=>`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,Di=(e=!0)=>{const t=N.performance&&N.performance.getEntriesByType&&N.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Nr=()=>{const e=Di();return e&&e.activationStart||0},xt=(e,t)=>{const n=Di();let r="navigate";return n&&(N.document&&N.document.prerendering||Nr()>0?r="prerender":N.document&&N.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Vc(),navigationType:r}},Ve=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Ot=e=>{const t=t=>{("pagehide"===t.type||N.document&&"hidden"===N.document.visibilityState)&&e(t)};N.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Sn=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let dt=-1;const Gc=()=>"hidden"!==N.document.visibilityState||N.document.prerendering?1/0:0,en=e=>{"hidden"===N.document.visibilityState&&dt>-1&&(dt="visibilitychange"===e.type?e.timeStamp:0,Kc())},Yc=()=>{addEventListener("visibilitychange",en,!0),addEventListener("prerenderingchange",en,!0)},Kc=()=>{removeEventListener("visibilitychange",en,!0),removeEventListener("prerenderingchange",en,!0)},Lr=()=>(N.document&&dt<0&&(dt=Gc(),Yc()),{get firstHiddenTime(){return dt}}),En=e=>{N.document&&N.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Xc=[1800,3e3],Jc=(e,t={})=>{En((()=>{const n=Lr(),r=xt("FCP");let s;const o=Ve("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Nr(),0),r.entries.push(e),s(!0)))}))}));o&&(s=Mt(e,r,Xc,t.reportAllChanges))}))},Qc=[.1,.25],Zc=(e,t={})=>{Jc(Sn((()=>{const n=xt("CLS",0);let r,s=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];s&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,o.push(e)):(s=e.value,o=[e])}})),s>n.value&&(n.value=s,n.entries=o,r())},a=Ve("layout-shift",i);a&&(r=Mt(e,n,Qc,t.reportAllChanges),Ot((()=>{i(a.takeRecords()),r(!0)})),setTimeout(r,0))})))},eu=[100,300],tu=(e,t={})=>{En((()=>{const n=Lr(),r=xt("FID");let s;const o=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),s(!0))},i=e=>{e.forEach(o)},a=Ve("first-input",i);s=Mt(e,r,eu,t.reportAllChanges),a&&Ot(Sn((()=>{i(a.takeRecords()),a.disconnect()})))}))};let Ni=0,Un=1/0,jt=0;const nu=e=>{e.forEach((e=>{e.interactionId&&(Un=Math.min(Un,e.interactionId),jt=Math.max(jt,e.interactionId),Ni=jt?(jt-Un)/7+1:0)}))};let sr;const ru=()=>sr?Ni:performance.interactionCount||0,su=()=>{"interactionCount"in performance||sr||(sr=Ve("event",nu,{type:"event",buffered:!0,durationThreshold:0}))},Te=[],Bn=new Map,iu=40;let ou=0;const au=()=>ru()-ou,cu=()=>{const e=Math.min(Te.length-1,Math.floor(au()/50));return Te[e]},zn=10,uu=[],lu=e=>{if(uu.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const t=Te[Te.length-1],n=Bn.get(e.interactionId);if(n||Te.length<10||t&&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]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};Bn.set(t.id,t),Te.push(t)}Te.sort(((e,t)=>t.latency-e.latency)),Te.length>10&&Te.splice(10).forEach((e=>Bn.delete(e.id)))}},Li=e=>{const t=N.requestIdleCallback||N.setTimeout;let n=-1;return e=Sn(e),N.document&&"hidden"===N.document.visibilityState?e():(n=t(e),Ot(e)),n},du=[200,500],fu=(e,t={})=>{"PerformanceEventTiming"in N&&"interactionId"in PerformanceEventTiming.prototype&&En((()=>{su();const n=xt("INP");let r;const s=e=>{Li((()=>{e.forEach(lu);const t=cu();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},o=Ve("event",s,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=Mt(e,n,du,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),Ot((()=>{s(o.takeRecords()),r(!0)})))}))},hu=[2500,4e3],vs={},pu=(e,t={})=>{En((()=>{const n=Lr(),r=xt("LCP");let s;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Nr(),0),r.entries=[e],s())}))},i=Ve("largest-contentful-paint",o);if(i){s=Mt(e,r,hu,t.reportAllChanges);const n=Sn((()=>{vs[r.id]||(o(i.takeRecords()),i.disconnect(),vs[r.id]=!0,s(!0))}));["keydown","click"].forEach((e=>{N.document&&addEventListener(e,(()=>Li(n)),{once:!0,capture:!0})})),Ot(n)}}))},ft={},tn={};let Pi,Fi,Ui,Bi;function mu(e,t=!1){return bn("cls",e,Eu,Pi,t)}function gu(e,t=!1){return bn("lcp",e,vu,Ui,t)}function yu(e){return bn("fid",e,bu,Fi)}function _u(e){return bn("inp",e,wu,Bi)}function Su(e,t){return zi(e,t),tn[e]||(ku(e),tn[e]=!0),ji(e,t)}function At(e,t){const n=ft[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){Ai&&ce.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Oe(r)}\nError:`,t)}}function Eu(){return Zc((e=>{At("cls",{metric:e}),Pi=e}),{reportAllChanges:!0})}function bu(){return tu((e=>{At("fid",{metric:e}),Fi=e}))}function vu(){return pu((e=>{At("lcp",{metric:e}),Ui=e}),{reportAllChanges:!0})}function wu(){return fu((e=>{At("inp",{metric:e}),Bi=e}))}function bn(e,t,n,r,s=!1){let o;return zi(e,t),tn[e]||(o=n(),tn[e]=!0),r&&t({metric:r}),ji(e,t,s?o:void 0)}function ku(e){const t={};"event"===e&&(t.durationThreshold=0),Ve(e,(t=>{At(e,{entries:t})}),t)}function zi(e,t){ft[e]=ft[e]||[],ft[e].push(t)}function ji(e,t,n){return()=>{n&&n();const r=ft[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}const Iu=1e3;let ws,ir,or,$t;function Cu(e){yi("dom",e),_i("dom",Tu)}function Tu(){if(!N.document)return;const e=Jn.bind(null,"dom"),t=ks(e,!0);N.document.addEventListener("click",t,!1),N.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=N[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(me(r,"addEventListener",(function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=ks(e);o.handler=r,t.call(this,n,r,s)}o.refCount++}catch{}return t.call(this,n,r,s)}})),me(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function Ru(e){if(e.type!==ir)return!1;try{if(!e.target||e.target._sentryId!==or)return!1}catch{}return!0}function Mu(e,t){return"keypress"===e&&(!t||!t.tagName||!("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}function ks(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=xu(n);if(Mu(n.type,r))return;gt(n,"_sentryCaptured",!0),r&&!r._sentryId&>(r,"_sentryId",Me());const s="keypress"===n.type?"input":n.type;Ru(n)||(e({event:n,name:s,global:t}),ir=n.type,or=r?r._sentryId:void 0),clearTimeout(ws),ws=N.setTimeout((()=>{or=void 0,ir=void 0}),Iu)}}function xu(e){try{return e.target}catch{return null}}function Ou(e){const t="history";yi(t,e),_i(t,Au)}function Au(){if(!$c())return;const e=N.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=$t,t=String(n);$t=t,Jn("history",{from:e,to:t})}return e.apply(this,t)}}N.onpopstate=function(...t){const n=N.location.href,r=$t;if($t=n,Jn("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},me(N.history,"pushState",t),me(N.history,"replaceState",t)}const jn={};function Du(e){const t=jn[e];if(t)return t;let n=N[e];if(Uc(n))return jn[e]=n.bind(N);const r=N.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(t)}catch(t){Ai&&ce.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(jn[e]=n.bind(N))}function tt(...e){return Du("setTimeout")(...e)}const Nu="__sentry_xhr_v3__",Lu=["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"],Pu="BrowserApiErrors",Fu=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Pu,setupOnce(){t.setTimeout&&me(ut,"setTimeout",Is),t.setInterval&&me(ut,"setInterval",Is),t.requestAnimationFrame&&me(ut,"requestAnimationFrame",Bu),t.XMLHttpRequest&&"XMLHttpRequest"in ut&&me(XMLHttpRequest.prototype,"send",zu);const e=t.eventTarget;e&&(Array.isArray(e)?e:Lu).forEach(ju)}}},Uu=Fu;function Is(e){return function(...t){const n=t[0];return t[0]=et(n,{mechanism:{data:{function:Oe(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Bu(e){return function(t){return e.apply(this,[et(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Oe(e)},handled:!1,type:"instrument"}})])}}function zu(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&me(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Oe(t)},handled:!1,type:"instrument"}},r=vi(t);return r&&(n.mechanism.data.handler=Oe(r)),et(t,n)}))})),e.apply(this,t)}}function ju(e){const t=ut[e],n=t&&t.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(me(n,"addEventListener",(function(t){return function(n,r,s){try{$u(r)&&(r.handleEvent=et(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Oe(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,et(r,{mechanism:{data:{function:"addEventListener",handler:Oe(r),target:e},handled:!1,type:"instrument"}}),s])}})),me(n,"removeEventListener",(function(e){return function(t,n,r){try{const s=n.__sentry_wrapped__;s&&e.call(this,t,s,r)}catch{}return e.call(this,t,n,r)}})))}function $u(e){return"function"==typeof e.handleEvent}const X=ie,Pr="sentryReplaySession",Hu="replay_event",Fr="Unable to send Replay",Wu=3e5,qu=9e5,Vu=5e3,Gu=5500,Yu=6e4,Ku=5e3,Xu=3,Cs=15e4,Ht=5e3,Ju=3e3,Qu=300,Ur=2e7,Zu=4999,el=15e3,Ts=36e5;function ar(e,t){return e??t()}function _t(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}var re;function tl(e){return e.nodeType===e.ELEMENT_NODE}function ht(e){const t=_t([e,"optionalAccess",e=>e.host]);return _t([t,"optionalAccess",e=>e.shadowRoot])===e}function pt(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function nl(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 rl(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const 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 nn(e){try{const t=e.rules||e.cssRules;return t?nl(Array.from(t,$i).join("")):null}catch{return null}}function sl(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],o=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function $i(e){let t;if(ol(e))try{t=nn(e.styleSheet)||rl(e)}catch{}else if(al(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=sl(e)),n&&(t=il(t)),n||r)return t}return t||e.cssText}function il(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function ol(e){return"styleSheet"in e}function al(e){return"selectorText"in e}!function(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"}(re||(re={}));class Hi{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return ar(_t([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),(()=>-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){const t=this.getId(e);this.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){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const 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 cl(){return new Hi}function vn({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function St({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function nt(e){return e.toLowerCase()}function cr(e){return e.toUpperCase()}const Rs="__rrweb_original__";function ul(e){const 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){const s=t.getImageData,o=Rs in s?s[Rs]:s;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0}function Br(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?nt(t):null}function rn(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Wi(e,t){let n;try{n=new URL(e,ar(t,(()=>window.location.href)))}catch{return null}return ar(_t([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),(()=>null))}const Ms={};function qi(e){const t=Ms[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return Ms[e]=r.bind(window)}function ur(...e){return qi("setTimeout")(...e)}function Vi(...e){return qi("clearTimeout")(...e)}function Gi(e){try{return e.contentDocument}catch{}}let ll=1;const dl=new RegExp("[^a-z0-9-_:]"),Et=-2;function zr(){return ll++}function fl(e){if(e instanceof HTMLFormElement)return"form";const t=nt(e.tagName);return dl.test(t)?"div":t}function hl(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}let Ge,xs;const pl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ml=/^(?:[a-z+]+:)?\/\//i,gl=/^www\..*/i,yl=/^(data:)([^,]*),(.*)/i;function sn(e,t){return(e||"").replace(pl,((e,n,r,s,o,i)=>{const a=r||o||i,c=n||s||"";if(!a)return e;if(ml.test(a)||gl.test(a))return`url(${c}${a}${c})`;if(yl.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${hl(t)+a}${c})`;const u=t.split("/"),l=a.split("/");u.pop();for(const e of l)"."!==e&&(".."===e?u.pop():u.push(e));return`url(${c}${u.join("/")}${c})`}))}const _l=/^[^ \t\n\r\u000c]+/,Sl=/^[, \t\n\r\u000c]+/;function El(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const s=e.exec(t.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(Sl),!(n>=t.length);){let o=r(_l);if(","===o.slice(-1))o=Ke(e,o.substring(0,o.length-1)),s.push(o);else{let r="";o=Ke(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){s.push((o+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,s.push((o+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return s.join(", ")}const Os=new WeakMap;function Ke(e,t){return t&&""!==t.trim()?wn(e,t):t}function bl(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function wn(e,t){let n=Os.get(e);if(n||(n=e.createElement("a"),Os.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Yi(e,t,n,r,s,o){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t)?Ke(e,r):"srcset"===n?El(e,r):"style"===n?sn(r,wn(e)):"object"===t&&"data"===n?Ke(e,r):"function"==typeof o?o(n,r,s):r)}function Ki(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function vl(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function wl(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function He(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:He(e.parentNode,t,n,r+1)}function Xe(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(wl(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function rt(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(o){if(c=He(i,Xe(r,s)),c<0)return!0;a=He(i,Xe(t,n),c>=0?c:1/0)}else{if(a=He(i,Xe(t,n)),a<0)return!1;c=He(i,Xe(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!o}catch{}return!!o}function kl(e,t,n){const r=e.contentWindow;if(!r)return;let s,o=!1;try{s=r.document.readyState}catch{return}if("complete"!==s){const r=ur((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{Vi(r),o=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return ur(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Il(e,t,n){let r,s=!1;try{r=e.sheet}catch{return}if(r)return;const o=ur((()=>{s||(t(),s=!0)}),n);e.addEventListener("load",(()=>{Vi(o),s=!0,t()}))}function Cl(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:S,newlyAddedElement:b=!1}=t,k=Tl(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:re.Document,childNodes:[],compatMode:e.compatMode}:{type:re.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:re.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return Ml(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:f,maskInputFn:y,dataURLOptions:g,inlineImages:_,recordCanvas:v,keepIframeSrcFn:S,newlyAddedElement:b,rootId:k,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return Rl(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:f,maskInputFn:y,rootId:k});case e.CDATA_SECTION_NODE:return{type:re.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:re.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function Tl(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}function Rl(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,f="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||_t([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=nn(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=sn(p,wn(t.doc))}f&&(p="SCRIPT_PLACEHOLDER");const y=rt(e,r,o,s,i,n);if(!h&&!f&&!m&&p&&y&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(c.textarea||y)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p){p=St({isMasked:rt(e,r,o,s,i,vn({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:u})}return{type:re.Text,textContent:p||"",isStyle:h,rootId:l}}function Ml(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m,maskAllText:y,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:S}=t,b=vl(e,r,s,o),k=fl(e);let w={};const E=e.attributes.length;for(let t=0;t<E;t++){const r=e.attributes[t];r.name&&!Ki(k,r.name,r.value)&&(w[r.name]=Yi(n,k,nt(r.name),r.value,e,c))}if("link"===k&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=nn(t)),r&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=sn(r,t.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=nn(e.sheet);t&&(w._cssText=sn(t,wn(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const t=e,n=Br(t),r=rn(t,cr(k),n),s=t.checked;if("submit"!==n&&"button"!==n&&r){const e=rt(t,g,v,_,S,vn({type:n,tagName:cr(k),maskInputOptions:a}));w.value=St({isMasked:e,element:t,value:r,maskInputFn:u})}s&&(w.checked=s)}if("option"===k&&(e.selected&&!a.select?w.selected=!0:delete w.selected),"canvas"===k&&p)if("2d"===e.__context)ul(e)||(w.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(w.rr_dataURL=t)}if("img"===k&&d){Ge||(Ge=n.createElement("canvas"),xs=Ge.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",s=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Ge.width=t.naturalWidth,Ge.height=t.naturalHeight,xs.drawImage(t,0,0),w.rr_dataURL=Ge.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(s?w.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if(("audio"===k||"video"===k)&&(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime),f||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),b){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}let C;"iframe"===k&&!h(w.src)&&(!b&&!Gi(e)&&(w.rr_src=w.src),delete w.src);try{customElements.get(k)&&(C=!0)}catch{}return{type:re.Element,tagName:k,attributes:w,childNodes:[],isSVG:bl(e)||void 0,needBlock:b,rootId:m,isCustom:C}}function K(e){return null==e?"":e.toLowerCase()}function xl(e,t){if(t.comment&&e.type===re.Comment)return!0;if(e.type===re.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Wi(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(K(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===K(e.attributes.name)||"icon"===K(e.attributes.rel)||"apple-touch-icon"===K(e.attributes.rel)||"shortcut icon"===K(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&K(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(K(e.attributes.property).match(/^(og|twitter|fb):/)||K(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===K(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===K(e.attributes.name)||"googlebot"===K(e.attributes.name)||"bingbot"===K(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===K(e.attributes.name)||"generator"===K(e.attributes.name)||"framework"===K(e.attributes.name)||"publisher"===K(e.attributes.name)||"progid"===K(e.attributes.name)||K(e.attributes.property).match(/^article:/)||K(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===K(e.attributes.name)||"yandex-verification"===K(e.attributes.name)||"csrf-token"===K(e.attributes.name)||"p:domain_verify"===K(e.attributes.name)||"verify-v1"===K(e.attributes.name)||"verification"===K(e.attributes.name)||"shopify-checkout-api-token"===K(e.attributes.name)))return!0}}return!1}function Je(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v={},inlineImages:S=!1,recordCanvas:b=!1,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:E=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:M=!0}=t;const R=Cl(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:v,inlineImages:S,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:I});if(!R)return console.warn(e,"not serialized"),null;let O;O=r.hasNode(e)?r.getId(e):xl(R,_)||!M&&R.type===re.Text&&!R.isStyle&&!R.textContent.replace(/^\s+|\s+$/gm,"").length?-2:zr();const A=Object.assign(R,{id:O});if(r.add(e,A),-2===O)return null;k&&k(e);let D=!p;if(A.type===re.Element){D=D&&!A.needBlock,delete A.needBlock;const t=e.shadowRoot;t&&pt(t)&&(A.isShadowHost=!0)}if((A.type===re.Document||A.type===re.Element)&&D){_.headWhitespace&&A.type===re.Element&&"head"===A.tagName&&(M=!1);const t={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v,inlineImages:S,recordCanvas:b,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:x};for(const n of Array.from(e.childNodes)){const e=Je(n,t);e&&A.childNodes.push(e)}if(tl(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Je(n,t);r&&(pt(e.shadowRoot)&&(r.isShadow=!0),A.childNodes.push(r))}}return e.parentNode&&ht(e.parentNode)&&pt(e.parentNode)&&(A.isShadow=!0),A.type===re.Element&&"iframe"===A.tagName&&kl(e,(()=>{const t=Gi(e);if(t&&w){const n=Je(t,{doc:t,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v,inlineImages:S,recordCanvas:b,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:x});n&&w(e,n)}}),E),A.type===re.Element&&"link"===A.tagName&&"string"==typeof A.attributes.rel&&("stylesheet"===A.attributes.rel||"preload"===A.attributes.rel&&"string"==typeof A.attributes.href&&"css"===Wi(A.attributes.href))&&Il(e,(()=>{if(C){const t=Je(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v,inlineImages:S,recordCanvas:b,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:x});t&&C(e,t)}}),T),A}function Ol(e,t){const{mirror:n=new Hi,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:S,onSerialize:b,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:T=()=>!1}=t;return Je(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===f?{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}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:S,onSerialize:b,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:T,newlyAddedElement:!1})}function De(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function ae(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ye="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let As={map:{},getId:()=>(console.error(Ye),-1),getNode:()=>(console.error(Ye),null),removeNodeFromMap(){console.error(Ye)},has:()=>(console.error(Ye),!1),reset(){console.error(Ye)}};function bt(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&!1===n.leading&&(s=i);const a=t-(i-s),c=this;a<=0||a>t?(r&&(Ul(r),r=null),s=i,e.apply(c,o)):!r&&!1!==n.trailing&&(r=kn((()=>{s=!1===n.leading?0:Date.now(),r=null,e.apply(c,o)}),a))}}function Xi(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(e){kn((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>Xi(e,t,o||{},!0)}function jr(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(As=new Proxy(As,{get:(e,t,n)=>("map"===t&&console.error(Ye),Reflect.get(e,t,n))}));let on=Date.now;function Ji(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:De([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||De([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||De([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:De([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||De([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||De([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function Qi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Zi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function eo(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function de(e,t,n,r,s){if(!e)return!1;const o=eo(e);if(!o)return!1;const i=Xe(t,n);if(!s){const e=r&&o.matches(r);return i(o)&&!e}const a=He(o,i);let c=-1;return!(a<0)&&(r&&(c=He(o,Xe(null,r))),a>-1&&c<0||a<c)}function Al(e,t){return-1!==t.getId(e)}function $n(e,t){return-2===t.getId(e)}function to(e,t){if(ht(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||to(e.parentNode,t))}function lr(e){return!!e.changedTouches}function Dl(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 new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}function no(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function ro(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function dr(e){return!!De([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(on=()=>(new Date).getTime());class Nl{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Hc(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=void 0===t?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 so(e){let t=null;return De([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Ll(e){let t,n=e;for(;t=so(n);)n=t;return n}function Pl(e){const t=e.ownerDocument;if(!t)return!1;const n=Ll(e);return t.contains(n)}function io(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||Pl(e))}const Ds={};function $r(e){const t=Ds[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return Ds[e]=r.bind(window)}function Fl(...e){return $r("requestAnimationFrame")(...e)}function kn(...e){return $r("setTimeout")(...e)}function Ul(...e){return $r("clearTimeout")(...e)}var Ns,Ls,A=(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))(A||{}),O=(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))(O||{}),oe=(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))(oe||{}),ke=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ke||{});function Hr(e){try{return e.contentDocument}catch{}}function Bl(e){try{return e.contentWindow}catch{}}function zl(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function Ps(e){return"__ln"in e}!function(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"}(Ns||(Ns={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Ls||(Ls={}));class jl{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=zl([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ps(e.previousSibling)){const 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&&Ps(e.nextSibling)&&e.nextSibling.__ln.previous){const 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;null===t.next&&(this.tail=t),this.length++}removeNode(e){const 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--)}}const Fs=(e,t)=>`${e}@${t}`;class $l{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;const e=[],t=new Set,n=new jl,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},s=s=>{if(!s.parentNode||!io(s))return;const o=ht(s.parentNode)?this.mirror.getId(so(s)):this.mirror.getId(s.parentNode),i=r(s);if(-1===o||-1===i)return n.addNode(s);const a=Je(s,{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=>{no(e,this.mirror)&&!de(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),ro(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),dr(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{de(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:o,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Us(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||s(e);for(const e of this.addedSet)!Bs(this.droppedSet,e)&&!Us(this.removes,e,this.mirror)||Bs(this.movedSet,e)?s(e):this.droppedSet.add(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),s(e.value)}const i={texts:this.texts.map((e=>({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=>{const{attributes:t}=e;if("string"==typeof t.style){const 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};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.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(i))},this.processMutation=e=>{if(!$n(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!de(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:rt(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,eo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Br(t),s=t.tagName;r=rn(t,s,n);const o=vn({maskInputOptions:this.maskInputOptions,tagName:s,type:n});r=St({isMasked:rt(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(Hr(t))return;n="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Ki(t.tagName,n)&&(s.attributes[n]=Yi(this.doc,nt(t.tagName),nt(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?s.styleDiff[e]=""===o?r:[r,o]:s._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}break}case"childList":if(de(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=ht(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||$n(t,this.mirror)||!Al(t,this.mirror)||(this.addedSet.has(t)?(fr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||to(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Fs(n,r)]?fr(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!ht(e.target)||!pt(e.target))||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($n(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Fs(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),dr(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"].forEach((t=>{this[t]=e[t]}))}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 fr(e,t){e.delete(t),t.childNodes.forEach((t=>fr(e,t)))}function Us(e,t,n){return 0!==e.length&&Hl(e,t,n)}function Hl(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}function Bs(e,t){return 0!==e.size&&oo(e,t)}function oo(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||oo(e,n))}let mt;function Wl(e){mt=e}function ql(){mt=void 0}const F=e=>mt?(...t)=>{try{return e(...t)}catch(e){if(mt&&!0===mt(e))return()=>{};throw e}}:e;function _e(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const Qe=[];function Dt(e){try{if("composedPath"in e){const 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 ao(e,t){const n=new $l;Qe.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=_e([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(r=window[s]);const o=new r(F((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Vl({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=bt(F((t=>{const n=Date.now()-i;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],i=null})),o),u=F(bt(F((e=>{const t=Dt(e),{clientX:n,clientY:s}=lr(e)?e.changedTouches[0]:e;i||(i=on()),a.push({x:n,y:s,id:r.getId(t),timeOffset:on()-i}),c(typeof DragEvent<"u"&&e instanceof DragEvent?O.Drag:e instanceof MouseEvent?O.MouseMove:O.TouchMove)})),s,{trailing:!1})),l=[ae("mousemove",u,n),ae("touchmove",u,n),ae("drag",u,n)];return F((()=>{l.forEach((e=>e()))}))}function Gl({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let u=null;return Object.keys(oe).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=nt(i);const l=(t=>i=>{const a=Dt(i);if(de(a,r,s,o,!0))return;let c=null,l=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=ke.Mouse;break;case"touch":c=ke.Touch;break;case"pen":c=ke.Pen}c===ke.Touch?oe[t]===oe.MouseDown?l="TouchStart":oe[t]===oe.MouseUp&&(l="TouchEnd"):ke.Pen}else lr(i)&&(c=ke.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===ke.Touch||l.startsWith("Mouse")&&c===ke.Mouse)&&(c=null)):oe[t]===oe.Click&&(c=u,u=null);const d=lr(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:f}=d;F(e)({type:oe[l],id:p,x:h,y:f,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(oe[i]){case oe.MouseDown:case oe.MouseUp:a=a.replace("mouse","pointer");break;case oe.TouchStart:case oe.TouchEnd:return}c.push(ae(a,l,t))})),F((()=>{c.forEach((e=>e()))}))}function co({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){return ae("scroll",F(bt(F((i=>{const a=Dt(i);if(!a||de(a,r,s,o,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=Ji(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}function Yl({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return ae("resize",F(bt(F((()=>{const t=Qi(),s=Zi();(n!==t||r!==s)&&(e({width:Number(s),height:Number(t)}),n=t,r=s)})),200)),t)}const Kl=["INPUT","TEXTAREA","SELECT"],zs=new WeakMap;function Xl({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:m}){function y(e){let n=Dt(e);const l=e.isTrusted,y=n&&cr(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||Kl.indexOf(y)<0||de(n,r,s,o,!0))return;const _=n;if(_.classList.contains(i)||a&&_.matches(a))return;const v=Br(n);let S=rn(_,y,v),b=!1;const k=vn({maskInputOptions:c,tagName:y,type:v}),w=rt(n,p,f,h,m,k);("radio"===v||"checkbox"===v)&&(b=n.checked),S=St({isMasked:w,element:n,value:S,maskInputFn:u}),g(n,d?{text:S,isChecked:b,userTriggered:l}:{text:S,isChecked:b});const E=n.name;"radio"===v&&E&&b&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach((e=>{if(e!==n){const t=St({isMasked:w,element:e,value:rn(e,y,v),maskInputFn:u});g(e,d?{text:t,isChecked:!b,userTriggered:!1}:{text:t,isChecked:!b})}}))}function g(t,r){const s=zs.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){zs.set(t,r);const s=n.getId(t);F(e)({...r,id:s})}}const _=("last"===l.input?["change"]:["input","change"]).map((e=>ae(e,F(y),t))),v=t.defaultView;if(!v)return()=>{_.forEach((e=>e()))};const S=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),b=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&_.push(...b.map((e=>Xi(e[0],e[1],{set(){F(y)({target:this,isTrusted:!1})}},!1,v)))),F((()=>{_.forEach((e=>e()))}))}function an(e){return function(e,t){if(Wt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Wt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Wt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Wt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Ne(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Jl({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:F(((r,s,o)=>{const[i,a]=o,{id:c,styleId:u}=Ne(s,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:a}]}),r.apply(s,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:F(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Ne(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(s,o)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:F(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Ne(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(s,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:F(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Ne(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(s,o)}))}));const c={};qt("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(qt("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),qt("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),qt("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach((([r,s])=>{u[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(u[r].insertRule,{apply:F(((r,s,o)=>{const[i,a]=o,{id:c,styleId:u}=Ne(s.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:[...an(s),a||0]}]}),r.apply(s,o)}))}),s.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:F(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Ne(s.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...an(s),i]}]}),r.apply(s,o)}))})})),F((()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule}))}))}function uo({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const s="#document"===n.nodeName?_e([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):_e([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=_e([s,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(_e([s,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return _e([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=_e([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch{}return n}}),F((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))):()=>{}}function Ql({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:F(((s,i,a)=>{const[c,u,l]=a;if(n.has(c))return o.apply(i,[c,u,l]);const{id:d,styleId:p}=Ne(_e([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:l},index:an(i.parentRule)}),s.apply(i,a)}))});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:F(((s,o,a)=>{const[c]=a;if(n.has(c))return i.apply(o,[c]);const{id:u,styleId:l}=Ne(_e([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&e({id:u,styleId:l,remove:{property:c},index:an(o.parentRule)}),s.apply(o,a)}))}),F((()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i}))}function Zl({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const a=F((i=>bt(F((o=>{const a=Dt(o);if(!a||de(a,t,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;e({type:i,id:s.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})})),o.media||500))),c=[ae("play",a(0),i),ae("pause",a(1),i),ae("seeked",a(2),i),ae("volumechange",a(3),i),ae("ratechange",a(4),i)];return F((()=>{c.forEach((e=>e()))}))}function ed({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return s.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=jr(t.fonts,"add",(function(t){return function(n){return kn(F((()=>{const t=s.get(n);t&&(e(t),s.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(i),F((()=>{r.forEach((e=>e()))}))}function td(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=F((()=>{const e=t.getSelection();if(!e||a&&_e([e,"optionalAccess",e=>e.isCollapsed]))return;a=e.isCollapsed||!1;const c=[],u=e.rangeCount||0;for(let t=0;t<u;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:u,endContainer:l,endOffset:d}=i;de(a,r,s,o,!0)||de(l,r,s,o,!0)||c.push({start:n.getId(a),startOffset:u,end:n.getId(l),endOffset:d})}i({ranges:c})}));return c(),ae("selectionchange",c)}function nd({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?jr(n.customElements,"define",(function(e){return function(n,r,s){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,s])}})):()=>{}}function rd(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=ao(e,e.doc));const s=Vl(e),o=Gl(e),i=co(e),a=Yl(e,{win:n}),c=Xl(e),u=Zl(e);let l=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(l=Jl(e,{win:n}),d=uo(e,e.doc),p=Ql(e,{win:n}),e.collectFonts&&(h=ed(e)));const f=td(e),m=nd(e),y=[];for(const t of e.plugins)y.push(t.observer(t.callback,n,t.options));return F((()=>{Qe.forEach((e=>e.reset())),_e([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),s(),o(),i(),a(),c(),u(),l(),d(),p(),h(),f(),m(),y.forEach((e=>e()))}))}function Wt(e){return typeof window[e]<"u"}function qt(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class hr{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const s=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let i=s.get(t);return i||(i=this.generateIdFn(),s.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);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}}function js(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}class sd{constructor(){this.crossOriginIframeMirror=new hr(zr),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class id{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new hr(zr),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new hr(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),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,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}),js([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=Hr(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:A.IncrementalSnapshot,data:{source:O.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case A.Meta:case A.Load:case A.DomContentLoaded:return!1;case A.Plugin:return t;case A.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case A.IncrementalSnapshot:switch(t.data.source){case O.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const 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 O.Drag:case O.TouchMove:case O.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case O.ViewportResize:return!1;case O.MediaInteraction:case O.MouseInteraction:case O.Scroll:case O.CanvasMutation:case O.Input:return this.replaceIds(t.data,e,["id"]),t;case O.StyleSheetRule:case O.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case O.Font:return t;case O.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case O.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),js([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const s of r)!Array.isArray(t[s])&&"number"!=typeof t[s]||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));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.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type!==re.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class od{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class ad{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(!pt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=ao({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(co({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),kn((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(uo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=Hr(e),n=Bl(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(jr(e.prototype,"attachShadow",(function(e){return function(r){const s=e.call(this,r);return this.shadowRoot&&io(this)&&n.addShadowRoot(this.shadowRoot,t),s}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class $s{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class cd{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Nl,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(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const 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:$i(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){}}class ud{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,Fl((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let ne,cn;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Jt([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ye=cl();function xe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:_,maskInputFn:v,maskTextFn:S,maxCanvasSize:b=null,packFn:k,sampling:w={},dataURLOptions:E={},mousemoveWait:C,recordDOM:T=!0,recordCanvas:x=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:D=!1,inlineImages:N=!1,plugins:L,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:U=new Set([]),errorHandler:j,onMutation:B,getCanvasManager:z}=e;Wl(j);const $=!I||window.parent===window;let W=!1;if(!$)try{window.parent.document&&(W=!1)}catch{W=!0}if($&&!t)throw new Error("emit function is required");if(!$&&!W)return()=>{};void 0!==C&&void 0===w.mousemove&&(w.mousemove=C),ye.reset();const H=!0===m?{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}:void 0!==y?y:{},q=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};Dl();let V,K=0;const X=e=>{for(const t of L||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!W&&(e=k(e)),e};ne=(e,s)=>{const o=e;if(o.timestamp=on(),Jt([Qe,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&o.type!==A.FullSnapshot&&!(o.type===A.IncrementalSnapshot&&o.data.source===O.Mutation)&&Qe.forEach((e=>e.unfreeze())),$)Jt([t,"optionalCall",e=>e(X(o),s)]);else if(W){const e={type:"rrweb",event:X(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===A.FullSnapshot)V=o,K=0;else if(o.type===A.IncrementalSnapshot){if(o.data.source===O.Mutation&&o.data.isAttachIframe)return;K++;const e=r&&K>=r,t=n&&V&&o.timestamp-V.timestamp>n;(e||t)&&se(!0)}};const G=e=>{ne({type:A.IncrementalSnapshot,data:{source:O.Mutation,...e}})},Y=e=>ne({type:A.IncrementalSnapshot,data:{source:O.Scroll,...e}}),J=e=>ne({type:A.IncrementalSnapshot,data:{source:O.CanvasMutation,...e}}),Q=new cd({mutationCb:G,adoptedStyleSheetCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.AdoptedStyleSheet,...e}})}),Z="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new sd:new id({mirror:ye,mutationCb:G,stylesheetManager:Q,recordCrossOriginIframes:I,wrappedEmit:ne});for(const e of L||[])e.getMirror&&e.getMirror({nodeMirror:ye,crossOriginIframeMirror:Z.crossOriginIframeMirror,crossOriginIframeStyleMirror:Z.crossOriginIframeStyleMirror});const ee=new ud,te=dd(z,{mirror:ye,win:window,mutationCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.CanvasMutation,...e}}),recordCanvas:x,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:b,sampling:w.canvas,dataURLOptions:E,errorHandler:j}),re="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new od:new ad({mutationCb:G,scrollCb:Y,bypassOptions:{onMutation:B,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:H,dataURLOptions:E,maskAttributeFn:_,maskTextFn:S,maskInputFn:v,recordCanvas:x,inlineImages:N,sampling:w,slimDOMOptions:q,iframeManager:Z,stylesheetManager:Q,canvasManager:te,keepIframeSrcFn:P,processedNodeManager:ee},mirror:ye}),se=(e=!1)=>{if(!T)return;ne({type:A.Meta,data:{href:window.location.href,width:Zi(),height:Qi()}},e),Q.reset(),re.init(),Qe.forEach((e=>e.lock()));const t=Ol(document,{mirror:ye,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskAllInputs:H,maskAttributeFn:_,maskInputFn:v,maskTextFn:S,slimDOM:q,dataURLOptions:E,recordCanvas:x,inlineImages:N,onSerialize:e=>{no(e,ye)&&Z.addIframe(e),ro(e,ye)&&Q.trackLinkElement(e),dr(e)&&re.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Z.attachIframe(e,t),e.contentWindow&&te.addWindow(e.contentWindow),re.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Q.attachLinkElement(e,t)},keepIframeSrcFn:P});if(!t)return console.warn("Failed to snapshot the document");ne({type:A.FullSnapshot,data:{node:t,initialOffset:Ji(window)}}),Qe.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Q.adoptStyleSheets(document.adoptedStyleSheets,ye.getId(document))};cn=se;try{const e=[],t=e=>F(rd)({onMutation:B,mutationCb:G,mousemoveCb:(e,t)=>ne({type:A.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.MouseInteraction,...e}}),scrollCb:Y,viewportResizeCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.ViewportResize,...e}}),inputCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.Input,...e}}),mediaInteractionCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.MediaInteraction,...e}}),styleSheetRuleCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.StyleSheetRule,...e}}),styleDeclarationCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.StyleDeclaration,...e}}),canvasMutationCb:J,fontCb:e=>ne({type:A.IncrementalSnapshot,data:{source:O.Font,...e}}),selectionCb:e=>{ne({type:A.IncrementalSnapshot,data:{source:O.Selection,...e}})},customElementCb:e=>{ne({type:A.IncrementalSnapshot,data:{source:O.CustomElement,...e}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:H,inlineStylesheet:f,sampling:w,recordDOM:T,recordCanvas:x,inlineImages:N,userTriggeredOnInput:R,collectFonts:D,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:S,keepIframeSrcFn:P,blockSelector:o,unblockSelector:i,slimDOMOptions:q,dataURLOptions:E,mirror:ye,iframeManager:Z,stylesheetManager:Q,shadowDomManager:re,processedNodeManager:ee,canvasManager:te,ignoreCSSAttributes:U,plugins:Jt([L,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>ne({type:A.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});Z.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{se(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(ae("DOMContentLoaded",(()=>{ne({type:A.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()}))),e.push(ae("load",(()=>{ne({type:A.Load,data:{}}),"load"===M&&n()}),window))),()=>{e.forEach((e=>e())),ee.destroy(),cn=void 0,ql()}}catch(e){console.warn(e)}}function ld(e){if(!cn)throw new Error("please take full snapshot after start recording");cn(e)}function dd(e,t){try{return e?e(t):new $s}catch{return console.warn("Unable to initialize CanvasManager"),new $s}}xe.mirror=ye,xe.takeFullSnapshot=ld;const fd=3,hd=5;function Wr(e){return e>9999999999?e:1e3*e}function Hn(e){return e>9999999999?e/1e3:e}function Nt(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:A.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:Ce(t,10,1e3)}}),"console"===t.category))))}const pd="button,a";function lo(e){return e.closest(pd)||e}function fo(e){const t=ho(e);return t&&t instanceof Element?lo(t):t}function ho(e){return md(e)?e.target:e}function md(e){return"object"==typeof e&&!!e&&"target"in e}let Le;function gd(e){return Le||(Le=[],yd()),Le.push(e),()=>{const t=Le?Le.indexOf(e):-1;t>-1&&Le.splice(t,1)}}function yd(){me(X,"open",(function(e){return function(...t){if(Le)try{Le.forEach((e=>e()))}catch{}return e.apply(X,t)}}))}const _d=new Set([O.Mutation,O.StyleSheetRule,O.StyleDeclaration,O.AdoptedStyleSheet,O.CanvasMutation,O.Selection,O.MediaInteraction]);function Sd(e,t,n){e.handleClick(t,n)}class Ed{constructor(e,t,n=Nt){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(){const e=gd((()=>{this._lastMutation=Hs()}));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(vd(t,this._ignoreSelector)||!wd(e))return;const n={timestamp:Hn(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),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Hn(e)}registerScroll(e=Date.now()){this._lastScroll=Hn(e)}registerClick(e){const t=lo(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=Hs();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(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!n&&!r,{clickCount:o,clickBreadcrumb:i}=e;if(s){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:X.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};this._addBreadcrumbEvent(t,s)}else if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:X.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=tt((()=>this._checkClicks()),1e3)}}const bd=["A","BUTTON","INPUT"];function vd(e,t){return!!(!bd.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||"A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target"))||t&&e.matches(t))}function wd(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}function Hs(){return Date.now()/1e3}function kd(e,t){try{if(!Id(t))return;const{source:n}=t.data;if(_d.has(n)&&e.registerMutation(t.timestamp),n===O.Scroll&&e.registerScroll(t.timestamp),Cd(t)){const{type:n,id:r}=t.data,s=xe.mirror.getNode(r);s instanceof HTMLElement&&n===oe.Click&&e.registerClick(s)}}catch{}}function Id(e){return 3===e.type}function Cd(e){return e.data.source===O.MouseInteraction}function be(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var un;!function(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"}(un||(un={}));const Td=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Rd(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Td.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}const Md=e=>t=>{if(!e.isEnabled())return;const n=xd(t);if(!n)return;const r="click"===t.name,s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Sd(e.clickDetector,n,fo(t.event)),Nt(e,n)};function po(e,t){const n=xe.mirror.getId(e),r=n&&xe.mirror.getNode(n),s=r&&xe.mirror.getMeta(r),o=s&&Ad(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===un.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:Rd(o.attributes)}}:{}}}function xd(e){const{target:t,message:n}=Od(e);return be({category:`ui.${e.name}`,...po(t,n)})}function Od(e){const t="click"===e.name;let n,r=null;try{r=t?fo(e.event):ho(e.event),n=xr(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Ad(e){return e.type===un.Element}function Dd(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Nd(t);n&&Nt(e,n)}function Nd(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||Ld(i)||!o)return null;const a=t||r||s,c=1===o.length;if(!a&&c)return null;const u=xr(i,{maxStringLength:200})||"<unknown>";return be({category:"ui.keyDown",message:u,data:{...po(i,u).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function Ld(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}const Pd={resource:jd,paint:Bd,navigation:zd};function Vt(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function Fd(e){return e.map(Ud).filter(Boolean)}function Ud(e){const t=Pd[e.entryType];return t?t(e):null}function st(e){return((ga||X.performance.timeOrigin)+e)/1e3}function Bd(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=st(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function zd(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=e;return 0===s?null:{type:`${t}.${m}`,start:st(h),end:st(o),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:o,redirectCount:p}}}function jd(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:st(o),end:st(s),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function $d(e){const t=e.entries[e.entries.length-1];return In(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function Hd(e){return void 0!==e.sources}function Wd(e){const t=[],n=[];for(const r of e.entries)if(Hd(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=xe.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return In(e,"cumulative-layout-shift",n,t)}function qd(e){const t=e.entries[e.entries.length-1];return In(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function Vd(e){const t=e.entries[e.entries.length-1];return In(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function In(e,t,n,r){const s=e.value,o=e.rating,i=st(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map((e=>xe.mirror.getId(e))):void 0,attributions:r}}}function Gd(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(Su(e,n))})),r.push(gu(Vt($d,e)),mu(Vt(Wd,e)),yu(Vt(qd,e)),_u(Vt(Vd,e))),()=>{r.forEach((e=>e()))}}const R=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yd='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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(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,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,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=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=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:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}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 a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,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[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,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[a[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=p,P=g,Q=y,R=w;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;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}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];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}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-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(a[t]^a[t+1]<<A^a[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||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),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(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[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|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),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(a),32768),this.s.z=n.length-a+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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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});';function Kd(){const e=new Blob([Yd]);return URL.createObjectURL(e)}const Ws=["info","warn","error","log"],Qt="[Replay] ";function Wn(e,t="info"){xc({category:"console",data:{logger:"replay"},level:t,message:`${Qt}${e}`},{level:t})}function Xd(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return R?(Ws.forEach((e=>{n[e]=(...n)=>{ce[e](Qt,...n),t&&Wn(n.join(""),Oc(e))}})),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),ce.error(Qt,r),e?Dr(r):t&&Wn(r,"error")},n.infoTick=(...e)=>{ce.info(Qt,...e),t&&setTimeout((()=>Wn(e[0])),0)}):Ws.forEach((e=>{n[e]=()=>{}})),n}const M=Xd();class qr extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Ur}.`)}}class mo{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){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Ur)throw new qr;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?Wr(e):null}}class Jd{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){R&&M.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,s)=>{const o=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",o),!i.success)return R&&M.error("Error in compression worker: ",i.response),void s(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class Qd{constructor(e){this._worker=new Jd(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){const t=Wr(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Ur?Promise.reject(new qr):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{R&&M.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class Zd{constructor(e){this._fallback=new mo,this._compression=new Qd(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=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){return void(R&&M.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const 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){R&&M.exception(e,"Failed to add events when switching buffers.")}}}function ef({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=tf(t);if(e)return e}return R&&M.info("Using simple buffer"),new mo}function tf(e){try{const t=e||nf();if(!t)return;R&&M.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Zd(n)}catch(e){R&&M.exception(e,"Failed to create compression worker")}}function nf(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Kd():""}function Vr(){try{return"sessionStorage"in X&&!!X.sessionStorage}catch{return!1}}function rf(e){sf(),e.session=void 0}function sf(){if(Vr())try{X.sessionStorage.removeItem(Pr)}catch{}}function go(e){return void 0!==e&&Math.random()<e}function yo(e){const t=Date.now();return{id:e.id||Me(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function Gr(e){if(Vr())try{X.sessionStorage.setItem(Pr,JSON.stringify(e))}catch{}}function of(e,t){return go(e)?"session":!!t&&"buffer"}function qs({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=yo({sampled:of(e,t),previousSessionId:r});return n&&Gr(s),s}function af(){if(!Vr())return null;try{const e=X.sessionStorage.getItem(Pr);if(!e)return null;const t=JSON.parse(e);return R&&M.infoTick("Loading existing session"),yo(t)}catch{return null}}function pr(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function _o(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return pr(e.started,t,r)||pr(e.lastActivity,n,r)}function So(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!_o(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function qn({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&af();return s?So(s,{sessionIdleExpire:e,maxReplayDuration:t})?(R&&M.infoTick("Session in sessionStorage is expired, creating new one..."),qs(r,{previousSessionId:s.id})):s:(R&&M.infoTick("Creating new session"),qs(r,{previousSessionId:n}))}function cf(e){return e.type===A.Custom}function Yr(e,t,n){return!!bo(e,t)&&(Eo(e,t,n),!0)}function uf(e,t,n){return bo(e,t)?Eo(e,t,n):Promise.resolve(null)}async function Eo(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s="buffer"===e.recordingMode;try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=lf(t,e.getOptions().beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(t){const n=t&&t instanceof qr,o=n?"addEventSizeExceeded":"addEvent";if(n&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o});const i=we();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function bo(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Wr(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(R&&M.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function lf(e,t){try{if("function"==typeof t&&cf(e))return t(e)}catch(e){return R&&M.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Kr(e){return!e.type}function mr(e){return"transaction"===e.type}function df(e){return"replay_event"===e.type}function Vs(e){return"feedback"===e.type}function ff(e){return(t,n)=>{if(!e.isEnabled()||!Kr(t)&&!mr(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(mr(t))return void hf(e,t);pf(e,t)}}}function hf(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function pf(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();"function"==typeof r&&!r(t)||tt((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}function mf(e){return t=>{!e.isEnabled()||!Kr(t)||gf(e,t)}}function gf(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"==typeof n&&(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))){Nt(e,be({category:"replay.hydrate-error",data:{url:la()}}))}}function yf(e){const t=we();t&&t.on("beforeAddBreadcrumb",(t=>_f(e,t)))}function _f(e,t){if(!e.isEnabled()||!vo(t))return;const n=Sf(t);n&&Nt(e,n)}function Sf(e){return!vo(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?Ef(e):be(e)}function Ef(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return be(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Ht?(n=!0,`${e.slice(0,Ht)}…`):e;if("object"==typeof e)try{const t=Ce(e,7);return JSON.stringify(t).length>Ht?(n=!0,`${JSON.stringify(t,null,2).slice(0,Ht)}…`):t}catch{}return e}));return be({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function vo(e){return!!e.category}function bf(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function wo(){const e=at().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ti();if(t){delete Mi(t).replay_id}}function vf(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:A.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function wf(e,t){return!("buffer"!==e.recordingMode||t.message===Fr||!t.exception||t.type)&&go(e.getOptions().errorSampleRate)}function kf(e){return Object.assign(((t,n)=>!e.isEnabled()||e.isPaused()?t:df(t)?(delete t.breadcrumbs,t):Kr(t)||mr(t)||Vs(t)?e.checkAndHandleExpiredSession()?Vs(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),vf(e,t),t):bf(t,n)&&!e.getOptions()._experiments.captureExceptions?(R&&M.log("Ignoring error from rrweb internals",t),null):((wf(e,t)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(wo(),t):t),{id:"Replay"})}function Cn(e,t){return t.map((({type:t,start:n,end:r,name:s,data:o})=>{const i=e.throttledAddEvent({type:A.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:s,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof i?Promise.resolve(null):i}))}function If(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Cf(e){return t=>{if(!e.isEnabled())return;const n=If(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(Cn(e,[n]),!1))))}}function Tf(e,t){return(!R||!e.getOptions()._experiments.traceInternals)&&Cc(t,we())}function ko(e,t){e.isEnabled()&&null!==t&&(Tf(e,t.name)||e.addUpdate((()=>(Cn(e,[t]),!0))))}function Tn(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Ro(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Io(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Co(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ro(e)];if(!e)return[void 0]}catch(t){return R&&M.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return R&&M.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ln(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function To(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:Ee({method:o,statusCode:i,request:a,response:c})}}function vt(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Fe(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=Rf(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function gr(e,t){return Object.entries(e).reduce(((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n}),{})}function Ro(e){return new URLSearchParams(e).toString()}function Rf(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>Cs,n=Mf(e);if(t){const t=e.slice(0,Cs);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Mf(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}function dn(e,t){return fa(xf(e),t)}function xf(e,t=X.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(X.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Of(e,t,n){try{const r=To("resource.fetch",await Df(e,t,n));ko(n.replay,r)}catch(e){R&&M.exception(e,"Failed to capture fetch breadcrumb")}}function Af(e,t){const{input:n,response:r}=t,s=Tn(n?Mo(n):void 0),o=r?Io(r.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}async function Df(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=dn(i,n.networkDetailAllowUrls)&&!dn(i,n.networkDetailDenyUrls);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:d?Nf(n,t.input,u):vt(u),response:await Lf(d,n,t.response,l)}}function Nf({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Uf(n,t):{};if(!e)return Fe(s,r,void 0);const o=Mo(n),[i,a]=Co(o),c=Fe(s,r,i);return a?ln(c,a):c}async function Lf(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&void 0!==s)return vt(s);const o=r?xo(r.headers,n):{};if(!r||!t&&void 0!==s)return Fe(o,s,void 0);const[i,a]=await Ff(r),c=Pf(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return a?ln(c,a):c}function Pf(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e&&e.length&&void 0===n?Tn(e):n;return r?Fe(s,o,t?e:void 0):vt(o)}catch(e){return R&&M.exception(e,"Failed to serialize response body"),Fe(s,n,void 0)}}async function Ff(e){const t=Bf(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await zf(t)]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(R&&M.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(R&&M.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function Mo(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function xo(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function Uf(e,t){return 1===e.length&&"string"!=typeof e[0]?Gs(e[0],t):2===e.length?Gs(e[1],t):{}}function Gs(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?xo(n,t):Array.isArray(n)?{}:gr(n,t):{}}function Bf(e){try{return e.clone()}catch(e){R&&M.exception(e,"Failed to clone response body")}}function zf(e){return new Promise(((t,n)=>{const r=tt((()=>n(new Error("Timeout while trying to read response body"))),500);jf(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}async function jf(e){return await e.text()}async function $f(e,t,n){try{const r=To("resource.xhr",Wf(e,t,n));ko(n.replay,r)}catch(e){R&&M.exception(e,"Failed to capture xhr breadcrumb")}}function Hf(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Tn(r),o=n.getResponseHeader("content-length")?Io(n.getResponseHeader("content-length")):Yf(n.response,n.responseType);void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}function Wf(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!dn(c,n.networkDetailAllowUrls)||dn(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:l,request:vt(d),response:vt(p)}}const h=a[Nu],f=h?gr(h.request_headers,n.networkRequestHeaders):{},m=gr(qf(a),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?Co(i):[void 0],[_,v]=n.networkCaptureBodies?Vf(a):[void 0],S=Fe(f,d,y),b=Fe(m,p,_);return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:l,request:g?ln(S,g):S,response:v?ln(b,v):b}}function qf(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}function Vf(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return Gf(e.response,e.responseType)}catch(e){t.push(e)}return R&&M.warn("Failed to get xhr response body",...t),[void 0]}function Gf(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return R&&M.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return R&&M.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Yf(e,t){try{return Tn("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}function Kf(e){const t=we();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>Xf(a,e,t)))}catch{}}function Xf(e,t,n){if(t.data)try{Jf(t)&&Zf(n)&&(Hf(t,n),$f(t,n,e)),Qf(t)&&eh(n)&&(Af(t,n),Of(t,n,e))}catch(e){R&&M.exception(e,"Error when enriching network breadcrumb")}}function Jf(e){return"xhr"===e.category}function Qf(e){return"fetch"===e.category}function Zf(e){return e&&e.xhr}function eh(e){return e&&e.response}function th(e){const t=we();Cu(Md(e)),Ou(Cf(e)),yf(e),Kf(e);Ec(kf(e)),t&&(t.on("beforeSendEvent",mf(e)),t.on("afterSendEvent",ff(e)),t.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}async function nh(e){try{return Promise.all(Cn(e,[rh(X.performance.memory)]))}catch{return[]}}function rh(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function sh(e,t,n){let r,s,o;const i=n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){void 0!==s&&clearTimeout(s),void 0!==o&&clearTimeout(o),s=o=void 0}function u(){return s&&clearTimeout(s),s=tt(a,t),i&&void 0===o&&(o=tt(a,i)),r}return u.cancel=c,u.flush=function(){return void 0!==s||void 0!==o?a():r},u}function ih(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(R&&M.warn("Received replay event after session expired."));const s=r||!t;t=!0,e.clickDetector&&kd(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!Yr(e,n,s))return!0;if(!s)return!1;const t=e.session;if(ah(e,s),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(R&&M.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Gr(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}function oh(e){const t=e.getOptions();return{type:A.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&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function ah(e,t){!t||!e.session||0!==e.session.segmentId||Yr(e,oh(e),!1)}function ch(e,t,n,r){return ec(nc(e,tc(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}function uh({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function lh({client:e,scope:t,replayId:n,event:r}){const s={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,s);const o=await lc(e.getOptions(),r,s,t,e,Rt());if(!o)return null;o.platform=o.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c}=i&&i.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},o}async function dh({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=uh({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=we(),p=at(),h=d&&d.getTransport(),f=d&&d.getDsn();if(!(d&&h&&f&&o.sampled))return us({});const m={type:Hu,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},y=await lh({scope:p,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay",m),R&&M.info("An event processor returned `null`, will not send event."),us({});delete y.sdkProcessingMetadata;const g=ch(y,i,f,d.getOptions().tunnel);let _;try{_=await h.send(g)}catch(e){const t=new Error(Fr);try{t.cause=e}catch{}throw t}if("number"==typeof _.statusCode&&(_.statusCode<200||_.statusCode>=300))throw new Oo(_.statusCode);const v=Ic({},_);if(kc(v,"replay"))throw new Xr(v);return _}class Oo extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Xr extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function Ao(e,t={count:0,interval:Ku}){const{recordingData:n,onError:r}=e;if(n.length)try{return await dh(e),!0}catch(n){if(n instanceof Oo||n instanceof Xr)throw n;if(_c("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${Fr} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{tt((async()=>{try{await Ao(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const Do="__THROTTLED",fh="__SKIPPED";function hh(e,t,n){const r=new Map;let s=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(i),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=s;return s=!0,e?fh:Do}s=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...o)}}class Pe{constructor({options:e,recordingOptions:t}){Pe.prototype.__init.call(this),Pe.prototype.__init2.call(this),Pe.prototype.__init3.call(this),Pe.prototype.__init4.call(this),Pe.prototype.__init5.call(this),Pe.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Wu,sessionIdleExpire:qu},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=sh((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=hh(((e,t)=>uf(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(Ju,n),timeout:n,scrollTimeout:Qu,ignoreSelector:r?r.join(","):""}:void 0;if(s&&(this.clickDetector=new Ed(this,s)),R){const t=e._experiments;M.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){R&&M.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session)return void(R&&M.exception(new Error("Unable to initialize and create session")));!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",R&&M.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(R&&M.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(R&&M.info("Buffering is in progress, call `flush()` to save the replay"));R&&M.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=qn({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(R&&M.info("Buffering is in progress, call `flush()` to save the replay"));R&&M.infoTick("Starting replay in buffer mode");const e=qn({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{const e=this._canvas;this._stopRecording=xe({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:Yu}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:ih(this),onMutation:this._onMutationHandler,...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(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{R&&M.info("Stopping Replay"+(t?` triggered by ${t}`:"")),wo(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,rf(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),R&&M.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),R&&M.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();R&&M.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&pr(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${X.location.pathname}${X.location.hash}${X.location.search}`,t=`${X.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){const n=this._throttledAddEvent(e,t);if(n===Do){const e=be({category:"replay.throttled"});this.addUpdate((()=>!Yr(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Ti(),t=e&&Ar(e),n=(t&&yt(t).data||{})[Ci];if(t&&n&&["route","custom"].includes(n))return yt(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=ef({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=qn({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;const e=this.session;return!So(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{X.document.addEventListener("visibilitychange",this._handleVisibilityChange),X.addEventListener("blur",this._handleWindowBlur),X.addEventListener("focus",this._handleWindowFocus),X.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(th(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=Gd(this)}_removeListeners(){try{X.document.removeEventListener("visibilitychange",this._handleVisibilityChange),X.removeEventListener("blur",this._handleWindowBlur),X.removeEventListener("focus",this._handleWindowFocus),X.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===X.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=be({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=be({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Dd(this,e)}}_doChangeToBackgroundTasks(e){!this.session||_o(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):R&&M.info("Document has become active, but session has expired"))}_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:A.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=Fd(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(Cn(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await nh(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await Ao({replayId:e,recordingData:s,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=we();if(t){const n=e instanceof Xr?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else R&&M.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(R&&M.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,s=n>this._options.maxReplayDuration+5e3;if(r||s)return R&&M.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&R&&M.info("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Gr(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=be({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function ct(e,t){return[...e,...t].join(",")}function ph({mask:e,unmask:t,block:n,unblock:r,ignore:s}){return{maskTextSelector:ct(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:ct(t,[]),blockSelector:ct(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:ct(r,[]),ignoreSelector:ct(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function mh({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const Ys='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',gh=["content-length","content-type","accept"];let Ks=!1;const yh=e=>new Rn(e);class Rn{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=Vu,flushMaxDelay:t=Gu,minReplayDuration:n=Zu,maxReplayDuration:r=Ts,stickySession:s=!0,useCompression:o=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:_=[],networkResponseHeaders:v=[],mask:S=[],maskAttributes:b=["title","placeholder"],unmask:k=[],block:w=[],unblock:E=[],ignore:C=[],maskFn:T,beforeAddRecordingEvent:x,beforeErrorSampling:I,onError:M}={}){this.name=Rn.id;const R=ph({mask:S,unmask:k,block:w,unblock:E,ignore:C});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>mh({maskAttributes:b,maskAllText:c,privacyOptions:R,key:e,value:t,el:n}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,el),maxReplayDuration:Math.min(r,Ts),stickySession:s,useCompression:o,workerUrl:i,blockAllMedia:l,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:f,networkDetailAllowUrls:m,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:Xs(_),networkResponseHeaders:Xs(v),beforeAddRecordingEvent:x,beforeErrorSampling:I,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ys}`:Ys),this._isInitialized&&bs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Ks}set _isInitialized(e){Ks=e}afterAllSetup(e){!bs()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=_h(this._initialOptions,e);this._replay=new Pe({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function _h(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Ee(e)},s=gs(n.replaysSessionSampleRate),o=gs(n.replaysOnErrorSampleRate);return null==s&&null==o&&Ir((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=s&&(r.sessionSampleRate=s),null!=o&&(r.errorSampleRate=o),r}function Xs(e){return[...gh,...e.map((e=>e.toLowerCase()))]}function Sh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Rn.__initStatic();var Js,Qs,Vn={exports:{}},D={};
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/function Eh(){if(Js)return D;Js=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),d=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,f={};function m(e,t,n){this.props=e,this.context=t,this.refs=f,this.updater=n||p}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=f,this.updater=n||p}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var _=g.prototype=new y;_.constructor=g,h(_,m.prototype),_.isPureReactComponent=!0;var v=Array.isArray,S=Object.prototype.hasOwnProperty,b={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function w(t,n,r){var s,o={},i=null,a=null;if(null!=n)for(s in void 0!==n.ref&&(a=n.ref),void 0!==n.key&&(i=""+n.key),n)S.call(n,s)&&!k.hasOwnProperty(s)&&(o[s]=n[s]);var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];o.children=u}if(t&&t.defaultProps)for(s in c=t.defaultProps)void 0===o[s]&&(o[s]=c[s]);return{$$typeof:e,type:t,key:i,ref:a,props:o,_owner:b.current}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var C=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(n,r,s,o,i){var a=typeof n;("undefined"===a||"boolean"===a)&&(n=null);var c=!1;if(null===n)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(n.$$typeof){case e:case t:c=!0}}if(c)return i=i(c=n),n=""===o?"."+T(c,0):o,v(i)?(s="",null!=n&&(s=n.replace(C,"$&/")+"/"),x(i,r,s,"",(function(e){return e}))):null!=i&&(E(i)&&(i=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(i,s+(!i.key||c&&c.key===i.key?"":(""+i.key).replace(C,"$&/")+"/")+n)),r.push(i)),1;if(c=0,o=""===o?".":o+":",v(n))for(var u=0;u<n.length;u++){var l=o+T(a=n[u],u);c+=x(a,r,s,l,i)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof l)for(n=l.call(n),u=0;!(a=n.next()).done;)c+=x(a=a.value,r,s,l=o+T(a,u++),i);else if("object"===a)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return c}function I(e,t,n){if(null==e)return e;var r=[],s=0;return x(e,r,"","",(function(e){return t.call(n,e,s++)})),r}function M(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)}),(function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},O={transition:null},A={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:O,ReactCurrentOwner:b};return D.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},D.Component=m,D.Fragment=n,D.Profiler=s,D.PureComponent=g,D.StrictMode=r,D.Suspense=c,D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,D.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var s=h({},t.props),o=t.key,i=t.ref,a=t._owner;if(null!=n){if(void 0!==n.ref&&(i=n.ref,a=b.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(u in n)S.call(n,u)&&!k.hasOwnProperty(u)&&(s[u]=void 0===n[u]&&void 0!==c?c[u]:n[u])}var u=arguments.length-2;if(1===u)s.children=r;else if(1<u){c=Array(u);for(var l=0;l<u;l++)c[l]=arguments[l+2];s.children=c}return{$$typeof:e,type:t.type,key:o,ref:i,props:s,_owner:a}},D.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},D.createElement=w,D.createFactory=function(e){var t=w.bind(null,e);return t.type=e,t},D.createRef=function(){return{current:null}},D.forwardRef=function(e){return{$$typeof:a,render:e}},D.isValidElement=E,D.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:M}},D.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},D.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},D.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},D.useCallback=function(e,t){return R.current.useCallback(e,t)},D.useContext=function(e){return R.current.useContext(e)},D.useDebugValue=function(){},D.useDeferredValue=function(e){return R.current.useDeferredValue(e)},D.useEffect=function(e,t){return R.current.useEffect(e,t)},D.useId=function(){return R.current.useId()},D.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},D.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},D.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},D.useMemo=function(e,t){return R.current.useMemo(e,t)},D.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},D.useRef=function(e){return R.current.useRef(e)},D.useState=function(e){return R.current.useState(e)},D.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},D.useTransition=function(){return R.current.useTransition()},D.version="18.2.0",D}function No(){return Qs||(Qs=1,Vn.exports=Eh()),Vn.exports}var Jr=No();const Lo=Sh(Jr),Zs=Zo({__proto__:null,default:Lo},[Jr]),Po=()=>"object"!=typeof window,ei=["debug","info","warn","error"],bh=(e,t)=>{const n=ei.indexOf(e);return ei.indexOf(t)>=n},Gt=(e,t,n,...r)=>{bh(t,e)&&console.log(`[${e}] ${n}`,...r)},vh=()=>null==window?void 0:window.localStorage.getItem("logger_lvl"),wh=(e=!Po()&&vh()||"warn")=>{let t=e;return{debug:(e,...n)=>Gt("debug",t,e,...n),info:(e,...n)=>Gt("info",t,e,...n),warn:(e,...n)=>Gt("warn",t,e,...n),error:(e,...n)=>(Cp(e,...n),Gt("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}};wh();var Fo={TERM_PROGRAM:"iTerm.app",NODE:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin/node",TURBO_INVOCATION_DIR:"/Users/krasevych/Projects/Animatron/web-apps",NVM_CD_FLAGS:"-q",INIT_CWD:"/Users/krasevych/Projects/Animatron/web-apps/packages/sentry",TERM:"xterm-256color",SHELL:"/bin/zsh",TMPDIR:"/var/folders/1y/vz19w_xj5xzb49lxmbmzk7dc0000gn/T/",DOMAIN_ENV:"dev",npm_config_global_prefix:"/Users/krasevych/.nvm/versions/node/v22.12.0",TERM_PROGRAM_VERSION:"3.5.11",NODE_OPTIONS:"--max-old-space-size=8192",TERM_SESSION_ID:"w1t0p0:2F5FF982-E666-4698-885A-EB6F06825D4B",COLOR:"1",npm_config_noproxy:"",npm_config_local_prefix:"/Users/krasevych/Projects/Animatron/web-apps",USER:"krasevych",NVM_DIR:"/Users/krasevych/.nvm",COMMAND_MODE:"unix2003",npm_config_globalconfig:"/Users/krasevych/.nvm/versions/node/v22.12.0/etc/npmrc",SSH_AUTH_SOCK:"/private/tmp/com.apple.launchd.xn6U3pyr1k/Listeners",__CF_USER_TEXT_ENCODING:"0x1F5:0x0:0x2",npm_execpath:"/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/bin/npm-cli.js",TERM_FEATURES:"T3LrMSc7UUw9Ts3BFGsSyHNoSxF",TERMINFO_DIRS:"/Applications/iTerm.app/Contents/Resources/terminfo:/usr/share/terminfo",PATH:"/Users/krasevych/Projects/Animatron/web-apps/packages/sentry/node_modules/.bin:/Users/krasevych/Projects/Animatron/web-apps/packages/node_modules/.bin:/Users/krasevych/Projects/Animatron/web-apps/node_modules/.bin:/Users/krasevych/Projects/Animatron/node_modules/.bin:/Users/krasevych/Projects/node_modules/.bin:/Users/krasevych/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/Users/krasevych/Projects/Animatron/web-apps/node_modules/.bin:/Users/krasevych/Projects/Animatron/node_modules/.bin:/Users/krasevych/Projects/node_modules/.bin:/Users/krasevych/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/Users/krasevych/Projects/Animatron/web-apps/node_modules/.bin:/Users/krasevych/Projects/Animatron/node_modules/.bin:/Users/krasevych/Projects/node_modules/.bin:/Users/krasevych/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/usr/local/opt/postgresql@16/bin:/Users/krasevych/.yarn/bin:/Users/krasevych/.config/yarn/global/node_modules/.bin:/Users/krasevych/.nvm/versions/node/v22.12.0/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Applications/Visual Studio Code.app/Contents/Resources/app/bin",npm_package_json:"/Users/krasevych/Projects/Animatron/web-apps/packages/sentry/package.json",LaunchInstanceID:"BC2D37FC-0469-4680-8D65-486E7C3C39CD",npm_config_userconfig:"/Users/krasevych/.npmrc",npm_config_init_module:"/Users/krasevych/.npm-init.js",__CFBundleIdentifier:"com.googlecode.iterm2",npm_command:"run-script",PWD:"/Users/krasevych/Projects/Animatron/web-apps/packages/sentry",npm_lifecycle_event:"build",EDITOR:"vi",npm_package_name:"@wellesley/sentry",LANG:"en_GB.UTF-8",ITERM_PROFILE:"Roman",npm_config_npm_version:"10.9.0",XPC_FLAGS:"0x0",TURBO_HASH:"4745ec9bf59be31a",npm_package_engines_node:">=20.2.0",npm_config_node_gyp:"/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",npm_package_version:"1.0.21",XPC_SERVICE_NAME:"0",SHLVL:"4",HOME:"/Users/krasevych",COLORFGBG:"7;0",LC_TERMINAL_VERSION:"3.5.11",ITERM_SESSION_ID:"w1t0p0:2F5FF982-E666-4698-885A-EB6F06825D4B",npm_config_cache:"/Users/krasevych/.npm",LOGNAME:"krasevych",npm_lifecycle_script:"tsc && vite build",NVM_BIN:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin",npm_config_user_agent:"npm/10.9.0 node/v22.12.0 darwin x64 workspaces/false",LC_TERMINAL:"iTerm2",SECURITYSESSIONID:"186a3",npm_node_execpath:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin/node",npm_config_prefix:"/Users/krasevych/.nvm/versions/node/v22.12.0",COLORTERM:"truecolor",_:"/Users/krasevych/Projects/Animatron/web-apps/node_modules/.bin/vite",NODE_ENV:"production",TEST_1_SERVER:"https://dust.allroads.social",TEST_2_SERVER:"https://meteor.allroads.social",DEV_API_URL:"https://dust.allroads.social",DEV_LOCAL_TEST_ME_URL:"http://dev.localtest.me",APP_NAME:"@wellesley/sentry"};const kh=Fo.DOMAIN_ENV;Po()||(window.build=Fo.BUILD_NUMBER);const Ih=()=>"prod"===kh,Ch=[yh(),Uu(),Nc()],Th=({dsn:e,release:t,integrations:n=Ch,...r})=>{},Rh=e=>{},Tp=Object.freeze(Object.defineProperty({__proto__:null,init:Th,isEnabled:Ih,setUser:Rh},Symbol.toStringTag,{value:"Module"}));var ti,ni,Gn={exports:{}},Yn={};
|
|
11
|
+
/**
|
|
12
|
+
* @license React
|
|
13
|
+
* use-sync-external-store-with-selector.production.min.js
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/function Mh(){if(ti)return Yn;ti=1;var e=No();var t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,s=e.useEffect,o=e.useMemo,i=e.useDebugValue;return Yn.useSyncExternalStoreWithSelector=function(e,a,c,u,l){var d=r(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=o((function(){function e(e){if(!s){if(s=!0,n=e,e=u(e),void 0!==l&&p.hasValue){var o=p.value;if(l(o,e))return r=o}return r=e}if(o=r,t(n,e))return o;var i=u(e);return void 0!==l&&l(o,i)?o:(n=e,r=i)}var n,r,s=!1,o=void 0===c?null:c;return[function(){return e(a())},null===o?void 0:function(){return e(o())}]}),[a,c,u,l]);var h=n(e,d[0],d[1]);return s((function(){p.hasValue=!0,p.value=h}),[h]),i(h),h},Yn}function xh(){return ni||(ni=1,Gn.exports=Mh()),Gn.exports}var Oh=xh(),ve="default"in Zs?Lo:Zs,ri=Symbol.for("react-redux-context"),si=typeof globalThis<"u"?globalThis:{};function Ah(){if(!ve.createContext)return{};const e=si[ri]??(si[ri]=new Map);let t=e.get(ve.createContext);return t||(t=ve.createContext(null),e.set(ve.createContext,t)),t}var yr=Ah(),Dh=()=>{throw new Error("uSES not initialized!")};function Uo(e=yr){return function(){return ve.useContext(e)}}var Nh=Uo(),Bo=Dh,Lh=e=>{Bo=e},Ph=(e,t)=>e===t;function Fh(e=yr){const t=e===yr?Nh:Uo(e),n=(e,n={})=>{const{equalityFn:r=Ph,devModeChecks:s={}}="function"==typeof n?{equalityFn:n}:n,{store:o,subscription:i,getServerState:a,stabilityCheck:c,identityFunctionCheck:u}=t();ve.useRef(!0);const l=ve.useCallback({[e.name]:t=>e(t)}[e.name],[e,c,s.stabilityCheck]),d=Bo(i.addNestedSub,o.getState,a||o.getState,l,r);return ve.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var ii=Fh(),Uh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Bh(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function zh(e){return Bh(e)&&"type"in e&&"string"==typeof e.type}Uh?ve.useLayoutEffect:ve.useEffect,Lh(Oh.useSyncExternalStoreWithSelector);var zo=Symbol.for("immer-nothing"),oi=Symbol.for("immer-draftable"),he=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var it=Object.getPrototypeOf;function Ue(e){return!!e&&!!e[he]}function Ae(e){var t;return!!e&&(jo(e)||Array.isArray(e)||!!e[oi]||!(null==(t=e.constructor)||!t[oi])||xn(e)||On(e))}var jh=Object.prototype.constructor.toString();function jo(e){if(!e||"object"!=typeof e)return!1;const t=it(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===jh}function wt(e,t){0===Mn(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function Mn(e){const t=e[he];return t?t.type_:Array.isArray(e)?1:xn(e)?2:On(e)?3:0}function _r(e,t){return 2===Mn(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $o(e,t,n){const r=Mn(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function $h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function xn(e){return e instanceof Map}function On(e){return e instanceof Set}function $e(e){return e.copy_||e.base_}function Sr(e,t){if(xn(e))return new Map(e);if(On(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&jo(e))return it(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[he];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const s=r[t],o=n[s];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[s]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[s]})}return Object.create(it(e),n)}function Qr(e,t=!1){return An(e)||Ue(e)||!Ae(e)||(Mn(e)>1&&(e.set=e.add=e.clear=e.delete=Hh),Object.freeze(e),t&&wt(e,((e,t)=>Qr(t,!0)))),e}function Hh(){Se(2)}function An(e){return Object.isFrozen(e)}var kt,Wh={};function qe(e){const t=Wh[e];return t||Se(0,e),t}function Ho(){return kt}function qh(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ai(e,t){t&&(qe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Er(e){br(e),e.drafts_.forEach(Vh),e.drafts_=null}function br(e){e===kt&&(kt=e.parent_)}function ci(e){return kt=qh(kt,e)}function Vh(e){const t=e[he];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function ui(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[he].modified_&&(Er(t),Se(4)),Ae(e)&&(e=fn(t,e),t.parent_||hn(t,e)),t.patches_&&qe("Patches").generateReplacementPatches_(n[he].base_,e,t.patches_,t.inversePatches_)):e=fn(t,n,[]),Er(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zo?e:void 0}function fn(e,t,n){if(An(t))return t;const r=t[he];if(!r)return wt(t,((s,o)=>li(e,r,t,s,o,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return hn(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let s=t,o=!1;3===r.type_&&(s=new Set(t),t.clear(),o=!0),wt(s,((s,i)=>li(e,r,t,s,i,n,o))),hn(e,t,!1),n&&e.patches_&&qe("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function li(e,t,n,r,s,o,i){if(Ue(s)){const i=fn(e,s,o&&t&&3!==t.type_&&!_r(t.assigned_,r)?o.concat(r):void 0);if($o(n,r,i),!Ue(i))return;e.canAutoFreeze_=!1}else i&&n.add(s);if(Ae(s)&&!An(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;fn(e,s),(!t||!t.scope_.parent_)&&hn(e,s)}}function hn(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Qr(t,n)}function Gh(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ho(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=Zr;n&&(s=[r],o=It);const{revoke:i,proxy:a}=Proxy.revocable(s,o);return r.draft_=a,r.revoke_=i,a}var Zr={get(e,t){if(t===he)return e;const n=$e(e);if(!_r(n,t))return Yh(e,n,t);const r=n[t];return e.finalized_||!Ae(r)?r:r===Kn(e.base_,t)?(Xn(e),e.copy_[t]=wr(r,e)):r},has:(e,t)=>t in $e(e),ownKeys:e=>Reflect.ownKeys($e(e)),set(e,t,n){const r=Wo($e(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Kn($e(e),t),s=null==r?void 0:r[he];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if($h(n,r)&&(void 0!==n||_r(e.base_,t)))return!0;Xn(e),vr(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Kn(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Xn(e),vr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=$e(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){Se(11)},getPrototypeOf:e=>it(e.base_),setPrototypeOf(){Se(12)}},It={};function Kn(e,t){const n=e[he];return(n?$e(n):e)[t]}function Yh(e,t,n){var r;const s=Wo(t,n);return s?"value"in s?s.value:null==(r=s.get)?void 0:r.call(e.draft_):void 0}function Wo(e,t){if(!(t in e))return;let n=it(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=it(n)}}function vr(e){e.modified_||(e.modified_=!0,e.parent_&&vr(e.parent_))}function Xn(e){e.copy_||(e.copy_=Sr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}wt(Zr,((e,t)=>{It[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),It.deleteProperty=function(e,t){return It.set.call(this,e,t,void 0)},It.set=function(e,t,n){return Zr.set.call(this,e[0],t,n,e[0])};var Kh=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...s){return r.produce(e,(e=>t.call(this,e,...s)))}}let r;if("function"!=typeof t&&Se(6),void 0!==n&&"function"!=typeof n&&Se(7),Ae(e)){const s=ci(this),o=wr(e,void 0);let i=!0;try{r=t(o),i=!1}finally{i?Er(s):br(s)}return ai(s,n),ui(r,s)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===zo&&(r=void 0),this.autoFreeze_&&Qr(r,!0),n){const t=[],s=[];qe("Patches").generateReplacementPatches_(e,r,t,s),n(t,s)}return r}Se(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ae(e)||Se(8),Ue(e)&&(e=qo(e));const t=ci(this),n=wr(e,void 0);return n[he].isManual_=!0,br(t),n}finishDraft(e,t){const n=e&&e[he];(!n||!n.isManual_)&&Se(9);const{scope_:r}=n;return ai(r,t),ui(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=qe("Patches").applyPatches_;return Ue(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function wr(e,t){const n=xn(e)?qe("MapSet").proxyMap_(e,t):On(e)?qe("MapSet").proxySet_(e,t):Gh(e,t);return(t?t.scope_:Ho()).drafts_.push(n),n}function qo(e){return Ue(e)||Se(10,e),Vo(e)}function Vo(e){if(!Ae(e)||An(e))return e;const t=e[he];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Sr(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Sr(e,!0);return wt(n,((e,t)=>{$o(n,e,Vo(t))})),t&&(t.finalized_=!1),n}var pe=new Kh,Go=pe.produce;function Xh(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function Jh(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function Qh(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}pe.produceWithPatches.bind(pe),pe.setAutoFreeze.bind(pe),pe.setUseStrictShallowCopy.bind(pe),pe.applyPatches.bind(pe),pe.createDraft.bind(pe),pe.finishDraft.bind(pe);var di=e=>Array.isArray(e)?e:[e];function Zh(e){const t=Array.isArray(e[0])?e[0]:e;return Qh(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ep(e,t){const n=[],{length:r}=e;for(let s=0;s<r;s++)n.push(e[s].apply(null,t));return n}var tp=class{constructor(e){this.value=e}deref(){return this.value}},np=typeof WeakRef<"u"?WeakRef:tp,rp=0,fi=1;function Yt(){return{s:rp,v:void 0,o:null,p:null}}function es(e,t={}){let n=Yt();const{resultEqualityCheck:r}=t;let s,o=0;function i(){var t;let i=n;const{length:a}=arguments;for(let e=0,t=a;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=i.o;null===e&&(i.o=e=new WeakMap);const n=e.get(t);void 0===n?(i=Yt(),e.set(t,i)):i=n}else{let e=i.p;null===e&&(i.p=e=new Map);const n=e.get(t);void 0===n?(i=Yt(),e.set(t,i)):i=n}}const c=i;let u;if(i.s===fi?u=i.v:(u=e.apply(null,arguments),o++),c.s=fi,r){const e=(null==(t=null==s?void 0:s.deref)?void 0:t.call(s))??s;null!=e&&r(e,u)&&(u=e,0!==o&&o--),s="object"==typeof u&&null!==u||"function"==typeof u?new np(u):u}return c.v=u,u}return i.clearCache=()=>{n=Yt(),i.resetResultsCount()},i.resultsCount=()=>o,i.resetResultsCount=()=>{o=0},i}function Yo(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,s=0,o={},i=e.pop();"object"==typeof i&&(o=i,i=e.pop()),Xh(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const a={...n,...o},{memoize:c,memoizeOptions:u=[],argsMemoize:l=es,argsMemoizeOptions:d=[],devModeChecks:p={}}=a,h=di(u),f=di(d),m=Zh(e),y=c((function(){return r++,i.apply(null,arguments)}),...h),g=l((function(){s++;const e=ep(m,arguments);return t=y.apply(null,e),t}),...f);return Object.assign(g,{resultFunc:i,memoizedResultFunc:y,dependencies:m,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:c,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var sp=Yo(es),ip=Object.assign(((e,t=sp)=>{Jh(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>ip}),op=(...e)=>{const t=Yo(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(Ue(e)?qo(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};function ot(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(fe(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>zh(t)&&t.type===e,n}function hi(e){return Ae(e)?Go(e,(()=>{})):e}function pi(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error(fe(10));const r=n.insert(t,e);return e.set(t,r),r}function Ko(e){const t={},n=[];let r;const s={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(fe(28));if(r in t)throw new Error(fe(29));return t[r]=n,s},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),s),addDefaultCase:e=>(r=e,s)};return e(s),[t,n,r]}function ap(e){return"function"==typeof e}function cp(e,t){let n,[r,s,o]=Ko(t);if(ap(e))n=()=>hi(e());else{const t=hi(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...s.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[o]),i.reduce(((e,n)=>{if(n){if(Ue(e)){const r=n(e,t);return void 0===r?e:r}if(Ae(e))return Go(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(fe(9))}return r}}return e}),e)}return i.getInitialState=n,i}op(es);var up="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",lp=(e=21)=>{let t="",n=e;for(;n--;)t+=up[64*Math.random()|0];return t},dp=Symbol.for("rtk-slice-createasyncthunk");function fp(e,t){return`${e}/${t}`}function hp({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[dp];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(fe(11));const s=("function"==typeof e.reducers?e.reducers(gp()):e.reducers)||{},o=Object.keys(s),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(fe(12));if(n in i.sliceCaseReducersByType)throw new Error(fe(13));return i.sliceCaseReducersByType[n]=t,a},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),a),exposeAction:(e,t)=>(i.actionCreators[e]=t,a),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,a)};function c(){const[t={},n=[],r]="function"==typeof e.extraReducers?Ko(e.extraReducers):[e.extraReducers],s={...t,...i.sliceCaseReducersByType};return cp(e.initialState,(e=>{for(let t in s)e.addCase(t,s[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}o.forEach((r=>{const o=s[r],i={reducerName:r,type:fp(t,r),createNotation:"function"==typeof e.reducers};_p(o)?Ep(i,o,a,n):yp(i,o,a)}));const u=e=>e,l=new Map;let d;function p(e,t){return d||(d=c()),d(e,t)}function h(){return d||(d=c()),d.getInitialState()}function f(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=h()),r}function s(t=u){const r=pi(l,n,{insert:()=>new WeakMap});return pi(r,t,{insert:()=>{const r={};for(const[s,o]of Object.entries(e.selectors??{}))r[s]=pp(o,t,h,n);return r}})}return{reducerPath:t,getSelectors:s,get selectors(){return s(r)},selectSlice:r}}const m={name:t,reducer:p,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:h,...f(r),injectInto(e,{reducerPath:t,...n}={}){const s=t??r;return e.inject({reducerPath:s,reducer:p},n),{...m,...f(s,!0)}}};return m}}function pp(e,t,n,r){function s(s,...o){let i=t(s);return typeof i>"u"&&r&&(i=n()),e(i,...o)}return s.unwrapped=e,s}var mp=hp();function gp(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function yp({type:e,reducerName:t,createNotation:n},r,s){let o,i;if("reducer"in r){if(n&&!Sp(r))throw new Error(fe(17));o=r.reducer,i=r.prepare}else o=r;s.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,i?ot(e,i):ot(e))}function _p(e){return"asyncThunk"===e._reducerDefinitionType}function Sp(e){return"reducerWithPrepare"===e._reducerDefinitionType}function Ep({type:e,reducerName:t},n,r,s){if(!s)throw new Error(fe(18));const{payloadCreator:o,fulfilled:i,pending:a,rejected:c,settled:u,options:l}=n,d=s(e,o,l);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),a&&r.addCase(d.pending,a),c&&r.addCase(d.rejected,c),u&&r.addMatcher(d.settled,u),r.exposeCaseReducer(t,{fulfilled:i||Kt,pending:a||Kt,rejected:c||Kt,settled:u||Kt})}function Kt(){}var bp=(e,t)=>{if("function"!=typeof e)throw new Error(fe(32))},ts="listenerMiddleware",vp=e=>{let{type:t,actionCreator:n,matcher:r,predicate:s,effect:o}=e;if(t)s=ot(t).match;else if(n)t=n.type,s=n.match;else if(r)s=r;else if(!s)throw new Error(fe(21));return bp(o),{predicate:s,type:t,effect:o}},wp=Object.assign((e=>{const{type:t,predicate:n,effect:r}=vp(e);return{id:lp(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(fe(22))}}}),{withTypes:()=>wp}),kp=Object.assign(ot(`${ts}/add`),{withTypes:()=>kp});ot(`${ts}/removeAll`);var Ip=Object.assign(ot(`${ts}/remove`),{withTypes:()=>Ip});function fe(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const mi={data:null,isError:!1,isPending:!1,isSuccess:!1},gi=mp({name:"user",initialState:mi,reducers:{reset:e=>{Object.assign(e,mi)},setData:(e,{payload:t})=>{e.data=t},updateData:(e,{payload:t})=>{e.data&&Object.assign(e.data,t)},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setPending:(e,{payload:t})=>{e.isPending=t},setIsError:(e,{payload:t})=>{e.isError=t},setError:(e,{payload:t})=>{e.error=t},updateUser:(e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess,selectIsAdmin:e=>{var t;return"ADMIN"===(null==(t=e.data)?void 0:t.account.role)}}}),Rp=()=>{const e=ii(gi.selectors.selectAccount),t=ii(gi.selectors.selectCurrentUser),{email:n}=e||{},{username:r,id:s}=t||{};Jr.useEffect((()=>{}),[n,r,s])},Cp=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return Sc("exceptionMessage",t),void Dr(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}yc(t)};export{Cp as logErrorToSentry,Tp as sentryClient,Rp as useSentryUser};
|