@powerhousedao/connect 3.2.0-dev.1 → 3.2.0-dev.2
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/dist/assets/AddDriveModal.Dg8qI7zF.js +2 -0
- package/dist/assets/{AddDriveModal.BLTmseCa.js.map → AddDriveModal.Dg8qI7zF.js.map} +1 -1
- package/dist/assets/{AddLocalDriveModal.BmWt-zqx.js → AddLocalDriveModal.n1mqr4Ur.js} +2 -2
- package/dist/assets/{AddLocalDriveModal.BmWt-zqx.js.map → AddLocalDriveModal.n1mqr4Ur.js.map} +1 -1
- package/dist/assets/{AddRemoteDriveModal.B2dLszvc.js → AddRemoteDriveModal.wFq1V4ak.js} +2 -2
- package/dist/assets/{AddRemoteDriveModal.B2dLszvc.js.map → AddRemoteDriveModal.wFq1V4ak.js.map} +1 -1
- package/dist/assets/{ConfirmationModal.BeBmQkT4.js → ConfirmationModal.C8RDHYs4.js} +2 -2
- package/dist/assets/{ConfirmationModal.BeBmQkT4.js.map → ConfirmationModal.C8RDHYs4.js.map} +1 -1
- package/dist/assets/{CookiesPolicyModal.Da5Eremm.js → CookiesPolicyModal.A--L98Lz.js} +2 -2
- package/dist/assets/{CookiesPolicyModal.Da5Eremm.js.map → CookiesPolicyModal.A--L98Lz.js.map} +1 -1
- package/dist/assets/{CreateDocumentModal.CoVOMt_0.js → CreateDocumentModal.CTlEAIeE.js} +2 -2
- package/dist/assets/{CreateDocumentModal.CoVOMt_0.js.map → CreateDocumentModal.CTlEAIeE.js.map} +1 -1
- package/dist/assets/{DebugSettingsModal.BcDdYXbp.js → DebugSettingsModal.ge9vSvds.js} +2 -2
- package/dist/assets/{DebugSettingsModal.BcDdYXbp.js.map → DebugSettingsModal.ge9vSvds.js.map} +1 -1
- package/dist/assets/{DeleteDriveModal.CTBCQ3Gm.js → DeleteDriveModal.ChVVlip-.js} +2 -2
- package/dist/assets/{DeleteDriveModal.CTBCQ3Gm.js.map → DeleteDriveModal.ChVVlip-.js.map} +1 -1
- package/dist/assets/{DeleteItemModal.iAY-B9YV.js → DeleteItemModal.DITFrzCI.js} +2 -2
- package/dist/assets/{DeleteItemModal.iAY-B9YV.js.map → DeleteItemModal.DITFrzCI.js.map} +1 -1
- package/dist/assets/{DisclaimerModal.5nyrmZzU.js → DisclaimerModal.COSJ5Mb3.js} +2 -2
- package/dist/assets/{DisclaimerModal.5nyrmZzU.js.map → DisclaimerModal.COSJ5Mb3.js.map} +1 -1
- package/dist/assets/{DriveSettingsModal.BswCtDqR.js → DriveSettingsModal._ieV-khA.js} +2 -2
- package/dist/assets/{DriveSettingsModal.BswCtDqR.js.map → DriveSettingsModal._ieV-khA.js.map} +1 -1
- package/dist/assets/{SettingsModal.HlCE_fW4.js → SettingsModal.CNXhJSAQ.js} +2 -2
- package/dist/assets/{SettingsModal.HlCE_fW4.js.map → SettingsModal.CNXhJSAQ.js.map} +1 -1
- package/dist/assets/{Trans.kFe2S0Wk.js → Trans.DPLArfzj.js} +2 -2
- package/dist/assets/{Trans.kFe2S0Wk.js.map → Trans.DPLArfzj.js.map} +1 -1
- package/dist/assets/{UpgradeDriveModal.B7mUnNcD.js → UpgradeDriveModal.BQJxekDN.js} +2 -2
- package/dist/assets/{UpgradeDriveModal.B7mUnNcD.js.map → UpgradeDriveModal.BQJxekDN.js.map} +1 -1
- package/dist/assets/app-skeleton.js +1 -1
- package/dist/assets/{app.DDM1o5sK.js → app.BbnOcTCG.js} +6 -6
- package/dist/assets/{app.DDM1o5sK.js.map → app.BbnOcTCG.js.map} +1 -1
- package/dist/assets/{atlas-import.CM7YAl-a.js → atlas-import.CdAYrAZm.js} +2 -2
- package/dist/assets/{atlas-import.CM7YAl-a.js.map → atlas-import.CdAYrAZm.js.map} +1 -1
- package/dist/assets/{connect.config.BX_VBjjD.js → connect.config.D1B0yrHQ.js} +2 -2
- package/dist/assets/{connect.config.BX_VBjjD.js.map → connect.config.D1B0yrHQ.js.map} +1 -1
- package/dist/assets/{content.DO7Rb1MC.js → content.DPtgj4TX.js} +3 -3
- package/dist/assets/{content.DO7Rb1MC.js.map → content.DPtgj4TX.js.map} +1 -1
- package/dist/assets/{cookie-banner.CjS0sCnO.js → cookie-banner.DzQhdZ6U.js} +2 -2
- package/dist/assets/{cookie-banner.CjS0sCnO.js.map → cookie-banner.DzQhdZ6U.js.map} +1 -1
- package/dist/assets/{home.DAJGzOQI.js → home.iojpFGDx.js} +2 -2
- package/dist/assets/{home.DAJGzOQI.js.map → home.iojpFGDx.js.map} +1 -1
- package/dist/assets/{index.CrEQYIWo.js → index.BUc_gRsw.js} +2 -2
- package/dist/assets/{index.CrEQYIWo.js.map → index.BUc_gRsw.js.map} +1 -1
- package/dist/assets/{index.BjA7Jq2g.js → index.BuA9SEd_.js} +13 -13
- package/dist/assets/{index.BjA7Jq2g.js.map → index.BuA9SEd_.js.map} +1 -1
- package/dist/assets/{index.DlyZ17HN.js → index.CEQRMIAY.js} +2 -2
- package/dist/assets/{index.DlyZ17HN.js.map → index.CEQRMIAY.js.map} +1 -1
- package/dist/assets/index.DZzWpM-P.js +3 -0
- package/dist/assets/{index.CMuj8VGl.js.map → index.DZzWpM-P.js.map} +1 -1
- package/dist/assets/{index.D_JmCUwW.js → index.DbeWebdN.js} +2 -2
- package/dist/assets/{index.D_JmCUwW.js.map → index.DbeWebdN.js.map} +1 -1
- package/dist/assets/{index.DxrAJM8l.js → index.Dc5HlSvp.js} +2 -2
- package/dist/assets/{index.DxrAJM8l.js.map → index.Dc5HlSvp.js.map} +1 -1
- package/dist/assets/{index.Dt5syCVo.js → index.DgnEqb-9.js} +2 -2
- package/dist/assets/{index.Dt5syCVo.js.map → index.DgnEqb-9.js.map} +1 -1
- package/dist/assets/{index.dUn3hcfa.js → index.DieAEcFX.js} +2 -2
- package/dist/assets/{index.dUn3hcfa.js.map → index.DieAEcFX.js.map} +1 -1
- package/dist/assets/{main.xXrCT4AZ.js → main.CFKvF5tB.js} +3 -3
- package/dist/assets/{main.xXrCT4AZ.js.map → main.CFKvF5tB.js.map} +1 -1
- package/dist/assets/modal.CeUChdl1.js +3 -0
- package/dist/assets/{modal.DMO71brU.js.map → modal.CeUChdl1.js.map} +1 -1
- package/dist/assets/{modals.CwNNDSU0.js → modals.alORtB6s.js} +2 -2
- package/dist/assets/{modals.CwNNDSU0.js.map → modals.alORtB6s.js.map} +1 -1
- package/dist/assets/nodefs.CGG4X8-i.js +2 -0
- package/dist/assets/{nodefs.7zM7E9uX.js.map → nodefs.CGG4X8-i.js.map} +1 -1
- package/dist/assets/{opfs-ahp.CrrBaIH9.js → opfs-ahp.C0sHT0wj.js} +2 -2
- package/dist/assets/{opfs-ahp.CrrBaIH9.js.map → opfs-ahp.C0sHT0wj.js.map} +1 -1
- package/dist/assets/{react-error-boundary.esm.DcWSXRDX.js → react-error-boundary.esm.uEuLAO53.js} +2 -2
- package/dist/assets/{react-error-boundary.esm.DcWSXRDX.js.map → react-error-boundary.esm.uEuLAO53.js.map} +1 -1
- package/dist/assets/{registerServiceWorker.Dxs_6knN.js → registerServiceWorker.qetnHJss.js} +2 -2
- package/dist/assets/{registerServiceWorker.Dxs_6knN.js.map → registerServiceWorker.qetnHJss.js.map} +1 -1
- package/dist/assets/{root.DBI5tO_9.js → root.bg2pg9lY.js} +3 -3
- package/dist/assets/{root.DBI5tO_9.js.map → root.bg2pg9lY.js.map} +1 -1
- package/dist/assets/{toast.Dw86T5dF.js → toast.Dz6iiaGE.js} +2 -2
- package/dist/assets/{toast.Dw86T5dF.js.map → toast.Dz6iiaGE.js.map} +1 -1
- package/dist/assets/{useAcceptedCookies.DduZlbUw.js → useAcceptedCookies.CrdlDQVI.js} +2 -2
- package/dist/assets/{useAcceptedCookies.DduZlbUw.js.map → useAcceptedCookies.CrdlDQVI.js.map} +1 -1
- package/dist/assets/useConnectConfig.BjHck5jY.js +2 -0
- package/dist/assets/{useConnectConfig.BWdUwe5N.js.map → useConnectConfig.BjHck5jY.js.map} +1 -1
- package/dist/assets/useDefaultDocumentModelEditor.CFfkP7hf.js +2 -0
- package/dist/assets/{useDefaultDocumentModelEditor.BOE2b52Y.js.map → useDefaultDocumentModelEditor.CFfkP7hf.js.map} +1 -1
- package/dist/assets/useDocumentDriveServer.CpN4RUGw.js +2 -0
- package/dist/assets/{useDocumentDriveServer.CEjU49s1.js.map → useDocumentDriveServer.CpN4RUGw.js.map} +1 -1
- package/dist/assets/{useFeatureFlags.B3BoOzef.js → useFeatureFlags.PE3FavSR.js} +2 -2
- package/dist/assets/{useFeatureFlags.B3BoOzef.js.map → useFeatureFlags.PE3FavSR.js.map} +1 -1
- package/dist/assets/{user.BoRGXkj9.js → user.LueWOWdv.js} +5 -5
- package/dist/assets/user.LueWOWdv.js.map +1 -0
- package/dist/external-packages.js +1 -2
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/nginx.conf +9 -1
- package/package.json +9 -9
- package/dist/assets/AddDriveModal.BLTmseCa.js +0 -2
- package/dist/assets/index.CMuj8VGl.js +0 -3
- package/dist/assets/modal.DMO71brU.js +0 -3
- package/dist/assets/nodefs.7zM7E9uX.js +0 -2
- package/dist/assets/useConnectConfig.BWdUwe5N.js +0 -2
- package/dist/assets/useDefaultDocumentModelEditor.BOE2b52Y.js +0 -2
- package/dist/assets/useDocumentDriveServer.CEjU49s1.js +0 -2
- package/dist/assets/user.BoRGXkj9.js.map +0 -1
- package/dist/external-packages.js.map +0 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import{j as fn,t as Rl,k as Dt,D as Ms,l as h,m as ze,G as U,C as aa,n as se,o as bi,p as it,q as Lt,v as ca,w as At,S as Os,x as Pt,y as Ns,z as Te,A as gr,B as Cl,E as xl,F as Ie,H as k,I as ua,J as A,K as ae,L as Al,M as Ds,N as _r,O as Gt,P as pn,Q as Ml,R as lt,T as j,U as ot,V as Ol,W as Nl,X as Jn,Y as yr,Z as la,_ as Dl,$ as Ll,a0 as Pl,a1 as Fl,a2 as $l,a3 as Ei,a4 as Ls,a5 as vi,a6 as Ps,a7 as Fs,a8 as da,a9 as Zn,aa as Ti,ab as He,ac as Yt,ad as $s,ae as oe,af as at,ag as fa,ah as pa,ai as ha,aj as rs,ak as ma,al as ga,am as Bl,an as ss,ao as Ft,ap as Sn,aq as Bs,ar as Ii,as as Hl,at as Mt,au as Hs,av as Ul,aw as Wl,ax as zl,ay as je,az as Qn,aA as Sr,aB as _a,aC as jl,aD as wi,aE as ki,aF as ql,aG as is,aH as Gl,aI as Yl,aJ as Ri,aK as Vl}from"./user.
|
|
1
|
+
import{j as fn,t as Rl,k as Dt,D as Ms,l as h,m as ze,G as U,C as aa,n as se,o as bi,p as it,q as Lt,v as ca,w as At,S as Os,x as Pt,y as Ns,z as Te,A as gr,B as Cl,E as xl,F as Ie,H as k,I as ua,J as A,K as ae,L as Al,M as Ds,N as _r,O as Gt,P as pn,Q as Ml,R as lt,T as j,U as ot,V as Ol,W as Nl,X as Jn,Y as yr,Z as la,_ as Dl,$ as Ll,a0 as Pl,a1 as Fl,a2 as $l,a3 as Ei,a4 as Ls,a5 as vi,a6 as Ps,a7 as Fs,a8 as da,a9 as Zn,aa as Ti,ab as He,ac as Yt,ad as $s,ae as oe,af as at,ag as fa,ah as pa,ai as ha,aj as rs,ak as ma,al as ga,am as Bl,an as ss,ao as Ft,ap as Sn,aq as Bs,ar as Ii,as as Hl,at as Mt,au as Hs,av as Ul,aw as Wl,ax as zl,ay as je,az as Qn,aA as Sr,aB as _a,aC as jl,aD as wi,aE as ki,aF as ql,aG as is,aH as Gl,aI as Yl,aJ as Ri,aK as Vl}from"./user.LueWOWdv.js";import{aL as Mv,aM as Ov,aN as Nv,aO as Dv,aP as Lv,aQ as Pv,aR as Fv,aS as $v,aT as Bv,aU as Hv,aV as Uv,aW as Wv,aX as zv,aY as jv,aZ as qv,a_ as Gv,a$ as Yv}from"./user.LueWOWdv.js";import{p as Ci,az as br}from"./index.Dc5HlSvp.js";import*as me from"react";import"./connect.config.D1B0yrHQ.js";import"./browser.BkwNmV2Z.js";import"react/jsx-runtime";import"react-dom";function ya(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!fn(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=Kl(os(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function os(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(fn(r[s],Error)){xi(o,a);const u=e(t,r[s]),l=c.length;Ai(u,s,l,a),c=os(e,t,n,r[s],s,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(fn(u,Error)){xi(o,a);const d=e(t,u),f=c.length;Ai(d,`errors[${l}]`,f,a),c=os(e,t,n,u,s,[d,...c],d,f)}}),c}function xi(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Ai(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 Kl(e,t){return e.map(n=>(n.value&&(n.value=Rl(n.value,t)),n))}const Xl=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Jl(e){return e==="http"||e==="https"}function dt(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function Sa(e){const t=Xl.exec(e);if(!t){Dt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i,o="",a]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return ba({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function ba(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Zl(e){if(!Ms)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(h.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Jl(r)?t&&isNaN(parseInt(t,10))?(h.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(h.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(h.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ea(e){const t=typeof e=="string"?Sa(e):ba(e);if(!(!t||!Zl(t)))return t}class Ce extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}const Gn={},Mi={};function ft(e,t){Gn[e]=Gn[e]||[],Gn[e].push(t)}function pt(e,t){Mi[e]||(t(),Mi[e]=!0)}function ve(e,t){const n=e&&Gn[e];if(n)for(const r of n)try{r(t)}catch(s){Ms&&h.error(`Error while triggering instrumentation handler.
|
|
2
2
|
Type: ${e}
|
|
3
3
|
Name: ${ze(r)}
|
|
4
4
|
Error:`,s)}}function va(e){const t="console";ft(t,e),pt(t,Ql)}function Ql(){"console"in U&&aa.forEach(function(e){e in U.console&&se(U.console,e,function(t){return bi[e]=t,function(...n){ve("console",{args:n,level:e});const s=bi[e];s&&s.apply(U.console,n)}})})}const bt=U,ed=1e3;let Oi,as,cs;function Ta(e){const t="dom";ft(t,e),pt(t,td)}function td(){if(!bt.document)return;const e=ve.bind(null,"dom"),t=Ni(e,!0);bt.document.addEventListener("click",t,!1),bt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=bt[n]&&bt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(se(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){const d=Ni(e);l.handler=d,s.call(this,i,d,a)}l.refCount++}catch{}return s.call(this,i,o,a)}}),se(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(s.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function nd(e){if(e.type!==as)return!1;try{if(!e.target||e.target._sentryId!==cs)return!1}catch{}return!0}function rd(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Ni(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=sd(n);if(rd(n.type,r))return;it(n,"_sentryCaptured",!0),r&&!r._sentryId&&it(r,"_sentryId",Lt());const s=n.type==="keypress"?"input":n.type;nd(n)||(e({event:n,name:s,global:t}),as=n.type,cs=r?r._sentryId:void 0),clearTimeout(Oi),Oi=bt.setTimeout(()=>{cs=void 0,as=void 0},ed)}}function sd(e){try{return e.target}catch{return null}}const er=ca();function Ia(){if(!("fetch"in er))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function us(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function wa(){if(typeof EdgeRuntime=="string")return!0;if(!Ia())return!1;if(us(er.fetch))return!0;let e=!1;const t=er.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=us(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ms&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function id(){return"ReportingObserver"in er}function Er(e){const t="fetch";ft(t,e),pt(t,od)}function od(){wa()&&se(U,"fetch",function(e){return function(...t){const{method:n,url:r}=ad(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return ve("fetch",{...s}),e.apply(U,t).then(i=>{const o={...s,endTimestamp:Date.now(),response:i};return ve("fetch",o),i},i=>{const o={...s,endTimestamp:Date.now(),error:i};throw ve("fetch",o),i})}})}function ls(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Di(e){return typeof e=="string"?e:e?ls(e,"url")?e.url:e.toString?e.toString():"":""}function ad(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Di(n),method:ls(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Di(t),method:ls(t,"method")?String(t.method).toUpperCase():"GET"}}let On=null;function ka(e){const t="error";ft(t,e),pt(t,cd)}function cd(){On=U.onerror,U.onerror=function(e,t,n,r,s){return ve("error",{column:r,error:s,line:n,msg:e,url:t}),On&&!On.__SENTRY_LOADER__?On.apply(this,arguments):!1},U.onerror.__SENTRY_INSTRUMENTED__=!0}let Nn=null;function Ra(e){const t="unhandledrejection";ft(t,e),pt(t,ud)}function ud(){Nn=U.onunhandledrejection,U.onunhandledrejection=function(e){return ve("unhandledrejection",e),Nn&&!Nn.__SENTRY_LOADER__?Nn.apply(this,arguments):!0},U.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Dn=ca();function ld(){const e=Dn.chrome,t=e&&e.app&&e.app.runtime,n="history"in Dn&&!!Dn.history.pushState&&!!Dn.history.replaceState;return!t&&n}const en=U;let Ln;function bn(e){const t="history";ft(t,e),pt(t,dd)}function dd(){if(!ld())return;const e=en.onpopstate;en.onpopstate=function(...n){const r=en.location.href,s=Ln;if(Ln=r,ve("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=Ln,o=String(s);Ln=o,ve("history",{from:i,to:o})}return n.apply(this,r)}}se(en.history,"pushState",t),se(en.history,"replaceState",t)}const fd=U,Me="__sentry_xhr_v3__";function vr(e){const t="xhr";ft(t,e),pt(t,pd)}function pd(){if(!fd.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;se(e,"open",function(t){return function(...n){const r=Date.now(),s=At(n[0])?n[0].toUpperCase():void 0,i=hd(n[1]);if(!s||!i)return t.apply(this,n);this[Me]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[Me];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};ve("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?se(this,"onreadystatechange",function(a){return function(...c){return o(),a.apply(this,c)}}):this.addEventListener("readystatechange",o),se(this,"setRequestHeader",function(a){return function(...c){const[u,l]=c,d=this[Me];return d&&At(u)&&At(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),t.apply(this,n)}}),se(e,"send",function(t){return function(...n){const r=this[Me];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return ve("xhr",s),t.apply(this,n)}})}function hd(e){if(At(e))return e;try{return e.toString()}catch{}}function md(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function gd(){return"npm"}function _d(){return!md()&&Object.prototype.toString.call(typeof Ci<"u"?Ci:0)==="[object process]"}function ds(){return typeof window<"u"&&(!_d()||yd())}function yd(){return U.process!==void 0&&U.process.type==="renderer"}function Sd(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const s=e[r];s==="."?e.splice(r,1):s===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const bd=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Ed(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=bd.exec(t);return n?n.slice(1):[]}function Li(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const s=r>=0?e[r]:"/";s&&(t=`${s}/${t}`,n=s.charAt(0)==="/")}return t=Sd(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Pi(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function vd(e,t){e=Li(e).slice(1),t=Li(t).slice(1);const n=Pi(e.split("/")),r=Pi(t.split("/")),s=Math.min(n.length,r.length);let i=s;for(let a=0;a<s;a++)if(n[a]!==r[a]){i=a;break}let o=[];for(let a=i;a<n.length;a++)o.push("..");return o=o.concat(r.slice(i)),o.join("/")}function Td(e,t){return Ed(e)[2]}function Id(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]}function s(o){if(!n())return Ns(new Ce("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Os((a,c)=>{let u=t.length;if(!u)return a(!0);const l=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{Pt(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:s,drain:i}}function et(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 wd(e){return e.split(/[\?#]/,1)[0]}function Fi(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}const kd=["fatal","error","warning","log","info","debug"];function Ca(e){return e==="warn"?"warning":kd.includes(e)?e:"log"}function Ne(e,t=[]){return[e,t]}function Rd(e,t){const[n,r]=e;return[n,[...r,t]]}function $t(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Cd(e,t){return $t(e,(n,r)=>t.includes(r))}function fs(e,t){return(t||new TextEncoder).encode(e)}function xa(e,t){const[n,r]=e;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[fs(s,t),o]:s.push(typeof o=="string"?fs(o,t):o)}for(const o of r){const[a,c]=o;if(i(`
|
|
5
5
|
${JSON.stringify(a)}
|
|
6
|
-
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(gr(c))}i(u)}}return typeof s=="string"?s:xd(s)}function xd(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Ad(e,t,n){let r=typeof e=="string"?t.encode(e):e;function s(c){const u=r.subarray(0,c);return r=r.subarray(c+1),u}function i(){let c=r.indexOf(10);return c<0&&(c=r.length),JSON.parse(n.decode(s(c)))}const o=i(),a=[];for(;r.length;){const c=i(),u=typeof c.length=="number"?c.length:void 0;a.push([c,u?s(u):i()])}return[o,a]}function Md(e,t){const n=typeof e.data=="string"?fs(e.data,t):e.data;return[Te({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Od={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function $i(e){return Od[e]}function Us(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Aa(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:dt(r)},...s&&{trace:Te({...s})}}}function Nd(e,t,n){const r=[{type:"client_report"},{timestamp:Cl(),discarded_events:e}];return Ne(t?{dsn:t}:{},[r])}const Dd=60*1e3;function Ma(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Dd:r-t}function Ld(e,t){return e[t]||e.all||0}function Oa(e,t,n=Date.now()){return Ld(e,t)>n}function Na(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,l]=a.split(":",5),d=parseInt(c,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+Ma(o,r):t===429&&(s.all=r+60*1e3);return s}function Pd(e,t){return e(t.stack||"",1)}function Fd(e,t){const n={type:t.name||t.constructor.name,value:t.message},r=Pd(e,t);return r.length&&(n.stacktrace={frames:r}),n}function $d(e,t){return e??t()}function Yn(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Oe(e){return(e||Ie()).getScope().getTransaction()}const UE=xl;let Bi=!1;function Bd(){Bi||(Bi=!0,ka(ps),Ra(ps))}function ps(){const e=Oe();if(e){const t="internal_error";k&&h.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}ps.tag="sentry_tracingErrorCallback";var Hi;(function(e){const t="ok";e.Ok=t;const n="deadline_exceeded";e.DeadlineExceeded=n;const r="unauthenticated";e.Unauthenticated=r;const s="permission_denied";e.PermissionDenied=s;const i="not_found";e.NotFound=i;const o="resource_exhausted";e.ResourceExhausted=o;const a="invalid_argument";e.InvalidArgument=a;const c="unimplemented";e.Unimplemented=c;const u="unavailable";e.Unavailable=u;const l="internal_error";e.InternalError=l;const d="unknown_error";e.UnknownError=d;const f="cancelled";e.Cancelled=f;const p="already_exists";e.AlreadyExists=p;const m="failed_precondition";e.FailedPrecondition=m;const _="aborted";e.Aborted=_;const S="out_of_range";e.OutOfRange=S;const g="data_loss";e.DataLoss=g})(Hi||(Hi={}));function Da(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}const WE=Da;function Ws(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=Da(t);n!=="unknown_error"&&e.setStatus(n)}function zs(e,t,n=()=>{}){let r;try{r=e()}catch(s){throw t(s),n(),s}return Hd(r,t,n)}function Hd(e,t,n){return ua(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function Vt(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=A(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function zE(e,t,n=()=>{},r=()=>{}){const s=Ie(),i=ae(),o=i.getSpan(),a=Ir(e),c=Tr(s,{parentSpan:o,spanContext:a,forceTransaction:!1,scope:i});return i.setSpan(c),zs(()=>t(c),u=>{c&&c.setStatus("internal_error"),n(u,c)},()=>{c&&c.end(),i.setSpan(o),r()})}function jE(e,t){const n=Ir(e);return Ds(()=>lt(e.scope,r=>{const s=Ie(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Tr(s,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return zs(()=>t(a),()=>{if(a){const{status:c}=j(a);(!c||c==="ok")&&a.setStatus("internal_error")}},()=>a&&a.end())}))}function qE(e,t){const n=Ir(e);return Ds(()=>lt(e.scope,r=>{const s=Ie(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Tr(s,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function c(){a&&a.end()}return zs(()=>t(a,c),()=>{if(a&&a.isRecording()){const{status:u}=j(a);(!u||u==="ok")&&a.setStatus("internal_error")}})}))}function tt(e){if(!Vt())return;const t=Ir(e),n=Ie(),r=e.scope?e.scope.getSpan():Kt();if(e.onlyIfParent&&!r)return;const o=(e.scope||ae()).clone();return Tr(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:o})}function Kt(){return ae().getSpan()}const GE=({sentryTrace:e,baggage:t},n)=>{const r=ae(),{traceparentData:s,dynamicSamplingContext:i,propagationContext:o}=Al(e,t);r.setPropagationContext(o),k&&s&&h.log(`[Tracing] Continuing trace ${s.traceId}.`);const a={...s,metadata:Te({dynamicSamplingContext:i})};return n?Ds(()=>n(a)):a};function Tr(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:s}){if(!Vt())return;const i=Gt();let o;if(t&&!r)o=t.startChild(n);else if(t){const a=pn(t),{traceId:c,spanId:u}=t.spanContext(),l=Ml(t);o=e.startTransaction({traceId:c,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:l}={...i.getPropagationContext(),...s.getPropagationContext()};o=e.startTransaction({traceId:a,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return s.setSpan(o),Ud(o,s,i),o}function Ir(e){if(e.startTime){const t={...e};return t.startTimestamp=_r(e.startTime),delete t.startTime,t}return e}const La="_sentryScope",Pa="_sentryIsolationScope";function Ud(e,t,n){e&&(it(e,Pa,n),it(e,La,t))}function Wd(e){return{scope:e[La],isolationScope:e[Pa]}}let rn;function Fa(e){return rn?rn.get(e):void 0}function $a(e){const t=Fa(e);if(!t)return;const n={};for(const[,[r,s]]of t)n[r]||(n[r]=[]),n[r].push(Te(s));return n}function zd(e,t,n,r,s,i){const o=Kt();if(o){const a=Fa(o)||new Map,c=`${e}:${t}@${r}`,u=a.get(i);if(u){const[,l]=u;a.set(i,[c,{min:Math.min(l.min,n),max:Math.max(l.max,n),count:l.count+=1,sum:l.sum+=n,tags:l.tags}])}else a.set(i,[c,{min:n,max:n,count:1,sum:n,tags:s}]);rn||(rn=new WeakMap),rn.set(o,a)}}const ee="sentry.source",Tt="sentry.sample_rate",Ee="sentry.op",he="sentry.origin",jd="profile_id";class Ba{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class wr{constructor(t={}){this._traceId=t.traceId||Lt(),this._spanId=t.spanId||Lt().substring(16),this._startTime=t.startTimestamp||ot(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[he]:t.origin||"manual",[Ee]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[Ee]}set op(t){this.setAttribute(Ee,t)}get origin(){return this._attributes[he]}set origin(t){this.setAttribute(he,t)}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Ol:Nl}}startChild(t){const n=new wr({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=Jn(this);if(n.transaction=r,k&&r){const s=t&&t.op||"< unknown op >",i=j(n).description||"< unknown name >",o=r.spanContext().spanId,a=`[Tracing] Starting '${s}' span on transaction '${i}' (${o}).`;h.log(a),this._logMessage=a}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return Ws(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const n=Jn(this);if(k&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&h.log(r.replace("Starting","Finishing"))}this._endTime=_r(t)}toTraceparent(){return yr(this)}toContext(){return Te({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return la(this)}getSpanJSON(){return Te({data:this._getData(),description:this._name,op:this._attributes[Ee],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[he],_metrics_summary:$a(this),profile_id:this._attributes[jd],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:n}=this,r=Object.keys(t).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?{...t,...n}:r?t:n}}class Ha extends wr{constructor(t,n){super(t),this._contexts={},this._hub=n||Ie(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[ee]&&{source:this._attributes[ee]},...this._attributes[Tt]&&{sampleRate:this._attributes[Tt]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(ee,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Ba(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const n=_r(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const t=super.toContext();return Te({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return pn(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(k&&h.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){k&&h.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&j(l).timestamp):[];if(this._trimEnd&&r.length>0){const l=r.map(d=>j(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,f)=>d>f?d:f)}const{scope:s,isolationScope:i}=Wd(this),{metadata:o}=this,{source:a}=o,c={contexts:{...this._contexts,trace:la(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...o,capturedSpanScope:s,capturedSpanIsolationScope:i,...Te({dynamicSamplingContext:pn(this)})},_metrics_summary:$a(this),...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(k&&h.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),k&&h.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const sn={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},qd="finishReason",_t=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Gd extends Ba{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),j(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class Yd extends Ha{constructor(t,n,r=sn.idleTimeout,s=sn.finalTimeout,i=sn.heartbeatInterval,o=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=_t[4],this._autoFinishAllowed=!a,o&&(k&&h.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=_t[3],this.end())},this._finalTimeout)}end(t){const n=_r(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(qd,this._finishReason),this.spanRecorder){k&&h.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;j(r).timestamp||(r.setStatus("cancelled"),r.end(n),k&&h.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:s,timestamp:i}=j(r),o=s&&s<n,a=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&s&&i-s<a;if(k){const u=JSON.stringify(r,void 0,2);o?c||h.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):h.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return o&&c}),k&&h.log("[Tracing] flushing IdleTransaction")}else k&&h.log("[Tracing] No active IdleTransaction");if(this._onScope){const r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const n=s=>{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new Gd(n,r,this.spanContext().spanId,t),k&&h.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=_t[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(k&&h.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=_t[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),k&&h.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,k&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(k&&h.log(`[Tracing] popActivity ${t}`),delete this.activities[t],k&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=ot();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=_t[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(k&&h.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=_t[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){k&&h.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Ua(e,t,n){if(!Vt(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(Tt,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(Tt,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(Tt,Number(r))):(r=1,e.setAttribute(Tt,r)),Wa(r)?r?(e.sampled=Math.random()<r,e.sampled?(k&&h.log(`[Tracing] starting ${e.op} transaction - ${j(e).description}`),e):(k&&h.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(k&&h.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(k&&h.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Wa(e){return Dl(e)||!(typeof e=="number"||typeof e=="boolean")?(k&&h.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)}.`),!1):e<0||e>1?(k&&h.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function Vd(){const t=this.getScope().getSpan();return t?{"sentry-trace":yr(t)}:{}}function Kd(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=e.instrumenter||"sentry";s!==i&&(k&&h.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
|
|
7
|
-
The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let o=new Ha(e,this);return o=Ua(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function tr(e,t,n,r,s,i,o,a=!1){const c=e.getClient(),u=c&&c.getOptions()||{};let l=new Yd(t,e,n,r,o,s,a);return l=Ua(l,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...i}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function za(){const e=Ll();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=Kd),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Vd),Bd())}function Xd(e,t,n){const r=Oe();r&&r.setMeasurement(e,t,n)}function Jd(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 Zd(e,t,n,r){const s=Us(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:dt(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Ne(i,[o])}function ja(e,t,n,r){const s=Us(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Jd(e,n&&n.sdk);const o=Aa(e,s,r,t);return delete e.sdkProcessingMetadata,Ne(o,[[{type:i},e]])}const Qd="7";function qa(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ef(e){return`${qa(e)}${e.projectId}/envelope/`}function tf(e,t){return Pl({sentry_key:e.publicKey,sentry_version:Qd,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Ga(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${ef(e)}?${tf(e,r)}`}function nf(e,t){const n=Ea(e);if(!n)return"";const r=`${qa(n)}embed/error-page/`;let s=`dsn=${dt(n)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const o=t.user;if(!o)continue;o.name&&(s+=`&name=${encodeURIComponent(o.name)}`),o.email&&(s+=`&email=${encodeURIComponent(o.email)}`)}else s+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${s}`}const Ui=[];function rf(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function sf(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Fl(n(t)):r=t;const s=rf(r),i=af(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function of(e,t){const n={};return t.forEach(r=>{r&&Ya(e,r,n)}),n}function Wi(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ya(e,t,n){if(n[t.name]){k&&h.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Ui.indexOf(t.name)===-1&&(t.setupOnce($l,Ie),Ui.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}k&&h.log(`Integration installed: ${t.name}`)}function
|
|
6
|
+
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(gr(c))}i(u)}}return typeof s=="string"?s:xd(s)}function xd(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Ad(e,t,n){let r=typeof e=="string"?t.encode(e):e;function s(c){const u=r.subarray(0,c);return r=r.subarray(c+1),u}function i(){let c=r.indexOf(10);return c<0&&(c=r.length),JSON.parse(n.decode(s(c)))}const o=i(),a=[];for(;r.length;){const c=i(),u=typeof c.length=="number"?c.length:void 0;a.push([c,u?s(u):i()])}return[o,a]}function Md(e,t){const n=typeof e.data=="string"?fs(e.data,t):e.data;return[Te({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Od={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function $i(e){return Od[e]}function Us(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Aa(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:dt(r)},...s&&{trace:Te({...s})}}}function Nd(e,t,n){const r=[{type:"client_report"},{timestamp:Cl(),discarded_events:e}];return Ne(t?{dsn:t}:{},[r])}const Dd=60*1e3;function Ma(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Dd:r-t}function Ld(e,t){return e[t]||e.all||0}function Oa(e,t,n=Date.now()){return Ld(e,t)>n}function Na(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,l]=a.split(":",5),d=parseInt(c,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+Ma(o,r):t===429&&(s.all=r+60*1e3);return s}function Pd(e,t){return e(t.stack||"",1)}function Fd(e,t){const n={type:t.name||t.constructor.name,value:t.message},r=Pd(e,t);return r.length&&(n.stacktrace={frames:r}),n}function $d(e,t){return e??t()}function Yn(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Oe(e){return(e||Ie()).getScope().getTransaction()}const zE=xl;let Bi=!1;function Bd(){Bi||(Bi=!0,ka(ps),Ra(ps))}function ps(){const e=Oe();if(e){const t="internal_error";k&&h.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}ps.tag="sentry_tracingErrorCallback";var Hi;(function(e){const t="ok";e.Ok=t;const n="deadline_exceeded";e.DeadlineExceeded=n;const r="unauthenticated";e.Unauthenticated=r;const s="permission_denied";e.PermissionDenied=s;const i="not_found";e.NotFound=i;const o="resource_exhausted";e.ResourceExhausted=o;const a="invalid_argument";e.InvalidArgument=a;const c="unimplemented";e.Unimplemented=c;const u="unavailable";e.Unavailable=u;const l="internal_error";e.InternalError=l;const d="unknown_error";e.UnknownError=d;const f="cancelled";e.Cancelled=f;const p="already_exists";e.AlreadyExists=p;const m="failed_precondition";e.FailedPrecondition=m;const _="aborted";e.Aborted=_;const S="out_of_range";e.OutOfRange=S;const g="data_loss";e.DataLoss=g})(Hi||(Hi={}));function Da(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}const jE=Da;function Ws(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=Da(t);n!=="unknown_error"&&e.setStatus(n)}function zs(e,t,n=()=>{}){let r;try{r=e()}catch(s){throw t(s),n(),s}return Hd(r,t,n)}function Hd(e,t,n){return ua(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function Vt(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=A(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function qE(e,t,n=()=>{},r=()=>{}){const s=Ie(),i=ae(),o=i.getSpan(),a=Ir(e),c=Tr(s,{parentSpan:o,spanContext:a,forceTransaction:!1,scope:i});return i.setSpan(c),zs(()=>t(c),u=>{c&&c.setStatus("internal_error"),n(u,c)},()=>{c&&c.end(),i.setSpan(o),r()})}function GE(e,t){const n=Ir(e);return Ds(()=>lt(e.scope,r=>{const s=Ie(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Tr(s,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return zs(()=>t(a),()=>{if(a){const{status:c}=j(a);(!c||c==="ok")&&a.setStatus("internal_error")}},()=>a&&a.end())}))}function YE(e,t){const n=Ir(e);return Ds(()=>lt(e.scope,r=>{const s=Ie(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Tr(s,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function c(){a&&a.end()}return zs(()=>t(a,c),()=>{if(a&&a.isRecording()){const{status:u}=j(a);(!u||u==="ok")&&a.setStatus("internal_error")}})}))}function tt(e){if(!Vt())return;const t=Ir(e),n=Ie(),r=e.scope?e.scope.getSpan():Kt();if(e.onlyIfParent&&!r)return;const o=(e.scope||ae()).clone();return Tr(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:o})}function Kt(){return ae().getSpan()}const VE=({sentryTrace:e,baggage:t},n)=>{const r=ae(),{traceparentData:s,dynamicSamplingContext:i,propagationContext:o}=Al(e,t);r.setPropagationContext(o),k&&s&&h.log(`[Tracing] Continuing trace ${s.traceId}.`);const a={...s,metadata:Te({dynamicSamplingContext:i})};return n?Ds(()=>n(a)):a};function Tr(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:s}){if(!Vt())return;const i=Gt();let o;if(t&&!r)o=t.startChild(n);else if(t){const a=pn(t),{traceId:c,spanId:u}=t.spanContext(),l=Ml(t);o=e.startTransaction({traceId:c,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:l}={...i.getPropagationContext(),...s.getPropagationContext()};o=e.startTransaction({traceId:a,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return s.setSpan(o),Ud(o,s,i),o}function Ir(e){if(e.startTime){const t={...e};return t.startTimestamp=_r(e.startTime),delete t.startTime,t}return e}const La="_sentryScope",Pa="_sentryIsolationScope";function Ud(e,t,n){e&&(it(e,Pa,n),it(e,La,t))}function Wd(e){return{scope:e[La],isolationScope:e[Pa]}}let rn;function Fa(e){return rn?rn.get(e):void 0}function $a(e){const t=Fa(e);if(!t)return;const n={};for(const[,[r,s]]of t)n[r]||(n[r]=[]),n[r].push(Te(s));return n}function zd(e,t,n,r,s,i){const o=Kt();if(o){const a=Fa(o)||new Map,c=`${e}:${t}@${r}`,u=a.get(i);if(u){const[,l]=u;a.set(i,[c,{min:Math.min(l.min,n),max:Math.max(l.max,n),count:l.count+=1,sum:l.sum+=n,tags:l.tags}])}else a.set(i,[c,{min:n,max:n,count:1,sum:n,tags:s}]);rn||(rn=new WeakMap),rn.set(o,a)}}const ee="sentry.source",Tt="sentry.sample_rate",Ee="sentry.op",he="sentry.origin",jd="profile_id";class Ba{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class wr{constructor(t={}){this._traceId=t.traceId||Lt(),this._spanId=t.spanId||Lt().substring(16),this._startTime=t.startTimestamp||ot(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[he]:t.origin||"manual",[Ee]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[Ee]}set op(t){this.setAttribute(Ee,t)}get origin(){return this._attributes[he]}set origin(t){this.setAttribute(he,t)}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Ol:Nl}}startChild(t){const n=new wr({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=Jn(this);if(n.transaction=r,k&&r){const s=t&&t.op||"< unknown op >",i=j(n).description||"< unknown name >",o=r.spanContext().spanId,a=`[Tracing] Starting '${s}' span on transaction '${i}' (${o}).`;h.log(a),this._logMessage=a}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return Ws(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const n=Jn(this);if(k&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&h.log(r.replace("Starting","Finishing"))}this._endTime=_r(t)}toTraceparent(){return yr(this)}toContext(){return Te({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return la(this)}getSpanJSON(){return Te({data:this._getData(),description:this._name,op:this._attributes[Ee],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[he],_metrics_summary:$a(this),profile_id:this._attributes[jd],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:n}=this,r=Object.keys(t).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?{...t,...n}:r?t:n}}class Ha extends wr{constructor(t,n){super(t),this._contexts={},this._hub=n||Ie(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[ee]&&{source:this._attributes[ee]},...this._attributes[Tt]&&{sampleRate:this._attributes[Tt]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(ee,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Ba(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const n=_r(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const t=super.toContext();return Te({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return pn(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(k&&h.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){k&&h.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&j(l).timestamp):[];if(this._trimEnd&&r.length>0){const l=r.map(d=>j(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,f)=>d>f?d:f)}const{scope:s,isolationScope:i}=Wd(this),{metadata:o}=this,{source:a}=o,c={contexts:{...this._contexts,trace:la(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...o,capturedSpanScope:s,capturedSpanIsolationScope:i,...Te({dynamicSamplingContext:pn(this)})},_metrics_summary:$a(this),...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(k&&h.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),k&&h.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const sn={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},qd="finishReason",_t=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Gd extends Ba{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),j(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class Yd extends Ha{constructor(t,n,r=sn.idleTimeout,s=sn.finalTimeout,i=sn.heartbeatInterval,o=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=_t[4],this._autoFinishAllowed=!a,o&&(k&&h.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=_t[3],this.end())},this._finalTimeout)}end(t){const n=_r(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(qd,this._finishReason),this.spanRecorder){k&&h.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;j(r).timestamp||(r.setStatus("cancelled"),r.end(n),k&&h.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:s,timestamp:i}=j(r),o=s&&s<n,a=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&s&&i-s<a;if(k){const u=JSON.stringify(r,void 0,2);o?c||h.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):h.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return o&&c}),k&&h.log("[Tracing] flushing IdleTransaction")}else k&&h.log("[Tracing] No active IdleTransaction");if(this._onScope){const r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const n=s=>{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new Gd(n,r,this.spanContext().spanId,t),k&&h.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=_t[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(k&&h.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=_t[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),k&&h.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,k&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(k&&h.log(`[Tracing] popActivity ${t}`),delete this.activities[t],k&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=ot();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=_t[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(k&&h.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=_t[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){k&&h.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Ua(e,t,n){if(!Vt(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(Tt,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(Tt,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(Tt,Number(r))):(r=1,e.setAttribute(Tt,r)),Wa(r)?r?(e.sampled=Math.random()<r,e.sampled?(k&&h.log(`[Tracing] starting ${e.op} transaction - ${j(e).description}`),e):(k&&h.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(k&&h.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(k&&h.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Wa(e){return Dl(e)||!(typeof e=="number"||typeof e=="boolean")?(k&&h.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)}.`),!1):e<0||e>1?(k&&h.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function Vd(){const t=this.getScope().getSpan();return t?{"sentry-trace":yr(t)}:{}}function Kd(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=e.instrumenter||"sentry";s!==i&&(k&&h.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
|
|
7
|
+
The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let o=new Ha(e,this);return o=Ua(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function tr(e,t,n,r,s,i,o,a=!1){const c=e.getClient(),u=c&&c.getOptions()||{};let l=new Yd(t,e,n,r,o,s,a);return l=Ua(l,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...i}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function za(){const e=Ll();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=Kd),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Vd),Bd())}function Xd(e,t,n){const r=Oe();r&&r.setMeasurement(e,t,n)}function Jd(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 Zd(e,t,n,r){const s=Us(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:dt(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Ne(i,[o])}function ja(e,t,n,r){const s=Us(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Jd(e,n&&n.sdk);const o=Aa(e,s,r,t);return delete e.sdkProcessingMetadata,Ne(o,[[{type:i},e]])}const Qd="7";function qa(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ef(e){return`${qa(e)}${e.projectId}/envelope/`}function tf(e,t){return Pl({sentry_key:e.publicKey,sentry_version:Qd,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Ga(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${ef(e)}?${tf(e,r)}`}function nf(e,t){const n=Ea(e);if(!n)return"";const r=`${qa(n)}embed/error-page/`;let s=`dsn=${dt(n)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const o=t.user;if(!o)continue;o.name&&(s+=`&name=${encodeURIComponent(o.name)}`),o.email&&(s+=`&email=${encodeURIComponent(o.email)}`)}else s+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${s}`}const Ui=[];function rf(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function sf(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Fl(n(t)):r=t;const s=rf(r),i=af(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function of(e,t){const n={};return t.forEach(r=>{r&&Ya(e,r,n)}),n}function Wi(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ya(e,t,n){if(n[t.name]){k&&h.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Ui.indexOf(t.name)===-1&&(t.setupOnce($l,Ie),Ui.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}k&&h.log(`Integration installed: ${t.name}`)}function KE(e){const t=A();if(!t||!t.addIntegration){k&&h.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function af(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function Z(e,t){return Object.assign(function(...r){return t(...r)},{id:e})}function cf(e,t,n,r){const s=Object.entries(Te(r)).sort((i,o)=>i[0].localeCompare(o[0]));return`${e}${t}${n}${s}`}function uf(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t>>>0}function lf(e){let t="";for(const n of e){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([i,o])=>`${i}:${o}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
|
|
8
8
|
`}return t}function df(e){return e.replace(/[^\w]+/gi,"_")}function ff(e){return e.replace(/[^\w\-.]+/gi,"_")}function pf(e){return e.replace(/[^\w\-./]+/gi,"")}const hf=[[`
|
|
9
9
|
`,"\\n"],["\r","\\r"],[" ","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function mf(e){for(const[t,n]of hf)if(e===t)return n;return e}function gf(e){return[...e].reduce((t,n)=>t+mf(n),"")}function _f(e){const t={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=pf(n);t[r]=gf(String(e[n]))}return t}function yf(e,t,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=dt(t));const i=Sf(e);return Ne(s,[i])}function Sf(e){const t=lf(e);return[{type:"statsd",length:t.length},t]}const zi="Not capturing exception because it's already been captured.";class bf{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Ea(t.dsn):k&&h.warn("No DSN provided, client will not send events."),this._dsn){const n=Ga(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(Ei(t)){k&&h.log(zi);return}let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(t,n,r,s){let i=r&&r.event_id;const o=da(t)?t:String(t),a=Ls(t)?this.eventFromMessage(o,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{i=c})),i}captureEvent(t,n,r){if(n&&n.originalException&&Ei(n.originalException)){k&&h.log(zi);return}let s=n&&n.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,o||r).then(a=>{s=a})),s}captureSession(t){typeof t.release!="string"?k&&h.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),vi(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Pt(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return k&&h.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];Ya(this,t,this._integrations),n||Wi(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=ja(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Rd(r,Md(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=Zd(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${t}:${n}`;k&&h.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}captureAggregateMetrics(t){k&&h.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=yf(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=of(this,t),Wi(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(vi(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Os(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=Gt()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),Ps(i,t,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:l,spanId:d,parentSpanId:f,dsc:p}=c;a.contexts={trace:{trace_id:l,span_id:d,parent_span_id:f},...a.contexts};const m=p||Fs(l,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:m,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(k){const i=s;i.logLevel==="log"?h.log(i.message):h.warn(i)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=Ka(t),a=Va(t),c=t.type||"error",u=`before send for type \`${c}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Ns(new Ce(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l=c==="replay_event"?"replay":c,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l,t),new Ce("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const _=vf(s,p,n);return Ef(_,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",l,t),o){const g=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",g)}throw new Ce(`${u} returned \`null\`, will not send event.`,"log")}const m=r&&r.getSession();if(!o&&m&&this._updateSessionFromEvent(m,p),o){const S=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,g=p.spans?p.spans.length:0,y=S-g;y>0&&this.recordDroppedEvent("before_send","span",y)}const _=p.transaction_info;if(o&&_&&p.transaction!==t.transaction){const S="custom";p.transaction_info={..._,source:S}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof Ce?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new Ce(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
-
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{k&&h.error("Error while sending event:",n)});k&&h.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function Ef(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ua(e))return e.then(r=>{if(!Zn(r)&&r!==null)throw new Ce(n);return r},r=>{throw new Ce(`${t} rejected with ${r}`)});if(!Zn(e)&&e!==null)throw new Ce(n);return e}function vf(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;if(Va(t)&&r)return r(t,n);if(Ka(t)&&s){if(t.spans){const i=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:i}}return s(t,n)}return t}function Va(e){return e.type===void 0}function Ka(e){return e.type==="transaction"}function Tf(e){const t=A();!t||!t.addEventProcessor||t.addEventProcessor(e)}const Xa="c",Ja="g",js="s",Za="d",If=5e3;class wf{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}}class kf{constructor(t){this._last=t,this._min=t,this._max=t,this._sum=t,this._count=1}get weight(){return 5}add(t){this._last=t,t<this._min&&(this._min=t),t>this._max&&(this._max=t),this._sum+=t,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class Rf{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}}class Cf{constructor(t){this.first=t,this._value=new Set([t])}get weight(){return this._value.size}add(t){this._value.add(t)}toString(){return Array.from(this._value).map(t=>typeof t=="string"?uf(t):t).join(":")}}const xf={[Xa]:wf,[Ja]:kf,[Za]:Rf,[js]:Cf};function Af(e,t){t.debug===!0&&(k?h.enable():Dt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ae().update(t.initialScope);const r=new e(t);Mf(r),Of(r)}function Mf(e){const n=Ie().getStackTop();n.client=e,n.scope.setClient(e)}function Of(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const Nf=30;function Qa(e,t,n=Id(e.bufferSize||Nf)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if($t(o,(d,f)=>{const p=$i(f);if(Oa(r,p)){const m=ji(d,f);e.recordDroppedEvent("ratelimit_backoff",p,m)}else a.push(d)}),a.length===0)return Pt();const c=Ne(o[0],a),u=d=>{$t(c,(f,p)=>{const m=ji(f,p);e.recordDroppedEvent(d,$i(p),m)})},l=()=>t({body:xa(c,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&k&&h.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Na(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof Ce)return k&&h.error("Skipped sending event because buffer is full."),u("queue_overflow"),Pt();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function ji(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}const Df=100,qi=5e3,Lf=36e5;function zr(e,t){k&&h.info(`[Offline]: ${e}`,t)}function Pf(e){return t=>{const n=e(t),r=t.createStore?t.createStore(t):void 0;let s=qi,i;function o(l,d,f){return Cd(l,["replay_event","replay_recording","client_report"])?!1:t.shouldStore?t.shouldStore(l,d,f):!0}function a(l){r&&(i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const d=await r.pop();d&&(zr("Attempting to send previously queued event"),u(d).catch(f=>{zr("Failed to retry sending",f)}))},l),typeof i!="number"&&i.unref&&i.unref())}function c(){i||(a(s),s=Math.min(s*2,Lf))}async function u(l){try{const d=await n.send(l);let f=Df;if(d){if(d.headers&&d.headers["retry-after"])f=Ma(d.headers["retry-after"]);else if((d.statusCode||0)>=400)return d}return a(f),s=qi,d}catch(d){if(r&&await o(l,d,s))return await r.insert(l),c(),zr("Error sending. Event queued",d),{};throw d}}return t.flushAtStartup&&c(),{send:u,flush:l=>n.flush(l)}}}function ec(e,t){let n;return $t(e,(r,s)=>(t.includes(s)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Ff(e,t){return n=>{const r=e(n);return{...r,send:async s=>{const i=ec(s,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(s)}}}}function $f(e,t){return Ne(t?{...e[0],dsn:t}:e[0],e[1])}function
|
|
10
|
+
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{k&&h.error("Error while sending event:",n)});k&&h.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function Ef(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ua(e))return e.then(r=>{if(!Zn(r)&&r!==null)throw new Ce(n);return r},r=>{throw new Ce(`${t} rejected with ${r}`)});if(!Zn(e)&&e!==null)throw new Ce(n);return e}function vf(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;if(Va(t)&&r)return r(t,n);if(Ka(t)&&s){if(t.spans){const i=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:i}}return s(t,n)}return t}function Va(e){return e.type===void 0}function Ka(e){return e.type==="transaction"}function Tf(e){const t=A();!t||!t.addEventProcessor||t.addEventProcessor(e)}const Xa="c",Ja="g",js="s",Za="d",If=5e3;class wf{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}}class kf{constructor(t){this._last=t,this._min=t,this._max=t,this._sum=t,this._count=1}get weight(){return 5}add(t){this._last=t,t<this._min&&(this._min=t),t>this._max&&(this._max=t),this._sum+=t,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class Rf{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}}class Cf{constructor(t){this.first=t,this._value=new Set([t])}get weight(){return this._value.size}add(t){this._value.add(t)}toString(){return Array.from(this._value).map(t=>typeof t=="string"?uf(t):t).join(":")}}const xf={[Xa]:wf,[Ja]:kf,[Za]:Rf,[js]:Cf};function Af(e,t){t.debug===!0&&(k?h.enable():Dt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ae().update(t.initialScope);const r=new e(t);Mf(r),Of(r)}function Mf(e){const n=Ie().getStackTop();n.client=e,n.scope.setClient(e)}function Of(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const Nf=30;function Qa(e,t,n=Id(e.bufferSize||Nf)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if($t(o,(d,f)=>{const p=$i(f);if(Oa(r,p)){const m=ji(d,f);e.recordDroppedEvent("ratelimit_backoff",p,m)}else a.push(d)}),a.length===0)return Pt();const c=Ne(o[0],a),u=d=>{$t(c,(f,p)=>{const m=ji(f,p);e.recordDroppedEvent(d,$i(p),m)})},l=()=>t({body:xa(c,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&k&&h.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Na(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof Ce)return k&&h.error("Skipped sending event because buffer is full."),u("queue_overflow"),Pt();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function ji(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}const Df=100,qi=5e3,Lf=36e5;function zr(e,t){k&&h.info(`[Offline]: ${e}`,t)}function Pf(e){return t=>{const n=e(t),r=t.createStore?t.createStore(t):void 0;let s=qi,i;function o(l,d,f){return Cd(l,["replay_event","replay_recording","client_report"])?!1:t.shouldStore?t.shouldStore(l,d,f):!0}function a(l){r&&(i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const d=await r.pop();d&&(zr("Attempting to send previously queued event"),u(d).catch(f=>{zr("Failed to retry sending",f)}))},l),typeof i!="number"&&i.unref&&i.unref())}function c(){i||(a(s),s=Math.min(s*2,Lf))}async function u(l){try{const d=await n.send(l);let f=Df;if(d){if(d.headers&&d.headers["retry-after"])f=Ma(d.headers["retry-after"]);else if((d.statusCode||0)>=400)return d}return a(f),s=qi,d}catch(d){if(r&&await o(l,d,s))return await r.insert(l),c(),zr("Error sending. Event queued",d),{};throw d}}return t.flushAtStartup&&c(),{send:u,flush:l=>n.flush(l)}}}function ec(e,t){let n;return $t(e,(r,s)=>(t.includes(s)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Ff(e,t){return n=>{const r=e(n);return{...r,send:async s=>{const i=ec(s,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(s)}}}}function $f(e,t){return Ne(t?{...e[0],dsn:t}:e[0],e[1])}function XE(e,t){return n=>{const r=e(n),s=new Map;function i(c,u){const l=u?`${c}:${u}`:c;let d=s.get(l);if(!d){const f=Sa(c);if(!f)return;const p=Ga(f,n.tunnel);d=u?Ff(e,u)({...n,url:p}):e({...n,url:p}),s.set(l,d)}return[c,d]}async function o(c){function u(f){const p=f&&f.length?f:["event"];return ec(c,p)}const l=t({envelope:c,getEvent:u}).map(f=>typeof f=="string"?i(f,void 0):i(f.dsn,f.release)).filter(f=>!!f);return l.length===0&&l.push(["",r]),(await Promise.all(l.map(([f,p])=>p.send($f(c,f)))))[0]}async function a(c){const u=[await r.flush(c)];for(const[,l]of s)u.push(await l.flush(c));return u.every(l=>l)}return{send:o,flush:a}}}function Bf(e,t){const n={sent_at:new Date().toISOString()};t&&(n.dsn=dt(t));const r=e.map(Hf);return Ne(n,r)}function Hf(e){return[{type:"span"},e]}function tc(e,t){const n=t&&zf(t)?t.getClient():t,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return Wf(e,r)||Uf(e,s)}function Uf(e,t){return t?Gi(e)===Gi(t):!1}function Wf(e,t){return t?e.includes(t.host):!1}function Gi(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function zf(e){return e.getClient!==void 0}function JE(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}function nc(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Ti})),version:Ti}),e._metadata=s}const rc=new Map,Yi=new Set;function jf(e){if(U._sentryModuleMetadata)for(const t of Object.keys(U._sentryModuleMetadata)){const n=U._sentryModuleMetadata[t];if(Yi.has(t))continue;Yi.add(t);const r=e(t);for(const s of r.reverse())if(s.filename){rc.set(s.filename,n);break}}}function qf(e,t){return jf(e),rc.get(t)}function Gf(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename)continue;const s=qf(e,r.filename);s&&(r.module_metadata=s)}})}catch{}}function Yf(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}const sc="ModuleMetadata",Vf=()=>({name:sc,setupOnce(){},setup(e){typeof e.on=="function"&&e.on("beforeEnvelope",t=>{$t(t,(n,r)=>{if(r==="event"){const s=Array.isArray(n)?n[1]:void 0;s&&(Yf(s),n[1]=s)}})})},processEvent(e,t,n){const r=n.getOptions().stackParser;return Gf(r,e),e}}),Kf=Vf,ZE=Z(sc,Kf),Xf=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],Jf=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],ic="InboundFilters",Zf=(e={})=>({name:ic,setupOnce(){},processEvent(t,n,r){const s=r.getOptions(),i=ep(e,s);return tp(t,i)?null:t}}),oc=Zf,Qf=Z(ic,oc);function ep(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Xf],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Jf],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function tp(e,t){return t.ignoreInternal&&ap(e)?(k&&h.warn(`Event dropped due to being internal Sentry Error.
|
|
11
11
|
Event: ${He(e)}`),!0):np(e,t.ignoreErrors)?(k&&h.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
12
12
|
Event: ${He(e)}`),!0):rp(e,t.ignoreTransactions)?(k&&h.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
13
13
|
Event: ${He(e)}`),!0):sp(e,t.denyUrls)?(k&&h.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
14
|
Event: ${He(e)}.
|
|
15
15
|
Url: ${nr(e)}`),!0):ip(e,t.allowUrls)?!1:(k&&h.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
16
|
Event: ${He(e)}.
|
|
17
|
-
Url: ${nr(e)}`),!0)}function np(e,t){return e.type||!t||!t.length?!1:op(e).some(n=>Yt(n,t))}function rp(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Yt(n,t):!1}function sp(e,t){if(!t||!t.length)return!1;const n=nr(e);return n?Yt(n,t):!1}function ip(e,t){if(!t||!t.length)return!0;const n=nr(e);return n?Yt(n,t):!0}function op(e){const t=[];e.message&&t.push(e.message);let n;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}`)),k&&t.length===0&&h.error(`Could not extract message for event ${He(e)}`),t}function ap(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function cp(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function nr(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?cp(t):null}catch{return k&&h.error(`Cannot extract url for event ${He(e)}`),null}}let Vi;const ac="FunctionToString",Ki=new WeakMap,up=()=>({name:ac,setupOnce(){Vi=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=$s(this),n=Ki.has(A())&&t!==void 0?t:this;return Vi.apply(n,e)}}catch{}},setup(e){Ki.set(e,!0)}}),cc=up,lp=Z(ac,cc),dp="cause",fp=5,uc="LinkedErrors",pp=(e={})=>{const t=e.limit||fp,n=e.key||dp;return{name:uc,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();ya(Fd,o.stackParser,o.maxValueLength,n,t,r,s)}}},hp=pp,mp=Z(uc,hp),gp=Object.freeze(Object.defineProperty({__proto__:null,FunctionToString:lp,InboundFilters:Qf,LinkedErrors:mp},Symbol.toStringTag,{value:"Module"}));class _p{constructor(t){this._client=t,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),If)}add(t,n,r,s="none",i={},o=ot()){const a=Math.floor(o),c=ff(n),u=_f(i),l=df(s),d=cf(t,c,l,u);let f=this._buckets.get(d);const p=f&&t===js?f.metric.weight:0;f?(f.metric.add(r),f.timestamp<a&&(f.timestamp=a)):(f={metric:new xf[t](r),timestamp:a,metricType:t,name:c,unit:l,tags:u},this._buckets.set(d,f));const m=typeof r=="string"?f.metric.weight-p:r;zd(t,c,m,l,i,d)}flush(){if(this._buckets.size!==0){if(this._client.captureAggregateMetrics){const t=Array.from(this._buckets).map(([,n])=>n);this._client.captureAggregateMetrics(t)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}}const lc="MetricsAggregator",yp=()=>({name:lc,setupOnce(){},setup(e){e.metricsAggregator=new _p(e)}}),dc=yp,Sp=Z(lc,dc);function kr(e,t,n,r={}){const s=A(),i=ae();if(s){if(!s.metricsAggregator){k&&h.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs");return}const{unit:o,tags:a,timestamp:c}=r,{release:u,environment:l}=s.getOptions(),d=i.getTransaction(),f={};u&&(f.release=u),l&&(f.environment=l),d&&(f.transaction=j(d).description||""),k&&h.log(`Adding value of ${n} to ${e} metric ${t}`),s.metricsAggregator.add(e,t,n,o,{...f,...a},c)}}function bp(e,t=1,n){kr(Xa,e,t,n)}function Ep(e,t,n){kr(Za,e,t,n)}function vp(e,t,n){kr(js,e,t,n)}function Tp(e,t,n){kr(Ja,e,t,n)}const
|
|
17
|
+
Url: ${nr(e)}`),!0)}function np(e,t){return e.type||!t||!t.length?!1:op(e).some(n=>Yt(n,t))}function rp(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Yt(n,t):!1}function sp(e,t){if(!t||!t.length)return!1;const n=nr(e);return n?Yt(n,t):!1}function ip(e,t){if(!t||!t.length)return!0;const n=nr(e);return n?Yt(n,t):!0}function op(e){const t=[];e.message&&t.push(e.message);let n;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}`)),k&&t.length===0&&h.error(`Could not extract message for event ${He(e)}`),t}function ap(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function cp(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function nr(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?cp(t):null}catch{return k&&h.error(`Cannot extract url for event ${He(e)}`),null}}let Vi;const ac="FunctionToString",Ki=new WeakMap,up=()=>({name:ac,setupOnce(){Vi=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=$s(this),n=Ki.has(A())&&t!==void 0?t:this;return Vi.apply(n,e)}}catch{}},setup(e){Ki.set(e,!0)}}),cc=up,lp=Z(ac,cc),dp="cause",fp=5,uc="LinkedErrors",pp=(e={})=>{const t=e.limit||fp,n=e.key||dp;return{name:uc,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();ya(Fd,o.stackParser,o.maxValueLength,n,t,r,s)}}},hp=pp,mp=Z(uc,hp),gp=Object.freeze(Object.defineProperty({__proto__:null,FunctionToString:lp,InboundFilters:Qf,LinkedErrors:mp},Symbol.toStringTag,{value:"Module"}));class _p{constructor(t){this._client=t,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),If)}add(t,n,r,s="none",i={},o=ot()){const a=Math.floor(o),c=ff(n),u=_f(i),l=df(s),d=cf(t,c,l,u);let f=this._buckets.get(d);const p=f&&t===js?f.metric.weight:0;f?(f.metric.add(r),f.timestamp<a&&(f.timestamp=a)):(f={metric:new xf[t](r),timestamp:a,metricType:t,name:c,unit:l,tags:u},this._buckets.set(d,f));const m=typeof r=="string"?f.metric.weight-p:r;zd(t,c,m,l,i,d)}flush(){if(this._buckets.size!==0){if(this._client.captureAggregateMetrics){const t=Array.from(this._buckets).map(([,n])=>n);this._client.captureAggregateMetrics(t)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}}const lc="MetricsAggregator",yp=()=>({name:lc,setupOnce(){},setup(e){e.metricsAggregator=new _p(e)}}),dc=yp,Sp=Z(lc,dc);function kr(e,t,n,r={}){const s=A(),i=ae();if(s){if(!s.metricsAggregator){k&&h.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs");return}const{unit:o,tags:a,timestamp:c}=r,{release:u,environment:l}=s.getOptions(),d=i.getTransaction(),f={};u&&(f.release=u),l&&(f.environment=l),d&&(f.transaction=j(d).description||""),k&&h.log(`Adding value of ${n} to ${e} metric ${t}`),s.metricsAggregator.add(e,t,n,o,{...f,...a},c)}}function bp(e,t=1,n){kr(Xa,e,t,n)}function Ep(e,t,n){kr(Za,e,t,n)}function vp(e,t,n){kr(js,e,t,n)}function Tp(e,t,n){kr(Ja,e,t,n)}const QE={increment:bp,distribution:Ep,set:vp,gauge:Tp,MetricsAggregator:Sp,metricsAggregatorIntegration:dc},Ip=gp,L=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,R=U;function fc(){R.document?R.document.addEventListener("visibilitychange",()=>{const e=Oe();if(R.document.hidden&&e){const t="cancelled",{op:n,status:r}=j(e);L&&h.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):L&&h.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const En=(e,t,n)=>{let r,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(r||0),(s||r===void 0)&&(r=t.value,t.delta=s,e(t)))}},wp=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,kp=()=>{const e=R.performance.timing,t=R.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},Rr=()=>R.__WEB_VITALS_POLYFILL__?R.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||kp()):R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],qs=()=>{const e=Rr();return e&&e.activationStart||0},vn=(e,t)=>{const n=Rr();let r="navigate";return n&&(R.document&&R.document.prerendering||qs()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:wp(),navigationType:r}},Xt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Tn=(e,t)=>{const n=r=>{(r.type==="pagehide"||R.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};R.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},Rp=(e,t={})=>{const n=vn("CLS",0);let r,s=0,i=[];const o=c=>{c.forEach(u=>{if(!u.hadRecentInput){const l=i[0],d=i[i.length-1];s&&i.length!==0&&u.startTime-d.startTime<1e3&&u.startTime-l.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u]),s>n.value&&(n.value=s,n.entries=i,r&&r())}})},a=Xt("layout-shift",o);if(a){r=En(e,n,t.reportAllChanges);const c=()=>{o(a.takeRecords()),r(!0)};return Tn(c),c}};let rr=-1;const Cp=()=>{R.document&&R.document.visibilityState&&(rr=R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0)},xp=()=>{Tn(({timeStamp:e})=>{rr=e},!0)},Gs=()=>(rr<0&&(Cp(),xp()),{get firstHiddenTime(){return rr}}),Ap=e=>{const t=Gs(),n=vn("FID");let r;const s=a=>{a.startTime<t.firstHiddenTime&&(n.value=a.processingStart-a.startTime,n.entries.push(a),r(!0))},i=a=>{a.forEach(s)},o=Xt("first-input",i);r=En(e,n),o&&Tn(()=>{i(o.takeRecords()),o.disconnect()},!0)};let pc=0,jr=1/0,Pn=0;const Mp=e=>{e.forEach(t=>{t.interactionId&&(jr=Math.min(jr,t.interactionId),Pn=Math.max(Pn,t.interactionId),pc=Pn?(Pn-jr)/7+1:0)})};let hs;const Op=()=>hs?pc:performance.interactionCount||0,Np=()=>{"interactionCount"in performance||hs||(hs=Xt("event",Mp,{type:"event",buffered:!0,durationThreshold:0}))},hc=()=>Op(),Xi=10,Ae=[],qr={},Ji=e=>{const t=Ae[Ae.length-1],n=qr[e.interactionId];if(n||Ae.length<Xi||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};qr[r.id]=r,Ae.push(r)}Ae.sort((r,s)=>s.latency-r.latency),Ae.splice(Xi).forEach(r=>{delete qr[r.id]})}},Dp=()=>{const e=Math.min(Ae.length-1,Math.floor(hc()/50));return Ae[e]},Lp=(e,t)=>{t=t||{},Np();const n=vn("INP");let r;const s=o=>{o.forEach(c=>{c.interactionId&&Ji(c),c.entryType==="first-input"&&!Ae.some(l=>l.entries.some(d=>c.duration===d.duration&&c.startTime===d.startTime))&&Ji(c)});const a=Dp();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=Xt("event",s,{durationThreshold:t.durationThreshold||40});r=En(e,n,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Tn(()=>{s(i.takeRecords()),n.value<0&&hc()>0&&(n.value=0,n.entries=[]),r(!0)}))},Zi={},Pp=e=>{const t=Gs(),n=vn("LCP");let r;const s=o=>{const a=o[o.length-1];if(a){const c=Math.max(a.startTime-qs(),0);c<t.firstHiddenTime&&(n.value=c,n.entries=[a],r())}},i=Xt("largest-contentful-paint",s);if(i){r=En(e,n);const o=()=>{Zi[n.id]||(s(i.takeRecords()),i.disconnect(),Zi[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{R.document&&addEventListener(a,o,{once:!0,capture:!0})}),Tn(o,!0),o}},ms=e=>{R.document&&(R.document.prerendering?addEventListener("prerenderingchange",()=>ms(e),!0):R.document.readyState!=="complete"?addEventListener("load",()=>ms(e),!0):setTimeout(e,0))},Fp=(e,t)=>{t=t||{};const n=vn("TTFB"),r=En(e,n,t.reportAllChanges);ms(()=>{const s=Rr();if(s){if(n.value=Math.max(s.responseStart-qs(),0),n.value<0||n.value>performance.now())return;n.entries=[s],r(!0)}})},on={},sr={};let mc,gc,_c,yc,Sc;function $p(e,t=!1){return In("cls",e,Wp,mc,t)}function bc(e,t=!1){return In("lcp",e,jp,_c,t)}function Bp(e){return In("ttfb",e,qp,yc)}function Hp(e){return In("fid",e,zp,gc)}function Up(e){return In("inp",e,Gp,Sc)}function qe(e,t){return Ec(e,t),sr[e]||(Yp(e),sr[e]=!0),vc(e,t)}function Jt(e,t){const n=on[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){L&&h.error(`Error while triggering instrumentation handler.
|
|
18
18
|
Type: ${e}
|
|
19
19
|
Name: ${ze(r)}
|
|
20
|
-
Error:`,s)}}function Wp(){return Rp(e=>{Jt("cls",{metric:e}),mc=e},{reportAllChanges:!0})}function zp(){return Ap(e=>{Jt("fid",{metric:e}),gc=e})}function jp(){return Pp(e=>{Jt("lcp",{metric:e}),_c=e})}function qp(){return Fp(e=>{Jt("ttfb",{metric:e}),yc=e})}function Gp(){return Lp(e=>{Jt("inp",{metric:e}),Sc=e})}function In(e,t,n,r,s=!1){Ec(e,t);let i;return sr[e]||(i=n(),sr[e]=!0),r&&t({metric:r}),vc(e,t,s?i:void 0)}function Yp(e){const t={};e==="event"&&(t.durationThreshold=0),Xt(e,n=>{Jt(e,{entries:n})},t)}function Ec(e,t){on[e]=on[e]||[],on[e].push(t)}function vc(e,t,n){return()=>{n&&n();const r=on[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Gr(e){return typeof e=="number"&&isFinite(e)}function Bt(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}const Vp=2147483647;function re(e){return e/1e3}function Ys(){return R&&R.addEventListener&&R.performance}let Qi=0,J={},ke,an;function Tc(){const e=Ys();if(e&&oe){e.mark&&R.performance.mark("sentry-tracing-init");const t=Jp(),n=Kp(),r=Xp(),s=Zp();return()=>{t(),n(),r(),s()}}return()=>{}}function Ic(){qe("longtask",({entries:e})=>{for(const t of e){const n=Oe();if(!n)return;const r=re(oe+t.startTime),s=re(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function wc(){qe("event",({entries:e})=>{for(const t of e){const n=Oe();if(!n)return;if(t.name==="click"){const r=re(oe+t.startTime),s=re(t.duration),i={description:at(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},o=fa(t.target);o&&(i.attributes={"ui.component_name":o}),n.startChild(i)}}})}function kc(e,t){if(Ys()&&oe){const r=Qp(e,t);return()=>{r()}}return()=>{}}function Kp(){return $p(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(L&&h.log("[Measurements] Adding CLS"),J.cls={value:e.value,unit:""},an=t)},!0)}function Xp(){return bc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(L&&h.log("[Measurements] Adding LCP"),J.lcp={value:e.value,unit:"millisecond"},ke=t)},!0)}function Jp(){return Hp(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=re(oe),r=re(t.startTime);L&&h.log("[Measurements] Adding FID"),J.fid={value:e.value,unit:"millisecond"},J["mark.fid"]={value:n+r,unit:"second"}})}function Zp(){return Bp(({metric:e})=>{e.entries[e.entries.length-1]&&(L&&h.log("[Measurements] Adding TTFB"),J.ttfb={value:e.value,unit:"millisecond"})})}const eo={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Qp(e,t){return Up(({metric:n})=>{if(n.value===void 0)return;const r=n.entries.find(b=>b.duration===n.value&&eo[b.name]!==void 0),s=A();if(!r||!s)return;const i=eo[r.name],o=s.getOptions(),a=re(oe+r.startTime),c=re(n.value),u=r.interactionId!==void 0?e[r.interactionId]:void 0;if(u===void 0)return;const{routeName:l,parentContext:d,activeTransaction:f,user:p,replayId:m}=u,_=p!==void 0?p.email||p.id||p.ip_address:void 0,S=f!==void 0?f.getProfileId():void 0,g=new wr({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${i}`,name:at(r.target),attributes:{release:o.release,environment:o.environment,transaction:l,..._!==void 0&&_!==""?{user:_}:{},...S!==void 0?{profile_id:S}:{},...m!==void 0?{replay_id:m}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),y=ah(d,o,t);if(y&&Math.random()<y){const b=g?Bf([g],s.getDsn()):void 0,T=s&&s.getTransport();T&&b&&T.send(b).then(null,v=>{L&&h.error("Error while sending interaction:",v)});return}})}function Rc(e){const t=Ys();if(!t||!R.performance.getEntries||!oe)return;L&&h.log("[Tracing] Adding & adjusting spans using Performance API");const n=re(oe),r=t.getEntries(),{op:s,start_timestamp:i}=j(e);if(r.slice(Qi).forEach(o=>{const a=re(o.startTime),c=re(o.duration);if(!(e.op==="navigation"&&i&&n+a<i))switch(o.entryType){case"navigation":{th(e,o,n);break}case"mark":case"paint":case"measure":{eh(e,o,a,c,n);const u=Gs(),l=o.startTime<u.firstHiddenTime;o.name==="first-paint"&&l&&(L&&h.log("[Measurements] Adding FP"),J.fp={value:o.startTime,unit:"millisecond"}),o.name==="first-contentful-paint"&&l&&(L&&h.log("[Measurements] Adding FCP"),J.fcp={value:o.startTime,unit:"millisecond"});break}case"resource":{rh(e,o,o.name,a,c,n);break}}}),Qi=Math.max(r.length-1,0),sh(e),s==="pageload"){oh(J),["fcp","fp","lcp"].forEach(a=>{if(!J[a]||!i||n>=i)return;const c=J[a].value,u=n+re(c),l=Math.abs((u-i)*1e3),d=l-c;L&&h.log(`[Measurements] Normalized ${a} from ${c} to ${l} (${d})`),J[a].value=l});const o=J["mark.fid"];o&&J.fid&&(Bt(e,{description:"first input delay",endTimestamp:o.value+re(J.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:o.value}),delete J["mark.fid"]),"fcp"in J||delete J.cls,Object.keys(J).forEach(a=>{Xd(a,J[a].value,J[a].unit)}),ih(e)}ke=void 0,an=void 0,J={}}function eh(e,t,n,r,s){const i=s+n,o=i+r;return Bt(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function th(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Fn(e,t,r,n)}),Fn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Fn(e,t,"fetch",n,"cache","domainLookupStart"),Fn(e,t,"domainLookup",n,"DNS"),nh(e,t,n)}function Fn(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||Bt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+re(a),endTimestamp:r+re(o)})}function nh(e,t,n){t.responseEnd&&(Bt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+re(t.requestStart),endTimestamp:n+re(t.responseEnd)}),Bt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+re(t.responseStart),endTimestamp:n+re(t.responseEnd)}))}function rh(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=et(n),a={};Yr(a,t,"transferSize","http.response_transfer_size"),Yr(a,t,"encodedBodySize","http.response_content_length"),Yr(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(R.location.origin);const c=i+r,u=c+s;Bt(e,{description:n.replace(R.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}function sh(e){const t=R.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Gr(n.rtt)&&(J["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Gr(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Gr(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function ih(e){ke&&(L&&h.log("[Measurements] Adding LCP Data"),ke.element&&e.setTag("lcp.element",at(ke.element)),ke.id&&e.setTag("lcp.id",ke.id),ke.url&&e.setTag("lcp.url",ke.url.trim().slice(0,200)),e.setTag("lcp.size",ke.size)),an&&an.sources&&(L&&h.log("[Measurements] Adding CLS Data"),an.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,at(t.node))))}function Yr(e,t,n,r){const s=t[n];s!=null&&s<Vp&&(e[r]=s)}function oh(e){const t=Rr();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(L&&h.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function ah(e,t,n){if(!Vt(t))return!1;let r;return e!==void 0&&typeof t.tracesSampler=="function"?r=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:R.location}):e!==void 0&&e.sampled!==void 0?r=e.sampled:typeof t.tracesSampleRate<"u"?r=t.tracesSampleRate:r=1,Wa(r)?r===!0?n:r===!1?0:r*n:(L&&h.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function ch(e,t,n,r,s="auto.http.browser"){if(!Vt()||!e.fetchData)return;const i=t(e.fetchData.url);if(e.endTimestamp&&i){const p=e.fetchData.__span;if(!p)return;const m=r[p];m&&(dh(m,e),delete r[p]);return}const o=ae(),a=A(),{method:c,url:u}=e.fetchData,l=lh(u),d=l?et(l).host:void 0,f=i?tt({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":d,[he]:s},op:"http.client"}):void 0;if(f&&(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(e.fetchData.url)&&a){const p=e.args[0];e.args[1]=e.args[1]||{};const m=e.args[1];m.headers=uh(p,a,o,m,f)}return f}function uh(e,t,n,r,s){const i=s||n.getSpan(),o=Gt(),{traceId:a,spanId:c,sampled:u,dsc:l}={...o.getPropagationContext(),...n.getPropagationContext()},d=i?yr(i):pa(a,c,u),f=ha(l||(i?pn(i):Fs(a,t,n))),p=r.headers||(typeof Request<"u"&&fn(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&fn(p,Headers)){const m=new Headers(p);return m.append("sentry-trace",d),f&&m.append(rs,f),m}else if(Array.isArray(p)){const m=[...p,["sentry-trace",d]];return f&&m.push([rs,f]),m}else{const m="baggage"in p?p.baggage:void 0,_=[];return Array.isArray(m)?_.push(...m):m&&_.push(m),f&&_.push(f),{...p,"sentry-trace":d,baggage:_.length>0?_.join(","):void 0}}else return{"sentry-trace":d,baggage:f}}function lh(e){try{return new URL(e).href}catch{return}}function dh(e,t){if(t.response){Ws(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus("internal_error");e.end()}const gs=["localhost",/^\/(?!\/)/],ir={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:gs,tracePropagationTargets:gs};function Cc(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:ir.traceFetch,traceXHR:ir.traceXHR,...e},a=typeof i=="function"?i:l=>!0,c=l=>mh(l,r||s),u={};t&&Er(l=>{const d=ch(l,a,c,u);if(d){const f=xc(l.fetchData.url),p=f?et(f).host:void 0;d.setAttributes({"http.url":f,"server.address":p})}o&&d&&to(d)}),n&&vr(l=>{const d=gh(l,a,c,u);o&&d&&to(d)})}function fh(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function to(e){const{url:t}=j(e).data||{};if(!t||typeof t!="string")return;const n=qe("resource",({entries:r})=>{r.forEach(s=>{fh(s)&&s.name.endsWith(t)&&(hh(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function ph(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function we(e=0){return((oe||performance.timeOrigin)+e)/1e3}function hh(e){const{name:t,version:n}=ph(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),oe?[...r,["http.request.redirect_start",we(e.redirectStart)],["http.request.fetch_start",we(e.fetchStart)],["http.request.domain_lookup_start",we(e.domainLookupStart)],["http.request.domain_lookup_end",we(e.domainLookupEnd)],["http.request.connect_start",we(e.connectStart)],["http.request.secure_connection_start",we(e.secureConnectionStart)],["http.request.connection_end",we(e.connectEnd)],["http.request.request_start",we(e.requestStart)],["http.request.response_start",we(e.responseStart)],["http.request.response_end",we(e.responseEnd)]]:r}function mh(e,t){return Yt(e,t||gs)}function gh(e,t,n,r){const s=e.xhr,i=s&&s[Me];if(!Vt()||!s||s.__sentry_own_request__||!i)return;const o=t(i.url);if(e.endTimestamp&&o){const p=s.__sentry_xhr_span_id__;if(!p)return;const m=r[p];m&&i.status_code!==void 0&&(Ws(m,i.status_code),m.end(),delete r[p]);return}const a=ae(),c=Gt(),u=xc(i.url),l=u?et(u).host:void 0,d=o?tt({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":u,url:i.url,"server.address":l,[he]:"auto.http.browser"},op:"http.client"}):void 0;d&&(s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d);const f=A();if(s.setRequestHeader&&n(i.url)&&f){const{traceId:p,spanId:m,sampled:_,dsc:S}={...c.getPropagationContext(),...a.getPropagationContext()},g=d?yr(d):pa(p,m,_),y=ha(S||(d?pn(d):Fs(p,f,a)));_h(s,g,y)}return d}function _h(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(rs,n)}catch{}}function xc(e){try{return new URL(e,R.location.origin).href}catch{return}}function yh(e,t=!0,n=!0){if(!R||!R.location){L&&h.warn("Could not initialize routing instrumentation due to invalid location");return}let r=R.location.href,s;t&&(s=e({name:R.location.pathname,startTimestamp:oe?oe/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&bn(({to:i,from:o})=>{if(o===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}o!==i&&(r=void 0,s&&(L&&h.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.end()),s=e({name:R.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const Sh="BrowserTracing",bh={...sn,markBackgroundTransactions:!0,routingInstrumentation:yh,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...ir},no=10;class ZE{constructor(t){this.name=Sh,this._hasSetTracePropagationTargets=!1,za(),L&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...bh,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=Tc(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&kc(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&Ic(),this.options._experiments.enableInteractions&&wc(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:a,startTransactionOnPageLoad:c,markBackgroundTransactions:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:m}=this.options,_=i&&i.tracePropagationTargets,S=_||this.options.tracePropagationTargets;L&&this._hasSetTracePropagationTargets&&_&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),o(g=>{const y=this._createRouteTransaction(g);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(y,g,n),y},c,a),u&&fc(),m.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),Cc({traceFetch:l,traceXHR:d,tracePropagationTargets:S,shouldCreateSpanForRequest:f,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub){L&&h.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=this.options,a=t.op==="pageload";let c;if(a){const p=a?ro("sentry-trace"):"",m=a?ro("baggage"):void 0,{traceId:_,dsc:S,parentSpanId:g,sampled:y}=ma(p,m);c={traceId:_,parentSpanId:g,parentSampled:y,...t,metadata:{...t.metadata,dynamicSamplingContext:S},trimEnd:!0}}else c={trimEnd:!0,...t};const u=typeof r=="function"?r(c):c,l=u===void 0?{...c,sampled:!1}:u;l.metadata=l.name!==c.name?{...l.metadata,source:"custom"}:l.metadata,this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&L&&h.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),L&&h.log(`[Tracing] Starting ${l.op} transaction on scope`);const{location:d}=R,f=tr(n,l,s,i,!0,{location:d},o,a);return a&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(p=>{this._collectWebVitals(),Rc(p)}),f}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="ui.action.click",a=Oe();if(a&&a.op&&["navigation","pageload"].includes(a.op)){L&&h.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){L&&h.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){L&&h.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}const c=this._getCurrentHub(),{location:u}=R,l={name:this._latestRoute.name,op:o,trimEnd:!0,data:{[ee]:this._latestRoute.context?Eh(this._latestRoute.context):"url"}};t=tr(c,l,r,s,!0,{location:u},i)};["click"].forEach(r=>{R.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const t=({entries:n})=>{const r=A(),s=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=s!==void 0?s.getReplayId():void 0,o=Oe(),a=ae(),c=a!==void 0?a.getUser():void 0;n.forEach(u=>{if(vh(u)){const l=u.interactionId;if(l===void 0)return;const d=this._interactionIdToRouteNameMapping[l],f=u.duration,p=u.startTime,m=Object.keys(this._interactionIdToRouteNameMapping),_=m.length>0?m.reduce((S,g)=>this._interactionIdToRouteNameMapping[S].duration<this._interactionIdToRouteNameMapping[g].duration?S:g):void 0;if(u.entryType==="first-input"&&m.map(g=>this._interactionIdToRouteNameMapping[g]).some(g=>g.duration===f&&g.startTime===p)||!l)return;if(d)d.duration=Math.max(d.duration,f);else if(m.length<no||_===void 0||f>this._interactionIdToRouteNameMapping[_].duration){const S=this._latestRoute.name,g=this._latestRoute.context;S&&g&&(_&&Object.keys(this._interactionIdToRouteNameMapping).length>=no&&delete this._interactionIdToRouteNameMapping[_],this._interactionIdToRouteNameMapping[l]={routeName:S,duration:f,parentContext:g,user:c,activeTransaction:o,replayId:i,startTime:p})}}})};qe("event",t),qe("first-input",t)}}function ro(e){const t=ga(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function Eh(e){const t=e.attributes&&e.attributes[ee],n=e.data&&e.data[ee],r=e.metadata&&e.metadata.source;return t||n||r}function vh(e){return"duration"in e}const Th="BrowserTracing",Ih={...sn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...ir},Cr=(e={})=>{const t=L?!!(e.tracePropagationTargets||e.tracingOrigins):!1;za(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const n={...Ih,...e},r=Tc(),s={};n.enableInp&&kc(s,n.interactionsSampleRate),n.enableLongTask&&Ic(),n._experiments.enableInteractions&&wc();const i={name:void 0,context:void 0};function o(a){const c=Ie(),{beforeStartSpan:u,idleTimeout:l,finalTimeout:d,heartbeatInterval:f}=n,p=a.op==="pageload";let m;if(p){const y=p?so("sentry-trace"):"",b=p?so("baggage"):void 0,{traceId:T,dsc:v,parentSpanId:I,sampled:x}=ma(y,b);m={traceId:T,parentSpanId:I,parentSampled:x,...a,metadata:{...a.metadata,dynamicSamplingContext:v},trimEnd:!0}}else m={trimEnd:!0,...a};const _=u?u(m):m;_.metadata=_.name!==m.name?{..._.metadata,source:"custom"}:_.metadata,i.name=_.name,i.context=_,_.sampled===!1&&L&&h.log(`[Tracing] Will not send ${_.op} transaction because of beforeNavigate.`),L&&h.log(`[Tracing] Starting ${_.op} transaction on scope`);const{location:S}=R,g=tr(c,_,l,d,!0,{location:S},f,p);return p&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&g.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&g.sendAutoFinishSignal()),g.registerBeforeFinishCallback(y=>{r(),Rc(y)}),g}return{name:Th,setupOnce:()=>{},afterAllSetup(a){const c=a.getOptions(),{markBackgroundSpan:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:m}=n,_=c&&c.tracePropagationTargets,S=_||n.tracePropagationTargets;L&&t&&_&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let g,y=R.location&&R.location.href;if(a.on&&(a.on("startNavigationSpan",b=>{g&&(L&&h.log(`[Tracing] Finishing current transaction with op: ${j(g).op}`),g.end()),g=o({op:"navigation",...b})}),a.on("startPageLoadSpan",b=>{g&&(L&&h.log(`[Tracing] Finishing current transaction with op: ${j(g).op}`),g.end()),g=o({op:"pageload",...b})})),n.instrumentPageLoad&&a.emit&&R.location){const b={name:R.location.pathname,startTimestamp:oe?oe/1e3:void 0,origin:"auto.pageload.browser",attributes:{[ee]:"url"}};wn(a,b)}n.instrumentNavigation&&a.emit&&R.location&&bn(({to:b,from:T})=>{if(T===void 0&&y&&y.indexOf(b)!==-1){y=void 0;return}if(T!==b){y=void 0;const v={name:R.location.pathname,origin:"auto.navigation.browser",attributes:{[ee]:"url"}};kn(a,v)}}),u&&fc(),m.enableInteractions&&wh(n,i),n.enableInp&&Rh(s,i),Cc({traceFetch:l,traceXHR:d,tracePropagationTargets:S,shouldCreateSpanForRequest:f,enableHTTPTimings:p})},options:n}};function wn(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);const n=Kt();return(n&&j(n).op)==="pageload"?n:void 0}function kn(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);const n=Kt();return(n&&j(n).op)==="navigation"?n:void 0}function so(e){const t=ga(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function wh(e,t){let n;const r=()=>{const{idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=e,a="ui.action.click",c=Oe();if(c&&c.op&&["navigation","pageload"].includes(c.op)){L&&h.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name){L&&h.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}const{location:u}=R,l={name:t.name,op:a,trimEnd:!0,data:{[ee]:t.context?Ch(t.context):"url"}};n=tr(Ie(),l,s,i,!0,{location:u},o)};["click"].forEach(s=>{R.document&&addEventListener(s,r,{once:!1,capture:!0})})}function kh(e){return"duration"in e}const io=10;function Rh(e,t){const n=({entries:r})=>{const s=A(),i=s!==void 0&&s.getIntegrationByName!==void 0?s.getIntegrationByName("Replay"):void 0,o=i!==void 0?i.getReplayId():void 0,a=Oe(),c=ae(),u=c!==void 0?c.getUser():void 0;r.forEach(l=>{if(kh(l)){const d=l.interactionId;if(d===void 0)return;const f=e[d],p=l.duration,m=l.startTime,_=Object.keys(e),S=_.length>0?_.reduce((g,y)=>e[g].duration<e[y].duration?g:y):void 0;if(l.entryType==="first-input"&&_.map(y=>e[y]).some(y=>y.duration===p&&y.startTime===m)||!d)return;if(f)f.duration=Math.max(f.duration,p);else if(_.length<io||S===void 0||p>e[S].duration){const g=t.name,y=t.context;g&&y&&(S&&Object.keys(e).length>=io&&delete e[S],e[d]={routeName:g,duration:p,parentContext:y,user:u,activeTransaction:a,replayId:o,startTime:m})}}})};qe("event",n),qe("first-input",n)}function Ch(e){const t=e.attributes&&e.attributes[ee],n=e.data&&e.data[ee],r=e.metadata&&e.metadata.source;return t||n||r}const E=U;let _s=0;function Ac(){return _s>0}function xh(){_s++,setTimeout(()=>{_s--})}function ct(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if($s(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{const i=s.map(o=>ct(o,t));return e.apply(this,i)}catch(i){throw xh(),lt(o=>{o.addEventProcessor(a=>(t.mechanism&&(ss(a,void 0),Ft(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Sn(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Bl(r,e),it(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Mc(e,t){const n=Vs(e,t),r={type:t&&t.name,value:Nh(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ah(e,t,n,r){const s=A(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:Hs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ph(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Ul(t,i)}};if(n){const a=Vs(e,n);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function Vr(e,t){return{exception:{values:[Mc(e,t)]}}}function Vs(e,t){const n=t.stacktrace||t.stack||"",r=Oh(t);try{return e(n,r)}catch{}return[]}const Mh=/Minified React error #\d+;/i;function Oh(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Mh.test(e.message))return 1}return 0}function Nh(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Dh(e,t,n,r){const s=n&&n.syntheticException||void 0,i=Ks(e,t,s,r);return Ft(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Pt(i)}function Lh(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=ys(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Pt(o)}function Ks(e,t,n,r,s){let i;if(Bs(t)&&t.error)return Vr(e,t.error);if(Ii(t)||Hl(t)){const o=t;if("stack"in t)i=Vr(e,t);else{const a=o.name||(Ii(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=ys(e,c,n,r),ss(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Mt(t)?Vr(e,t):Zn(t)||Hs(t)?(i=Ah(e,t,n,s),Ft(i,{synthetic:!0}),i):(i=ys(e,t,n,r),ss(i,`${t}`),Ft(i,{synthetic:!0}),i)}function ys(e,t,n,r){const s={};if(r&&n){const i=Vs(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(da(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Ph(e,{isUnhandledRejection:t}){const n=Wl(e),r=t?"promise rejection":"exception";return Bs(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Hs(e)?`Event \`${Fh(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Fh(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function $h(e,{metadata:t,tunnel:n,dsn:r}){const s={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:dt(r)}},i=Bh(e);return Ne(s,[i])}function Bh(e){return[{type:"user_report"},e]}class Hh extends bf{constructor(t){const n=E.SENTRY_SDK_SOURCE||gd();nc(t,"browser",["browser"],n),super(t),t.sendClientReports&&E.document&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Dh(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Lh(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){F&&h.warn("SDK not enabled, will not capture user feedback.");return}const n=$h(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){F&&h.log("No outcomes to send");return}if(!this._dsn){F&&h.log("No dsn provided, will not send outcomes");return}F&&h.log("Sending outcomes:",t);const n=Nd(t,this._options.tunnel&&dt(this._dsn));this._sendEnvelope(n)}}let nn;function Uh(){if(nn)return nn;if(us(E.fetch))return nn=E.fetch.bind(E);const e=E.document;let t=E.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){F&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return nn=t.bind(E)}function Wh(){nn=void 0}function zh(e,t=Uh()){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Wh(),n-=o,r--,Ns(c)}}return Qa(e,s)}const jh=4;function qh(e){function t(n){return new Os((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===jh&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(n.body)})}return Qa(e,t)}const Zt="?",Gh=10,Yh=20,Vh=30,Kh=40,Xh=50;function Rn(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Jh=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zh=/\((\S*)(?::(\d+))(?::(\d+))\)/,Qh=e=>{const t=Jh.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=Zh.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[r,s]=Oc(t[1]||Zt,t[2]);return Rn(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},em=[Vh,Qh],tm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rm=e=>{const t=tm.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=nm.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Zt;return[s,r]=Oc(s,r),Rn(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},sm=[Xh,rm],im=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,om=e=>{const t=im.exec(e);return t?Rn(t[2],t[1]||Zt,+t[3],t[4]?+t[4]:void 0):void 0},am=[Kh,om],cm=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,um=e=>{const t=cm.exec(e);return t?Rn(t[2],t[3]||Zt,+t[1]):void 0},QE=[Gh,um],lm=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,dm=e=>{const t=lm.exec(e);return t?Rn(t[5],t[3]||t[4]||Zt,+t[1],+t[2]):void 0},ev=[Yh,dm],fm=[em,sm,am],pm=zl(...fm),Oc=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Zt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},$n=1024,Nc="Breadcrumbs",hm=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Nc,setupOnce(){},setup(n){t.console&&va(ym(n)),t.dom&&Ta(_m(n,t.dom)),t.xhr&&vr(Sm(n)),t.fetch&&Er(bm(n)),t.history&&bn(Em(n)),t.sentry&&n.on&&n.on("beforeSendEvent",gm(n))}}},Dc=hm,mm=Z(Nc,Dc);function gm(e){return function(n){A()===e&&je({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:He(n)},{event:n})}}function _m(e,t){return function(r){if(A()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>$n&&(F&&h.warn(`\`dom.maxStringLength\` cannot exceed ${$n}, but a value of ${a} was configured. Sentry will use ${$n} instead.`),a=$n),typeof o=="string"&&(o=[o]);try{const u=r.event,l=vm(u)?u.target:u;s=at(l,{keyAttrs:o,maxStringLength:a}),i=fa(l)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),je(c,{event:r.event,name:r.name,global:r.global})}}function ym(e){return function(n){if(A()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Ca(n.level),message:Qn(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Qn(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;je(r,{input:n.args,level:n.level})}}function Sm(e){return function(n){if(A()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Me];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,l={method:o,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};je({category:"xhr",data:l,type:"http"},d)}}function bm(e){return function(n){if(A()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};je({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s};je({category:"fetch",data:o,type:"http"},a)}}}function Em(e){return function(n){if(A()!==e)return;let r=n.from,s=n.to;const i=et(E.location.href);let o=r?et(r):void 0;const a=et(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),je({category:"navigation",data:{from:r,to:s}})}}function vm(e){return!!e&&!!e.target}const Lc="Dedupe",Tm=()=>{let e;return{name:Lc,setupOnce(){},processEvent(t){if(t.type)return t;try{if(wm(t,e))return F&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Pc=Tm,Im=Z(Lc,Pc);function wm(e,t){return t?!!(km(e,t)||Rm(e,t)):!1}function km(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!$c(e,t)||!Fc(e,t))}function Rm(e,t){const n=oo(t),r=oo(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!$c(e,t)||!Fc(e,t))}function Fc(e,t){let n=ao(e),r=ao(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function $c(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function oo(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ao(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const Bc="GlobalHandlers",Cm=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Bc,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Am(n),co("onerror")),t.onunhandledrejection&&(Mm(n),co("onunhandledrejection"))}}},Hc=Cm,xm=Z(Bc,Hc);function Am(e){ka(t=>{const{stackParser:n,attachStacktrace:r}=Wc();if(A()!==e||Ac())return;const{msg:s,url:i,line:o,column:a,error:c}=t,u=c===void 0&&At(s)?Dm(s,i,o,a):Uc(Ks(n,c||s,void 0,r,!1),i,o,a);u.level="error",Sr(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Mm(e){Ra(t=>{const{stackParser:n,attachStacktrace:r}=Wc();if(A()!==e||Ac())return;const s=Om(t),i=Ls(s)?Nm(s):Ks(n,s,void 0,r,!0);i.level="error",Sr(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Om(e){if(Ls(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function Nm(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Dm(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=Bs(e)?e.message:e,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),Uc({exception:{values:[{type:o,value:i}]}},t,n,r)}function Uc(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=At(t)&&t.length>0?t:_a();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),e}function co(e){F&&h.log(`Global Handler attached: ${e}`)}function Wc(){const e=A();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const zc="HttpContext",Lm=()=>({name:zc,setupOnce(){},preprocessEvent(e){if(!E.navigator&&!E.location&&!E.document)return;const t=e.request&&e.request.url||E.location&&E.location.href,{referrer:n}=E.document||{},{userAgent:r}=E.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),jc=Lm,Pm=Z(zc,jc),Fm="cause",$m=5,qc="LinkedErrors",Bm=(e={})=>{const t=e.limit||$m,n=e.key||Fm;return{name:qc,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();ya(Mc,o.stackParser,o.maxValueLength,n,t,r,s)}}},Gc=Bm,Hm=Z(qc,Gc),Um=["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"],Yc="TryCatch",Wm=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Yc,setupOnce(){t.setTimeout&&se(E,"setTimeout",uo),t.setInterval&&se(E,"setInterval",uo),t.requestAnimationFrame&&se(E,"requestAnimationFrame",jm),t.XMLHttpRequest&&"XMLHttpRequest"in E&&se(XMLHttpRequest.prototype,"send",qm);const n=t.eventTarget;n&&(Array.isArray(n)?n:Um).forEach(Gm)}}},Vc=Wm,zm=Z(Yc,Vc);function uo(e){return function(...t){const n=t[0];return t[0]=ct(n,{mechanism:{data:{function:ze(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function jm(e){return function(t){return e.apply(this,[ct(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ze(e)},handled:!1,type:"instrument"}})])}}function qm(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&se(n,s,function(i){const o={mechanism:{data:{function:s,handler:ze(i)},handled:!1,type:"instrument"}},a=$s(i);return a&&(o.mechanism.data.handler=ze(a)),ct(i,o)})}),e.apply(this,t)}}function Gm(e){const t=E,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(se(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=ct(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ze(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,ct(i,{mechanism:{data:{function:"addEventListener",handler:ze(i),target:e},handled:!1,type:"instrument"}}),o])}}),se(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}const Ym=[oc(),cc(),Vc(),Dc(),Hc(),Gc(),Pc(),jc()];function Vm(e){return[...Ym]}function Km(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Vm()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),E.SENTRY_RELEASE&&E.SENTRY_RELEASE.id&&(e.release=E.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:jl(e.stackParser||pm),integrations:sf(e),transport:e.transport||(Ia()?zh:qh)};Af(Hh,t),e.autoSessionTracking&&Xm()}const lo=(e={},t=Ie())=>{if(!E.document){F&&h.error("Global document not defined in showReportDialog call");return}const{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){F&&h.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const i=E.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=nf(s,e),e.onLoad&&(i.onload=e.onLoad);const{onClose:o}=e;if(o){const c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{o()}finally{E.removeEventListener("message",c)}};E.addEventListener("message",c)}const a=E.document.head||E.document.body;a?a.appendChild(i):F&&h.error("Not injecting report dialog. No injection point found in HTML")};function tv(){}function nv(e){e()}function rv(e){return ct(e)()}function Xm(){if(typeof E.document>"u"){F&&h.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}wi({ignoreDuration:!0}),ki(),bn(({from:e,to:t})=>{e!==void 0&&e!==t&&(wi({ignoreDuration:!0}),ki())})}function sv(e){const t=A();t&&t.captureUserFeedback(e)}const Jm=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:mm,Dedupe:Im,GlobalHandlers:xm,HttpContext:Pm,LinkedErrors:Hm,TryCatch:zm},Symbol.toStringTag,{value:"Module"})),G=U,Xs="sentryReplaySession",Zm="replay_event",Js="Unable to send Replay",Qm=3e5,eg=9e5,tg=5e3,ng=5500,rg=6e4,sg=5e3,ig=3,fo=15e4,Bn=5e3,og=3e3,ag=300,Zs=2e7,cg=4999,ug=15e3,po=36e5;function lg(e,t){return e??t()}function or(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var ne;(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"})(ne||(ne={}));function dg(e){return e.nodeType===e.ELEMENT_NODE}function cn(e){const t=or([e,"optionalAccess",n=>n.host]);return or([t,"optionalAccess",n=>n.shadowRoot])===e}function un(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function fg(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function pg(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 ar(e){try{const t=e.rules||e.cssRules;return t?fg(Array.from(t,Kc).join("")):null}catch{return null}}function Kc(e){let t;if(mg(e))try{t=ar(e.styleSheet)||pg(e)}catch{}else if(gg(e)&&e.selectorText.includes(":"))return hg(e.cssText);return t||e.cssText}function hg(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function mg(e){return"styleSheet"in e}function gg(e){return"selectorText"in e}class Xc{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=or([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return lg(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function _g(){return new Xc}function xr({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function hn({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Ht(e){return e.toLowerCase()}function Ss(e){return e.toUpperCase()}const ho="__rrweb_original__";function yg(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=ho in i?i[ho]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Qs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ht(t):null}function cr(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}let Sg=1;const bg=new RegExp("[^a-z0-9-_:]"),mn=-2;function ei(){return Sg++}function Eg(e){if(e instanceof HTMLFormElement)return"form";const t=Ht(e.tagName);return bg.test(t)?"div":t}function vg(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let yt,mo;const Tg=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ig=/^(?:[a-z+]+:)?\/\//i,wg=/^www\..*/i,kg=/^(data:)([^,]*),(.*)/i;function ur(e,t){return(e||"").replace(Tg,(n,r,s,i,o,a)=>{const c=s||o||a,u=r||i||"";if(!c)return n;if(Ig.test(c)||wg.test(c))return`url(${u}${c}${u})`;if(kg.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${vg(t)+c}${u})`;const l=t.split("/"),d=c.split("/");l.pop();for(const f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${u}${l.join("/")}${u})`})}const Rg=/^[^ \t\n\r\u000c]+/,Cg=/^[, \t\n\r\u000c]+/;function xg(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(Cg),!(n>=t.length);){let i=r(Rg);if(i.slice(-1)===",")i=It(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=It(e,i);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function It(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function Ag(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ti(){const e=document.createElement("a");return e.href="",e.href}function Jc(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?It(e,r):n==="srcset"?xg(e,r):n==="style"?ur(r,ti()):t==="object"&&n==="data"?It(e,r):typeof i=="function"?i(n,r,s):r)}function Zc(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Mg(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function Og(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ze(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ze(e.parentNode,t,n,r+1)}function wt(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Og(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Ut(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=Ze(o,wt(r,s)),c<0)return!0;a=Ze(o,wt(t,n),c>=0?c:1/0)}else{if(a=Ze(o,wt(t,n)),a<0)return!1;c=Ze(o,wt(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function Ng(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Dg(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function Lg(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:_,maskInputFn:S,dataURLOptions:g={},inlineImages:y,recordCanvas:b,keepIframeSrcFn:T,newlyAddedElement:v=!1}=t,I=Pg(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ne.Document,childNodes:[],compatMode:e.compatMode}:{type:ne.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ne.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return $g(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:S,dataURLOptions:g,inlineImages:y,recordCanvas:b,keepIframeSrcFn:T,newlyAddedElement:v,rootId:I,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return Fg(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:_,maskInputOptions:m,maskInputFn:S,rootId:I});case e.CDATA_SECTION_NODE:return{type:ne.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:ne.Comment,textContent:e.textContent||"",rootId:I};default:return!1}}function Pg(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Fg(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,m=d==="SCRIPT"?!0:void 0,_=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||or([e,"access",g=>g.parentNode,"access",g=>g.sheet,"optionalAccess",g=>g.cssRules])&&(f=ar(e.parentNode.sheet))}catch(g){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${g}`,e)}f=ur(f,ti())}m&&(f="SCRIPT_PLACEHOLDER");const S=Ut(e,r,i,s,o,n);if(!p&&!m&&!_&&f&&S&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),_&&f&&(c.textarea||S)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const g=xr({type:null,tagName:d,maskInputOptions:c});f=hn({isMasked:Ut(e,r,i,s,o,g),element:e,value:f,maskInputFn:u})}return{type:ne.Text,textContent:f||"",isStyle:p,rootId:l}}function $g(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:_,maskTextClass:S,unmaskTextClass:g,maskTextSelector:y,unmaskTextSelector:b}=t,T=Mg(e,r,s,i),v=Eg(e);let I={};const x=e.attributes.length;for(let w=0;w<x;w++){const C=e.attributes[w];C.name&&!Zc(v,C.name)&&(I[C.name]=Jc(n,v,Ht(C.name),C.value,e,c))}if(v==="link"&&o){const w=Array.from(n.styleSheets).find(D=>D.href===e.href);let C=null;w&&(C=ar(w)),C&&(delete I.rel,delete I.href,I._cssText=ur(C,w.href))}if(v==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const w=ar(e.sheet);w&&(I._cssText=ur(w,ti()))}if(v==="input"||v==="textarea"||v==="select"||v==="option"){const w=e,C=Qs(w),D=cr(w,Ss(v),C),Y=w.checked;if(C!=="submit"&&C!=="button"&&D){const te=Ut(w,S,y,g,b,xr({type:C,tagName:Ss(v),maskInputOptions:a}));I.value=hn({isMasked:te,element:w,value:D,maskInputFn:u})}Y&&(I.checked=Y)}if(v==="option"&&(e.selected&&!a.select?I.selected=!0:delete I.selected),v==="canvas"&&f){if(e.__context==="2d")yg(e)||(I.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const w=e.toDataURL(l.type,l.quality),C=document.createElement("canvas");C.width=e.width,C.height=e.height;const D=C.toDataURL(l.type,l.quality);w!==D&&(I.rr_dataURL=w)}}if(v==="img"&&d){yt||(yt=n.createElement("canvas"),mo=yt.getContext("2d"));const w=e,C=w.crossOrigin;w.crossOrigin="anonymous";const D=()=>{w.removeEventListener("load",D);try{yt.width=w.naturalWidth,yt.height=w.naturalHeight,mo.drawImage(w,0,0),I.rr_dataURL=yt.toDataURL(l.type,l.quality)}catch(Y){console.warn(`Cannot inline img src=${w.currentSrc}! Error: ${Y}`)}C?I.crossOrigin=C:w.removeAttribute("crossorigin")};w.complete&&w.naturalWidth!==0?D():w.addEventListener("load",D)}if((v==="audio"||v==="video")&&(I.rr_mediaState=e.paused?"paused":"played",I.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(I.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(I.rr_scrollTop=e.scrollTop)),T){const{width:w,height:C}=e.getBoundingClientRect();I={class:I.class,rr_width:`${w}px`,rr_height:`${C}px`}}v==="iframe"&&!p(I.src)&&(e.contentDocument||(I.rr_src=I.src),delete I.src);let M;try{customElements.get(v)&&(M=!0)}catch{}return{type:ne.Element,tagName:v,attributes:I,childNodes:[],isSVG:Ag(e)||void 0,needBlock:T,rootId:_,isCustom:M}}function q(e){return e==null?"":e.toLowerCase()}function Bg(e,t){if(t.comment&&e.type===ne.Comment)return!0;if(e.type===ne.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||q(e.attributes.name)==="application-name"||q(e.attributes.rel)==="icon"||q(e.attributes.rel)==="apple-touch-icon"||q(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&q(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(q(e.attributes.property).match(/^(og|twitter|fb):/)||q(e.attributes.name).match(/^(og|twitter):/)||q(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(q(e.attributes.name)==="robots"||q(e.attributes.name)==="googlebot"||q(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(q(e.attributes.name)==="author"||q(e.attributes.name)==="generator"||q(e.attributes.name)==="framework"||q(e.attributes.name)==="publisher"||q(e.attributes.name)==="progid"||q(e.attributes.property).match(/^article:/)||q(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(q(e.attributes.name)==="google-site-verification"||q(e.attributes.name)==="yandex-verification"||q(e.attributes.name)==="csrf-token"||q(e.attributes.name)==="p:domain_verify"||q(e.attributes.name)==="verify-v1"||q(e.attributes.name)==="verification"||q(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function kt(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y,dataURLOptions:b={},inlineImages:T=!1,recordCanvas:v=!1,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:M=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:Y=!1}=t;let{preserveWhiteSpace:te=!0}=t;const ie=Lg(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,dataURLOptions:b,inlineImages:T,recordCanvas:v,keepIframeSrcFn:D,newlyAddedElement:Y});if(!ie)return console.warn(e,"not serialized"),null;let fe;r.hasNode(e)?fe=r.getId(e):Bg(ie,y)||!te&&ie.type===ne.Text&&!ie.isStyle&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?fe=mn:fe=ei();const W=Object.assign(ie,{id:fe});if(r.add(e,W),fe===mn)return null;I&&I(e);let ge=!f;if(W.type===ne.Element){ge=ge&&!W.needBlock,delete W.needBlock;const Q=e.shadowRoot;Q&&un(Q)&&(W.isShadowHost=!0)}if((W.type===ne.Document||W.type===ne.Element)&&ge){y.headWhitespace&&W.type===ne.Element&&W.tagName==="head"&&(te=!1);const Q={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y,dataURLOptions:b,inlineImages:T,recordCanvas:v,preserveWhiteSpace:te,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D};for(const de of Array.from(e.childNodes)){const _e=kt(de,Q);_e&&W.childNodes.push(_e)}if(dg(e)&&e.shadowRoot)for(const de of Array.from(e.shadowRoot.childNodes)){const _e=kt(de,Q);_e&&(un(e.shadowRoot)&&(_e.isShadow=!0),W.childNodes.push(_e))}}return e.parentNode&&cn(e.parentNode)&&un(e.parentNode)&&(W.isShadow=!0),W.type===ne.Element&&W.tagName==="iframe"&&Ng(e,()=>{const Q=e.contentDocument;if(Q&&x){const de=kt(Q,{doc:Q,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y,dataURLOptions:b,inlineImages:T,recordCanvas:v,preserveWhiteSpace:te,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D});de&&x(e,de)}},M),W.type===ne.Element&&W.tagName==="link"&&W.attributes.rel==="stylesheet"&&Dg(e,()=>{if(w){const Q=kt(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y,dataURLOptions:b,inlineImages:T,recordCanvas:v,preserveWhiteSpace:te,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D});Q&&w(e,Q)}},C),W}function Hg(e,t){const{mirror:n=new Xc,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOM:y=!1,dataURLOptions:b,preserveWhiteSpace:T,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:C=()=>!1}=t||{};return kt(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:b,inlineImages:f,recordCanvas:p,preserveWhiteSpace:T,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:C,newlyAddedElement:!1})}function Pe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function le(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Et=`Please stop import mirror directly. Instead of that,\r
|
|
20
|
+
Error:`,s)}}function Wp(){return Rp(e=>{Jt("cls",{metric:e}),mc=e},{reportAllChanges:!0})}function zp(){return Ap(e=>{Jt("fid",{metric:e}),gc=e})}function jp(){return Pp(e=>{Jt("lcp",{metric:e}),_c=e})}function qp(){return Fp(e=>{Jt("ttfb",{metric:e}),yc=e})}function Gp(){return Lp(e=>{Jt("inp",{metric:e}),Sc=e})}function In(e,t,n,r,s=!1){Ec(e,t);let i;return sr[e]||(i=n(),sr[e]=!0),r&&t({metric:r}),vc(e,t,s?i:void 0)}function Yp(e){const t={};e==="event"&&(t.durationThreshold=0),Xt(e,n=>{Jt(e,{entries:n})},t)}function Ec(e,t){on[e]=on[e]||[],on[e].push(t)}function vc(e,t,n){return()=>{n&&n();const r=on[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Gr(e){return typeof e=="number"&&isFinite(e)}function Bt(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}const Vp=2147483647;function re(e){return e/1e3}function Ys(){return R&&R.addEventListener&&R.performance}let Qi=0,J={},ke,an;function Tc(){const e=Ys();if(e&&oe){e.mark&&R.performance.mark("sentry-tracing-init");const t=Jp(),n=Kp(),r=Xp(),s=Zp();return()=>{t(),n(),r(),s()}}return()=>{}}function Ic(){qe("longtask",({entries:e})=>{for(const t of e){const n=Oe();if(!n)return;const r=re(oe+t.startTime),s=re(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function wc(){qe("event",({entries:e})=>{for(const t of e){const n=Oe();if(!n)return;if(t.name==="click"){const r=re(oe+t.startTime),s=re(t.duration),i={description:at(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},o=fa(t.target);o&&(i.attributes={"ui.component_name":o}),n.startChild(i)}}})}function kc(e,t){if(Ys()&&oe){const r=Qp(e,t);return()=>{r()}}return()=>{}}function Kp(){return $p(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(L&&h.log("[Measurements] Adding CLS"),J.cls={value:e.value,unit:""},an=t)},!0)}function Xp(){return bc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(L&&h.log("[Measurements] Adding LCP"),J.lcp={value:e.value,unit:"millisecond"},ke=t)},!0)}function Jp(){return Hp(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=re(oe),r=re(t.startTime);L&&h.log("[Measurements] Adding FID"),J.fid={value:e.value,unit:"millisecond"},J["mark.fid"]={value:n+r,unit:"second"}})}function Zp(){return Bp(({metric:e})=>{e.entries[e.entries.length-1]&&(L&&h.log("[Measurements] Adding TTFB"),J.ttfb={value:e.value,unit:"millisecond"})})}const eo={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Qp(e,t){return Up(({metric:n})=>{if(n.value===void 0)return;const r=n.entries.find(b=>b.duration===n.value&&eo[b.name]!==void 0),s=A();if(!r||!s)return;const i=eo[r.name],o=s.getOptions(),a=re(oe+r.startTime),c=re(n.value),u=r.interactionId!==void 0?e[r.interactionId]:void 0;if(u===void 0)return;const{routeName:l,parentContext:d,activeTransaction:f,user:p,replayId:m}=u,_=p!==void 0?p.email||p.id||p.ip_address:void 0,S=f!==void 0?f.getProfileId():void 0,g=new wr({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${i}`,name:at(r.target),attributes:{release:o.release,environment:o.environment,transaction:l,..._!==void 0&&_!==""?{user:_}:{},...S!==void 0?{profile_id:S}:{},...m!==void 0?{replay_id:m}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),y=ah(d,o,t);if(y&&Math.random()<y){const b=g?Bf([g],s.getDsn()):void 0,T=s&&s.getTransport();T&&b&&T.send(b).then(null,v=>{L&&h.error("Error while sending interaction:",v)});return}})}function Rc(e){const t=Ys();if(!t||!R.performance.getEntries||!oe)return;L&&h.log("[Tracing] Adding & adjusting spans using Performance API");const n=re(oe),r=t.getEntries(),{op:s,start_timestamp:i}=j(e);if(r.slice(Qi).forEach(o=>{const a=re(o.startTime),c=re(o.duration);if(!(e.op==="navigation"&&i&&n+a<i))switch(o.entryType){case"navigation":{th(e,o,n);break}case"mark":case"paint":case"measure":{eh(e,o,a,c,n);const u=Gs(),l=o.startTime<u.firstHiddenTime;o.name==="first-paint"&&l&&(L&&h.log("[Measurements] Adding FP"),J.fp={value:o.startTime,unit:"millisecond"}),o.name==="first-contentful-paint"&&l&&(L&&h.log("[Measurements] Adding FCP"),J.fcp={value:o.startTime,unit:"millisecond"});break}case"resource":{rh(e,o,o.name,a,c,n);break}}}),Qi=Math.max(r.length-1,0),sh(e),s==="pageload"){oh(J),["fcp","fp","lcp"].forEach(a=>{if(!J[a]||!i||n>=i)return;const c=J[a].value,u=n+re(c),l=Math.abs((u-i)*1e3),d=l-c;L&&h.log(`[Measurements] Normalized ${a} from ${c} to ${l} (${d})`),J[a].value=l});const o=J["mark.fid"];o&&J.fid&&(Bt(e,{description:"first input delay",endTimestamp:o.value+re(J.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:o.value}),delete J["mark.fid"]),"fcp"in J||delete J.cls,Object.keys(J).forEach(a=>{Xd(a,J[a].value,J[a].unit)}),ih(e)}ke=void 0,an=void 0,J={}}function eh(e,t,n,r,s){const i=s+n,o=i+r;return Bt(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function th(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Fn(e,t,r,n)}),Fn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Fn(e,t,"fetch",n,"cache","domainLookupStart"),Fn(e,t,"domainLookup",n,"DNS"),nh(e,t,n)}function Fn(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||Bt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+re(a),endTimestamp:r+re(o)})}function nh(e,t,n){t.responseEnd&&(Bt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+re(t.requestStart),endTimestamp:n+re(t.responseEnd)}),Bt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+re(t.responseStart),endTimestamp:n+re(t.responseEnd)}))}function rh(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=et(n),a={};Yr(a,t,"transferSize","http.response_transfer_size"),Yr(a,t,"encodedBodySize","http.response_content_length"),Yr(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(R.location.origin);const c=i+r,u=c+s;Bt(e,{description:n.replace(R.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}function sh(e){const t=R.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Gr(n.rtt)&&(J["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Gr(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Gr(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function ih(e){ke&&(L&&h.log("[Measurements] Adding LCP Data"),ke.element&&e.setTag("lcp.element",at(ke.element)),ke.id&&e.setTag("lcp.id",ke.id),ke.url&&e.setTag("lcp.url",ke.url.trim().slice(0,200)),e.setTag("lcp.size",ke.size)),an&&an.sources&&(L&&h.log("[Measurements] Adding CLS Data"),an.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,at(t.node))))}function Yr(e,t,n,r){const s=t[n];s!=null&&s<Vp&&(e[r]=s)}function oh(e){const t=Rr();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(L&&h.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function ah(e,t,n){if(!Vt(t))return!1;let r;return e!==void 0&&typeof t.tracesSampler=="function"?r=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:R.location}):e!==void 0&&e.sampled!==void 0?r=e.sampled:typeof t.tracesSampleRate<"u"?r=t.tracesSampleRate:r=1,Wa(r)?r===!0?n:r===!1?0:r*n:(L&&h.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function ch(e,t,n,r,s="auto.http.browser"){if(!Vt()||!e.fetchData)return;const i=t(e.fetchData.url);if(e.endTimestamp&&i){const p=e.fetchData.__span;if(!p)return;const m=r[p];m&&(dh(m,e),delete r[p]);return}const o=ae(),a=A(),{method:c,url:u}=e.fetchData,l=lh(u),d=l?et(l).host:void 0,f=i?tt({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":d,[he]:s},op:"http.client"}):void 0;if(f&&(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(e.fetchData.url)&&a){const p=e.args[0];e.args[1]=e.args[1]||{};const m=e.args[1];m.headers=uh(p,a,o,m,f)}return f}function uh(e,t,n,r,s){const i=s||n.getSpan(),o=Gt(),{traceId:a,spanId:c,sampled:u,dsc:l}={...o.getPropagationContext(),...n.getPropagationContext()},d=i?yr(i):pa(a,c,u),f=ha(l||(i?pn(i):Fs(a,t,n))),p=r.headers||(typeof Request<"u"&&fn(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&fn(p,Headers)){const m=new Headers(p);return m.append("sentry-trace",d),f&&m.append(rs,f),m}else if(Array.isArray(p)){const m=[...p,["sentry-trace",d]];return f&&m.push([rs,f]),m}else{const m="baggage"in p?p.baggage:void 0,_=[];return Array.isArray(m)?_.push(...m):m&&_.push(m),f&&_.push(f),{...p,"sentry-trace":d,baggage:_.length>0?_.join(","):void 0}}else return{"sentry-trace":d,baggage:f}}function lh(e){try{return new URL(e).href}catch{return}}function dh(e,t){if(t.response){Ws(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus("internal_error");e.end()}const gs=["localhost",/^\/(?!\/)/],ir={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:gs,tracePropagationTargets:gs};function Cc(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:ir.traceFetch,traceXHR:ir.traceXHR,...e},a=typeof i=="function"?i:l=>!0,c=l=>mh(l,r||s),u={};t&&Er(l=>{const d=ch(l,a,c,u);if(d){const f=xc(l.fetchData.url),p=f?et(f).host:void 0;d.setAttributes({"http.url":f,"server.address":p})}o&&d&&to(d)}),n&&vr(l=>{const d=gh(l,a,c,u);o&&d&&to(d)})}function fh(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function to(e){const{url:t}=j(e).data||{};if(!t||typeof t!="string")return;const n=qe("resource",({entries:r})=>{r.forEach(s=>{fh(s)&&s.name.endsWith(t)&&(hh(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function ph(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function we(e=0){return((oe||performance.timeOrigin)+e)/1e3}function hh(e){const{name:t,version:n}=ph(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),oe?[...r,["http.request.redirect_start",we(e.redirectStart)],["http.request.fetch_start",we(e.fetchStart)],["http.request.domain_lookup_start",we(e.domainLookupStart)],["http.request.domain_lookup_end",we(e.domainLookupEnd)],["http.request.connect_start",we(e.connectStart)],["http.request.secure_connection_start",we(e.secureConnectionStart)],["http.request.connection_end",we(e.connectEnd)],["http.request.request_start",we(e.requestStart)],["http.request.response_start",we(e.responseStart)],["http.request.response_end",we(e.responseEnd)]]:r}function mh(e,t){return Yt(e,t||gs)}function gh(e,t,n,r){const s=e.xhr,i=s&&s[Me];if(!Vt()||!s||s.__sentry_own_request__||!i)return;const o=t(i.url);if(e.endTimestamp&&o){const p=s.__sentry_xhr_span_id__;if(!p)return;const m=r[p];m&&i.status_code!==void 0&&(Ws(m,i.status_code),m.end(),delete r[p]);return}const a=ae(),c=Gt(),u=xc(i.url),l=u?et(u).host:void 0,d=o?tt({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":u,url:i.url,"server.address":l,[he]:"auto.http.browser"},op:"http.client"}):void 0;d&&(s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d);const f=A();if(s.setRequestHeader&&n(i.url)&&f){const{traceId:p,spanId:m,sampled:_,dsc:S}={...c.getPropagationContext(),...a.getPropagationContext()},g=d?yr(d):pa(p,m,_),y=ha(S||(d?pn(d):Fs(p,f,a)));_h(s,g,y)}return d}function _h(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(rs,n)}catch{}}function xc(e){try{return new URL(e,R.location.origin).href}catch{return}}function yh(e,t=!0,n=!0){if(!R||!R.location){L&&h.warn("Could not initialize routing instrumentation due to invalid location");return}let r=R.location.href,s;t&&(s=e({name:R.location.pathname,startTimestamp:oe?oe/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&bn(({to:i,from:o})=>{if(o===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}o!==i&&(r=void 0,s&&(L&&h.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.end()),s=e({name:R.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const Sh="BrowserTracing",bh={...sn,markBackgroundTransactions:!0,routingInstrumentation:yh,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...ir},no=10;class ev{constructor(t){this.name=Sh,this._hasSetTracePropagationTargets=!1,za(),L&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...bh,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=Tc(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&kc(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&Ic(),this.options._experiments.enableInteractions&&wc(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:a,startTransactionOnPageLoad:c,markBackgroundTransactions:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:m}=this.options,_=i&&i.tracePropagationTargets,S=_||this.options.tracePropagationTargets;L&&this._hasSetTracePropagationTargets&&_&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),o(g=>{const y=this._createRouteTransaction(g);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(y,g,n),y},c,a),u&&fc(),m.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),Cc({traceFetch:l,traceXHR:d,tracePropagationTargets:S,shouldCreateSpanForRequest:f,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub){L&&h.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=this.options,a=t.op==="pageload";let c;if(a){const p=a?ro("sentry-trace"):"",m=a?ro("baggage"):void 0,{traceId:_,dsc:S,parentSpanId:g,sampled:y}=ma(p,m);c={traceId:_,parentSpanId:g,parentSampled:y,...t,metadata:{...t.metadata,dynamicSamplingContext:S},trimEnd:!0}}else c={trimEnd:!0,...t};const u=typeof r=="function"?r(c):c,l=u===void 0?{...c,sampled:!1}:u;l.metadata=l.name!==c.name?{...l.metadata,source:"custom"}:l.metadata,this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&L&&h.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),L&&h.log(`[Tracing] Starting ${l.op} transaction on scope`);const{location:d}=R,f=tr(n,l,s,i,!0,{location:d},o,a);return a&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(p=>{this._collectWebVitals(),Rc(p)}),f}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="ui.action.click",a=Oe();if(a&&a.op&&["navigation","pageload"].includes(a.op)){L&&h.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){L&&h.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){L&&h.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}const c=this._getCurrentHub(),{location:u}=R,l={name:this._latestRoute.name,op:o,trimEnd:!0,data:{[ee]:this._latestRoute.context?Eh(this._latestRoute.context):"url"}};t=tr(c,l,r,s,!0,{location:u},i)};["click"].forEach(r=>{R.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const t=({entries:n})=>{const r=A(),s=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=s!==void 0?s.getReplayId():void 0,o=Oe(),a=ae(),c=a!==void 0?a.getUser():void 0;n.forEach(u=>{if(vh(u)){const l=u.interactionId;if(l===void 0)return;const d=this._interactionIdToRouteNameMapping[l],f=u.duration,p=u.startTime,m=Object.keys(this._interactionIdToRouteNameMapping),_=m.length>0?m.reduce((S,g)=>this._interactionIdToRouteNameMapping[S].duration<this._interactionIdToRouteNameMapping[g].duration?S:g):void 0;if(u.entryType==="first-input"&&m.map(g=>this._interactionIdToRouteNameMapping[g]).some(g=>g.duration===f&&g.startTime===p)||!l)return;if(d)d.duration=Math.max(d.duration,f);else if(m.length<no||_===void 0||f>this._interactionIdToRouteNameMapping[_].duration){const S=this._latestRoute.name,g=this._latestRoute.context;S&&g&&(_&&Object.keys(this._interactionIdToRouteNameMapping).length>=no&&delete this._interactionIdToRouteNameMapping[_],this._interactionIdToRouteNameMapping[l]={routeName:S,duration:f,parentContext:g,user:c,activeTransaction:o,replayId:i,startTime:p})}}})};qe("event",t),qe("first-input",t)}}function ro(e){const t=ga(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function Eh(e){const t=e.attributes&&e.attributes[ee],n=e.data&&e.data[ee],r=e.metadata&&e.metadata.source;return t||n||r}function vh(e){return"duration"in e}const Th="BrowserTracing",Ih={...sn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...ir},Cr=(e={})=>{const t=L?!!(e.tracePropagationTargets||e.tracingOrigins):!1;za(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const n={...Ih,...e},r=Tc(),s={};n.enableInp&&kc(s,n.interactionsSampleRate),n.enableLongTask&&Ic(),n._experiments.enableInteractions&&wc();const i={name:void 0,context:void 0};function o(a){const c=Ie(),{beforeStartSpan:u,idleTimeout:l,finalTimeout:d,heartbeatInterval:f}=n,p=a.op==="pageload";let m;if(p){const y=p?so("sentry-trace"):"",b=p?so("baggage"):void 0,{traceId:T,dsc:v,parentSpanId:I,sampled:x}=ma(y,b);m={traceId:T,parentSpanId:I,parentSampled:x,...a,metadata:{...a.metadata,dynamicSamplingContext:v},trimEnd:!0}}else m={trimEnd:!0,...a};const _=u?u(m):m;_.metadata=_.name!==m.name?{..._.metadata,source:"custom"}:_.metadata,i.name=_.name,i.context=_,_.sampled===!1&&L&&h.log(`[Tracing] Will not send ${_.op} transaction because of beforeNavigate.`),L&&h.log(`[Tracing] Starting ${_.op} transaction on scope`);const{location:S}=R,g=tr(c,_,l,d,!0,{location:S},f,p);return p&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&g.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&g.sendAutoFinishSignal()),g.registerBeforeFinishCallback(y=>{r(),Rc(y)}),g}return{name:Th,setupOnce:()=>{},afterAllSetup(a){const c=a.getOptions(),{markBackgroundSpan:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:m}=n,_=c&&c.tracePropagationTargets,S=_||n.tracePropagationTargets;L&&t&&_&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let g,y=R.location&&R.location.href;if(a.on&&(a.on("startNavigationSpan",b=>{g&&(L&&h.log(`[Tracing] Finishing current transaction with op: ${j(g).op}`),g.end()),g=o({op:"navigation",...b})}),a.on("startPageLoadSpan",b=>{g&&(L&&h.log(`[Tracing] Finishing current transaction with op: ${j(g).op}`),g.end()),g=o({op:"pageload",...b})})),n.instrumentPageLoad&&a.emit&&R.location){const b={name:R.location.pathname,startTimestamp:oe?oe/1e3:void 0,origin:"auto.pageload.browser",attributes:{[ee]:"url"}};wn(a,b)}n.instrumentNavigation&&a.emit&&R.location&&bn(({to:b,from:T})=>{if(T===void 0&&y&&y.indexOf(b)!==-1){y=void 0;return}if(T!==b){y=void 0;const v={name:R.location.pathname,origin:"auto.navigation.browser",attributes:{[ee]:"url"}};kn(a,v)}}),u&&fc(),m.enableInteractions&&wh(n,i),n.enableInp&&Rh(s,i),Cc({traceFetch:l,traceXHR:d,tracePropagationTargets:S,shouldCreateSpanForRequest:f,enableHTTPTimings:p})},options:n}};function wn(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);const n=Kt();return(n&&j(n).op)==="pageload"?n:void 0}function kn(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);const n=Kt();return(n&&j(n).op)==="navigation"?n:void 0}function so(e){const t=ga(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function wh(e,t){let n;const r=()=>{const{idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=e,a="ui.action.click",c=Oe();if(c&&c.op&&["navigation","pageload"].includes(c.op)){L&&h.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name){L&&h.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}const{location:u}=R,l={name:t.name,op:a,trimEnd:!0,data:{[ee]:t.context?Ch(t.context):"url"}};n=tr(Ie(),l,s,i,!0,{location:u},o)};["click"].forEach(s=>{R.document&&addEventListener(s,r,{once:!1,capture:!0})})}function kh(e){return"duration"in e}const io=10;function Rh(e,t){const n=({entries:r})=>{const s=A(),i=s!==void 0&&s.getIntegrationByName!==void 0?s.getIntegrationByName("Replay"):void 0,o=i!==void 0?i.getReplayId():void 0,a=Oe(),c=ae(),u=c!==void 0?c.getUser():void 0;r.forEach(l=>{if(kh(l)){const d=l.interactionId;if(d===void 0)return;const f=e[d],p=l.duration,m=l.startTime,_=Object.keys(e),S=_.length>0?_.reduce((g,y)=>e[g].duration<e[y].duration?g:y):void 0;if(l.entryType==="first-input"&&_.map(y=>e[y]).some(y=>y.duration===p&&y.startTime===m)||!d)return;if(f)f.duration=Math.max(f.duration,p);else if(_.length<io||S===void 0||p>e[S].duration){const g=t.name,y=t.context;g&&y&&(S&&Object.keys(e).length>=io&&delete e[S],e[d]={routeName:g,duration:p,parentContext:y,user:u,activeTransaction:a,replayId:o,startTime:m})}}})};qe("event",n),qe("first-input",n)}function Ch(e){const t=e.attributes&&e.attributes[ee],n=e.data&&e.data[ee],r=e.metadata&&e.metadata.source;return t||n||r}const E=U;let _s=0;function Ac(){return _s>0}function xh(){_s++,setTimeout(()=>{_s--})}function ct(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if($s(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{const i=s.map(o=>ct(o,t));return e.apply(this,i)}catch(i){throw xh(),lt(o=>{o.addEventProcessor(a=>(t.mechanism&&(ss(a,void 0),Ft(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Sn(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Bl(r,e),it(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Mc(e,t){const n=Vs(e,t),r={type:t&&t.name,value:Nh(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ah(e,t,n,r){const s=A(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:Hs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ph(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Ul(t,i)}};if(n){const a=Vs(e,n);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function Vr(e,t){return{exception:{values:[Mc(e,t)]}}}function Vs(e,t){const n=t.stacktrace||t.stack||"",r=Oh(t);try{return e(n,r)}catch{}return[]}const Mh=/Minified React error #\d+;/i;function Oh(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Mh.test(e.message))return 1}return 0}function Nh(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Dh(e,t,n,r){const s=n&&n.syntheticException||void 0,i=Ks(e,t,s,r);return Ft(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Pt(i)}function Lh(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=ys(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Pt(o)}function Ks(e,t,n,r,s){let i;if(Bs(t)&&t.error)return Vr(e,t.error);if(Ii(t)||Hl(t)){const o=t;if("stack"in t)i=Vr(e,t);else{const a=o.name||(Ii(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=ys(e,c,n,r),ss(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Mt(t)?Vr(e,t):Zn(t)||Hs(t)?(i=Ah(e,t,n,s),Ft(i,{synthetic:!0}),i):(i=ys(e,t,n,r),ss(i,`${t}`),Ft(i,{synthetic:!0}),i)}function ys(e,t,n,r){const s={};if(r&&n){const i=Vs(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(da(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Ph(e,{isUnhandledRejection:t}){const n=Wl(e),r=t?"promise rejection":"exception";return Bs(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Hs(e)?`Event \`${Fh(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Fh(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function $h(e,{metadata:t,tunnel:n,dsn:r}){const s={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:dt(r)}},i=Bh(e);return Ne(s,[i])}function Bh(e){return[{type:"user_report"},e]}class Hh extends bf{constructor(t){const n=E.SENTRY_SDK_SOURCE||gd();nc(t,"browser",["browser"],n),super(t),t.sendClientReports&&E.document&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Dh(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Lh(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){F&&h.warn("SDK not enabled, will not capture user feedback.");return}const n=$h(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){F&&h.log("No outcomes to send");return}if(!this._dsn){F&&h.log("No dsn provided, will not send outcomes");return}F&&h.log("Sending outcomes:",t);const n=Nd(t,this._options.tunnel&&dt(this._dsn));this._sendEnvelope(n)}}let nn;function Uh(){if(nn)return nn;if(us(E.fetch))return nn=E.fetch.bind(E);const e=E.document;let t=E.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){F&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return nn=t.bind(E)}function Wh(){nn=void 0}function zh(e,t=Uh()){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Wh(),n-=o,r--,Ns(c)}}return Qa(e,s)}const jh=4;function qh(e){function t(n){return new Os((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===jh&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(n.body)})}return Qa(e,t)}const Zt="?",Gh=10,Yh=20,Vh=30,Kh=40,Xh=50;function Rn(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Jh=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zh=/\((\S*)(?::(\d+))(?::(\d+))\)/,Qh=e=>{const t=Jh.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=Zh.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[r,s]=Oc(t[1]||Zt,t[2]);return Rn(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},em=[Vh,Qh],tm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rm=e=>{const t=tm.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=nm.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Zt;return[s,r]=Oc(s,r),Rn(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},sm=[Xh,rm],im=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,om=e=>{const t=im.exec(e);return t?Rn(t[2],t[1]||Zt,+t[3],t[4]?+t[4]:void 0):void 0},am=[Kh,om],cm=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,um=e=>{const t=cm.exec(e);return t?Rn(t[2],t[3]||Zt,+t[1]):void 0},tv=[Gh,um],lm=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,dm=e=>{const t=lm.exec(e);return t?Rn(t[5],t[3]||t[4]||Zt,+t[1],+t[2]):void 0},nv=[Yh,dm],fm=[em,sm,am],pm=zl(...fm),Oc=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Zt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},$n=1024,Nc="Breadcrumbs",hm=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Nc,setupOnce(){},setup(n){t.console&&va(ym(n)),t.dom&&Ta(_m(n,t.dom)),t.xhr&&vr(Sm(n)),t.fetch&&Er(bm(n)),t.history&&bn(Em(n)),t.sentry&&n.on&&n.on("beforeSendEvent",gm(n))}}},Dc=hm,mm=Z(Nc,Dc);function gm(e){return function(n){A()===e&&je({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:He(n)},{event:n})}}function _m(e,t){return function(r){if(A()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>$n&&(F&&h.warn(`\`dom.maxStringLength\` cannot exceed ${$n}, but a value of ${a} was configured. Sentry will use ${$n} instead.`),a=$n),typeof o=="string"&&(o=[o]);try{const u=r.event,l=vm(u)?u.target:u;s=at(l,{keyAttrs:o,maxStringLength:a}),i=fa(l)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),je(c,{event:r.event,name:r.name,global:r.global})}}function ym(e){return function(n){if(A()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Ca(n.level),message:Qn(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Qn(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;je(r,{input:n.args,level:n.level})}}function Sm(e){return function(n){if(A()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Me];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,l={method:o,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};je({category:"xhr",data:l,type:"http"},d)}}function bm(e){return function(n){if(A()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};je({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s};je({category:"fetch",data:o,type:"http"},a)}}}function Em(e){return function(n){if(A()!==e)return;let r=n.from,s=n.to;const i=et(E.location.href);let o=r?et(r):void 0;const a=et(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),je({category:"navigation",data:{from:r,to:s}})}}function vm(e){return!!e&&!!e.target}const Lc="Dedupe",Tm=()=>{let e;return{name:Lc,setupOnce(){},processEvent(t){if(t.type)return t;try{if(wm(t,e))return F&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Pc=Tm,Im=Z(Lc,Pc);function wm(e,t){return t?!!(km(e,t)||Rm(e,t)):!1}function km(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!$c(e,t)||!Fc(e,t))}function Rm(e,t){const n=oo(t),r=oo(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!$c(e,t)||!Fc(e,t))}function Fc(e,t){let n=ao(e),r=ao(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function $c(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function oo(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ao(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const Bc="GlobalHandlers",Cm=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Bc,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Am(n),co("onerror")),t.onunhandledrejection&&(Mm(n),co("onunhandledrejection"))}}},Hc=Cm,xm=Z(Bc,Hc);function Am(e){ka(t=>{const{stackParser:n,attachStacktrace:r}=Wc();if(A()!==e||Ac())return;const{msg:s,url:i,line:o,column:a,error:c}=t,u=c===void 0&&At(s)?Dm(s,i,o,a):Uc(Ks(n,c||s,void 0,r,!1),i,o,a);u.level="error",Sr(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Mm(e){Ra(t=>{const{stackParser:n,attachStacktrace:r}=Wc();if(A()!==e||Ac())return;const s=Om(t),i=Ls(s)?Nm(s):Ks(n,s,void 0,r,!0);i.level="error",Sr(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Om(e){if(Ls(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function Nm(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Dm(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=Bs(e)?e.message:e,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),Uc({exception:{values:[{type:o,value:i}]}},t,n,r)}function Uc(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=At(t)&&t.length>0?t:_a();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),e}function co(e){F&&h.log(`Global Handler attached: ${e}`)}function Wc(){const e=A();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const zc="HttpContext",Lm=()=>({name:zc,setupOnce(){},preprocessEvent(e){if(!E.navigator&&!E.location&&!E.document)return;const t=e.request&&e.request.url||E.location&&E.location.href,{referrer:n}=E.document||{},{userAgent:r}=E.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),jc=Lm,Pm=Z(zc,jc),Fm="cause",$m=5,qc="LinkedErrors",Bm=(e={})=>{const t=e.limit||$m,n=e.key||Fm;return{name:qc,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();ya(Mc,o.stackParser,o.maxValueLength,n,t,r,s)}}},Gc=Bm,Hm=Z(qc,Gc),Um=["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"],Yc="TryCatch",Wm=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Yc,setupOnce(){t.setTimeout&&se(E,"setTimeout",uo),t.setInterval&&se(E,"setInterval",uo),t.requestAnimationFrame&&se(E,"requestAnimationFrame",jm),t.XMLHttpRequest&&"XMLHttpRequest"in E&&se(XMLHttpRequest.prototype,"send",qm);const n=t.eventTarget;n&&(Array.isArray(n)?n:Um).forEach(Gm)}}},Vc=Wm,zm=Z(Yc,Vc);function uo(e){return function(...t){const n=t[0];return t[0]=ct(n,{mechanism:{data:{function:ze(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function jm(e){return function(t){return e.apply(this,[ct(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ze(e)},handled:!1,type:"instrument"}})])}}function qm(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&se(n,s,function(i){const o={mechanism:{data:{function:s,handler:ze(i)},handled:!1,type:"instrument"}},a=$s(i);return a&&(o.mechanism.data.handler=ze(a)),ct(i,o)})}),e.apply(this,t)}}function Gm(e){const t=E,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(se(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=ct(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ze(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,ct(i,{mechanism:{data:{function:"addEventListener",handler:ze(i),target:e},handled:!1,type:"instrument"}}),o])}}),se(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}const Ym=[oc(),cc(),Vc(),Dc(),Hc(),Gc(),Pc(),jc()];function Vm(e){return[...Ym]}function Km(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Vm()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),E.SENTRY_RELEASE&&E.SENTRY_RELEASE.id&&(e.release=E.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:jl(e.stackParser||pm),integrations:sf(e),transport:e.transport||(Ia()?zh:qh)};Af(Hh,t),e.autoSessionTracking&&Xm()}const lo=(e={},t=Ie())=>{if(!E.document){F&&h.error("Global document not defined in showReportDialog call");return}const{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){F&&h.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const i=E.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=nf(s,e),e.onLoad&&(i.onload=e.onLoad);const{onClose:o}=e;if(o){const c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{o()}finally{E.removeEventListener("message",c)}};E.addEventListener("message",c)}const a=E.document.head||E.document.body;a?a.appendChild(i):F&&h.error("Not injecting report dialog. No injection point found in HTML")};function rv(){}function sv(e){e()}function iv(e){return ct(e)()}function Xm(){if(typeof E.document>"u"){F&&h.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}wi({ignoreDuration:!0}),ki(),bn(({from:e,to:t})=>{e!==void 0&&e!==t&&(wi({ignoreDuration:!0}),ki())})}function ov(e){const t=A();t&&t.captureUserFeedback(e)}const Jm=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:mm,Dedupe:Im,GlobalHandlers:xm,HttpContext:Pm,LinkedErrors:Hm,TryCatch:zm},Symbol.toStringTag,{value:"Module"})),G=U,Xs="sentryReplaySession",Zm="replay_event",Js="Unable to send Replay",Qm=3e5,eg=9e5,tg=5e3,ng=5500,rg=6e4,sg=5e3,ig=3,fo=15e4,Bn=5e3,og=3e3,ag=300,Zs=2e7,cg=4999,ug=15e3,po=36e5;function lg(e,t){return e??t()}function or(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var ne;(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"})(ne||(ne={}));function dg(e){return e.nodeType===e.ELEMENT_NODE}function cn(e){const t=or([e,"optionalAccess",n=>n.host]);return or([t,"optionalAccess",n=>n.shadowRoot])===e}function un(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function fg(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function pg(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 ar(e){try{const t=e.rules||e.cssRules;return t?fg(Array.from(t,Kc).join("")):null}catch{return null}}function Kc(e){let t;if(mg(e))try{t=ar(e.styleSheet)||pg(e)}catch{}else if(gg(e)&&e.selectorText.includes(":"))return hg(e.cssText);return t||e.cssText}function hg(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function mg(e){return"styleSheet"in e}function gg(e){return"selectorText"in e}class Xc{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=or([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return lg(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function _g(){return new Xc}function xr({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function hn({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Ht(e){return e.toLowerCase()}function Ss(e){return e.toUpperCase()}const ho="__rrweb_original__";function yg(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=ho in i?i[ho]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Qs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ht(t):null}function cr(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}let Sg=1;const bg=new RegExp("[^a-z0-9-_:]"),mn=-2;function ei(){return Sg++}function Eg(e){if(e instanceof HTMLFormElement)return"form";const t=Ht(e.tagName);return bg.test(t)?"div":t}function vg(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let yt,mo;const Tg=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ig=/^(?:[a-z+]+:)?\/\//i,wg=/^www\..*/i,kg=/^(data:)([^,]*),(.*)/i;function ur(e,t){return(e||"").replace(Tg,(n,r,s,i,o,a)=>{const c=s||o||a,u=r||i||"";if(!c)return n;if(Ig.test(c)||wg.test(c))return`url(${u}${c}${u})`;if(kg.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${vg(t)+c}${u})`;const l=t.split("/"),d=c.split("/");l.pop();for(const f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${u}${l.join("/")}${u})`})}const Rg=/^[^ \t\n\r\u000c]+/,Cg=/^[, \t\n\r\u000c]+/;function xg(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(Cg),!(n>=t.length);){let i=r(Rg);if(i.slice(-1)===",")i=It(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=It(e,i);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function It(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function Ag(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ti(){const e=document.createElement("a");return e.href="",e.href}function Jc(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?It(e,r):n==="srcset"?xg(e,r):n==="style"?ur(r,ti()):t==="object"&&n==="data"?It(e,r):typeof i=="function"?i(n,r,s):r)}function Zc(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Mg(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function Og(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ze(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ze(e.parentNode,t,n,r+1)}function wt(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Og(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Ut(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=Ze(o,wt(r,s)),c<0)return!0;a=Ze(o,wt(t,n),c>=0?c:1/0)}else{if(a=Ze(o,wt(t,n)),a<0)return!1;c=Ze(o,wt(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function Ng(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Dg(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function Lg(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:_,maskInputFn:S,dataURLOptions:g={},inlineImages:y,recordCanvas:b,keepIframeSrcFn:T,newlyAddedElement:v=!1}=t,I=Pg(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ne.Document,childNodes:[],compatMode:e.compatMode}:{type:ne.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ne.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return $g(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:S,dataURLOptions:g,inlineImages:y,recordCanvas:b,keepIframeSrcFn:T,newlyAddedElement:v,rootId:I,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return Fg(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:_,maskInputOptions:m,maskInputFn:S,rootId:I});case e.CDATA_SECTION_NODE:return{type:ne.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:ne.Comment,textContent:e.textContent||"",rootId:I};default:return!1}}function Pg(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Fg(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,m=d==="SCRIPT"?!0:void 0,_=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||or([e,"access",g=>g.parentNode,"access",g=>g.sheet,"optionalAccess",g=>g.cssRules])&&(f=ar(e.parentNode.sheet))}catch(g){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${g}`,e)}f=ur(f,ti())}m&&(f="SCRIPT_PLACEHOLDER");const S=Ut(e,r,i,s,o,n);if(!p&&!m&&!_&&f&&S&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),_&&f&&(c.textarea||S)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const g=xr({type:null,tagName:d,maskInputOptions:c});f=hn({isMasked:Ut(e,r,i,s,o,g),element:e,value:f,maskInputFn:u})}return{type:ne.Text,textContent:f||"",isStyle:p,rootId:l}}function $g(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:_,maskTextClass:S,unmaskTextClass:g,maskTextSelector:y,unmaskTextSelector:b}=t,T=Mg(e,r,s,i),v=Eg(e);let I={};const x=e.attributes.length;for(let w=0;w<x;w++){const C=e.attributes[w];C.name&&!Zc(v,C.name)&&(I[C.name]=Jc(n,v,Ht(C.name),C.value,e,c))}if(v==="link"&&o){const w=Array.from(n.styleSheets).find(D=>D.href===e.href);let C=null;w&&(C=ar(w)),C&&(delete I.rel,delete I.href,I._cssText=ur(C,w.href))}if(v==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const w=ar(e.sheet);w&&(I._cssText=ur(w,ti()))}if(v==="input"||v==="textarea"||v==="select"||v==="option"){const w=e,C=Qs(w),D=cr(w,Ss(v),C),Y=w.checked;if(C!=="submit"&&C!=="button"&&D){const te=Ut(w,S,y,g,b,xr({type:C,tagName:Ss(v),maskInputOptions:a}));I.value=hn({isMasked:te,element:w,value:D,maskInputFn:u})}Y&&(I.checked=Y)}if(v==="option"&&(e.selected&&!a.select?I.selected=!0:delete I.selected),v==="canvas"&&f){if(e.__context==="2d")yg(e)||(I.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const w=e.toDataURL(l.type,l.quality),C=document.createElement("canvas");C.width=e.width,C.height=e.height;const D=C.toDataURL(l.type,l.quality);w!==D&&(I.rr_dataURL=w)}}if(v==="img"&&d){yt||(yt=n.createElement("canvas"),mo=yt.getContext("2d"));const w=e,C=w.crossOrigin;w.crossOrigin="anonymous";const D=()=>{w.removeEventListener("load",D);try{yt.width=w.naturalWidth,yt.height=w.naturalHeight,mo.drawImage(w,0,0),I.rr_dataURL=yt.toDataURL(l.type,l.quality)}catch(Y){console.warn(`Cannot inline img src=${w.currentSrc}! Error: ${Y}`)}C?I.crossOrigin=C:w.removeAttribute("crossorigin")};w.complete&&w.naturalWidth!==0?D():w.addEventListener("load",D)}if((v==="audio"||v==="video")&&(I.rr_mediaState=e.paused?"paused":"played",I.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(I.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(I.rr_scrollTop=e.scrollTop)),T){const{width:w,height:C}=e.getBoundingClientRect();I={class:I.class,rr_width:`${w}px`,rr_height:`${C}px`}}v==="iframe"&&!p(I.src)&&(e.contentDocument||(I.rr_src=I.src),delete I.src);let M;try{customElements.get(v)&&(M=!0)}catch{}return{type:ne.Element,tagName:v,attributes:I,childNodes:[],isSVG:Ag(e)||void 0,needBlock:T,rootId:_,isCustom:M}}function q(e){return e==null?"":e.toLowerCase()}function Bg(e,t){if(t.comment&&e.type===ne.Comment)return!0;if(e.type===ne.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||q(e.attributes.name)==="application-name"||q(e.attributes.rel)==="icon"||q(e.attributes.rel)==="apple-touch-icon"||q(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&q(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(q(e.attributes.property).match(/^(og|twitter|fb):/)||q(e.attributes.name).match(/^(og|twitter):/)||q(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(q(e.attributes.name)==="robots"||q(e.attributes.name)==="googlebot"||q(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(q(e.attributes.name)==="author"||q(e.attributes.name)==="generator"||q(e.attributes.name)==="framework"||q(e.attributes.name)==="publisher"||q(e.attributes.name)==="progid"||q(e.attributes.property).match(/^article:/)||q(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(q(e.attributes.name)==="google-site-verification"||q(e.attributes.name)==="yandex-verification"||q(e.attributes.name)==="csrf-token"||q(e.attributes.name)==="p:domain_verify"||q(e.attributes.name)==="verify-v1"||q(e.attributes.name)==="verification"||q(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function kt(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y,dataURLOptions:b={},inlineImages:T=!1,recordCanvas:v=!1,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:M=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:Y=!1}=t;let{preserveWhiteSpace:te=!0}=t;const ie=Lg(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,dataURLOptions:b,inlineImages:T,recordCanvas:v,keepIframeSrcFn:D,newlyAddedElement:Y});if(!ie)return console.warn(e,"not serialized"),null;let fe;r.hasNode(e)?fe=r.getId(e):Bg(ie,y)||!te&&ie.type===ne.Text&&!ie.isStyle&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?fe=mn:fe=ei();const W=Object.assign(ie,{id:fe});if(r.add(e,W),fe===mn)return null;I&&I(e);let ge=!f;if(W.type===ne.Element){ge=ge&&!W.needBlock,delete W.needBlock;const Q=e.shadowRoot;Q&&un(Q)&&(W.isShadowHost=!0)}if((W.type===ne.Document||W.type===ne.Element)&&ge){y.headWhitespace&&W.type===ne.Element&&W.tagName==="head"&&(te=!1);const Q={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y,dataURLOptions:b,inlineImages:T,recordCanvas:v,preserveWhiteSpace:te,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D};for(const de of Array.from(e.childNodes)){const _e=kt(de,Q);_e&&W.childNodes.push(_e)}if(dg(e)&&e.shadowRoot)for(const de of Array.from(e.shadowRoot.childNodes)){const _e=kt(de,Q);_e&&(un(e.shadowRoot)&&(_e.isShadow=!0),W.childNodes.push(_e))}}return e.parentNode&&cn(e.parentNode)&&un(e.parentNode)&&(W.isShadow=!0),W.type===ne.Element&&W.tagName==="iframe"&&Ng(e,()=>{const Q=e.contentDocument;if(Q&&x){const de=kt(Q,{doc:Q,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y,dataURLOptions:b,inlineImages:T,recordCanvas:v,preserveWhiteSpace:te,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D});de&&x(e,de)}},M),W.type===ne.Element&&W.tagName==="link"&&W.attributes.rel==="stylesheet"&&Dg(e,()=>{if(w){const Q=kt(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y,dataURLOptions:b,inlineImages:T,recordCanvas:v,preserveWhiteSpace:te,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D});Q&&w(e,Q)}},C),W}function Hg(e,t){const{mirror:n=new Xc,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOM:y=!1,dataURLOptions:b,preserveWhiteSpace:T,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:C=()=>!1}=t||{};return kt(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:_,maskTextFn:S,maskInputFn:g,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:b,inlineImages:f,recordCanvas:p,preserveWhiteSpace:T,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:x,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:C,newlyAddedElement:!1})}function Pe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function le(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Et=`Please stop import mirror directly. Instead of that,\r
|
|
21
21
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
22
22
|
or you can use record.mirror to access the mirror instance during recording.`;let go={map:{},getId(){return console.error(Et),-1},getNode(){return console.error(Et),null},removeNodeFromMap(){console.error(Et)},has(){return console.error(Et),!1},reset(){console.error(Et)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(go=new Proxy(go,{get(e,t,n){return t==="map"&&console.error(Et),Reflect.get(e,t,n)}}));function gn(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),c=this;a<=0||a>t?(r&&(Yg(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=Ar(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function Qc(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){Ar(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Qc(e,t,i||{},!0)}function ni(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let lr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(lr=()=>new Date().getTime());function eu(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:Pe([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Pe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Pe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:Pe([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Pe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Pe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function tu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ru(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function be(e,t,n,r,s){if(!e)return!1;const i=ru(e);if(!i)return!1;const o=wt(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Ze(i,o);let c=-1;return a<0?!1:(r&&(c=Ze(i,wt(null,r))),a>-1&&c<0?!0:a<c)}function Ug(e,t){return t.getId(e)!==-1}function Kr(e,t){return t.getId(e)===mn}function su(e,t){if(cn(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?su(e.parentNode,t):!0:!0}function bs(e){return!!e.changedTouches}function Wg(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function iu(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function ou(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Es(e){return!!Pe([e,"optionalAccess",t=>t.shadowRoot])}class zg{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return $d(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function au(e){let t=null;return Pe([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function jg(e){let t=e,n;for(;n=au(t);)t=n;return t}function qg(e){const t=e.ownerDocument;if(!t)return!1;const n=jg(e);return t.contains(n)}function cu(e){const t=e.ownerDocument;return t?t.contains(e)||qg(e):!1}const _o={};function ri(e){const t=_o[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return _o[e]=r.bind(window)}function Gg(...e){return ri("requestAnimationFrame")(...e)}function Ar(...e){return ri("setTimeout")(...e)}function Yg(...e){return ri("clearTimeout")(...e)}var O=(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))(O||{}),N=(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))(N||{}),ce=(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))(ce||{}),Le=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Le||{});function Vg(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function yo(e){return"__ln"in e}class Kg{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=Vg([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&yo(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&yo(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const So=(e,t)=>`${e}@${t}`;class Xg{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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new Kg,s=c=>{let u=c,l=mn;for(;l===mn;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},i=c=>{if(!c.parentNode||!cu(c))return;const u=cn(c.parentNode)?this.mirror.getId(au(c)):this.mirror.getId(c.parentNode),l=s(c);if(u===-1||l===-1)return r.addNode(c);const d=kt(c,{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:f=>{iu(f,this.mirror)&&this.iframeManager.addIframe(f),ou(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Es(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{this.iframeManager.attachIframe(f,p),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});d&&(t.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)bo(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!Eo(this.droppedSet,c)&&!bo(this.removes,c,this.mirror)||Eo(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){const u=this.mirror.getId(o.value.parentNode),l=s(o.value);u!==-1&&l!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){const l=u;if(u=u.previous,l){const d=this.mirror.getId(l.value.parentNode);if(s(l.value)===-1)continue;if(d!==-1){c=l;break}else{const p=l.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=p.parentNode.host;if(this.mirror.getId(m)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),i(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const l=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+d).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!Kr(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Ut(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,ru(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=Qs(n),a=n.tagName;s=cr(n,a,o);const c=xr({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Ut(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=hn({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Zc(n.tagName,r)&&(i.attributes[r]=Jc(this.doc,Ht(n.tagName),Ht(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=cn(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Kr(n,this.mirror)||!Ug(n,this.mirror)||(this.addedSet.has(n)?(vs(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||su(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[So(r,s)]?vs(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:cn(t.target)&&un(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Kr(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[So(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);be(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Es(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["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(n=>{this[n]=t[n]})}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 vs(e,t){e.delete(t),t.childNodes.forEach(n=>vs(e,n))}function bo(e,t,n){return e.length===0?!1:uu(e,t,n)}function uu(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return e.some(i=>i.id===s)?!0:uu(e,r,n)}function Eo(e,t){return e.size===0?!1:lu(e,t)}function lu(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:lu(e,n):!1}let ln;function Jg(e){ln=e}function Zg(){ln=void 0}const P=e=>ln?(...n)=>{try{return e(...n)}catch(r){if(ln&&ln(r)===!0)return()=>{};throw r}}:e;function Re(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const Rt=[];function Cn(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 du(e,t){const n=new Xg;Rt.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=Re([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(P(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Qg({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const c=gn(P(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=P(gn(P(d=>{const f=Cn(d),{clientX:p,clientY:m}=bs(d)?d.changedTouches[0]:d;a||(a=lr()),o.push({x:p,y:m,id:r.getId(f),timeOffset:lr()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?N.Drag:d instanceof MouseEvent?N.MouseMove:N.TouchMove)}),s,{trailing:!1})),l=[le("mousemove",u,n),le("touchmove",u,n),le("drag",u,n)];return P(()=>{l.forEach(d=>d())})}function e_({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[];let u=null;const l=d=>f=>{const p=Cn(f);if(be(p,r,s,i,!0))return;let m=null,_=d;if("pointerType"in f){switch(f.pointerType){case"mouse":m=Le.Mouse;break;case"touch":m=Le.Touch;break;case"pen":m=Le.Pen;break}m===Le.Touch&&(ce[d]===ce.MouseDown?_="TouchStart":ce[d]===ce.MouseUp&&(_="TouchEnd"))}else bs(f)&&(m=Le.Touch);m!==null?(u=m,(_.startsWith("Touch")&&m===Le.Touch||_.startsWith("Mouse")&&m===Le.Mouse)&&(m=null)):ce[d]===ce.Click&&(m=u,u=null);const S=bs(f)?f.changedTouches[0]:f;if(!S)return;const g=n.getId(p),{clientX:y,clientY:b}=S;P(e)({type:ce[_],id:g,x:y,y:b,...m!==null&&{pointerType:m}})};return Object.keys(ce).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=Ht(d);const p=l(d);if(window.PointerEvent)switch(ce[d]){case ce.MouseDown:case ce.MouseUp:f=f.replace("mouse","pointer");break;case ce.TouchStart:case ce.TouchEnd:return}c.push(le(f,p,t))}),P(()=>{c.forEach(d=>d())})}function fu({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=P(gn(P(c=>{const u=Cn(c);if(!u||be(u,r,s,i,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const d=eu(t.defaultView);e({id:l,x:d.left,y:d.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return le("scroll",a,t)}function t_({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=P(gn(P(()=>{const i=tu(),o=nu();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return le("resize",s,t)}const n_=["INPUT","TEXTAREA","SELECT"],vo=new WeakMap;function r_({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:_}){function S(x){let M=Cn(x);const w=x.isTrusted,C=M&&Ss(M.tagName);if(C==="OPTION"&&(M=M.parentElement),!M||!C||n_.indexOf(C)<0||be(M,r,s,i,!0))return;const D=M;if(D.classList.contains(o)||a&&D.matches(a))return;const Y=Qs(M);let te=cr(D,C,Y),ie=!1;const fe=xr({maskInputOptions:c,tagName:C,type:Y}),W=Ut(M,f,m,p,_,fe);(Y==="radio"||Y==="checkbox")&&(ie=M.checked),te=hn({isMasked:W,element:M,value:te,maskInputFn:u}),g(M,d?{text:te,isChecked:ie,userTriggered:w}:{text:te,isChecked:ie});const ge=M.name;Y==="radio"&&ge&&ie&&t.querySelectorAll(`input[type="radio"][name="${ge}"]`).forEach(Q=>{if(Q!==M){const de=hn({isMasked:W,element:Q,value:cr(Q,C,Y),maskInputFn:u});g(Q,d?{text:de,isChecked:!ie,userTriggered:!1}:{text:de,isChecked:!ie})}})}function g(x,M){const w=vo.get(x);if(!w||w.text!==M.text||w.isChecked!==M.isChecked){vo.set(x,M);const C=n.getId(x);P(e)({...M,id:C})}}const b=(l.input==="last"?["change"]:["input","change"]).map(x=>le(x,P(S),t)),T=t.defaultView;if(!T)return()=>{b.forEach(x=>x())};const v=T.Object.getOwnPropertyDescriptor(T.HTMLInputElement.prototype,"value"),I=[[T.HTMLInputElement.prototype,"value"],[T.HTMLInputElement.prototype,"checked"],[T.HTMLSelectElement.prototype,"value"],[T.HTMLTextAreaElement.prototype,"value"],[T.HTMLSelectElement.prototype,"selectedIndex"],[T.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&b.push(...I.map(x=>Qc(x[0],x[1],{set(){P(S)({target:this,isTrusted:!1})}},!1,T))),P(()=>{b.forEach(x=>x())})}function dr(e){const t=[];function n(r,s){if(Hn("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Hn("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Hn("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Hn("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function Fe(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function s_({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:P((l,d,f)=>{const[p,m]=f,{id:_,styleId:S}=Fe(d,t,n.styleMirror);return(_&&_!==-1||S&&S!==-1)&&e({id:_,styleId:S,adds:[{rule:p,index:m}]}),l.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:P((l,d,f)=>{const[p]=f,{id:m,styleId:_}=Fe(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,removes:[{index:p}]}),l.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:P((l,d,f)=>{const[p]=f,{id:m,styleId:_}=Fe(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,replace:p}),l.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:P((l,d,f)=>{const[p]=f,{id:m,styleId:_}=Fe(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,replaceSync:p}),l.apply(d,f)})}));const c={};Un("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Un("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Un("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Un("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:P((f,p,m)=>{const[_,S]=m,{id:g,styleId:y}=Fe(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,adds:[{rule:_,index:[...dr(p),S||0]}]}),f.apply(p,m)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:P((f,p,m)=>{const[_]=m,{id:S,styleId:g}=Fe(p.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||g&&g!==-1)&&e({id:S,styleId:g,removes:[{index:[...dr(p),_]}]}),f.apply(p,m)})})}),P(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function pu({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?Re([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):Re([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=Re([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(Re([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Re([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=Re([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),P(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function i_({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:P((a,c,u)=>{const[l,d,f]=u;if(n.has(l))return i.apply(c,[l,d,f]);const{id:p,styleId:m}=Fe(Re([c,"access",_=>_.parentRule,"optionalAccess",_=>_.parentStyleSheet]),t,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:l,value:d,priority:f},index:dr(c.parentRule)}),a.apply(c,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:P((a,c,u)=>{const[l]=u;if(n.has(l))return o.apply(c,[l]);const{id:d,styleId:f}=Fe(Re([c,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:l},index:dr(c.parentRule)}),a.apply(c,u)})}),P(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function o_({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=P(u=>gn(P(l=>{const d=Cn(l);if(!d||be(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:m,playbackRate:_}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:m,playbackRate:_})}),i.media||500)),c=[le("play",a(0),o),le("pause",a(1),o),le("seeked",a(2),o),le("volumechange",a(3),o),le("ratechange",a(4),o)];return P(()=>{c.forEach(u=>u())})}function a_({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,l){const d=new i(c,u,l);return s.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=ni(t.fonts,"add",function(a){return function(c){return Ar(P(()=>{const u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),P(()=>{r.forEach(a=>a())})}function c_(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const c=P(()=>{const u=t.getSelection();if(!u||a&&Re([u,"optionalAccess",f=>f.isCollapsed]))return;a=u.isCollapsed||!1;const l=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const p=u.getRangeAt(f),{startContainer:m,startOffset:_,endContainer:S,endOffset:g}=p;be(m,r,s,i,!0)||be(S,r,s,i,!0)||l.push({start:n.getId(m),startOffset:_,end:n.getId(S),endOffset:g})}o({ranges:l})});return c(),le("selectionchange",c)}function u_({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:ni(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function l_(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=du(e,e.doc),s=Qg(e),i=e_(e),o=fu(e),a=t_(e,{win:n}),c=r_(e),u=o_(e),l=s_(e,{win:n}),d=pu(e,e.doc),f=i_(e,{win:n}),p=e.collectFonts?a_(e):()=>{},m=c_(e),_=u_(e),S=[];for(const g of e.plugins)S.push(g.observer(g.callback,n,g.options));return P(()=>{Rt.forEach(g=>g.reset()),r.disconnect(),s(),i(),o(),a(),c(),u(),l(),d(),f(),p(),m(),_(),S.forEach(g=>g())})}function Hn(e){return typeof window[e]<"u"}function Un(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ts{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function To(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}class d_{constructor(){this.crossOriginIframeMirror=new Ts(ei),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class f_{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ts(ei),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ts(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),To([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:O.IncrementalSnapshot,data:{source:N.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return n;case O.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case O.IncrementalSnapshot:switch(n.data.source){case N.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case N.Drag:case N.TouchMove:case N.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case N.ViewportResize:return!1;case N.MediaInteraction:case N.MouseInteraction:case N.Scroll:case N.CanvasMutation:case N.Input:return this.replaceIds(n.data,t,["id"]),n;case N.StyleSheetRule:case N.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case N.Font:return n;case N.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case N.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),To([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==ne.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class p_{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class h_{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!un(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=du({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(fu({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Ar(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(pu({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(ni(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&cu(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Io{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class m_{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new zg,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:Kc(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class g_{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){Gg(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let X,fr;const Se=_g();function Ue(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:_,maskInputOptions:S,slimDOMOptions:g,maskAttributeFn:y,maskInputFn:b,maskTextFn:T,maxCanvasSize:v=null,packFn:I,sampling:x={},dataURLOptions:M={},mousemoveWait:w,recordCanvas:C=!1,recordCrossOriginIframes:D=!1,recordAfter:Y=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:te=!1,collectFonts:ie=!1,inlineImages:fe=!1,plugins:W,keepIframeSrcFn:ge=()=>!1,ignoreCSSAttributes:Q=new Set([]),errorHandler:de,onMutation:_e,getCanvasManager:$r}=e;Jg(de);const mt=D?window.parent===window:!0;let De=!1;if(!mt)try{window.parent.document&&(De=!1)}catch{De=!0}if(mt&&!t)throw new Error("emit function is required");w!==void 0&&x.mousemove===void 0&&(x.mousemove=w),Se.reset();const gt=_===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:S!==void 0?S:{},Qt=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all"}:g||{};Wg();let Br,Hr=0;const _i=B=>{for(const ye of W||[])ye.eventProcessor&&(B=ye.eventProcessor(B));return I&&!De&&(B=I(B)),B};X=(B,ye)=>{const $=B;if($.timestamp=lr(),Yn([Rt,"access",K=>K[0],"optionalAccess",K=>K.isFrozen,"call",K=>K()])&&$.type!==O.FullSnapshot&&!($.type===O.IncrementalSnapshot&&$.data.source===N.Mutation)&&Rt.forEach(K=>K.unfreeze()),mt)Yn([t,"optionalCall",K=>K(_i($),ye)]);else if(De){const K={type:"rrweb",event:_i($),origin:window.location.origin,isCheckout:ye};window.parent.postMessage(K,"*")}if($.type===O.FullSnapshot)Br=$,Hr=0;else if($.type===O.IncrementalSnapshot){if($.data.source===N.Mutation&&$.data.isAttachIframe)return;Hr++;const K=r&&Hr>=r,H=n&&Br&&$.timestamp-Br.timestamp>n;(K||H)&&Wr(!0)}};const An=B=>{X({type:O.IncrementalSnapshot,data:{source:N.Mutation,...B}})},yi=B=>X({type:O.IncrementalSnapshot,data:{source:N.Scroll,...B}}),Il=B=>X({type:O.IncrementalSnapshot,data:{source:N.CanvasMutation,...B}}),wl=B=>X({type:O.IncrementalSnapshot,data:{source:N.AdoptedStyleSheet,...B}}),Ge=new m_({mutationCb:An,adoptedStyleSheetCb:wl}),Ye=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new d_:new f_({mirror:Se,mutationCb:An,stylesheetManager:Ge,recordCrossOriginIframes:D,wrappedEmit:X});for(const B of W||[])B.getMirror&&B.getMirror({nodeMirror:Se,crossOriginIframeMirror:Ye.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ye.crossOriginIframeStyleMirror});const Ur=new g_,Si=y_($r,{mirror:Se,win:window,mutationCb:B=>X({type:O.IncrementalSnapshot,data:{source:N.CanvasMutation,...B}}),recordCanvas:C,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:v,sampling:x.canvas,dataURLOptions:M,errorHandler:de}),Mn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new p_:new h_({mutationCb:An,scrollCb:yi,bypassOptions:{onMutation:_e,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:gt,dataURLOptions:M,maskAttributeFn:y,maskTextFn:T,maskInputFn:b,recordCanvas:C,inlineImages:fe,sampling:x,slimDOMOptions:Qt,iframeManager:Ye,stylesheetManager:Ge,canvasManager:Si,keepIframeSrcFn:ge,processedNodeManager:Ur},mirror:Se}),Wr=(B=!1)=>{X({type:O.Meta,data:{href:window.location.href,width:nu(),height:tu()}},B),Ge.reset(),Mn.init(),Rt.forEach($=>$.lock());const ye=Hg(document,{mirror:Se,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:gt,maskAttributeFn:y,maskInputFn:b,maskTextFn:T,slimDOM:Qt,dataURLOptions:M,recordCanvas:C,inlineImages:fe,onSerialize:$=>{iu($,Se)&&Ye.addIframe($),ou($,Se)&&Ge.trackLinkElement($),Es($)&&Mn.addShadowRoot($.shadowRoot,document)},onIframeLoad:($,K)=>{Ye.attachIframe($,K),Mn.observeAttachShadow($)},onStylesheetLoad:($,K)=>{Ge.attachLinkElement($,K)},keepIframeSrcFn:ge});if(!ye)return console.warn("Failed to snapshot the document");X({type:O.FullSnapshot,data:{node:ye,initialOffset:eu(window)}}),Rt.forEach($=>$.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ge.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document))};fr=Wr;try{const B=[],ye=K=>P(l_)({onMutation:_e,mutationCb:An,mousemoveCb:(H,Ve)=>X({type:O.IncrementalSnapshot,data:{source:Ve,positions:H}}),mouseInteractionCb:H=>X({type:O.IncrementalSnapshot,data:{source:N.MouseInteraction,...H}}),scrollCb:yi,viewportResizeCb:H=>X({type:O.IncrementalSnapshot,data:{source:N.ViewportResize,...H}}),inputCb:H=>X({type:O.IncrementalSnapshot,data:{source:N.Input,...H}}),mediaInteractionCb:H=>X({type:O.IncrementalSnapshot,data:{source:N.MediaInteraction,...H}}),styleSheetRuleCb:H=>X({type:O.IncrementalSnapshot,data:{source:N.StyleSheetRule,...H}}),styleDeclarationCb:H=>X({type:O.IncrementalSnapshot,data:{source:N.StyleDeclaration,...H}}),canvasMutationCb:Il,fontCb:H=>X({type:O.IncrementalSnapshot,data:{source:N.Font,...H}}),selectionCb:H=>{X({type:O.IncrementalSnapshot,data:{source:N.Selection,...H}})},customElementCb:H=>{X({type:O.IncrementalSnapshot,data:{source:N.CustomElement,...H}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:gt,inlineStylesheet:m,sampling:x,recordCanvas:C,inlineImages:fe,userTriggeredOnInput:te,collectFonts:ie,doc:K,maskAttributeFn:y,maskInputFn:b,maskTextFn:T,keepIframeSrcFn:ge,blockSelector:i,unblockSelector:o,slimDOMOptions:Qt,dataURLOptions:M,mirror:Se,iframeManager:Ye,stylesheetManager:Ge,shadowDomManager:Mn,processedNodeManager:Ur,canvasManager:Si,ignoreCSSAttributes:Q,plugins:Yn([W,"optionalAccess",H=>H.filter,"call",H=>H(Ve=>Ve.observer),"optionalAccess",H=>H.map,"call",H=>H(Ve=>({observer:Ve.observer,options:Ve.options,callback:kl=>X({type:O.Plugin,data:{plugin:Ve.name,payload:kl}})}))])||[]},{});Ye.addLoadListener(K=>{try{B.push(ye(K.contentDocument))}catch(H){console.warn(H)}});const $=()=>{Wr(),B.push(ye(document))};return document.readyState==="interactive"||document.readyState==="complete"?$():(B.push(le("DOMContentLoaded",()=>{X({type:O.DomContentLoaded,data:{}}),Y==="DOMContentLoaded"&&$()})),B.push(le("load",()=>{X({type:O.Load,data:{}}),Y==="load"&&$()},window))),()=>{B.forEach(K=>K()),Ur.destroy(),fr=void 0,Zg()}}catch(B){console.warn(B)}}function __(e){if(!fr)throw new Error("please take full snapshot after start recording");fr(e)}Ue.mirror=Se;Ue.takeFullSnapshot=__;function y_(e,t){try{return e?e(t):new Io}catch{return console.warn("Unable to initialize CanvasManager"),new Io}}const S_=3,b_=5;function si(e){return e>9999999999?e:e*1e3}function Xr(e){return e>9999999999?e/1e3:e}function xn(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:O.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:gr(t,10,1e3)}}),t.category==="console")))}const E_="button,a";function hu(e){return e.closest(E_)||e}function mu(e){const t=gu(e);return!t||!(t instanceof Element)?t:hu(t)}function gu(e){return v_(e)?e.target:e}function v_(e){return typeof e=="object"&&!!e&&"target"in e}let $e;function T_(e){return $e||($e=[],I_()),$e.push(e),()=>{const t=$e?$e.indexOf(e):-1;t>-1&&$e.splice(t,1)}}function I_(){se(G,"open",function(e){return function(...t){if($e)try{$e.forEach(n=>n())}catch{}return e.apply(G,t)}})}function w_(e,t,n){e.handleClick(t,n)}class k_{constructor(t,n,r=xn){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=T_(()=>{this._lastMutation=wo()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(C_(n,this._ignoreSelector)||!x_(t))return;const r={timestamp:Xr(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Xr(t)}registerScroll(t=Date.now()){this._lastScroll=Xr(t)}registerClick(t){const n=hu(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=wo();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:G.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,l);return}if(o>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:G.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const R_=["A","BUTTON","INPUT"];function C_(e,t){return!!(!R_.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function x_(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function wo(){return Date.now()/1e3}function A_(e,t){try{if(!M_(t))return;const{source:n}=t.data;if(n===N.Mutation&&e.registerMutation(t.timestamp),n===N.Scroll&&e.registerScroll(t.timestamp),O_(t)){const{type:r,id:s}=t.data,i=Ue.mirror.getNode(s);i instanceof HTMLElement&&r===ce.Click&&e.registerClick(i)}}catch{}}function M_(e){return e.type===S_}function O_(e){return e.data.source===N.MouseInteraction}function xe(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var pr;(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"})(pr||(pr={}));const N_=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function D_(e){const t={};for(const n in e)if(N_.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const L_=e=>t=>{if(!e.isEnabled())return;const n=P_(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&w_(e.clickDetector,n,mu(t.event)),xn(e,n)};function _u(e,t){const n=Ue.mirror.getId(e),r=n&&Ue.mirror.getNode(n),s=r&&Ue.mirror.getMeta(r),i=s&&$_(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===pr.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:D_(i.attributes)}}:{}}}function P_(e){const{target:t,message:n}=F_(e);return xe({category:`ui.${e.name}`,..._u(t,n)})}function F_(e){const t=e.name==="click";let n,r=null;try{r=t?mu(e.event):gu(e.event),n=at(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function $_(e){return e.type===pr.Element}function B_(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=H_(t);n&&xn(e,n)}function H_(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||U_(o)||!i)return null;const a=t||r||s,c=i.length===1;if(!a&&c)return null;const u=at(o,{maxStringLength:200})||"<unknown>",l=_u(o,u);return xe({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function U_(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const ko={resource:G_,paint:j_,navigation:q_};function W_(e){return e.map(z_).filter(Boolean)}function z_(e){return ko[e.entryType]?ko[e.entryType](e):null}function Wt(e){return((oe||G.performance.timeOrigin)+e)/1e3}function j_(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Wt(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function q_(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:_}=e;return s===0?null:{type:`${t}.${_}`,start:Wt(p),end:Wt(i),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:f}}}function G_(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Wt(i),end:Wt(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function Y_(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,i=Wt(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?Ue.mirror.getId(r):void 0}}}function V_(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(qe(s,n))}),r.push(bc(({metric:s})=>{e.replayPerformanceEntries.push(Y_(s))})),()=>{r.forEach(s=>s())}}const z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,K_='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==r||r<0)&&(r=0),(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},A=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},_=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=x(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}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(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)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),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=_(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,C)+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(C,U,0),R=C;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){A(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;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,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}}},L=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=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^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=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(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-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[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=C(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=_,c.p=A,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)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var 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}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function X_(){const e=new Blob([K_]);return URL.createObjectURL(e)}function ue(e,t){z&&(h.info(e),t&&yu(e))}function Ot(e,t){z&&(h.info(e),t&&setTimeout(()=>{yu(e)},0))}function yu(e){je({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class ii extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Zs}.`)}}class Su{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Zs)throw new ii;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?si(t):null}}class J_{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){ue("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){z&&h.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class Z_{constructor(t){this._worker=new J_(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=si(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Zs?Promise.reject(new ii):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{z&&h.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Q_{constructor(t){this._fallback=new Su,this._compression=new Z_(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{ue("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){z&&h.warn("[Replay] Failed to add events when switching buffers.",s)}}}function ey({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=ty(t);if(n)return n}return ue("[Replay] Using simple buffer"),new Su}function ty(e){try{const t=e||ny();if(!t)return;ue(`[Replay] Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Q_(n)}catch{ue("[Replay] Failed to create compression worker")}}function ny(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?X_():""}function oi(){try{return"sessionStorage"in G&&!!G.sessionStorage}catch{return!1}}function ry(e){sy(),e.session=void 0}function sy(){if(oi())try{G.sessionStorage.removeItem(Xs)}catch{}}function bu(e){return e===void 0?!1:Math.random()<e}function Eu(e){const t=Date.now(),n=e.id||Lt(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function ai(e){if(oi())try{G.sessionStorage.setItem(Xs,JSON.stringify(e))}catch{}}function iy(e,t){return bu(e)?"session":t?"buffer":!1}function Ro({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=iy(e,t),i=Eu({sampled:s,previousSessionId:r});return n&&ai(i),i}function oy(e){if(!oi())return null;try{const t=G.sessionStorage.getItem(Xs);if(!t)return null;const n=JSON.parse(t);return Ot("[Replay] Loading existing session",e),Eu(n)}catch{return null}}function Is(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function vu(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Is(e.started,t,r)||Is(e.lastActivity,n,r)}function Tu(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!vu(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Jr({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){const i=s.stickySession&&oy(e);return i?Tu(i,{sessionIdleExpire:t,maxReplayDuration:n})?(Ot("[Replay] Session in sessionStorage is expired, creating new one..."),Ro(s,{previousSessionId:i.id})):i:(Ot("[Replay] Creating new session",e),Ro(s,{previousSessionId:r}))}function ay(e){return e.type===O.Custom}function ci(e,t,n){return wu(e,t)?(Iu(e,t,n),!0):!1}function cy(e,t,n){return wu(e,t)?Iu(e,t,n):Promise.resolve(null)}async function Iu(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),s=uy(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof ii?"addEventSizeExceeded":"addEvent";z&&h.error(r),await e.stop({reason:s});const i=A();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function wu(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=si(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(ue(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function uy(e,t){try{if(typeof t=="function"&&ay(e))return t(e)}catch(n){return z&&h.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function ui(e){return!e.type}function ws(e){return e.type==="transaction"}function ly(e){return e.type==="replay_event"}function Co(e){return e.type==="feedback"}function ku(e){const t=py();return(n,r)=>{if(!e.isEnabled()||!ui(n)&&!ws(n))return;const s=r&&r.statusCode;if(!(t&&(!s||s<200||s>=300))){if(ws(n)){dy(e,n);return}fy(e,n)}}}function dy(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 fy(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function py(){const e=A();if(!e)return!1;const t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function hy(e){return t=>{!e.isEnabled()||!ui(t)||my(e,t)}}function my(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=xe({category:"replay.hydrate-error"});xn(e,r)}}function gy(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function _y(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:O.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function yy(e,t){return e.recordingMode!=="buffer"||t.message===Js||!t.exception||t.type?!1:bu(e.getOptions().errorSampleRate)}function Sy(e,t=!1){const n=t?ku(e):void 0;return Object.assign((r,s)=>e.isEnabled()?ly(r)?(delete r.breadcrumbs,r):!ui(r)&&!ws(r)&&!Co(r)||!e.checkAndHandleExpiredSession()?r:Co(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),_y(e,r),r):gy(r,s)&&!e.getOptions()._experiments.captureExceptions?(z&&h.log("[Replay] Ignoring error from rrweb internals",r),null):((yy(e,r)||e.recordingMode==="session")&&(r.tags={...r.tags,replayId:e.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function Mr(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:O.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function by(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 Ey(e){return t=>{if(!e.isEnabled())return;const n=by(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Mr(e,[n]),!1)))}}function vy(e,t){return z&&e.getOptions()._experiments.traceInternals?!1:tc(t,A())}function Or(e,t){e.isEnabled()&&t!==null&&(vy(e,t.name)||e.addUpdate(()=>(Mr(e,[t]),!0)))}function Ty(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;const{method:i,url:o}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}function Iy(e){return t=>{if(!e.isEnabled())return;const n=Ty(t);Or(e,n)}}function wy(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[Me];if(!t||!n||!s)return null;const{method:i,url:o,status_code:a}=s;return o===void 0?null:{type:"resource.xhr",name:o,start:t/1e3,end:n/1e3,data:{method:i,statusCode:a}}}function ky(e){return t=>{if(!e.isEnabled())return;const n=wy(t);Or(e,n)}}function Nr(e,t){if(e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Au(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Ru(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Cu(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Au(e)];if(!e)return[void 0]}catch{return z&&h.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return z&&h.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function hr(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 xu(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:Te({method:i,statusCode:o,request:a,response:c})}}function _n(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function We(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=Ry(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function ks(e,t){return Object.keys(e).reduce((n,r)=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function Au(e){return new URLSearchParams(e).toString()}function Ry(e){if(!e||typeof e!="string")return{body:e};const t=e.length>fo,n=Cy(e);if(t){const r=e.slice(0,fo);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Cy(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function mr(e,t){const n=xy(e);return Yt(n,t)}function xy(e,t=G.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(G.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 Ay(e,t,n){try{const r=await Oy(e,t,n),s=xu("resource.fetch",r);Or(n.replay,s)}catch(r){z&&h.error("[Replay] Failed to capture fetch breadcrumb",r)}}function My(e,t,n){const{input:r,response:s}=t,i=r?Mu(r):void 0,o=Nr(i,n.textEncoder),a=s?Ru(s.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),a!==void 0&&(e.data.response_body_size=a)}async function Oy(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=mr(o,n.networkDetailAllowUrls)&&!mr(o,n.networkDetailDenyUrls),f=d?Ny(n,t.input,u):_n(u),p=await Dy(d,n,t.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:p}}function Ny({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Fy(n,t):{};if(!e)return We(s,r,void 0);const i=Mu(n),[o,a]=Cu(i),c=We(s,r,o);return a?hr(c,a):c}async function Dy(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,i){if(!e&&i!==void 0)return _n(i);const o=s?Ou(s.headers,r):{};if(!s||!t&&i!==void 0)return We(o,i,void 0);const[a,c]=await Py(s),u=Ly(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:o});return c?hr(u,c):u}function Ly(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{const o=e&&e.length&&r===void 0?Nr(e,n):r;return s?t?We(i,o,e):We(i,o,void 0):_n(o)}catch(o){return z&&h.warn("[Replay] Failed to serialize response body",o),We(i,r,void 0)}}async function Py(e){const t=$y(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await By(t)]}catch(n){return z&&h.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Mu(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Ou(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Fy(e,t){return e.length===1&&typeof e[0]!="string"?xo(e[0],t):e.length===2?xo(e[1],t):{}}function xo(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Ou(n,t):Array.isArray(n)?{}:ks(n,t):{}}function $y(e){try{return e.clone()}catch(t){z&&h.warn("[Replay] Failed to clone response body",t)}}function By(e){return new Promise((t,n)=>{const r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);Hy(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function Hy(e){return await e.text()}async function Uy(e,t,n){try{const r=zy(e,t,n),s=xu("resource.xhr",r);Or(n.replay,s)}catch(r){z&&h.error("[Replay] Failed to capture xhr breadcrumb",r)}}function Wy(e,t,n){const{xhr:r,input:s}=t;if(!r)return;const i=Nr(s,n.textEncoder),o=r.getResponseHeader("content-length")?Ru(r.getResponseHeader("content-length")):Yy(r.response,r.responseType,n.textEncoder);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function zy(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!a||!mr(c,n.networkDetailAllowUrls)||mr(c,n.networkDetailDenyUrls)){const I=_n(d),x=_n(f);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:I,response:x}}const p=a[Me],m=p?ks(p.request_headers,n.networkRequestHeaders):{},_=ks(jy(a),n.networkResponseHeaders),[S,g]=n.networkCaptureBodies?Cu(o):[void 0],[y,b]=n.networkCaptureBodies?qy(a):[void 0],T=We(m,d,S),v=We(_,f,y);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:g?hr(T,g):T,response:b?hr(v,b):v}}function jy(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
23
23
|
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s.toLowerCase()]=i,n},{}):{}}function qy(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Gy(e.response,e.responseType)}catch(n){t.push(n)}return z&&h.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function Gy(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return z&&h.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return z&&h.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Yy(e,t,n){try{const r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Nr(r,n)}catch{return}}function Vy(e){const t=A();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(u,l)=>Ky(c,u,l)):(Er(Iy(e)),vr(ky(e)))}catch{}}function Ky(e,t,n){if(t.data)try{Xy(t)&&Zy(n)&&(Wy(t,n,e),Uy(t,n,e)),Jy(t)&&Qy(n)&&(My(t,n,e),Ay(t,n,e))}catch{z&&h.warn("Error when enriching network breadcrumb")}}function Xy(e){return e.category==="xhr"}function Jy(e){return e.category==="fetch"}function Zy(e){return e&&e.xhr}function Qy(e){return e&&e.response}let Ao=null;function eS(e){return!!e.category}const tS=e=>t=>{if(!e.isEnabled())return;const n=nS(t);n&&xn(e,n)};function nS(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return Ao===t||!t||(Ao=t,!eS(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?rS(t):xe(t)}function rS(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return xe(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Bn?(n=!0,`${s.slice(0,Bn)}…`):s;if(typeof s=="object")try{const i=gr(s,7);return JSON.stringify(i).length>Bn?(n=!0,`${JSON.stringify(i,null,2).slice(0,Bn)}…`):i}catch{}return s});return xe({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function sS(e){const t=ae(),n=A();t.addScopeListener(tS(e)),Ta(L_(e)),bn(Ey(e)),Vy(e);const r=Sy(e,!Mo(n));n&&n.addEventProcessor?n.addEventProcessor(r):Tf(r),Mo(n)&&(n.on("beforeSendEvent",hy(e)),n.on("afterSendEvent",ku(e)),n.on("createDsc",s=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("startTransaction",s=>{e.lastTransaction=s}),n.on("finishTransaction",s=>{e.lastTransaction=s}),n.on("beforeSendFeedback",(s,i)=>{const o=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&o&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=o)}))}function Mo(e){return!!(e&&e.on)}async function iS(e){try{return Promise.all(Mr(e,[oS(G.performance.memory)]))}catch{return[]}}function oS(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 aS(e,t,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=setTimeout(a,t),o&&i===void 0&&(i=setTimeout(a,o)),r}return l.cancel=c,l.flush=u,l}function cS(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){z&&h.warn("[Replay] Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&A_(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!ci(e,n,s))return!0;if(!s)return!1;if(lS(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const i=e.eventBuffer.getEarliestTimestamp();i&&(ue(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&ai(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function uS(e){const t=e.getOptions();return{type:O.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function lS(e,t){!t||!e.session||e.session.segmentId!==0||ci(e,uS(e),!1)}function dS(e,t,n,r){return Ne(Aa(e,Us(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function fS({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
24
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function pS({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit&&e.emit("preprocessEvent",r,i);const o=await Ps(e.getOptions(),r,i,t,e,Gt());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata&&e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function hS({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=fS({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=A(),f=ae(),p=d&&d.getTransport(),m=d&&d.getDsn();if(!d||!p||!m||!i.sampled)return;const _={type:Zm,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},S=await pS({scope:f,client:d,replayId:t,event:_});if(!S){d.recordDroppedEvent("event_processor","replay",_),ue("An event processor returned `null`, will not send event.");return}delete S.sdkProcessingMetadata;const g=dS(S,o,m,d.getOptions().tunnel);let y;try{y=await p.send(g)}catch(T){const v=new Error(Js);try{v.cause=T}catch{}throw v}if(!y)return y;if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new Nu(y.statusCode);const b=Na({},y);if(Oa(b,"replay"))throw new Du(b);return y}class Nu extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Du extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Lu(e,t={count:0,interval:sg}){const{recordingData:n,options:r}=e;if(n.length)try{return await hS(e),!0}catch(s){if(s instanceof Nu||s instanceof Du)throw s;if(ql("Replays",{_retryCount:t.count}),z&&r._experiments&&r._experiments.captureExceptions&&Sn(s),t.count>=ig){const i=new Error(`${Js} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{setTimeout(async()=>{try{await Lu(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const Pu="__THROTTLED",mS="__SKIPPED";function gS(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){const l=o;return o=!0,l?mS:Pu}o=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class Be{constructor({options:t,recordingOptions:n}){Be.prototype.__init.call(this),Be.prototype.__init2.call(this),Be.prototype.__init3.call(this),Be.prototype.__init4.call(this),Be.prototype.__init5.call(this),Be.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Qm,sessionIdleExpire:eg},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=aS(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=gS((o,a)=>cy(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(og,r),timeout:r,scrollTimeout:ag,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new k_(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Ot(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Ot("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const t=Jr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Ot("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Jr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Ue({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:rg},emit:cS(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{ue(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,ry(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),ue("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),ue("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();ue("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Is(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${G.location.pathname}${G.location.hash}${G.location.search}`,n=`${G.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Pu){const s=xe({category:"replay.throttled"});this.addUpdate(()=>!ci(this,{type:b_,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastTransaction||ae().getTransaction(),r=(t&&j(t).data||{})[ee];if(!(!t||!r||!["route","custom"].includes(r)))return j(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=ey({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){z&&h.error("[Replay]",t),z&&this._options._experiments&&this._options._experiments.captureExceptions&&Sn(t)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Jr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Tu(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{G.document.addEventListener("visibilitychange",this._handleVisibilityChange),G.addEventListener("blur",this._handleWindowBlur),G.addEventListener("focus",this._handleWindowFocus),G.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(sS(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=V_(this)}_removeListeners(){try{G.document.removeEventListener("visibilitychange",this._handleVisibilityChange),G.removeEventListener("blur",this._handleWindowBlur),G.removeEventListener("focus",this._handleWindowFocus),G.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{G.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=xe({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=xe({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{B_(this,t)}}_doChangeToBackgroundTasks(t){!this.session||vu(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){ue("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:O.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=W_(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Mr(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={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(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){z&&h.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await iS(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Lu({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});const r=A();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){z&&h.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){ue(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}const a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&ue("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){z&&h.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&ai(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=xe({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function tn(e,t,n,r){const s=typeof r=="string"?r.split(","):[],i=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),Dt(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function _S({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l=['base[href="/"]'],d=tn(e,[".sentry-mask","[data-sentry-mask]"],a,c),f=tn(t,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:d,unmaskTextSelector:f,blockSelector:tn(n,[".sentry-block","[data-sentry-block]",...l],i,o),unblockSelector:tn(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:tn(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(p.blockClass=i),a instanceof RegExp&&(p.maskTextClass=a),p}function yS({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const Oo='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',SS=["content-length","content-type","accept"];let No=!1;const iv=e=>new Dr(e);class Dr{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=tg,flushMaxDelay:n=ng,minReplayDuration:r=cg,maxReplayDuration:s=po,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},sessionSampleRate:u,errorSampleRate:l,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:m=750,mutationLimit:_=1e4,slowClickTimeout:S=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:b=[],networkCaptureBodies:T=!0,networkRequestHeaders:v=[],networkResponseHeaders:I=[],mask:x=[],maskAttributes:M=["title","placeholder"],unmask:w=[],block:C=[],unblock:D=[],ignore:Y=[],maskFn:te,beforeAddRecordingEvent:ie,beforeErrorSampling:fe,blockClass:W,blockSelector:ge,maskInputOptions:Q,maskTextClass:de,maskTextSelector:_e,ignoreClass:$r}={}){this.name=Dr.id;const mt=_S({mask:x,unmask:w,block:C,unblock:D,ignore:Y,blockClass:W,blockSelector:ge,maskTextClass:de,maskTextSelector:_e,ignoreClass:$r});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...Q||{},password:!0},maskTextFn:te,maskInputFn:te,maskAttributeFn:(De,gt,Qt)=>yS({maskAttributes:M,maskAllText:d,privacyOptions:mt,key:De,value:gt,el:Qt}),...mt,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:De=>{try{De.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,ug),maxReplayDuration:Math.min(s,po),stickySession:i,sessionSampleRate:u,errorSampleRate:l,useCompression:o,workerUrl:a,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:m,mutationLimit:_,slowClickTimeout:S,slowClickIgnoreSelectors:g,networkDetailAllowUrls:y,networkDetailDenyUrls:b,networkCaptureBodies:T,networkRequestHeaders:Do(v),networkResponseHeaders:Do(I),beforeAddRecordingEvent:ie,beforeErrorSampling:fe,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
|
|
24
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function pS({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit&&e.emit("preprocessEvent",r,i);const o=await Ps(e.getOptions(),r,i,t,e,Gt());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata&&e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function hS({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=fS({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=A(),f=ae(),p=d&&d.getTransport(),m=d&&d.getDsn();if(!d||!p||!m||!i.sampled)return;const _={type:Zm,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},S=await pS({scope:f,client:d,replayId:t,event:_});if(!S){d.recordDroppedEvent("event_processor","replay",_),ue("An event processor returned `null`, will not send event.");return}delete S.sdkProcessingMetadata;const g=dS(S,o,m,d.getOptions().tunnel);let y;try{y=await p.send(g)}catch(T){const v=new Error(Js);try{v.cause=T}catch{}throw v}if(!y)return y;if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new Nu(y.statusCode);const b=Na({},y);if(Oa(b,"replay"))throw new Du(b);return y}class Nu extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Du extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Lu(e,t={count:0,interval:sg}){const{recordingData:n,options:r}=e;if(n.length)try{return await hS(e),!0}catch(s){if(s instanceof Nu||s instanceof Du)throw s;if(ql("Replays",{_retryCount:t.count}),z&&r._experiments&&r._experiments.captureExceptions&&Sn(s),t.count>=ig){const i=new Error(`${Js} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{setTimeout(async()=>{try{await Lu(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const Pu="__THROTTLED",mS="__SKIPPED";function gS(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){const l=o;return o=!0,l?mS:Pu}o=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class Be{constructor({options:t,recordingOptions:n}){Be.prototype.__init.call(this),Be.prototype.__init2.call(this),Be.prototype.__init3.call(this),Be.prototype.__init4.call(this),Be.prototype.__init5.call(this),Be.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Qm,sessionIdleExpire:eg},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=aS(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=gS((o,a)=>cy(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(og,r),timeout:r,scrollTimeout:ag,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new k_(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Ot(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Ot("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const t=Jr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Ot("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Jr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Ue({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:rg},emit:cS(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{ue(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,ry(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),ue("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),ue("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();ue("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Is(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${G.location.pathname}${G.location.hash}${G.location.search}`,n=`${G.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Pu){const s=xe({category:"replay.throttled"});this.addUpdate(()=>!ci(this,{type:b_,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastTransaction||ae().getTransaction(),r=(t&&j(t).data||{})[ee];if(!(!t||!r||!["route","custom"].includes(r)))return j(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=ey({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){z&&h.error("[Replay]",t),z&&this._options._experiments&&this._options._experiments.captureExceptions&&Sn(t)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Jr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Tu(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{G.document.addEventListener("visibilitychange",this._handleVisibilityChange),G.addEventListener("blur",this._handleWindowBlur),G.addEventListener("focus",this._handleWindowFocus),G.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(sS(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=V_(this)}_removeListeners(){try{G.document.removeEventListener("visibilitychange",this._handleVisibilityChange),G.removeEventListener("blur",this._handleWindowBlur),G.removeEventListener("focus",this._handleWindowFocus),G.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{G.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=xe({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=xe({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{B_(this,t)}}_doChangeToBackgroundTasks(t){!this.session||vu(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){ue("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:O.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=W_(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Mr(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={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(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){z&&h.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await iS(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Lu({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});const r=A();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){z&&h.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){ue(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}const a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&ue("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){z&&h.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&ai(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=xe({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function tn(e,t,n,r){const s=typeof r=="string"?r.split(","):[],i=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),Dt(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function _S({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l=['base[href="/"]'],d=tn(e,[".sentry-mask","[data-sentry-mask]"],a,c),f=tn(t,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:d,unmaskTextSelector:f,blockSelector:tn(n,[".sentry-block","[data-sentry-block]",...l],i,o),unblockSelector:tn(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:tn(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(p.blockClass=i),a instanceof RegExp&&(p.maskTextClass=a),p}function yS({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const Oo='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',SS=["content-length","content-type","accept"];let No=!1;const av=e=>new Dr(e);class Dr{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=tg,flushMaxDelay:n=ng,minReplayDuration:r=cg,maxReplayDuration:s=po,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},sessionSampleRate:u,errorSampleRate:l,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:m=750,mutationLimit:_=1e4,slowClickTimeout:S=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:b=[],networkCaptureBodies:T=!0,networkRequestHeaders:v=[],networkResponseHeaders:I=[],mask:x=[],maskAttributes:M=["title","placeholder"],unmask:w=[],block:C=[],unblock:D=[],ignore:Y=[],maskFn:te,beforeAddRecordingEvent:ie,beforeErrorSampling:fe,blockClass:W,blockSelector:ge,maskInputOptions:Q,maskTextClass:de,maskTextSelector:_e,ignoreClass:$r}={}){this.name=Dr.id;const mt=_S({mask:x,unmask:w,block:C,unblock:D,ignore:Y,blockClass:W,blockSelector:ge,maskTextClass:de,maskTextSelector:_e,ignoreClass:$r});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...Q||{},password:!0},maskTextFn:te,maskInputFn:te,maskAttributeFn:(De,gt,Qt)=>yS({maskAttributes:M,maskAllText:d,privacyOptions:mt,key:De,value:gt,el:Qt}),...mt,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:De=>{try{De.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,ug),maxReplayDuration:Math.min(s,po),stickySession:i,sessionSampleRate:u,errorSampleRate:l,useCompression:o,workerUrl:a,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:m,mutationLimit:_,slowClickTimeout:S,slowClickIgnoreSelectors:g,networkDetailAllowUrls:y,networkDetailDenyUrls:b,networkCaptureBodies:T,networkRequestHeaders:Do(v),networkResponseHeaders:Do(I),beforeAddRecordingEvent:ie,beforeErrorSampling:fe,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
|
|
25
25
|
This option is deprecated and will be removed soon.
|
|
26
26
|
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
|
|
27
27
|
Sentry.init({ replaysSessionSampleRate: ${u} })`),this._initialOptions.sessionSampleRate=u),typeof l=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
|
|
28
28
|
This option is deprecated and will be removed soon.
|
|
29
29
|
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
|
|
30
|
-
Sentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Oo}`:Oo),this._isInitialized&&ds())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return No}set _isInitialized(t){No=t}setupOnce(){ds()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=bS(this._initialOptions);this._replay=new Be({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=A().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Dr.__initStatic();function bS(e){const t=A(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Te(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Dt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Dt(()=>{console.warn("SDK client is not available.")}),r)}function Do(e){return[...SS,...e.map(t=>t.toLowerCase())]}function
|
|
30
|
+
Sentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Oo}`:Oo),this._isInitialized&&ds())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return No}set _isInitialized(t){No=t}setupOnce(){ds()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=bS(this._initialOptions);this._replay=new Be({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=A().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Dr.__initStatic();function bS(e){const t=A(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Te(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Dt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Dt(()=>{console.warn("SDK client is not available.")}),r)}function Do(e){return[...SS,...e.map(t=>t.toLowerCase())]}function cv(){const e=A();return e&&e.getIntegrationByName&&e.getIntegrationByName("Replay")}var Lo;(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"})(Lo||(Lo={}));function ES(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Rs(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Rs(e.parentNode,t,n,r+1)}function Po(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(ES(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const vt=`Please stop import mirror directly. Instead of that,\r
|
|
31
31
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
32
|
-
or you can use record.mirror to access the mirror instance during recording.`;let Fo={map:{},getId(){return console.error(vt),-1},getNode(){return console.error(vt),null},removeNodeFromMap(){console.error(vt)},has(){return console.error(vt),!1},reset(){console.error(vt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Fo=new Proxy(Fo,{get(e,t,n){return t==="map"&&console.error(vt),Reflect.get(e,t,n)}}));function li(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){$u(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>li(e,t,i||{},!0)}function di(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function vS(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Lr(e,t,n,r,s){if(!e)return!1;const i=vS(e);if(!i)return!1;const o=Po(t,n),a=Rs(i,o);let c=-1;return a<0?!1:(r&&(c=Rs(i,Po(null,r))),a>-1&&c<0?!0:a<c)}const $o={};function Fu(e){const t=$o[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return $o[e]=r.bind(window)}function Ke(...e){return Fu("requestAnimationFrame")(...e)}function $u(...e){return Fu("setTimeout")(...e)}var zt=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(zt||{});let Vn;function TS(e){Vn=e}const Bo=e=>Vn?(...n)=>{try{return e(...n)}catch(r){if(Vn&&Vn(r)===!0)return()=>{};throw r}}:e;var Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",IS=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Wn=0;Wn<Ct.length;Wn++)IS[Ct.charCodeAt(Wn)]=Wn;var wS=function(e){var t=new Uint8Array(e),n,r=t.length,s="";for(n=0;n<r;n+=3)s+=Ct[t[n]>>2],s+=Ct[(t[n]&3)<<4|t[n+1]>>4],s+=Ct[(t[n+1]&15)<<2|t[n+2]>>6],s+=Ct[t[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const Ho=new Map;function kS(e,t){let n=Ho.get(e);return n||(n=new Map,Ho.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const Bu=(e,t,n)=>{if(!e||!(Uu(e,t)||typeof e=="object"))return;const r=e.constructor.name,s=kS(n,r);let i=s.indexOf(e);return i===-1&&(i=s.length,s.push(e)),i};function Kn(e,t,n){if(e instanceof Array)return e.map(r=>Kn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,s=wS(e);return{rr_type:r,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Kn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:s}=e;return{rr_type:r,src:s}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",s=e.toDataURL();return{rr_type:r,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Kn(e.data,t,n),e.width,e.height]};if(Uu(e,t)||typeof e=="object"){const r=e.constructor.name,s=Bu(e,t,n);return{rr_type:r,index:s}}}}return e}const Hu=(e,t,n)=>e.map(r=>Kn(r,t,n)),Uu=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function RS(e,t,n,r,s){const i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=di(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...l){return Lr(this.canvas,n,r,s)||$u(()=>{const d=Hu(l,t,this);e(this.canvas,{type:zt["2D"],property:a,args:d})},0),u.apply(this,l)}});i.push(c)}catch{const u=li(t.CanvasRenderingContext2D.prototype,a,{set(l){e(this.canvas,{type:zt["2D"],property:a,args:[l],setter:!0})}});i.push(u)}return()=>{i.forEach(a=>a())}}function CS(e){return e==="experimental-webgl"?"webgl":e}function Uo(e,t,n,r,s){const i=[];try{const o=di(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Lr(this,t,n,r)){const l=CS(c);if("__context"in this||(this.__context=l),s&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){const d=u[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Wo(e,t,n,r,s,i,o,a){const c=[],u=Object.getOwnPropertyNames(e);for(const l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const d=di(e,l,function(f){return function(...p){const m=f.apply(this,p);if(Bu(m,a,this),"tagName"in this.canvas&&!Lr(this.canvas,r,s,i)){const _=Hu(p,a,this),S={type:t,property:l,args:_};n(this.canvas,S)}return m}});c.push(d)}catch{const f=li(e,l,{set(p){n(this.canvas,{type:t,property:l,args:[p],setter:!0})}});c.push(f)}return c}function xS(e,t,n,r,s,i){const o=[];return o.push(...Wo(t.WebGLRenderingContext.prototype,zt.WebGL,e,n,r,s,i,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Wo(t.WebGL2RenderingContext.prototype,zt.WebGL2,e,n,r,s,i,t)),()=>{o.forEach(a=>a())}}var AS='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function MS(){const e=new Blob([AS]);return URL.createObjectURL(e)}class OS{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)};const{sampling:n="all",win:r,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:a,recordCanvas:c,dataURLOptions:u,errorHandler:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,l&&TS(l),!t.enableManualSnapshot&&Bo(()=>{c&&n==="all"&&this.initCanvasMutationObserver(r,s,i,o),c&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,i,o,a,{dataURLOptions:u})})()}initCanvasFPSObserver(t,n,r,s,i,o,a){const c=Uo(n,r,s,i,!0),u=this.takeSnapshot(!1,t,n,r,s,i,o,a.dataURLOptions);this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,n,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Uo(t,n,r,s,!1),o=RS(this.processMutation.bind(this),t,n,r,s),a=xS(this.processMutation.bind(this),t,n,r,s,this.mirror);this.resetObservers=()=>{i(),o(),a()}}snapshot(t){const{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.win,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.resetObservers=()=>{cancelAnimationFrame(r)}}takeSnapshot(t,n,r,s,i,o,a,c,u){const l=new Map,d=new Worker(MS());d.onmessage=g=>{const y=g.data,{id:b}=y;if(l.set(b,!1),!("base64"in y))return;const{base64:T,type:v,width:I,height:x}=y;this.mutationCb({id:b,type:zt["2D"],commands:[{property:"clearRect",args:[0,0,I,x]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:T}],type:v}]},0,0,I,x]}]})};const f=1e3/n;let p=0,m;const _=g=>{if(g)return[g];const y=[];return r.document.querySelectorAll("canvas").forEach(b=>{Lr(b,s,i,o)||y.push(b)}),y},S=g=>{if(p&&g-p<f){m=Ke(S);return}p=g,_(u).forEach(y=>{const b=this.mirror.getId(y);if(!l.get(b)&&!(!y.width||!y.height)){if(l.set(b,!0),!t&&["webgl","webgl2"].includes(y.__context)){const T=y.getContext(y.__context);Yn([T,"optionalAccess",v=>v.getContextAttributes,"call",v=>v(),"optionalAccess",v=>v.preserveDrawingBuffer])===!1&&T.clear(T.COLOR_BUFFER_BIT)}createImageBitmap(y).then(T=>{d.postMessage({id:b,bitmap:T,width:y.width,height:y.height,dataURLOptions:c,maxCanvasSize:a},[T])}).catch(T=>{Bo(()=>{throw T})()})}}),m=Ke(S)};return m=Ke(S),m}startPendingCanvasMutationFlusher(){Ke(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Ke(t)};Ke(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Ke(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const s=r.map(o=>{const{type:a,...c}=o;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:s}),this.pendingCanvasMutations.delete(t)}}const zo={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Wu="ReplayCanvas",zn=1280,NS=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,zn):zn,n?Math.min(n,zn):zn]};let s;const i=new Promise(o=>s=o);return{name:Wu,setupOnce(){},getOptions(){const{quality:o,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const l=new OS({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return s(l),l},...zo[o]||zo.medium}},async snapshot(o){(await i).snapshot(o)}}},DS=NS,av=Z(Wu,DS),ht=U,Zr="#ffffff",jo="inherit",Qr="rgba(108, 95, 199, 1)",qo={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:Zr,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:Qr,submitBorder:Qr,submitOutlineFocus:"#29232f",submitForeground:Zr,submitForegroundHover:Zr,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:jo,inputForeground:jo,inputBorder:"var(--border)",inputOutlineFocus:Qr,formBorderRadius:"20px",formContentBorderRadius:"6px"},Go={light:qo,dark:{...qo,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"}},LS="Report a Bug",PS="Cancel",FS="Send Bug Report",$S="Report a Bug",BS="your.email@example.org",HS="Email",US="What's the bug? What did you expect?",WS="Description",zS="Your Name",jS="Name",qS="(required)",GS="Thank you for your report!",zu="widget",ju="api";async function YS({client:e,scope:t,event:n}){const r={};e.emit&&e.emit("preprocessEvent",n,r);const s=await Ps(e.getOptions(),n,r,t,e,Gt());return s===null?(e.recordDroppedEvent("event_processor","feedback",n),null):(s.platform=s.platform||"javascript",s)}async function VS({feedback:{message:e,email:t,name:n,source:r,url:s}},{includeReplay:i=!0}={}){const o=A(),a=o&&o.getTransport(),c=o&&o.getDsn();if(!o||!a||!c)return;const u={contexts:{feedback:{contact_email:t,name:n,message:e,url:s,source:r}},type:"feedback"};return lt(async l=>{l.clearBreadcrumbs(),[ju,zu].includes(String(r))&&l.setLevel("info");const d=await YS({scope:l,client:o,event:u});if(!d)return;o.emit&&o.emit("beforeSendFeedback",d,{includeReplay:!!i});const f=ja(d,c,o.getOptions()._metadata,o.getOptions().tunnel);let p;try{p=await a.send(f)}catch(m){const _=new Error("Unable to send Feedback");try{_.cause=m}catch{}throw _}if(p){if(typeof p.statusCode=="number"&&(p.statusCode<200||p.statusCode>=300))throw new Error("Unable to send Feedback");return p}})}function KS({name:e,email:t,message:n,source:r=ju,url:s=_a()},i={}){if(!n)throw new Error("Unable to submit feedback with empty message");return VS({feedback:{name:e,email:t,message:n,url:s,source:r}},i)}const Xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yo(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function XS(e){const t=e.createElement("style");return t.textContent=`
|
|
32
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Fo={map:{},getId(){return console.error(vt),-1},getNode(){return console.error(vt),null},removeNodeFromMap(){console.error(vt)},has(){return console.error(vt),!1},reset(){console.error(vt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Fo=new Proxy(Fo,{get(e,t,n){return t==="map"&&console.error(vt),Reflect.get(e,t,n)}}));function li(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){$u(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>li(e,t,i||{},!0)}function di(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function vS(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Lr(e,t,n,r,s){if(!e)return!1;const i=vS(e);if(!i)return!1;const o=Po(t,n),a=Rs(i,o);let c=-1;return a<0?!1:(r&&(c=Rs(i,Po(null,r))),a>-1&&c<0?!0:a<c)}const $o={};function Fu(e){const t=$o[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return $o[e]=r.bind(window)}function Ke(...e){return Fu("requestAnimationFrame")(...e)}function $u(...e){return Fu("setTimeout")(...e)}var zt=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(zt||{});let Vn;function TS(e){Vn=e}const Bo=e=>Vn?(...n)=>{try{return e(...n)}catch(r){if(Vn&&Vn(r)===!0)return()=>{};throw r}}:e;var Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",IS=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Wn=0;Wn<Ct.length;Wn++)IS[Ct.charCodeAt(Wn)]=Wn;var wS=function(e){var t=new Uint8Array(e),n,r=t.length,s="";for(n=0;n<r;n+=3)s+=Ct[t[n]>>2],s+=Ct[(t[n]&3)<<4|t[n+1]>>4],s+=Ct[(t[n+1]&15)<<2|t[n+2]>>6],s+=Ct[t[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const Ho=new Map;function kS(e,t){let n=Ho.get(e);return n||(n=new Map,Ho.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const Bu=(e,t,n)=>{if(!e||!(Uu(e,t)||typeof e=="object"))return;const r=e.constructor.name,s=kS(n,r);let i=s.indexOf(e);return i===-1&&(i=s.length,s.push(e)),i};function Kn(e,t,n){if(e instanceof Array)return e.map(r=>Kn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,s=wS(e);return{rr_type:r,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Kn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:s}=e;return{rr_type:r,src:s}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",s=e.toDataURL();return{rr_type:r,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Kn(e.data,t,n),e.width,e.height]};if(Uu(e,t)||typeof e=="object"){const r=e.constructor.name,s=Bu(e,t,n);return{rr_type:r,index:s}}}}return e}const Hu=(e,t,n)=>e.map(r=>Kn(r,t,n)),Uu=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function RS(e,t,n,r,s){const i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=di(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...l){return Lr(this.canvas,n,r,s)||$u(()=>{const d=Hu(l,t,this);e(this.canvas,{type:zt["2D"],property:a,args:d})},0),u.apply(this,l)}});i.push(c)}catch{const u=li(t.CanvasRenderingContext2D.prototype,a,{set(l){e(this.canvas,{type:zt["2D"],property:a,args:[l],setter:!0})}});i.push(u)}return()=>{i.forEach(a=>a())}}function CS(e){return e==="experimental-webgl"?"webgl":e}function Uo(e,t,n,r,s){const i=[];try{const o=di(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Lr(this,t,n,r)){const l=CS(c);if("__context"in this||(this.__context=l),s&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){const d=u[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Wo(e,t,n,r,s,i,o,a){const c=[],u=Object.getOwnPropertyNames(e);for(const l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const d=di(e,l,function(f){return function(...p){const m=f.apply(this,p);if(Bu(m,a,this),"tagName"in this.canvas&&!Lr(this.canvas,r,s,i)){const _=Hu(p,a,this),S={type:t,property:l,args:_};n(this.canvas,S)}return m}});c.push(d)}catch{const f=li(e,l,{set(p){n(this.canvas,{type:t,property:l,args:[p],setter:!0})}});c.push(f)}return c}function xS(e,t,n,r,s,i){const o=[];return o.push(...Wo(t.WebGLRenderingContext.prototype,zt.WebGL,e,n,r,s,i,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Wo(t.WebGL2RenderingContext.prototype,zt.WebGL2,e,n,r,s,i,t)),()=>{o.forEach(a=>a())}}var AS='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function MS(){const e=new Blob([AS]);return URL.createObjectURL(e)}class OS{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)};const{sampling:n="all",win:r,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:a,recordCanvas:c,dataURLOptions:u,errorHandler:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,l&&TS(l),!t.enableManualSnapshot&&Bo(()=>{c&&n==="all"&&this.initCanvasMutationObserver(r,s,i,o),c&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,i,o,a,{dataURLOptions:u})})()}initCanvasFPSObserver(t,n,r,s,i,o,a){const c=Uo(n,r,s,i,!0),u=this.takeSnapshot(!1,t,n,r,s,i,o,a.dataURLOptions);this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,n,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Uo(t,n,r,s,!1),o=RS(this.processMutation.bind(this),t,n,r,s),a=xS(this.processMutation.bind(this),t,n,r,s,this.mirror);this.resetObservers=()=>{i(),o(),a()}}snapshot(t){const{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.win,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.resetObservers=()=>{cancelAnimationFrame(r)}}takeSnapshot(t,n,r,s,i,o,a,c,u){const l=new Map,d=new Worker(MS());d.onmessage=g=>{const y=g.data,{id:b}=y;if(l.set(b,!1),!("base64"in y))return;const{base64:T,type:v,width:I,height:x}=y;this.mutationCb({id:b,type:zt["2D"],commands:[{property:"clearRect",args:[0,0,I,x]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:T}],type:v}]},0,0,I,x]}]})};const f=1e3/n;let p=0,m;const _=g=>{if(g)return[g];const y=[];return r.document.querySelectorAll("canvas").forEach(b=>{Lr(b,s,i,o)||y.push(b)}),y},S=g=>{if(p&&g-p<f){m=Ke(S);return}p=g,_(u).forEach(y=>{const b=this.mirror.getId(y);if(!l.get(b)&&!(!y.width||!y.height)){if(l.set(b,!0),!t&&["webgl","webgl2"].includes(y.__context)){const T=y.getContext(y.__context);Yn([T,"optionalAccess",v=>v.getContextAttributes,"call",v=>v(),"optionalAccess",v=>v.preserveDrawingBuffer])===!1&&T.clear(T.COLOR_BUFFER_BIT)}createImageBitmap(y).then(T=>{d.postMessage({id:b,bitmap:T,width:y.width,height:y.height,dataURLOptions:c,maxCanvasSize:a},[T])}).catch(T=>{Bo(()=>{throw T})()})}}),m=Ke(S)};return m=Ke(S),m}startPendingCanvasMutationFlusher(){Ke(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Ke(t)};Ke(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Ke(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const s=r.map(o=>{const{type:a,...c}=o;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:s}),this.pendingCanvasMutations.delete(t)}}const zo={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Wu="ReplayCanvas",zn=1280,NS=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,zn):zn,n?Math.min(n,zn):zn]};let s;const i=new Promise(o=>s=o);return{name:Wu,setupOnce(){},getOptions(){const{quality:o,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const l=new OS({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return s(l),l},...zo[o]||zo.medium}},async snapshot(o){(await i).snapshot(o)}}},DS=NS,uv=Z(Wu,DS),ht=U,Zr="#ffffff",jo="inherit",Qr="rgba(108, 95, 199, 1)",qo={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:Zr,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:Qr,submitBorder:Qr,submitOutlineFocus:"#29232f",submitForeground:Zr,submitForegroundHover:Zr,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:jo,inputForeground:jo,inputBorder:"var(--border)",inputOutlineFocus:Qr,formBorderRadius:"20px",formContentBorderRadius:"6px"},Go={light:qo,dark:{...qo,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"}},LS="Report a Bug",PS="Cancel",FS="Send Bug Report",$S="Report a Bug",BS="your.email@example.org",HS="Email",US="What's the bug? What did you expect?",WS="Description",zS="Your Name",jS="Name",qS="(required)",GS="Thank you for your report!",zu="widget",ju="api";async function YS({client:e,scope:t,event:n}){const r={};e.emit&&e.emit("preprocessEvent",n,r);const s=await Ps(e.getOptions(),n,r,t,e,Gt());return s===null?(e.recordDroppedEvent("event_processor","feedback",n),null):(s.platform=s.platform||"javascript",s)}async function VS({feedback:{message:e,email:t,name:n,source:r,url:s}},{includeReplay:i=!0}={}){const o=A(),a=o&&o.getTransport(),c=o&&o.getDsn();if(!o||!a||!c)return;const u={contexts:{feedback:{contact_email:t,name:n,message:e,url:s,source:r}},type:"feedback"};return lt(async l=>{l.clearBreadcrumbs(),[ju,zu].includes(String(r))&&l.setLevel("info");const d=await YS({scope:l,client:o,event:u});if(!d)return;o.emit&&o.emit("beforeSendFeedback",d,{includeReplay:!!i});const f=ja(d,c,o.getOptions()._metadata,o.getOptions().tunnel);let p;try{p=await a.send(f)}catch(m){const _=new Error("Unable to send Feedback");try{_.cause=m}catch{}throw _}if(p){if(typeof p.statusCode=="number"&&(p.statusCode<200||p.statusCode>=300))throw new Error("Unable to send Feedback");return p}})}function KS({name:e,email:t,message:n,source:r=ju,url:s=_a()},i={}){if(!n)throw new Error("Unable to submit feedback with empty message");return VS({feedback:{name:e,email:t,message:n,url:s,source:r}},i)}const Xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yo(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function XS(e){const t=e.createElement("style");return t.textContent=`
|
|
33
33
|
.widget__actor {
|
|
34
34
|
position: fixed;
|
|
35
35
|
left: var(--left);
|
|
@@ -353,9 +353,9 @@ ${t==="system"?`
|
|
|
353
353
|
fill: '#fff';
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
`),s.append(i),n.append(s),{get el(){return n}}}function cb({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:s,isEmailRequired:i,colorScheme:o,defaultName:a,defaultEmail:c,onClosed:u,onCancel:l,onSubmit:d,...f}){let p=null;function m(){_(),u&&u()}function _(){p&&(p.open=!1)}function S(){p&&(p.open=!0)}function g(){return p&&p.open===!0||!1}const{el:y,showError:b,hideError:T}=ib({showEmail:r,showName:n,isEmailRequired:i,isNameRequired:s,defaultName:a,defaultEmail:c,onSubmit:d,onCancel:l,...f});return p=V("dialog",{className:"dialog",open:!0,onClick:m},V("div",{className:"dialog__content",onClick:v=>{v.stopPropagation()}},V("h2",{className:"dialog__header"},e,t&&V("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},ab({colorScheme:o}).el)),y)),{get el(){return p},showError:b,hideError:T,open:S,close:_,checkIsOpen:g}}const jn=16,Ko=17,ub="http://www.w3.org/2000/svg";function lb(){const e=c=>ht.document.createElementNS(ub,c),t=pe(e("svg"),{class:"success-icon",width:`${jn}`,height:`${Ko}`,viewBox:`0 0 ${jn} ${Ko}`,fill:"none"}),n=pe(e("g"),{clipPath:"url(#clip0_57_156)"}),r=pe(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),s=pe(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(s,r);const i=e("defs"),o=pe(e("clipPath"),{id:"clip0_57_156"}),a=pe(e("rect"),{width:`${jn}`,height:`${jn}`,fill:"white",transform:"translate(0 0.5)"});return o.appendChild(a),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(a),{get el(){return t}}}function db({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}const r=V("div",{className:"success-message",onClick:n},lb().el,e);return{el:r,remove:n}}function Xo({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let s,i,o=!1;function a(){if(e)try{const g=db({message:n.successMessageText,onRemove:()=>{y&&clearTimeout(y),l()}});if(!g.el)throw new Error("Unable to show success message");e.appendChild(g.el);const y=setTimeout(()=>{g&&g.remove()},5e3)}catch(g){h.error(g)}}async function c(g){if(!i)return;const y=[];if(n.isNameRequired&&!g.name&&y.push(n.nameLabel),n.isEmailRequired&&!g.email&&y.push(n.emailLabel),g.message||y.push(n.messageLabel),y.length>0){i.showError(`Please enter in the following required fields: ${y.join(", ")}`);return}if(!await eb(i,g)){n.onSubmitError&&n.onSubmitError();return}_(),a(),n.onSubmitSuccess&&n.onSubmitSuccess()}function u(){const g=A(),y=g&&g.getIntegrationByName&&g.getIntegrationByName("Replay");y&&y.flush().catch(b=>{Xe&&h.error(b)})}function l(){s&&s.show()}function d(){s&&s.hide()}function f(){s&&s.el&&s.el.remove()}function p(){try{if(i){i.open(),o=!0,n.onFormOpen&&n.onFormOpen(),u();return}const g=n.useSentryUser,y=ae(),b=y&&y.getUser();if(i=cb({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:g&&b&&b[g.name]||"",defaultEmail:g&&b&&b[g.email]||"",onClosed:()=>{l(),o=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{m(),l()},onSubmit:c}),!i.el)throw new Error("Unable to open Feedback dialog");e.appendChild(i.el),d(),n.onFormOpen&&n.onFormOpen(),u()}catch(g){h.error(g)}}function m(){i&&(i.close(),o=!1,n.onFormClose&&n.onFormClose())}function _(){if(i){m();const g=i.el;g&&g.remove(),i=void 0}}function S(){o||p(),d()}return r?r.addEventListener("click",S):t&&(s=rb({buttonLabel:n.buttonLabel,onClick:S}),s.el&&e.appendChild(s.el)),{get actor(){return s},get dialog(){return i},showActor:l,hideActor:d,removeActor:f,openDialog:p,closeDialog:m,removeDialog:_}}const qn=ht.document,cv=e=>new Pr(e);class Pr{static __initStatic(){this.id="Feedback"}constructor({autoInject:t=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:s=!1,showBranding:i=!0,showEmail:o=!0,showName:a=!0,useSentryUser:c={email:"email",name:"username"},themeDark:u,themeLight:l,colorScheme:d="system",buttonLabel:f=LS,cancelButtonLabel:p=PS,submitButtonLabel:m=FS,formTitle:_=$S,emailPlaceholder:S=BS,emailLabel:g=HS,messagePlaceholder:y=US,messageLabel:b=WS,namePlaceholder:T=zS,nameLabel:v=jS,isRequiredLabel:I=qS,successMessageText:x=GS,onFormClose:M,onFormOpen:w,onSubmitError:C,onSubmitSuccess:D}={}){this.name=Pr.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:i,id:n,isEmailRequired:r,isNameRequired:s,showEmail:o,showName:a,useSentryUser:c,colorScheme:d,themeDark:{...Go.dark,...u},themeLight:{...Go.light,...l},buttonLabel:f,cancelButtonLabel:p,submitButtonLabel:m,formTitle:_,emailLabel:g,emailPlaceholder:S,messageLabel:b,messagePlaceholder:y,nameLabel:v,namePlaceholder:T,isRequiredLabel:I,successMessageText:x,onFormClose:M,onFormOpen:w,onSubmitError:C,onSubmitSuccess:D}}setupOnce(){if(ds())try{this._cleanupWidgetIfExists();const{autoInject:t}=this.options;if(!t)return;this._createWidget(this.options)}catch(t){Xe&&h.error(t)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(t,n){try{const r=Yo(this.options,n||{});return this._ensureShadowHost(r,({shadow:s})=>{const i=typeof t=="string"?qn.querySelector(t):typeof t.addEventListener=="function"?t:null;if(!i)return Xe&&h.error("[Feedback] Unable to attach to target element"),null;const o=Xo({shadow:s,options:r,attachTo:i});return this._widgets.add(o),this._widget||(this._widget=o),o})}catch(r){return Xe&&h.error(r),null}}createWidget(t){try{return this._createWidget(Yo(this.options,t||{}))}catch(n){return Xe&&h.error(n),null}}removeWidget(t){if(!t)return!1;try{if(this._widgets.has(t))return t.removeActor(),t.removeDialog(),this._widgets.delete(t),this._widget===t&&(this._widget=null),!0}catch(n){Xe&&h.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const t=qn.querySelector(`#${this.options.id}`);t&&t.remove()}_createWidget(t){return this._ensureShadowHost(t,({shadow:n})=>{const r=Xo({shadow:n,options:t});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(XS(qn)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(t,n){let r=!1;if(!this._shadow||!this._host){const{id:i,colorScheme:o,themeLight:a,themeDark:c}=t,{shadow:u,host:l}=QS({id:i,colorScheme:o,themeLight:a,themeDark:c});this._shadow=u,this._host=l,r=!0}this._host.dataset.sentryFeedbackColorscheme=t.colorScheme;const s=n({shadow:this._shadow,host:this._host});return r&&qn.body.appendChild(this._host),s}}Pr.__initStatic();const Gu="CaptureConsole",fb=(e={})=>{const t=e.levels||aa;return{name:Gu,setupOnce(){},setup(n){"console"in U&&va(({args:r,level:s})=>{A()!==n||!t.includes(s)||hb(r,s)})}}},pb=fb;Z(Gu,pb);function hb(e,t){const n={level:Ca(t),extra:{arguments:e}};lt(r=>{if(r.addEventProcessor(o=>(o.logger="console",Ft(o,{handled:!1,type:"console"}),o)),t==="assert"&&e[0]===!1){const o=`Assertion failed: ${Qn(e.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",e.slice(1)),is(o,n);return}const s=e.find(o=>o instanceof Error);if(t==="error"&&s){Sn(s,n);return}const i=Qn(e," ");is(i,n)})}const Yu="Debug",mb=(e={})=>{const t={debugger:!1,stringify:!1,...e};return{name:Yu,setupOnce(){},setup(n){n.on&&n.on("beforeSendEvent",(r,s)=>{if(t.debugger)debugger;Dt(()=>{t.stringify?(console.log(JSON.stringify(r,null,2)),s&&Object.keys(s).length&&console.log(JSON.stringify(s,null,2))):(console.log(r),s&&Object.keys(s).length&&console.log(s))})})}}},gb=mb;Z(Yu,gb);const jt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Vu="Dedupe",_b=()=>{let e;return{name:Vu,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Sb(t,e))return jt&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},yb=_b;Z(Vu,yb);function Sb(e,t){return t?!!(bb(e,t)||Eb(e,t)):!1}function bb(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Xu(e,t)||!Ku(e,t))}function Eb(e,t){const n=Jo(t),r=Jo(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Xu(e,t)||!Ku(e,t))}function Ku(e,t){let n=Zo(e),r=Zo(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Xu(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Jo(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Zo(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const Ju="ExtraErrorData",vb=(e={})=>{const t=e.depth||3,n=e.captureErrorCause||!1;return{name:Ju,setupOnce(){},processEvent(r,s){return Ib(r,s,t,n)}}},Tb=vb;Z(Ju,Tb);function Ib(e,t={},n,r){if(!t.originalException||!Mt(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=wb(t.originalException,r);if(i){const o={...e.contexts},a=gr(i,n);return Zn(a)&&(it(a,"__sentry_skip_normalization__",!0),o[s]=a),{...e,contexts:o}}return e}function wb(e,t){try{const n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(const s of Object.keys(e)){if(n.indexOf(s)!==-1)continue;const i=e[s];r[s]=Mt(i)?i.toString():i}if(t&&e.cause!==void 0&&(r.cause=Mt(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const o=s[i];r[i]=Mt(o)?o.toString():o}}return r}catch(n){jt&&h.error("Unable to extract extra data from the Error object:",n)}return null}const kb=U,Zu="ReportingObserver",Qo=new WeakMap,Rb=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Qo.has(A()))for(const s of r)lt(i=>{i.setExtra("url",s.url);const o=`ReportingObserver [${s.type}]`;let a="No details available";if(s.body){const c={};for(const u in s.body)c[u]=s.body[u];if(i.setExtra("body",c),s.type==="crash"){const u=s.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=s.body.message||a}is(`${o}: ${a}`)})}return{name:Zu,setupOnce(){if(!id())return;new kb.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Qo.set(r,!0)}}},Cb=Rb;Z(Zu,Cb);const Qu="RewriteFrames",xb=(e={})=>{const t=e.root,n=e.prefix||"app:///",r=e.iteratee||(o=>{if(!o.filename)return o;const a=/^[a-zA-Z]:\\/.test(o.filename)||o.filename.includes("\\")&&!o.filename.includes("/"),c=/^\//.test(o.filename);if(a||c){const u=a?o.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):o.filename,l=t?vd(t,u):Td(u);o.filename=`${n}${l}`}return o});function s(o){try{return{...o,exception:{...o.exception,values:o.exception.values.map(a=>({...a,...a.stacktrace&&{stacktrace:i(a.stacktrace)}}))}}}catch{return o}}function i(o){return{...o,frames:o&&o.frames&&o.frames.map(a=>r(a))}}return{name:Qu,setupOnce(){},processEvent(o){let a=o;return o.exception&&Array.isArray(o.exception.values)&&(a=s(a)),a}}},Ab=xb;Z(Qu,Ab);const el="SessionTiming",Mb=()=>{const e=Date.now();return{name:el,setupOnce(){},processEvent(t){const n=Date.now();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}},Ob=Mb;Z(el,Ob);const tl="HttpClient",Nb=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:tl,setupOnce(){},setup(n){Wb(n,t),zb(n,t)}}},Db=Nb;Z(tl,Db);function Lb(e,t,n,r){if(rl(e,n.status,n.url)){const s=jb(t,r);let i,o,a,c;il()&&([{headers:i,cookies:a},{headers:o,cookies:c}]=[{cookieHeader:"Cookie",obj:s},{cookieHeader:"Set-Cookie",obj:n}].map(({cookieHeader:l,obj:d})=>{const f=$b(d.headers);let p;try{const m=f[l]||f[l.toLowerCase()]||void 0;m&&(p=nl(m))}catch{jt&&h.log(`Could not extract cookies from header ${l}`)}return{headers:f,cookies:p}}));const u=sl({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:o,requestCookies:a,responseCookies:c});Sr(u)}}function Pb(e,t,n,r){if(rl(e,t.status,t.responseURL)){let s,i,o;if(il()){try{const c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(i=nl(c))}catch{jt&&h.log("Could not extract cookies from response headers")}try{o=Bb(t)}catch{jt&&h.log("Could not extract headers from response")}s=r}const a=sl({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:o,responseCookies:i});Sr(a)}}function Fb(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function nl(e){return e.split("; ").reduce((t,n)=>{const[r,s]=n.split("=");return t[r]=s,t},{})}function $b(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function Bb(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
356
|
+
`),s.append(i),n.append(s),{get el(){return n}}}function cb({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:s,isEmailRequired:i,colorScheme:o,defaultName:a,defaultEmail:c,onClosed:u,onCancel:l,onSubmit:d,...f}){let p=null;function m(){_(),u&&u()}function _(){p&&(p.open=!1)}function S(){p&&(p.open=!0)}function g(){return p&&p.open===!0||!1}const{el:y,showError:b,hideError:T}=ib({showEmail:r,showName:n,isEmailRequired:i,isNameRequired:s,defaultName:a,defaultEmail:c,onSubmit:d,onCancel:l,...f});return p=V("dialog",{className:"dialog",open:!0,onClick:m},V("div",{className:"dialog__content",onClick:v=>{v.stopPropagation()}},V("h2",{className:"dialog__header"},e,t&&V("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},ab({colorScheme:o}).el)),y)),{get el(){return p},showError:b,hideError:T,open:S,close:_,checkIsOpen:g}}const jn=16,Ko=17,ub="http://www.w3.org/2000/svg";function lb(){const e=c=>ht.document.createElementNS(ub,c),t=pe(e("svg"),{class:"success-icon",width:`${jn}`,height:`${Ko}`,viewBox:`0 0 ${jn} ${Ko}`,fill:"none"}),n=pe(e("g"),{clipPath:"url(#clip0_57_156)"}),r=pe(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),s=pe(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(s,r);const i=e("defs"),o=pe(e("clipPath"),{id:"clip0_57_156"}),a=pe(e("rect"),{width:`${jn}`,height:`${jn}`,fill:"white",transform:"translate(0 0.5)"});return o.appendChild(a),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(a),{get el(){return t}}}function db({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}const r=V("div",{className:"success-message",onClick:n},lb().el,e);return{el:r,remove:n}}function Xo({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let s,i,o=!1;function a(){if(e)try{const g=db({message:n.successMessageText,onRemove:()=>{y&&clearTimeout(y),l()}});if(!g.el)throw new Error("Unable to show success message");e.appendChild(g.el);const y=setTimeout(()=>{g&&g.remove()},5e3)}catch(g){h.error(g)}}async function c(g){if(!i)return;const y=[];if(n.isNameRequired&&!g.name&&y.push(n.nameLabel),n.isEmailRequired&&!g.email&&y.push(n.emailLabel),g.message||y.push(n.messageLabel),y.length>0){i.showError(`Please enter in the following required fields: ${y.join(", ")}`);return}if(!await eb(i,g)){n.onSubmitError&&n.onSubmitError();return}_(),a(),n.onSubmitSuccess&&n.onSubmitSuccess()}function u(){const g=A(),y=g&&g.getIntegrationByName&&g.getIntegrationByName("Replay");y&&y.flush().catch(b=>{Xe&&h.error(b)})}function l(){s&&s.show()}function d(){s&&s.hide()}function f(){s&&s.el&&s.el.remove()}function p(){try{if(i){i.open(),o=!0,n.onFormOpen&&n.onFormOpen(),u();return}const g=n.useSentryUser,y=ae(),b=y&&y.getUser();if(i=cb({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:g&&b&&b[g.name]||"",defaultEmail:g&&b&&b[g.email]||"",onClosed:()=>{l(),o=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{m(),l()},onSubmit:c}),!i.el)throw new Error("Unable to open Feedback dialog");e.appendChild(i.el),d(),n.onFormOpen&&n.onFormOpen(),u()}catch(g){h.error(g)}}function m(){i&&(i.close(),o=!1,n.onFormClose&&n.onFormClose())}function _(){if(i){m();const g=i.el;g&&g.remove(),i=void 0}}function S(){o||p(),d()}return r?r.addEventListener("click",S):t&&(s=rb({buttonLabel:n.buttonLabel,onClick:S}),s.el&&e.appendChild(s.el)),{get actor(){return s},get dialog(){return i},showActor:l,hideActor:d,removeActor:f,openDialog:p,closeDialog:m,removeDialog:_}}const qn=ht.document,lv=e=>new Pr(e);class Pr{static __initStatic(){this.id="Feedback"}constructor({autoInject:t=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:s=!1,showBranding:i=!0,showEmail:o=!0,showName:a=!0,useSentryUser:c={email:"email",name:"username"},themeDark:u,themeLight:l,colorScheme:d="system",buttonLabel:f=LS,cancelButtonLabel:p=PS,submitButtonLabel:m=FS,formTitle:_=$S,emailPlaceholder:S=BS,emailLabel:g=HS,messagePlaceholder:y=US,messageLabel:b=WS,namePlaceholder:T=zS,nameLabel:v=jS,isRequiredLabel:I=qS,successMessageText:x=GS,onFormClose:M,onFormOpen:w,onSubmitError:C,onSubmitSuccess:D}={}){this.name=Pr.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:i,id:n,isEmailRequired:r,isNameRequired:s,showEmail:o,showName:a,useSentryUser:c,colorScheme:d,themeDark:{...Go.dark,...u},themeLight:{...Go.light,...l},buttonLabel:f,cancelButtonLabel:p,submitButtonLabel:m,formTitle:_,emailLabel:g,emailPlaceholder:S,messageLabel:b,messagePlaceholder:y,nameLabel:v,namePlaceholder:T,isRequiredLabel:I,successMessageText:x,onFormClose:M,onFormOpen:w,onSubmitError:C,onSubmitSuccess:D}}setupOnce(){if(ds())try{this._cleanupWidgetIfExists();const{autoInject:t}=this.options;if(!t)return;this._createWidget(this.options)}catch(t){Xe&&h.error(t)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(t,n){try{const r=Yo(this.options,n||{});return this._ensureShadowHost(r,({shadow:s})=>{const i=typeof t=="string"?qn.querySelector(t):typeof t.addEventListener=="function"?t:null;if(!i)return Xe&&h.error("[Feedback] Unable to attach to target element"),null;const o=Xo({shadow:s,options:r,attachTo:i});return this._widgets.add(o),this._widget||(this._widget=o),o})}catch(r){return Xe&&h.error(r),null}}createWidget(t){try{return this._createWidget(Yo(this.options,t||{}))}catch(n){return Xe&&h.error(n),null}}removeWidget(t){if(!t)return!1;try{if(this._widgets.has(t))return t.removeActor(),t.removeDialog(),this._widgets.delete(t),this._widget===t&&(this._widget=null),!0}catch(n){Xe&&h.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const t=qn.querySelector(`#${this.options.id}`);t&&t.remove()}_createWidget(t){return this._ensureShadowHost(t,({shadow:n})=>{const r=Xo({shadow:n,options:t});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(XS(qn)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(t,n){let r=!1;if(!this._shadow||!this._host){const{id:i,colorScheme:o,themeLight:a,themeDark:c}=t,{shadow:u,host:l}=QS({id:i,colorScheme:o,themeLight:a,themeDark:c});this._shadow=u,this._host=l,r=!0}this._host.dataset.sentryFeedbackColorscheme=t.colorScheme;const s=n({shadow:this._shadow,host:this._host});return r&&qn.body.appendChild(this._host),s}}Pr.__initStatic();const Gu="CaptureConsole",fb=(e={})=>{const t=e.levels||aa;return{name:Gu,setupOnce(){},setup(n){"console"in U&&va(({args:r,level:s})=>{A()!==n||!t.includes(s)||hb(r,s)})}}},pb=fb;Z(Gu,pb);function hb(e,t){const n={level:Ca(t),extra:{arguments:e}};lt(r=>{if(r.addEventProcessor(o=>(o.logger="console",Ft(o,{handled:!1,type:"console"}),o)),t==="assert"&&e[0]===!1){const o=`Assertion failed: ${Qn(e.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",e.slice(1)),is(o,n);return}const s=e.find(o=>o instanceof Error);if(t==="error"&&s){Sn(s,n);return}const i=Qn(e," ");is(i,n)})}const Yu="Debug",mb=(e={})=>{const t={debugger:!1,stringify:!1,...e};return{name:Yu,setupOnce(){},setup(n){n.on&&n.on("beforeSendEvent",(r,s)=>{if(t.debugger)debugger;Dt(()=>{t.stringify?(console.log(JSON.stringify(r,null,2)),s&&Object.keys(s).length&&console.log(JSON.stringify(s,null,2))):(console.log(r),s&&Object.keys(s).length&&console.log(s))})})}}},gb=mb;Z(Yu,gb);const jt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Vu="Dedupe",_b=()=>{let e;return{name:Vu,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Sb(t,e))return jt&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},yb=_b;Z(Vu,yb);function Sb(e,t){return t?!!(bb(e,t)||Eb(e,t)):!1}function bb(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Xu(e,t)||!Ku(e,t))}function Eb(e,t){const n=Jo(t),r=Jo(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Xu(e,t)||!Ku(e,t))}function Ku(e,t){let n=Zo(e),r=Zo(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Xu(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Jo(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Zo(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const Ju="ExtraErrorData",vb=(e={})=>{const t=e.depth||3,n=e.captureErrorCause||!1;return{name:Ju,setupOnce(){},processEvent(r,s){return Ib(r,s,t,n)}}},Tb=vb;Z(Ju,Tb);function Ib(e,t={},n,r){if(!t.originalException||!Mt(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=wb(t.originalException,r);if(i){const o={...e.contexts},a=gr(i,n);return Zn(a)&&(it(a,"__sentry_skip_normalization__",!0),o[s]=a),{...e,contexts:o}}return e}function wb(e,t){try{const n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(const s of Object.keys(e)){if(n.indexOf(s)!==-1)continue;const i=e[s];r[s]=Mt(i)?i.toString():i}if(t&&e.cause!==void 0&&(r.cause=Mt(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const o=s[i];r[i]=Mt(o)?o.toString():o}}return r}catch(n){jt&&h.error("Unable to extract extra data from the Error object:",n)}return null}const kb=U,Zu="ReportingObserver",Qo=new WeakMap,Rb=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Qo.has(A()))for(const s of r)lt(i=>{i.setExtra("url",s.url);const o=`ReportingObserver [${s.type}]`;let a="No details available";if(s.body){const c={};for(const u in s.body)c[u]=s.body[u];if(i.setExtra("body",c),s.type==="crash"){const u=s.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=s.body.message||a}is(`${o}: ${a}`)})}return{name:Zu,setupOnce(){if(!id())return;new kb.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Qo.set(r,!0)}}},Cb=Rb;Z(Zu,Cb);const Qu="RewriteFrames",xb=(e={})=>{const t=e.root,n=e.prefix||"app:///",r=e.iteratee||(o=>{if(!o.filename)return o;const a=/^[a-zA-Z]:\\/.test(o.filename)||o.filename.includes("\\")&&!o.filename.includes("/"),c=/^\//.test(o.filename);if(a||c){const u=a?o.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):o.filename,l=t?vd(t,u):Td(u);o.filename=`${n}${l}`}return o});function s(o){try{return{...o,exception:{...o.exception,values:o.exception.values.map(a=>({...a,...a.stacktrace&&{stacktrace:i(a.stacktrace)}}))}}}catch{return o}}function i(o){return{...o,frames:o&&o.frames&&o.frames.map(a=>r(a))}}return{name:Qu,setupOnce(){},processEvent(o){let a=o;return o.exception&&Array.isArray(o.exception.values)&&(a=s(a)),a}}},Ab=xb;Z(Qu,Ab);const el="SessionTiming",Mb=()=>{const e=Date.now();return{name:el,setupOnce(){},processEvent(t){const n=Date.now();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}},Ob=Mb;Z(el,Ob);const tl="HttpClient",Nb=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:tl,setupOnce(){},setup(n){Wb(n,t),zb(n,t)}}},Db=Nb;Z(tl,Db);function Lb(e,t,n,r){if(rl(e,n.status,n.url)){const s=jb(t,r);let i,o,a,c;il()&&([{headers:i,cookies:a},{headers:o,cookies:c}]=[{cookieHeader:"Cookie",obj:s},{cookieHeader:"Set-Cookie",obj:n}].map(({cookieHeader:l,obj:d})=>{const f=$b(d.headers);let p;try{const m=f[l]||f[l.toLowerCase()]||void 0;m&&(p=nl(m))}catch{jt&&h.log(`Could not extract cookies from header ${l}`)}return{headers:f,cookies:p}}));const u=sl({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:o,requestCookies:a,responseCookies:c});Sr(u)}}function Pb(e,t,n,r){if(rl(e,t.status,t.responseURL)){let s,i,o;if(il()){try{const c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(i=nl(c))}catch{jt&&h.log("Could not extract cookies from response headers")}try{o=Bb(t)}catch{jt&&h.log("Could not extract headers from response")}s=r}const a=sl({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:o,responseCookies:i});Sr(a)}}function Fb(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function nl(e){return e.split("; ").reduce((t,n)=>{const[r,s]=n.split("=");return t[r]=s,t},{})}function $b(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function Bb(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
357
357
|
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s]=i,n},{}):{}}function Hb(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function Ub(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function Wb(e,t){wa()&&Er(n=>{if(A()!==e)return;const{response:r,args:s}=n,[i,o]=s;r&&Lb(t,i,r,o)})}function zb(e,t){"XMLHttpRequest"in U&&vr(n=>{if(A()!==e)return;const r=n.xhr,s=r[Me];if(!s)return;const{method:i,request_headers:o}=s;try{Pb(t,r,i,o)}catch(a){jt&&h.warn("Error while extracting response event form XHR response",a)}})}function rl(e,t,n){return Ub(e.failedRequestStatusCodes,t)&&Hb(e.failedRequestTargets,n)&&!tc(n,A())}function sl(e){const t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:"Error",value:t}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:Fb(e.responseHeaders)}}};return Ft(n,{type:"http.client",handled:!1}),n}function jb(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function il(){const e=A();return e?!!e.getOptions().sendDefaultPii:!1}const ts=U,qb=7,ol="ContextLines",Gb=(e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:qb;return{name:ol,setupOnce(){},processEvent(n){return Vb(n,t)}}},Yb=Gb;Z(ol,Yb);function Vb(e,t){const n=ts.document,r=ts.location&&wd(ts.location.href);if(!n||!r)return e;const s=e.exception&&e.exception.values;if(!s||!s.length)return e;const i=n.documentElement.innerHTML;if(!i)return e;const o=["<!DOCTYPE html>","<html>",...i.split(`
|
|
358
|
-
`),"</html>"];return s.forEach(a=>{const c=a.stacktrace;c&&c.frames&&(c.frames=c.frames.map(u=>Kb(u,o,r,t)))}),e}function Kb(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Gl(t,e,r),e}function yn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Xb(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=yn(n);return s=>r.then(i=>s(i.transaction(t,"readwrite").objectStore(t)))}function al(e){return yn(e.getAllKeys())}function Jb(e,t,n){return e(r=>al(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.max(...s,0)+1),yn(r.transaction)}))}function Zb(e){return e(t=>al(t).then(n=>{if(n.length!==0)return yn(t.get(n[0])).then(r=>(t.delete(n[0]),yn(t.transaction).then(()=>r)))}))}function Qb(e){let t;function n(){return t==null&&(t=Xb(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async r=>{try{const s=await xa(r,e.textEncoder);await Jb(n(),s,e.maxQueueSize||30)}catch{}},pop:async()=>{try{const r=await Zb(n());if(r)return Ad(r,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function eE(e){return t=>e({...t,createStore:Qb})}function uv(e){return eE(Pf(e))}const ea=1e6,Xn=String(0),tE="main";let cl="",ul="",ll="",Cs=E.navigator&&E.navigator.userAgent||"",dl="";const nE=E.navigator&&E.navigator.language||E.navigator&&E.navigator.languages&&E.navigator.languages[0]||"";function rE(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const ta=E.navigator&&E.navigator.userAgentData;rE(ta)&&ta.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(cl=e.platform||"",ll=e.architecture||"",dl=e.model||"",ul=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){const t=e.fullVersionList[e.fullVersionList.length-1];Cs=`${t.brand} ${t.version}`}}).catch(e=>{});function sE(e){return!("thread_metadata"in e)}function iE(e){return sE(e)?cE(e):e}function oE(e){const t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&F&&h.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function aE(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=oE(r),i=iE(n),o=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),a=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(o).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Yl,runtime:{name:"javascript",version:E.navigator.userAgent},os:{name:cl,version:ul,build_number:Cs},device:{locale:nE,model:dl,manufacturer:Cs,architecture:ll,is_emulator:!1},debug_meta:{images:dE(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||Lt(),trace_id:s,active_thread_id:Xn,relative_start_ns:"0",relative_end_ns:((a-o)*1e6).toFixed(0)}]}}function fl(e){return e.op==="pageload"}function cE(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Xn]:{name:tE}}};if(!e.samples.length)return r;const s=e.samples[0].timestamp,i=typeof performance.timeOrigin=="number"?performance.timeOrigin:oe||0,o=i-(oe||i);for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((c.timestamp+o-s)*ea).toFixed(0),stack_id:t,thread_id:Xn};continue}let u=e.stacks[c.stackId];const l=[];for(;u;){l.push(u.frameId);const f=e.frames[u.frameId];r.frames[u.frameId]===void 0&&(r.frames[u.frameId]={function:f.name,abs_path:typeof f.resourceId=="number"?e.resources[f.resourceId]:void 0,lineno:f.line,colno:f.column}),u=u.parentId===void 0?void 0:e.stacks[u.parentId]}const d={elapsed_since_start_ns:((c.timestamp+o-s)*ea).toFixed(0),stack_id:n,thread_id:Xn};r.stacks[n]=l,r.samples[a]=d,n++}return r}function uE(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function lE(e){const t=[];return $t(e,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++){const i=n[s];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&t.push(n[s])}}),t}const na=new WeakMap;function dE(e){const t=U._sentryDebugIds;if(!t)return[];const n=A(),r=n&&n.getOptions(),s=r&&r.stackParser;if(!s)return[];let i;const o=na.get(s);o?i=o:(i=new Map,na.set(s,i));const a=Object.keys(t).reduce((u,l)=>{let d;const f=i.get(l);f?d=f:(d=s(l),i.set(l,d));for(let p=d.length-1;p>=0;p--){const m=d[p],_=m&&m.filename;if(m&&_){u[_]=t[l];break}}return u},{}),c=[];for(const u of e)u&&a[u]&&c.push({type:"sourcemap",code_file:u,debug_id:a[u]});return c}function fE(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function pE(e){return e.samples.length<2?(F&&h.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(F&&h.log("[Profiling] Discarding profile because it contains no frames"),!1)}let pl=!1;const hl=3e4;function hE(e){return typeof e=="function"}function mE(){const e=E.Profiler;if(!hE(e)){F&&h.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(hl/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{F&&(h.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),h.log("[Profiling] Disabling profiling for current user session.")),pl=!0}}function xs(e){if(pl)return F&&h.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return F&&h.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=A(),n=t&&t.getOptions();if(!n)return F&&h.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return fE(r)?r?(r===!0?!0:Math.random()<r)?!0:(F&&h.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(F&&h.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(F&&h.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function gE(e,t,n,r){return pE(n)?aE(e,t,n,r):null}const Qe=new Map;function _E(){return Qe.size}function yE(e){const t=Qe.get(e);return t&&Qe.delete(e),t}function SE(e,t){if(Qe.set(e,t),Qe.size>30){const n=Qe.keys().next().value;Qe.delete(n)}}function lv(e){return e?xs(e)?As(e):e:(F&&h.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function As(e){let t;fl(e)&&(t=ot()*1e3);const n=mE();if(!n)return e;F&&h.log(`[Profiling] started profiling transaction: ${j(e).description}`);const r=Lt();async function s(){return!e||!n?null:n.stop().then(c=>(i&&(E.clearTimeout(i),i=void 0),F&&h.log(`[Profiling] stopped profiling of transaction: ${j(e).description}`),c?(SE(r,c),null):(F&&h.log(`[Profiling] profiler returned null profile for: ${j(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(c=>(F&&h.log("[Profiling] error while stopping profiler:",c),null))}let i=E.setTimeout(()=>{F&&h.log("[Profiling] max profile duration elapsed, stopping profiling for:",j(e).description),s()},hl);const o=e.end.bind(e);function a(){return e?(s().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),o()},()=>{o()}),e):o()}return e.end=a,e}const ml="BrowserProfiling",bE=()=>({name:ml,setupOnce(){},setup(e){const n=ae().getTransaction();if(n&&fl(n)&&xs(n)&&As(n),typeof e.on!="function"){h.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}e.on("startTransaction",r=>{xs(r)&&As(r)}),e.on("beforeEnvelope",r=>{if(!_E())return;const s=lE(r);if(!s.length)return;const i=[];for(const o of s){const a=o&&o.contexts,c=a&&a.profile&&a.profile.profile_id,u=a&&a.profile&&a.profile.start_timestamp;if(typeof c!="string"){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!c){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}a&&a.profile&&delete a.profile;const l=yE(c);if(!l){F&&h.log(`[Profiling] Could not retrieve profile for transaction: ${c}`);continue}const d=gE(c,u,l,o);d&&i.push(d)}uE(r,i)})}}),EE=bE,dv=Z(ml,EE);let gl={};E.Sentry&&E.Sentry.Integrations&&(gl=E.Sentry.Integrations);const fv={...gl,...Ip,...Jm};function pv(e){const t={...e};nc(t,"react"),Km(t)}const _l="ui.react.render",vE="ui.react.update",yl="ui.react.mount",ra="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx",TE="unknown";class Sl extends me.Component{static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=tt({name:`<${n}>`,onlyIfParent:!0,op:yl,origin:"auto.ui.react.profiler",attributes:{"ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(s=>t[s]!==this.props.updateProps[s]);if(r.length>0){const s=ot();this._updateSpan=Ri(this._mountSpan,()=>tt({name:`<${this.props.name}>`,onlyIfParent:!0,op:vE,origin:"auto.ui.react.profiler",startTimestamp:s,attributes:{"ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=ot(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const s=j(this._mountSpan).timestamp;Ri(this._mountSpan,()=>{const i=tt({onlyIfParent:!0,name:`<${n}>`,op:_l,origin:"auto.ui.react.profiler",startTimestamp:s,attributes:{"ui.component_name":n}});i&&i.end(t)})}}render(){return this.props.children}}Sl.__initStatic();function hv(e,t){const n=t&&t.name||e.displayName||e.name||TE,r=s=>me.createElement(Sl,{...t,name:n,updateProps:s,__self:this,__source:{fileName:ra,lineNumber:159}},me.createElement(e,{...s,__self:this,__source:{fileName:ra,lineNumber:160}}));return r.displayName=`profiler(${n})`,br(r,e),r}function mv(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=me.useState(()=>{if(!(t&&t.disabled))return tt({name:`<${e}>`,onlyIfParent:!0,op:yl,origin:"auto.ui.react.profiler",attributes:{"ui.component_name":e}})});me.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=j(n).timestamp,s=ot(),i=tt({name:`<${e}>`,onlyIfParent:!0,op:_l,origin:"auto.ui.react.profiler",startTimestamp:r,attributes:{"ui.component_name":e}});i&&i.end(s)}}),[])}const fi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,sa="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/errorboundary.tsx";function IE(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const wE="unknown",ia={componentStack:null,error:null,eventId:null};function kE(e,t){const n=new WeakMap;function r(s,i){if(!n.has(s)){if(s.cause)return n.set(s,!0),r(s.cause,i);s.cause=i}}r(e,t)}class pi extends me.Component{constructor(t){super(t),pi.prototype.__init.call(this),this.state=ia,this._openFallbackReportDialog=!0;const n=A();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",r=>{!r.type&&r.event_id===this._lastEventId&&lo({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:r,onError:s,showDialog:i,dialogOptions:o}=this.props;lt(a=>{if(IE(me.version)&&Mt(t)){const u=new Error(t.message);u.name=`React ErrorBoundary ${t.name}`,u.stack=n,kE(t,u)}r&&r(a,t,n);const c=Sn(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});s&&s(t,n,c),i&&(this._lastEventId=c,this._openFallbackReportDialog&&lo({...o,eventId:c})),this.setState({error:t,componentStack:n,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:s}=this.props;s&&s(t,n,r)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:s}=this.state;t&&t(n,r,s),this.setState(ia)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let s;return typeof t=="function"?s=t({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):s=t,me.isValidElement(s)?s:(t&&fi&&h.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}function gv(e,t){const n=e.displayName||e.name||wE,r=s=>me.createElement(pi,{...t,__self:this,__source:{fileName:sa,lineNumber:240}},me.createElement(e,{...s,__self:this,__source:{fileName:sa,lineNumber:241}}));return r.displayName=`errorBoundary(${n})`,br(r,e),r}const RE="redux.action",CE="info",xE={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function _v(e){const t={...xE,...e};return n=>(r,s)=>(t.attachReduxState&&Vl().addEventProcessor((o,a)=>{try{o.type===void 0&&o.contexts.state.state.type==="redux"&&(a.attachments=[...a.attachments||[],{filename:"redux_state.json",data:JSON.stringify(o.contexts.state.state.value)}])}catch{}return o}),n((o,a)=>{const c=r(o,a),u=ae(),l=t.actionTransformer(a);typeof l<"u"&&l!==null&&u.addBreadcrumb({category:RE,data:l,type:CE});const d=t.stateTransformer(c);if(typeof d<"u"&&d!==null){const p=A(),m=p&&p.getOptions(),_=m&&m.normalizeDepth||3,S={state:{type:"redux",value:d}};it(S,"__sentry_override_normalization_depth__",3+_),u.setContext("state",S)}else u.setContext("state",null);const{configureScopeWithState:f}=t;return typeof f=="function"&&f(u,c),c},s))}function yv(e){const t=Cr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:s,instrumentPageLoad:i=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a);const c=d=>{wn(a,d)},u=d=>{kn(a,d)},l=AE(n,r,s);l(c,i,!1),l(u,!1,o)}}}function AE(e,t,n){return(r,s=!0,i=!0)=>{let o,a;s&&E&&E.location&&oa(t,E.location,n,(c,u="url")=>{a=c,o=r({name:a,attributes:{[Ee]:"pageload",[he]:"auto.pageload.react.reactrouter_v3",[ee]:u}})}),i&&e.listen&&e.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&(o&&o.end(),oa(t,c,n,(u,l="url")=>{a=u;const d={[Ee]:"navigation",[he]:"auto.navigation.react.reactrouter_v3",[ee]:l};o=r({name:a,attributes:d})}))})}}function oa(e,t,n,r){let s=t.pathname;n({location:t,routes:e},(i,o,a)=>{if(i||!a)return r(s);const c=ME(a.routes||[]);return c.length===0||c==="/*"?r(s):(s=c,r(s,"route"))})}function ME(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--){const s=t[r];if(s.path&&s.path.startsWith("/")){n=r;break}}return t.slice(n).filter(({path:r})=>!!r).map(({path:r})=>r).join("")}const OE="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouter.tsx";let xt;function Sv(e){const t=Cr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:s,instrumentPageLoad:i=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a);const c=d=>{wn(a,d)},u=d=>{kn(a,d)},l=NE(n,r,s);l(c,i,!1),l(u,!1,o)}}}function bv(e){const t=Cr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:s}=e;return{...t,afterAllSetup(i){t.afterAllSetup(i);const o=u=>{wn(i,u)},a=u=>{kn(i,u)},c=DE(n,r,s);c(o,e.instrumentPageLoad,!1),c(a,!1,e.instrumentNavigation)}}}function NE(e,t,n){return bl(e,"reactrouter_v4",t,n)}function DE(e,t,n){return bl(e,"reactrouter_v5",t,n)}function bl(e,t,n=[],r){function s(){if(e&&e.location)return e.location.pathname;if(E&&E.location)return E.location.pathname}function i(o){if(n.length===0||!r)return[o,"url"];const a=El(n,o,r);for(let c=0;c<a.length;c++)if(a[c].match.isExact)return[a[c].match.path,"route"];return[o,"url"]}return(o,a=!0,c=!0)=>{const u=s();if(a&&u){const[l,d]=i(u);xt=o({name:l,attributes:{[Ee]:"pageload",[he]:`auto.pageload.react.${t}`,[ee]:d}})}c&&e.listen&&e.listen((l,d)=>{if(d&&(d==="PUSH"||d==="POP")){xt&&xt.end();const[f,p]=i(l.pathname);xt=o({name:f,attributes:{[Ee]:"navigation",[he]:`auto.navigation.react.${t}`,[ee]:p}})}})}}function El(e,t,n,r=[]){return e.some(s=>{const i=s.path?n(t,s):r.length?r[r.length-1].match:LE(t);return i&&(r.push({route:s,match:i}),s.routes&&El(s.routes,t,n,r)),!!i}),r}function LE(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function Ev(e){const t=e.displayName||e.name,n=r=>{if(r&&r.computedMatch&&r.computedMatch.isExact){const s=r.computedMatch.path,i=PE();i&&(i.updateName(s),i.setAttribute(ee,"route"))}return me.createElement(e,{...r,__self:this,__source:{fileName:OE,lineNumber:279}})};return n.displayName=`sentryRoute(${t})`,br(n,e),n}function PE(){if(xt)return xt;const e=Kt(),t=e?Jn(e):void 0;if(!t)return;const n=j(t).op;return n==="navigation"||n==="pageload"?t:void 0}const vl="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx";let Nt,nt,rt,st,dn,ut,qt,Fr,Je=!1;function vv(e){const t=Cr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:o,stripBasename:a,instrumentPageLoad:c=!0,instrumentNavigation:u=!0}=e;return{...t,afterAllSetup(l){t.afterAllSetup(l);const d=p=>{kn(l,p)},f=E&&E.location&&E.location.pathname;c&&f&&wn(l,{name:f,attributes:{[ee]:"url",[Ee]:"pageload",[he]:"auto.pageload.react.reactrouter_v6"}}),nt=n,rt=r,st=s,ut=o,dn=i,Je=a||!1,qt=d,Fr=u}}}function Tv(e,t,n,r,s,i){return(o,a=!0,c=!0)=>{const u=E&&E.location&&E.location.pathname;a&&u&&(Nt=o({name:u,attributes:{[ee]:"url",[Ee]:"pageload",[he]:"auto.pageload.react.reactrouter_v6"}})),nt=e,rt=t,st=n,ut=s,dn=r,Je=i||!1,qt=o,Fr=c}}function ns(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}function Tl(e,t,n,r=""){if(!e||e.length===0)return[Je?ns(t.pathname,r):t.pathname,"url"];let s="";if(n)for(let i=0;i<n.length;i++){const o=n[i],a=o.route;if(a){if(a.index)return[Je?ns(o.pathname,r):o.pathname,"route"];const c=a.path;if(c){const u=c[0]==="/"||s[s.length-1]==="/"?c:`/${c}`;if(s+=u,r+o.pathname===t.pathname)return Fi(s)!==Fi(o.pathname)&&s.slice(-2)!=="/*"?[(Je?"":r)+u,"route"]:[(Je?"":r)+s,"route"]}}}return[Je?ns(t.pathname,r):t.pathname,"url"]}function hi(e,t,n,r,s){const i=Array.isArray(r)?r:ut(n,t,s);if(e&&i){const[o,a]=Tl(n,t,i,s);e.updateName(o),e.setAttribute(ee,a)}}function mi(e,t,n,r,s){const i=Array.isArray(r)?r:ut(t,e,s);if(Fr&&(n==="PUSH"||n==="POP")&&i){Nt&&Nt.end();const[o,a]=Tl(t,e,i,s);Nt=qt({name:o,attributes:{[ee]:a,[Ee]:"navigation",[he]:"auto.navigation.react.reactrouter_v6"}})}}function Iv(e){if(!nt||!rt||!st||!dn||!ut||!qt)return fi&&h.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
358
|
+
`),"</html>"];return s.forEach(a=>{const c=a.stacktrace;c&&c.frames&&(c.frames=c.frames.map(u=>Kb(u,o,r,t)))}),e}function Kb(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Gl(t,e,r),e}function yn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Xb(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=yn(n);return s=>r.then(i=>s(i.transaction(t,"readwrite").objectStore(t)))}function al(e){return yn(e.getAllKeys())}function Jb(e,t,n){return e(r=>al(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.max(...s,0)+1),yn(r.transaction)}))}function Zb(e){return e(t=>al(t).then(n=>{if(n.length!==0)return yn(t.get(n[0])).then(r=>(t.delete(n[0]),yn(t.transaction).then(()=>r)))}))}function Qb(e){let t;function n(){return t==null&&(t=Xb(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async r=>{try{const s=await xa(r,e.textEncoder);await Jb(n(),s,e.maxQueueSize||30)}catch{}},pop:async()=>{try{const r=await Zb(n());if(r)return Ad(r,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function eE(e){return t=>e({...t,createStore:Qb})}function dv(e){return eE(Pf(e))}const ea=1e6,Xn=String(0),tE="main";let cl="",ul="",ll="",Cs=E.navigator&&E.navigator.userAgent||"",dl="";const nE=E.navigator&&E.navigator.language||E.navigator&&E.navigator.languages&&E.navigator.languages[0]||"";function rE(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const ta=E.navigator&&E.navigator.userAgentData;rE(ta)&&ta.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(cl=e.platform||"",ll=e.architecture||"",dl=e.model||"",ul=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){const t=e.fullVersionList[e.fullVersionList.length-1];Cs=`${t.brand} ${t.version}`}}).catch(e=>{});function sE(e){return!("thread_metadata"in e)}function iE(e){return sE(e)?cE(e):e}function oE(e){const t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&F&&h.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function aE(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=oE(r),i=iE(n),o=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),a=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(o).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Yl,runtime:{name:"javascript",version:E.navigator.userAgent},os:{name:cl,version:ul,build_number:Cs},device:{locale:nE,model:dl,manufacturer:Cs,architecture:ll,is_emulator:!1},debug_meta:{images:dE(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||Lt(),trace_id:s,active_thread_id:Xn,relative_start_ns:"0",relative_end_ns:((a-o)*1e6).toFixed(0)}]}}function fl(e){return e.op==="pageload"}function cE(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Xn]:{name:tE}}};if(!e.samples.length)return r;const s=e.samples[0].timestamp,i=typeof performance.timeOrigin=="number"?performance.timeOrigin:oe||0,o=i-(oe||i);for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((c.timestamp+o-s)*ea).toFixed(0),stack_id:t,thread_id:Xn};continue}let u=e.stacks[c.stackId];const l=[];for(;u;){l.push(u.frameId);const f=e.frames[u.frameId];r.frames[u.frameId]===void 0&&(r.frames[u.frameId]={function:f.name,abs_path:typeof f.resourceId=="number"?e.resources[f.resourceId]:void 0,lineno:f.line,colno:f.column}),u=u.parentId===void 0?void 0:e.stacks[u.parentId]}const d={elapsed_since_start_ns:((c.timestamp+o-s)*ea).toFixed(0),stack_id:n,thread_id:Xn};r.stacks[n]=l,r.samples[a]=d,n++}return r}function uE(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function lE(e){const t=[];return $t(e,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++){const i=n[s];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&t.push(n[s])}}),t}const na=new WeakMap;function dE(e){const t=U._sentryDebugIds;if(!t)return[];const n=A(),r=n&&n.getOptions(),s=r&&r.stackParser;if(!s)return[];let i;const o=na.get(s);o?i=o:(i=new Map,na.set(s,i));const a=Object.keys(t).reduce((u,l)=>{let d;const f=i.get(l);f?d=f:(d=s(l),i.set(l,d));for(let p=d.length-1;p>=0;p--){const m=d[p],_=m&&m.filename;if(m&&_){u[_]=t[l];break}}return u},{}),c=[];for(const u of e)u&&a[u]&&c.push({type:"sourcemap",code_file:u,debug_id:a[u]});return c}function fE(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function pE(e){return e.samples.length<2?(F&&h.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(F&&h.log("[Profiling] Discarding profile because it contains no frames"),!1)}let pl=!1;const hl=3e4;function hE(e){return typeof e=="function"}function mE(){const e=E.Profiler;if(!hE(e)){F&&h.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(hl/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{F&&(h.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),h.log("[Profiling] Disabling profiling for current user session.")),pl=!0}}function xs(e){if(pl)return F&&h.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return F&&h.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=A(),n=t&&t.getOptions();if(!n)return F&&h.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return fE(r)?r?(r===!0?!0:Math.random()<r)?!0:(F&&h.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(F&&h.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(F&&h.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function gE(e,t,n,r){return pE(n)?aE(e,t,n,r):null}const Qe=new Map;function _E(){return Qe.size}function yE(e){const t=Qe.get(e);return t&&Qe.delete(e),t}function SE(e,t){if(Qe.set(e,t),Qe.size>30){const n=Qe.keys().next().value;Qe.delete(n)}}function fv(e){return e?xs(e)?As(e):e:(F&&h.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function As(e){let t;fl(e)&&(t=ot()*1e3);const n=mE();if(!n)return e;F&&h.log(`[Profiling] started profiling transaction: ${j(e).description}`);const r=Lt();async function s(){return!e||!n?null:n.stop().then(c=>(i&&(E.clearTimeout(i),i=void 0),F&&h.log(`[Profiling] stopped profiling of transaction: ${j(e).description}`),c?(SE(r,c),null):(F&&h.log(`[Profiling] profiler returned null profile for: ${j(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(c=>(F&&h.log("[Profiling] error while stopping profiler:",c),null))}let i=E.setTimeout(()=>{F&&h.log("[Profiling] max profile duration elapsed, stopping profiling for:",j(e).description),s()},hl);const o=e.end.bind(e);function a(){return e?(s().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),o()},()=>{o()}),e):o()}return e.end=a,e}const ml="BrowserProfiling",bE=()=>({name:ml,setupOnce(){},setup(e){const n=ae().getTransaction();if(n&&fl(n)&&xs(n)&&As(n),typeof e.on!="function"){h.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}e.on("startTransaction",r=>{xs(r)&&As(r)}),e.on("beforeEnvelope",r=>{if(!_E())return;const s=lE(r);if(!s.length)return;const i=[];for(const o of s){const a=o&&o.contexts,c=a&&a.profile&&a.profile.profile_id,u=a&&a.profile&&a.profile.start_timestamp;if(typeof c!="string"){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!c){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}a&&a.profile&&delete a.profile;const l=yE(c);if(!l){F&&h.log(`[Profiling] Could not retrieve profile for transaction: ${c}`);continue}const d=gE(c,u,l,o);d&&i.push(d)}uE(r,i)})}}),EE=bE,pv=Z(ml,EE);let gl={};E.Sentry&&E.Sentry.Integrations&&(gl=E.Sentry.Integrations);const hv={...gl,...Ip,...Jm};function mv(e){const t={...e};nc(t,"react"),Km(t)}const _l="ui.react.render",vE="ui.react.update",yl="ui.react.mount",ra="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx",TE="unknown";class Sl extends me.Component{static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=tt({name:`<${n}>`,onlyIfParent:!0,op:yl,origin:"auto.ui.react.profiler",attributes:{"ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(s=>t[s]!==this.props.updateProps[s]);if(r.length>0){const s=ot();this._updateSpan=Ri(this._mountSpan,()=>tt({name:`<${this.props.name}>`,onlyIfParent:!0,op:vE,origin:"auto.ui.react.profiler",startTimestamp:s,attributes:{"ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=ot(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const s=j(this._mountSpan).timestamp;Ri(this._mountSpan,()=>{const i=tt({onlyIfParent:!0,name:`<${n}>`,op:_l,origin:"auto.ui.react.profiler",startTimestamp:s,attributes:{"ui.component_name":n}});i&&i.end(t)})}}render(){return this.props.children}}Sl.__initStatic();function gv(e,t){const n=t&&t.name||e.displayName||e.name||TE,r=s=>me.createElement(Sl,{...t,name:n,updateProps:s,__self:this,__source:{fileName:ra,lineNumber:159}},me.createElement(e,{...s,__self:this,__source:{fileName:ra,lineNumber:160}}));return r.displayName=`profiler(${n})`,br(r,e),r}function _v(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=me.useState(()=>{if(!(t&&t.disabled))return tt({name:`<${e}>`,onlyIfParent:!0,op:yl,origin:"auto.ui.react.profiler",attributes:{"ui.component_name":e}})});me.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=j(n).timestamp,s=ot(),i=tt({name:`<${e}>`,onlyIfParent:!0,op:_l,origin:"auto.ui.react.profiler",startTimestamp:r,attributes:{"ui.component_name":e}});i&&i.end(s)}}),[])}const fi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,sa="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/errorboundary.tsx";function IE(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const wE="unknown",ia={componentStack:null,error:null,eventId:null};function kE(e,t){const n=new WeakMap;function r(s,i){if(!n.has(s)){if(s.cause)return n.set(s,!0),r(s.cause,i);s.cause=i}}r(e,t)}class pi extends me.Component{constructor(t){super(t),pi.prototype.__init.call(this),this.state=ia,this._openFallbackReportDialog=!0;const n=A();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",r=>{!r.type&&r.event_id===this._lastEventId&&lo({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:r,onError:s,showDialog:i,dialogOptions:o}=this.props;lt(a=>{if(IE(me.version)&&Mt(t)){const u=new Error(t.message);u.name=`React ErrorBoundary ${t.name}`,u.stack=n,kE(t,u)}r&&r(a,t,n);const c=Sn(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});s&&s(t,n,c),i&&(this._lastEventId=c,this._openFallbackReportDialog&&lo({...o,eventId:c})),this.setState({error:t,componentStack:n,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:s}=this.props;s&&s(t,n,r)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:s}=this.state;t&&t(n,r,s),this.setState(ia)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let s;return typeof t=="function"?s=t({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):s=t,me.isValidElement(s)?s:(t&&fi&&h.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}function yv(e,t){const n=e.displayName||e.name||wE,r=s=>me.createElement(pi,{...t,__self:this,__source:{fileName:sa,lineNumber:240}},me.createElement(e,{...s,__self:this,__source:{fileName:sa,lineNumber:241}}));return r.displayName=`errorBoundary(${n})`,br(r,e),r}const RE="redux.action",CE="info",xE={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function Sv(e){const t={...xE,...e};return n=>(r,s)=>(t.attachReduxState&&Vl().addEventProcessor((o,a)=>{try{o.type===void 0&&o.contexts.state.state.type==="redux"&&(a.attachments=[...a.attachments||[],{filename:"redux_state.json",data:JSON.stringify(o.contexts.state.state.value)}])}catch{}return o}),n((o,a)=>{const c=r(o,a),u=ae(),l=t.actionTransformer(a);typeof l<"u"&&l!==null&&u.addBreadcrumb({category:RE,data:l,type:CE});const d=t.stateTransformer(c);if(typeof d<"u"&&d!==null){const p=A(),m=p&&p.getOptions(),_=m&&m.normalizeDepth||3,S={state:{type:"redux",value:d}};it(S,"__sentry_override_normalization_depth__",3+_),u.setContext("state",S)}else u.setContext("state",null);const{configureScopeWithState:f}=t;return typeof f=="function"&&f(u,c),c},s))}function bv(e){const t=Cr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:s,instrumentPageLoad:i=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a);const c=d=>{wn(a,d)},u=d=>{kn(a,d)},l=AE(n,r,s);l(c,i,!1),l(u,!1,o)}}}function AE(e,t,n){return(r,s=!0,i=!0)=>{let o,a;s&&E&&E.location&&oa(t,E.location,n,(c,u="url")=>{a=c,o=r({name:a,attributes:{[Ee]:"pageload",[he]:"auto.pageload.react.reactrouter_v3",[ee]:u}})}),i&&e.listen&&e.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&(o&&o.end(),oa(t,c,n,(u,l="url")=>{a=u;const d={[Ee]:"navigation",[he]:"auto.navigation.react.reactrouter_v3",[ee]:l};o=r({name:a,attributes:d})}))})}}function oa(e,t,n,r){let s=t.pathname;n({location:t,routes:e},(i,o,a)=>{if(i||!a)return r(s);const c=ME(a.routes||[]);return c.length===0||c==="/*"?r(s):(s=c,r(s,"route"))})}function ME(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--){const s=t[r];if(s.path&&s.path.startsWith("/")){n=r;break}}return t.slice(n).filter(({path:r})=>!!r).map(({path:r})=>r).join("")}const OE="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouter.tsx";let xt;function Ev(e){const t=Cr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:s,instrumentPageLoad:i=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a);const c=d=>{wn(a,d)},u=d=>{kn(a,d)},l=NE(n,r,s);l(c,i,!1),l(u,!1,o)}}}function vv(e){const t=Cr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:s}=e;return{...t,afterAllSetup(i){t.afterAllSetup(i);const o=u=>{wn(i,u)},a=u=>{kn(i,u)},c=DE(n,r,s);c(o,e.instrumentPageLoad,!1),c(a,!1,e.instrumentNavigation)}}}function NE(e,t,n){return bl(e,"reactrouter_v4",t,n)}function DE(e,t,n){return bl(e,"reactrouter_v5",t,n)}function bl(e,t,n=[],r){function s(){if(e&&e.location)return e.location.pathname;if(E&&E.location)return E.location.pathname}function i(o){if(n.length===0||!r)return[o,"url"];const a=El(n,o,r);for(let c=0;c<a.length;c++)if(a[c].match.isExact)return[a[c].match.path,"route"];return[o,"url"]}return(o,a=!0,c=!0)=>{const u=s();if(a&&u){const[l,d]=i(u);xt=o({name:l,attributes:{[Ee]:"pageload",[he]:`auto.pageload.react.${t}`,[ee]:d}})}c&&e.listen&&e.listen((l,d)=>{if(d&&(d==="PUSH"||d==="POP")){xt&&xt.end();const[f,p]=i(l.pathname);xt=o({name:f,attributes:{[Ee]:"navigation",[he]:`auto.navigation.react.${t}`,[ee]:p}})}})}}function El(e,t,n,r=[]){return e.some(s=>{const i=s.path?n(t,s):r.length?r[r.length-1].match:LE(t);return i&&(r.push({route:s,match:i}),s.routes&&El(s.routes,t,n,r)),!!i}),r}function LE(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function Tv(e){const t=e.displayName||e.name,n=r=>{if(r&&r.computedMatch&&r.computedMatch.isExact){const s=r.computedMatch.path,i=PE();i&&(i.updateName(s),i.setAttribute(ee,"route"))}return me.createElement(e,{...r,__self:this,__source:{fileName:OE,lineNumber:279}})};return n.displayName=`sentryRoute(${t})`,br(n,e),n}function PE(){if(xt)return xt;const e=Kt(),t=e?Jn(e):void 0;if(!t)return;const n=j(t).op;return n==="navigation"||n==="pageload"?t:void 0}const vl="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx";let Nt,nt,rt,st,dn,ut,qt,Fr,Je=!1;function Iv(e){const t=Cr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:o,stripBasename:a,instrumentPageLoad:c=!0,instrumentNavigation:u=!0}=e;return{...t,afterAllSetup(l){t.afterAllSetup(l);const d=p=>{kn(l,p)},f=E&&E.location&&E.location.pathname;c&&f&&wn(l,{name:f,attributes:{[ee]:"url",[Ee]:"pageload",[he]:"auto.pageload.react.reactrouter_v6"}}),nt=n,rt=r,st=s,ut=o,dn=i,Je=a||!1,qt=d,Fr=u}}}function wv(e,t,n,r,s,i){return(o,a=!0,c=!0)=>{const u=E&&E.location&&E.location.pathname;a&&u&&(Nt=o({name:u,attributes:{[ee]:"url",[Ee]:"pageload",[he]:"auto.pageload.react.reactrouter_v6"}})),nt=e,rt=t,st=n,ut=s,dn=r,Je=i||!1,qt=o,Fr=c}}function ns(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}function Tl(e,t,n,r=""){if(!e||e.length===0)return[Je?ns(t.pathname,r):t.pathname,"url"];let s="";if(n)for(let i=0;i<n.length;i++){const o=n[i],a=o.route;if(a){if(a.index)return[Je?ns(o.pathname,r):o.pathname,"route"];const c=a.path;if(c){const u=c[0]==="/"||s[s.length-1]==="/"?c:`/${c}`;if(s+=u,r+o.pathname===t.pathname)return Fi(s)!==Fi(o.pathname)&&s.slice(-2)!=="/*"?[(Je?"":r)+u,"route"]:[(Je?"":r)+s,"route"]}}}return[Je?ns(t.pathname,r):t.pathname,"url"]}function hi(e,t,n,r,s){const i=Array.isArray(r)?r:ut(n,t,s);if(e&&i){const[o,a]=Tl(n,t,i,s);e.updateName(o),e.setAttribute(ee,a)}}function mi(e,t,n,r,s){const i=Array.isArray(r)?r:ut(t,e,s);if(Fr&&(n==="PUSH"||n==="POP")&&i){Nt&&Nt.end();const[o,a]=Tl(t,e,i,s);Nt=qt({name:o,attributes:{[ee]:a,[Ee]:"navigation",[he]:"auto.navigation.react.reactrouter_v6"}})}}function kv(e){if(!nt||!rt||!st||!dn||!ut||!qt)return fi&&h.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
359
359
|
useEffect: ${nt}. useLocation: ${rt}. useNavigationType: ${st}.
|
|
360
|
-
createRoutesFromChildren: ${dn}. matchRoutes: ${ut}. customStartTransaction: ${qt}.`),e;let t=!0;const n=r=>{const s=rt(),i=st();return nt(()=>{const o=dn(r.children);t?(hi(gi(),s,o),t=!1):mi(s,o,i)},[s,i]),me.createElement(e,{...r,__self:this,__source:{fileName:vl,lineNumber:329}})};return br(n,e),n}function
|
|
361
|
-
//# sourceMappingURL=index.
|
|
360
|
+
createRoutesFromChildren: ${dn}. matchRoutes: ${ut}. customStartTransaction: ${qt}.`),e;let t=!0;const n=r=>{const s=rt(),i=st();return nt(()=>{const o=dn(r.children);t?(hi(gi(),s,o),t=!1):mi(s,o,i)},[s,i]),me.createElement(e,{...r,__self:this,__source:{fileName:vl,lineNumber:329}})};return br(n,e),n}function Rv(e){if(!nt||!rt||!st||!ut||!qt)return fi&&h.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;let t=!0;const n=r=>{const{routes:s,locationArg:i}=r,o=e(s,i),a=rt(),c=st(),u=typeof i=="string"||i&&i.pathname?i:a;return nt(()=>{const l=typeof u=="string"?{pathname:u}:u;t?(hi(gi(),l,s),t=!1):mi(l,s,c)},[c,u]),o};return(r,s)=>me.createElement(n,{routes:r,locationArg:s,__self:this,__source:{fileName:vl,lineNumber:386}})}function Cv(e){return function(t,n){const r=e(t,n),s=n&&n.basename,i=gi();return r.state.historyAction==="POP"&&i&&hi(i,r.state.location,t,void 0,s),r.subscribe(o=>{const a=o.location;Fr&&(o.historyAction==="PUSH"||o.historyAction==="POP")&&mi(a,t,o.historyAction,void 0,s)}),r}}function gi(){if(Nt)return Nt;const e=Kt(),t=e?Jn(e):void 0;if(!t)return;const n=j(t).op;return n==="navigation"||n==="pageload"?t:void 0}export{mm as Breadcrumbs,Hh as BrowserClient,pv as BrowserProfilingIntegration,ev as BrowserTracing,Im as Dedupe,pi as ErrorBoundary,Pr as Feedback,lp as FunctionToString,xm as GlobalHandlers,Pm as HttpContext,Mv as Hub,Qf as InboundFilters,hv as Integrations,Hm as LinkedErrors,ZE as ModuleMetadata,Sl as Profiler,Dr as Replay,uv as ReplayCanvas,Ti as SDK_VERSION,Ee as SEMANTIC_ATTRIBUTE_SENTRY_OP,he as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,Tt as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,ee as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,Ov as Scope,zm as TryCatch,E as WINDOW,je as addBreadcrumb,Tf as addEventProcessor,$l as addGlobalEventProcessor,KE as addIntegration,za as addTracingExtensions,Dc as breadcrumbsIntegration,Vc as browserApiErrorsIntegration,EE as browserProfilingIntegration,Cr as browserTracingIntegration,pb as captureConsoleIntegration,Sr as captureEvent,Sn as captureException,is as captureMessage,ki as captureSession,ov as captureUserFeedback,em as chromeStackLineParser,Nv as close,Dv as configureScope,Yb as contextLinesIntegration,VE as continueTrace,Sv as createReduxEnhancer,Qa as createTransport,$h as createUserFeedbackEnvelope,gb as debugIntegration,yb as dedupeIntegration,Ym as defaultIntegrations,ir as defaultRequestInstrumentationOptions,fm as defaultStackLineParsers,pm as defaultStackParser,Lv as endSession,Dh as eventFromException,Lh as eventFromMessage,Mc as exceptionFromError,Tb as extraErrorDataIntegration,zE as extractTraceparentData,lv as feedbackIntegration,Pv as flush,rv as forceLoad,cc as functionToStringIntegration,sm as geckoStackLineParser,Kt as getActiveSpan,Oe as getActiveTransaction,A as getClient,Ie as getCurrentHub,ae as getCurrentScope,Vm as getDefaultIntegrations,Fv as getHubFromCarrier,cv as getReplay,Da as getSpanStatusFromHttpCode,Hc as globalHandlersIntegration,Db as httpClientIntegration,jc as httpContextIntegration,oc as inboundFiltersIntegration,mv as init,Cc as instrumentOutgoingRequests,$v as isInitialized,Bv as lastEventId,Gc as linkedErrorsIntegration,dv as makeBrowserOfflineTransport,zh as makeFetchTransport,Hv as makeMain,XE as makeMultiplexedTransport,qh as makeXHRTransport,QE as metrics,Kf as moduleMetadataIntegration,sv as onLoad,fv as onProfilingStartRouteTransaction,tv as opera10StackLineParser,nv as opera11StackLineParser,JE as parameterize,bv as reactRouterV3BrowserTracingIntegration,AE as reactRouterV3Instrumentation,Ev as reactRouterV4BrowserTracingIntegration,NE as reactRouterV4Instrumentation,vv as reactRouterV5BrowserTracingIntegration,DE as reactRouterV5Instrumentation,Iv as reactRouterV6BrowserTracingIntegration,wv as reactRouterV6Instrumentation,DS as replayCanvasIntegration,av as replayIntegration,Cb as reportingObserverIntegration,Ab as rewriteFramesIntegration,KS as sendFeedback,Ob as sessionTimingIntegration,ql as setContext,Mf as setCurrentClient,Uv as setExtra,Wv as setExtras,Ws as setHttpStatus,Xd as setMeasurement,zv as setTag,jv as setTags,qv as setUser,lo as showReportDialog,jE as spanStatusfromHttpCode,kn as startBrowserTracingNavigationSpan,wn as startBrowserTracingPageLoadSpan,tt as startInactiveSpan,wi as startSession,GE as startSpan,YE as startSpanManual,Gv as startTransaction,qE as trace,_v as useProfiler,am as winjsStackLineParser,Ri as withActiveSpan,yv as withErrorBoundary,Yv as withIsolationScope,gv as withProfiler,lt as withScope,kv as withSentryReactRouterV6Routing,Tv as withSentryRouting,iv as wrap,Cv as wrapCreateBrowserRouter,Rv as wrapUseRoutes};
|
|
361
|
+
//# sourceMappingURL=index.BuA9SEd_.js.map
|