/*! @sentry/browser (Performance Monitoring and Replay) 9.47.1 (411e102) | https://github.com/getsentry/sentry-javascript */ var Sentry=function(t){t=window.Sentry||{};const e=globalThis,n="9.47.1";function r(){return i(e),e}function i(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||n,e[n]=e[n]||{}}function s(t,r,i=e){const s=i.__SENTRY__=i.__SENTRY__||{},o=s[n]=s[n]||{};return o[t]||(o[t]=r())}const o=["debug","info","warn","error","log","assert","trace"],a={};function c(t){if(!("console"in e))return t();const n=e.console,r={},i=Object.keys(a);i.forEach(t=>{const e=a[t];r[t]=n[t],n[t]=e});try{return t()}finally{i.forEach(t=>{n[t]=r[t]})}}function u(){return{enabled:!1}}const l={enable:function(){u().enabled=!0},disable:function(){u().enabled=!1},isEnabled:function(){return u().enabled},log:function(...t){},warn:function(...t){},error:function(...t){}},f="?",h=/\(error: (.*)\)/,d=/captureMessage|captureException/;function p(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0,r=0)=>{const i=[],s=t.split("\n");for(let t=n;t1024)continue;const o=h.test(n)?n.replace(h,"$1"):n;if(!o.match(/\S*Error: /)){for(const t of e){const e=t(o);if(e){i.push(e);break}}if(i.length>=50+r)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test(m(e).function||"")&&e.pop();e.reverse(),d.test(m(e).function||"")&&(e.pop(),d.test(m(e).function||"")&&e.pop());return e.slice(0,50).map(t=>({...t,filename:t.filename||m(e).filename,function:t.function||f}))}(i.slice(r))}}function m(t){return t[t.length-1]||{}}const y="";function g(t){try{return t&&"function"==typeof t&&t.name||y}catch{return y}}function v(t){const e=t.exception;if(e){const t=[];try{return e.values.forEach(e=>{e.stacktrace.frames&&t.push(...e.stacktrace.frames)}),t}catch{return}}}const b={},k={};function w(t,e){b[t]=b[t]||[],b[t].push(e)}function S(t,e){if(!k[t]){k[t]=!0;try{e()}catch(t){}}}function _(t,e){const n=t&&b[t];if(n)for(const t of n)try{t(e)}catch(t){}}let T=null;function I(t){const e="error";w(e,t),S(e,x)}function x(){T=e.onerror,e.onerror=function(t,e,n,r,i){return _("error",{column:r,error:i,line:n,msg:t,url:e}),!!T&&T.apply(this,arguments)},e.onerror.__SENTRY_INSTRUMENTED__=!0}let E=null;function C(t){const e="unhandledrejection";w(e,t),S(e,R)}function R(){E=e.onunhandledrejection,e.onunhandledrejection=function(t){return _("unhandledrejection",t),!E||E.apply(this,arguments)},e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const M=Object.prototype.toString;function O(t){switch(M.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return U(t,Error)}}function A(t,e){return M.call(t)===`[object ${e}]`}function $(t){return A(t,"ErrorEvent")}function L(t){return A(t,"DOMError")}function D(t){return A(t,"String")}function F(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function P(t){return null===t||F(t)||"object"!=typeof t&&"function"!=typeof t}function N(t){return A(t,"Object")}function j(t){return"undefined"!=typeof Event&&U(t,Event)}function B(t){return Boolean(t?.then&&"function"==typeof t.then)}function U(t,e){try{return t instanceof e}catch{return!1}}function z(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.t)}function q(t){return"undefined"!=typeof Request&&U(t,Request)}const H=e;function W(t,e={}){if(!t)return"";try{let n=t;const r=5,i=[];let s=0,o=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,f=!Array.isArray(e)&&e.maxStringLength||80;for(;n&&s++1&&o+i.length*c+u.length>=f));)i.push(u),o+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return""}}function J(t,e){const n=t,r=[];if(!n?.tagName)return"";if(H.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=e?.length?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(i?.length)i.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const t=n.className;if(t&&D(t)){const e=t.split(/\s+/);for(const t of e)r.push(`.${t}`)}}const s=["aria-label","type","name","title","alt"];for(const t of s){const e=n.getAttribute(t);e&&r.push(`[${t}="${e}"]`)}return r.join("")}function K(){try{return H.document.location.href}catch{return""}}function G(t){if(!H.HTMLElement)return null;let e=t;for(let t=0;t<5;t++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function X(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function Y(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;eV(t,e,n))}function Z(t,e,n){if(!(e in t))return;const r=t[e];if("function"!=typeof r)return;const i=n(r);"function"==typeof i&&et(i,r);try{t[e]=i}catch{}}function tt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{}}function et(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,tt(t,"__sentry_original__",e)}catch{}}function nt(t){return t.__sentry_original__}function rt(t){if(O(t))return{message:t.message,name:t.name,stack:t.stack,...st(t)};if(j(t)){const e={type:t.type,target:it(t.target),currentTarget:it(t.currentTarget),...st(t)};return"undefined"!=typeof CustomEvent&&U(t,CustomEvent)&&(e.detail=t.detail),e}return t}function it(t){try{return e=t,"undefined"!=typeof Element&&U(e,Element)?W(t):Object.prototype.toString.call(t)}catch{return""}var e}function st(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function ot(t=function(){const t=e;return t.crypto||t.msCrypto}()){let n=()=>16*Math.random();try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"");t?.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&n())>>t/4).toString(16))}function at(t){return t.exception?.values?.[0]}function ct(t){const{message:e,event_id:n}=t;if(e)return e;const r=at(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function ut(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type="Error")}function lt(t,e){const n=at(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r?.data,...e.data};n.mechanism.data=t}}function ft(t){if(function(t){try{return t.__sentry_captured__}catch{}}(t))return!0;try{tt(t,"__sentry_captured__",!0)}catch{}return!1}function ht(){return Date.now()/1e3}let dt,pt;function mt(){return(dt??(dt=function(){const{performance:t}=e;if(!t?.now||!t.timeOrigin)return ht;const n=t.timeOrigin;return()=>(n+t.now())/1e3}()))()}function yt(){return pt||(pt=function(){const{performance:t}=e;if(!t?.now)return[void 0,"none"];const n=36e5,r=t.now(),i=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+r-i):n,o=sfunction(t){return{sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}(n)};return t&&vt(n,t),n}function vt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||mt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:ot()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function bt(t,e,n=2){if(!e||"object"!=typeof e||n<=0)return e;if(t&&0===Object.keys(e).length)return t;const r={...t};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=bt(r[t],e[t],n-1));return r}function kt(){return ot()}function wt(){return ot().substring(16)}const St="_sentrySpan";function _t(t,e){e?tt(t,St,e):delete t[St]}function Tt(t){return t[St]}class It{constructor(){this.i=!1,this.o=[],this.u=[],this.l=[],this.h=[],this.p={},this.m={},this.v={},this.k={},this.S={},this._={traceId:kt(),sampleRand:Math.random()}}clone(){const t=new It;return t.l=[...this.l],t.m={...this.m},t.v={...this.v},t.k={...this.k},this.k.flags&&(t.k.flags={values:[...this.k.flags.values]}),t.p=this.p,t.T=this.T,t.I=this.I,t.C=this.C,t.R=this.R,t.u=[...this.u],t.h=[...this.h],t.S={...this.S},t._={...this._},t.M=this.M,t.O=this.O,_t(t,Tt(this)),t}setClient(t){this.M=t}setLastEventId(t){this.O=t}getClient(){return this.M}lastEventId(){return this.O}addScopeListener(t){this.o.push(t)}addEventProcessor(t){return this.u.push(t),this}setUser(t){return this.p=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.I&&vt(this.I,{user:t}),this.A(),this}getUser(){return this.p}setTags(t){return this.m={...this.m,...t},this.A(),this}setTag(t,e){return this.m={...this.m,[t]:e},this.A(),this}setExtras(t){return this.v={...this.v,...t},this.A(),this}setExtra(t,e){return this.v={...this.v,[t]:e},this.A(),this}setFingerprint(t){return this.R=t,this.A(),this}setLevel(t){return this.T=t,this.A(),this}setTransactionName(t){return this.C=t,this.A(),this}setContext(t,e){return null===e?delete this.k[t]:this.k[t]=e,this.A(),this}setSession(t){return t?this.I=t:delete this.I,this.A(),this}getSession(){return this.I}update(t){if(!t)return this;const e="function"==typeof t?t(this):t,n=e instanceof It?e.getScopeData():N(e)?t:void 0,{tags:r,extra:i,user:s,contexts:o,level:a,fingerprint:c=[],propagationContext:u}=n||{};return this.m={...this.m,...r},this.v={...this.v,...i},this.k={...this.k,...o},s&&Object.keys(s).length&&(this.p=s),a&&(this.T=a),c.length&&(this.R=c),u&&(this._=u),this}clear(){return this.l=[],this.m={},this.v={},this.p={},this.k={},this.T=void 0,this.C=void 0,this.R=void 0,this.I=void 0,_t(this,void 0),this.h=[],this.setPropagationContext({traceId:kt(),sampleRand:Math.random()}),this.A(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:ht(),...t,message:t.message?X(t.message,2048):t.message};return this.l.push(r),this.l.length>n&&(this.l=this.l.slice(-n),this.M?.recordDroppedEvent("buffer_overflow","log_item")),this.A(),this}getLastBreadcrumb(){return this.l[this.l.length-1]}clearBreadcrumbs(){return this.l=[],this.A(),this}addAttachment(t){return this.h.push(t),this}clearAttachments(){return this.h=[],this}getScopeData(){return{breadcrumbs:this.l,attachments:this.h,contexts:this.k,tags:this.m,extra:this.v,user:this.p,level:this.T,fingerprint:this.R||[],eventProcessors:this.u,propagationContext:this._,sdkProcessingMetadata:this.S,transactionName:this.C,span:Tt(this)}}setSDKProcessingMetadata(t){return this.S=bt(this.S,t,2),this}setPropagationContext(t){return this._=t,this}getPropagationContext(){return this._}captureException(t,e){const n=e?.event_id||ot();if(!this.M)return n;const r=new Error("Sentry syntheticException");return this.M.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n?.event_id||ot();if(!this.M)return r;const i=new Error(t);return this.M.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureEvent(t,e){const n=e?.event_id||ot();return this.M?(this.M.captureEvent(t,{...e,event_id:n},this),n):n}A(){this.i||(this.i=!0,this.o.forEach(t=>{t(this)}),this.i=!1)}}class xt{constructor(t,e){let n,r;n=t||new It,r=e||new It,this.L=[{scope:n}],this.D=r}withScope(t){const e=this.F();let n;try{n=t(e)}catch(t){throw this.P(),t}return B(n)?n.then(t=>(this.P(),t),t=>{throw this.P(),t}):(this.P(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.D}getStackTop(){return this.L[this.L.length-1]}F(){const t=this.getScope().clone();return this.L.push({client:this.getClient(),scope:t}),t}P(){return!(this.L.length<=1)&&!!this.L.pop()}}function Et(){const t=i(r());return t.stack=t.stack||new xt(s("defaultCurrentScope",()=>new It),s("defaultIsolationScope",()=>new It))}function Ct(t){return Et().withScope(t)}function Rt(t,e){const n=Et();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Mt(t){return Et().withScope(()=>t(Et().getIsolationScope()))}function Ot(t){const e=i(t);return e.acs?e.acs:{withIsolationScope:Mt,withScope:Ct,withSetScope:Rt,withSetIsolationScope:(t,e)=>Mt(e),getCurrentScope:()=>Et().getScope(),getIsolationScope:()=>Et().getIsolationScope()}}function At(){return Ot(r()).getCurrentScope()}function $t(){return Ot(r()).getIsolationScope()}function Lt(){return s("globalScope",()=>new It)}function Dt(...t){const e=Ot(r());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}function Ft(){return At().getClient()}function Pt(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=e,s={trace_id:n,span_id:i||wt()};return r&&(s.parent_span_id=r),s}const Nt="sentry.source",jt="sentry.sample_rate",Bt="sentry.previous_trace_sample_rate",Ut="sentry.op",zt="sentry.origin",qt="sentry.idle_span_finish_reason",Ht="sentry.measurement_unit",Wt="sentry.measurement_value",Jt="sentry.custom_span_name",Kt="sentry.profile_id",Gt="sentry.exclusive_time",Xt="sentry.link.type";function Yt(t,e){t.setAttribute("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return{code:1};if(t>=400&&t<500)switch(t){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}(e);"unknown_error"!==n.message&&t.setStatus(n)}const Vt="_sentryScope",Qt="_sentryIsolationScope";function Zt(t){return{scope:t[Vt],isolationScope:t[Qt]}}const te="sentry-",ee=/^sentry-/;function ne(t){const e=function(t){if(!t||!D(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce((t,e)=>{const n=ie(e);return Object.entries(n).forEach(([e,n])=>{t[e]=n}),t},{});return ie(t)}(t);if(!e)return;const n=Object.entries(e).reduce((t,[e,n])=>{if(e.match(ee)){t[e.slice(7)]=n}return t},{});return Object.keys(n).length>0?n:void 0}function re(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce((t,[e,n],r)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,s=0===r?i:`${t},${i}`;return s.length>8192?t:s},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${te}${e}`]=n),t),{}))}function ie(t){return t.split(",").map(t=>t.split("=").map(t=>{try{return decodeURIComponent(t.trim())}catch{return}})).reduce((t,[e,n])=>(e&&n&&(t[e]=n),t),{})}function se(t){if("boolean"==typeof t)return Number(t);const e="string"==typeof t?parseFloat(t):t;return"number"!=typeof e||isNaN(e)||e<0||e>1?void 0:e}const oe=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ae(t,e){const n=function(t){if(!t)return;const e=t.match(oe);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=ne(e);if(!n?.traceId)return{traceId:kt(),sampleRand:Math.random()};const i=function(t,e){const n=se(e?.sample_rand);if(void 0!==n)return n;const r=se(e?.sample_rate);return r&&void 0!==t?.parentSampled?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}(n,r);r&&(r.sample_rand=i.toString());const{traceId:s,parentSpanId:o,parentSampled:a}=n;return{traceId:s,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:i}}function ce(t=kt(),e=wt(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}let ue=!1;function le(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:i,parent_span_id:s,status:o,origin:a,links:c}=ye(t);return{parent_span_id:s,span_id:e,trace_id:n,data:r,op:i,status:o,origin:a,links:c}}function fe(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),i=r?e:ye(t).parent_span_id,s=Zt(t).scope;return{parent_span_id:i,span_id:r?s?.getPropagationContext().propagationSpanId||wt():e,trace_id:n}}function he(t){const{traceId:e,spanId:n}=t.spanContext();return ce(e,n,ge(t))}function de(t){return t&&t.length>0?t.map(({context:{spanId:t,traceId:e,traceFlags:n,...r},attributes:i})=>({span_id:t,trace_id:e,sampled:1===n,attributes:i,...r})):void 0}function pe(t){return"number"==typeof t?me(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?me(t.getTime()):mt()}function me(t){return t>9999999999?t/1e3:t}function ye(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:r,startTime:i,name:s,endTime:o,status:a,links:c}=t;return{span_id:e,trace_id:n,data:r,description:s,parent_span_id:"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0,start_timestamp:pe(i),timestamp:pe(o)||void 0,status:ve(a),op:r[Ut],origin:r[zt],links:de(c)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function ge(t){const{traceFlags:e}=t.spanContext();return 1===e}function ve(t){if(t&&0!==t.code)return 1===t.code?"ok":t.message||"unknown_error"}const be="_sentryChildSpans",ke="_sentryRootSpan";function we(t,e){const n=t[ke]||t;tt(e,ke,n),t[be]?t[be].add(e):tt(t,be,new Set([e]))}function Se(t){const e=new Set;return function t(n){if(!e.has(n)&&ge(n)){e.add(n);const r=n[be]?Array.from(n[be]):[];for(const e of r)t(e)}}(t),Array.from(e)}function _e(t){return t[ke]||t}function Te(){const t=Ot(r());return t.getActiveSpan?t.getActiveSpan():Tt(At())}function Ie(){ue||(c(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),ue=!0)}let xe=!1;function Ee(){function t(){const t=Te(),e=t&&_e(t);if(e){const t="internal_error";e.setStatus({code:2,message:t})}}xe||(t.tag="sentry_tracingErrorCallback",xe=!0,I(t),C(t))}function Ce(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=t||Ft()?.getOptions();return!(!e||null==e.tracesSampleRate&&!e.tracesSampler)}const Re="production",Me=/^o(\d+)\./,Oe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ae(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function $e(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Le(t){const e="string"==typeof t?function(t){const e=Oe.exec(t);if(!e)return void c(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});const[n,r,i="",s="",o="",a=""]=e.slice(1);let u="",l=a;const f=l.split("/");if(f.length>1&&(u=f.slice(0,-1).join("/"),l=f.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return $e({host:s,pass:i,path:u,projectId:l,port:o,protocol:n,publicKey:r})}(t):$e(t);if(e)return e}const De="_frozenDsc";function Fe(t,e){tt(t,De,e)}function Pe(t,e){const n=e.getOptions(),{publicKey:r,host:i}=e.getDsn()||{};let s;n.orgId?s=String(n.orgId):i&&(s=function(t){const e=t.match(Me);return e?.[1]}(i));const o={environment:n.environment||Re,release:n.release,public_key:r,trace_id:t,org_id:s};return e.emit("createDsc",o),o}function Ne(t,e){const n=e.getPropagationContext();return n.dsc||Pe(n.traceId,t)}function je(t){const e=Ft();if(!e)return{};const n=_e(t),r=ye(n),i=r.data,s=n.spanContext().traceState,o=s?.get("sentry.sample_rate")??i[jt]??i[Bt];function a(t){return"number"!=typeof o&&"string"!=typeof o||(t.sample_rate=`${o}`),t}const c=n[De];if(c)return a(c);const u=s?.get("sentry.dsc"),l=u&&ne(u);if(l)return a(l);const f=Pe(t.spanContext().traceId,e),h=i[Nt],d=r.description;return"url"!==h&&d&&(f.transaction=d),Ce()&&(f.sampled=String(ge(n)),f.sample_rand=s?.get("sentry.sample_rand")??Zt(n).scope?.getPropagationContext().sampleRand.toString()),a(f),e.emit("createDsc",f,n),f}class Be{constructor(t={}){this.N=t.traceId||kt(),this.j=t.spanId||wt()}spanContext(){return{spanId:this.j,traceId:this.N,traceFlags:0}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}function Ue(t,e=100,n=1/0){try{return qe("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function ze(t,e=3,n=102400){const r=Ue(t,e);return i=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(i))>n?ze(t,e-1,n):r;var i}function qe(t,e,n=1/0,r=1/0,i=function(){const t=new WeakSet;function e(e){return!!t.has(e)||(t.add(e),!1)}function n(e){t.delete(e)}return[e,n]}()){const[s,o]=i;if(null==e||["boolean","string"].includes(typeof e)||"number"==typeof e&&Number.isFinite(e))return e;const a=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e.B)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(z(e))return"[VueViewModel]";if(N(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&!Number.isFinite(e))return`[${e}]`;if("function"==typeof e)return`[Function: ${g(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(s(e))return"[Circular ~]";const u=e;if(u&&"function"==typeof u.toJSON)try{return qe("",u.toJSON(),c-1,r,i)}catch{}const l=Array.isArray(e)?[]:{};let f=0;const h=rt(e);for(const t in h){if(!Object.prototype.hasOwnProperty.call(h,t))continue;if(f>=r){l[t]="[MaxProperties ~]";break}const e=h[t];l[t]=qe(t,e,c-1,r,i),f++}return o(e),l}function He(t,e=[]){return[t,e]}function We(t,e){const[n,r]=t;return[n,[...r,e]]}function Je(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function Ke(t){const n=i(e);return n.encodePolyfill?n.encodePolyfill(t):(new TextEncoder).encode(t)}function Ge(t){const[e,n]=t;let r=JSON.stringify(e);function i(t){"string"==typeof r?r="string"==typeof t?r+t:[Ke(r),t]:r.push("string"==typeof t?Ke(t):t)}for(const t of n){const[e,n]=t;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let t;try{t=JSON.stringify(n)}catch{t=JSON.stringify(Ue(n))}i(t)}}return"string"==typeof r?r:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(r)}function Xe(t){return[{type:"span"},t]}function Ye(t){const e="string"==typeof t.data?Ke(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const Ve={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Qe(t){return Ve[t]}function Ze(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function tn(t,e,n,r){const i=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:Ae(r)},...i&&{trace:i}}}function en(t,e,n,r=Te()){const i=r&&_e(r);i&&i.addEvent(t,{[Wt]:e,[Ht]:n})}function nn(t){if(!t||0===t.length)return;const e={};return t.forEach(t=>{const n=t.attributes||{},r=n[Ht],i=n[Wt];"string"==typeof r&&"number"==typeof i&&(e[t.name]={value:i,unit:r})}),e}class rn{constructor(t={}){this.N=t.traceId||kt(),this.j=t.spanId||wt(),this.U=t.startTimestamp||mt(),this.q=t.links,this.H={},this.setAttributes({[zt]:"manual",[Ut]:t.op,...t.attributes}),this.W=t.name,t.parentSpanId&&(this.J=t.parentSpanId),"sampled"in t&&(this.K=t.sampled),t.endTimestamp&&(this.G=t.endTimestamp),this.B=[],this.X=t.isStandalone,this.G&&this.Y()}addLink(t){return this.q?this.q.push(t):this.q=[t],this}addLinks(t){return this.q?this.q.push(...t):this.q=t,this}recordException(t,e){}spanContext(){const{j:t,N:e,K:n}=this;return{spanId:t,traceId:e,traceFlags:n?1:0}}setAttribute(t,e){return void 0===e?delete this.H[t]:this.H[t]=e,this}setAttributes(t){return Object.keys(t).forEach(e=>this.setAttribute(e,t[e])),this}updateStartTime(t){this.U=pe(t)}setStatus(t){return this.V=t,this}updateName(t){return this.W=t,this.setAttribute(Nt,"custom"),this}end(t){this.G||(this.G=pe(t),this.Y())}getSpanJSON(){return{data:this.H,description:this.W,op:this.H[Ut],parent_span_id:this.J,span_id:this.j,start_timestamp:this.U,status:ve(this.V),timestamp:this.G,trace_id:this.N,origin:this.H[zt],profile_id:this.H[Kt],exclusive_time:this.H[Gt],measurements:nn(this.B),is_segment:this.X&&_e(this)===this||void 0,segment_id:this.X?_e(this).spanContext().spanId:void 0,links:de(this.q)}}isRecording(){return!this.G&&!!this.K}addEvent(t,e,n){const r=sn(e)?e:n||mt(),i=sn(e)?{}:e||{},s={name:t,time:pe(r),attributes:i};return this.B.push(s),this}isStandaloneSpan(){return!!this.X}Y(){const t=Ft();t&&t.emit("spanEnd",this);if(!(this.X||this===_e(this)))return;if(this.X)return void(this.K?function(t){const e=Ft();if(!e)return;const n=t[1];if(!n||0===n.length)return void e.recordDroppedEvent("before_send","span");e.sendEnvelope(t)}(function(t,e){const n=je(t[0]),r=e?.getDsn(),i=e?.getOptions().tunnel,s={sent_at:(new Date).toISOString(),...function(t){return!!t.trace_id&&!!t.public_key}(n)&&{trace:n},...!!i&&r&&{dsn:Ae(r)}},o=e?.getOptions().beforeSendSpan,a=o?t=>{const e=ye(t);return o(e)||(Ie(),e)}:ye,c=[];for(const e of t){const t=a(e);t&&c.push(Xe(t))}return He(s,c)}([this],t)):t&&t.recordDroppedEvent("sample_rate","span"));const e=this.Z();if(e){(Zt(this).scope||At()).captureEvent(e)}}Z(){if(!on(ye(this)))return;this.W||(this.W="");const{scope:t,isolationScope:e}=Zt(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this.K)return;const r=Se(this).filter(t=>t!==this&&!function(t){return t instanceof rn&&t.isStandaloneSpan()}(t)).map(t=>ye(t)).filter(on),i=this.H[Nt];delete this.H[Jt],r.forEach(t=>{delete t.data[Jt]});const s={contexts:{trace:le(this)},spans:r.length>1e3?r.sort((t,e)=>t.start_timestamp-e.start_timestamp).slice(0,1e3):r,start_timestamp:this.U,timestamp:this.G,transaction:this.W,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:e,dynamicSamplingContext:je(this)},request:n,...i&&{transaction_info:{source:i}}},o=nn(this.B);return o&&Object.keys(o).length&&(s.measurements=o),s}}function sn(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function on(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}function an(t,e,n=()=>{}){let r;try{r=t()}catch(t){throw e(t),n(),t}return function(t,e,n){if(B(t))return t.then(t=>(n(),t),t=>{throw e(t),n(),t});return n(),t}(r,e,n)}const cn="__SENTRY_SUPPRESS_TRACING__";function un(t,e){const n=pn();if(n.startSpan)return n.startSpan(t,e);const r=dn(t),{forceTransaction:i,parentSpan:s,scope:o}=t,a=o?.clone();return Dt(a,()=>gn(s)(()=>{const n=At(),o=yn(n,s),a=t.onlyIfParent&&!o?new Be:hn({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return _t(n,a),an(()=>e(a),()=>{const{status:t}=ye(a);!a.isRecording()||t&&"ok"!==t||a.setStatus({code:2,message:"internal_error"})},()=>{a.end()})}))}function ln(t){const e=pn();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=dn(t),{forceTransaction:r,parentSpan:i}=t;return(t.scope?e=>Dt(t.scope,e):void 0!==i?t=>fn(i,t):t=>t())(()=>{const e=At(),s=yn(e,i);return t.onlyIfParent&&!s?new Be:hn({parentSpan:s,spanArguments:n,forceTransaction:r,scope:e})})}function fn(t,e){const n=pn();return n.withActiveSpan?n.withActiveSpan(t,e):Dt(n=>(_t(n,t||void 0),e(n)))}function hn({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Ce()){const r=new Be;if(n||!t){Fe(r,{sampled:"false",sample_rate:"0",transaction:e.name,...je(r)})}return r}const i=$t();let s;if(t&&!n)s=function(t,e,n){const{spanId:r,traceId:i}=t.spanContext(),s=!e.getScopeData().sdkProcessingMetadata[cn]&&ge(t),o=s?new rn({...n,parentSpanId:r,traceId:i,sampled:s}):new Be({traceId:i});we(t,o);const a=Ft();a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o));return o}(t,r,e),we(t,s);else if(t){const n=je(t),{traceId:i,spanId:o}=t.spanContext(),a=ge(t);s=mn({traceId:i,parentSpanId:o,...e},r,a),Fe(s,n)}else{const{traceId:t,dsc:n,parentSpanId:o,sampled:a}={...i.getPropagationContext(),...r.getPropagationContext()};s=mn({traceId:t,parentSpanId:o,...e},r,a),n&&Fe(s,n)}return function(t,e,n){t&&(tt(t,Qt,n),tt(t,Vt,e))}(s,r,i),s}function dn(t){const e={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const n={...e};return n.startTimestamp=pe(t.startTime),delete n.startTime,n}return e}function pn(){return Ot(r())}function mn(t,e,n){const r=Ft(),i=r?.getOptions()||{},{name:s=""}=t,o={spanAttributes:{...t.attributes},spanName:s,parentSampled:n};r?.emit("beforeSampling",o,{decision:!1});const a=o.parentSampled??n,c=o.spanAttributes,u=e.getPropagationContext(),[l,f,h]=e.getScopeData().sdkProcessingMetadata[cn]?[!1]:function(t,e,n){if(!Ce(t))return[!1];let r,i;"function"==typeof t.tracesSampler?(i=t.tracesSampler({...e,inheritOrSampleWith:t=>"number"==typeof e.parentSampleRate?e.parentSampleRate:"boolean"==typeof e.parentSampled?Number(e.parentSampled):t}),r=!0):void 0!==e.parentSampled?i=e.parentSampled:void 0!==t.tracesSampleRate&&(i=t.tracesSampleRate,r=!0);const s=se(i);return void 0===s?[!1]:s?[nfn(t,e):t=>t()}const vn={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function bn(t,e={}){const n=new Map;let r,i=!1,s="externalFinish",o=!e.disableAutoFinish;const a=[],{idleTimeout:c=vn.idleTimeout,finalTimeout:u=vn.finalTimeout,childSpanTimeout:f=vn.childSpanTimeout,beforeSpanEnd:h}=e,d=Ft();if(!d||!Ce()){const t=new Be;return Fe(t,{sample_rate:"0",sampled:"false",...je(t)}),t}const p=At(),m=Te(),y=function(t){const e=ln(t);return _t(At(),e),e}(t);function g(){r&&(clearTimeout(r),r=void 0)}function v(t){g(),r=setTimeout(()=>{!i&&0===n.size&&o&&(s="idleTimeout",y.end(t))},c)}function b(t){r=setTimeout(()=>{!i&&o&&(s="heartbeatFailed",y.end(t))},f)}function k(t){i=!0,n.clear(),a.forEach(t=>t()),_t(p,m);const e=ye(y),{start_timestamp:r}=e;if(!r)return;e.data[qt]||y.setAttribute(qt,s),l.log(`[Tracing] Idle span "${e.op}" finished`);const o=Se(y).filter(t=>t!==y);let f=0;o.forEach(e=>{e.isRecording()&&(e.setStatus({code:2,message:"cancelled"}),e.end(t));const n=ye(e),{timestamp:r=0,start_timestamp:i=0}=n;r-i<=(u+c)/1e3&&i<=t||(!function(t,e){t[be]&&t[be].delete(e)}(y,e),f++)}),f>0&&y.setAttribute("sentry.idle_span_discarded_spans",f)}return y.end=new Proxy(y.end,{apply(t,e,n){if(h&&h(y),e instanceof Be)return;const[r,...i]=n,s=pe(r||mt()),o=Se(y).filter(t=>t!==y);if(!o.length)return k(s),Reflect.apply(t,e,[s,...i]);const a=o.map(t=>ye(t).timestamp).filter(t=>!!t),c=a.length?Math.max(...a):void 0,l=ye(y).start_timestamp,f=Math.min(l?l+u/1e3:1/0,Math.max(l||-1/0,Math.min(s,c||1/0)));return k(f),Reflect.apply(t,e,[f,...i])}}),a.push(d.on("spanStart",t=>{if(i||t===y||ye(t).timestamp||t instanceof rn&&t.isStandaloneSpan())return;var e;Se(y).includes(t)&&(e=t.spanContext().spanId,g(),n.set(e,!0),b(mt()+f/1e3))})),a.push(d.on("spanEnd",t=>{var e;i||(e=t.spanContext().spanId,n.has(e)&&n.delete(e),0===n.size&&v(mt()+c/1e3))})),a.push(d.on("idleSpanEnableAutoFinish",t=>{t===y&&(o=!0,v(),n.size&&b())})),e.disableAutoFinish||v(),setTimeout(()=>{i||(y.setStatus({code:2,message:"deadline_exceeded"}),s="finalTimeout",y.end())},u),y}function kn(t){return new Sn(e=>{e(t)})}function wn(t){return new Sn((e,n)=>{n(t)})}class Sn{constructor(t){this.tt=0,this.et=[],this.nt(t)}then(t,e){return new Sn((n,r)=>{this.et.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.rt()})}catch(t){return this.then(t=>t,t)}finally(t){return new Sn((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}rt(){if(0===this.tt)return;const t=this.et.slice();this.et=[],t.forEach(t=>{t[0]||(1===this.tt&&t[1](this.it),2===this.tt&&t[2](this.it),t[0]=!0)})}nt(t){const e=(t,e)=>{0===this.tt&&(B(e)?e.then(n,r):(this.tt=t,this.it=e,this.rt()))},n=t=>{e(1,t)},r=t=>{e(2,t)};try{t(n,r)}catch(t){r(t)}}}function _n(t,e,n,r=0){return new Sn((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const a=o({...e},n);B(a)?a.then(e=>_n(t,e,n,r+1).then(i)).then(null,s):_n(t,a,n,r+1).then(i).then(null,s)}})}function Tn(t,e){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=e;!function(t,e){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=e;Object.keys(n).length&&(t.extra={...n,...t.extra});Object.keys(r).length&&(t.tags={...r,...t.tags});Object.keys(i).length&&(t.user={...i,...t.user});Object.keys(s).length&&(t.contexts={...s,...t.contexts});o&&(t.level=o);a&&"transaction"!==t.type&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:fe(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:je(e),...t.sdkProcessingMetadata};const n=_e(e),r=ye(n).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint.length||delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,i),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,s)}function In(t,e){const{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:f,propagationContext:h,transactionName:d,span:p}=e;xn(t,"extra",n),xn(t,"tags",r),xn(t,"user",i),xn(t,"contexts",s),t.sdkProcessingMetadata=bt(t.sdkProcessingMetadata,a,2),o&&(t.level=o),d&&(t.transactionName=d),p&&(t.span=p),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext={...t.propagationContext,...h}}function xn(t,e,n){t[e]=bt(t[e],n,1)}let En,Cn,Rn;function Mn(t,n,r,i,s,o){const{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=t,u={...n,event_id:n.event_id||r.event_id||ot(),timestamp:n.timestamp||ht()},l=r.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;t.environment=t.environment||n||Re,!t.release&&r&&(t.release=r);!t.dist&&i&&(t.dist=i);const o=t.request;o?.url&&(o.url=X(o.url,s))}(u,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(u,l),s&&s.emit("applyFrameMetadata",n),void 0===n.type&&function(t,n){const r=function(t){const n=e._sentryDebugIds;if(!n)return{};const r=Object.keys(n);return Rn&&r.length===Cn||(Cn=r.length,Rn=r.reduce((e,r)=>{En||(En={});const i=En[r];if(i)e[i[0]]=i[1];else{const i=t(r);for(let t=i.length-1;t>=0;t--){const s=i[t],o=s?.filename,a=n[r];if(o&&a){e[o]=a,En[r]=[o,a];break}}}return e},{})),Rn}(n);t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.filename&&(t.debug_id=r[t.filename])})})}(u,t.stackParser);const f=function(t,e){if(!e)return t;const n=t?t.clone():new It;return n.update(e),n}(i,r.captureContext);r.mechanism&<(u,r.mechanism);const h=s?s.getEventProcessors():[],d=Lt().getScopeData();if(o){In(d,o.getScopeData())}if(f){In(d,f.getScopeData())}const p=[...r.attachments||[],...d.attachments];p.length&&(r.attachments=p),Tn(u,d);return _n([...h,...d.eventProcessors],u,r).then(t=>(t&&function(t){const e={};if(t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)})}),0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([t,e])=>{n.push({type:"sourcemap",code_file:t,debug_id:e})})}(t),"number"==typeof a&&a>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:Ue(t.data,e,n)}}))},...t.user&&{user:Ue(t.user,e,n)},...t.contexts&&{contexts:Ue(t.contexts,e,n)},...t.extra&&{extra:Ue(t.extra,e,n)}};t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Ue(t.contexts.trace.data,e,n)));t.spans&&(r.spans=t.spans.map(t=>({...t,...t.data&&{data:Ue(t.data,e,n)}})));t.contexts?.flags&&r.contexts&&(r.contexts.flags=Ue(t.contexts.flags,3,n));return r}(t,a,c):t))}function On(t){if(t)return function(t){return t instanceof It||"function"==typeof t}(t)||function(t){return Object.keys(t).some(t=>An.includes(t))}(t)?{captureContext:t}:t}const An=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function captureException(t,e){return At().captureException(t,On(e))}function $n(t,e){return At().captureEvent(t,e)}function Ln(t,e){$t().setContext(t,e)}function Dn(){return $t().lastEventId()}function Fn(){const t=Ft();return!1!==t?.getOptions().enabled&&!!t?.getTransport()}function Pn(t){$t().addEventProcessor(t)}function Nn(t){const n=$t(),r=At(),{userAgent:i}=e.navigator||{},s=gt({user:r.getUser()||n.getUser(),...i&&{userAgent:i},...t}),o=n.getSession();return"ok"===o?.status&&vt(o,{status:"exited"}),jn(),n.setSession(s),s}function jn(){const t=$t(),e=At().getSession()||t.getSession();e&&function(t){let e={};"ok"===t.status&&(e={status:"exited"}),vt(t,e)}(e),Bn(),t.setSession()}function Bn(){const t=$t(),e=Ft(),n=t.getSession();n&&e&&e.captureSession(n)}function Un(t=!1){t?jn():Bn()}function zn(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function qn(t,e,n){return e||`${function(t){return`${zn(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){const n={sentry_version:"7"};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}(t,n)}`}const Hn=[];function Wn(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;if(e.forEach(t=>{t.isDefaultInstance=!0}),Array.isArray(n))r=[...e,...n];else if("function"==typeof n){const t=n(e);r=Array.isArray(t)?t:[t]}else r=e;return function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.values(e)}(r)}function Jn(t,e){for(const n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function Kn(t,e,n){if(!n[e.name]){if(n[e.name]=e,-1===Hn.indexOf(e.name)&&"function"==typeof e.setupOnce&&(e.setupOnce(),Hn.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(e,r)=>n(e,r,t))}if("function"==typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign((e,r)=>n(e,r,t),{id:e.name});t.addEventProcessor(r)}}}const Gn=Symbol.for("SentryInternalError"),Xn=Symbol.for("SentryDoNotSendEventError");function Yn(t){return{message:t,[Gn]:!0}}function Vn(t){return{message:t,[Xn]:!0}}class Qn{constructor(t){if(this.st=t,this._integrations={},this.ot=0,this.ct={},this.ut={},this.u=[],t.dsn&&(this.lt=Le(t.dsn)),this.lt){const e=qn(this.lt,t.tunnel,t._metadata?t._metadata.sdk:void 0);this.ft=t.transport({tunnel:this.st.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){const r=ot();if(ft(t))return r;const i={event_id:r,...e};return this.ht(this.eventFromException(t,i).then(t=>this.dt(t,i,n))),i.event_id}captureMessage(t,e,n,r){const i={event_id:ot(),...n},s=F(t)?t:String(t),o=P(t)?this.eventFromMessage(s,e,i):this.eventFromException(t,i);return this.ht(o.then(t=>this.dt(t,i,r))),i.event_id}captureEvent(t,e,n){const r=ot();if(e?.originalException&&ft(e.originalException))return r;const i={event_id:r,...e},s=t.sdkProcessingMetadata||{},o=s.capturedSpanScope,a=s.capturedSpanIsolationScope;return this.ht(this.dt(t,i,o||n,a)),i.event_id}captureSession(t){this.sendSession(t),vt(t,{init:!1})}getDsn(){return this.lt}getOptions(){return this.st}getSdkMetadata(){return this.st._metadata}getTransport(){return this.ft}flush(t){const e=this.ft;return e?(this.emit("flush"),this.yt(t).then(n=>e.flush(t).then(t=>n&&t))):kn(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this.u}addEventProcessor(t){this.u.push(t)}init(){(this.gt()||this.st.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this.vt()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const e=this._integrations[t.name];Kn(this,t,this._integrations),e||Jn(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=function(t,e,n,r){const i=Ze(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n?.sdk);const o=tn(t,i,r,e);return delete t.sdkProcessingMetadata,He(o,[[{type:s},t]])}(t,this.lt,this.st._metadata,this.st.tunnel);for(const t of e.attachments||[])n=We(n,Ye(t));const r=this.sendEnvelope(n);r&&r.then(e=>this.emit("afterSendEvent",t,e),null)}sendSession(t){const{release:e,environment:n=Re}=this.st;if("aggregates"in t){const r=t.attrs||{};if(!r.release&&!e)return;r.release=r.release||e,r.environment=r.environment||n,t.attrs=r}else{if(!t.release&&!e)return;t.release=t.release||e,t.environment=t.environment||n}this.emit("beforeSendSession",t);const r=function(t,e,n,r){const i=Ze(n);return He({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&e&&{dsn:Ae(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.lt,this.st._metadata,this.st.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,e,n=1){if(this.st.sendClientReports){const r=`${t}:${e}`;this.ct[r]=(this.ct[r]||0)+n}}on(t,e){const n=this.ut[t]=this.ut[t]||[];return n.push(e),()=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)}}emit(t,...e){const n=this.ut[t];n&&n.forEach(t=>t(...e))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this.gt()&&this.ft?this.ft.send(t).then(null,t=>t):kn({})}vt(){const{integrations:t}=this.st;this._integrations=function(t,e){const n={};return e.forEach(e=>{e&&Kn(t,e,n)}),n}(this,t),Jn(this,t)}bt(t,e){let n="fatal"===e.level,r=!1;const i=e.exception?.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(!1===e?.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(vt(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}yt(t){return new Sn(e=>{let n=0;const r=setInterval(()=>{0==this.ot?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}gt(){return!1!==this.getOptions().enabled&&void 0!==this.ft}kt(t,e,n,r){const i=this.getOptions(),s=Object.keys(this._integrations);return!e.integrations&&s?.length&&(e.integrations=s),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),Mn(i,t,e,n,this,r).then(t=>{if(null===t)return t;this.emit("postprocessEvent",t,e),t.contexts={trace:Pt(n),...t.contexts};const r=Ne(this,n);return t.sdkProcessingMetadata={dynamicSamplingContext:r,...t.sdkProcessingMetadata},t})}dt(t,e={},n=At(),r=$t()){return this.wt(t,e,n,r).then(t=>t.event_id,t=>{})}wt(t,e,n,r){const i=this.getOptions(),{sampleRate:s}=i,o=tr(t),a=Zn(t),c=t.type||"error",u=`before send for type \`${c}\``,l=void 0===s?void 0:se(s);if(a&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),wn(Vn(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const f="replay_event"===c?"replay":c;return this.kt(t,e,n,r).then(t=>{if(null===t)throw this.recordDroppedEvent("event_processor",f),Vn("An event processor returned `null`, will not send event.");if(e.data&&!0===e.data.__sentry__)return t;const n=function(t,e,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=e;let a=n;if(Zn(a)&&i)return i(a,r);if(tr(a)){if(o){const t=o(function(t){const{trace_id:e,parent_span_id:n,span_id:r,status:i,origin:s,data:o,op:a}=t.contexts?.trace??{};return{data:o??{},description:t.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:i,timestamp:t.timestamp,trace_id:e??"",origin:s,profile_id:o?.[Kt],exclusive_time:o?.[Gt],measurements:t.measurements,is_segment:!0}}(a));if(t?a=bt(n,{type:"transaction",timestamp:(c=t).timestamp,start_timestamp:c.start_timestamp,transaction:c.description,contexts:{trace:{trace_id:c.trace_id,span_id:c.span_id,parent_span_id:c.parent_span_id,op:c.op,status:c.status,origin:c.origin,data:{...c.data,...c.profile_id&&{[Kt]:c.profile_id},...c.exclusive_time&&{[Gt]:c.exclusive_time}}}},measurements:c.measurements}):Ie(),a.spans){const t=[];for(const e of a.spans){const n=o(e);n?t.push(n):(Ie(),t.push(e))}a.spans=t}}if(s){if(a.spans){const t=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return s(a,r)}}var c;return a}(0,i,t,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(B(t))return t.then(t=>{if(!N(t)&&null!==t)throw Yn(n);return t},t=>{throw Yn(`${e} rejected with ${t}`)});if(!N(t)&&null!==t)throw Yn(n);return t}(n,u)}).then(i=>{if(null===i){if(this.recordDroppedEvent("before_send",f),o){const e=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",e)}throw Vn(`${u} returned \`null\`, will not send event.`)}const s=n.getSession()||r.getSession();if(a&&s&&this.bt(s,i),o){const t=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const c=i.transaction_info;if(o&&c&&i.transaction!==t.transaction){const t="custom";i.transaction_info={...c,source:t}}return this.sendEvent(i,e),i}).then(null,t=>{if(function(t){return!!t&&"object"==typeof t&&Xn in t}(t)||function(t){return!!t&&"object"==typeof t&&Gn in t}(t))throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),Yn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}ht(t){this.ot++,t.then(t=>(this.ot--,t),t=>(this.ot--,t))}St(){const t=this.ct;return this.ct={},Object.entries(t).map(([t,e])=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e}})}_t(){const t=this.St();if(0===t.length)return;if(!this.lt)return;const e=(n=t,He((r=this.st.tunnel&&Ae(this.lt))?{dsn:r}:{},[[{type:"client_report"},{timestamp:ht(),discarded_events:n}]]));var n,r;this.sendEnvelope(e)}}function Zn(t){return void 0===t.type}function tr(t){return"transaction"===t.type}function er(t,e){const n=function(t){return nr().get(t)}(t)??[];if(0===n.length)return;const r=t.getOptions(),i=function(t,e,n,r){const i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=Ae(r)),He(i,[(s=t,[{type:"log",item_count:s.length,content_type:"application/vnd.sentry.items.log+json"},{items:s}])]);var s}(n,r._metadata,r.tunnel,t.getDsn());nr().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(i)}function nr(){return s("clientToLogBufferMap",()=>new WeakMap)}function rr(t){At().setClient(t)}const ir=Symbol.for("SentryBufferFullError");function sr(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:e,add:function(r){if(!(void 0===t||e.lengthn(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(t){return new Sn((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout(()=>{t&&t>0&&n(!1)},t);e.forEach(t=>{kn(t).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}function or(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}function ar(t,{statusCode:e,headers:n},r=Date.now()){const i={...t},s=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n,,,s]=t.split(":",5),o=parseInt(e,10),a=1e3*(isNaN(o)?60:o);if(n)for(const t of n.split(";"))"metric_bucket"===t&&s&&!s.split(";").includes("custom")||(i[t]=r+a);else i.all=r+a}else o?i.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}(o,r):429===e&&(i.all=r+6e4);return i}function cr(t,e,n=sr(t.bufferSize||64)){let r={};return{send:function(i){const s=[];if(Je(i,(e,n)=>{const i=Qe(n);or(r,i)?t.recordDroppedEvent("ratelimit_backoff",i):s.push(e)}),0===s.length)return kn({});const o=He(i[0],s),a=e=>{Je(o,(n,r)=>{t.recordDroppedEvent(e,Qe(r))})};return n.add(()=>e({body:Ge(o)}).then(t=>(r=ar(r,t),t),t=>{throw a("network_error"),t})).then(t=>t,t=>{if(t===ir)return a("queue_overflow"),kn({});throw t})},flush:t=>n.drain(t)}}function ur(t,e){const n=e?.getDsn(),r=e?.getOptions().tunnel;return function(t,e){return!!e&&t.includes(e.host)}(t,n)||function(t,e){if(!e)return!1;return lr(t)===lr(e)}(t,r)}function lr(t){return"/"===t[t.length-1]?t.slice(0,-1):t}function fr(t){void 0===t.user?.ip_address&&(t.user={...t.user,ip_address:"{{auto}}"})}function hr(t){"aggregates"in t?void 0===t.attrs?.ip_address&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):void 0===t.ipAddress&&(t.ipAddress="{{auto}}")}function dr(t={}){const e=t.client||Ft();if(!Fn()||!e)return{};const n=Ot(r());if(n.getTraceData)return n.getTraceData(t);const i=t.scope||At(),s=t.span||Te(),o=s?he(s):function(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return ce(e,r,n)}(i),a=re(s?je(s):Ne(e,i));return oe.test(o)?{"sentry-trace":o,baggage:a}:(l.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const pr=100;function mr(t,e){const n=Ft(),r=$t();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=pr}=n.getOptions();if(s<=0)return;const o={timestamp:ht(),...t},a=i?c(()=>i(o,e)):o;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,e),r.addBreadcrumb(a,s))}let yr;const gr=new WeakMap,vr=()=>({name:"FunctionToString",setupOnce(){yr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=nt(this),n=gr.has(Ft())&&void 0!==e?e:this;return yr.apply(n,t)}}catch{}},setup(t){gr.set(t,!0)}}),br=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],kr=(t={})=>{let e;return{name:"EventFilters",setup(n){const r=n.getOptions();e=Sr(t,r)},processEvent(n,r,i){if(!e){const n=i.getOptions();e=Sr(t,n)}return function(t,e){if(t.type){if("transaction"===t.type&&function(t,e){if(!e?.length)return!1;const n=t.transaction;return!!n&&Q(n,e)}(t,e.ignoreTransactions))return!0}else{if(function(t,e){if(!e?.length)return!1;return function(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}(t).some(t=>Q(t,e))}(t,e.ignoreErrors))return!0;if(function(t){if(!t.exception?.values?.length)return!1;return!t.message&&!t.exception.values.some(t=>t.stacktrace||t.type&&"Error"!==t.type||t.value)}(t))return!0;if(function(t,e){if(!e?.length)return!1;const n=_r(t);return!!n&&Q(n,e)}(t,e.denyUrls))return!0;if(!function(t,e){if(!e?.length)return!0;const n=_r(t);return!n||Q(n,e)}(t,e.allowUrls))return!0}return!1}(n,e)?null:n}}},wr=(t={})=>({...kr(t),name:"InboundFilters"});function Sr(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:br],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function _r(t){try{const e=[...t.exception?.values??[]].reverse().find(t=>void 0===t.mechanism?.parent_id&&t.stacktrace?.frames?.length),n=e?.stacktrace?.frames;return n?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return null}}function Tr(t,e,n,r,i,s){if(!i.exception?.values||!s||!U(s.originalException,Error))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=Ir(t,e,r,s.originalException,n,i.exception.values,o,0))}function Ir(t,e,n,r,i,s,o,a){if(s.length>=n+1)return s;let c=[...s];if(U(r[i],Error)){xr(o,a);const s=t(e,r[i]),u=c.length;Er(s,i,u,a),c=Ir(t,e,n,r[i],i,[s,...c],s,u)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(U(r,Error)){xr(o,a);const u=t(e,r),l=c.length;Er(u,`errors[${s}]`,l,a),c=Ir(t,e,n,r,i,[u,...c],u,l)}}),c}function xr(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,..."AggregateError"===t.type&&{is_exception_group:!0},exception_id:e}}function Er(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Cr(){"console"in e&&o.forEach(function(t){t in e.console&&Z(e.console,t,function(n){return a[t]=n,function(...n){_("console",{args:n,level:t});const r=a[t];r?.apply(e.console,n)}})})}function Rr(t){return"warn"===t?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const Mr=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Ar(t,e))return!1;if(!Or(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=$r(e),r=$r(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Ar(t,e))return!1;if(!Or(t,e))return!1;return!0}(t,e))return!0;return!1}(e,t))return null}catch{}return t=e}}};function Or(t,e){let n=v(t),r=v(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus({code:2,message:"internal_error"});t.end()}(n,t),delete r[e]))}const c=!!Te(),u=a&&c?ln(function(t,e,n){const r=Dr(t);return{name:r?`${e} ${Fr(r)}`:e,attributes:Br(t,r,e,n)}}(o,s,i)):new Be;if(t.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(t.fetchData.url)){const e=t.args[0],n=t.args[1]||{},r=function(t,e,n){const r=dr({span:n}),i=r["sentry-trace"],s=r.baggage;if(!i)return;const o=e.headers||(q(t)?t.headers:void 0);if(o){if(function(t){return"undefined"!=typeof Headers&&U(t,Headers)}(o)){const t=new Headers(o);if(t.get("sentry-trace")||t.set("sentry-trace",i),s){const e=t.get("baggage");e?jr(e)||t.set("baggage",`${e},${s}`):t.set("baggage",s)}return t}if(Array.isArray(o)){const t=[...o];o.find(t=>"sentry-trace"===t[0])||t.push(["sentry-trace",i]);const e=o.find(t=>"baggage"===t[0]&&jr(t[1]));return s&&!e&&t.push(["baggage",s]),t}{const t="sentry-trace"in o?o["sentry-trace"]:void 0,e="baggage"in o?o.baggage:void 0,n=e?Array.isArray(e)?[...e]:[e]:[],r=e&&(Array.isArray(e)?e.find(t=>jr(t)):jr(e));return s&&!r&&n.push(s),{...o,"sentry-trace":t??i,baggage:n.length>0?n.join(","):void 0}}}return{...r}}(e,n,Ce()&&c?u:void 0);r&&(t.args[1]=n,n.headers=r)}const l=Ft();if(l){const e={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};l.emit("beforeOutgoingRequestSpan",u,e)}return u}function jr(t){return t.split(",").some(t=>t.trim().startsWith(te))}function Br(t,e,n,r){const i={url:t,type:"fetch","http.method":n,[zt]:r,[Ut]:"http.client"};return e&&(Lr(e)||(i["http.url"]=e.href,i["server.address"]=e.host),e.search&&(i["http.query"]=e.search),e.hash&&(i["http.fragment"]=e.hash)),i}function Ur(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const zr=e;function qr(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Hr(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in zr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(qr(zr.fetch))return!0;let t=!1;const e=zr.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=qr(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){}return t}function Wr(t,e){const n="fetch";w(n,t),S(n,()=>Jr(void 0,e))}function Jr(t,n=!1){n&&!Hr()||Z(e,"fetch",function(n){return function(...r){const i=new Error,{method:s,url:o}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:Xr(e),method:Gr(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:Xr(e),method:Gr(e,"method")?String(e.method).toUpperCase():"GET"}}(r),a={args:r,fetchData:{method:s,url:o},startTimestamp:1e3*mt(),virtualError:i,headers:Yr(r)};return t||_("fetch",{...a}),n.apply(e,r).then(async e=>(t?t(e):_("fetch",{...a,endTimestamp:1e3*mt(),response:e}),e),t=>{if(_("fetch",{...a,endTimestamp:1e3*mt(),error:t}),O(t)&&void 0===t.stack&&(t.stack=i.stack,tt(t,"framesToPop",1)),t instanceof TypeError&&("Failed to fetch"===t.message||"Load failed"===t.message||"NetworkError when attempting to fetch resource."===t.message))try{const e=new URL(a.fetchData.url);t.message=`${t.message} (${e.host})`}catch{}throw t})}})}function Kr(t){let e;try{e=t.clone()}catch{return}!async function(t,e){if(t?.body){const n=t.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let t;try{t=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:i}=await r.read();clearTimeout(t),i&&(e(),s=!1)}catch{s=!1}finally{clearTimeout(t)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}(e,()=>{_("fetch-body-resolved",{endTimestamp:1e3*mt(),response:t})})}function Gr(t,e){return!!t&&"object"==typeof t&&!!t[e]}function Xr(t){return"string"==typeof t?t:t?Gr(t,"url")?t.url:t.toString?t.toString():"":""}function Yr(t){const[e,n]=t;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(q(e))return new Headers(e.headers)}catch{}}function Vr(){return"undefined"!=typeof window&&!0}const Qr=()=>{},Zr=["attachTo","createForm","createWidget","remove"],ti=Object.assign(t=>(c(()=>{console.warn("You are using feedbackIntegration() even though this bundle does not include feedback.")}),{name:"Feedback",...Zr.reduce((t,e)=>(t[e]=Qr,t),{})}),{_isShim:!0}),ei=e;let ni=0;function ri(){return ni>0}function ii(t,e={}){if(!function(t){return"function"==typeof t}(t))return t;try{const e=t.__sentry_wrapped__;if(e)return"function"==typeof e?e:t;if(nt(t))return t}catch{return t}const sentryWrapped=function(...n){try{const r=n.map(t=>ii(t,e));return t.apply(this,r)}catch(t){throw ni++,setTimeout(()=>{ni--}),Dt(r=>{r.addEventProcessor(t=>(e.mechanism&&(ut(t,void 0),lt(t,e.mechanism)),t.extra={...t.extra,arguments:n},t)),captureException(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch{}et(sentryWrapped,t),tt(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch{}return sentryWrapped}function si(){const t=K(),{referrer:e}=ei.document||{},{userAgent:n}=ei.navigator||{};return{url:t,headers:{...e&&{Referer:e},...n&&{"User-Agent":n}}}}function oi(t,e){const n=ui(t,e),r={type:hi(e),value:di(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ai(t,e,n,r){const i=Ft(),s=i?.getOptions().normalizeDepth,o=function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}return}(e),a={__serialized__:ze(e,s)};if(o)return{exception:{values:[oi(t,o)]},extra:a};const c={exception:{values:[{type:j(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:vi(e,{isUnhandledRejection:r})}]},extra:a};if(n){const e=ui(t,n);e.length&&(c.exception.values[0].stacktrace={frames:e})}return c}function ci(t,e){return{exception:{values:[oi(t,e)]}}}function ui(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t&&li.test(t.message))return 1;return 0}(e),i=function(t){if("number"==typeof t.framesToPop)return t.framesToPop;return 0}(e);try{return t(n,r,i)}catch{}return[]}const li=/Minified React error #\d+;/i;function fi(t){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&t instanceof WebAssembly.Exception}function hi(t){const e=t?.name;if(!e&&fi(t)){return t.message&&Array.isArray(t.message)&&2==t.message.length?t.message[0]:"WebAssembly.Exception"}return e}function di(t){const e=t?.message;return fi(t)?Array.isArray(t.message)&&2==t.message.length?t.message[1]:"wasm exception":e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function pi(t,e,n,r){const i=yi(t,e,n?.syntheticException||void 0,r);return lt(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),kn(i)}function mi(t,e,n="info",r,i){const s=gi(t,e,r?.syntheticException||void 0,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),kn(s)}function yi(t,e,n,r,i){let s;if($(e)&&e.error){return ci(t,e.error)}if(L(e)||A(e,"DOMException")){const i=e;if("stack"in e)s=ci(t,e);else{const e=i.name||(L(i)?"DOMError":"DOMException"),o=i.message?`${e}: ${i.message}`:e;s=gi(t,o,n,r),ut(s,o)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}if(O(e))return ci(t,e);if(N(e)||j(e)){return s=ai(t,e,n,i),lt(s,{synthetic:!0}),s}return s=gi(t,e,n,r),ut(s,`${e}`),lt(s,{synthetic:!0}),s}function gi(t,e,n,r){const i={};if(r&&n){const r=ui(t,n);r.length&&(i.exception={values:[{value:e,stacktrace:{frames:r}}]}),lt(i,{synthetic:!0})}if(F(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return i.logentry={message:t,params:n},i}return i.message=e,i}function vi(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(rt(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return X(r,e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:X(r,e)}return""}(t),r=e?"promise rejection":"exception";if($(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(j(t)){return`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class bi extends Qn{constructor(t){const e=(r=t,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:ei.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;!function(t,e,r=[e],i="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:r.map(t=>({name:`${i}:@sentry/${t}`,version:n})),version:n}),t._metadata=s}(e,"browser",["browser"],ei.SENTRY_SDK_SOURCE||"cdn"),super(e);const{sendDefaultPii:i,sendClientReports:s,enableLogs:o,_experiments:a}=this.st,c=o??a?.enableLogs;ei.document&&(s||c)&&ei.document.addEventListener("visibilitychange",()=>{"hidden"===ei.document.visibilityState&&(s&&this._t(),c&&er(this))}),c&&(this.on("flush",()=>{er(this)}),this.on("afterCaptureLog",()=>{this.Tt&&clearTimeout(this.Tt),this.Tt=setTimeout(()=>{er(this)},5e3)})),i&&(this.on("postprocessEvent",fr),this.on("beforeSendSession",hr))}eventFromException(t,e){return pi(this.st.stackParser,t,e,this.st.attachStacktrace)}eventFromMessage(t,e="info",n){return mi(this.st.stackParser,t,e,n,this.st.attachStacktrace)}kt(t,e,n,r){return t.platform=t.platform||"javascript",super.kt(t,e,n,r)}}const ki=e,wi=(t,e,n,r)=>{let i,s;return o=>{e.value>=0&&(o||r)&&(s=e.value-(i??0),(s||void 0===i)&&(i=e.value,e.delta=s,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},Si=(t=!0)=>{const e=ki.performance?.getEntriesByType?.("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart{const t=Si();return t?.activationStart??0},Ti=(t,e=-1)=>{const n=Si();let r="navigate";n&&(ki.document?.prerendering||_i()>0?r="prerender":ki.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Ii=new WeakMap;function xi(t,e){return Ii.get(t)||Ii.set(t,new e),Ii.get(t)}class Ei{constructor(){Ei.prototype.__init.call(this),Ei.prototype.__init2.call(this)}__init(){this.It=0}__init2(){this.xt=[]}Et(t){if(t.hadRecentInput)return;const e=this.xt[0],n=this.xt[this.xt.length-1];this.It&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(this.It+=t.value,this.xt.push(t)):(this.It=t.value,this.xt=[t]),this.Ct?.(t)}}const Ci=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},Ri=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let Mi=-1;const Oi=t=>{"hidden"===ki.document.visibilityState&&Mi>-1&&(Mi="visibilitychange"===t.type?t.timeStamp:0,Ai())},Ai=()=>{removeEventListener("visibilitychange",Oi,!0),removeEventListener("prerenderingchange",Oi,!0)},$i=()=>{if(ki.document&&Mi<0){const t=_i(),e=ki.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;Mi=e??("hidden"!==ki.document?.visibilityState||ki.document?.prerendering?1/0:0),addEventListener("visibilitychange",Oi,!0),addEventListener("prerenderingchange",Oi,!0)}return{get firstHiddenTime(){return Mi}}},Li=t=>{ki.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},Di=[1800,3e3],Fi=[.1,.25],Pi=(t,e={})=>{((t,e={})=>{Li(()=>{const n=$i(),r=Ti("FCP");let i;const s=Ci("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(s.disconnect(),e.startTime{const n=Ti("CLS",0);let r;const i=xi(e,Ei),s=t=>{for(const e of t)i.Et(e);i.It>n.value&&(n.value=i.It,n.entries=i.xt,r())},o=Ci("layout-shift",s);o&&(r=wi(t,n,Fi,e.reportAllChanges),ki.document?.addEventListener("visibilitychange",()=>{"hidden"===ki.document?.visibilityState&&(s(o.takeRecords()),r(!0))}),ki?.setTimeout?.(r))}))},Ni=t=>{const e=e=>{"pagehide"!==e.type&&"hidden"!==ki.document?.visibilityState||t(e)};ki.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},ji=[100,300];let Bi=0,Ui=1/0,zi=0;const qi=t=>{t.forEach(t=>{t.interactionId&&(Ui=Math.min(Ui,t.interactionId),zi=Math.max(zi,t.interactionId),Bi=zi?(zi-Ui)/7+1:0)})};let Hi;const Wi=()=>Hi?Bi:performance.interactionCount||0,Ji=()=>{"interactionCount"in performance||Hi||(Hi=Ci("event",qi,{type:"event",buffered:!0,durationThreshold:0}))};let Ki=0;class Gi{constructor(){Gi.prototype.__init.call(this),Gi.prototype.__init2.call(this)}__init(){this.Rt=[]}__init2(){this.Mt=new Map}Ot(){Ki=Wi(),this.Rt.length=0,this.Mt.clear()}At(){const t=Math.min(this.Rt.length-1,Math.floor((Wi()-Ki)/50));return this.Rt[t]}Et(t){if(this.$t?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.Rt.at(-1);let n=this.Mt.get(t.interactionId);if(n||this.Rt.length<10||t.duration>e.Lt){if(n?t.duration>n.Lt?(n.entries=[t],n.Lt=t.duration):t.duration===n.Lt&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],Lt:t.duration},this.Mt.set(n.id,n),this.Rt.push(n)),this.Rt.sort((t,e)=>e.Lt-t.Lt),this.Rt.length>10){const t=this.Rt.splice(10);for(const e of t)this.Mt.delete(e.id)}this.Dt?.(n)}}}const Xi=t=>{const e=ki.requestIdleCallback||ki.setTimeout;"hidden"===ki.document?.visibilityState?t():(e(t=Ri(t)),Ni(t))},Yi=[200,500];class Vi{Et(t){this.$t?.(t)}}const Qi=[2500,4e3],Zi=[800,1800],ts=t=>{ki.document?.prerendering?Li(()=>ts(t)):"complete"!==ki.document?.readyState?addEventListener("load",()=>ts(t),!0):setTimeout(t)},es={},ns={};let rs,is,ss,os,as;function cs(t,e=!1){return bs("cls",t,ps,rs,e)}function us(t,e=!1){return bs("lcp",t,ys,ss,e)}function ls(t){return bs("fid",t,ms,is)}function fs(t){return bs("inp",t,vs,as)}function hs(t,e){return ks(t,e),ns[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);Ci(t,e=>{ds(t,{entries:e})},e)}(t),ns[t]=!0),ws(t,e)}function ds(t,e){const n=es[t];if(n?.length)for(const t of n)try{t(e)}catch(t){}}function ps(){return Pi(t=>{ds("cls",{metric:t}),rs=t},{reportAllChanges:!0})}function ms(){return((t,e={})=>{Li(()=>{const n=$i(),r=Ti("FID");let i;const s=t=>{t.startTime{t.forEach(s)},a=Ci("first-input",o);i=wi(t,r,ji,e.reportAllChanges),a&&Ni(Ri(()=>{o(a.takeRecords()),a.disconnect()}))})})(t=>{ds("fid",{metric:t}),is=t})}function ys(){return((t,e={})=>{Li(()=>{const n=$i(),r=Ti("LCP");let i;const s=xi(e,Vi),o=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)s.Et(e),e.startTime{o(a.takeRecords()),a.disconnect(),i(!0)});for(const t of["keydown","click","visibilitychange"])ki.document&&addEventListener(t,()=>Xi(n),{capture:!0,once:!0})}})})(t=>{ds("lcp",{metric:t}),ss=t},{reportAllChanges:!0})}function gs(){return((t,e={})=>{const n=Ti("TTFB"),r=wi(t,n,Zi,e.reportAllChanges);ts(()=>{const t=Si();t&&(n.value=Math.max(t.responseStart-_i(),0),n.entries=[t],r(!0))})})(t=>{ds("ttfb",{metric:t}),os=t})}function vs(){return((t,e={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Li(()=>{Ji();const n=Ti("INP");let r;const i=xi(e,Gi),s=t=>{Xi(()=>{for(const e of t)i.Et(e);const e=i.At();e&&e.Lt!==n.value&&(n.value=e.Lt,n.entries=e.entries,r())})},o=Ci("event",s,{durationThreshold:e.durationThreshold??40});r=wi(t,n,Yi,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),Ni(()=>{s(o.takeRecords()),r(!0)}))})})(t=>{ds("inp",{metric:t}),as=t})}function bs(t,e,n,r,i=!1){let s;return ks(t,e),ns[t]||(s=n(),ns[t]=!0),r&&e({metric:r}),ws(t,e,i?s:void 0)}function ks(t,e){es[t]=es[t]||[],es[t].push(e)}function ws(t,e,n){return()=>{n&&n();const r=es[t];if(!r)return;const i=r.indexOf(e);-1!==i&&r.splice(i,1)}}function Ss(t){return"number"==typeof t&&isFinite(t)}function _s(t,e,n,{...r}){const i=ye(t).start_timestamp;return i&&i>e&&"function"==typeof t.updateStartTime&&t.updateStartTime(e),fn(t,()=>{const t=ln({startTime:e,...r});return t&&t.end(n),t})}function Ts(t){const e=Ft();if(!e)return;const{name:n,transaction:r,attributes:i,startTime:s}=t,{release:o,environment:a,sendDefaultPii:c}=e.getOptions(),u=e.getIntegrationByName("Replay"),l=u?.getReplayId(),f=At(),h=f.getUser(),d=void 0!==h?h.email||h.id||h.ip_address:void 0;let p;try{p=f.getScopeData().contexts.profile.profile_id}catch{}return ln({name:n,attributes:{release:o,environment:a,user:d||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":ki.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...i},startTime:s,experimental:{standalone:!0}})}function Is(){return ki.addEventListener&&ki.performance}function xs(t){return t/1e3}function Es(t){let e="unknown",n="unknown",r="";for(const i of t){if("/"===i){[e,n]=t.split("/");break}if(!isNaN(Number(i))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=i}return r===t&&(e=r),{name:e,version:n}}function Cs(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function Rs(t,e){let n,r=!1;function i(t){!r&&n&&e(t,n),r=!0}Ni(()=>{i("pagehide")});const s=t.on("beforeStartNavigationSpan",(t,e)=>{e?.isRedirect||(i("navigation"),s?.(),o?.())}),o=t.on("afterStartPageLoadSpan",t=>{n=t.spanContext().spanId,o?.()})}function Ms(t){let e,n=0;if(!Cs("layout-shift"))return;const r=cs(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);Rs(t,(t,i)=>{!function(t,e,n,r){const i=xs((yt()||0)+(e?.startTime||0)),s=At().getScopeData().transactionName,o=e?W(e.sources[0]?.node):"Layout shift",a={[zt]:"auto.http.browser.cls",[Ut]:"ui.webvital.cls",[Gt]:e?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};e?.sources&&e.sources.forEach((t,e)=>{a[`cls.source.${e+1}`]=W(t.node)});const c=Ts({name:o,transaction:s,attributes:a,startTime:i});c&&(c.addEvent("cls",{[Ht]:"",[Wt]:t}),c.end(i))}(n,e,i,t),r()})}function Os(t){let e,n=0;if(!Cs("largest-contentful-paint"))return;const r=us(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);Rs(t,(t,i)=>{!function(t,e,n,r){const i=xs((yt()||0)+(e?.startTime||0)),s=At().getScopeData().transactionName,o=e?W(e.element):"Largest contentful paint",a={[zt]:"auto.http.browser.lcp",[Ut]:"ui.webvital.lcp",[Gt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e&&(e.element&&(a["lcp.element"]=W(e.element)),e.id&&(a["lcp.id"]=e.id),e.url&&(a["lcp.url"]=e.url.trim().slice(0,200)),null!=e.loadTime&&(a["lcp.loadTime"]=e.loadTime),null!=e.renderTime&&(a["lcp.renderTime"]=e.renderTime),null!=e.size&&(a["lcp.size"]=e.size));const c=Ts({name:o,transaction:s,attributes:a,startTime:i});c&&(c.addEvent("lcp",{[Ht]:"millisecond",[Wt]:t}),c.end(i))}(n,e,i,t),r()})}let As,$s,Ls=0,Ds={};function Fs({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){const r=Is();if(r&&yt()){r.mark&&ki.performance.mark("sentry-tracing-init");const i=ls(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=xs(yt()),r=xs(e.startTime);Ds.fid={value:t.value,unit:"millisecond"},Ds["mark.fid"]={value:n+r,unit:"second"}}),s=e?Os(n):us(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Ds.lcp={value:t.value,unit:"millisecond"},As=e)},!0),o=bs("ttfb",({metric:t})=>{t.entries[t.entries.length-1]&&(Ds.ttfb={value:t.value,unit:"millisecond"})},gs,os),a=t?Ms(n):cs(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Ds.cls={value:t.value,unit:""},$s=e)},!0);return()=>{i(),s?.(),o(),a?.()}}return()=>{}}function Ps(t,e){const n=Is(),r=yt();if(!n?.getEntries||!r)return;const i=xs(r),s=n.getEntries(),{op:o,start_timestamp:a}=ye(t);if(s.slice(Ls).forEach(n=>{const r=xs(n.startTime),s=xs(Math.max(0,n.duration));if(!("navigation"===o&&a&&i+r{Ns(t,e,r,n)}),Ns(t,e,"secureConnection",n,"TLS/SSL"),Ns(t,e,"fetch",n,"cache"),Ns(t,e,"domainLookup",n,"DNS"),function(t,e,n){const r=n+xs(e.requestStart),i=n+xs(e.responseEnd),s=n+xs(e.responseStart);e.responseEnd&&(_s(t,r,i,{op:"browser.request",name:e.name,attributes:{[zt]:"auto.ui.browser.metrics"}}),_s(t,s,i,{op:"browser.response",name:e.name,attributes:{[zt]:"auto.ui.browser.metrics"}}))}(t,e,n)}(t,n,i);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,i,s){if(["mark","measure"].includes(e.entryType)&&Q(e.name,s))return;const o=Si(!1),a=xs(o?o.requestStart:0),c=i+Math.max(n,a),u=i+n,l=u+r,f={[zt]:"auto.resource.browser.metrics"};c!==u&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=c);(function(t,e){try{const n=e.detail;if(!n)return;if("object"==typeof n){for(const[e,r]of Object.entries(n))if(r&&P(r))t[`sentry.browser.measure.detail.${e}`]=r;else if(void 0!==r)try{t[`sentry.browser.measure.detail.${e}`]=JSON.stringify(r)}catch{}return}if(P(n))return void(t["sentry.browser.measure.detail"]=n);try{t["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}})(f,e),c<=l&&_s(t,c,l,{name:e.name,op:e.entryType,attributes:f})}(t,n,r,s,i,e.ignorePerformanceApiSpans);const o=$i(),a=n.startTime{en(t,e.value,e.unit)}),t.setAttribute("performance.timeOrigin",i),t.setAttribute("performance.activationStart",_i()),function(t,e){As&&e.recordLcpOnPageloadSpan&&(As.element&&t.setAttribute("lcp.element",W(As.element)),As.id&&t.setAttribute("lcp.id",As.id),As.url&&t.setAttribute("lcp.url",As.url.trim().slice(0,200)),null!=As.loadTime&&t.setAttribute("lcp.loadTime",As.loadTime),null!=As.renderTime&&t.setAttribute("lcp.renderTime",As.renderTime),t.setAttribute("lcp.size",As.size));$s?.sources&&e.recordClsOnPageloadSpan&&$s.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,W(e.node)))}(t,e)}As=void 0,$s=void 0,Ds={}}function Ns(t,e,n,r,i=n){const s=function(t){if("secureConnection"===t)return"connectEnd";if("fetch"===t)return"domainLookupStart";return`${t}End`}(n),o=e[s],a=e[`${n}Start`];a&&o&&_s(t,r+xs(a),r+xs(o),{op:`browser.${i}`,name:e.name,attributes:{[zt]:"auto.ui.browser.metrics",..."redirect"===n&&null!=e.redirectCount?{"http.redirect_count":e.redirectCount}:{}}})}function js(t,e,n,r){const i=e[n];null!=i&&i<2147483647&&(t[r]=i)}const Bs=({entries:t})=>{const e=Te(),n=e?_e(e):void 0,r=n?ye(n).description:At().getScopeData().transactionName;t.forEach(t=>{const e=t;if(!e.identifier)return;const n=e.name,i=e.renderTime,s=e.loadTime,[o,a]=s?[xs(s),"load-time"]:i?[xs(i),"render-time"]:[mt(),"entry-emission"],c="image-paint"===n?xs(Math.max(0,(i??0)-(s??0))):0,u={[zt]:"auto.ui.browser.elementtiming",[Ut]:"ui.elementtiming",[Nt]:"component","sentry.span_start_time_source":a,"sentry.transaction_name":r,"element.id":e.id,"element.type":e.element?.tagName?.toLowerCase()||"unknown","element.size":e.naturalWidth&&e.naturalHeight?`${e.naturalWidth}x${e.naturalHeight}`:void 0,"element.render_time":i,"element.load_time":s,"element.url":e.url||void 0,"element.identifier":e.identifier,"element.paint_type":n};un({name:`element[${e.identifier}]`,attributes:u,startTime:o,onlyIfParent:!0},t=>{t.end(o+c)})})};let Us,zs,qs,Hs;function Ws(t){w("dom",t),S("dom",Js)}function Js(){if(!ki.document)return;const t=_.bind(null,"dom"),e=Ks(t,!0);ki.document.addEventListener("click",e,!1),ki.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=ki,r=n[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Z(r,"addEventListener",function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=Ks(t);s.handler=r,e.call(this,n,r,i)}s.refCount++}catch{}return e.call(this,n,r,i)}}),Z(r,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[e];i&&(i.refCount--,i.refCount<=0&&(t.call(this,e,i.handler,r),i.handler=void 0,delete n[e]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return t.call(this,e,n,r)}}))})}function Ks(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(t){try{return t.target}catch{return null}}(n);if(function(t,e){return"keypress"===t&&(!e?.tagName||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}(n.type,r))return;tt(n,"_sentryCaptured",!0),r&&!r._sentryId&&tt(r,"_sentryId",ot());const i="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==zs)return!1;try{if(!t.target||t.target._sentryId!==qs)return!1}catch{}return!0}(n)){t({event:n,name:i,global:e}),zs=n.type,qs=r?r._sentryId:void 0}clearTimeout(Us),Us=ki.setTimeout(()=>{qs=void 0,zs=void 0},1e3)}}function Gs(t){const e="history";w(e,t),S(e,Xs)}function Xs(){function t(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const r=Hs,i=function(t){try{return new URL(t,ki.location.origin).toString()}catch{return t}}(String(n));if(Hs=i,r===i)return t.apply(this,e);_("history",{from:r,to:i})}return t.apply(this,e)}}ki.addEventListener("popstate",()=>{const t=ki.location.href,e=Hs;if(Hs=t,e===t)return;_("history",{from:e,to:t})}),"history"in zr&&zr.history&&(Z(ki.history,"pushState",t),Z(ki.history,"replaceState",t))}const Ys={};function Vs(t){const e=Ys[t];if(e)return e;let n=ki[t];if(qr(n))return Ys[t]=n.bind(ki);const r=ki.document;if(r&&"function"==typeof r.createElement)try{const e=r.createElement("iframe");e.hidden=!0,r.head.appendChild(e);const i=e.contentWindow;i?.[t]&&(n=i[t]),r.head.removeChild(e)}catch(t){}return n?Ys[t]=n.bind(ki):n}function Qs(t){Ys[t]=void 0}function Zs(...t){return Vs("setTimeout")(...t)}const to="__sentry_xhr_v3__";function eo(t){w("xhr",t),S("xhr",no)}function no(){if(!ki.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,e,n){const r=new Error,i=1e3*mt(),s=D(n[0])?n[0].toUpperCase():void 0,o=function(t){if(D(t))return t;try{return t.toString()}catch{}return}(n[1]);if(!s||!o)return t.apply(e,n);e[to]={method:s,url:o,request_headers:{}},"POST"===s&&o.match(/sentry_key/)&&(e.__sentry_own_request__=!0);const a=()=>{const t=e[to];if(t&&4===e.readyState){try{t.status_code=e.status}catch{}_("xhr",{endTimestamp:1e3*mt(),startTimestamp:i,xhr:e,virtualError:r})}};return"onreadystatechange"in e&&"function"==typeof e.onreadystatechange?e.onreadystatechange=new Proxy(e.onreadystatechange,{apply:(t,e,n)=>(a(),t.apply(e,n))}):e.addEventListener("readystatechange",a),e.setRequestHeader=new Proxy(e.setRequestHeader,{apply(t,e,n){const[r,i]=n,s=e[to];return s&&D(r)&&D(i)&&(s.request_headers[r.toLowerCase()]=i),t.apply(e,n)}}),t.apply(e,n)}}),t.send=new Proxy(t.send,{apply(t,e,n){const r=e[to];if(!r)return t.apply(e,n);void 0!==n[0]&&(r.body=n[0]);return _("xhr",{startTimestamp:1e3*mt(),xhr:e}),t.apply(e,n)}})}function ro(t){return new URLSearchParams(t).toString()}function io(t,e=l){try{if("string"==typeof t)return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[ro(t)];if(!t)return[void 0]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}function so(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}const oo=[],ao=new Map;function co(){if(Is()&&yt()){const t=fs(lo);return()=>{t()}}return()=>{}}const uo={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"};const lo=({metric:t})=>{if(null==t.value)return;const e=xs(t.value);if(e>60)return;const n=t.entries.find(e=>e.duration===t.value&&uo[e.name]);if(!n)return;const{interactionId:r}=n,i=uo[n.name],s=xs(yt()+n.startTime),o=Te(),a=o?_e(o):void 0,c=(null!=r?ao.get(r):void 0)||a,u=c?ye(c).description:At().getScopeData().transactionName,l=Ts({name:W(n.target),transaction:u,attributes:{[zt]:"auto.http.browser.inp",[Ut]:`ui.interaction.${i}`,[Gt]:n.duration},startTime:s});l&&(l.addEvent("inp",{[Ht]:"millisecond",[Wt]:t.value}),l.end(s+e))};function fo(t,e=Vs("fetch")){let n=0,r=0;return cr(t,function(i){const s=i.body.length;n+=s,r++;const o={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return Qs("fetch"),wn("No fetch implementation available");try{return e(t.url,o).then(t=>(n-=s,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(t){return Qs("fetch"),n-=s,r--,wn(t)}})}function ho(t,e,n,r){const i={filename:t,function:""===e?f:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const po=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,mo=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,yo=/\((\S*)(?::(\d+))(?::(\d+))\)/,go=[30,t=>{const e=po.exec(t);if(e){const[,t,n,r]=e;return ho(t,f,+n,+r)}const n=mo.exec(t);if(n){if(n[2]&&0===n[2].indexOf("eval")){const t=yo.exec(n[2]);t&&(n[2]=t[1],n[3]=t[2],n[4]=t[3])}const[t,e]=Ro(n[1]||f,n[2]);return ho(e,t,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],vo=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,bo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ko=[50,t=>{const e=vo.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=bo.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||f;return[n,t]=Ro(n,t),ho(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],wo=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,So=[40,t=>{const e=wo.exec(t);return e?ho(e[2],e[1]||f,+e[3],e[4]?+e[4]:void 0):void 0}],_o=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,To=[10,t=>{const e=_o.exec(t);return e?ho(e[2],e[3]||f,+e[1]):void 0}],Io=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,xo=[20,t=>{const e=Io.exec(t);return e?ho(e[5],e[3]||e[4]||f,+e[1],+e[2]):void 0}],Eo=[go,ko],Co=p(...Eo),Ro=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:f,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};const Mo=1024,Oo=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(t){e.console&&function(t){const e="console";w(e,t),S(e,Cr)}(function(t){return function(e){if(Ft()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:Rr(e.level),message:Y(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${Y(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}mr(n,{input:e.args,level:e.level})}}(t)),e.dom&&Ws(function(t,e){return function(n){if(Ft()!==t)return;let r,i,s="object"==typeof e?e.serializeAttribute:void 0,o="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;o&&o>Mo&&(o=Mo),"string"==typeof s&&(s=[s]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;r=W(e,{keyAttrs:s,maxStringLength:o}),i=G(e)}catch{r=""}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),mr(a,{event:n.event,name:n.name,global:n.global})}}(t,e.dom)),e.xhr&&eo(function(t){return function(e){if(Ft()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,i=e.xhr[to];if(!n||!r||!i)return;const{method:s,url:o,status_code:a,body:c}=i,u={method:s,url:o,status_code:a},l={xhr:e.xhr,input:c,startTimestamp:n,endTimestamp:r},f={category:"xhr",data:u,type:"http",level:Ur(a)};t.emit("beforeOutgoingRequestBreadcrumb",f,l),mr(f,l)}}(t)),e.fetch&&Wr(function(t){return function(e){if(Ft()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const i=e.fetchData,s={data:e.error,input:e.args,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:i,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",o,s),mr(o,s)}else{const i=e.response,s={...e.fetchData,status_code:i?.status},o={input:e.args,response:i,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:Ur(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",a,o),mr(a,o)}}}(t)),e.history&&Gs(function(t){return function(e){if(Ft()!==t)return;let n=e.from,r=e.to;const i=Pr(ei.location.href);let s=n?Pr(n):void 0;const o=Pr(r);s?.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),mr({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on("beforeSendEvent",function(t){return function(e){Ft()===t&&mr({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:ct(e)},{event:e})}}(t))}}};const Ao=["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"],$o=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&Z(ei,"setTimeout",Lo),e.setInterval&&Z(ei,"setInterval",Lo),e.requestAnimationFrame&&Z(ei,"requestAnimationFrame",Do),e.XMLHttpRequest&&"XMLHttpRequest"in ei&&Z(XMLHttpRequest.prototype,"send",Fo);const t=e.eventTarget;if(t){(Array.isArray(t)?t:Ao).forEach(t=>function(t,e){const n=ei,r=n[t]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;Z(r,"addEventListener",function(n){return function(r,i,s){try{"function"==typeof i.handleEvent&&(i.handleEvent=ii(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:g(i),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&function(t,e,n){t&&"object"==typeof t&&"removeEventListener"in t&&"function"==typeof t.removeEventListener&&t.removeEventListener(e,n)}(this,r,i),n.apply(this,[r,ii(i,{mechanism:{data:{function:"addEventListener",handler:g(i),target:t},handled:!1,type:"instrument"}}),s])}}),Z(r,"removeEventListener",function(t){return function(e,n,r){try{const i=n.__sentry_wrapped__;i&&t.call(this,e,i,r)}catch{}return t.call(this,e,n,r)}})}(t,e))}}}};function Lo(t){return function(...e){const n=e[0];return e[0]=ii(n,{mechanism:{data:{function:g(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Do(t){return function(e){return t.apply(this,[ii(e,{mechanism:{data:{function:"requestAnimationFrame",handler:g(t)},handled:!1,type:"instrument"}})])}}function Fo(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&Z(n,t,function(e){const n={mechanism:{data:{function:t,handler:g(e)},handled:!1,type:"instrument"}},r=nt(e);return r&&(n.mechanism.data.handler=g(r)),ii(e,n)})}),t.apply(this,e)}}const Po=()=>({name:"BrowserSession",setupOnce(){void 0!==ei.document&&(Nn({ignoreDuration:!0}),Un(),Gs(({from:t,to:e})=>{void 0!==t&&t!==e&&(Nn({ignoreDuration:!0}),Un())}))}}),No=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&function(t){I(e=>{const{stackParser:n,attachStacktrace:r}=jo();if(Ft()!==t||ri())return;const{msg:i,url:s,line:o,column:a,error:c}=e,u=function(t,e,n,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=r,l=n,h=D(e)&&e.length>0?e:K();0===c.length&&c.push({colno:u,filename:h,function:f,in_app:!0,lineno:l});return t}(yi(n,c||i,void 0,r,!1),s,o,a);u.level="error",$n(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(t),e.onunhandledrejection&&function(t){C(e=>{const{stackParser:n,attachStacktrace:r}=jo();if(Ft()!==t||ri())return;const i=function(t){if(P(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}(e),s=P(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:yi(n,i,void 0,r,!0);s.level="error",$n(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(t)}}};function jo(){const t=Ft();return t?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Bo=()=>({name:"HttpContext",preprocessEvent(t){if(!ei.navigator&&!ei.location&&!ei.document)return;const e=si(),n={...e.headers,...t.request?.headers};t.request={...e,...t.request,headers:n}}}),Uo=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,i){Tr(oi,i.getOptions().stackParser,n,e,t,r)}}};function zo(){return!!function(){if(void 0===ei.window)return!1;const t=ei;if(t.nw)return!1;const e=t.chrome||t.browser;if(!e?.runtime?.id)return!1;const n=K(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(ei===ei.top&&r.some(t=>n.startsWith(`${t}://`)))}()}function qo(t){return[wr(),vr(),$o(),Oo(),No(),Uo(),Mr(),Bo(),Po()]}const Ho={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},Wo=ei;const Jo="sentry_previous_trace",Ko="sentry.previous_trace";function Go(t,{linkPreviousTrace:e,consistentTraceSampling:n}){const r="session-storage"===e;let i=r?function(){try{const t=ei.sessionStorage?.getItem(Jo);return JSON.parse(t)}catch{return}}():void 0;t.on("spanStart",t=>{if(_e(t)!==t)return;const e=At().getPropagationContext();i=function(t,e,n){const r=ye(e);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[jt])}catch{return 0}}const s={spanContext:e.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!t)return s;const o=t.spanContext;if(o.traceId===r.trace_id)return t;Date.now()/1e3-t.startTimestamp<=3600&&(e.addLink({context:o,attributes:{[Xt]:"previous_trace"}}),e.setAttribute(Ko,`${o.traceId}-${o.spanId}-${Xo(o)?1:0}`));return s}(i,t,e),r&&function(t){try{ei.sessionStorage.setItem(Jo,JSON.stringify(t))}catch(t){}}(i)});let s=!0;n&&t.on("beforeSampling",t=>{if(!i)return;const e=At(),n=e.getPropagationContext();s&&n.parentSpanId?s=!1:(e.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(Xo(i.spanContext))},sampleRand:i.sampleRand}),t.parentSampled=Xo(i.spanContext),t.parentSampleRate=i.sampleRate,t.spanAttributes={...t.spanAttributes,[Bt]:i.sampleRate})})}function Xo(t){return 1===t.traceFlags}function Yo(t=0){return((yt()||performance.timeOrigin)+t)/1e3}const Vo=new WeakMap,Qo=new Map,Zo={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function ta(t,e){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:c}={...Zo,...e},u="function"==typeof s?s:t=>!0,l=t=>function(t,e){const n=K();if(n){let r,i;try{r=new URL(t,n),i=new URL(n).origin}catch{return!1}const s=r.origin===i;return e?Q(r.toString(),e)||s&&Q(r.pathname,e):s}{const n=!!t.match(/^\/(?!\/)/);return e?Q(t,e):n}}(t,a),f={};n&&(t.addEventProcessor(t=>("transaction"===t.type&&t.spans&&t.spans.forEach(t=>{if("http.client"===t.op){const e=Qo.get(t.span_id);e&&(t.timestamp=e/1e3,Qo.delete(t.span_id))}}),t)),i&&function(t){const e="fetch-body-resolved";w(e,t),S(e,()=>Jr(Kr))}(t=>{if(t.response){const e=Vo.get(t.response);e&&t.endTimestamp&&Qo.set(e,t.endTimestamp)}}),Wr(t=>{const e=Nr(t,u,l,f);if(t.response&&t.fetchData.__span&&Vo.set(t.response,t.fetchData.__span),e){const n=na(t.fetchData.url),r=n?Pr(n).host:void 0;e.setAttributes({"http.url":n,"server.address":r}),o&&ea(e),c?.(e,{headers:t.headers})}})),r&&eo(t=>{const e=function(t,e,n,r){const i=t.xhr,s=i?.[to];if(!i||i.__sentry_own_request__||!s)return;const{url:o,method:a}=s,c=Ce()&&e(o);if(t.endTimestamp&&c){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&void 0!==s.status_code&&(Yt(e,s.status_code),e.end(),delete r[t]))}const u=na(o),l=Pr(u||o),f=(p=o,p.split(/[?#]/,1)[0]),h=!!Te(),d=c&&h?ln({name:`${a} ${f}`,attributes:{url:o,type:"xhr","http.method":a,"http.url":u,"server.address":l?.host,[zt]:"auto.http.browser",[Ut]:"http.client",...l?.search&&{"http.query":l?.search},...l?.hash&&{"http.fragment":l?.hash}}}):new Be;var p;i.__sentry_xhr_span_id__=d.spanContext().spanId,r[i.__sentry_xhr_span_id__]=d,n(o)&&function(t,e){const{"sentry-trace":n,baggage:r}=dr({span:e});n&&function(t,e,n){const r=t.__sentry_xhr_v3__?.request_headers;if(r?.["sentry-trace"])return;try{if(t.setRequestHeader("sentry-trace",e),n){const e=r?.baggage;e&&e.split(",").some(t=>t.trim().startsWith("sentry-"))||t.setRequestHeader("baggage",n)}}catch{}}(t,n,r)}(i,Ce()&&h?d:void 0);const m=Ft();m&&m.emit("beforeOutgoingRequestSpan",d,t);return d}(t,u,l,f);if(e){let n;o&&ea(e);try{n=new Headers(t.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(e,{headers:n})}})}function ea(t){const{url:e}=ye(t).data;if(!e||"string"!=typeof e)return;const n=hs("resource",({entries:r})=>{r.forEach(r=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(r)&&r.name.endsWith(e)){(function(t){const e=[];if(null!=t.nextHopProtocol){const{name:n,version:r}=Es(t.nextHopProtocol);e.push(["network.protocol.version",r],["network.protocol.name",n])}return yt()?[...e,["http.request.redirect_start",Yo(t.redirectStart)],["http.request.fetch_start",Yo(t.fetchStart)],["http.request.domain_lookup_start",Yo(t.domainLookupStart)],["http.request.domain_lookup_end",Yo(t.domainLookupEnd)],["http.request.connect_start",Yo(t.connectStart)],["http.request.secure_connection_start",Yo(t.secureConnectionStart)],["http.request.connection_end",Yo(t.connectEnd)],["http.request.request_start",Yo(t.requestStart)],["http.request.response_start",Yo(t.responseStart)],["http.request.response_end",Yo(t.responseEnd)]]:e})(r).forEach(e=>t.setAttribute(...e)),setTimeout(n)}})})}function na(t){try{return new URL(t,ei.location.origin).href}catch{return}}const ra={...vn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Zo};function ia(t,e,n){t.emit("startPageLoadSpan",e,n),At().setTransactionName(e.name);const r=ca(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function sa(t,e,n){const{url:r,isRedirect:i}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:i}),t.emit("startNavigationSpan",e,{isRedirect:i});const s=At();return s.setTransactionName(e.name),r&&!i&&s.setSDKProcessingMetadata({normalizedRequest:{...si(),url:r}}),ca(t)}function oa(t){const e=ei.document,n=e?.querySelector(`meta[name=${t}]`);return n?.getAttribute("content")||void 0}const aa="_sentry_idleSpan";function ca(t){return t[aa]}function ua(t,e){tt(t,aa,e)}const la=.3;const fa=e,ha="sentryReplaySession",da="Unable to send Replay",pa=15e4,ma=5e3,ya=2e7,ga=36e5;var va=Object.defineProperty,ba=(t,e,n)=>((t,e,n)=>e in t?va(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),ka=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(ka||{});function wa(t){const e=t?.host;return Boolean(e?.shadowRoot===t)}function Sa(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function _a(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,Ta).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e):null}catch(t){return null}var e}function Ta(t){let e;if(function(t){return"styleSheet"in t}(t))try{e=_a(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(t){}else if(function(t){return"selectorText"in t}(t)){let e=t.cssText;const n=t.selectorText.includes(":"),r="string"==typeof t.style.all&&t.style.all;if(r&&(e=function(t){let e="";for(let n=0;nthis.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function xa({maskInputOptions:t,tagName:e,type:n}){return"OPTION"===e&&(e="SELECT"),Boolean(t[e.toLowerCase()]||n&&t[n]||"password"===n||"INPUT"===e&&!n&&t.text)}function Ea({isMasked:t,element:e,value:n,maskInputFn:r}){let i=n||"";return t?(r&&(i=r(i,e)),"*".repeat(i.length)):i}function Ca(t){return t.toLowerCase()}function Ra(t){return t.toUpperCase()}const Ma="__rrweb_original__";function Oa(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ca(e):null}function Aa(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}function $a(t,e){let n;try{n=new URL(t,window.location.href)}catch(t){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return r?.[1]??null}const La={};function Da(t){const e=La[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const i=e.contentWindow;i&&i[t]&&(r=i[t]),n.head.removeChild(e)}catch(t){}return La[t]=r.bind(window)}function Fa(...t){return Da("setTimeout")(...t)}function Pa(...t){return Da("clearTimeout")(...t)}function Na(t){try{return t.contentDocument}catch(t){}}let ja=1;const Ba=new RegExp("[^a-z0-9-_:]");function Ua(){return ja++}let za,qa;const Ha=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Wa=/^(?:[a-z+]+:)?\/\//i,Ja=/^www\..*/i,Ka=/^(data:)([^,]*),(.*)/i;function Ga(t,e){return(t||"").replace(Ha,(t,n,r,i,s,o)=>{const a=r||s||o,c=n||i||"";if(!a)return t;if(Wa.test(a)||Ja.test(a))return`url(${c}${a}${c})`;if(Ka.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a}${c})`;const u=e.split("/"),l=a.split("/");u.pop();for(const t of l)"."!==t&&(".."===t?u.pop():u.push(t));return`url(${c}${u.join("/")}${c})`})}const Xa=/^[^ \t\n\r\u000c]+/,Ya=/^[, \t\n\r\u000c]+/;const Va=new WeakMap;function Qa(t,e){return e&&""!==e.trim()?tc(t,e):e}function Za(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function tc(t,e){let n=Va.get(t);if(n||(n=t.createElement("a"),Va.set(t,n)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return n.setAttribute("href",e),n.href}function ec(t,e,n,r,i,s){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Qa(t,r):"background"!==n||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}const i=[];for(;r(Ya),!(n>=e.length);){let s=r(Xa);if(","===s.slice(-1))s=Qa(t,s.substring(0,s.length-1)),i.push(s);else{let r="";s=Qa(t,s);let o=!1;for(;;){const t=e.charAt(n);if(""===t){i.push((s+r).trim());break}if(o)")"===t&&(o=!1);else{if(","===t){n+=1,i.push((s+r).trim());break}"("===t&&(o=!0)}r+=t,n+=1}}}return i.join(", ")}(t,r):"style"===n?Ga(r,tc(t)):"object"===e&&"data"===n?Qa(t,r):"function"==typeof s?s(n,r,i):r:Qa(t,r):r}function nc(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function rc(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:rc(t.parentNode,e,n,r+1):-1}function ic(t,e){return n=>{const r=n;if(null===r)return!1;try{if(t)if("string"==typeof t){if(r.matches(`.${t}`))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}catch{return!1}}}function sc(t,e,n,r,i,s){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===o)return!1;if("INPUT"===o.tagName){const t=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(t))return!0}let a=-1,c=-1;if(s){if(c=rc(o,ic(r,i)),c<0)return!0;a=rc(o,ic(e,n),c>=0?c:1/0)}else{if(a=rc(o,ic(e,n)),a<0)return!1;c=rc(o,ic(r,i),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!s}catch(t){}return!!s}function oc(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:d,maskInputOptions:p={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:k,newlyAddedElement:w=!1}=e,S=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:ka.Document,childNodes:[],compatMode:t.compatMode}:{type:ka.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:ka.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:S};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:f,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:m,maskTextClass:y,unmaskTextClass:g,maskTextSelector:v,unmaskTextSelector:b}=e,k=function(t,e,n,r){try{if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}if(n)return t.matches(n)}catch(t){}return!1}(t,r,i,s),w=function(t){if(t instanceof HTMLFormElement)return"form";const e=Ca(t.tagName);return Ba.test(e)?"div":e}(t);let S={};const _=t.attributes.length;for(let e=0;e<_;e++){const r=t.attributes[e];r.name&&!nc(w,r.name)&&(S[r.name]=ec(n,w,Ca(r.name),r.value,t,c))}if("link"===w&&o){const e=Array.from(n.styleSheets).find(e=>e.href===t.href);let r=null;e&&(r=_a(e)),r&&(S.rel=null,S.href=null,S.crossorigin=null,S._cssText=Ga(r,e.href))}if("style"===w&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=_a(t.sheet);e&&(S._cssText=Ga(e,tc(n)))}if("input"===w||"textarea"===w||"select"===w||"option"===w){const e=t,n=Oa(e),r=Aa(e,Ra(w),n),i=e.checked;if("submit"!==n&&"button"!==n&&r){const t=sc(e,y,v,g,b,xa({type:n,tagName:Ra(w),maskInputOptions:a}));S.value=Ea({isMasked:t,element:e,value:r,maskInputFn:u})}i&&(S.checked=i)}"option"===w&&(t.selected&&!a.select?S.selected=!0:delete S.selected);if("canvas"===w&&h)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n0!==t))return!1}return!0})(t)||(S.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){const e=t.toDataURL(l.type,l.quality),r=n.createElement("canvas");r.width=t.width,r.height=t.height;e!==r.toDataURL(l.type,l.quality)&&(S.rr_dataURL=e)}if("img"===w&&f){za||(za=n.createElement("canvas"),qa=za.getContext("2d"));const e=t,r=e.currentSrc||e.getAttribute("src")||"",i=e.crossOrigin,s=()=>{e.removeEventListener("load",s);try{za.width=e.naturalWidth,za.height=e.naturalHeight,qa.drawImage(e,0,0),S.rr_dataURL=za.toDataURL(l.type,l.quality)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(i?S.crossOrigin=i:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s)}"audio"!==w&&"video"!==w||(S.rr_mediaState=t.paused?"paused":"played",S.rr_mediaCurrentTime=t.currentTime);p||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop));if(k){const{width:e,height:n}=t.getBoundingClientRect();S={class:S.class,rr_width:`${e}px`,rr_height:`${n}px`}}"iframe"!==w||d(S.src)||(k||Na(t)||(S.rr_src=S.src),delete S.src);let T;try{customElements.get(w)&&(T=!0)}catch(t){}return{type:ka.Element,tagName:w,attributes:S,childNodes:[],isSVG:Za(t)||void 0,needBlock:k,rootId:m,isCustom:T}}(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:d,maskAttributeFn:c,maskInputOptions:p,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:b,keepIframeSrcFn:k,newlyAddedElement:w,rootId:S,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h});case t.TEXT_NODE:return function(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=e,f=t.parentNode&&t.parentNode.tagName;let h=t.textContent;const d="STYLE"===f||void 0,p="SCRIPT"===f||void 0,m="TEXTAREA"===f||void 0;if(d&&h){try{t.nextSibling||t.previousSibling||t.parentNode.sheet?.cssRules&&(h=_a(t.parentNode.sheet))}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}h=Ga(h,tc(e.doc))}p&&(h="SCRIPT_PLACEHOLDER");const y=sc(t,r,s,i,o,n);d||p||m||!h||!y||(h=a?a(h,t.parentElement):h.replace(/[\S]/g,"*"));m&&h&&(c.textarea||y)&&(h=u?u(h,t.parentNode):h.replace(/[\S]/g,"*"));if("OPTION"===f&&h){h=Ea({isMasked:sc(t,r,s,i,o,xa({type:null,tagName:f,maskInputOptions:c})),element:t,value:h,maskInputFn:u})}return{type:ka.Text,textContent:h||"",isStyle:d,rootId:l}}(t,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,maskTextFn:m,maskInputOptions:p,maskInputFn:y,rootId:S});case t.CDATA_SECTION_NODE:return{type:ka.CDATA,textContent:"",rootId:S};case t.COMMENT_NODE:return{type:ka.Comment,textContent:t.textContent||"",rootId:S};default:return!1}}function ac(t){return null==t?"":t.toLowerCase()}function cc(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:h=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:k=!1,recordCanvas:w=!1,onSerialize:S,onIframeLoad:_,iframeLoadTimeout:T=5e3,onBlockedImageLoad:I,onStylesheetLoad:x,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:R=!1}=e;let{preserveWhiteSpace:M=!0}=e;const O=oc(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:b,inlineImages:k,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:R});if(!O)return console.warn(t,"not serialized"),null;let A;A=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===ka.Comment)return!0;if(t.type===ka.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===$a(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(ac(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ac(t.attributes.name)||"icon"===ac(t.attributes.rel)||"apple-touch-icon"===ac(t.attributes.rel)||"shortcut icon"===ac(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&ac(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ac(t.attributes.property).match(/^(og|twitter|fb):/)||ac(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===ac(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===ac(t.attributes.name)||"googlebot"===ac(t.attributes.name)||"bingbot"===ac(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===ac(t.attributes.name)||"generator"===ac(t.attributes.name)||"framework"===ac(t.attributes.name)||"publisher"===ac(t.attributes.name)||"progid"===ac(t.attributes.name)||ac(t.attributes.property).match(/^article:/)||ac(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===ac(t.attributes.name)||"yandex-verification"===ac(t.attributes.name)||"csrf-token"===ac(t.attributes.name)||"p:domain_verify"===ac(t.attributes.name)||"verify-v1"===ac(t.attributes.name)||"verification"===ac(t.attributes.name)||"shopify-checkout-api-token"===ac(t.attributes.name)))return!0}}return!1}(O,v)&&(M||O.type!==ka.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?Ua():-2;const $=Object.assign(O,{id:A});if(r.add(t,$),-2===A)return null;S&&S(t);let L=!h;if($.type===ka.Element){L=L&&!$.needBlock;const e=t.shadowRoot;e&&Sa(e)&&($.isShadowHost=!0)}if(($.type===ka.Document||$.type===ka.Element)&&L){v.headWhitespace&&$.type===ka.Element&&"head"===$.tagName&&(M=!1);const e={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:h,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:k,recordCanvas:w,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:_,iframeLoadTimeout:T,onBlockedImageLoad:I,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:C},R=t.childNodes?Array.from(t.childNodes):[];for(const t of R){const n=cc(t,e);n&&$.childNodes.push(n)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const r=cc(n,e);r&&(Sa(t.shadowRoot)&&(r.isShadow=!0),$.childNodes.push(r))}}if(t.parentNode&&wa(t.parentNode)&&Sa(t.parentNode)&&($.isShadow=!0),$.type!==ka.Element||"iframe"!==$.tagName||$.needBlock||function(t,e,n){const r=t.contentWindow;if(!r)return;let i,s=!1;try{i=r.document.readyState}catch(t){return}if("complete"!==i){const r=Fa(()=>{s||(e(),s=!0)},n);return void t.addEventListener("load",()=>{Pa(r),s=!0,e()})}const o="about:blank";if(r.location.href!==o||t.src===o||""===t.src)return Fa(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,()=>{const e=Na(t);if(e&&_){const n=cc(e,{doc:e,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:k,recordCanvas:w,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:C});n&&_(t,n)}},T),$.type===ka.Element&&"img"===$.tagName&&!t.complete&&$.needBlock){const e=t,n=()=>{if(e.isConnected&&!e.complete&&I)try{const t=e.getBoundingClientRect();t.width>0&&t.height>0&&I(e,$,t)}catch(t){}e.removeEventListener("load",n)};e.isConnected&&e.addEventListener("load",n)}return $.type===ka.Element&&"link"===$.tagName&&"string"==typeof $.attributes.rel&&("stylesheet"===$.attributes.rel||"preload"===$.attributes.rel&&"string"==typeof $.attributes.href&&"css"===$a($.attributes.href))&&function(t,e,n){let r,i=!1;try{r=t.sheet}catch(t){return}if(r)return;const s=Fa(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{Pa(s),i=!0,e()})}(t,()=>{if(x){const e=cc(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:k,recordCanvas:w,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:C});e&&x(t,e)}},E),$.type===ka.Element&&delete $.needBlock,$}function uc(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const lc="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let fc={map:{},getId:()=>(console.error(lc),-1),getNode:()=>(console.error(lc),null),removeNodeFromMap(){console.error(lc)},has:()=>(console.error(lc),!1),reset(){console.error(lc)}};function hc(t,e,n={}){let r=null,i=0;return function(...s){const o=Date.now();i||!1!==n.leading||(i=o);const a=e-(o-i),c=this;a<=0||a>e?(r&&(!function(...t){Ac("clearTimeout")(...t)}(r),r=null),i=o,t.apply(c,s)):r||!1===n.trailing||(r=$c(()=>{i=!1===n.leading?0:Date.now(),r=null,t.apply(c,s)},a))}}function dc(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(t){$c(()=>{n.set.call(this,t)},0),s&&s.set&&s.set.call(this,t)}}),()=>dc(t,e,s||{},!0)}function pc(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(fc=new Proxy(fc,{get:(t,e,n)=>("map"===e&&console.error(lc),Reflect.get(t,e,n))}));let mc=Date.now;function yc(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:e?.documentElement.scrollLeft||e?.body?.parentElement?.scrollLeft||e?.body?.scrollLeft||0,top:e.scrollingElement?e.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:e?.documentElement.scrollTop||e?.body?.parentElement?.scrollTop||e?.body?.scrollTop||0}}function gc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function vc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function bc(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch(t){return null}}function kc(t,e,n,r,i){if(!t)return!1;const s=bc(t);if(!s)return!1;const o=ic(e,n);if(!i){const t=r&&s.matches(r);return o(s)&&!t}const a=rc(s,o);let c=-1;return!(a<0)&&(r&&(c=rc(s,ic(null,r))),a>-1&&c<0||a(new Date).getTime());class Ec{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}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 Cc(t){let e=null;return t.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function Rc(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=Cc(n);)n=e;return n}(t);return e.contains(n)}function Mc(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||Rc(t))}const Oc={};function Ac(t){const e=Oc[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const i=e.contentWindow;i&&i[t]&&(r=i[t]),n.head.removeChild(e)}catch(t){}return Oc[t]=r.bind(window)}function $c(...t){return Ac("setTimeout")(...t)}var Lc=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Lc||{}),Dc=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Dc||{}),Fc=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Fc||{}),Pc=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Pc||{}),Nc=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Nc||{});function jc(t){try{return t.contentDocument}catch(t){}}function Bc(t){return"__ln"in t}class Uc{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 e=this.head;for(let n=0;n`${t}@${e}`;class qc{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=[],e=new Set,n=new Uc,r=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},i=i=>{if(!i.parentNode||!Mc(i))return;const s=wa(i.parentNode)?this.mirror.getId(Cc(i)):this.mirror.getId(i.parentNode),o=r(i);if(-1===s||-1===o)return n.addNode(i);const a=cc(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{Tc(t,this.mirror)&&!kc(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(t),Ic(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),xc(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{kc(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(t,e),t.contentWindow&&this.canvasManager.addWindow(t.contentWindow),this.shadowDomManager.observeAttachShadow(t))},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},onBlockedImageLoad:(t,e,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})}});a&&(t.push({parentId:s,nextId:o,node:a}),e.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Wc(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||i(t);for(const t of this.addedSet)Jc(this.droppedSet,t)||Wc(this.removes,t,this.mirror)?Jc(this.movedSet,t)?i(t):this.droppedSet.add(t):i(t);let s=null;for(;n.length;){let t=null;if(s){const e=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==e&&-1!==n&&(t=s)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;if(-1!==this.mirror.getId(r)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}s=t.previous,n.removeNode(t.value),i(t.value)}const o={texts:this.texts.map(t=>({id:this.mirror.getId(t.node),value:t.value})).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{const{attributes:e}=t;if("string"==typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t.Ft);n.length!e.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=t=>{if(!wc(t.target,this.mirror))switch(t.type){case"characterData":{const e=t.target.textContent;kc(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:sc(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e,bc(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=t.attributeName,r=t.target.getAttribute(n);if("value"===n){const n=Oa(e),i=e.tagName;r=Aa(e,i,n);const s=xa({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=Ea({isMasked:sc(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:e,value:r,maskInputFn:this.maskInputFn})}if(kc(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===t.oldValue)return;let i=this.attributeMap.get(t.target);if("IFRAME"===e.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(jc(e))return;n="rr_src"}if(i||(i={node:t.target,attributes:{},styleDiff:{},Ft:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),"type"===n&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),!nc(e.tagName,n)&&(i.attributes[n]=ec(this.doc,Ca(e.tagName),Ca(n),r,e,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue);for(const t of Array.from(e.style)){const r=e.style.getPropertyValue(t),s=e.style.getPropertyPriority(t);r!==n.style.getPropertyValue(t)||s!==n.style.getPropertyPriority(t)?i.styleDiff[t]=""===s?r:[r,s]:i.Ft[t]=[r,s]}for(const t of Array.from(n.style))""===e.style.getPropertyValue(t)&&(i.styleDiff[t]=!1)}break}case"childList":if(kc(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const n=this.mirror.getId(e),r=wa(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);kc(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||wc(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Hc(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||Sc(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[zc(n,r)]?Hc(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!wa(t.target)||!Sa(t.target))||void 0})),this.mapRemoves.push(e))})}},this.genAdds=(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(wc(t,this.mirror))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[zc(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);kc(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(t=>this.genAdds(t)),xc(t)&&t.shadowRoot.childNodes.forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,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(e=>{this[e]=t[e]})}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 Hc(t,e){t.delete(e),e.childNodes?.forEach(e=>Hc(t,e))}function Wc(t,e,n){return 0!==t.length&&function(t,e,n){let r=e.parentNode;for(;r;){const e=n.getId(r);if(t.some(t=>t.id===e))return!0;r=r.parentNode}return!1}(t,e,n)}function Jc(t,e){return 0!==t.size&&Kc(t,e)}function Kc(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Kc(t,n))}let Gc;const Xc=t=>{if(!Gc)return t;return(...e)=>{try{return t(...e)}catch(t){if(Gc&&!0===Gc(t))return()=>{};throw t}}},Yc=[];function Vc(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Qc(t,e){const n=new qc;Yc.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);const s=new r(Xc(e=>{t.onMutation&&!1===t.onMutation(e)||n.processMutations.bind(n)(e)}));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Zc({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,c=[];let u=null;return Object.keys(Fc).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==a[t]).forEach(o=>{let a=Ca(o);const l=(e=>o=>{const a=Vc(o);if(kc(a,r,i,s,!0))return;let c=null,l=e;if("pointerType"in o){switch(o.pointerType){case"mouse":c=Pc.Mouse;break;case"touch":c=Pc.Touch;break;case"pen":c=Pc.Pen}c===Pc.Touch&&(Fc[e]===Fc.MouseDown?l="TouchStart":Fc[e]===Fc.MouseUp&&(l="TouchEnd"))}else _c(o)&&(c=Pc.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===Pc.Touch||l.startsWith("Mouse")&&c===Pc.Mouse)&&(c=null)):Fc[e]===Fc.Click&&(c=u,u=null);const f=_c(o)?o.changedTouches[0]:o;if(!f)return;const h=n.getId(a),{clientX:d,clientY:p}=f;Xc(t)({type:Fc[l],id:h,x:d,y:p,...null!==c&&{pointerType:c}})})(o);if(window.PointerEvent)switch(Fc[o]){case Fc.MouseDown:case Fc.MouseUp:a=a.replace("mouse","pointer");break;case Fc.TouchStart:case Fc.TouchEnd:return}c.push(uc(a,l,e))}),Xc(()=>{c.forEach(t=>t())})}function tu({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){return uc("scroll",Xc(hc(Xc(o=>{const a=Vc(o);if(!a||kc(a,r,i,s,!0))return;const c=n.getId(a);if(a===e&&e.defaultView){const n=yc(e.defaultView);t({id:c,x:n.left,y:n.top})}else t({id:c,x:a.scrollLeft,y:a.scrollTop})}),o.scroll||100)),e)}const eu=["INPUT","TEXTAREA","SELECT"],nu=new WeakMap;function ru({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:f,maskTextClass:h,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m}){function y(t){let n=Vc(t);const l=t.isTrusted,y=n&&Ra(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||eu.indexOf(y)<0||kc(n,r,i,s,!0))return;const v=n;if(v.classList.contains(o)||a&&v.matches(a))return;const b=Oa(n);let k=Aa(v,y,b),w=!1;const S=xa({maskInputOptions:c,tagName:y,type:b}),_=sc(n,h,p,d,m,S);"radio"!==b&&"checkbox"!==b||(w=n.checked),k=Ea({isMasked:_,element:n,value:k,maskInputFn:u}),g(n,f?{text:k,isChecked:w,userTriggered:l}:{text:k,isChecked:w});const T=n.name;"radio"===b&&T&&w&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(t=>{if(t!==n){const e=Ea({isMasked:_,element:t,value:Aa(t,y,b),maskInputFn:u});g(t,f?{text:e,isChecked:!w,userTriggered:!1}:{text:e,isChecked:!w})}})}function g(e,r){const i=nu.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){nu.set(e,r);const i=n.getId(e);Xc(t)({...r,id:i})}}const v=("last"===l.input?["change"]:["input","change"]).map(t=>uc(t,Xc(y),e)),b=e.defaultView;if(!b)return()=>{v.forEach(t=>t())};const k=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return k&&k.set&&v.push(...w.map(t=>dc(t[0],t[1],{set(){Xc(y)({target:this,isTrusted:!1})}},!1,b))),Xc(()=>{v.forEach(t=>t())})}function iu(t){return function(t,e){if(cu("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||cu("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||cu("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||cu("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function su(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function ou({mirror:t,stylesheetManager:e},n){let r=null;r="#document"===n.nodeName?t.getId(n):t.getId(n.host);const i="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&i&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(t){const n=s.set?.call(this,t);if(null!==r&&-1!==r)try{e.adoptStyleSheets(t,r)}catch(t){}return n}}),Xc(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function au(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=Qc(t,t.doc));const i=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const i="number"==typeof e.mousemove?e.mousemove:50,s="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let o,a=[];const c=hc(Xc(e=>{const n=Date.now()-o;t(a.map(t=>(t.timeOffset-=n,t)),e),a=[],o=null}),s),u=Xc(hc(Xc(t=>{const e=Vc(t),{clientX:n,clientY:i}=_c(t)?t.changedTouches[0]:t;o||(o=mc()),a.push({x:n,y:i,id:r.getId(e),timeOffset:mc()-o}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?Dc.Drag:t instanceof MouseEvent?Dc.MouseMove:Dc.TouchMove)}),i,{trailing:!1})),l=[uc("mousemove",u,n),uc("touchmove",u,n),uc("drag",u,n)];return Xc(()=>{l.forEach(t=>t())})}(t),s=Zc(t),o=tu(t),a=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return uc("resize",Xc(hc(Xc(()=>{const e=gc(),i=vc();n===e&&r===i||(t({width:Number(i),height:Number(e)}),n=e,r=i)}),200)),e)}(t,{win:n}),c=ru(t),u=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){const a=Xc(o=>hc(Xc(s=>{const a=Vc(s);if(!a||kc(a,e,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:f}=a;t({type:o,id:i.getId(a),currentTime:c,volume:u,muted:l,playbackRate:f})}),s.media||500)),c=[uc("play",a(Nc.Play),o),uc("pause",a(Nc.Pause),o),uc("seeked",a(Nc.Seeked),o),uc("volumechange",a(Nc.VolumeChange),o),uc("ratechange",a(Nc.RateChange),o)];return Xc(()=>{c.forEach(t=>t())})}(t);let l=()=>{},f=()=>{},h=()=>{},d=()=>{};t.recordDOM&&(l=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Xc((r,i,s)=>{const[o,a]=s,{id:c,styleId:u}=su(i,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:o,index:a}]}),r.apply(i,s)})});const s=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Xc((r,i,s)=>{const[o]=s,{id:a,styleId:c}=su(i,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:o}]}),r.apply(i,s)})}),r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Xc((r,i,s)=>{const[o]=s,{id:a,styleId:c}=su(i,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replace:o}),r.apply(i,s)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Xc((r,i,s)=>{const[o]=s,{id:a,styleId:c}=su(i,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replaceSync:o}),r.apply(i,s)})}));const c={};uu("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(uu("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),uu("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),uu("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([r,i])=>{u[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(u[r].insertRule,{apply:Xc((r,i,s)=>{const[o,a]=s,{id:c,styleId:u}=su(i.parentStyleSheet,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:o,index:[...iu(i),a||0]}]}),r.apply(i,s)})}),i.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:Xc((r,i,s)=>{const[o]=s,{id:a,styleId:c}=su(i.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:[...iu(i),o]}]}),r.apply(i,s)})})}),Xc(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([t,e])=>{e.prototype.insertRule=u[t].insertRule,e.prototype.deleteRule=u[t].deleteRule})})}(t,{win:n}),f=ou(t,t.doc),h=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Xc((i,o,a)=>{const[c,u,l]=a;if(n.has(c))return s.apply(o,[c,u,l]);const{id:f,styleId:h}=su(o.parentRule?.parentStyleSheet,e,r.styleMirror);return(f&&-1!==f||h&&-1!==h)&&t({id:f,styleId:h,set:{property:c,value:u,priority:l},index:iu(o.parentRule)}),i.apply(o,a)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Xc((i,s,a)=>{const[c]=a;if(n.has(c))return o.apply(s,[c]);const{id:u,styleId:l}=su(s.parentRule?.parentStyleSheet,e,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&t({id:u,styleId:l,remove:{property:c},index:iu(s.parentRule)}),i.apply(s,a)})}),Xc(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}(t,{win:n}),t.collectFonts&&(d=function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(t,e,n){const r=new s(t,e,n);return i.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const o=pc(e.fonts,"add",function(e){return function(n){return $c(Xc(()=>{const e=i.get(n);e&&(t(e),i.delete(n))}),0),e.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(o),Xc(()=>{r.forEach(t=>t())})}(t)));const p=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=t;let a=!0;const c=Xc(()=>{const t=e.getSelection();if(!t||a&&t?.isCollapsed)return;a=t.isCollapsed||!1;const c=[],u=t.rangeCount||0;for(let e=0;e{}}(t),y=[];for(const e of t.plugins)y.push(e.observer(e.callback,n,e.options));return Xc(()=>{Yc.forEach(t=>t.reset()),r?.disconnect(),i(),s(),o(),a(),c(),u(),l(),f(),h(),d(),p(),m(),y.forEach(t=>t())})}function cu(t){return void 0!==window[t]}function uu(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class lu{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const i=n||this.getIdToRemoteIdMap(t),s=r||this.getRemoteIdToIdMap(t);let o=i.get(e);return o||(o=this.generateIdFn(),i.set(e,o),s.set(o,e)),o}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,n,r))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;const i=r.get(e);return i||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,n))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class fu{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new lu(Ua),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new lu(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,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const n=jc(t);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case Lc.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:Lc.IncrementalSnapshot,data:{source:Dc.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Lc.Meta:case Lc.Load:case Lc.DomContentLoaded:return!1;case Lc.Plugin:return e;case Lc.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Lc.IncrementalSnapshot:switch(e.data.source){case Dc.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Dc.Drag:case Dc.TouchMove:case Dc.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Dc.ViewportResize:return!1;case Dc.MediaInteraction:case Dc.MouseInteraction:case Dc.Scroll:case Dc.CanvasMutation:case Dc.Input:return this.replaceIds(e.data,t,["id"]),e;case Dc.StyleSheetRule:case Dc.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Dc.Font:return e;case Dc.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case Dc.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),e.data.styles?.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,n,r){for(const i of r)(Array.isArray(e[i])||"number"==typeof e[i])&&(Array.isArray(e[i])?e[i]=t.getIds(n,e[i]):e[i]=t.getId(n,e[i]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===ka.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class hu{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,e){if(!Sa(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const n=Qc({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(tu({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),$c(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(ou({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const e=jc(t),n=function(t){try{return t.contentWindow}catch(t){}}(t);e&&n&&this.patchAttachShadow(n.Element,e)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(pc(t.prototype,"attachShadow",function(t){return function(r){const i=t.call(this,r);return this.shadowRoot&&Mc(this)&&n.addShadowRoot(this.shadowRoot,e),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var du="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pu="undefined"==typeof Uint8Array?[]:new Uint8Array(256),mu=0;mu<64;mu++)pu[du.charCodeAt(mu)]=mu;class yu{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class gu{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Ec,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const n={id:e,styleIds:[]},r=[];for(const e of t){let t;this.styleMirror.has(e)?t=this.styleMirror.getId(e):(t=this.styleMirror.add(e),r.push({styleId:t,rules:Array.from(e.rules||CSSRule,(t,e)=>({rule:Ta(t),index:e}))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class vu{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,function(...t){Ac("requestAnimationFrame")(...t)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}let bu,ku;try{if(2!==Array.from([1],t=>2*t)[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=t.contentWindow?.Array.from||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const wu=new Ia;function Su(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:f=null,maskTextSelector:h=null,unmaskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:b,maskTextFn:k,maxCanvasSize:w=null,packFn:S,sampling:_={},dataURLOptions:T={},mousemoveWait:I,recordDOM:x=!0,recordCanvas:E=!1,recordCrossOriginIframes:C=!1,recordAfter:R=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:M=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:$,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:D=new Set([]),errorHandler:F,onMutation:P,getCanvasManager:N}=t;Gc=F;const j=!C||window.parent===window;let B=!1;if(!j)try{window.parent.document&&(B=!1)}catch(t){B=!0}if(j&&!e)throw new Error("emit function is required");if(!j&&!B)return()=>{};void 0!==I&&void 0===_.mousemove&&(_.mousemove=I),wu.reset();const U=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==y?y:{},z=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};let q;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let H=0;const W=t=>{for(const e of $||[])e.eventProcessor&&(t=e.eventProcessor(t));return S&&!B&&(t=S(t)),t};bu=(t,i)=>{const s=t;if(s.timestamp=mc(),!Yc[0]?.isFrozen()||s.type===Lc.FullSnapshot||s.type===Lc.IncrementalSnapshot&&s.data.source===Dc.Mutation||Yc.forEach(t=>t.unfreeze()),j)e?.(W(s),i);else if(B){const t={type:"rrweb",event:W(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(t,"*")}if(s.type===Lc.FullSnapshot)q=s,H=0;else if(s.type===Lc.IncrementalSnapshot){if(s.data.source===Dc.Mutation&&s.data.isAttachIframe)return;H++;const t=r&&H>=r,e=n&&q&&s.timestamp-q.timestamp>n;(t||e)&&tt(!0)}};const J=t=>{bu({type:Lc.IncrementalSnapshot,data:{source:Dc.Mutation,...t}})},K=t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.Scroll,...t}}),G=t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.CanvasMutation,...t}}),X=new gu({mutationCb:J,adoptedStyleSheetCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.AdoptedStyleSheet,...t}})}),Y=new fu({mirror:wu,mutationCb:J,stylesheetManager:X,recordCrossOriginIframes:C,wrappedEmit:bu});for(const t of $||[])t.getMirror&&t.getMirror({nodeMirror:wu,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const V=new vu,Q=function(t,e){try{return t?t(e):new yu}catch{return console.warn("Unable to initialize CanvasManager"),new yu}}(N,{mirror:wu,win:window,mutationCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.CanvasMutation,...t}}),recordCanvas:E,blockClass:i,blockSelector:s,unblockSelector:o,maxCanvasSize:w,sampling:_.canvas,dataURLOptions:T,errorHandler:F}),Z=new hu({mutationCb:J,scrollCb:K,bypassOptions:{onMutation:P,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:U,dataURLOptions:T,maskAttributeFn:v,maskTextFn:k,maskInputFn:b,recordCanvas:E,inlineImages:A,sampling:_,slimDOMOptions:z,iframeManager:Y,stylesheetManager:X,canvasManager:Q,keepIframeSrcFn:L,processedNodeManager:V},mirror:wu}),tt=(t=!1)=>{if(!x)return;bu({type:Lc.Meta,data:{href:window.location.href,width:vc(),height:gc()}},t),X.reset(),Z.init(),Yc.forEach(t=>t.lock());const e=function(t,e){const{mirror:n=new Ia,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:f=!0,inlineImages:h=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:k,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:_,onBlockedImageLoad:T,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:E=()=>!1}=e||{};return cc(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===p?{}:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:b,inlineImages:h,recordCanvas:d,preserveWhiteSpace:k,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:_,onBlockedImageLoad:T,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:E,newlyAddedElement:!1})}(document,{mirror:wu,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:p,maskAllInputs:U,maskAttributeFn:v,maskInputFn:b,maskTextFn:k,slimDOM:z,dataURLOptions:T,recordCanvas:E,inlineImages:A,onSerialize:t=>{Tc(t,wu)&&Y.addIframe(t),Ic(t,wu)&&X.trackLinkElement(t),xc(t)&&Z.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{Y.attachIframe(t,e),t.contentWindow&&Q.addWindow(t.contentWindow),Z.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{X.attachLinkElement(t,e)},onBlockedImageLoad:(t,e,{width:n,height:r})=>{J({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:L});if(!e)return console.warn("Failed to snapshot the document");bu({type:Lc.FullSnapshot,data:{node:e,initialOffset:yc(window)}}),Yc.forEach(t=>t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,wu.getId(document))};ku=tt;try{const t=[],e=t=>Xc(au)({onMutation:P,mutationCb:J,mousemoveCb:(t,e)=>bu({type:Lc.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.MouseInteraction,...t}}),scrollCb:K,viewportResizeCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.ViewportResize,...t}}),inputCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.Input,...t}}),mediaInteractionCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.MediaInteraction,...t}}),styleSheetRuleCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.StyleSheetRule,...t}}),styleDeclarationCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.StyleDeclaration,...t}}),canvasMutationCb:G,fontCb:t=>bu({type:Lc.IncrementalSnapshot,data:{source:Dc.Font,...t}}),selectionCb:t=>{bu({type:Lc.IncrementalSnapshot,data:{source:Dc.Selection,...t}})},customElementCb:t=>{bu({type:Lc.IncrementalSnapshot,data:{source:Dc.CustomElement,...t}})},blockClass:i,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:d,maskInputOptions:U,inlineStylesheet:p,sampling:_,recordDOM:x,recordCanvas:E,inlineImages:A,userTriggeredOnInput:M,collectFonts:O,doc:t,maskAttributeFn:v,maskInputFn:b,maskTextFn:k,keepIframeSrcFn:L,blockSelector:s,unblockSelector:o,slimDOMOptions:z,dataURLOptions:T,mirror:wu,iframeManager:Y,stylesheetManager:X,shadowDomManager:Z,processedNodeManager:V,canvasManager:Q,ignoreCSSAttributes:D,plugins:$?.filter(t=>t.observer)?.map(t=>({observer:t.observer,options:t.options,callback:e=>bu({type:Lc.Plugin,data:{plugin:t.name,payload:e}})}))||[]},{});Y.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{tt(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(uc("DOMContentLoaded",()=>{bu({type:Lc.DomContentLoaded,data:{}}),"DOMContentLoaded"===R&&n()})),t.push(uc("load",()=>{bu({type:Lc.Load,data:{}}),"load"===R&&n()},window))),()=>{t.forEach(t=>t()),V.destroy(),ku=void 0,Gc=void 0}}catch(t){console.warn(t)}}var _u,Tu;Su.mirror=wu,Su.takeFullSnapshot=function(t){if(!ku)throw new Error("please take full snapshot after start recording");ku(t)},(Tu=_u||(_u={}))[Tu.NotStarted=0]="NotStarted",Tu[Tu.Running=1]="Running",Tu[Tu.Stopped=2]="Stopped";function Iu(t){return t>9999999999?t:1e3*t}function xu(t){return t>9999999999?t/1e3:t}function Eu(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:Lc.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:Ue(e,10,1e3)}}),"console"===e.category)))}function Cu(t){return t.closest("button,a")||t}function Ru(t){const e=Mu(t);return e&&e instanceof Element?Cu(e):e}function Mu(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let Ou;function Au(t){return Ou||(Ou=[],Z(fa,"open",function(t){return function(...e){if(Ou)try{Ou.forEach(t=>t())}catch{}return t.apply(fa,e)}})),Ou.push(t),()=>{const e=Ou?Ou.indexOf(t):-1;e>-1&&Ou.splice(e,1)}}const $u=new Set([Dc.Mutation,Dc.StyleSheetRule,Dc.StyleDeclaration,Dc.AdoptedStyleSheet,Dc.CanvasMutation,Dc.Selection,Dc.MediaInteraction]);class Lu{constructor(t,e,n=Eu){this.Pt=0,this.Nt=0,this.jt=[],this.Bt=e.timeout/1e3,this.Ut=e.threshold/1e3,this.zt=e.scrollTimeout/1e3,this._replay=t,this.qt=e.ignoreSelector,this.Ht=n}addListeners(){const t=Au(()=>{this.Pt=Fu()});this.Wt=()=>{t(),this.jt=[],this.Pt=0,this.Nt=0}}removeListeners(){this.Wt&&this.Wt(),this.Jt&&clearTimeout(this.Jt)}handleClick(t,e){if(function(t,e){if(!Du.includes(t.tagName))return!0;if("INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||""))return!0;if("A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))return!0;if(e&&t.matches(e))return!0;return!1}(e,this.qt)||!function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:xu(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};this.jt.some(t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1)||(this.jt.push(n),1===this.jt.length&&this.Kt())}registerMutation(t=Date.now()){this.Pt=xu(t)}registerScroll(t=Date.now()){this.Nt=xu(t)}registerClick(t){const e=Cu(t);this.Gt(e)}Gt(t){this.Xt(t).forEach(t=>{t.clickCount++})}Xt(t){return this.jt.filter(e=>e.node===t)}Yt(){const t=[],e=Fu();this.jt.forEach(n=>{!n.mutationAfter&&this.Pt&&(n.mutationAfter=n.timestamp<=this.Pt?this.Pt-n.timestamp:void 0),!n.scrollAfter&&this.Nt&&(n.scrollAfter=n.timestamp<=this.Nt?this.Nt-n.timestamp:void 0),n.timestamp+this.Bt<=e&&t.push(n)});for(const e of t){const t=this.jt.indexOf(e);t>-1&&(this.Vt(e),this.jt.splice(t,1))}this.jt.length&&this.Kt()}Vt(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this.zt,r=t.mutationAfter&&t.mutationAfter<=this.Ut,i=!n&&!r,{clickCount:s,clickBreadcrumb:o}=t;if(i){const n=1e3*Math.min(t.mutationAfter||this.Bt,this.Bt),r=n<1e3*this.Bt?"mutation":"timeout",i={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:fa.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:s||1}};return void this.Ht(e,i)}if(s>1){const t={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:fa.location.href,route:e.getCurrentRoute(),clickCount:s,metric:!0}};this.Ht(e,t)}}Kt(){this.Jt&&clearTimeout(this.Jt),this.Jt=Zs(()=>this.Yt(),1e3)}}const Du=["A","BUTTON","INPUT"];function Fu(){return Date.now()/1e3}function Pu(t,e){try{if(!function(t){return 3===t.type}(e))return;const{source:n}=e.data;if($u.has(n)&&t.registerMutation(e.timestamp),n===Dc.Scroll&&t.registerScroll(e.timestamp),function(t){return t.data.source===Dc.MouseInteraction}(e)){const{type:n,id:r}=e.data,i=Su.mirror.getNode(r);i instanceof HTMLElement&&n===Fc.Click&&t.registerClick(i)}}catch{}}function Nu(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var ju=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(ju||{});const Bu=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Uu(t){const e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(const n in t)if(Bu.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}const zu=t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Ru(t.event):Mu(t.event),n=W(r,{maxStringLength:200})||""}catch{n=""}return{target:r,message:n}}(t);return Nu({category:`ui.${t.name}`,...qu(e,n)})}(e);if(!n)return;const r="click"===e.name,i=r?e.event:void 0;var s,o,a;!(r&&t.clickDetector&&i?.target)||i.altKey||i.metaKey||i.ctrlKey||i.shiftKey||(s=t.clickDetector,o=n,a=Ru(e.event),s.handleClick(o,a)),Eu(t,n)};function qu(t,e){const n=Su.mirror.getId(t),r=n&&Su.mirror.getNode(n),i=r&&Su.mirror.getMeta(r),s=i&&function(t){return t.type===ju.Element}(i)?i:null;return{message:e,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(t=>t.type===ju.Text&&t.textContent).filter(Boolean).map(t=>t.trim()).join(""),attributes:Uu(s.attributes)}}:{}}}function Hu(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:o}=t;if(!o||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(o)||!s)return null;const a=e||r||i,c=1===s.length;if(!a&&c)return null;const u=W(o,{maxStringLength:200})||"",l=qu(o,u);return Nu({category:"ui.keyDown",message:u,data:{...l.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}(e);n&&Eu(t,n)}const Wu={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${e}.${n}`,start:Gu(s),end:Gu(i),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:i}=t,s=Gu(i);return{type:n,name:r,start:s,end:s+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:f,redirectCount:h,startTime:d,transferSize:p,type:m}=t;if(0===i)return null;return{type:`${e}.${m}`,start:Gu(d),end:Gu(s),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:f,domComplete:s,redirectCount:h}}}};function Ju(t,e){return({metric:n})=>{e.replayPerformanceEntries.push(t(n))}}function Ku(t){const e=Wu[t.entryType];return e?e(t):null}function Gu(t){return((yt()||fa.performance.timeOrigin)+t)/1e3}function Xu(t){const e=t.entries[t.entries.length-1];return tl(t,"largest-contentful-paint",e?.element?[e.element]:void 0)}function Yu(t){return void 0!==t.sources}function Vu(t){const e=[],n=[];for(const r of t.entries)if(Yu(r)){const t=[];for(const e of r.sources)if(e.node){n.push(e.node);const r=Su.mirror.getId(e.node);r&&t.push(r)}e.push({value:r.value,nodeIds:t.length?t:void 0})}return tl(t,"cumulative-layout-shift",n,e)}function Qu(t){const e=t.entries[t.entries.length-1];return tl(t,"first-input-delay",e?.target?[e.target]:void 0)}function Zu(t){const e=t.entries[t.entries.length-1];return tl(t,"interaction-to-next-paint",e?.target?[e.target]:void 0)}function tl(t,e,n,r){const i=t.value,s=t.rating,o=Gu(i);return{type:"web-vital",name:e,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:n?n.map(t=>Su.mirror.getId(t)):void 0,attributions:r}}}const el=["log","warn","error"];const nl=function(){const t={exception:()=>{},infoTick:()=>{},setConfig:t=>{}};return el.forEach(e=>{t[e]=()=>{}}),t}();class rl extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class il{constructor(){this.events=[],this.Qt=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this.Qt+=e,this.Qt>ya)throw new rl;this.events.push(t)}finish(){return new Promise(t=>{const e=this.events;this.clear(),t(JSON.stringify(e))})}clear(){this.events=[],this.Qt=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(t=>t.timestamp).sort()[0];return t?Iu(t):null}}class sl{constructor(t){this.Zt=t,this.te=0}ensureReady(){return this.ee||(this.ee=new Promise((t,e)=>{this.Zt.addEventListener("message",({data:n})=>{n.success?t():e()},{once:!0}),this.Zt.addEventListener("error",t=>{e(t)},{once:!0})})),this.ee}destroy(){this.Zt.terminate()}postMessage(t,e){const n=this.ne();return new Promise((r,i)=>{const s=({data:e})=>{const o=e;o.method===t&&o.id===n&&(this.Zt.removeEventListener("message",s),o.success?r(o.response):i(new Error("Error in compression worker")))};this.Zt.addEventListener("message",s),this.Zt.postMessage({id:n,method:t,arg:e})})}ne(){return this.te++}}class ol{constructor(t){this.Zt=new sl(t),this.re=null,this.Qt=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this.re}get type(){return"worker"}ensureReady(){return this.Zt.ensureReady()}destroy(){this.Zt.destroy()}addEvent(t){const e=Iu(t.timestamp);(!this.re||eya?Promise.reject(new rl):this.ie(n)}finish(){return this.se()}clear(){this.re=null,this.Qt=0,this.hasCheckout=!1,this.Zt.postMessage("clear").then(null,t=>{})}getEarliestTimestamp(){return this.re}ie(t){return this.Zt.postMessage("addEvent",t)}async se(){const t=await this.Zt.postMessage("finish");return this.re=null,this.Qt=0,t}}class al{constructor(t){this.oe=new il,this.ae=new ol(t),this.ce=this.oe,this.ue=this.le()}get waitForCheckout(){return this.ce.waitForCheckout}get type(){return this.ce.type}get hasEvents(){return this.ce.hasEvents}get hasCheckout(){return this.ce.hasCheckout}set hasCheckout(t){this.ce.hasCheckout=t}set waitForCheckout(t){this.ce.waitForCheckout=t}destroy(){this.oe.destroy(),this.ae.destroy()}clear(){return this.ce.clear()}getEarliestTimestamp(){return this.ce.getEarliestTimestamp()}addEvent(t){return this.ce.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this.ce.finish()}ensureWorkerIsLoaded(){return this.ue}async le(){try{await this.ae.ensureReady()}catch(t){return}await this.fe()}async fe(){const{events:t,hasCheckout:e,waitForCheckout:n}=this.oe,r=[];for(const e of t)r.push(this.ae.addEvent(e));this.ae.hasCheckout=e,this.ae.waitForCheckout=n,this.ce=this.ae;try{await Promise.all(r),this.oe.clear()}catch(t){}}}function cl({useCompression:t,workerUrl:e}){if(t&&window.Worker){const t=function(t){try{const e=t||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const t=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s>f]=l}else for(o=new n(i),s=0;s>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;sd&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<e))break;w+=m-(1<>=y;w>0;){var M=o[s].s;p[M]=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;oi.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n{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});']);return URL.createObjectURL(t)}();return""}();if(!e)return;const n=new Worker(e);return new al(n)}catch(t){}}(e);if(t)return t}return new il}function ul(){try{return"sessionStorage"in fa&&!!fa.sessionStorage}catch{return!1}}function ll(t){!function(){if(!ul())return;try{fa.sessionStorage.removeItem(ha)}catch{}}(),t.session=void 0}function fl(t){return void 0!==t&&Math.random()t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)}function Sl(t){return!t.type}function _l(t){return"transaction"===t.type}function Tl(t){return"feedback"===t.type}function Il(t){return(e,n)=>{if(!t.isEnabled()||!Sl(e)&&!_l(e))return;const r=n?.statusCode;!r||r<200||r>=300||(_l(e)?function(t,e){const n=t.getContext();e.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}(t,e):function(t,e){const n=t.getContext();e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id);if("buffer"!==t.recordingMode||!e.tags||!e.tags.replayId)return;const{beforeErrorSampling:r}=t.getOptions();if("function"==typeof r&&!r(e))return;Zs(async()=>{try{await t.sendBufferedReplayOrFlush()}catch(e){t.handleException(e)}})}(t,e))}}function xl(t){return e=>{t.isEnabled()&&Sl(e)&&function(t,e){const n=e.exception?.values?.[0]?.value;if("string"!=typeof n)return;if(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){Eu(t,Nu({category:"replay.hydrate-error",data:{url:K()}}))}}(t,e)}}function El(t){const e=Ft();e&&e.on("beforeAddBreadcrumb",e=>function(t,e){if(!t.isEnabled()||!Cl(e))return;const n=function(t){if(!Cl(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(t){const e=t.data?.arguments;if(!Array.isArray(e)||0===e.length)return Nu(t);let n=!1;const r=e.map(t=>{if(!t)return t;if("string"==typeof t)return t.length>ma?(n=!0,`${t.slice(0,ma)}…`):t;if("object"==typeof t)try{const e=Ue(t,7);return JSON.stringify(e).length>ma?(n=!0,`${JSON.stringify(e,null,2).slice(0,ma)}…`):e}catch{}return t});return Nu({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return Nu(t)}(e);n&&Eu(t,n)}(t,e))}function Cl(t){return!!t.category}function Rl(){const t=At().getPropagationContext().dsc;t&&delete t.replay_id;const e=Te();if(e){delete je(e).replay_id}}function Ml(t){return Object.assign((e,n)=>{if(!t.isEnabled()||t.isPaused())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!Sl(e)&&!_l(e)&&!Tl(e))return e;if(!t.checkAndHandleExpiredSession())return Rl(),e;if(Tl(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(t,e){t.triggerUserActivity(),t.addUpdate(()=>!e.timestamp||(t.throttledAddEvent({type:Lc.Custom,timestamp:1e3*e.timestamp,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1))}(t,e),e;if(function(t,e){return!(t.type||!t.exception?.values?.length||!e.originalException?.__rrweb__)}(e,n)&&!t.getOptions()._experiments.captureExceptions)return null;const r=function(t,e){return"buffer"===t.recordingMode&&e.message!==da&&!(!e.exception||e.type)&&fl(t.getOptions().errorSampleRate)}(t,e);return(r||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),e},{id:"Replay"})}function Ol(t,e){return e.map(({type:e,start:n,end:r,name:i,data:s})=>{const o=t.throttledAddEvent({type:Lc.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof o?Promise.resolve(null):o})}function Al(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(Ol(t,[n]),!1)))}}function $l(t,e){t.isEnabled()&&(null!==e&&(ur(e.name,Ft())||t.addUpdate(()=>(Ol(t,[e]),!0))))}function Ll(t){if(!t)return;const e=new TextEncoder;try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=ro(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function Dl(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Fl(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function Pl(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:o,request:a,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:i,data:{method:s,statusCode:o,request:a,response:c}}}function Nl(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function jl(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:i,warnings:s}=function(t){if(!t||"string"!=typeof t)return{body:t};const e=t.length>pa,n=function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t);if(e){const e=t.slice(0,pa);return n?{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${e}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch{}return{body:t}}(n);return r.body=i,s?.length&&(r._meta={warnings:s}),r}function Bl(t,e){return Object.entries(t).reduce((n,[r,i])=>{const s=r.toLowerCase();return e.includes(s)&&t[r]&&(n[s]=i),n},{})}function Ul(t,e){const n=function(t,e=fa.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(fa.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;if(!t.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(t);return Q(n,e)}async function zl(t,e,n){try{const r=await async function(t,e,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r}=e,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=t.data,f=Ul(o,n.networkDetailAllowUrls)&&!Ul(o,n.networkDetailDenyUrls),h=f?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const i=n?function(t,e){if(1===t.length&&"string"!=typeof t[0])return Hl(t[0],e);if(2===t.length)return Hl(t[1],e);return{}}(n,e):{};if(!t)return jl(i,r,void 0);const s=so(n),[o,a]=io(s,nl),c=jl(i,r,o);if(a)return Fl(c,a);return c}(n,e.input,u):Nl(u),d=await async function(t,{networkCaptureBodies:e,networkResponseHeaders:n},r,i){if(!t&&void 0!==i)return Nl(i);const s=r?ql(r.headers,n):{};if(!r||!e&&void 0!==i)return jl(s,i,void 0);const[o,a]=await async function(t){const e=function(t){try{return t.clone()}catch(t){}}(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{const t=await function(t){return new Promise((e,n)=>{const r=Zs(()=>n(new Error("Timeout while trying to read response body")),500);(async function(t){return await t.text()})(t).then(t=>e(t),t=>n(t)).finally(()=>clearTimeout(r))})}(e);return[t]}catch(t){return t instanceof Error&&t.message.indexOf("Timeout")>-1?[void 0,"BODY_PARSE_TIMEOUT"]:[void 0,"BODY_PARSE_ERROR"]}}(r),c=function(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:i}){try{const s=t?.length&&void 0===n?Ll(t):n;return r?jl(i,s,e?t:void 0):Nl(s)}catch(t){return jl(i,n,void 0)}}(o,{networkCaptureBodies:e,responseBodySize:i,captureDetails:t,headers:s});if(a)return Fl(c,a);return c}(f,n,e.response,l);return{startTimestamp:i,endTimestamp:s,url:o,method:a,statusCode:c,request:h,response:d}}(t,e,n),i=Pl("resource.fetch",r);$l(n.replay,i)}catch(t){}}function ql(t,e){const n={};return e.forEach(e=>{t.get(e)&&(n[e]=t.get(e))}),n}function Hl(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?ql(n,e):Array.isArray(n)?{}:Bl(n,e):{}}async function Wl(t,e,n){try{const r=function(t,e,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:a}=e,{url:c,method:u,status_code:l=0,request_body_size:f,response_body_size:h}=t.data;if(!c)return null;if(!a||!Ul(c,n.networkDetailAllowUrls)||Ul(c,n.networkDetailDenyUrls)){return{startTimestamp:i,endTimestamp:s,url:c,method:u,statusCode:l,request:Nl(f),response:Nl(h)}}const d=a[to],p=d?Bl(d.request_headers,n.networkRequestHeaders):{},m=Bl(function(t){const e=t.getAllResponseHeaders();if(!e)return{};return e.split("\r\n").reduce((t,e)=>{const[n,r]=e.split(": ");return r&&(t[n.toLowerCase()]=r),t},{})}(a),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?io(o,nl):[void 0],[v,b]=n.networkCaptureBodies?function(t){try{return[t.responseText]}catch(t){}try{return function(t,e){try{if("string"==typeof t)return[t];if(t instanceof Document)return[t.body.outerHTML];if("json"===e&&t&&"object"==typeof t)return[JSON.stringify(t)];if(!t)return[void 0]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}(t.response,t.responseType)}catch(t){}return[void 0]}(a):[void 0],k=jl(p,f,y),w=jl(m,h,v);return{startTimestamp:i,endTimestamp:s,url:c,method:u,statusCode:l,request:g?Fl(k,g):k,response:b?Fl(w,b):w}}(t,e,n),i=Pl("resource.xhr",r);$l(n.replay,i)}catch(t){}}function Jl(t,e){const{xhr:n,input:r}=e;if(!n)return;const i=Ll(r),s=n.getResponseHeader("content-length")?Dl(n.getResponseHeader("content-length")):function(t,e){try{return Ll("json"===e&&t&&"object"==typeof t?JSON.stringify(t):t)}catch{return}}(n.response,n.responseType);void 0!==i&&(t.data.request_body_size=i),void 0!==s&&(t.data.response_body_size=s)}function Kl(t){const e=Ft();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=t.getOptions(),a={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};e&&e.on("beforeAddBreadcrumb",(t,e)=>function(t,e,n){if(!e.data)return;try{(function(t){return"xhr"===t.category})(e)&&function(t){return t?.xhr}(n)&&(Jl(e,n),Wl(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t?.response}(n)&&(!function(t,e){const{input:n,response:r}=e,i=Ll(n?so(n):void 0),s=r?Dl(r.headers.get("content-length")):void 0;void 0!==i&&(t.data.request_body_size=i),void 0!==s&&(t.data.response_body_size=s)}(e,n),zl(e,n,t))}catch(t){}}(a,t,e))}catch{}}function Gl(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Xl(t,e,n){return function(t,e,n){let r,i,s;const o=n?.maxWait?Math.max(n.maxWait,e):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=t(),r}function u(){void 0!==i&&clearTimeout(i),void 0!==s&&clearTimeout(s),i=s=void 0}function l(){return i&&clearTimeout(i),i=a(c,e),o&&void 0===s&&(s=a(c,o)),r}return l.cancel=u,l.flush=function(){return void 0!==i||void 0!==s?c():r},l}(t,e,{...n,setTimeoutImpl:Zs})}const Yl=e.navigator;function Vl(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return;const i=r||!e;e=!0,t.clickDetector&&Pu(t.clickDetector,n),t.addUpdate(()=>{if("buffer"===t.recordingMode&&i&&t.setInitialState(),!bl(t,n,i))return!0;if(!i)return!1;const e=t.session;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return;bl(t,function(t){const e=t.getOptions();return{type:Lc.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,i),"buffer"===t.recordingMode&&e&&t.eventBuffer){const n=t.eventBuffer.getEarliestTimestamp();n&&(e.started=n,t.getOptions().stickySession&&hl(e))}return e?.previousSessionId||"session"===t.recordingMode&&t.flush(),!0})}}async function Ql({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const o=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,f=Ft(),h=At(),d=f?.getTransport(),p=f?.getDsn();if(!(f&&d&&p&&s.sampled))return kn({});const m={type:"replay_event",replay_start_timestamp:l/1e3,timestamp:i/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:e,segment_id:n,replay_type:s.sampled},y=await async function({client:t,scope:e,replayId:n,event:r}){const i={event_id:n,integrations:"object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations)};t.emit("preprocessEvent",r,i);const s=await Mn(t.getOptions(),r,i,e,t,$t());if(!s)return null;t.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";const o=t.getSdkMetadata(),{name:a,version:c}=o?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:h,client:f,replayId:e,event:m});if(!y)return f.recordDroppedEvent("event_processor","replay"),kn({});delete y.sdkProcessingMetadata;const g=function(t,e,n,r){return He(tn(t,Ze(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(y,o,p,f.getOptions().tunnel);let v;try{v=await d.send(g)}catch(t){const e=new Error(da);try{e.cause=t}catch{}throw e}if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new Zl(v.statusCode);const b=ar({},v);if(or(b,"replay"))throw new tf(b);return v}class Zl extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class tf extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function ef(t,e={count:0,interval:5e3}){const{recordingData:n,onError:r}=t;if(n.length)try{return await Ql(t),!0}catch(n){if(n instanceof Zl||n instanceof tf)throw n;if(Ln("Replays",{he:e.count}),r&&r(n),e.count>=3){const t=new Error(`${da} - max retries exceeded`);try{t.cause=n}catch{}throw t}return e.interval*=++e.count,new Promise((n,r)=>{Zs(async()=>{try{await ef(t,e),n(!0)}catch(t){r(t)}},e.interval)})}}const nf="__THROTTLED";function rf(t,e,n){const r=new Map;let i=!1;return(...s)=>{const o=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;r.forEach((t,n)=>{nt+e,0)>=e){const t=i;return i=!0,t?"__SKIPPED":nf}i=!1;const a=r.get(o)||0;return r.set(o,a+1),t(...s)}}class sf{constructor({options:t,recordingOptions:e}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this.de=Date.now(),this.gt=!1,this.pe=!1,this.me=!1,this.ye=!1,this.ge={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this.ve=e,this.st=t,this.be=Xl(()=>this.ke(),this.st.flushMinDelay,{maxWait:this.st.flushMaxDelay}),this.we=rf((t,e)=>function(t,e,n){return wl(t,e)?kl(t,e,n):Promise.resolve(null)}(this,t,e),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;i&&(this.clickDetector=new Lu(this,i)),this.Se=()=>{"visible"===fa.document.visibilityState?this._e():this.Te()},this.Ie=()=>{const t=Nu({category:"ui.blur"});this.Te(t)},this.xe=()=>{const t=Nu({category:"ui.focus"});this._e(t)},this.Ee=t=>{Hu(this,t)}}getContext(){return this.ge}isEnabled(){return this.gt}isPaused(){return this.pe}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this.st}handleException(t){this.st.onError&&this.st.onError(t)}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this.st,r=e<=0&&n<=0;this.me=r,r||(this.Ce(t),this.session&&!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this.Re()))}start(){if(this.gt&&"session"===this.recordingMode)return;if(this.gt&&"buffer"===this.recordingMode)return;this.Me();const t=vl({maxReplayDuration:this.st.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this.st.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this.Re()}startBuffering(){if(this.gt)return;const t=vl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.st.maxReplayDuration},{stickySession:this.st.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this.Re()}startRecording(){try{const t=this._canvas;this.Oe=Su({...this.ve,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this.st._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this.st._experiments.continuousCheckout)},emit:Vl(this),.../iPhone|iPad|iPod/i.test(Yl?.userAgent??"")||/Macintosh/i.test(Yl?.userAgent??"")&&Yl?.maxTouchPoints&&Yl?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this.Ae.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this.Oe&&(this.Oe(),this.Oe=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:e}={}){if(this.gt){this.gt=!1,this.recordingMode="buffer";try{Rl(),this.$e(),this.stopRecording(),this.be.cancel(),t&&await this.ke({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,ll(this)}catch(t){this.handleException(t)}}}pause(){this.pe||(this.pe=!0,this.stopRecording())}resume(){this.pe&&this.Le()&&(this.pe=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();await this.flushImmediate();const n=this.stopRecording();t&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.Me(e),this.De(e),this.Fe()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&this.gt&&!0!==e&&this.be()}triggerUserActivity(){if(this.Me(),this.Oe)this.checkAndHandleExpiredSession(),this.De();else{if(!this.Le())return;this.resume()}}updateUserActivity(){this.Me(),this.De()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this.be()}flushImmediate(){return this.be(),this.be.flush()}cancelFlush(){this.be.cancel()}getSessionId(){return this.session?.id}checkAndHandleExpiredSession(){if(!(this.de&&ml(this.de,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this.Le();this.pause()}setInitialState(){const t=`${fa.location.pathname}${fa.location.hash}${fa.location.search}`,e=`${fa.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this.Pe(),this.ge.initialUrl=e,this.ge.initialTimestamp=Date.now(),this.ge.urls.push(e)}throttledAddEvent(t,e){const n=this.we(t,e);if(n===nf){const t=Nu({category:"replay.throttled"});this.addUpdate(()=>!bl(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}}))}return n}getCurrentRoute(){const t=this.lastActiveSpan||Te(),e=t&&_e(t),n=(e&&ye(e).data||{})[Nt];if(e&&n&&["route","custom"].includes(n))return ye(e).description}Re(){this.setInitialState(),this.De(),this.eventBuffer=cl({useCompression:this.st.useCompression,workerUrl:this.st.workerUrl}),this.$e(),this.Ne(),this.gt=!0,this.pe=!1,this.startRecording()}Ce(t){const e=this.st.errorSampleRate>0,n=vl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.st.maxReplayDuration,previousSessionId:t},{stickySession:this.st.stickySession,sessionSampleRate:this.st.sessionSampleRate,allowBuffering:e});this.session=n}Le(){if(!this.session)return!1;const t=this.session;return!gl(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.st.maxReplayDuration})||(this.je(t),!1)}async je(t){this.gt&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}Ne(){try{fa.document.addEventListener("visibilitychange",this.Se),fa.addEventListener("blur",this.Ie),fa.addEventListener("focus",this.xe),fa.addEventListener("keydown",this.Ee),this.clickDetector&&this.clickDetector.addListeners(),this.ye||(!function(t){const e=Ft();Ws(zu(t)),Gs(Al(t)),El(t),Kl(t),Pn(Ml(t)),e&&(e.on("beforeSendEvent",xl(t)),e.on("afterSendEvent",Il(t)),e.on("createDsc",e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&t.checkAndHandleExpiredSession()&&(e.replay_id=n)}),e.on("spanStart",e=>{t.lastActiveSpan=e}),e.on("spanEnd",e=>{t.lastActiveSpan=e}),e.on("beforeSendFeedback",async(e,n)=>{const r=t.getSessionId();n?.includeReplay&&t.isEnabled()&&r&&e.contexts?.feedback&&("api"===e.contexts.feedback.source&&await t.sendBufferedReplayOrFlush(),e.contexts.feedback.replay_id=r)}),e.on("openFeedbackWidget",async()=>{await t.sendBufferedReplayOrFlush()}))}(this),this.ye=!0)}catch(t){this.handleException(t)}this.Be=function(t){function e(e){t.performanceEntries.includes(e)||t.performanceEntries.push(e)}function n({entries:t}){t.forEach(e)}const r=[];return["navigation","paint","resource"].forEach(t=>{r.push(hs(t,n))}),r.push(us(Ju(Xu,t)),cs(Ju(Vu,t)),ls(Ju(Qu,t)),fs(Ju(Zu,t))),()=>{r.forEach(t=>t())}}(this)}$e(){try{fa.document.removeEventListener("visibilitychange",this.Se),fa.removeEventListener("blur",this.Ie),fa.removeEventListener("focus",this.xe),fa.removeEventListener("keydown",this.Ee),this.clickDetector&&this.clickDetector.removeListeners(),this.Be&&this.Be()}catch(t){this.handleException(t)}}Te(t){if(!this.session)return;yl(this.session,{maxReplayDuration:this.st.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this.Ue(t),this.conditionalFlush())}_e(t){if(!this.session)return;this.checkAndHandleExpiredSession()&&t&&this.Ue(t)}Me(t=Date.now()){this.de=t}De(t=Date.now()){this.session&&(this.session.lastActivity=t,this.Fe())}Ue(t){this.addUpdate(()=>{this.throttledAddEvent({type:Lc.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}ze(){let t=(e=this.performanceEntries,e.map(Ku).filter(Boolean)).concat(this.replayPerformanceEntries);var e;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this.me){const e=this.ge.initialTimestamp/1e3;t=t.filter(t=>t.start>=e)}return Promise.all(Ol(this,t))}Pe(){this.ge.errorIds.clear(),this.ge.traceIds.clear(),this.ge.urls=[]}qe(){const{session:t,eventBuffer:e}=this;if(!t||!e||this.me)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&nthis.st.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this.He(),r=this.session.segmentId++;this.Fe();const i=await this.eventBuffer.finish();await ef({replayId:t,recordingData:i,segmentId:r,eventContext:n,session:this.session,timestamp:e,onError:t=>this.handleException(t)})}catch(t){this.handleException(t),this.stop({reason:"sendReplay"});const e=Ft();if(e){const n=t instanceof tf?"ratelimit_backoff":"send_error";e.recordDroppedEvent(n,"replay")}}}async ke({force:t=!1}={}){if(!this.gt&&!t)return;if(!this.checkAndHandleExpiredSession())return;if(!this.session)return;const e=this.session.started,n=Date.now()-e;this.be.cancel();const r=nthis.st.maxReplayDuration+5e3;if(r||i)return void(r&&this.be());const s=!!this.Je;this.Je||(this.Je=this.We());try{await this.Je}catch(t){this.handleException(t)}finally{this.Je=void 0,s&&this.be()}}Fe(){this.session&&this.st.stickySession&&hl(this.session)}Ae(t){const{ignoreMutations:e}=this.st._experiments;if(e?.length&&t.some(t=>{const n=function(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}(t.target),r=e.join(",");return n?.matches(r)}))return!1;const n=t.length,r=this.st.mutationLimit,i=r&&n>r;if(n>this.st.mutationBreadcrumbLimit||i){const t=Nu({category:"replay.mutations",data:{count:n,limit:i}});this.Ue(t)}return!i||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function of(t,e){return[...t,...e].join(",")}const af='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',cf=["content-length","content-type","accept"];let uf=!1;class lf{constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:i=!0,useCompression:s=!0,workerUrl:o,_experiments:a={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:d=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:k=[],maskAttributes:w=["title","placeholder","aria-label"],unmask:S=[],block:_=[],unblock:T=[],ignore:I=[],maskFn:x,beforeAddRecordingEvent:E,beforeErrorSampling:C,onError:R}={}){this.name="Replay";const M=function({mask:t,unmask:e,block:n,unblock:r,ignore:i}){return{maskTextSelector:of(t,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:of(e,[]),blockSelector:of(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:of(r,[]),ignoreSelector:of(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:k,unmask:S,block:_,unblock:T,ignore:I});if(this.ve={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(t,e,n)=>function({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){return r?i.unmaskTextSelector&&t.matches(i.unmaskTextSelector)?s:n.includes(e)||"value"===e&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:w,maskAllText:c,privacyOptions:M,key:t,value:e,el:n}),...M,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch{}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this.Ke={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,ga),stickySession:i,useCompression:s,workerUrl:o,blockAllMedia:l,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:d,slowClickIgnoreSelectors:p,networkDetailAllowUrls:m,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:ff(v),networkResponseHeaders:ff(b),beforeAddRecordingEvent:E,beforeErrorSampling:C,onError:R,_experiments:a},this.Ke.blockAllMedia&&(this.ve.blockSelector=this.ve.blockSelector?`${this.ve.blockSelector},${af}`:af),this.Ge&&Vr())throw new Error("Multiple Sentry Session Replay instances are not supported");this.Ge=!0}get Ge(){return uf}set Ge(t){uf=t}afterAllSetup(t){Vr()&&!this._replay&&(this.Xe(t),this.Ye(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}Ye(t){this._replay&&(this.Ve(t),this._replay.initializeSampling())}Xe(t){const e=function(t,e){const n=e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...t},i=se(n.replaysSessionSampleRate),s=se(n.replaysOnErrorSampleRate);null==i&&null==s&&c(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")});null!=i&&(r.sessionSampleRate=i);null!=s&&(r.errorSampleRate=s);return r}(this.Ke,t);this._replay=new sf({options:e,recordingOptions:this.ve})}Ve(t){try{const e=t.getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch{}}}function ff(t){return[...cf,...t.map(t=>t.toLowerCase())]}return Ee(),t.BrowserClient=bi,t.SDK_VERSION=n,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=Ut,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=zt,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=jt,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=Nt,t.Scope=It,t.WINDOW=ei,t.addBreadcrumb=mr,t.addEventProcessor=Pn,t.addIntegration=function(t){const e=Ft();e&&e.addIntegration(t)},t.breadcrumbsIntegration=Oo,t.browserApiErrorsIntegration=$o,t.browserTracingIntegration=(t={})=>{const n={name:void 0,source:void 0},r=ei.document,{enableInp:i,enableElementTiming:s,enableLongTask:o,enableLongAnimationFrame:a,_experiments:{enableInteractions:c,enableStandaloneClsSpans:u,enableStandaloneLcpSpans:l},beforeStartSpan:f,idleTimeout:h,finalTimeout:d,childSpanTimeout:p,markBackgroundSpan:m,traceFetch:y,traceXHR:g,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:b,enableHTTPTimings:k,ignoreResourceSpans:w,ignorePerformanceApiSpans:S,instrumentPageLoad:_,instrumentNavigation:T,detectRedirects:I,linkPreviousTrace:x,consistentTraceSampling:E,onRequestSpanStart:C}={...ra,...t};let R,M;function O(t,e,i=!0){const s="pageload"===e.op,o=f?f(e):e,a=o.attributes||{};if(e.name!==o.name&&(a[Nt]="custom",o.attributes=a),!i){const t=ht();return void ln({...o,startTime:t}).end(t)}n.name=o.name,n.source=a[Nt];const c=bn(o,{idleTimeout:h,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:s,beforeSpanEnd:e=>{R?.(),Ps(e,{recordClsOnPageloadSpan:!u,recordLcpOnPageloadSpan:!l,ignoreResourceSpans:w,ignorePerformanceApiSpans:S}),ua(t,void 0);const n=At(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:c.spanContext().traceId,sampled:ge(c),dsc:je(e)})}});function m(){r&&["interactive","complete"].includes(r.readyState)&&t.emit("idleSpanEnableAutoFinish",c)}ua(t,c),s&&r&&(r.addEventListener("readystatechange",()=>{m()}),m())}return{name:"BrowserTracing",setup(t){if(Ee(),R=Fs({recordClsStandaloneSpans:u||!1,recordLcpStandaloneSpans:l||!1,client:t}),i&&co(),s&&Is()&&yt()&&hs("element",Bs),a&&e.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(t=>{const e=Te();if(e)for(const n of t.getEntries()){if(!n.scripts[0])continue;const t=xs(yt()+n.startTime),{start_timestamp:r,op:i}=ye(e);if("navigation"===i&&r&&t{const e=Te();if(!e)return;const{op:n,start_timestamp:r}=ye(e);for(const i of t){const t=xs(yt()+i.startTime),s=xs(i.duration);"navigation"===n&&r&&t{const e=Te();if(e)for(const n of t)if("click"===n.name){const t=xs(yt()+n.startTime),r=xs(n.duration),i={name:W(n.target),op:`ui.interaction.${n.name}`,startTime:t,attributes:{[zt]:"auto.ui.browser.metrics"}},s=G(n.target);s&&(i.attributes["ui.component_name"]=s),_s(e,t,t+r,i)}}),I&&r){const t=()=>{M=mt()};addEventListener("click",t,{capture:!0}),addEventListener("keydown",t,{capture:!0,passive:!0})}function n(){const e=ca(t);e&&!ye(e).timestamp&&(e.setAttribute(qt,"cancelled"),e.end())}t.on("startNavigationSpan",(e,r)=>{if(Ft()!==t)return;if(r?.isRedirect)return void O(t,{op:"navigation.redirect",...e},!1);n(),$t().setPropagationContext({traceId:kt(),sampleRand:Math.random()});const i=At();i.setPropagationContext({traceId:kt(),sampleRand:Math.random()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),O(t,{op:"navigation",...e})}),t.on("startPageLoadSpan",(e,r={})=>{if(Ft()!==t)return;n();const i=ae(r.sentryTrace||oa("sentry-trace"),r.baggage||oa("baggage")),s=At();s.setPropagationContext(i),s.setSDKProcessingMetadata({normalizedRequest:si()}),O(t,{op:"pageload",...e})})},afterAllSetup(t){let e=K();if("off"!==x&&Go(t,{linkPreviousTrace:x,consistentTraceSampling:E}),ei.location){if(_){const e=yt();ia(t,{name:ei.location.pathname,startTime:e?e/1e3:void 0,attributes:{[Nt]:"url",[zt]:"auto.pageload.browser"}})}T&&Gs(({to:n,from:r})=>{if(void 0===r&&-1!==e?.indexOf(n))return void(e=void 0);e=void 0;const i=Dr(n),s=ca(t),o=s&&I&&function(t,e){const n=ye(t),r=ht(),i=n.start_timestamp;if(r-i>la)return!1;if(e&&r-e<=la)return!1;return!0}(s,M);sa(t,{name:i?.pathname||ei.location.pathname,attributes:{[Nt]:"url",[zt]:"auto.navigation.browser"}},{url:n,isRedirect:o})})}m&&ei.document&&ei.document.addEventListener("visibilitychange",()=>{const t=Te();if(!t)return;const e=_e(t);if(ei.document.hidden&&e){const t="cancelled",{status:n}=ye(e);n||e.setStatus({code:2,message:t}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}),c&&function(t,e,n,r,i){const s=ei.document;let o;const a=()=>{const s="ui.action.click",a=ca(t);if(a){const t=ye(a).op;if(["navigation","pageload"].includes(t))return}o&&(o.setAttribute(qt,"interactionInterrupted"),o.end(),o=void 0),i.name&&(o=bn({name:i.name,op:s,attributes:{[Nt]:i.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r}))};s&&addEventListener("click",a,{capture:!0})}(t,h,d,p,n),i&&function(){const t=({entries:t})=>{const e=Te(),n=e&&_e(e);t.forEach(t=>{if(!function(t){return"duration"in t}(t)||!n)return;const e=t.interactionId;if(null!=e&&!ao.has(e)){if(oo.length>10){const t=oo.shift();ao.delete(t)}oo.push(e),ao.set(e,n)}})};hs("event",t),hs("first-input",t)}(),ta(t,{traceFetch:y,traceXHR:g,trackFetchStreamPerformance:v,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:k,onRequestSpanStart:C})}}},t.captureEvent=$n,t.captureException=captureException,t.captureFeedback=function(t,e={},n=At()){const{message:r,name:i,email:s,url:o,source:a,associatedEventId:c,tags:u}=t,l={contexts:{feedback:{contact_email:s,name:i,message:r,url:o,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},f=n?.getClient()||Ft();return f&&f.emit("beforeSendFeedback",l,e),n.captureEvent(l,e)},t.captureMessage=function(t,e){const n="string"==typeof e?e:void 0,r="string"!=typeof e?{captureContext:e}:void 0;return At().captureMessage(t,n,r)},t.captureSession=Un,t.chromeStackLineParser=go,t.close=async function(t){const e=Ft();return e?e.close(t):Promise.resolve(!1)},t.continueTrace=(t,e)=>{const n=Ot(r());if(n.continueTrace)return n.continueTrace(t,e);const{sentryTrace:i,baggage:s}=t;return Dt(t=>{const n=ae(i,s);return t.setPropagationContext(n),e()})},t.createTransport=cr,t.createUserFeedbackEnvelope=function(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...e?.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:Ae(r)}},s=function(t){return[{type:"user_report"},t]}(t);return He(i,[s])},t.dedupeIntegration=Mr,t.defaultStackLineParsers=Eo,t.defaultStackParser=Co,t.endSession=jn,t.eventFiltersIntegration=kr,t.eventFromException=pi,t.eventFromMessage=mi,t.exceptionFromError=oi,t.feedbackAsyncIntegration=ti,t.feedbackIntegration=ti,t.flush=async function(t){const e=Ft();return e?e.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=vr,t.geckoStackLineParser=ko,t.getActiveSpan=Te,t.getClient=Ft,t.getCurrentScope=At,t.getDefaultIntegrations=qo,t.getGlobalScope=Lt,t.getIsolationScope=$t,t.getReplay=function(){const t=Ft();return t?.getIntegrationByName("Replay")},t.getRootSpan=_e,t.getSpanDescendants=Se,t.getTraceData=dr,t.globalHandlersIntegration=No,t.httpContextIntegration=Bo,t.inboundFiltersIntegration=wr,t.init=function(t={}){const e=!t.skipBrowserExtensionCheck&&zo(),n={...t,enabled:!e&&t.enabled,stackParser:(r=t.stackParser||Co,Array.isArray(r)?p(...r):r),integrations:Wn({integrations:t.integrations,defaultIntegrations:null==t.defaultIntegrations?qo():t.defaultIntegrations}),transport:t.transport||fo};var r;return function(t,e){!0===e.debug&&c(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}),At().update(e.initialScope);const n=new t(e);return rr(n),n.init(),n}(bi,n)},t.isEnabled=Fn,t.isInitialized=function(){return!!Ft()},t.lastEventId=Dn,t.lazyLoadIntegration=async function(t,e){const r=Ho[t],i=Wo.Sentry=Wo.Sentry||{};if(!r)throw new Error(`Cannot lazy load integration: ${t}`);const s=i[t];if("function"==typeof s&&!("_isShim"in s))return s;const o=function(t){const e=Ft(),r=e?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${n}/${t}.min.js`,r).toString()}(r),a=ei.document.createElement("script");a.src=o,a.crossOrigin="anonymous",a.referrerPolicy="strict-origin",e&&a.setAttribute("nonce",e);const c=new Promise((t,e)=>{a.addEventListener("load",()=>t()),a.addEventListener("error",e)}),u=ei.document.currentScript,l=ei.document.body||ei.document.head||u?.parentElement;if(!l)throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);l.appendChild(a);try{await c}catch{throw new Error(`Error when loading integration: ${t}`)}const f=i[t];if("function"!=typeof f)throw new Error(`Could not load integration: ${t}`);return f},t.linkedErrorsIntegration=Uo,t.makeFetchTransport=fo,t.onLoad=function(t){t()},t.opera10StackLineParser=To,t.opera11StackLineParser=xo,t.parameterize=function(t,...e){const n=new String(String.raw(t,...e));return n.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=e,n},t.replayIntegration=t=>new lf(t),t.setContext=Ln,t.setCurrentClient=rr,t.setExtra=function(t,e){$t().setExtra(t,e)},t.setExtras=function(t){$t().setExtras(t)},t.setMeasurement=en,t.setTag=function(t,e){$t().setTag(t,e)},t.setTags=function(t){$t().setTags(t)},t.setUser=function(t){$t().setUser(t)},t.showReportDialog=function(t={}){const e=ei.document,n=e?.head||e?.body;if(!n)return;const r=At(),i=Ft(),s=i?.getDsn();if(!s)return;const o={...t,user:{...r.getUser(),...t.user},eventId:t.eventId||Dn()},a=ei.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=function(t,e){const n=Le(t);if(!n)return"";const r=`${zn(n)}embed/error-page/`;let i=`dsn=${Ae(n)}`;for(const t in e)if("dsn"!==t&&"onClose"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(s,o);const{onLoad:c,onClose:u}=o;if(c&&(a.onload=c),u){const t=e=>{if("__sentry_reportdialog_closed__"===e.data)try{u()}finally{ei.removeEventListener("message",t)}};ei.addEventListener("message",t)}n.appendChild(a)},t.spanToBaggageHeader=function(t){return re(je(t))},t.spanToJSON=ye,t.spanToTraceHeader=he,t.startBrowserTracingNavigationSpan=sa,t.startBrowserTracingPageLoadSpan=ia,t.startInactiveSpan=ln,t.startNewTrace=function(t){return Dt(e=>(e.setPropagationContext({traceId:kt(),sampleRand:Math.random()}),fn(null,t)))},t.startSession=Nn,t.startSpan=un,t.startSpanManual=function(t,e){const n=pn();if(n.startSpanManual)return n.startSpanManual(t,e);const r=dn(t),{forceTransaction:i,parentSpan:s,scope:o}=t,a=o?.clone();return Dt(a,()=>gn(s)(()=>{const n=At(),o=yn(n,s),a=t.onlyIfParent&&!o?new Be:hn({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return _t(n,a),an(()=>e(a,()=>a.end()),()=>{const{status:t}=ye(a);!a.isRecording()||t&&"ok"!==t||a.setStatus({code:2,message:"internal_error"})})}))},t.suppressTracing=function(t){const e=pn();return e.suppressTracing?e.suppressTracing(t):Dt(e=>{e.setSDKProcessingMetadata({[cn]:!0});const n=t();return e.setSDKProcessingMetadata({[cn]:void 0}),n})},t.updateSpanName=function(t,e){t.updateName(e),t.setAttributes({[Nt]:"custom",[Jt]:e})},t.winjsStackLineParser=So,t.withActiveSpan=fn,t.withIsolationScope=function(...t){const e=Ot(r());if(2===t.length){const[n,r]=t;return n?e.withSetIsolationScope(n,r):e.withIsolationScope(r)}return e.withIsolationScope(t[0])},t.withScope=Dt,t}({}); //# sourceMappingURL=bundle.tracing.replay.min.js.map