1(globalThis.webpackChunkcgtrader=globalThis.webpackChunkcgtrader||[]).push([[13326],{81797(e,t,n){"use strict";n.r(t),n.d(t,{Breadcrumbs:()=>Co,BrowserClient:()=>Cs,BrowserProfilingIntegration:()=>Yh,BrowserTracing:()=>ah,Dedupe:()=>Mo,Feedback:()=>Zd,FunctionToString:()=>Vt,GlobalHandlers:()=>$o,HttpContext:()=>zo,Hub:()=>We,InboundFilters:()=>Qt,Integrations:()=>Jh,LinkedErrors:()=>Go,ModuleMetadata:()=>On,Replay:()=>Wl,ReplayCanvas:()=>xd,SDK_VERSION:()=>He,SEMANTIC_ATTRIBUTE_SENTRY_OP:()=>Ln,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:()=>Nn,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:()=>Dn,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:()=>An,Scope:()=>je,TryCatch:()=>Ko,WINDOW:()=>ls,addBreadcrumb:()=>yt,addEventProcessor:()=>Jn,addGlobalEventProcessor:()=>pe,addIntegration:()=>Ht,addTracingExtensions:()=>Hr,breadcrumbsIntegration:()=>Eo,browserApiErrorsIntegration:()=>Jo,browserProfilingIntegration:()=>Gh,browserTracingIntegration:()=>dh,captureConsoleIntegration:()=>ep,captureEvent:()=>mt,captureException:()=>ht,captureMessage:()=>ft,captureSession:()=>$t,captureUserFeedback:()=>ci,chromeStackLineParser:()=>Bs,close:()=>Rt,configureScope:()=>gt,contextLinesIntegration:()=>rp,continueTrace:()=>_r,createTransport:()=>Yr,createUserFeedbackEnvelope:()=>Es,debugIntegration:()=>op,dedupeIntegration:()=>cp,defaultIntegrations:()=>ti,defaultRequestInstrumentationOptions:()=>th,defaultStackLineParsers:()=>Js,defaultStackParser:()=>Ks,endSession:()=>Nt,eventFromException:()=>Ss,eventFromMessage:()=>ks,exceptionFromError:()=>gs,extraErrorDataIntegration:()=>fp,extractTraceparentData:()=>cr,feedbackIntegration:()=>Xd,flush:()=>It,forceLoad:()=>oi,functionToStringIntegration:()=>Yt,geckoStackLineParser:()=>Hs,getActiveSpan:()=>yr,getActiveTransaction:()=>ar,getClient:()=>Ot,getCurrentHub:()=>Ve,getCurrentScope:()=>Dt,getDefaultIntegrations:()=>ni,getHubFromCarrier:()=>Qe,getReplay:()=>Yl,getSpanStatusFromHttpCode:()=>Cr,globalHandlersIntegration:()=>Po,httpClientIntegration:()=>gp,httpContextIntegration:()=>Ho,inboundFiltersIntegration:()=>Zt,init:()=>ri,instrumentOutgoingRequests:()=>nh,isInitialized:()=>At,lastEventId:()=>Mt,linkedErrorsIntegration:()=>Wo,makeBrowserOfflineTransport:()=>Sh,makeFetchTransport:()=>Ds,makeMain:()=>Ye,makeMultiplexedTransport:()=>Kr,makeXHRTransport:()=>Ls,metrics:()=>is,moduleMetadataIntegration:()=>Mn,onLoad:()=>ii,onProfilingStartRouteTransaction:()=>zh,opera10StackLineParser:()=>Gs,opera11StackLineParser:()=>Vs,parameterize:()=>as,replayCanvasIntegration:()=>wd,replayIntegration:()=>ql,reportingObserverIntegration:()=>Tp,rewriteFramesIntegration:()=>Ap,sendFeedback:()=>Nd,sessionTimingIntegration:()=>Lp,setContext:()=>_t,setCurrentClient:()=>cs,setExtra:()=>bt,setExtras:()=>vt,setHttpStatus:()=>Rr,setMeasurement:()=>us,setTag:()=>kt,setTags:()=>St,setUser:()=>wt,showReportDialog:()=>si,spanStatusfromHttpCode:()=>Ir,startBrowserTracingNavigationSpan:()=>hh,startBrowserTracingPageLoadSpan:()=>ph,startInactiveSpan:()=>gr,startSession:()=>Lt,startSpan:()=>fr,startSpanManual:()=>mr,startTransaction:()=>Ct,trace:()=>hr,winjsStackLineParser:()=>qs,withActiveSpan:()=>Et,withIsolationScope:()=>Tt,withScope:()=>xt,wrap:()=>ai});var r={};n.r(r),n.d(r,{FunctionToString:()=>Vt,InboundFilters:()=>Qt,LinkedErrors:()=>un});var s={};n.r(s),n.d(s,{Breadcrumbs:()=>Co,Dedupe:()=>Mo,GlobalHandlers:()=>$o,HttpContext:()=>zo,LinkedErrors:()=>Go,TryCatch:()=>Ko});const o=Object.prototype.toString;function i(e){switch(o.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return y(e,Error)}}function a(e,t){return o.call(e)===`[object ${t}]`}function c(e){return a(e,"ErrorEvent")}function u(e){return a(e,"DOMError")}function l(e){return a(e,"String")}function d(e){return"object"===typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function p(e){return null===e||d(e)||"object"!==typeof e&&"function"!==typeof e}function h(e){return a(e,"Object")}function f(e){return"undefined"!==typeof Event&&y(e,Event)}function m(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function g(e){return"number"===typeof e&&e!==e}function y(e,t){try{return e instanceof t}catch(n){return!1}}function _(e){return!("object"!==typeof e||null===e||!e.__isVue&&!e._isVue)}function v(e){return e&&e.Math==Math?e:void 0}const b="object"==typeof globalThis&&v(globalThis)||"object"==typeof window&&v(window)||"object"==typeof self&&v(self)||"object"==typeof globalThis&&v(globalThis)||function(){return this}()||{};function S(){return b}
1function k(e,t,n){const r=n||b,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const w=S();function x(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(u=T(n,l),!("html"===u||o>1&&i+s.length*c+u.length>=d));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch(n){return"<unknown>"}}function T(e,t){const n=e,r=[];let s,o,i,a,c;if(!n||!n.tagName)return"";if(w.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(u&&u.length)u.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&l(s))for(o=s.split(/\s+/),c=0;c<o.length;c++)r.push(`.${o[c]}`);const d=["aria-label","type","name","title","alt"];for(c=0;c<d.length;c++)i=d[c],a=n.getAttribute(i),a&&r.push(`[${i}="${a}"]`);return r.join("")}function E(){try{return w.document.location.href}catch(e){return""}}function C(e){return w.document&&w.document.querySelector?w.document.querySelector(e):null}function I(e){if(!w.HTMLElement)return null;let t=e;for(let n=0;n<5;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const R="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,M=["debug","info","warn","error","log","assert","trace"],O={};function A(e){if(!("console"in b))return e();const t=b.console,n={},r=Object.keys(O);r.forEach(e=>{const r=O[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}const D=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return R?M.forEach(n=>{t[n]=(...t)=>{e&&A(()=>{b.console[n](`Sentry Logger [${n}]:`,...t)})}}):M.forEach(e=>{t[e]=()=>{}}),t}();function L(e,t=0){return"string"!==typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function N(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let s=Math.max(t-60,0);s<5&&(s=0);let o=Math.min(s+140,r);return o>r-5&&(o=r),o===r&&(s=Math.max(o-140,0)),n=n.slice(s,o),s>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function P(e,t){if(!Array.isArray(e))return"";const n=[];for(let s=0;s<e.length;s++){const t=e[s];try{_(t)?n.push("[VueViewModel]"):n.push(String(t))}catch(r){n.push("[value cannot be serialized]")}}return n.join(t)}function $(e,t,n=!1){return!!l(e)&&(a(t,"RegExp")?t.test(e):!!l(t)&&(n?e===t:e.includes(t)))}function F(e,t=[],n=!1){return t.some(t=>$(e,t,n))}function B(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);"function"===typeof s&&U(s,r),e[t]=s}function j(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(r){R&&D.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function U(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,j(e,"__sentry_original__",t)}catch(n){}}function H(e){return e.__sentry_original__}function z(e){if(i(e))return{message:e.message,name:e.name,stack:e.stack,...W(e)};if(f(e)){const t={type:e.type,target:q(e.target),currentTarget:q(e.currentTarget),...W(e)};return"undefined"!==typeof CustomEvent&&y(e,CustomEvent)&&(t.detail=e.detail),t}return e}function q(e){try{return t=e,"undefined"!==typeof Element&&y(t,Element)?x(e):Object.prototype.toString.call(e)}catch(n){return"<unknown>"}var t}function W(e){if("object"===typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function G(e){return Y(e,new Map)}function Y(e,t){if(function(e){if(!h(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(t){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const s of Object.keys(e))"undefined"!==typeof e[s]&&(r[s]=Y(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach(e=>{r.push(Y(e,t))}),r}return e}const V="production",J="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function K(){const e=b,t=e.crypto||e.msCrypto;let n=()=>
116*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(r){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function X(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Z(e){const{message:t,event_id:n}=e;if(t)return t;const r=X(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Q(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function ee(e,t){const n=X(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function te(e){if(e&&e.__sentry_captured__)return!0;try{j(e,"__sentry_captured__",!0)}catch(t){}return!1}function ne(e){return Array.isArray(e)?e:[e]}function re(){return Date.now()/1e3}const se=function(){const{performance:e}=b;if(!e||!e.now)return re;const t=Date.now()-e.now(),n=void 0==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();let oe;const ie=(()=>{const{performance:e}=b;if(!e||!e.now)return void(oe="none");const t=36e5,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,a="number"===typeof i?Math.abs(i+n-r):t;return o||a<t?s<=a?(oe="timeOrigin",e.timeOrigin):(oe="navigationStart",i):(oe="dateNow",r)})();var ae;function ce(e){return new le(t=>{t(e)})}function ue(e){return new le((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(ae||(ae={}));class le{constructor(e){le.prototype.__init.call(this),le.prototype.__init2.call(this),le.prototype.__init3.call(this),le.prototype.__init4.call(this),this._state=ae.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new le((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(s){r(s)}else n(t)},e=>{if(t)try{n(t(e))}catch(s){r(s)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new le((t,n)=>{let r,s;return this.then(t=>{s=!1,r=t,e&&e()},t=>{s=!0,r=t,e&&e()}).then(()=>{s?n(r):t(r)})})}__init(){this._resolve=e=>{this._setResult(ae.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(ae.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===ae.PENDING&&(m(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===ae.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===ae.RESOLVED&&e[1](this._value),this._state===ae.REJECTED&&e[2](this._value),e[0]=!0)})}}}function de(){return k("globalEventProcessors",()=>[])}function pe(e){de().push(e)}function he(e,t,n,r=0){return new le((s,o)=>{const i=e[r];if(null===t||"function"!==typeof i)s(t);else{const a=i({...t},n);J&&i.id&&null===a&&D.log(`Event processor "${i.id}" dropped event`),m(a)?a.then(t=>he(e,t,n,r+1).then(s)).then(null,o):he(e,a,n,r+1).then(s).then(null,o)}})}function fe(e){const t=se(),n={sid:K(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return G({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&me(n,e),n}function me(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||se(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:K()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ge(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),me(e,n)}function ye(e){return e.transaction}const _e="baggage",ve="sentry-",be=/^sentry-/;function Se(e){if(!l(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>
1{const n=we(t);for(const r of Object.keys(n))e[r]=n[r];return e},{});else{if(!e)return;t=we(e)}const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(be)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function ke(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce((e,[t,n],r)=>{const s=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===r?s:`${e},${s}`;return o.length>8192?(R&&D.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${ve}${t}`]=n),e),{}))}function we(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(e[t]=n,e),{})}const xe=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Te(e){if(!e)return;const t=e.match(xe);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Ee(e,t){const n=Te(e),r=Se(t),{traceId:s,parentSpanId:o,parentSampled:i}=n||{};return n?{traceId:s||K(),parentSpanId:o||K().substring(16),spanId:K().substring(16),sampled:i,dsc:r||{}}:{traceId:s||K(),spanId:K().substring(16)}}function Ce(e=K(),t=K().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Ie(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,tags:a,origin:c}=Ae(e);return G({data:r,op:s,parent_span_id:o,span_id:t,status:i,tags:a,trace_id:n,origin:c})}function Re(e){const{traceId:t,spanId:n}=e.spanContext();return Ce(t,n,De(e))}function Me(e){return"number"===typeof e?Oe(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Oe(e.getTime()):se()}function Oe(e){return e>9999999999?e/1e3:e}function Ae(e){return function(e){return"function"===typeof e.getSpanJSON}(e)?e.getSpanJSON():"function"===typeof e.toJSON?e.toJSON():{}}function De(e){const{traceFlags:t}=e.spanContext();return Boolean(1&t)}function Le(e,t,n){const r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},i=G({environment:r.environment||V,release:r.release,user_segment:o,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",i),i}function Ne(e){const t=Ot();if(!t)return{};const n=Le(Ae(e).trace_id||"",t,Dt()),r=ye(e);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:o,source:i}=r.metadata;null!=o&&(n.sample_rate=`${o}`);const a=Ae(r);return i&&"url"!==i&&(n.transaction=a.description),n.sampled=String(De(r)),t.emit&&t.emit("createDsc",n),n}function Pe(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=G(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=G(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const l=G(s);l&&Object.keys(l).length&&(e.user={...l,...e.user});const d=G(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts});i&&(e.level=i);a&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Ie(t),...e.contexts};const n=ye(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Ne(t),...e.sdkProcessingMetadata};const r=Ae(n).description;r&&(e.tags={transaction:r,...e.tags})}}(e,r),function(e,t){e.fingerprint=e.fingerprint?ne(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,s),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function $e(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:f}=t;Fe(e,"extra",n),Fe(e,"tags",r),Fe(e,"user",s),Fe(e,"contexts",o),Fe(e,"sdkProcessingMetadata",a),i&&(e.level=i),h&&(e.transactionName=h),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Fe(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}let Be;class je{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Ue()}static clone(e){return e?e.clone():new je}clone(){const e=new je;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&me(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"===typeof e?e(this):e;if(t instanceof je){const e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(h(t)){const t=e;this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Ue(),this}addBreadcrumb(e,t){const n="number"===typeof t?t:100;if(n<=0)return this;const r={timestamp:re(),...e},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>n?s.slice(-n):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}
1getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:s,_user:o,_level:i,_fingerprint:a,_eventProcessors:c,_propagationContext:u,_sdkProcessingMetadata:l,_transactionName:d,_span:p}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:s,user:o,level:i,fingerprint:a||[],eventProcessors:c,propagationContext:u,sdkProcessingMetadata:l,transactionName:d,span:p}}applyToEvent(e,t={},n=[]){Pe(e,this.getScopeData());return he([...n,...de(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:K();if(!this._client)return D.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:K();if(!this._client)return D.warn("No client configured on scope - will not capture message!"),r;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:K();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(D.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function Ue(){return{traceId:K(),spanId:K().substring(16)}}const He="7.120.3",ze=parseFloat(He),qe=100;class We{constructor(e,t,n,r=ze){let s,o;this._version=r,t?s=t:(s=new je,s.setClient(e)),n?o=n:(o=new je,o.setClient(e)),this._stack=[{scope:s}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version<e}bindClient(e){const t=this.getStackTop();t.client=e,t.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();let n;try{n=e(t)}catch(r){throw this.popScope(),r}return m(n)?n.then(e=>(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:K(),r=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:K(),s=new Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:K();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=qe}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const i={timestamp:re(),...e},a=s?A(()=>s(i,t)):i;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,t),n.addBreadcrumb(a,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}
1setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=Ye(this);try{e(this)}finally{Ye(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return J&&D.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(J&&!n){this.getClient()?D.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):D.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&ge(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:s=V}=n&&n.getOptions()||{},{userAgent:o}=b.navigator||{},i=fe({release:r,environment:s,user:t.getUser(),...o&&{userAgent:o},...e}),a=t.getSession&&t.getSession();return a&&"ok"===a.status&&me(a,{status:"exited"}),this.endSession(),t.setSession(i),i}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){const n=Ge().__SENTRY__;if(n&&n.extensions&&"function"===typeof n.extensions[e])return n.extensions[e].apply(this,t);J&&D.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function Ge(){return b.__SENTRY__=b.__SENTRY__||{extensions:{},hub:void 0},b}
1function Ye(e){const t=Ge(),n=Qe(t);return et(t,e),n}function Ve(){const e=Ge();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Ke(e)}function Je(){return Ve().getIsolationScope()}function Ke(e=Ge()){return Ze(e)&&!Qe(e).isOlderThan(ze)||et(e,new We),Qe(e)}function Xe(e,t={}){const n=Ge();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(e,t):e()}function Ze(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Qe(e){return k("hub",()=>new We,e)}function et(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}const tt=/\(error: (.*)\)/,nt=/captureMessage|captureException/;function rt(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{const r=[],s=e.split("\n");for(let o=n;o<s.length;o++){const e=s[o];if(e.length>1024)continue;const n=tt.test(e)?e.replace(tt,"$1"):e;if(!n.match(/\S*Error: /)){for(const e of t){const t=e(n);if(t){r.push(t);break}}if(r.length>=50)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop();t.reverse(),nt.test(t[t.length-1].function||"")&&(t.pop(),nt.test(t[t.length-1].function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"}))}(r)}}const st="<anonymous>";function ot(e){try{return e&&"function"===typeof e&&e.name||st}catch(t){return st}}function it(e,t=100,n=1/0){try{return ct("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function at(e,t=3,n=102400){const r=it(e,t);return s=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(s))>n?at(e,t-1,n):r;var s}function ct(e,t,n=1/0,r=1/0,s=function(){const e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,i]=s;if(null==t||["number","boolean","string"].includes(typeof t)&&!g(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"===typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!==typeof globalThis&&t===globalThis)return"[Global]";if("undefined"!==typeof window&&t===window)return"[Window]";if("undefined"!==typeof document&&t===document)return"[Document]";if(_(t))return"[VueViewModel]";if(h(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"===typeof t&&t!==t)return"[NaN]";if("function"===typeof t)return`[Function: ${ot(t)}]`;if("symbol"===typeof t)return`[${String(t)}]`;if("bigint"===typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var n}(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"===typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&"function"===typeof u.toJSON)try{return ct("",u.toJSON(),c-1,r,s)}catch(f){}const l=Array.isArray(t)?[]:{};let d=0;const p=z(t);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(d>=r){l[h]="[MaxProperties ~]";break}const e=p[h];l[h]=ct(h,e,c-1,r,s),d++}return i(t),l}function ut(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||K(),timestamp:t.timestamp||re()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:V);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==s&&(e.dist=s);e.message&&(e.message=L(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=L(i.value,o));const a=e.request;a&&a.url&&(a.url=L(a.url,o))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{}
1,e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),void 0===t.type&&function(e,t){const n=b._sentryDebugIds;if(!n)return;let r;const s=lt.get(t);s?r=s:(r=new Map,lt.set(t,r));const o=Object.keys(n).reduce((e,s)=>{let o;const i=r.get(s);i?o=i:(o=t(s),r.set(s,o));for(let t=o.length-1;t>=0;t--){const r=o[t];if(r.filename){e[r.filename]=n[s];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=o[e.filename])})})}catch(i){}}(c,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new je;return n.update(t),n}(r,n.captureContext);n.mechanism&&ee(c,n.mechanism);const d=s&&s.getEventProcessors?s.getEventProcessors():[],p=(Be||(Be=new je),Be).getScopeData();if(o){$e(p,o.getScopeData())}if(l){$e(p,l.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),Pe(c,p);return he([...d,...de(),...p.eventProcessors],c,n).then(e=>(e&&function(e){const t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch(r){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})})}(e),"number"===typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:it(e.data,t,n)}}))},...e.user&&{user:it(e.user,t,n)},...e.contexts&&{contexts:it(e.contexts,t,n)},...e.extra&&{extra:it(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=it(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>{const r=Ae(e).data;return r&&(e.data=it(r,t,n)),e}));return r}(e,i,a):e))}const lt=new WeakMap;function dt(e){if(e)return function(e){return e instanceof je||"function"===typeof e}(e)||function(e){return Object.keys(e).some(e=>pt.includes(e))}(e)?{captureContext:e}:e}const pt=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function ht(e,t){return Ve().captureException(e,dt(t))}function ft(e,t){const n="string"===typeof t?t:void 0,r="string"!==typeof t?{captureContext:t}:void 0;return Ve().captureMessage(e,n,r)}function mt(e,t){return Ve().captureEvent(e,t)}function gt(e){Ve().configureScope(e)}function yt(e,t){Ve().addBreadcrumb(e,t)}function _t(e,t){Ve().setContext(e,t)}function vt(e){Ve().setExtras(e)}function bt(e,t){Ve().setExtra(e,t)}function St(e){Ve().setTags(e)}function kt(e,t){Ve().setTag(e,t)}function wt(e){Ve().setUser(e)}function xt(...e){const t=Ve();if(2===e.length){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function Tt(e){return Xe(()=>e(Je()))}function Et(e,t){return xt(n=>(n.setSpan(e),t(n)))}function Ct(e,t){return Ve().startTransaction({...e},t)}async function It(e){const t=Ot();return t?t.flush(e):(J&&D.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Rt(e){const t=Ot();return t?t.close(e):(J&&D.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function Mt(){return Ve().lastEventId()}function Ot(){return Ve().getClient()}function At(){return!!Ot()}function Dt(){return Ve().getScope()}function Lt(e){const t=Ot(),n=Je(),r=Dt(),{release:s,environment:o=V}=t&&t.getOptions()||{},{userAgent:i}=b.navigator||{},a=fe({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&"ok"===c.status&&me(c,{status:"exited"}),Nt(),n.setSession(a),r.setSession(a),a}function Nt(){const e=Je(),t=Dt(),n=t.getSession()||e.getSession();n&&ge(n),Pt(),e.setSession(),t.setSession()}function Pt(){const e=Je(),t=Dt(),n=Ot(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function $t(e=!1){e?Nt():Pt()}const Ft=[];function Bt(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;
1t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"===typeof n?ne(n(t)):t;const s=function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.keys(t).map(e=>t[e])}(r),o=function(e,t){for(let n=0;n<e.length;n++)if(!0===t(e[n]))return n;return-1}(s,e=>"Debug"===e.name);if(-1!==o){const[e]=s.splice(o,1);s.push(e)}return s}function jt(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ut(e,t,n){if(n[t.name])J&&D.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Ft.indexOf(t.name)&&(t.setupOnce(pe,Ve),Ft.push(t.name)),t.setup&&"function"===typeof t.setup&&t.setup(e),e.on&&"function"===typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if(e.addEventProcessor&&"function"===typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}J&&D.log(`Integration installed: ${t.name}`)}}function Ht(e){const t=Ot();t&&t.addIntegration?t.addIntegration(e):J&&D.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`)}function zt(e,t){return Object.assign(function(...e){return t(...e)},{id:e})}let qt;const Wt="FunctionToString",Gt=new WeakMap,Yt=()=>({name:Wt,setupOnce(){qt=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=H(this),n=Gt.has(Ot())&&void 0!==t?t:this;return qt.apply(n,e)}}catch(e){}},setup(e){Gt.set(e,!0)}}),Vt=zt(Wt,Yt),Jt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],Kt=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Xt="InboundFilters",Zt=(e={})=>({name:Xt,setupOnce(){},processEvent(t,n,r){const s=r.getOptions(),o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Jt],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Kt],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,s);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(t){}return!1}(e))return J&&D.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Z(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(r){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));J&&0===t.length&&D.error(`Could not extract message for event ${Z(e)}`);return t}(e).some(e=>F(e,t))}(e,t.ignoreErrors))return J&&D.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Z(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&F(n,t)}(e,t.ignoreTransactions))return J&&D.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Z(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=en(e);return!!n&&F(n,t)}(e,t.denyUrls))return J&&D.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Z(e)}.\nUrl: ${en(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=en(e);return!n||F(n,t)}(e,t.allowUrls))return J&&D.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Z(e)}.\nUrl: ${en(e)}`),!0;return!1}(t,o)?null:t}}),Qt=zt(Xt,Zt);function en(e){try{let n;try{n=e.exception.values[0].stacktrace.frames}catch(t){}return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(n){return J&&D.error(`Cannot extract url for event ${Z(e)}`),null}}function tn(e,t,n=250,r,s,o,i){if(!o.exception||!o.exception.values||!i||!y(i.originalException,Error))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,u;a&&(o.exception.values=(c=nn(e,t,s,i.originalException,r,o.exception.values,a,0),u=n,
1c.map(e=>(e.value&&(e.value=L(e.value,u)),e))))}function nn(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(y(r[s],Error)){rn(i,a);const o=e(t,r[s]),u=c.length;sn(o,s,u,a),c=nn(e,t,n,r[s],s,[o,...c],o,u)}return Array.isArray(r.errors)&&r.errors.forEach((r,o)=>{if(y(r,Error)){rn(i,a);const u=e(t,r),l=c.length;sn(u,`errors[${o}]`,l,a),c=nn(e,t,n,r,s,[u,...c],u,l)}}),c}function rn(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function sn(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function on(e,t){return e(t.stack||"",1)}function an(e,t){const n={type:t.name||t.constructor.name,value:t.message},r=on(e,t);return r.length&&(n.stacktrace={frames:r}),n}const cn="LinkedErrors",un=zt(cn,(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:cn,setupOnce(){},preprocessEvent(e,r,s){const o=s.getOptions();tn(an,o.stackParser,o.maxValueLength,n,t,e,r)}}}),ln=r,dn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function pn(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${i}`}function hn(e){const t=dn.exec(e);if(!t)return void A(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,s="",o,i="",a]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return fn({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function fn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function mn(e){const t="string"===typeof e?hn(e):fn(e);if(t&&function(e){if(!R)return!0;const{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(D.error(`Invalid Sentry Dsn: ${t} missing`),!0))&&(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?!t||!isNaN(parseInt(t,10))||(D.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(D.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(D.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}(t))return t}function gn(e,t=[]){return[e,t]}function yn(e,t){const[n,r]=e;return[n,[...r,t]]}function _n(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function vn(e,t){return(t||new TextEncoder).encode(e)}function bn(e,t){const[n,r]=e;let s=JSON.stringify(n);function o(e){"string"===typeof s?s="string"===typeof e?s+e:[vn(s,t),e]:s.push("string"===typeof e?vn(e,t):e)}for(const a of r){const[e,t]=a;if(o(`\n${JSON.stringify(e)}\n`),"string"===typeof t||t instanceof Uint8Array)o(t);else{let e;try{e=JSON.stringify(t)}catch(i){e=JSON.stringify(it(t))}o(e)}}return"string"===typeof s?s:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}(s)}function Sn(e,t){const n="string"===typeof e.data?vn(e.data,t):e.data;return[G({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const kn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function wn(e){return kn[e]}function xn(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Tn(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:pn(r)},...s&&{trace:G({...s})}}}const En=new Map,Cn=new Set;function In(e,t){return function(e){if(b._sentryModuleMetadata)for(const t of Object.keys(b._sentryModuleMetadata)){const n=b._sentryModuleMetadata[t];if(Cn.has(t))continue;Cn.add(t);const r=e(t);for(const e of r.reverse())if(e.filename){En.set(e.filename,n);break}}}(e),En.get(t)}const Rn="ModuleMetadata",Mn=()=>({name:Rn,setupOnce(){},setup(e){"function"===typeof e.on&&e.on("beforeEnvelope",e=>{_n(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;
1t&&(!function(e){try{e.exception.values.forEach(e=>{if(e.stacktrace)for(const t of e.stacktrace.frames||[])delete t.module_metadata})}catch(t){}}(t),e[1]=t)}})})},processEvent:(e,t,n)=>(function(e,t){try{t.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[]){if(!n.filename)continue;const t=In(e,n.filename);t&&(n.module_metadata=t)}})}catch(n){}}(n.getOptions().stackParser,e),e)}),On=zt(Rn,Mn),An="sentry.source",Dn="sentry.sample_rate",Ln="sentry.op",Nn="sentry.origin";class Pn extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function $n(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Fn(e,t){return n={sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}},Object.keys(n).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`).join("&");var n}function Bn(e,t={}){const n="string"===typeof t?t:t.tunnel,r="string"!==typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${$n(e)}${e.projectId}/envelope/`}(e)}?${Fn(e,r)}`}function jn(e,t,n,r){const s=xn(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const i=Tn(e,s,r,t);delete e.sdkProcessingMetadata;return gn(i,[[{type:o},e]])}function Un(e){return e.replace(/[^\w\-./]+/gi,"")}const Hn=[["\n","\\n"],["\r","\\r"],["\t","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function zn(e){return[...e].reduce((e,t)=>e+function(e){for(const[t,n]of Hn)if(e===t)return n;return e}(t),"")}function qn(e,t,n,r){const s={sent_at:(new Date).toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=pn(t));const o=function(e){const t=function(e){let t="";for(const n of e){const e=Object.entries(n.tags),r=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}(e);return[{type:"statsd",length:t.length},t]}(e);return gn(s,[o])}const Wn="Not capturing exception because it's already been captured.";class Gn{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=mn(e.dsn):J&&D.warn("No DSN provided, client will not send events."),this._dsn){const t=Bn(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(te(e))return void(J&&D.log(Wn));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let s=n&&n.event_id;const o=d(e)?e:String(e),i=p(e)?this.eventFromMessage(o,t,n):this.eventFromException(e,n);return this._process(i.then(e=>this._captureEvent(e,n,r)).then(e=>{s=e})),s}captureEvent(e,t,n){if(t&&t.originalException&&te(t.originalException))return void(J&&D.log(Wn));let r=t&&t.event_id;const s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,s||n).then(e=>{r=e})),r}captureSession(e){"string"!==typeof e.release?J&&D.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),me(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):ce(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return J&&D.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const t=this._integrations[e.name];Ut(this,e,this._integrations),t||jt(this,[e])}sendEvent(e,t={}
1){this.emit("beforeSendEvent",e,t);let n=jn(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of t.attachments||[])n=yn(n,Sn(s,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){const t=function(e,t,n,r){const s=xn(n);return gn({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:pn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"===typeof n?n:1,s=`${e}:${t}`;J&&D.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}captureAggregateMetrics(e){J&&D.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const t=qn(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&Ut(e,t,n)}),n}(this,e),jt(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1;const s=t.exception&&t.exception.values;if(s){r=!0;for(const e of s){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(me(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new le(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=Je()){const s=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),ut(s,e,t,n,this,r).then(e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){const{traceId:r,spanId:s,parentSpanId:o,dsc:i}=t;e.contexts={trace:{trace_id:r,span_id:s,parent_span_id:o},...e.contexts};const a=i||Le(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:a,...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(J){const t=e;"log"===t.logLevel?D.log(t.message):D.warn(t)}})}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:s}=r,o=Vn(e),i=Yn(e),a=e.type||"error",c=`before send for type \`${a}\``;if(i&&"number"===typeof s&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",e),ue(new Pn(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const u="replay_event"===a?"replay":a,l=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,l).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new Pn("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const s=function(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;if(Yn(t)&&r)return r(t,n);if(Vn(t)&&s){if(t.spans){const e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(t,n)}return t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(m(e))return e.then(e=>{if(!h(e)&&null!==e)throw new Pn(n);return e},e=>{throw new Pn(`${t} rejected with ${e}`)});if(!h(e)&&null!==e)throw new Pn(n);return e}(s,c)}).then(r=>{if(null===r){if(this.recordDroppedEvent("before_send",u,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new Pn(`${c} returned \`null\`, will not send event.`,"log")}const s=n&&n.getSession();if(!o&&s&&this._updateSessionFromEvent(s,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const i=r.transaction_info;if(o&&i&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...i,source:e}}return this.sendEvent(r,t),r}).then(null,e=>
1{if(e instanceof Pn)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Pn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{J&&D.error("Error while sending event:",e)});J&&D.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function Yn(e){return void 0===e.type}function Vn(e){return"transaction"===e.type}function Jn(e){const t=Ot();t&&t.addEventProcessor&&t.addEventProcessor(e)}const Kn={},Xn={};function Zn(e,t){Kn[e]=Kn[e]||[],Kn[e].push(t)}function Qn(e,t){Xn[e]||(t(),Xn[e]=!0)}function er(e,t){const n=e&&Kn[e];if(n)for(const s of n)try{s(t)}catch(r){R&&D.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ot(s)}\nError:`,r)}}let tr=null;function nr(e){const t="error";Zn(t,e),Qn(t,rr)}function rr(){tr=b.onerror,b.onerror=function(e,t,n,r,s){return er("error",{column:r,error:s,line:n,msg:e,url:t}),!(!tr||tr.__SENTRY_LOADER__)&&tr.apply(this,arguments)},b.onerror.__SENTRY_INSTRUMENTED__=!0}let sr=null;function or(e){const t="unhandledrejection";Zn(t,e),Qn(t,ir)}function ir(){sr=b.onunhandledrejection,b.onunhandledrejection=function(e){return er("unhandledrejection",e),!(sr&&!sr.__SENTRY_LOADER__)||sr.apply(this,arguments)},b.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ar(e){return(e||Ve()).getScope().getTransaction()}const cr=Te;let ur=!1;function lr(){const e=ar();if(e){const t="internal_error";J&&D.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}function dr(e,t,n=()=>{}){let r;try{r=e()}catch(s){throw t(s),n(),s}return function(e,t,n){if(m(e))return e.then(e=>(n(),e),e=>{throw t(e),n(),e});return n(),e}(r,t,n)}function pr(e){if("boolean"===typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=Ot(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function hr(e,t,n=()=>{},r=()=>{}){const s=Ve(),o=Dt(),i=o.getSpan(),a=br(e),c=vr(s,{parentSpan:i,spanContext:a,forceTransaction:!1,scope:o});return o.setSpan(c),dr(()=>t(c),e=>{c&&c.setStatus("internal_error"),n(e,c)},()=>{c&&c.end(),o.setSpan(i),r()})}function fr(e,t){const n=br(e);return Xe(()=>xt(e.scope,r=>{const s=Ve(),o=r.getSpan(),i=e.onlyIfParent&&!o?void 0:vr(s,{parentSpan:o,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return dr(()=>t(i),()=>{if(i){const{status:e}=Ae(i);e&&"ok"!==e||i.setStatus("internal_error")}},()=>i&&i.end())}))}lr.tag="sentry_tracingErrorCallback";function mr(e,t){const n=br(e);return Xe(()=>xt(e.scope,r=>{const s=Ve(),o=r.getSpan(),i=e.onlyIfParent&&!o?void 0:vr(s,{parentSpan:o,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function a(){i&&i.end()}return dr(()=>t(i,a),()=>{if(i&&i.isRecording()){const{status:e}=Ae(i);e&&"ok"!==e||i.setStatus("internal_error")}})}))}function gr(e){if(!pr())return;const t=br(e),n=Ve(),r=e.scope?e.scope.getSpan():yr();if(e.onlyIfParent&&!r)return;const s=(e.scope||Dt()).clone();return vr(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function yr(){return Dt().getSpan()}const _r=({sentryTrace:e,baggage:t},n)=>{const r=Dt(),{traceparentData:s,dynamicSamplingContext:o,propagationContext:i}=function(e,t){const n=Te(e),r=Se(t),{traceId:s,parentSpanId:o,parentSampled:i}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:s||K(),parentSpanId:o||K().substring(16),spanId:K().substring(16),sampled:i,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:s||K(),spanId:K().substring(16)}}}(e,t);r.setPropagationContext(i),J&&s&&D.log(`[Tracing] Continuing trace ${s.traceId}.`);const a={...s,metadata:G({dynamicSamplingContext:o})};return n?Xe(()=>n(a)):a};function vr(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:s}
1){if(!pr())return;const o=Je();let i;if(t&&!r)i=t.startChild(n);else if(t){const r=Ne(t),{traceId:s,spanId:o}=t.spanContext(),a=De(t);i=e.startTransaction({traceId:s,parentSpanId:o,parentSampled:a,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{const{traceId:t,dsc:r,parentSpanId:a,sampled:c}={...o.getPropagationContext(),...s.getPropagationContext()};i=e.startTransaction({traceId:t,parentSpanId:a,parentSampled:c,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return s.setSpan(i),function(e,t,n){e&&(j(e,kr,n),j(e,Sr,t))}(i,s,o),i}function br(e){if(e.startTime){const t={...e};return t.startTimestamp=Me(e.startTime),delete t.startTime,t}return e}const Sr="_sentryScope",kr="_sentryIsolationScope";let wr;function xr(e){return wr?wr.get(e):void 0}function Tr(e){const t=xr(e);if(!t)return;const n={};for(const[,[r,s]]of t)n[r]||(n[r]=[]),n[r].push(G(s));return n}var Er;function Cr(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}!function(e){e.Ok="ok";e.DeadlineExceeded="deadline_exceeded";e.Unauthenticated="unauthenticated";e.PermissionDenied="permission_denied";e.NotFound="not_found";e.ResourceExhausted="resource_exhausted";e.InvalidArgument="invalid_argument";e.Unimplemented="unimplemented";e.Unavailable="unavailable";e.InternalError="internal_error";e.UnknownError="unknown_error";e.Cancelled="cancelled";e.AlreadyExists="already_exists";e.FailedPrecondition="failed_precondition";e.Aborted="aborted";e.OutOfRange="out_of_range";e.DataLoss="data_loss"}(Er||(Er={}));const Ir=Cr;function Rr(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=Cr(t);"unknown_error"!==n&&e.setStatus(n)}class Mr{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class Or{constructor(e={}){this._traceId=e.traceId||K(),this._spanId=e.spanId||K().substring(16),this._startTime=e.startTimestamp||se(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[Nn]:e.origin||"manual",[Ln]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),void 0!==e.exclusiveTime&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[Ln]}set op(e){this.setAttribute(Ln,e)}get origin(){return this._attributes[Nn]}set origin(e){this.setAttribute(Nn,e)}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}startChild(e){const t=new Or({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t);const n=ye(this);if(t.transaction=n,J&&n){const r=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${Ae(t).description||"< unknown name >"}' (${n.spanContext().spanId}).`;D.log(r),this._logMessage=r}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){void 0===t?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach(t=>this.setAttribute(t,e[t]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return Rr(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return"ok"===this._status}finish(e){return this.end(e)}end(e){if(this._endTime)return;const t=ye(this);if(J&&t&&t.spanContext().spanId!==this._spanId){const e=this._logMessage;e&&D.log(e.replace("Starting","Finishing"))}this._endTime=Me(e)}toTraceparent(){return Re(this)}toContext(){return G({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return Ie(this)}getSpanJSON(){return G({data:this._getData(),description:this._name,op:this._attributes[Ln],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Nn],_metrics_summary:Tr(this),profile_id:this._attributes.profile_id,exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}
1toJSON(){return this.getSpanJSON()}_getData(){const{data:e,_attributes:t}=this,n=Object.keys(e).length>0,r=Object.keys(t).length>0;if(n||r)return n&&r?{...e,...t}:n?e:t}}class Ar extends Or{constructor(e,t){super(e),this._contexts={},this._hub=t||Ve(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[An]&&{source:this._attributes[An]},...this._attributes[Dn]&&{sampleRate:this._attributes[Dn]}}}set metadata(e){this._metadata=e}setName(e,t="custom"){this._name=e,this.setAttribute(An,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new Mr(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){const t=Me(e),n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){return G({...super.toContext(),name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return Ne(this)}setHub(e){this._hub=e}getProfileId(){if(void 0!==this._contexts&&void 0!==this._contexts.profile)return this._contexts.profile.profile_id}_finishTransaction(e){if(void 0!==this._endTime)return;this._name||(J&&D.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this._sampled)return J&&D.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&Ae(e).timestamp):[];if(this._trimEnd&&n.length>0){const e=n.map(e=>Ae(e).timestamp).filter(Boolean);this._endTime=e.reduce((e,t)=>e>t?e:t)}const{scope:r,isolationScope:s}={scope:(o=this)[Sr],isolationScope:o[kr]};var o;const{metadata:i}=this,{source:a}=i,c={contexts:{...this._contexts,trace:Ie(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...i,capturedSpanScope:r,capturedSpanIsolationScope:s,...G({dynamicSamplingContext:Ne(this)})},_metrics_summary:Tr(this),...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(J&&D.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),J&&D.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const Dr={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Lr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Nr extends Mr{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){if(e.spanContext().spanId!==this.transactionSpanId){const t=e.end;e.end=(...n)=>(this._popActivity(e.spanContext().spanId),t.apply(e,n)),void 0===Ae(e).timestamp&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class Pr extends Ar{constructor(e,t,n=Dr.idleTimeout,r=Dr.finalTimeout,s=Dr.heartbeatInterval,o=!1,i=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=s,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=Lr[4],this._autoFinishAllowed=!i,o&&(J&&D.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),i||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Lr[3],this.end())},this._finalTimeout)}end(e){const t=Me(e);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){J&&D.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;Ae(e).timestamp||(e.setStatus("cancelled"),e.end(t),J&&D.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const{start_timestamp:n,timestamp:r}
1=Ae(e),s=n&&n<t,o=(this._finalTimeout+this._idleTimeout)/1e3,i=r&&n&&r-n<o;if(J){const t=JSON.stringify(e,void 0,2);s?i||D.log("[Tracing] discarding Span since it finished after Transaction final timeout",t):D.log("[Tracing] discarding Span since it happened after Transaction was finished",t)}return s&&i}),J&&D.log("[Tracing] flushing IdleTransaction")}else J&&D.log("[Tracing] No active IdleTransaction");if(this._onScope){const e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const t=e=>{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new Nr(t,n,this.spanContext().spanId,e),J&&D.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Lr[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(J&&D.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=Lr[1],this.end(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),J&&D.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,J&&D.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(J&&D.log(`[Tracing] popActivity ${e}`),delete this.activities[e],J&&D.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=se();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=Lr[5],this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(J&&D.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Lr[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){J&&D.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function $r(e,t,n){if(!pr(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setAttribute(Dn,Number(e.sampled)),e;let r;return"function"===typeof t.tracesSampler?(r=t.tracesSampler(n),e.setAttribute(Dn,Number(r))):void 0!==n.parentSampled?r=n.parentSampled:"undefined"!==typeof t.tracesSampleRate?(r=t.tracesSampleRate,e.setAttribute(Dn,Number(r))):(r=1,e.setAttribute(Dn,r)),Fr(r)?r?(e.sampled=Math.random()<r,e.sampled?(J&&D.log(`[Tracing] starting ${e.op} transaction - ${Ae(e).description}`),e):(J&&D.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(J&&D.log("[Tracing] Discarding transaction because "+("function"===typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),e.sampled=!1,e):(J&&D.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Fr(e){return g(e)||"number"!==typeof e&&"boolean"!==typeof e?(J&&D.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):!(e<0||e>1)||(J&&D.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1)}function Br(){const e=this.getScope().getSpan();return e?{"sentry-trace":Re(e)}:{}}function jr(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",o=e.instrumenter||"sentry";s!==o&&(J&&D.error(`A transaction was started with instrumenter=\`${o}\`, but the SDK is configured with the \`${s}\` instrumenter.\nThe transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let i=new Ar(e,this);return i=$r(i,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),i.isRecording()&&i.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",i),i}function Ur(e,t,n,r,s,o,i,a=!1){const c=e.getClient(),u=c&&c.getOptions()||{};let l=new Pr(t,e,n,r,i,s,a);return l=$r(l,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...o}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function Hr(){const e=Ge();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=jr),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Br),ur||(ur=!0,nr(lr),or(lr)))}function zr(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ue(new Pn("Not adding Promise because buffer limit was reached."));const s=r();return-1===t.indexOf(s)&&t.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s},drain:function(e){return new le((n,r)=>{let s=t.length;if(!s)return n(!0);const o=setTimeout(()=>{e&&e>0&&n(!1)},e);
1t.forEach(e=>{ce(e).then(()=>{--s||(clearTimeout(o),n(!0))},r)})})}}}function qr(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function Wr(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function Gr(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const a of o.trim().split(",")){const[e,t,,,n]=a.split(":",5),o=parseInt(e,10),i=1e3*(isNaN(o)?60:o);if(t)for(const a of t.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(s[a]=r+i);else s.all=r+i}else i?s.all=r+qr(i,r):429===t&&(s.all=r+6e4);return s}function Yr(e,t,n=zr(e.bufferSize||30)){let r={};function s(s){const o=[];if(_n(s,(t,n)=>{const s=wn(n);if(Wr(r,s)){const r=Vr(t,n);e.recordDroppedEvent("ratelimit_backoff",s,r)}else o.push(t)}),0===o.length)return ce();const i=gn(s[0],o),a=t=>{_n(i,(n,r)=>{const s=Vr(n,r);e.recordDroppedEvent(t,wn(r),s)})};return n.add(()=>t({body:bn(i,e.textEncoder)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&J&&D.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Gr(r,e),e),e=>{throw a("network_error"),e})).then(e=>e,e=>{if(e instanceof Pn)return J&&D.error("Skipped sending event because buffer is full."),a("queue_overflow"),ce();throw e})}return s.__sentry__baseTransport__=!0,{send:s,flush:e=>n.drain(e)}}function Vr(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Jr(e,t){let n;return _n(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function Kr(e,t){return n=>{const r=e(n),s=new Map;function o(t,r){const o=r?`${t}:${r}`:t;let i=s.get(o);if(!i){const a=hn(t);if(!a)return;const c=Bn(a,n.tunnel);i=r?function(e,t){return n=>{const r=e(n);return{...r,send:async e=>{const n=Jr(e,["event","transaction","profile","replay_event"]);return n&&(n.release=t),r.send(e)}}}}(e,r)({...n,url:c}):e({...n,url:c}),s.set(o,i)}return[t,i]}return{send:async function(e){const n=t({envelope:e,getEvent:function(t){const n=t&&t.length?t:["event"];return Jr(e,n)}}).map(e=>"string"===typeof e?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e);0===n.length&&n.push(["",r]);return(await Promise.all(n.map(([t,n])=>n.send(function(e,t){return gn(t?{...e[0],dsn:t}:e[0],e[1])}(e,t)))))[0]},flush:async function(e){const t=[await r.flush(e)];for(const[,n]of s)t.push(await n.flush(e));return t.every(e=>e)}}}}const Xr="c",Zr="g",Qr="s",es="d";const ts={[Xr]:class{constructor(e){this._value=e}get weight(){return 1}add(e){this._value+=e}toString(){return`${this._value}`}},[Zr]:class{constructor(e){this._last=e,this._min=e,this._max=e,this._sum=e,this._count=1}get weight(){return 5}add(e){this._last=e,e<this._min&&(this._min=e),e>this._max&&(this._max=e),this._sum+=e,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}},[es]:class{constructor(e){this._value=[e]}get weight(){return this._value.length}add(e){this._value.push(e)}toString(){return this._value.join(":")}},[Qr]:class{constructor(e){this.first=e,this._value=new Set([e])}get weight(){return this._value.size}add(e){this._value.add(e)}toString(){return Array.from(this._value).map(e=>"string"===typeof e?function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t>>>0}(e):e).join(":")}}};class ns{constructor(e){this._client=e,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),5e3)}add(e,t,n,r="none",s={},o=se()){const i=Math.floor(o),a=t.replace(/[^\w\-.]+/gi,"_");const c=function(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[Un(n)]=zn(String(e[n])));return t}(s),u=function(e){return e.replace(/[^\w]+/gi,"_")}(r),l=function(e,t,n,r){return`${e}${t}${n}${Object.entries(G(r)).sort((e,t)=>e[0].localeCompare(t[0]))}`}(e,a,u,c);let d=this._buckets.get(l);const p=d&&"s"===e?d.metric.weight:0;d?(d.metric.add(n),d.timestamp<i&&(d.timestamp=i)):(d={metric:new ts[e](n),timestamp:i,metricType:e,name:a,unit:u,tags:c},this._buckets.set(l,d));!function(e,t,n,r,s,o){const i=yr();if(i){const a=xr(i)||new Map,c=`${e}:${t}@${r}`,u=a.get(o);if(u){const[,e]=u;
1a.set(o,[c,{min:Math.min(e.min,n),max:Math.max(e.max,n),count:e.count+=1,sum:e.sum+=n,tags:e.tags}])}else a.set(o,[c,{min:n,max:n,count:1,sum:n,tags:s}]);wr||(wr=new WeakMap),wr.set(i,a)}}(e,a,"string"===typeof n?d.metric.weight-p:n,u,s,l)}flush(){if(0!==this._buckets.size){if(this._client.captureAggregateMetrics){const e=Array.from(this._buckets).map(([,e])=>e);this._client.captureAggregateMetrics(e)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}}const rs="MetricsAggregator",ss=()=>({name:rs,setupOnce(){},setup(e){e.metricsAggregator=new ns(e)}});function os(e,t,n,r={}){const s=Ot(),o=Dt();if(s){if(!s.metricsAggregator)return void(J&&D.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs"));const{unit:i,tags:a,timestamp:c}=r,{release:u,environment:l}=s.getOptions(),d=o.getTransaction(),p={};u&&(p.release=u),l&&(p.environment=l),d&&(p.transaction=Ae(d).description||""),J&&D.log(`Adding value of ${n} to ${e} metric ${t}`),s.metricsAggregator.add(e,t,n,i,{...p,...a},c)}}const is={increment:function(e,t=1,n){os("c",e,t,n)},distribution:function(e,t,n){os("d",e,t,n)},set:function(e,t,n){os("s",e,t,n)},gauge:function(e,t,n){os("g",e,t,n)},MetricsAggregator:zt(rs,ss),metricsAggregatorIntegration:ss};function as(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}function cs(e){const t=Ve().getStackTop();t.client=e,t.scope.setClient(e)}function us(e,t,n){const r=ar();r&&r.setMeasurement(e,t,n)}const ls=b;let ds=0;function ps(){return ds>0}function hs(e,t={},n){if("function"!==typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"===typeof t?t:e;if(H(e))return e}catch(s){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);const s=r.map(e=>hs(e,t));return e.apply(this,s)}catch(s){throw ds++,setTimeout(()=>{ds--}),xt(e=>{e.addEventProcessor(e=>(t.mechanism&&(Q(e,void 0,void 0),ee(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),ht(s)}),s}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(o){}U(r,e),j(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(o){}return r}var fs=n(38341);const ms="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function gs(e,t){const n=_s(e,t),r={type:t&&t.name,value:bs(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ys(e,t){return{exception:{values:[gs(e,t)]}}}function _s(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"===typeof e.framesToPop)return e.framesToPop;if(vs.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(s){}return[]}const vs=/Minified React error #\d+;/i;function bs(e){const t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function Ss(e,t,n,r){const s=ws(e,t,n&&n.syntheticException||void 0,r);return ee(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),ce(s)}function ks(e,t,n="info",r,s){const o=xs(e,t,r&&r.syntheticException||void 0,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),ce(o)}function ws(e,t,n,r,s){let o;if(c(t)&&t.error){return ys(e,t.error)}if(u(t)||a(t,"DOMException")){const s=t;if("stack"in t)o=ys(e,t);else{const t=s.name||(u(s)?"DOMError":"DOMException"),i=s.message?`${t}: ${s.message}`:t;o=xs(e,i,n,r),Q(o,i)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}if(i(t))return ys(e,t);if(h(t)||f(t)){return o=function(e,t,n,r){const s=Ot(),o=s&&s.getOptions().normalizeDepth,i={exception:{values:[{type:f(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ts(t,{isUnhandledRejection:r})}]},extra:{__serialized__:at(t,o)}};if(n){const t=_s(e,n);t.length&&(i.exception.values[0].stacktrace={frames:t})}return i}(e,t,n,s),ee(o,{synthetic:!0}),o}return o=xs(e,t,n,r),Q(o,`${t}`,void 0),ee(o,{synthetic:!0}),o}function xs(e,t,n,r){const s={};if(r&&n){const r=_s(e,n);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]})}
1if(d(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function Ts(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(z(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return L(n[0],t);for(let r=n.length;r>0;r--){const e=n.slice(0,r).join(", ");if(!(e.length>t))return r===n.length?e:L(e,t)}return""}(e),r=t?"promise rejection":"exception";if(c(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(f(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(t){}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}function Es(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:pn(r)}},o=function(e){return[{type:"user_report"},e]}(e);return gn(s,[o])}class Cs extends Gn{constructor(e){!function(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:He})),version:He}),e._metadata=s}(e,"browser",["browser"],ls.SENTRY_SDK_SOURCE||(0,fs.e)()),super(e),e.sendClientReports&&ls.document&&ls.document.addEventListener("visibilitychange",()=>{"hidden"===ls.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return Ss(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return ks(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(ms&&D.warn("SDK not enabled, will not capture user feedback."));const t=Es(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(ms&&D.log("No outcomes to send"));if(!this._dsn)return void(ms&&D.log("No dsn provided, will not send outcomes"));ms&&D.log("Sending outcomes:",e);const t=(n=e,gn((r=this._options.tunnel&&pn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:s||re(),discarded_events:n}]]));var n,r,s;this._sendEnvelope(t)}}const Is=S();function Rs(){if(!("fetch"in Is))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function Ms(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Os(){if("string"===typeof EdgeRuntime)return!0;if(!Rs())return!1;if(Ms(Is.fetch))return!0;let e=!1;const t=Is.document;if(t&&"function"===typeof t.createElement)try{const n=t.createElement("iframe");
1n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Ms(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){R&&D.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}let As;function Ds(e,t=function(){if(As)return As;if(Ms(ls.fetch))return As=ls.fetch.bind(ls);const e=ls.document;let t=ls.fetch;if(e&&"function"===typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){ms&&D.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return As=t.bind(ls)}()){let n=0,r=0;return Yr(e,function(s){const o=s.body.length;n+=o,r++;const i={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,i).then(e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(a){return As=void 0,n-=o,r--,ue(a)}})}function Ls(e){return Yr(e,function(t){return new le((n,r)=>{const s=new XMLHttpRequest;s.onerror=r,s.onreadystatechange=()=>{4===s.readyState&&n({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&s.setRequestHeader(t,e.headers[t]);s.send(t.body)})})}const Ns="?";function Ps(e,t,n,r){const s={filename:e,function:t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const $s=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fs=/\((\S*)(?::(\d+))(?::(\d+))\)/,Bs=[30,e=>{const t=$s.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=Fs.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=Xs(t[1]||Ns,t[2]);return Ps(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],js=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Us=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Hs=[50,e=>{const t=js.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Us.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||Ns;return[n,e]=Xs(n,e),Ps(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],zs=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,qs=[40,e=>{const t=zs.exec(e);return t?Ps(t[2],t[1]||Ns,+t[3],t[4]?+t[4]:void 0):void 0}],Ws=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Gs=[10,e=>{const t=Ws.exec(e);return t?Ps(t[2],t[3]||Ns,+t[1]):void 0}],Ys=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Vs=[20,e=>{const t=Ys.exec(e);return t?Ps(t[5],t[3]||t[4]||Ns,+t[1],+t[2]):void 0}],Js=[Bs,Hs,qs],Ks=rt(...Js),Xs=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Ns,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Zs=S();const Qs=b;let eo;function to(e){const t="history";Zn(t,e),Qn(t,no)}function no(){if(!function(){const e=Zs.chrome,t=e&&e.app&&e.app.runtime,n="history"in Zs&&!!Zs.history.pushState&&!!Zs.history.replaceState;return!t&&n}())return;const e=Qs.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=eo,t=String(n);eo=t;er("history",{from:e,to:t})}return e.apply(this,t)}}Qs.onpopstate=function(...t){const n=Qs.location.href,r=eo;eo=n;if(er("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(s){}},B(Qs.history,"pushState",t),B(Qs.history,"replaceState",t)}function ro(e){const t="console";Zn(t,e),Qn(t,so)}function so(){"console"in b&&M.forEach(function(e){e in b.console&&B(b.console,e,function(t){return O[e]=t,function(...t){er("console",{args:t,level:e});const n=O[e];n&&n.apply(b.console,t)}})})}const oo=b;let io,ao,co;function uo(e){Zn("dom",e),Qn("dom",lo)}function lo(){if(!oo.document)return;const e=er.bind(null,"dom"),t=po(e,!0);oo.document.addEventListener("click",t,!1),oo.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=oo[t]&&oo[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(B(n,"addEventListener",function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},i=o[n]=o[n]||{refCount:0};if(!i.handler){const r=po(e);i.handler=r,t.call(this,n,r,s)}i.refCount++}catch(o){}return t.call(this,n,r,s)}}),B(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,s=n.__sentry_instrumentation_handlers__||{},o=s[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete s[t]),0===Object.keys(s).length&&delete n.__sentry_instrumentation_handlers__)}catch(s){}return e.call(this,t,n,r)}}))})}function po(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(t){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}
1(n.type,r))return;j(n,"_sentryCaptured",!0),r&&!r._sentryId&&j(r,"_sentryId",K());const s="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==ao)return!1;try{if(!e.target||e.target._sentryId!==co)return!1}catch(t){}return!0}(n)){e({event:n,name:s,global:t}),ao=n.type,co=r?r._sentryId:void 0}clearTimeout(io),io=oo.setTimeout(()=>{co=void 0,ao=void 0},1e3)}}const ho=b,fo="__sentry_xhr_v3__";function mo(e){Zn("xhr",e),Qn("xhr",go)}function go(){if(!ho.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;B(e,"open",function(e){return function(...t){const n=Date.now(),r=l(t[0])?t[0].toUpperCase():void 0,s=function(e){if(l(e))return e;try{return e.toString()}catch(t){}return}(t[1]);if(!r||!s)return e.apply(this,t);this[fo]={method:r,url:s,request_headers:{}},"POST"===r&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const e=this[fo];if(e&&4===this.readyState){try{e.status_code=this.status}catch(t){}er("xhr",{args:[r,s],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"===typeof this.onreadystatechange?B(this,"onreadystatechange",function(e){return function(...t){return o(),e.apply(this,t)}}):this.addEventListener("readystatechange",o),B(this,"setRequestHeader",function(e){return function(...t){const[n,r]=t,s=this[fo];return s&&l(n)&&l(r)&&(s.request_headers[n.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),B(e,"send",function(e){return function(...t){const n=this[fo];if(!n)return e.apply(this,t);void 0!==t[0]&&(n.body=t[0]);return er("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}function yo(e){const t="fetch";Zn(t,e),Qn(t,_o)}function _o(){Os()&&B(b,"fetch",function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:bo(t),method:vo(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:bo(t),method:vo(t,"method")?String(t.method).toUpperCase():"GET"}}(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return er("fetch",{...s}),e.apply(b,t).then(e=>(er("fetch",{...s,endTimestamp:Date.now(),response:e}),e),e=>{throw er("fetch",{...s,endTimestamp:Date.now(),error:e}),e})}})}function vo(e,t){return!!e&&"object"===typeof e&&!!e[t]}function bo(e){return"string"===typeof e?e:e?vo(e,"url")?e.url:e.toString?e.toString():"":""}const So=["fatal","error","warning","log","info","debug"];function ko(e){return"warn"===e?"warning":So.includes(e)?e:"log"}function wo(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const xo=1024,To="Breadcrumbs",Eo=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:To,setupOnce(){},setup(e){t.console&&ro(function(e){return function(t){if(Ot()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:ko(t.level),message:P(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${P(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}yt(n,{input:t.args,level:t.level})}}(e)),t.dom&&uo(function(e,t){return function(n){if(Ot()!==e)return;let r,s,o="object"===typeof t?t.serializeAttribute:void 0,i="object"===typeof t&&"number"===typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>xo&&(ms&&D.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=xo),"string"===typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=x(t,{keyAttrs:o,maxStringLength:i}),s=I(t)}catch(c){r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),yt(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&mo(function(e){return function(t){if(Ot()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,s=t.xhr[fo];if(!n||!r||!s)return;const{method:o,url:i,status_code:a,body:c}=s;yt({category:"xhr",data:{method:o,url:i,status_code:a},type:"http"},{xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r})}}(e)),t.fetch&&yo(function(e){return function(t){if(Ot()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;
1if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){yt({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response;yt({category:"fetch",data:{...t.fetchData,status_code:e&&e.status},type:"http"},{input:t.args,response:e,startTimestamp:n,endTimestamp:r})}}}(e)),t.history&&to(function(e){return function(t){if(Ot()!==e)return;let n=t.from,r=t.to;const s=wo(ls.location.href);let o=n?wo(n):void 0;const i=wo(r);o&&o.path||(o=s),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),yt({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on&&e.on("beforeSendEvent",function(e){return function(t){Ot()===e&&yt({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Z(t)},{event:t})}}(e))}}},Co=zt(To,Eo);const Io="Dedupe",Ro=()=>{let e;return{name:Io,setupOnce(){},processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Ao(e,t))return!1;if(!Oo(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Do(t),r=Do(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Ao(e,t))return!1;if(!Oo(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return ms&&D.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return e=t}}},Mo=zt(Io,Ro);function Oo(e,t){let n=Lo(e),r=Lo(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++){const e=r[s],t=n[s];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function Ao(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(s){return!1}}function Do(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Lo(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}const No="GlobalHandlers",Po=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:No,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){nr(t=>{const{stackParser:n,attachStacktrace:r}=jo();if(Ot()!==e||ps())return;const{msg:s,url:o,line:i,column:a,error:u}=t,d=void 0===u&&l(s)?function(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=c(e)?e.message:e,i="Error";const a=o.match(s);a&&(i=a[1],o=a[2]);const u={exception:{values:[{type:i,value:o}]}};return Fo(u,t,n,r)}(s,o,i,a):Fo(ws(n,u||s,void 0,r,!1),o,i,a);d.level="error",mt(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}(e),Bo("onerror")),t.onunhandledrejection&&(!function(e){or(t=>{const{stackParser:n,attachStacktrace:r}=jo();if(Ot()!==e||ps())return;const s=function(e){if(p(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch(n){}return e}(t),o=p(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:ws(n,s,void 0,r,!0);o.level="error",mt(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),Bo("onunhandledrejection"))}}},$o=zt(No,Po);function Fo(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,p=l(t)&&t.length>0?t:E();return 0===c.length&&c.push({colno:u,filename:p,function:"?",in_app:!0,lineno:d}),e}function Bo(e){ms&&D.log(`Global Handler attached: ${e}`)}function jo(){const e=Ot();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Uo="HttpContext",Ho=()=>({name:Uo,setupOnce(){},preprocessEvent(e){if(!ls.navigator&&!ls.location&&!ls.document)return;const t=e.request&&e.request.url||ls.location&&ls.location.href,{referrer:n}=ls.document||{},{userAgent:r}=ls.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),zo=zt(Uo,Ho),qo="LinkedErrors",Wo=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:qo,setupOnce(){},preprocessEvent(e,r,s){const o=s.getOptions();tn(gs,o.stackParser,o.maxValueLength,n,t,e,r)}}},Go=zt(qo,Wo),Yo=["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"],Vo="TryCatch",Jo=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Vo,setupOnce(){t.setTimeout&&B(ls,"setTimeout",Xo),t.setInterval&&B(ls,"setInterval",Xo),t.requestAnimationFrame&&B(ls,"requestAnimationFrame",Zo),t.XMLHttpRequest&&"XMLHttpRequest"in ls&&B(XMLHttpRequest.prototype,"send",Qo);const e=t.eventTarget;
1if(e){(Array.isArray(e)?e:Yo).forEach(ei)}}}},Ko=zt(Vo,Jo);function Xo(e){return function(...t){const n=t[0];return t[0]=hs(n,{mechanism:{data:{function:ot(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Zo(e){return function(t){return e.apply(this,[hs(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ot(e)},handled:!1,type:"instrument"}})])}}function Qo(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"===typeof n[e]&&B(n,e,function(t){const n={mechanism:{data:{function:e,handler:ot(t)},handled:!1,type:"instrument"}},r=H(t);return r&&(n.mechanism.data.handler=ot(r)),hs(t,n)})}),e.apply(this,t)}}function ei(e){const t=ls,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(B(n,"addEventListener",function(t){return function(n,r,s){try{"function"===typeof r.handleEvent&&(r.handleEvent=hs(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ot(r),target:e},handled:!1,type:"instrument"}}))}catch(o){}return t.apply(this,[n,hs(r,{mechanism:{data:{function:"addEventListener",handler:ot(r),target:e},handled:!1,type:"instrument"}}),s])}}),B(n,"removeEventListener",function(e){return function(t,n,r){const s=n;try{const n=s&&s.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(o){}return e.call(this,t,s,r)}}))}const ti=[Zt(),Yt(),Jo(),Eo(),Po(),Wo(),Ro(),Ho()];function ni(e){return[...ti]}function ri(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=ni()),void 0===e.release&&("string"===typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),ls.SENTRY_RELEASE&&ls.SENTRY_RELEASE.id&&(e.release=ls.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:(n=e.stackParser||Ks,Array.isArray(n)?rt(...n):n),integrations:Bt(e),transport:e.transport||(Rs()?Ds:Ls)};var n;!function(e,t){!0===t.debug&&(J?D.enable():A(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Dt().update(t.initialScope);const n=new e(t);cs(n),function(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}(n)}(Cs,t),e.autoSessionTracking&&function(){if("undefined"===typeof ls.document)return void(ms&&D.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));Lt({ignoreDuration:!0}),$t(),to(({from:e,to:t})=>{void 0!==e&&e!==t&&(Lt({ignoreDuration:!0}),$t())})}()}const si=(e={},t=Ve())=>{if(!ls.document)return void(ms&&D.error("Global document not defined in showReportDialog call"));const{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s)return void(ms&&D.error("DSN not configured for showReportDialog call"));r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const o=ls.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=function(e,t){const n=mn(e);if(!n)return"";const r=`${$n(n)}embed/error-page/`;let s=`dsn=${pn(n)}`;for(const o in t)if("dsn"!==o&&"onClose"!==o)if("user"===o){const e=t.user;if(!e)continue;e.name&&(s+=`&name=${encodeURIComponent(e.name)}`),e.email&&(s+=`&email=${encodeURIComponent(e.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${s}`}(s,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:i}=e;if(i){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{i()}finally{ls.removeEventListener("message",e)}};ls.addEventListener("message",e)}const a=ls.document.head||ls.document.body;a?a.appendChild(o):ms&&D.error("Not injecting report dialog. No injection point found in HTML")};function oi(){}function ii(e){e()}function ai(e){return hs(e)()}function ci(e){const t=Ot();t&&t.captureUserFeedback(e)}function ui(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}function li(e,t){const n=t&&function(e){return void 0!==e.getClient}(t)?t.getClient():t,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,r)||function(e,t){if(!t)return!1;return di(e)===di(t)}
1(e,s)}function di(e){return"/"===e[e.length-1]?e.slice(0,-1):e}var pi=n(36284);function hi(){return"undefined"!==typeof window&&(!(0,pi.wD)()||void 0!==b.process&&"renderer"===b.process.type)}const fi="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,mi=(e,t,n)=>{let r,s;return o=>{t.value>=0&&(o||n)&&(s=t.value-(r||0),(s||void 0===r)&&(r=t.value,t.delta=s,e(t)))}},gi=b,yi=()=>gi.__WEB_VITALS_POLYFILL__?gi.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=gi.performance.timing,t=gi.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const r in e)"navigationStart"!==r&&"toJSON"!==r&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n})()):gi.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],_i=()=>{const e=yi();return e&&e.activationStart||0},vi=(e,t)=>{const n=yi();let r="navigate";return n&&(r=gi.document&&gi.document.prerendering||_i()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:"undefined"===typeof t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},bi=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{t(e.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(r){}},Si=(e,t)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==gi.document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};gi.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};let ki=-1;const wi=()=>(ki<0&&(gi.document&&gi.document.visibilityState&&(ki="hidden"!==gi.document.visibilityState||gi.document.prerendering?1/0:0),Si(({timeStamp:e})=>{ki=e},!0)),{get firstHiddenTime(){return ki}});let xi=0,Ti=1/0,Ei=0;const Ci=e=>{e.forEach(e=>{e.interactionId&&(Ti=Math.min(Ti,e.interactionId),Ei=Math.max(Ei,e.interactionId),xi=Ei?(Ei-Ti)/7+1:0)})};let Ii;const Ri=()=>{"interactionCount"in performance||Ii||(Ii=bi("event",Ci,{type:"event",buffered:!0,durationThreshold:0}))},Mi=()=>Ii?xi:performance.interactionCount||0,Oi=[],Ai={},Di=e=>{const t=Oi[Oi.length-1],n=Ai[e.interactionId];if(n||Oi.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};Ai[t.id]=t,Oi.push(t)}Oi.sort((e,t)=>t.latency-e.latency),Oi.splice(10).forEach(e=>{delete Ai[e.id]})}},Li=(e,t)=>{t=t||{},Ri();const n=vi("INP");let r;const s=e=>{e.forEach(e=>{if(e.interactionId&&Di(e),"first-input"===e.entryType){!Oi.some(t=>t.entries.some(t=>e.duration===t.duration&&e.startTime===t.startTime))&&Di(e)}});const t=(()=>{const e=Math.min(Oi.length-1,Math.floor(Mi()/50));return Oi[e]})();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())},o=bi("event",s,{durationThreshold:t.durationThreshold||40});r=mi(e,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),Si(()=>{s(o.takeRecords()),n.value<0&&Mi()>0&&(n.value=0,n.entries=[]),r(!0)}))},Ni={},Pi=e=>{gi.document&&(gi.document.prerendering?addEventListener("prerenderingchange",()=>Pi(e),!0):"complete"!==gi.document.readyState?addEventListener("load",()=>Pi(e),!0):setTimeout(e,0))},$i={},Fi={};let Bi,ji,Ui,Hi,zi;function qi(e,t=!1){return Zi("lcp",e,Ji,Ui,t)}function Wi(e,t){return Qi(e,t),Fi[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);bi(e,t=>{Gi(e,{entries:t})},t)}(e),Fi[e]=!0),ea(e,t)}function Gi(e,t){const n=$i[e];if(n&&n.length)for(const s of n)try{s(t)}catch(r){fi&&D.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ot(s)}\nError:`,r)}}function Yi(){return((e,t={})=>{const n=vi("CLS",0);let r,s=0,o=[];const i=e=>{e.forEach(e=>{if(!e.hadRecentInput){const t=o[0],i=o[o.length-1];s&&0!==o.length&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,o.push(e)):(s=e.value,o=[e]),s>n.value&&(n.value=s,n.entries=o,r&&r())}})},a=bi("layout-shift",i);if(a){r=mi(e,n,t.reportAllChanges);const s=()=>{i(a.takeRecords()),r(!0)};return Si(s),s}})(e=>{Gi("cls",{metric:e}),Bi=e},{reportAllChanges:!0})}function Vi(){return(e=>{const t=wi(),n=vi("FID");let r;const s=e=>{e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entr
1ies.push(e),r(!0))},o=e=>{e.forEach(s)},i=bi("first-input",o);r=mi(e,n),i&&Si(()=>{o(i.takeRecords()),i.disconnect()},!0)})(e=>{Gi("fid",{metric:e}),ji=e})}function Ji(){return(e=>{const t=wi(),n=vi("LCP");let r;const s=e=>{const s=e[e.length-1];if(s){const e=Math.max(s.startTime-_i(),0);e<t.firstHiddenTime&&(n.value=e,n.entries=[s],r())}},o=bi("largest-contentful-paint",s);if(o){r=mi(e,n);const t=()=>{Ni[n.id]||(s(o.takeRecords()),o.disconnect(),Ni[n.id]=!0,r(!0))};return["keydown","click"].forEach(e=>{gi.document&&addEventListener(e,t,{once:!0,capture:!0})}),Si(t,!0),t}})(e=>{Gi("lcp",{metric:e}),Ui=e})}function Ki(){return((e,t)=>{t=t||{};const n=vi("TTFB"),r=mi(e,n,t.reportAllChanges);Pi(()=>{const e=yi();if(e){if(n.value=Math.max(e.responseStart-_i(),0),n.value<0||n.value>performance.now())return;n.entries=[e],r(!0)}})})(e=>{Gi("ttfb",{metric:e}),Hi=e})}function Xi(){return Li(e=>{Gi("inp",{metric:e}),zi=e})}function Zi(e,t,n,r,s=!1){let o;return Qi(e,t),Fi[e]||(o=n(),Fi[e]=!0),r&&t({metric:r}),ea(e,t,s?o:void 0)}function Qi(e,t){$i[e]=$i[e]||[],$i[e].push(t)}function ea(e,t,n){return()=>{n&&n();const r=$i[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}const ta=b,na="sentryReplaySession",ra="Unable to send Replay",sa=15e4,oa=5e3,ia=2e7,aa=36e5;function ca(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}var ua;function la(e){const t=ca([e,"optionalAccess",e=>e.host]);return Boolean(ca([t,"optionalAccess",e=>e.shadowRoot])===e)}function da(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function pa(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,ha).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(n){return null}var t}function ha(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=pa(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(ua||(ua={}));class fa{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;const t=ca([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]);return r=()=>-1,null!=(n=t)?n:r();var n,r}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ma({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function ga({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function ya(e){return e.toLowerCase()}function _a(e){return e.toUpperCase()}const va="__rrweb_original__";function ba(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ya(t):null}function Sa(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}let ka=1;const wa=new RegExp("[^a-z0-9-_:]");function xa(){return ka++}let Ta,Ea;const Ca=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ia=/^(?:[a-z+]+:)?\/\//i,Ra=/^www\..*/i,Ma=/^(data:)([^,]*),(.*)/i;function Oa(e,t){return(e||"").replace(Ca,(e,n,r,s,o,i)=>{const a=r||o||i,c=n||s||"";if(!a)return e;if(Ia.test(a)||Ra.test(a))return`url(${c}${a}${c})`;if(Ma.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const u=t.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 Aa=/^[^ \t\n\r\u000c]+/,Da=/^[, \t\n\r\u000c]+/;function La(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function Na(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Pa(){const e=document.createElement("a");return e.href="",e.href}function $a(e,t,n,r,s,o){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?La(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const s=e.exec(t.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(Da),!(n>=t.length);
1){let o=r(Aa);if(","===o.slice(-1))o=La(e,o.substring(0,o.length-1)),s.push(o);else{let r="";o=La(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){s.push((o+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,s.push((o+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return s.join(", ")}(e,r):"style"===n?Oa(r,Pa()):"object"===t&&"data"===n?La(e,r):"function"===typeof o?o(n,r,s):r:La(e,r):r}function Fa(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Ba(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ba(e.parentNode,t,n,r+1):-1}function ja(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"===typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(s){return!1}}}function Ua(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(o){if(c=Ba(i,ja(r,s)),c<0)return!0;a=Ba(i,ja(t,n),c>=0?c:1/0)}else{if(a=Ba(i,ja(t,n)),a<0)return!1;c=Ba(i,ja(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!o}catch(i){}return!!o}function Ha(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,k=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:ua.Document,childNodes:[],compatMode:e.compatMode}:{type:ua.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ua.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m,maskAllText:g,maskTextClass:y,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:b}=t,S=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"===typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(s){}return!1}(e,r,s,o),k=function(e){if(e instanceof HTMLFormElement)return"form";const t=ya(e.tagName);return wa.test(t)?"div":t}(e);let w={};const x=e.attributes.length;for(let C=0;C<x;C++){const t=e.attributes[C];t.name&&!Fa(k,t.name,t.value)&&(w[t.name]=$a(n,k,ya(t.name),t.value,e,c))}if("link"===k&&i){const t=Array.from(n.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=pa(t)),r&&(delete w.rel,delete w.href,w._cssText=Oa(r,t.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=pa(e.sheet);t&&(w._cssText=Oa(t,Pa()))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const t=e,n=ba(t),r=Sa(t,_a(k),n),s=t.checked;if("submit"!==n&&"button"!==n&&r){const e=Ua(t,y,v,_,b,ma({type:n,tagName:_a(k),maskInputOptions:a}));w.value=ga({isMasked:e,element:t,value:r,maskInputFn:u})}s&&(w.checked=s)}"option"===k&&(e.selected&&!a.select?w.selected=!0:delete w.selected);if("canvas"===k&&p)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const s=t.getImageData,o=va in s?s[va]:s;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(l.type,l.quality)&&(w.rr_dataURL=t)}if("img"===k&&d){Ta||(Ta=n.createElement("canvas"),Ea=Ta.getContext("2d"));const t=e,r=t.crossOrigin;t.crossOrigin="anonymous";const s=()=>{t.removeEventListener("load",s);
1try{Ta.width=t.naturalWidth,Ta.height=t.naturalHeight,Ea.drawImage(t,0,0),w.rr_dataURL=Ta.toDataURL(l.type,l.quality)}catch(e){console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`)}r?w.crossOrigin=r:t.removeAttribute("crossorigin")};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}"audio"!==k&&"video"!==k||(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime);f||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop));if(S){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==k||h(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);let T;try{customElements.get(k)&&(T=!0)}catch(E){}return{type:ua.Element,tagName:k,attributes:w,childNodes:[],isSVG:Na(e)||void 0,needBlock:S,rootId:m,isCustom:T}}(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:f,maskInputFn:g,dataURLOptions:y,inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:k,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,f="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||ca([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=pa(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}p=Oa(p,Pa())}f&&(p="SCRIPT_PLACEHOLDER");const g=Ua(e,r,o,s,i,n);h||f||m||!p||!g||(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*"));m&&p&&(c.textarea||g)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*"));if("OPTION"===d&&p){p=ga({isMasked:Ua(e,r,o,s,i,ma({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:u})}return{type:ua.Text,textContent:p||"",isStyle:h,rootId:l}}(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:f,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:ua.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:ua.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function za(e){return void 0===e||null===e?"":e.toLowerCase()}function qa(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:x=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:R=!0}=t;const M=Ha(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:C,newlyAddedElement:I});if(!M)return console.warn(e,"not serialized"),null;let O;O=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===ua.Comment)return!0;if(e.type===ua.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(za(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===za(e.attributes.name)||"icon"===za(e.attributes.rel)||"apple-touch-icon"===za(e.attributes.rel)||"shortcut icon"===za(e.attributes.rel))))return!0;
1if("meta"===e.tagName){if(t.headMetaDescKeywords&&za(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(za(e.attributes.property).match(/^(og|twitter|fb):/)||za(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===za(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===za(e.attributes.name)||"googlebot"===za(e.attributes.name)||"bingbot"===za(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===za(e.attributes.name)||"generator"===za(e.attributes.name)||"framework"===za(e.attributes.name)||"publisher"===za(e.attributes.name)||"progid"===za(e.attributes.name)||za(e.attributes.property).match(/^article:/)||za(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===za(e.attributes.name)||"yandex-verification"===za(e.attributes.name)||"csrf-token"===za(e.attributes.name)||"p:domain_verify"===za(e.attributes.name)||"verify-v1"===za(e.attributes.name)||"verification"===za(e.attributes.name)||"shopify-checkout-api-token"===za(e.attributes.name)))return!0}}return!1}(M,_)&&(R||M.type!==ua.Text||M.isStyle||M.textContent.replace(/^\s+|\s+$/gm,"").length)?xa():-2;const A=Object.assign(M,{id:O});if(r.add(e,A),-2===O)return null;k&&k(e);let D=!p;if(A.type===ua.Element){D=D&&!A.needBlock,delete A.needBlock;const t=e.shadowRoot;t&&da(t)&&(A.isShadowHost=!0)}if((A.type===ua.Document||A.type===ua.Element)&&D){_.headWhitespace&&A.type===ua.Element&&"head"===A.tagName&&(R=!1);const t={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:C};for(const n of Array.from(e.childNodes)){const e=qa(n,t);e&&A.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=qa(n,t);r&&(da(e.shadowRoot)&&(r.isShadow=!0),A.childNodes.push(r))}}return e.parentNode&&la(e.parentNode)&&da(e.parentNode)&&(A.isShadow=!0),A.type===ua.Element&&"iframe"===A.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let s,o=!1;try{s=r.document.readyState}catch(a){return}if("complete"!==s){const r=setTimeout(()=>{o||(t(),o=!0)},n);return void e.addEventListener("load",()=>{clearTimeout(r),o=!0,t()})}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&w){const n=qa(t,{doc:t,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:C});n&&w(e,n)}},x),A.type===ua.Element&&"link"===A.tagName&&"stylesheet"===A.attributes.rel&&function(e,t,n){let r,s=!1;try{r=e.sheet}catch(i){return}if(r)return;const o=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(o),s=!0,t()})}(e,()=>{if(T){const t=qa(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:C});t&&T(e,t)}},E),A}function Wa(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}function Ga(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ya="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 Va={map:{},getId:()=>(console.error(Ya),-1),getNode:()=>(console.error(Ya),null),removeNodeFromMap(){console.error(Ya)},has:()=>(console.error(Ya),!1),reset(){console.error(Ya)}};function Ja(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();s||!1!==n.leading||(s=i);const a=t-(i-s),c=this;a<=0||a>t?(r&&(!function(...e){mc("clearTimeout")(...e)}
1(r),r=null),s=i,e.apply(c,o)):r||!1===n.trailing||(r=gc(()=>{s=!1===n.leading?0:Date.now(),r=null,e.apply(c,o)},a))}}function Ka(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(e){gc(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>Ka(e,t,o||{},!0)}function Xa(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return"function"===typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch(r){return()=>{}}}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(Va=new Proxy(Va,{get:(e,t,n)=>("map"===t&&console.error(Ya),Reflect.get(e,t,n))}));let Za=Date.now;function Qa(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:Wa([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||Wa([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||Wa([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:Wa([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||Wa([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||Wa([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function ec(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function tc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function nc(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}function rc(e,t,n,r,s){if(!e)return!1;const o=nc(e);if(!o)return!1;const i=ja(t,n);if(!s){const e=r&&o.matches(r);return i(o)&&!e}const a=Ba(o,i);let c=-1;return!(a<0)&&(r&&(c=Ba(o,ja(null,r))),a>-1&&c<0||a<c)}function sc(e,t){return-2===t.getId(e)}function oc(e,t){if(la(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||oc(e.parentNode,t))}function ic(e){return Boolean(e.changedTouches)}function ac(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function cc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function uc(e){return Boolean(Wa([e,"optionalAccess",e=>e.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Za=()=>(new Date).getTime());class lc{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return t=this.styleIDMap.get(e),n=()=>-1,null!=t?t:n();var t,n}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function dc(e){let t=null;return Wa([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function pc(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=dc(n);)n=t;return n}(e);return t.contains(n)}function hc(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||pc(e))}const fc={};function mc(e){const t=fc[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"===typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch(s){}return fc[e]=r.bind(window)}function gc(...e){return mc("setTimeout")(...e)}var yc=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(yc||{}),_c=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(_c||{}),vc=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(vc||{}),bc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(bc||{});function Sc(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}function kc(e){return"__ln"in e}class wc{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=Sc([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&kc(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&
1(n.previous=t)}else if(e.nextSibling&&kc(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const xc=(e,t)=>`${e}@${t}`;class Tc{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new wc,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},s=s=>{if(!s.parentNode||!hc(s))return;const o=la(s.parentNode)?this.mirror.getId(dc(s)):this.mirror.getId(s.parentNode),i=r(s);if(-1===o||-1===i)return n.addNode(s);const a=qa(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{ac(e,this.mirror)&&this.iframeManager.addIframe(e),cc(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),uc(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:o,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Cc(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||s(a);for(const a of this.addedSet)Rc(this.droppedSet,a)||Cc(this.removes,a,this.mirror)?Rc(this.movedSet,a)?s(a):this.droppedSet.add(a):s(a);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),s(e.value)}const i={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"===typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!sc(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;rc(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:Ua(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,nc(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const t=ba(n),r=n.tagName;s=Sa(n,r,t);const o=ma({maskInputOptions:this.maskInputOptions,tagName:r,type:t});s=ga({isMasked:Ua(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:n,value:s,maskInputFn:this.maskInputFn})}if(rc(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===e.oldValue)return;let o=this.attributeMap.get(e.target);
1if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(n.contentDocument)return;r="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===r&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Fa(n.tagName,r)&&(o.attributes[r]=$a(this.doc,ya(n.tagName),ya(r),s,n,this.maskAttributeFn),"style"===r)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(n.style)){const t=n.style.getPropertyValue(e),s=n.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||s!==r.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?t:[t,s]:o._unchangedStyles[e]=[t,s]}for(const e of Array.from(r.style))""===n.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(rc(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=la(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);rc(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||sc(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Ec(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||oc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[xc(n,r)]?Ec(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!la(e.target)||!da(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(sc(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[xc(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);rc(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(e=>this.genAdds(e)),uc(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ec(e,t){e.delete(t),t.childNodes.forEach(t=>Ec(e,t))}function Cc(e,t,n){return 0!==e.length&&Ic(e,t,n)}function Ic(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return!!e.some(e=>e.id===s)||Ic(e,r,n)}function Rc(e,t){return 0!==e.size&&Mc(e,t)}function Mc(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Mc(e,n))}let Oc;function Ac(e){Oc=e}function Dc(){Oc=void 0}const Lc=e=>{if(!Oc)return e;return(...t)=>{try{return e(...t)}catch(n){if(Oc&&!0===Oc(n))return()=>{};throw n}}};function Nc(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}const Pc=[];function $c(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Fc(e,t){const n=new Tc;Pc.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=Nc([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(r=window[s]);const o=new r(Lc(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Bc({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let u=null;return Object.keys(vc).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEac
1h(i=>{let a=ya(i);const l=(t=>i=>{const a=$c(i);if(rc(a,r,s,o,!0))return;let c=null,l=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=bc.Mouse;break;case"touch":c=bc.Touch;break;case"pen":c=bc.Pen}c===bc.Touch?vc[t]===vc.MouseDown?l="TouchStart":vc[t]===vc.MouseUp&&(l="TouchEnd"):bc.Pen}else ic(i)&&(c=bc.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===bc.Touch||l.startsWith("Mouse")&&c===bc.Mouse)&&(c=null)):vc[t]===vc.Click&&(c=u,u=null);const d=ic(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:f}=d;Lc(e)({type:vc[l],id:p,x:h,y:f,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(vc[i]){case vc.MouseDown:case vc.MouseUp:a=a.replace("mouse","pointer");break;case vc.TouchStart:case vc.TouchEnd:return}c.push(Ga(a,l,t))}),Lc(()=>{c.forEach(e=>e())})}function jc({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){return Ga("scroll",Lc(Ja(Lc(i=>{const a=$c(i);if(!a||rc(a,r,s,o,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=Qa(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const Uc=["INPUT","TEXTAREA","SELECT"],Hc=new WeakMap;function zc({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:m}){function g(e){let n=$c(e);const l=e.isTrusted,g=n&&_a(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||Uc.indexOf(g)<0||rc(n,r,s,o,!0))return;const _=n;if(_.classList.contains(i)||a&&_.matches(a))return;const v=ba(n);let b=Sa(_,g,v),S=!1;const k=ma({maskInputOptions:c,tagName:g,type:v}),w=Ua(n,p,f,h,m,k);"radio"!==v&&"checkbox"!==v||(S=n.checked),b=ga({isMasked:w,element:n,value:b,maskInputFn:u}),y(n,d?{text:b,isChecked:S,userTriggered:l}:{text:b,isChecked:S});const x=n.name;"radio"===v&&x&&S&&t.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach(e=>{if(e!==n){const t=ga({isMasked:w,element:e,value:Sa(e,g,v),maskInputFn:u});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function y(t,r){const s=Hc.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){Hc.set(t,r);const s=n.getId(t);Lc(e)({...r,id:s})}}const _=("last"===l.input?["change"]:["input","change"]).map(e=>Ga(e,Lc(g),t)),v=t.defaultView;if(!v)return()=>{_.forEach(e=>e())};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&_.push(...S.map(e=>Ka(e[0],e[1],{set(){Lc(g)({target:this,isTrusted:!1})}},!1,v))),Lc(()=>{_.forEach(e=>e())})}function qc(e){return function(e,t){if(Vc("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Vc("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Vc("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Vc("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Wc(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Gc({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const s="#document"===n.nodeName?Nc([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):Nc([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=Nc([s,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(Nc([s,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return Nc([o,"access",e=>
1e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=Nc([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(s){}return n}}),Lc(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})})):()=>{}}function Yc(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=Fc(e,e.doc),s=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const s="number"===typeof t.mousemove?t.mousemove:50,o="number"===typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Ja(Lc(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),o),u=Lc(Ja(Lc(e=>{const t=$c(e),{clientX:n,clientY:s}=ic(e)?e.changedTouches[0]:e;i||(i=Za()),a.push({x:n,y:s,id:r.getId(t),timeOffset:Za()-i}),c("undefined"!==typeof DragEvent&&e instanceof DragEvent?_c.Drag:e instanceof MouseEvent?_c.MouseMove:_c.TouchMove)}),s,{trailing:!1})),l=[Ga("mousemove",u,n),Ga("touchmove",u,n),Ga("drag",u,n)];return Lc(()=>{l.forEach(e=>e())})}(e),o=Bc(e),i=jc(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Ga("resize",Lc(Ja(Lc(()=>{const t=ec(),s=tc();n===t&&r===s||(e({width:Number(s),height:Number(t)}),n=t,r=s)}),200)),t)}(e,{win:n}),c=zc(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const a=Lc(i=>Ja(Lc(o=>{const a=$c(o);if(!a||rc(a,t,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;e({type:i,id:s.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})}),o.media||500)),c=[Ga("play",a(0),i),Ga("pause",a(1),i),Ga("seeked",a(2),i),Ga("volumechange",a(3),i),Ga("ratechange",a(4),i)];return Lc(()=>{c.forEach(e=>e())})}(e),l=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:Lc((r,s,o)=>{const[i,a]=o,{id:c,styleId:u}=Wc(s,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:a}]}),r.apply(s,o)})});const o=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Lc((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Wc(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(s,o)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:Lc((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Wc(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(s,o)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Lc((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Wc(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(s,o)})}));const c={};Jc("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Jc("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Jc("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Jc("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([r,s])=>{u[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(u[r].insertRule,{apply:Lc((r,s,o)=>{const[i,a]=o,{id:c,styleId:u}=Wc(s.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:[...qc(s),a||0]}]}),r.apply(s,o)})}),s.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:Lc((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Wc(s.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...qc(s),i]}]}),r.apply(s,o)})})}),Lc(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:n}),d=Gc(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Lc((s,i,a)=>{const[c,u,l]=a;if(n.has(c))return o.apply(i,[c,u,l]);const{id:d,styleId:p}=Wc(Nc([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:l},index:qc(i.parentRule)}),s.apply(i,a)})});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Lc((s,o,a)=>{const[c]=a;if(n.has(c))return i.apply(o,[c]);const{id:u,styleId:l}=Wc(Nc([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&e({id:u,styleId:l,remove:{property:c},index:qc(o.parentRule)}),s.apply(o,a)})}),Lc(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),h=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return s.set(r,{family:e,buffer:"string"!==typeof t,descriptors:n,fontSource:"string"===typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=Xa(t.fonts,"add",function(t){return function(n){return gc(Lc(()=>{const t=s.get(n);t&&(e(t),s.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=o}),r.push(i),Lc(()=>
1{r.forEach(e=>e())})}(e):()=>{},f=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=Lc(()=>{const e=t.getSelection();if(!e||a&&Nc([e,"optionalAccess",e=>e.isCollapsed]))return;a=e.isCollapsed||!1;const c=[],u=e.rangeCount||0;for(let t=0;t<u;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:u,endContainer:l,endOffset:d}=i;rc(a,r,s,o,!0)||rc(l,r,s,o,!0)||c.push({start:n.getId(a),startOffset:u,end:n.getId(l),endOffset:d})}i({ranges:c})});return c(),Ga("selectionchange",c)}(e),m=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?Xa(n.customElements,"define",function(e){return function(n,r,s){try{t({define:{name:n}})}catch(o){}return e.apply(this,[n,r,s])}}):()=>{}}(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,n,y.options));return Lc(()=>{Pc.forEach(e=>e.reset()),r.disconnect(),s(),o(),i(),a(),c(),u(),l(),d(),p(),h(),f(),m(),g.forEach(e=>e())})}function Vc(e){return"undefined"!==typeof window[e]}function Jc(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Kc{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const s=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let i=s.get(t);return i||(i=this.generateIdFn(),s.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
1getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;const s=r.get(t);return s||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function Xc(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}class Zc{constructor(){this.crossOriginIframeMirror=new Kc(xa),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Qc{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Kc(xa),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Kc(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Xc([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case yc.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:yc.IncrementalSnapshot,data:{source:_c.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case yc.Meta:case yc.Load:case yc.DomContentLoaded:return!1;case yc.Plugin:return t;case yc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case yc.IncrementalSnapshot:switch(t.data.source){case _c.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case _c.Drag:case _c.TouchMove:case _c.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case _c.ViewportResize:return!1;case _c.MediaInteraction:case _c.MouseInteraction:case _c.Scroll:case _c.CanvasMutation:case _c.Input:return this.replaceIds(t.data,e,["id"]),t;case _c.StyleSheetRule:case _c.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case _c.Font:return t;case _c.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case _c.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),Xc([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t(t=>{this.replaceStyleIds(t,e,["styleId"])})]),t}}return!1}replace(e,t,n,r){for(const s of r)(Array.isArray(t[s])||"number"===typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEac
1h(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===ua.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class eu{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class tu{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!da(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=Fc({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(jc({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),gc(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Gc({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Xa(e.prototype,"attachShadow",function(e){return function(r){const s=e.call(this,r);return this.shadowRoot&&hc(this)&&n.addShadowRoot(this.shadowRoot,t),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class nu{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class ru{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new lc,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const s of e){let e;this.styleMirror.has(s)?e=this.styleMirror.getId(s):(e=this.styleMirror.add(s),r.push({styleId:e,rules:Array.from(s.rules||CSSRule,(e,t)=>({rule:ha(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class su{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...e){mc("requestAnimationFrame")(...e)}(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let ou,iu;const au=new fa;function cu(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:k,sampling:w={},dataURLOptions:x={},mousemoveWait:T,recordCanvas:E=!1,recordCrossOriginIframes:C=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:M=!1,inlineImages:O=!1,plugins:A,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:N,onMutation:P,getCanvasManager:$}=e;Ac(N);const F=!C||window.parent===window;let B=!1;if(!F)try{window.parent.document&&(B=!1)}catch(ee){B=!0}if(F&&!t)throw new Error("emit function is required");void 0!==T&&void 0===w.mousemove&&(w.mousemove=T),au.reset();const j=!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!==g?g:{},U=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let H;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let z=0;const q=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!B&&(e=k(e)),e};
1ou=(e,s)=>{const o=e;if(o.timestamp=Za(),!ui([Pc,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])||o.type===yc.FullSnapshot||o.type===yc.IncrementalSnapshot&&o.data.source===_c.Mutation||Pc.forEach(e=>e.unfreeze()),F)ui([t,"optionalCall",e=>e(q(o),s)]);else if(B){const e={type:"rrweb",event:q(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===yc.FullSnapshot)H=o,z=0;else if(o.type===yc.IncrementalSnapshot){if(o.data.source===_c.Mutation&&o.data.isAttachIframe)return;z++;const e=r&&z>=r,t=n&&H&&o.timestamp-H.timestamp>n;(e||t)&&Q(!0)}};const W=e=>{ou({type:yc.IncrementalSnapshot,data:{source:_c.Mutation,...e}})},G=e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.Scroll,...e}}),Y=e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.CanvasMutation,...e}}),V=new ru({mutationCb:W,adoptedStyleSheetCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.AdoptedStyleSheet,...e}})}),J="boolean"===typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Zc:new Qc({mirror:au,mutationCb:W,stylesheetManager:V,recordCrossOriginIframes:C,wrappedEmit:ou});for(const ne of A||[])ne.getMirror&&ne.getMirror({nodeMirror:au,crossOriginIframeMirror:J.crossOriginIframeMirror,crossOriginIframeStyleMirror:J.crossOriginIframeStyleMirror});const K=new su,X=function(e,t){try{return e?e(t):new nu}catch(n){return console.warn("Unable to initialize CanvasManager"),new nu}}($,{mirror:au,win:window,mutationCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.CanvasMutation,...e}}),recordCanvas:E,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:S,sampling:w.canvas,dataURLOptions:x,errorHandler:N}),Z="boolean"===typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new eu:new tu({mutationCb:W,scrollCb:G,bypassOptions:{onMutation:P,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:j,dataURLOptions:x,maskAttributeFn:_,maskTextFn:b,maskInputFn:v,recordCanvas:E,inlineImages:O,sampling:w,slimDOMOptions:U,iframeManager:J,stylesheetManager:V,canvasManager:X,keepIframeSrcFn:D,processedNodeManager:K},mirror:au}),Q=(e=!1)=>{ou({type:yc.Meta,data:{href:window.location.href,width:tc(),height:ec()}},e),V.reset(),Z.init(),Pc.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new fa,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:E=()=>!1}=t||{};return qa(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:E,newlyAddedElement:!1})}(document,{mirror:au,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskAllInputs:j,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,slimDOM:U,dataURLOptions:x,recordCanvas:E,inlineImages:O,onSerialize:e=>{ac(e,au)&&J.addIframe(e),cc(e,au)&&V.trackLinkElement(e),uc(e)&&Z.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{J.attachIframe(e,t),Z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:D});if(!t)return console.warn("Failed to snapshot the document");ou({type:yc.FullSnapshot,data:{node:t,initialOffset:Qa(window)}}
1),Pc.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,au.getId(document))};iu=Q;try{const e=[],t=e=>Lc(Yc)({onMutation:P,mutationCb:W,mousemoveCb:(e,t)=>ou({type:yc.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.MouseInteraction,...e}}),scrollCb:G,viewportResizeCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.ViewportResize,...e}}),inputCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.Input,...e}}),mediaInteractionCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.MediaInteraction,...e}}),styleSheetRuleCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.StyleSheetRule,...e}}),styleDeclarationCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.StyleDeclaration,...e}}),canvasMutationCb:Y,fontCb:e=>ou({type:yc.IncrementalSnapshot,data:{source:_c.Font,...e}}),selectionCb:e=>{ou({type:yc.IncrementalSnapshot,data:{source:_c.Selection,...e}})},customElementCb:e=>{ou({type:yc.IncrementalSnapshot,data:{source:_c.CustomElement,...e}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:j,inlineStylesheet:f,sampling:w,recordCanvas:E,inlineImages:O,userTriggeredOnInput:R,collectFonts:M,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:D,blockSelector:o,unblockSelector:i,slimDOMOptions:U,dataURLOptions:x,mirror:au,iframeManager:J,stylesheetManager:V,shadowDomManager:Z,processedNodeManager:K,canvasManager:X,ignoreCSSAttributes:L,plugins:ui([A,"optionalAccess",e=>e.filter,"call",e=>e(e=>e.observer),"optionalAccess",e=>e.map,"call",e=>e(e=>({observer:e.observer,options:e.options,callback:t=>ou({type:yc.Plugin,data:{plugin:e.name,payload:t}})}))])||[]},{});J.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(r){console.warn(r)}});const n=()=>{Q(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Ga("DOMContentLoaded",()=>{ou({type:yc.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&n()})),e.push(Ga("load",()=>{ou({type:yc.Load,data:{}}),"load"===I&&n()},window))),()=>{e.forEach(e=>e()),K.destroy(),iu=void 0,Dc()}}catch(te){console.warn(te)}}cu.mirror=au,cu.takeFullSnapshot=function(e){if(!iu)throw new Error("please take full snapshot after start recording");iu(e)};function uu(e){return e>9999999999?e:1e3*e}function lu(e){return e>9999999999?e/1e3:e}function du(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:yc.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:it(t,10,1e3)}}),"console"===t.category)))}function pu(e){return e.closest("button,a")||e}function hu(e){const t=fu(e);return t&&t instanceof Element?pu(t):t}function fu(e){return function(e){return"object"===typeof e&&!!e&&"target"in e}(e)?e.target:e}let mu;function gu(e){return mu||(mu=[],B(ta,"open",function(e){return function(...t){if(mu)try{mu.forEach(e=>e())}catch(n){}return e.apply(ta,t)}})),mu.push(e),()=>{const t=mu?mu.indexOf(e):-1;t>-1&&mu.splice(t,1)}}class yu{constructor(e,t,n=du){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=gu(()=>{this._lastMutation=vu()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!_u.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!==typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:lu(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=lu(e)}registerScroll(e=Date.now()){this._lastScroll=lu(e)}registerClick(e){const t=pu(e);this._handleMultiClick(t)}
1_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=vu();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const n of e){const e=this._clicks.indexOf(n);e>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!n&&!r,{clickCount:o,clickBreadcrumb:i}=e;if(s){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:ta.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};return void this._addBreadcrumbEvent(t,s)}if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:ta.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const _u=["A","BUTTON","INPUT"];function vu(){return Date.now()/1e3}function bu(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(n===_c.Mutation&&e.registerMutation(t.timestamp),n===_c.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===_c.MouseInteraction}(t)){const{type:n,id:r}=t.data,s=cu.mirror.getNode(r);s instanceof HTMLElement&&n===vc.Click&&e.registerClick(s)}}catch(n){}}function Su(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ku;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(ku||(ku={}));const wu=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function xu(e){const t={};for(const n in e)if(wu.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}const Tu=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?hu(e.event):fu(e.event),n=x(r,{maxStringLength:200})||"<unknown>"}catch(s){n="<unknown>"}return{target:r,message:n}}(e);return Su({category:`ui.${e.name}`,...Eu(t,n)})}(t);if(!n)return;const r="click"===t.name,s=r?t.event:void 0;!(r&&e.clickDetector&&s&&s.target)||s.altKey||s.metaKey||s.ctrlKey||s.shiftKey||function(e,t,n){e.handleClick(t,n)}(e.clickDetector,n,hu(t.event)),du(e,n)};function Eu(e,t){const n=cu.mirror.getId(e),r=n&&cu.mirror.getNode(n),s=r&&cu.mirror.getMeta(r),o=s&&function(e){return e.type===ku.Element}(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(e=>e.type===ku.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:xu(o.attributes)}}:{}}}function Cu(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(i)||!o)return null;const a=t||r||s,c=1===o.length;if(!a&&c)return null;const u=x(i,{maxStringLength:200})||"<unknown>",l=Eu(i,u);return Su({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}(t);n&&du(e,n)}const Iu={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:Mu(o),end:Mu(s),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=Mu(s);return{type:n,name:r,start:o,end:o+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=e;if(0===s)return null;return{type:`${t}.${m}`,start:Mu(h),end:Mu(o),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:o,redirectCount:p}}}};function Ru(e){return Iu[e.entryType]?Iu[e.entryType](e):null}function Mu(e){return((ie||ta.performance.timeOrigin)+e)/1e3}function Ou(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];
1return["navigation","paint","resource"].forEach(e=>{r.push(Wi(e,n))}),r.push(qi(({metric:t})=>{e.replayPerformanceEntries.push(function(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,o=Mu(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:o,end:o,data:{value:s,size:s,nodeId:r?cu.mirror.getId(r):void 0}}}(t))})),()=>{r.forEach(e=>e())}}const Au="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Du(e,t){Au&&(D.info(e),t&&Nu(e))}function Lu(e,t){Au&&(D.info(e),t&&setTimeout(()=>{Nu(e)},0))}function Nu(e){yt({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class Pu extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class $u{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>ia)throw new Pu;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(e=>e.timestamp).sort()[0];return e?uu(e):null}}class Fu{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():t()},{once:!0}),this._worker.addEventListener("error",e=>{t(e)},{once:!0})})),this._ensureReadyPromise}destroy(){Du("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise((r,s)=>{const o=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",o),!i.success)return Au&&D.error("[Replay]",i.response),void s(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class Bu{constructor(e){this._worker=new Fu(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=uu(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>ia?Promise.reject(new Pu):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{Au&&D.warn('[Replay] Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class ju{constructor(e){this._fallback=new $u,this._compression=new Bu(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void Du("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t}=this._fallback,n=[];for(const s of e)n.push(this._compression.addEvent(s));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(r){Au&&D.warn("[Replay] Failed to add events when switching buffers.",r)}}}function Uu({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"===typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}
vendor: 5,353 bytes, line 1
1},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;
1++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}();return""}();if(!t)return;Du("[Replay] Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new ju(n)}catch(t){Du("[Replay] Failed to create compression worker")}}(t);if(e)return e}return Du("[Replay] Using simple buffer"),new $u}function Hu(){try{return"sessionStorage"in ta&&!!ta.sessionStorage}catch(e){return!1}}function zu(e){!function(){if(!Hu())return;try{ta.sessionStorage.removeItem(na)}catch(e){}}(),e.session=void 0}function qu(e){return void 0!==e&&Math.random()<e}function Wu(e){const t=Date.now();return{id:e.id||K(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function Gu(e){if(Hu())try{ta.sessionStorage.setItem(na,JSON.stringify(e))}catch(t){}}function Yu({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=function(e,t){return qu(e)?"session":!!t&&"buffer"}(e,t),o=Wu({sampled:s,previousSessionId:r});return n&&Gu(o),o}function Vu(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function Ju(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Vu(e.started,t,r)||Vu(e.lastActivity,n,r)}function Ku(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!Ju(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function Xu({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){const o=s.stickySession&&function(e){if(!Hu())return null;try{const t=ta.sessionStorage.getItem(na);if(!t)return null;const n=JSON.parse(t);return Lu("[Replay] Loading existing session",e),Wu(n)}catch(t){return null}}(e);return o?Ku(o,{sessionIdleExpire:t,maxReplayDuration:n})?(Lu("[Replay] Session in sessionStorage is expired, creating new one..."),Yu(s,{previousSessionId:o.id})):o:(Lu("[Replay] Creating new session",e),Yu(s,{previousSessionId:r}))}function Zu(e,t,n){return!!el(e,t)&&(Qu(e,t,n),!0)}async function Qu(e,t,n){if(!e.eventBuffer)return null;try{n&&"buffer"===e.recordingMode&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=function(e,t){try{if("function"===typeof t&&function(e){return e.type===yc.Custom}(e))return t(e)}catch(n){return Au&&D.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!r)return;return await e.eventBuffer.addEvent(r)}catch(r){const t=r&&r instanceof Pu?"addEventSizeExceeded":"addEvent";Au&&D.error(r),await e.stop({reason:t});const n=Ot();n&&n.recordDroppedEvent("internal_sdk_error","replay")}}
1function el(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=uu(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(Du(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1))}function tl(e){return!e.type}function nl(e){return"transaction"===e.type}function rl(e){return"feedback"===e.type}function sl(e){const t=function(){const e=Ot();if(!e)return!1;const t=e.getTransport();if(!t)return!1;return t.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!e.isEnabled()||!tl(n)&&!nl(n))return;const s=r&&r.statusCode;t&&(!s||s<200||s>=300)||(nl(n)?function(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,n):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"===typeof r&&!r(t))return;setTimeout(()=>{e.sendBufferedReplayOrFlush()})}(e,n))}}function ol(e){return t=>{e.isEnabled()&&tl(t)&&function(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if("string"!==typeof n)return;if(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){du(e,Su({category:"replay.hydrate-error"}))}}(e,t)}}function il(e,t=!1){const n=t?sl(e):void 0;return Object.assign((t,r)=>{if(!e.isEnabled())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!tl(t)&&!nl(t)&&!rl(t))return t;if(!e.checkAndHandleExpiredSession())return t;if(rl(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:yc.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}(t,r)&&!e.getOptions()._experiments.captureExceptions)return Au&&D.log("[Replay] Ignoring error from rrweb internals",t),null;const s=function(e,t){return"buffer"===e.recordingMode&&t.message!==ra&&!(!t.exception||t.type)&&qu(e.getOptions().errorSampleRate)}(e,t);return(s||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t},{id:"Replay"})}function al(e,t){return t.map(({type:t,start:n,end:r,name:s,data:o})=>{const i=e.throttledAddEvent({type:yc.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:s,startTimestamp:n,endTimestamp:r,data:o}}});return"string"===typeof i?Promise.resolve(null):i})}function cl(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(al(e,[n]),!1)))}}function ul(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!Au||!e.getOptions()._experiments.traceInternals)&&li(t,Ot())}(e,t.name)||e.addUpdate(()=>(al(e,[t]),!0)))}function ll(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[fo];if(!t||!n||!s)return null;const{method:o,url:i,status_code:a}=s;return void 0===i?null:{type:"resource.xhr",name:i,start:t/1e3,end:n/1e3,data:{method:o,statusCode:a}}}(t);ul(e,n)}}function dl(e,t){if(e)try{if("string"===typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=vl(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(n){}}function pl(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function hl(e){try{if("string"===typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[vl(e)];if(!e)return[void 0]}catch(t){return Au&&D.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Au&&D.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function fl(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function ml(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:G({method:o,statusCode:i,request:a,response:c})}}function gl(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function yl(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=function(e){if(!e||"string"!==typeof e)return{body:e};const t=e.length>sa,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,sa);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(r){}return{body:e}}(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function _l(e,t){return Object.keys(e).reduce((n,r)=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function vl(e){return new URLSearchParams(e).toString()}function bl(e,t){const n=function(e,t=ta.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ta.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return F(n,t)}async function Sl(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=bl(i,n.networkDetailAllowUrls)&&!bl(i,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?function(e,t){if(1===e.length&&"string"!==typeof e[0])return xl(e[0],t);
1if(2===e.length)return xl(e[1],t);return{}}(n,t):{};if(!e)return yl(s,r,void 0);const o=kl(n),[i,a]=hl(o),c=yl(s,r,i);if(a)return fl(c,a);return c}(n,t.input,u):gl(u),h=await async function(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,o){if(!e&&void 0!==o)return gl(o);const i=s?wl(s.headers,r):{};if(!s||!t&&void 0!==o)return yl(i,o,void 0);const[a,c]=await async function(e){const t=function(e){try{return e.clone()}catch(t){Au&&D.warn("[Replay] Failed to clone response body",t)}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}(t);return[e]}catch(n){return Au&&D.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}(s),u=function(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:o}){try{const i=e&&e.length&&void 0===r?dl(e,n):r;return s?yl(o,i,t?e:void 0):gl(i)}catch(i){return Au&&D.warn("[Replay] Failed to serialize response body",i),yl(o,r,void 0)}}(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:o,captureDetails:e,headers:i});if(c)return fl(u,c);return u}(d,n,t.response,l);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:p,response:h}}(e,t,n),s=ml("resource.fetch",r);ul(n.replay,s)}catch(r){Au&&D.error("[Replay] Failed to capture fetch breadcrumb",r)}}function kl(e=[]){if(2===e.length&&"object"===typeof e[1])return e[1].body}function wl(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function xl(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?wl(n,t):Array.isArray(n)?{}:_l(n,t):{}}async function Tl(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!bl(c,n.networkDetailAllowUrls)||bl(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:l,request:gl(d),response:gl(p)}}const h=a[fo],f=h?_l(h.request_headers,n.networkRequestHeaders):{},m=_l(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return e[n.toLowerCase()]=r,e},{})}(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?hl(i):[void 0],[_,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return function(e,t){try{if("string"===typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"===typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return Au&&D.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Au&&D.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(n){t.push(n)}return Au&&D.warn("[Replay] Failed to get xhr response body",...t),[void 0]}(a):[void 0],b=yl(f,d,g),S=yl(m,p,_);return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:l,request:y?fl(b,y):b,response:v?fl(S,v):S}}(e,t,n),s=ml("resource.xhr",r);ul(n.replay,s)}catch(r){Au&&D.error("[Replay] Failed to capture xhr breadcrumb",r)}}function El(e,t,n){const{xhr:r,input:s}=t;if(!r)return;const o=dl(s,n.textEncoder),i=r.getResponseHeader("content-length")?pl(r.getResponseHeader("content-length")):function(e,t,n){try{return dl("json"===t&&e&&"object"===typeof e?JSON.stringify(e):e,n)}catch(r){return}}(r.response,r.responseType,n.textEncoder);void 0!==o&&(e.data.request_body_size=o),void 0!==i&&(e.data.response_body_size=i)}function Cl(e){const t=Ot();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(El(t,n,e),Tl(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(!function(e,t,n){const{input:r,response:s}=t,o=dl(r?kl(r):void 0,n.textEncoder),i=s?pl(s.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==i&&(e.data.response_body_size=i)}(t,n,e),Sl(t,n,e))}catch(r){Au&&D.warn("Error when enriching network breadcrumb")}}(c,e,t)):(yo(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;const{method:o,url:i}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:i,data:{method:o,statusCode:s?s.status:void 0}}}(t);ul(e,n)}}(e)),mo(ll(e)))}catch(n){}}let Il=null;const Rl=e=>t=>{if(!e.isEnabled())return;const n=function(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();if(Il===t||!t)return null;if(Il=t,!function(e){return!!e.category}(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return Su(e);let n=!1;const r=t.map(e=>{if(!e)return e;if("string"===typeof e)return e.length>
1oa?(n=!0,`${e.slice(0,oa)}\u2026`):e;if("object"===typeof e)try{const t=it(e,7);return JSON.stringify(t).length>oa?(n=!0,`${JSON.stringify(t,null,2).slice(0,oa)}\u2026`):t}catch(t){}return e});return Su({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return Su(t)}(t);n&&du(e,n)};function Ml(e){return!(!e||!e.on)}function Ol(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Al(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(Au&&D.warn("[Replay] Received replay event after session expired."));const s=r||!t;t=!0,e.clickDetector&&bu(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!Zu(e,n,s))return!0;if(!s)return!1;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;Zu(e,function(e){const t=e.getOptions();return{type:yc.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,s),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){const t=e.eventBuffer.getEarliestTimestamp();t&&(Du(`[Replay] Updating session start time to earliest event in buffer to ${new Date(t)}`,e.getOptions()._experiments.traceInternals),e.session.started=t,e.getOptions().stickySession&&Gu(e.session))}return"session"===e.recordingMode&&e.flush(),!0})}}async function Dl({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"===typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=Ot(),p=Dt(),h=d&&d.getTransport(),f=d&&d.getDsn();if(!d||!h||!f||!o.sampled)return;const m={type:"replay_event",replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},g=await async function({client:e,scope:t,replayId:n,event:r}){const s={event_id:n,integrations:"object"!==typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit&&e.emit("preprocessEvent",r,s);const o=await ut(e.getOptions(),r,s,t,e,Je());if(!o)return null;o.platform=o.platform||"javascript";const i=e.getSdkMetadata&&e.getSdkMetadata(),{name:a,version:c}=i&&i.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},o}({scope:p,client:d,replayId:t,event:m});if(!g)return d.recordDroppedEvent("event_processor","replay",m),void Du("An event processor returned `null`, will not send event.");delete g.sdkProcessingMetadata;const y=function(e,t,n,r){return gn(Tn(e,xn(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"===typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,i,f,d.getOptions().tunnel);let _;try{_=await h.send(y)}catch(b){const e=new Error(ra);try{e.cause=b}catch(S){}throw e}if(!_)return _;if("number"===typeof _.statusCode&&(_.statusCode<200||_.statusCode>=300))throw new Ll(_.statusCode);const v=Gr({},_);if(Wr(v,"replay"))throw new Nl(v);return _}class Ll extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Nl extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function Pl(e,t={count:0,interval:5e3}){const{recordingData:n,options:r}=e;if(n.length)try{return await Dl(e),!0}catch(s){if(s instanceof Ll||s instanceof Nl)throw s;if(_t("Replays",{_retryCount:t.count}),Au&&r._experiments&&r._experiments.captureExceptions&&ht(s),t.count>=3){const e=new Error(`${ra} - max retries exceeded`);try{e.cause=s}catch(o){}throw e}return t.interval*=++t.count,new Promise((n,r)=>{setTimeout(async()=>{try{await Pl(e,t),n(!0)}catch(s){r(s)}},t.interval)})}}const $l="__THROTTLED";function Fl(e,t,n){const r=new Map;let s=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})})(i),[...r.values()].reduce((e,t)=>
1e+t,0)>=t){const e=s;return s=!0,e?"__SKIPPED":$l}s=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...o)}}class Bl{constructor({options:e,recordingOptions:t}){Bl.prototype.__init.call(this),Bl.prototype.__init2.call(this),Bl.prototype.__init3.call(this),Bl.prototype.__init4.call(this),Bl.prototype.__init5.call(this),Bl.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,s,o;const i=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){void 0!==s&&clearTimeout(s),void 0!==o&&clearTimeout(o),s=o=void 0}function u(){return s&&clearTimeout(s),s=setTimeout(a,t),i&&void 0===o&&(o=setTimeout(a,i)),r}return u.cancel=c,u.flush=function(){return void 0!==s||void 0!==o?a():r},u}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Fl((e,t)=>function(e,t,n){return el(e,t)?Qu(e,t,n):Promise.resolve(null)}(this,e,t),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;s&&(this.clickDetector=new yu(this,s))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options;t<=0&&n<=0||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",Lu(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Lu("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const e=Xu({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Lu("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=Xu({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=cu({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Al(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{Du("[Replay] Stopping Replay"+(t?` triggered by ${t}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,zu(this)}catch(n){this._handleException(n)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Du("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Du("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();
1Du("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Vu(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${ta.location.pathname}${ta.location.hash}${ta.location.search}`,t=`${ta.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===$l){const e=Su({category:"replay.throttled"});this.addUpdate(()=>!Zu(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastTransaction||Dt().getTransaction(),t=(e&&Ae(e).data||{})[An];if(e&&t&&["route","custom"].includes(t))return Ae(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Uu({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){Au&&D.error("[Replay]",e),Au&&this._options._experiments&&this._options._experiments.captureExceptions&&ht(e)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Xu({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!Ku(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{ta.document.addEventListener("visibilitychange",this._handleVisibilityChange),ta.addEventListener("blur",this._handleWindowBlur),ta.addEventListener("focus",this._handleWindowFocus),ta.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(e){const t=Dt(),n=Ot();t.addScopeListener(Rl(e)),uo(Tu(e)),to(cl(e)),Cl(e);const r=il(e,!Ml(n));n&&n.addEventProcessor?n.addEventProcessor(r):Jn(r),Ml(n)&&(n.on("beforeSendEvent",ol(e)),n.on("afterSendEvent",sl(e)),n.on("createDsc",t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),n.on("startTransaction",t=>{e.lastTransaction=t}),n.on("finishTransaction",t=>{e.lastTransaction=t}),n.on("beforeSendFeedback",(t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=Ou(this)}_removeListeners(){try{ta.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ta.removeEventListener("blur",this._handleWindowBlur),ta.removeEventListener("focus",this._handleWindowFocus),ta.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===ta.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroun
1dTasks()}}__init2(){this._handleWindowBlur=()=>{const e=Su({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=Su({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Cu(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;Ju(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):Du("[Replay] Document has become active, but session has expired")}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:yc.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){const e=(t=this.performanceEntries,t.map(Ru).filter(
1Boolean)).concat(this.replayPerformanceEntries);var t;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(al(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(e){try{return Promise.all(al(e,[Ol(ta.performance.memory)]))}catch(t){return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await Pl({replayId:e,recordingData:s,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(t){this._handleException(t),this.stop({reason:"sendReplay"});const e=Ot();e&&e.recordDroppedEvent("send_error","replay")}}else Au&&D.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(Au&&D.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,s=n>this._options.maxReplayDuration+5e3;if(r||s)return Du(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(r&&this._debouncedFlush());const o=this.eventBuffer;if(o&&0===this.session.segmentId&&!o.hasCheckout&&Du("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(i){Au&&D.error(i)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Gu(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=Su({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function jl(e,t,n,r){const s=[...e,..."string"===typeof r?r.split(","):[],...t];return"undefined"!==typeof n&&("string"===typeof n&&s.push(`.${n}`),A(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),s.join(",")}const Ul='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Hl=["content-length","content-type","accept"];let zl=!1;const ql=e=>new Wl(e);class Wl{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:s=!0,useCompression:o=!0,workerUrl:i,_experiments:a={},sessionSampleRate:c,errorSampleRate:u,maskAllText:l=!0,maskAllInputs:d=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:h=750,mutationLimit:f=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:_=[],networkCaptureBodies:v=!0,networkRequestHeaders:b=[],networkResponseHeaders:S=[],mask:k=[],maskAttributes:w=["title","placeholder"],unmask:x=[],block:T=[],unblock:E=[],ignore:C=[],maskFn:I,beforeAddRecordingEvent:R,beforeErrorSampling:M,blockClass:O,blockSelector:A,maskInputOptions:D,maskTextClass:L,maskTextSelector:N,ignoreClass:P}={}){this.name=Wl.id;const $=function({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l={maskTextSelector:jl(e,[".sentry-mask","[data-sentry-mask]"],a,c),unmaskTextSelector:jl(t,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:jl(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],o,i),unblockSelector:jl(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:jl(s,[".sentry-ignore","[data-sentry-ignore]",'
1input[type="file"]'],u)};return o instanceof RegExp&&(l.blockClass=o),a instanceof RegExp&&(l.maskTextClass=a),l}({mask:k,unmask:x,block:T,unblock:E,ignore:C,blockClass:O,blockSelector:A,maskTextClass:L,maskTextSelector:N,ignoreClass:P});if(this._recordingOptions={maskAllInputs:d,maskAllText:l,maskInputOptions:{...D||{},password:!0},maskTextFn:I,maskInputFn:I,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return r?s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o:o}({maskAttributes:w,maskAllText:l,privacyOptions:$,key:e,value:t,el:n}),...$,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(t){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,aa),stickySession:s,sessionSampleRate:c,errorSampleRate:u,useCompression:o,workerUrl:i,blockAllMedia:p,maskAllInputs:d,maskAllText:l,mutationBreadcrumbLimit:h,mutationLimit:f,slowClickTimeout:m,slowClickIgnoreSelectors:g,networkDetailAllowUrls:y,networkDetailDenyUrls:_,networkCaptureBodies:v,networkRequestHeaders:Gl(b),networkResponseHeaders:Gl(S),beforeAddRecordingEvent:R,beforeErrorSampling:M,_experiments:a},"number"===typeof c&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${c} })`),this._initialOptions.sessionSampleRate=c),"number"===typeof u&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${u} })`),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ul}`:Ul),this._isInitialized&&hi())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return zl}set _isInitialized(e){zl=e}setupOnce(){hi()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const e=function(e){const t=Ot(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...G(e)};if(!n)return A(()=>{console.warn("SDK client is not available.")}),r;null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&A(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")});"number"===typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate);"number"===typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate);return r}(this._initialOptions);this._replay=new Bl({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const e=Ot().getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(e){}}}function Gl(e){return[...Hl,...e.map(e=>e.toLowerCase())]}function Yl(){const e=Ot();return e&&e.getIntegrationByName&&e.getIntegrationByName("Replay")}Wl.__initStatic();var Vl;function Jl(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Jl(e.parentNode,t,n,r+1):-1}function Kl(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"===typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(s){return!1}}}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Vl||(Vl={}));const Xl="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 Zl={map:{},getId:()=>(console.error(Xl),-1),getNode:()=>(console.error(Xl),null),removeNodeFromMap(){console.error(Xl)},has:()=>(console.error(Xl),!1),reset(){console.error(Xl)}};function Ql(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(e){od(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>Ql(e,t,o||{},!0)}function ed(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return"function"===typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch(r){return()=>{}}}
1function td(e,t,n,r,s){if(!e)return!1;const o=function(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}(e);if(!o)return!1;const i=Kl(t,n);if(!s){const e=r&&o.matches(r);return i(o)&&!e}const a=Jl(o,i);let c=-1;return!(a<0)&&(r&&(c=Jl(o,Kl(null,r))),a>-1&&c<0||a<c)}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(Zl=new Proxy(Zl,{get:(e,t,n)=>("map"===t&&console.error(Xl),Reflect.get(e,t,n))})),/[1-9][0-9]{12}/.test(Date.now().toString());const nd={};function rd(e){const t=nd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"===typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch(s){}return nd[e]=r.bind(window)}function sd(...e){return rd("requestAnimationFrame")(...e)}function od(...e){return rd("setTimeout")(...e)}var id=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(id||{});let ad;const cd=e=>{if(!ad)return e;return(...t)=>{try{return e(...t)}catch(n){if(ad&&!0===ad(n))return()=>{};throw n}}};for(var ud="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ld="undefined"===typeof Uint8Array?[]:new Uint8Array(256),dd=0;dd<64;dd++)ld[ud.charCodeAt(dd)]=dd;const pd=new Map;const hd=(e,t,n)=>{if(!e||!gd(e,t)&&"object"!==typeof e)return;const r=function(e,t){let n=pd.get(e);return n||(n=new Map,pd.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let s=r.indexOf(e);return-1===s&&(s=r.length,r.push(e)),s};function fd(e,t,n){if(e instanceof Array)return e.map(e=>fd(e,t,n));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),r=n.length,s="";for(t=0;t<r;t+=3)s+=ud[n[t]>>2],s+=ud[(3&n[t])<<4|n[t+1]>>4],s+=ud[(15&n[t+1])<<2|n[t+2]>>6],s+=ud[63&n[t+2]];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s}(e);return{rr_type:t,base64:n}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[fd(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[fd(e.data,t,n),e.width,e.height]}}if(gd(e,t)||"object"===typeof e){return{rr_type:e.constructor.name,index:hd(e,t,n)}}return e}const md=(e,t,n)=>e.map(e=>fd(e,t,n)),gd=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"===typeof t[e]);return Boolean(n.find(n=>e instanceof t[n]))};function yd(e,t,n,r,s){const o=[];try{const i=ed(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(o,...i){if(!td(this,t,n,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(i[0]&&"object"===typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...i])}});o.push(i)}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(e=>e())}}function _d(e,t,n,r,s,o,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if("function"!==typeof e[d])continue;const i=ed(e,d,function(e){return function(...i){const c=e.apply(this,i);if(hd(c,a,this),"tagName"in this.canvas&&!td(this.canvas,r,s,o,!0)){const e=md(i,a,this),r={type:t,property:d,args:e};n(this.canvas,r)}return c}});c.push(i)}catch(l){const r=Ql(e,d,{set(e){n(this.canvas,{type:t,property:d,args:[e],setter:!0})}});c.push(r)}return c}class vd{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{sampling:t="all",win:n,blockClass:r,blockSelector:s,unblockSelector:o,maxCanvasSize:i,recordCanvas:a,dataURLOptions:c,errorHandler:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,u&&(ad=u),e.enableManualSnapshot||cd(()=>{a&&"all"===t&&this.initCanvasMutationObserver(n,r,s,o),a&&"number"===typeof t&&this.initCanvasFPSObserver(t,n,r,s,o,i,{dataURLOptions:c})})()}initCanvasFPSObserver(e,t,n,r,s,o,i){const a=yd(t,n,r,s,!0),c=this.takeSnapshot(!1,e,t,n,r,s,o,i.dataURLOptions);this.resetObservers=()=>{a(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();
1const s=yd(e,t,n,r,!1),o=function(e,t,n,r,s){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const c of i)try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[c])continue;const i=ed(t.CanvasRenderingContext2D.prototype,c,function(o){return function(...i){return td(this.canvas,n,r,s,!0)||od(()=>{const n=md(i,t,this);e(this.canvas,{type:id["2D"],property:c,args:n})},0),o.apply(this,i)}});o.push(i)}catch(a){const n=Ql(t.CanvasRenderingContext2D.prototype,c,{set(t){e(this.canvas,{type:id["2D"],property:c,args:[t],setter:!0})}});o.push(n)}return()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r),i=function(e,t,n,r,s){const o=[];return o.push(..._d(t.WebGLRenderingContext.prototype,id.WebGL,e,n,r,s,0,t)),"undefined"!==typeof t.WebGL2RenderingContext&&o.push(..._d(t.WebGL2RenderingContext.prototype,id.WebGL2,e,n,r,s,0,t)),()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r,this.mirror);this.resetObservers=()=>{s(),o(),i()}}snapshot(e){const{options:t}=this,n=this.takeSnapshot(!0,"all"===t.sampling?2:t.sampling||2,t.win,t.blockClass,t.blockSelector,t.unblockSelector,t.maxCanvasSize,t.dataURLOptions,e);this.resetObservers=()=>{cancelAnimationFrame(n)}}takeSnapshot(e,t,n,r,s,o,i,a,c){const u=new Map,l=new Worker(function(){const e=new Blob(['for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};']);return URL.createObjectURL(e)}());l.onmessage=e=>{const t=e.data,{id:n}=t;if(u.set(n,!1),!("base64"in t))return;const{base64:r,type:s,width:o,height:i}=t;this.mutationCb({id:n,type:id["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0,o,i]}]})};const d=1e3/t;let p,h=0;const f=t=>{h&&t-h<d||(h=t,(e=>{if(e)return[e];const t=[];return n.document.querySelectorAll("canvas").forEach(e=>{td(e,r,s,o,!0)||t.push(e)}),t})(c).forEach(t=>{const n=this.mirror.getId(t);if(!u.get(n)&&t.width&&t.height){if(u.set(n,!0),!e&&["webgl","webgl2"].includes(t.__context)){const e=t.getContext(t.__context);!1===ui([e,"optionalAccess",e=>e.getContextAttributes,"call",e=>e(),"optionalAccess",e=>e.preserveDrawingBuffer])&&e.clear(e.COLOR_BUFFER_BIT)}createImageBitmap(t).then(e=>{l.postMessage({id:n,bitmap:e,width:t.width,height:t.height,dataURLOptions:a,maxCanvasSize:i},[e])}).catch(e=>{cd(()=>{throw e})()})}})),p=sd(f)};return p=sd(f),p}startPendingCanvasMutationFlusher(){sd(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,sd(e)};sd(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),sd(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map(e=>{const{type:t,...n}=e;return n}),{type:s}=n[0];this.mutationCb({id:t,type:s,commands:r}),this.pendingCanvasMutations.delete(e)}}const bd={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Sd="ReplayCanvas",kd=1280,wd=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,kd):kd,n?Math.min(n,kd):kd]};let s;const o=new Promise(e=>s=e);return{name:Sd,setupOnce(){},getOptions(){const{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{const r=new vd({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{"object"===typeof e&&(e.__rrweb__=!0)}catch(t){}}});return s(r),r},...bd[e||"medium"]||bd.medium}},async snapshot(e){(await o).snapshot(e)}}},xd=zt(Sd,wd),Td=b,Ed="#ffffff",Cd="inherit",Id="rgba(108, 95, 199, 1)",Rd={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:Ed,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackgroun
1d:"rgba(88, 74, 192, 1)",submitBackgroundHover:Id,submitBorder:Id,submitOutlineFocus:"#29232f",submitForeground:Ed,submitForegroundHover:Ed,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:Cd,inputForeground:Cd,inputBorder:"var(--border)",inputOutlineFocus:Id,formBorderRadius:"20px",formContentBorderRadius:"6px"},Md=Rd,Od={...Rd,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"},Ad="widget",Dd="api";async function Ld({feedback:{message:e,email:t,name:n,source:r,url:s}},{includeReplay:o=!0}={}){const i=Ot(),a=i&&i.getTransport(),c=i&&i.getDsn();if(!i||!a||!c)return;const u={contexts:{feedback:{contact_email:t,name:n,message:e,url:s,source:r}},type:"feedback"};return xt(async e=>{e.clearBreadcrumbs(),[Dd,Ad].includes(String(r))&&e.setLevel("info");const t=await async function({client:e,scope:t,event:n}){const r={};e.emit&&e.emit("preprocessEvent",n,r);const s=await ut(e.getOptions(),n,r,t,e,Je());return null===s?(e.recordDroppedEvent("event_processor","feedback",n),null):(s.platform=s.platform||"javascript",s)}({scope:e,client:i,event:u});if(!t)return;i.emit&&i.emit("beforeSendFeedback",t,{includeReplay:Boolean(o)});const n=jn(t,c,i.getOptions()._metadata,i.getOptions().tunnel);let s;try{s=await a.send(n)}catch(l){const e=new Error("Unable to send Feedback");try{e.cause=l}catch(d){}throw e}if(s){if("number"===typeof s.statusCode&&(s.statusCode<200||s.statusCode>=300))throw new Error("Unable to send Feedback");return s}})}function Nd({name:e,email:t,message:n,source:r=Dd,url:s=E()},o={}){if(!n)throw new Error("Unable to submit feedback with empty message");return Ld({feedback:{name:e,email:t,message:n,url:s,source:r}},o)}const Pd="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function $d(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Fd(e){return`\n --background: ${e.background};\n --background-hover: ${e.backgroundHover};\n --foreground: ${e.foreground};\n --error: ${e.error};\n --success: ${e.success};\n --border: ${e.border};\n --border-radius: ${e.borderRadius};\n --box-shadow: ${e.boxShadow};\n\n --submit-background: ${e.submitBackground};\n --submit-background-hover: ${e.submitBackgroundHover};\n --submit-border: ${e.submitBorder};\n --submit-outline-focus: ${e.submitOutlineFocus};\n --submit-foreground: ${e.submitForeground};\n --submit-foreground-hover: ${e.submitForegroundHover};\n\n --cancel-background: ${e.cancelBackground};\n --cancel-background-hover: ${e.cancelBackgroundHover};\n --cancel-border: ${e.cancelBorder};\n --cancel-outline-focus: ${e.cancelOutlineFocus};\n --cancel-foreground: ${e.cancelForeground};\n --cancel-foreground-hover: ${e.cancelForegroundHover};\n\n --input-background: ${e.inputBackground};\n --input-foreground: ${e.inputForeground};\n --input-border: ${e.inputBorder};\n --input-outline-focus: ${e.inputOutlineFocus};\n\n --form-border-radius: ${e.formBorderRadius};\n --form-content-border-radius: ${e.formContentBorderRadius};\n `}function Bd({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{const s=Td.document,o=s.createElement("div");o.id=e;const i=o.attachShadow({mode:"open"});return i.appendChild(function(e,t,n){const r=e.createElement("style");return r.textContent=`\n:host {\n --bottom: 1rem;\n --right: 1rem;\n --top: auto;\n --left: auto;\n --z-index: 100000;\n --font-family: ${n.light.fontFamily};\n --font-size: ${n.light.fontSize};\n\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n z-index: var(--z-index);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${Fd("dark"===t?n.dark:n.light)}\n}\n\n${"system"===t?`\n@media (prefers-color-scheme: dark) {\n :host {\n ${Fd(n.dark)}\n }\n}`:""}\n}`,r}(s,t,{dark:n,light:r})),i.appendChild(function(e){const t=e.createElement("style");return t.textContent="\n.dialog {\n line-height: 25px;\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n position: fixed;\n inset: 0;\n z-index: 10000;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n\n border: var(--border);\n border-radius: var(--form-border-radius);\n background-color: var(--background);\n color: var(--foreground);\n\n width: 320px;\n max-width: 100%;\n max-height: calc(100% - 2rem);\n display: flex;\n flex-direction: column;
1\n box-shadow: var(--box-shadow);\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n\n.dialog__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 20px;\n font-weight: 600;\n padding: 24px 24px 0 24px;\n margin: 0;\n margin-bottom: 16px;\n}\n\n.brand-link {\n display: inline-flex;\n}\n\n.error {\n color: var(--error);\n margin-bottom: 16px;\n}\n\n.form {\n display: grid;\n overflow: auto;\n flex-direction: column;\n gap: 16px;\n padding: 0 24px 24px;\n}\n\n.form__error-container {\n color: var(--error);\n}\n\n.form__error-container--hidden {\n display: none;\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: grid;\n gap: 4px;\n align-items: center;\n grid-auto-flow: column;\n grid-auto-columns: max-content;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n line-height: inherit;\n background-color: var(--input-background);\n box-sizing: border-box;\n border: var(--input-border);\n border-radius: var(--form-content-border-radius);\n color: var(--input-foreground);\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 500;\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n color: var(--input-foreground);\n opacity: 0.65;\n}\n\n.form__input:focus-visible {\n outline: 1px auto var(--input-outline-focus);\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.btn-group {\n display: grid;\n gap: 8px;\n margin-top: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--cancel-border);\n border-radius: var(--form-content-border-radius);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n padding: 6px 16px;\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n background-color: var(--submit-background);\n border-color: var(--submit-border);\n color: var(--submit-foreground);\n}\n.btn--primary:hover {\n background-color: var(--submit-background-hover);\n color: var(--submit-foreground-hover);\n}\n.btn--primary:focus-visible {\n outline: 1px auto var(--submit-outline-focus);\n}\n\n.btn--default {\n background-color: var(--cancel-background);\n color: var(--cancel-foreground);\n font-weight: 500;\n}\n.btn--default:hover {\n background-color: var(--cancel-background-hover);\n color: var(--cancel-foreground-hover);\n}\n.btn--default:focus-visible {\n outline: 1px auto var(--cancel-outline-focus);\n}\n\n.success-message {\n background-color: var(--background);\n border: var(--border);\n border-radius: var(--border-radius);
1\n box-shadow: var(--box-shadow);\n font-weight: 600;\n color: var(--success);\n padding: 12px 24px;\n line-height: 25px;\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success-icon path {\n fill: var(--success);\n}\n",t}(s)),{shadow:i,host:o}}catch(s){throw D.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function jd(e,t,n){if(!e)return;e.hideError();try{return await Nd({...t,source:Ad},n)}catch(r){Pd&&D.error(r),e&&e.showError("There was a problem submitting feedback, please wait and try again.")}}function Ud(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}function Hd(e,t,...n){const r=Td.document.createElement(e);t&&Object.entries(t).forEach(([e,t])=>{"className"===e&&"string"===typeof t?r.setAttribute("class",t):"boolean"===typeof t&&t?r.setAttribute(e,""):"string"===typeof t?r.setAttribute(e,t):e.startsWith("on")&&"function"===typeof t&&r.addEventListener(e.substring(2).toLowerCase(),t)});for(const s of n)zd(r,s);return r}function zd(e,t){const n=Td.document;if("undefined"!==typeof t&&null!==t)if(Array.isArray(t))for(const r of t)zd(e,r);else!1===t||("string"===typeof t?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function qd({buttonLabel:e,onClick:t}){const n=Hd("button",{type:"button",className:"widget__actor","aria-label":e,"aria-hidden":"false"},function(){const e=e=>Td.document.createElementNS("http://www.w3.org/2000/svg",e),t=Ud(e("svg"),{class:"feedback-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"}),n=Ud(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ud(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const s=e("defs"),o=Ud(e("clipPath"),{id:"clip0_57_80"}),i=Ud(e("rect"),{width:"20",height:"20",fill:"white"});return o.appendChild(i),s.appendChild(o),t.appendChild(s).appendChild(o).appendChild(i),{get el(){return t}}}().el,e?Hd("span",{className:"widget__actor__text"},e):null);return n.addEventListener("click",function(e){t&&t(e)}),{get el(){return n},show:()=>{n.classList.remove("widget__actor--hidden"),n.setAttribute("aria-hidden","false")},hide:()=>{n.classList.add("widget__actor--hidden"),n.setAttribute("aria-hidden","true")}}}function Wd(e,t){const n=e.get(t);return"string"===typeof n?n.trim():""}function Gd({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:s,messagePlaceholder:o,isRequiredLabel:i,cancelButtonLabel:a,submitButtonLabel:c,showName:u,showEmail
1:l,isNameRequired:d,isEmailRequired:p,defaultName:h,defaultEmail:f,onCancel:m,onSubmit:g}){const{el:y}=function({label:e}){return{el:Hd("button",{type:"submit",className:"btn btn--primary","aria-label":e},e)}}({label:c});const _=Hd("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});const v=Hd("input",{id:"name",type:u?"text":"hidden","aria-hidden":u?"false":"true",name:"name",required:d,className:"form__input",placeholder:t,value:h}),b=Hd("input",{id:"email",type:l?"text":"hidden","aria-hidden":l?"false":"true",name:"email",required:p,className:"form__input",placeholder:r,value:f}),S=Hd("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:o}),k=Hd("button",{type:"button",className:"btn btn--default","aria-label":a,onClick:e=>{m&&m(e)}},a),w=Hd("form",{className:"form",onSubmit:function(e){if(e.preventDefault(),e.target instanceof HTMLFormElement)try{if(g){const t=new FormData(e.target),n={name:Wd(t,"name"),email:Wd(t,"email"),message:Wd(t,"message")};g(n)}}catch(t){}}},[_,u&&Hd("label",{htmlFor:"name",className:"form__label"},[Hd("span",{className:"form__label__text"},e,d&&Hd("span",{className:"form__label__text--required"},` ${i}`)),v]),!u&&v,l&&Hd("label",{htmlFor:"email",className:"form__label"},[Hd("span",{className:"form__label__text"},n,p&&Hd("span",{className:"form__label__text--required"},` ${i}`)),b]),!l&&b,Hd("label",{htmlFor:"message",className:"form__label"},[Hd("span",{className:"form__label__text"},s,Hd("span",{className:"form__label__text--required"},` ${i}`)),S]),Hd("div",{className:"btn-group"},[y,k])]);return{get el(){return w},showError:function(e){_.textContent=e,_.classList.remove("form__error-container--hidden"),_.setAttribute("aria-hidden","false")},hideError:function(){_.textContent="",_.classList.add("form__error-container--hidden"),_.setAttribute("aria-hidden","true")}}}function Yd({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:s,isEmailRequired:o,colorScheme:i,defaultName:a,defaultEmail:c,onClosed:u,onCancel:l,onSubmit:d,...p}){let h=null;function f(){h&&(h.open=!1)}const{el:m,showError:g,hideError:y}=Gd({showEmail:r,showName:n,isEmailRequired:o,isNameRequired:s,defaultName:a,defaultEmail:c,onSubmit:d,onCancel:l,...p});return h=Hd("dialog",{className:"dialog",open:!0,onClick:function(){f(),u&&u()}},Hd("div",{className:"dialog__content",onClick:e=>{e.stopPropagation()}},Hd("h2",{className:"dialog__header"},e,t&&Hd("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},function({colorScheme:e}){const t=e=>Td.document.createElementNS("http://www.w3.org/2000/svg",e),n=Ud(t("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=Ud(t("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});n.append(r);const s=t("defs"),o=t("style");return o.textContent=`\n path {\n fill: ${"dark"===e?"#fff":"#362d59"};\n }`,"system"===e&&(o.textContent+="\n @media (prefers-color-scheme: dark) {\n path: {\n fill: '#fff';\n }\n }\n "),s.append(o),n.append(s),{get el(){return n}}}({colorScheme:i}).el)),m)),{get el(){return h},showError:g,hideError:y,open:function(){h&&(h.open=!0)},close:f,checkIsOpen:function(){return h&&!0===h.open||!1}}}function Vd({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}const r=Hd("div",{className:"success-message",onClick:n},function(){const e=e=>Td.document.createElementNS("http://www.w3.org/2000/svg",e),t=Ud(e("svg"),{class:"success-icon",width:"16",height:"17",viewBox:"0 0 16 17",fill:"none"}),n=Ud(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ud(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),s=Ud(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173
110.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(s,r);const o=e("defs"),i=Ud(e("clipPath"),{id:"clip0_57_156"}),a=Ud(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(a),{get el(){return t}}}().el,e);return{el:r,remove:n}}function Jd({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let s,o,i=!1;async function a(t){if(!o)return;const r=[];if(n.isNameRequired&&!t.name&&r.push(n.nameLabel),n.isEmailRequired&&!t.email&&r.push(n.emailLabel),t.message||r.push(n.messageLabel),r.length>0)return void o.showError(`Please enter in the following required fields: ${r.join(", ")}`);await jd(o,t)?(h(),function(){if(e)try{const t=Vd({message:n.successMessageText,onRemove:()=>{r&&clearTimeout(r),u()}});if(!t.el)throw new Error("Unable to show success message");e.appendChild(t.el);const r=setTimeout(()=>{t&&t.remove()},5e3)}catch(t){D.error(t)}}(),n.onSubmitSuccess&&n.onSubmitSuccess()):n.onSubmitError&&n.onSubmitError()}function c(){const e=Ot(),t=e&&e.getIntegrationByName&&e.getIntegrationByName("Replay");t&&t.flush().catch(e=>{Pd&&D.error(e)})}function u(){s&&s.show()}function l(){s&&s.hide()}function d(){try{if(o)return o.open(),i=!0,n.onFormOpen&&n.onFormOpen(),void c();const t=n.useSentryUser,r=Dt(),s=r&&r.getUser();if(o=Yd({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:t&&s&&s[t.name]||"",defaultEmail:t&&s&&s[t.email]||"",onClosed:()=>{u(),i=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{p(),u()},onSubmit:a}),!o.el)throw new Error("Unable to open Feedback dialog");e.appendChild(o.el),l(),n.onFormOpen&&n.onFormOpen(),c()}catch(t){D.error(t)}}function p(){o&&(o.close(),i=!1,n.onFormClose&&n.onFormClose())}function h(){if(o){p();const e=o.el;e&&e.remove(),o=void 0}}function f(){i||d(),l()}return r?r.addEventListener("click",f):t&&(s=qd({buttonLabel:n.buttonLabel,onClick:f}),s.el&&e.appendChild(s.el)),{get actor(){return s},get dialog(){return o},showActor:u,hideActor:l,removeActor:function(){s&&s.el&&s.el.remove()},openDialog:d,closeDialog:p,removeDialog:h}}const Kd=Td.document,Xd=e=>new Zd(e);class Zd{static __initStatic(){this.id="Feedback"}constructor({autoInject:e=!0,id:t="sentry-feedback",isEmailRequired:n=!1,isNameRequired:r=!1,showBranding:s=!0,showEmail:o=!0,showName:i=!0,useSentryUser:a={email:"email",name:"username"},themeDark:c,themeLight:u,colorScheme:l="system",buttonLabel:d="Report a Bug",cancelButtonLabel:p="Cancel",submitButtonLabel:h="Send Bug Report",formTitle:f="Report a Bug",emailPlaceholder:m="[email protected]",emailLabel:g="Email",messagePlaceholder:y="What's the bug? What did you expect?",messageLabel:_="Description",namePlaceholder:v="Your Name",nameLabel:b="Name",isRequiredLabel:S="(required)",successMessageText:k="Thank you for your report!",onFormClose:w,onFormOpen:x,onSubmitError:T,onSubmitSuccess:E}={}){this.name=Zd.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:e,showBranding:s,id:t,isEmailRequired:n,isNameRequired:r,showEmail:o,showName:i,useSentryUser:a,colorScheme:l,themeDark:{...Od,...c},themeLight:{...Md,...u},buttonLabel:d,cancelButtonLabel:p,submitButtonLabel:h,formTitle:f,emailLabel:g,emailPlaceholder:m,messageLabel:_,messagePlaceholder:y,nameLabel:b,namePlaceholder:v,isRequiredLabel:S,successMessageText:k,onFormClose:w,onFormOpen:x,onSubmitError:T,onSubmitSuccess:E}}setupOnce(){if(hi())try{this._cleanupWidgetIfExists();const{autoInject:e}=this.options;if(!e)return;this._createWidget(this.options)}catch(e){Pd&&D.error(e)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(e,t){try{const n=$d(this.options,t||{});return this._ensureShadowHost(n,({shadow:t})=>{const r="string"===typeof e?Kd.querySelector(e):"function"===typeof e.addEventListener?e:null;if(!r)return Pd&&D.error("[Feedback] Unable to attach to target element"),null;const s=Jd({shadow:t,options:n,attachTo:r});return this._widgets.add(s),this._widget||(this._widget=s),s})}catch(n){return Pd&&D.error(n),null}}createWidget(e){try{return this._createWidget($d(this.options,e||{}))}catch(t){return Pd&&D.error(t),null}}removeWidget(e){if(!e)return!1;try{if(this._widgets.has(e))return e.removeActor(),e.removeDialog(),this._widgets.delete(e),this._widget===e&&(this._widget=null),!0}catch(t){Pd&&D.error(t)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const e=Kd.querySelector(`#${this.options.id}`);e&&e.remove()}_createWidget(e){return this._ensureShadowHost(e,({shadow:t})=>{const n=Jd({shadow:t,options:e});return!this._hasInsertedActorStyles&&n.actor&&(t.appendChild(function(e){const t=e.createElement("style");return t.textContent="\n.widget__actor {\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n z-index: var(--z-index);\n\n line-height: 16px;\n\n display: flex;\n align-items: center;\n gap: 8px;\n\n border-radius: var(--border-radius);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n padding: 16px;\n text-decoration: none;\n z-index: 9000;\n\n color: var(--foreground);\n background-color: var(--background);\n border: var(--border);
1\n box-shadow: var(--box-shadow);\n opacity: 1;\n transition: opacity 0.1s ease-in-out;\n}\n\n.widget__actor:hover {\n background-color: var(--background-hover);\n}\n\n.widget__actor svg {\n width: 16px;\n height: 16px;\n}\n\n.widget__actor--hidden {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n\n.widget__actor__text {\n}\n\n@media (max-width: 600px) {\n .widget__actor__text {\n display: none;\n }\n}\n\n.feedback-icon path {\n fill: var(--foreground);\n}\n",t}(Kd)),this._hasInsertedActorStyles=!0),this._widgets.add(n),this._widget||(this._widget=n),n})}_ensureShadowHost(e,t){let n=!1;if(!this._shadow||!this._host){const{id:t,colorScheme:r,themeLight:s,themeDark:o}=e,{shadow:i,host:a}=Bd({id:t,colorScheme:r,themeLight:s,themeDark:o});this._shadow=i,this._host=a,n=!0}this._host.dataset.sentryFeedbackColorscheme=e.colorScheme;const r=t({shadow:this._shadow,host:this._host});return n&&Kd.body.appendChild(this._host),r}}Zd.__initStatic();const Qd="CaptureConsole",ep=(e={})=>{const t=e.levels||M;return{name:Qd,setupOnce(){},setup(e){"console"in b&&ro(({args:n,level:r})=>{Ot()===e&&t.includes(r)&&function(e,t){const n={level:ko(t),extra:{arguments:e}};xt(r=>{if(r.addEventProcessor(e=>(e.logger="console",ee(e,{handled:!1,type:"console"}),e)),"assert"===t&&!1===e[0]){const t=`Assertion failed: ${P(e.slice(1)," ")||"console.assert"}`;return r.setExtra("arguments",e.slice(1)),void ft(t,n)}const s=e.find(e=>e instanceof Error);if("error"===t&&s)return void ht(s,n);ft(P(e," "),n)})}(n,r)})}}};zt(Qd,ep);const tp=b,np="ContextLines",rp=(e={})=>{const t=null!=e.frameContextLines?e.frameContextLines:7;return{name:np,setupOnce(){},processEvent:e=>function(e,t){const n=tp.document,r=tp.location&&(s=tp.location.href,s.split(/[\?#]/,1)[0]);var s;if(!n||!r)return e;const o=e.exception&&e.exception.values;if(!o||!o.length)return e;const i=n.documentElement.innerHTML;if(!i)return e;const a=["<!DOCTYPE html>","<html>",...i.split("\n"),"</html>"];return o.forEach(e=>{const n=e.stacktrace;n&&n.frames&&(n.frames=n.frames.map(e=>function(e,t,n,r){if(e.filename!==n||!e.lineno||!t.length)return e;return function(e,t,n=5){if(void 0===t.lineno)return;const r=e.length,s=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,s-n),s).map(e=>N(e,0)),t.context_line=N(e[Math.min(r-1,s)],t.colno||0),t.post_context=e.slice(Math.min(s+1,r),s+1+n).map(e=>N(e,0))}(t,e,r),e}(e,a,r,t)))}),e}(e,t)}};zt(np,rp);const sp="Debug",op=(e={})=>{const t={debugger:!1,stringify:!1,...e};return{name:sp,setupOnce(){},setup(e){e.on&&e.on("beforeSendEvent",(e,n)=>{t.debugger,A(()=>{t.stringify?(console.log(JSON.stringify(e,null,2)),n&&Object.keys(n).length&&console.log(JSON.stringify(n,null,2))):(console.log(e),n&&Object.keys(n).length&&console.log(n))})})}}},ip=(zt(sp,op),"undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__),ap="Dedupe",cp=()=>{let e;return{name:ap,setupOnce(){},processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!lp(e,t))return!1;if(!up(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=dp(t),r=dp(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!lp(e,t))return!1;if(!up(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return ip&&D.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return e=t}}};zt(ap,cp);function up(e,t){let n=pp(e),r=pp(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++){const e=r[s],t=n[s];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function lp(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(s){return!1}}function dp(e){return e.exception&&e.exception.values&&e.exception.values[0]}function pp(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}const hp="ExtraErrorData",fp=(e={})=>{const t=e.depth||3,n=e.captureErrorCause||!1;return{name:hp,setupOnce(){},processEvent:(e,r)=>function(e,t={},n,r){if(!t.originalException||!i(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,o=function(e,t){try{const n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(const t of Object.keys(e)){if(-1!==n.indexOf(t))continue;const s=e[t];r[t]=i(s)?s.toString():s}if(t&&void 0!==e.cause&&(r.cause=i(e.cause)?e.cause.toString():e.cause),"function"===typeof e.toJSON){const t=e.toJSON();for(const e of Object.keys(t)){const n=t[e];r[e]=i(n)?n.toString():n}}return r}catch(n){ip&&D.error("Unable to extract extra data from the Error object:",n)}return null}(t.originalException,r);if(o){const t={...e.contexts},r=it(o,n);return h(r)&&(j(r,"__sentry_skip_normalization__",!0),t[s]=r),{...e,contexts:t}}return e}(e,r,t,n)}};zt(hp,fp);const mp="HttpClient",gp=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:mp,setupOnce(){},setup(e){!function(e,t){if(!Os())return;yo(n=>{if(Ot()!==e)return;const{response:r,args:s}=n,[o,i]=s;r&&function(e,t,n,r){if(vp(e,n.status,n.url)){const e=function(e,t){if(!t&&e instanceof Request)return e;if(e instanceof Request&&e.bodyUsed)return e;
1return new Request(e,t)}(t,r);let s,o,i,a;Sp()&&([{headers:s,cookies:i},{headers:o,cookies:a}]=[{cookieHeader:"Cookie",obj:e},{cookieHeader:"Set-Cookie",obj:n}].map(({cookieHeader:e,obj:t})=>{const n=function(e){const t={};return e.forEach((e,n)=>{t[n]=e}),t}(t.headers);let r;try{const t=n[e]||n[e.toLowerCase()]||void 0;t&&(r=_p(t))}catch(s){ip&&D.log(`Could not extract cookies from header ${e}`)}return{headers:n,cookies:r}}));mt(bp({url:e.url,method:e.method,status:n.status,requestHeaders:s,responseHeaders:o,requestCookies:i,responseCookies:a}))}}(t,o,r,i)})}(e,t),function(e,t){if(!("XMLHttpRequest"in b))return;mo(n=>{if(Ot()!==e)return;const r=n.xhr,s=r[fo];if(!s)return;const{method:o,request_headers:i}=s;try{!function(e,t,n,r){if(vp(e,t.status,t.responseURL)){let e,o,i;if(Sp()){try{const e=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;e&&(o=_p(e))}catch(s){ip&&D.log("Could not extract cookies from response headers")}try{i=function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return e[n]=r,e},{})}(t)}catch(s){ip&&D.log("Could not extract headers from response")}e=r}mt(bp({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:i,responseCookies:o}))}}(t,r,o,i)}catch(a){ip&&D.warn("Error while extracting response event form XHR response",a)}})}(e,t)}}};zt(mp,gp);function yp(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function _p(e){return e.split("; ").reduce((e,t)=>{const[n,r]=t.split("=");return e[n]=r,e},{})}function vp(e,t,n){return function(e,t){return e.some(e=>"number"===typeof e?e===t:t>=e[0]&&t<=e[1])}(e.failedRequestStatusCodes,t)&&(r=e.failedRequestTargets,s=n,r.some(e=>"string"===typeof e?s.includes(e):e.test(s)))&&!li(n,Ot());var r,s}function bp(e){const t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:"Error",value:t}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:yp(e.responseHeaders)}}};return ee(n,{type:"http.client",handled:!1}),n}function Sp(){const e=Ot();return!!e&&Boolean(e.getOptions().sendDefaultPii)}const kp=b,wp="ReportingObserver",xp=new WeakMap,Tp=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(e){if(xp.has(Ot()))for(const t of e)xt(e=>{e.setExtra("url",t.url);const n=`ReportingObserver [${t.type}]`;let r="No details available";if(t.body){const n={};for(const e in t.body)n[e]=t.body[e];if(e.setExtra("body",n),"crash"===t.type){const e=t.body;r=[e.crashId||"",e.reason||""].join(" ").trim()||r}else{r=t.body.message||r}}ft(`${n}: ${r}`)})}return{name:wp,setupOnce(){if(!("ReportingObserver"in Is))return;new kp.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){xp.set(e,!0)}}};zt(wp,Tp);function Ep(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const t=e[r];"."===t?e.splice(r,1):".."===t?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const Cp=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Ip(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Cp.exec(t);return n?n.slice(1):[]}function Rp(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const s=r>=0?e[r]:"/";s&&(t=`${s}/${t}`,n="/"===s.charAt(0))}return t=Ep(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."}function Mp(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}const Op="RewriteFrames",Ap=(e={})=>{const t=e.root,n=e.prefix||"app:///",r=e.iteratee||(e=>{if(!e.filename)return e;const r=/^[a-zA-Z]:\\/.test(e.filename)||e.filename.includes("\\")&&!e.filename.includes("/"),s=/^\//.test(e.filename);if(r||s){const s=r?e.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):e.filename,o=t?function(e,t){e=Rp(e).slice(1),t=Rp(t).slice(1);const n=Mp(e.split("/")),r=Mp(t.split("/")),s=Math.min(n.length,r.length);let o=s;for(let a=0;a<s;a++)if(n[a]!==r[a]){o=a;break}let i=[];for(let a=o;a<n.length;a++)i.push("..");return i=i.concat(r.slice(o)),i.join("/")}(t,s):function(e,t){let n=Ip(e)[2];return t&&n.slice(-1*t.length)===t&&(n=n.slice(0,n.length-t.length)),n}(s);e.filename=`${n}${o}`}return e});return{name:Op,setupOnce(){},processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>{return{...e,...e.stacktrace&&{stacktrace:(t=e.stacktrace,{...t,frames:t&&t.frames&&t.frames.map(e=>r(e))})}};var t})}}}catch(t){return e}}(t)),t}}},Dp=(zt(Op,Ap),"SessionTiming"),Lp=()=>{const e=Date.now();return{name:Dp,setupOnce(){},processEvent(t){const n=Date.now();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}};zt(Dp,Lp);function Np(){gi.document?gi.document.addEventListener("visibilitychange",()=>{const e=ar();if(gi.document.hidden&&e){const t="cancelled",{op:n,status:r}=Ae(e);fi&&D.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):fi&&D.warn("[Tracing] Could not set up background tab detection due to lack of global document")}function Pp(e){return[{type:"span"},e]}function $p(e){return"number"===typeof e&&isFinite(e)}function Fp(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function Bp(e){return e/1e3}function jp(){return gi&&gi.addEventListener&&gi.performance}let Up,Hp,zp=0,qp={};function Wp(){const e=jp();if(e&&ie){e.mark&&gi.performance.mark("sentry-tracing-init");const t=Zi("fid",({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Bp(ie),r=Bp(t.startTime);fi&&D.log("[Measurements] Adding FID"),qp.fid={value:e.value,unit:"millisecond"},qp["mark.fid"]={value:n+r,unit:"second"}},Vi,ji),n=function(e,t=!1){return Zi("cls",e,Yi,Bi,t)}(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(fi&&D.log("[Measurements] Adding CLS"),qp.cls={value:e.value,unit:""},Hp=t)},!0),r=qi(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(fi&&D.log("[Measurements] Adding LCP"),qp.lcp={value:e.value,unit:"millisecond"},Up=t)},!0),s=function(e){return Zi("ttfb",e,Ki,Hi)}(({metric:e})=>{e.entries[e.entries.length-1]&&(fi&&D.log("[Measurements] Adding TTFB"),qp.ttfb={value:e.value,unit:"millisecond"})});return()=>{t(),n(),r(),s()}}return()=>{}}function Gp(){Wi("longtask",({entries:e})=>{for(const t of e){const e=ar();if(!e)return;const n=Bp(ie+t.startTime),r=Bp(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})}function Yp(){Wi("event",({entries:e})=>{for(const t of e){const e=ar();if(!e)return;if("click"===t.name){const n=Bp(ie+t.startTime),r=Bp(t.duration),s={description:x(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r},o=I(t.target);o&&(s.attributes={"ui.component_name":o}),e.startChild(s)}}})}function Vp(e,t){if(jp()&&ie){const n=function(e,t){return n=({metric:n})=>{if(void 0===n.value)return;const r=n.entries.find(e=>e.duration===n.value&&void 0!==Jp[e.name]),s=Ot();if(!r||!s)return;const o=Jp[r.name],i=s.getOptions(),a=Bp(ie+r.startTime),c=Bp(n.value),u=void 0!==r.interactionId?e[r.interactionId]:void 0;if(void 0===u)return;const{routeName:l,parentContext:d,activeTransaction:p,user:h,replayId:f}=u,m=void 0!==h?h.email||h.id||h.ip_address:void 0,g=void 0!==p?p.getProfileId():void 0,y=new Or({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${o}`,name:x(r.target),attributes:{release:i.release,environment:i.environment,transaction:l,...void 0!==m&&""!==m?{user:m}:{},...void 0!==g?{profile_id:g}:{},...void 0!==f?{replay_id:f}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),_=function(e,t,n){if(!pr(t))return!1;let r;return r=void 0!==e&&"function"===typeof t.tracesSampler?t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:gi.location}):void 0!==e&&void 0!==e.sampled?e.sampled:"undefined"!==typeof t.tracesSampleRate?t.tracesSampleRate:1,Fr(r)?!0===r?n:!1===r?0:r*n:(fi&&D.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}(d,i,t);
1if(_&&Math.random()<_){const e=y?function(e,t){const n={sent_at:(new Date).toISOString()};return t&&(n.dsn=pn(t)),gn(n,e.map(Pp))}([y],s.getDsn()):void 0,t=s&&s.getTransport();return void(t&&e&&t.send(e).then(null,e=>{fi&&D.error("Error while sending interaction:",e)}))}},Zi("inp",n,Xi,zi);var n}(e,t);return()=>{n()}}return()=>{}}const Jp={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Kp(e){const t=jp();if(!t||!gi.performance.getEntries||!ie)return;fi&&D.log("[Tracing] Adding & adjusting spans using Performance API");const n=Bp(ie),r=t.getEntries(),{op:s,start_timestamp:o}=Ae(e);if(r.slice(zp).forEach(t=>{const r=Bp(t.startTime),s=Bp(t.duration);if(!("navigation"===e.op&&o&&n+r<o))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Xp(e,t,r,n)}),Xp(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Xp(e,t,"fetch",n,"cache","domainLookupStart"),Xp(e,t,"domainLookup",n,"DNS"),function(e,t,n){t.responseEnd&&(Fp(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Bp(t.requestStart),endTimestamp:n+Bp(t.responseEnd)}),Fp(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Bp(t.responseStart),endTimestamp:n+Bp(t.responseEnd)}))}(e,t,n)}(e,t,n);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,s){const o=s+n,i=o+r;Fp(e,{description:t.name,endTimestamp:i,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:o})}(e,t,r,s,n);const o=wi(),i=t.startTime<o.firstHiddenTime;"first-paint"===t.name&&i&&(fi&&D.log("[Measurements] Adding FP"),qp.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&i&&(fi&&D.log("[Measurements] Adding FCP"),qp.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":!function(e,t,n,r,s,o){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const i=wo(n),a={};Zp(a,t,"transferSize","http.response_transfer_size"),Zp(a,t,"encodedBodySize","http.response_content_length"),Zp(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus);i.protocol&&(a["url.scheme"]=i.protocol.split(":").pop());i.host&&(a["server.address"]=i.host);a["url.same_origin"]=n.includes(gi.location.origin);const c=o+r,u=c+s;Fp(e,{description:n.replace(gi.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}(e,t,t.name,r,s,n)}}),zp=Math.max(r.length-1,0),function(e){const t=gi.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),$p(n.rtt)&&(qp["connection.rtt"]={value:n.rtt,unit:"millisecond"}));$p(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`);$p(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===s){!function(e){const t=yi();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(fi&&D.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(qp),["fcp","fp","lcp"].forEach(e=>{if(!qp[e]||!o||n>=o)return;const t=qp[e].value,r=n+Bp(t),s=Math.abs(1e3*(r-o)),i=s-t;fi&&D.log(`[Measurements] Normalized ${e} from ${t} to ${s} (${i})`),qp[e].value=s});const t=qp["mark.fid"];t&&qp.fid&&(Fp(e,{description:"first input delay",endTimestamp:t.value+Bp(qp.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete qp["mark.fid"]),"fcp"in qp||delete qp.cls,Object.keys(qp).forEac
1h(e=>{us(e,qp[e].value,qp[e].unit)}),function(e){Up&&(fi&&D.log("[Measurements] Adding LCP Data"),Up.element&&e.setTag("lcp.element",x(Up.element)),Up.id&&e.setTag("lcp.id",Up.id),Up.url&&e.setTag("lcp.url",Up.url.trim().slice(0,200)),e.setTag("lcp.size",Up.size));Hp&&Hp.sources&&(fi&&D.log("[Measurements] Adding CLS Data"),Hp.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,x(t.node))))}(e)}Up=void 0,Hp=void 0,qp={}}function Xp(e,t,n,r,s,o){const i=o?t[o]:t[`${n}End`],a=t[`${n}Start`];a&&i&&Fp(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+Bp(a),endTimestamp:r+Bp(i)})}function Zp(e,t,n,r){const s=t[n];null!=s&&s<2147483647&&(e[r]=s)}function Qp(e,t,n,r,s="auto.http.browser"){if(!pr()||!e.fetchData)return;const o=t(e.fetchData.url);if(e.endTimestamp&&o){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(!function(e,t){if(t.response){Rr(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus("internal_error");e.end()}(n,e),delete r[t]))}const i=Dt(),a=Ot(),{method:c,url:u}=e.fetchData,l=function(e){try{return new URL(e).href}catch(t){return}}(u),d=l?wo(l).host:void 0,p=o?gr({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":d,[Nn]:s},op:"http.client"}):void 0;if(p&&(e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p),n(e.fetchData.url)&&a){const t=e.args[0];e.args[1]=e.args[1]||{};const n=e.args[1];n.headers=function(e,t,n,r,s){const o=s||n.getSpan(),i=Je(),{traceId:a,spanId:c,sampled:u,dsc:l}={...i.getPropagationContext(),...n.getPropagationContext()},d=o?Re(o):Ce(a,c,u),p=ke(l||(o?Ne(o):Le(a,t,n))),h=r.headers||("undefined"!==typeof Request&&y(e,Request)?e.headers:void 0);if(h){if("undefined"!==typeof Headers&&y(h,Headers)){const e=new Headers(h);return e.append("sentry-trace",d),p&&e.append(_e,p),e}if(Array.isArray(h)){const e=[...h,["sentry-trace",d]];return p&&e.push([_e,p]),e}{const e="baggage"in h?h.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),p&&t.push(p),{...h,"sentry-trace":d,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":d,baggage:p}}(t,a,i,n,p)}return p}const eh=["localhost",/^\/(?!\/)/],th={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:eh,tracePropagationTargets:eh};function nh(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:o,enableHTTPTimings:i}={traceFetch:th.traceFetch,traceXHR:th.traceXHR,...e},a="function"===typeof o?o:e=>!0,c=e=>function(e,t){return F(e,t||eh)}(e,r||s),u={};t&&yo(e=>{const t=Qp(e,a,c,u);if(t){const n=oh(e.fetchData.url),r=n?wo(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}i&&t&&rh(t)}),n&&mo(e=>{const t=function(e,t,n,r){const s=e.xhr,o=s&&s[fo];if(!pr()||!s||s.__sentry_own_request__||!o)return;const i=t(o.url);if(e.endTimestamp&&i){const e=s.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==o.status_code&&(Rr(t,o.status_code),t.end(),delete r[e]))}const a=Dt(),c=Je(),u=oh(o.url),l=u?wo(u).host:void 0,d=i?gr({name:`${o.method} ${o.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":o.method,"http.url":u,url:o.url,"server.address":l,[Nn]:"auto.http.browser"},op:"http.client"}):void 0;d&&(s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d);const p=Ot();if(s.setRequestHeader&&n(o.url)&&p){const{traceId:e,spanId:t,sampled:n,dsc:r}={...c.getPropagationContext(),...a.getPropagationContext()};!function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(_e,n)}catch(r){}}(s,d?Re(d):Ce(e,t,n),ke(r||(d?Ne(d):Le(e,p,a))))}return d}(e,a,c,u);i&&t&&rh(t)})}function rh(e){const{url:t}=Ae(e).data||{};if(!t||"string"!==typeof t)return;const n=Wi("resource",({entries:r})=>{r.forEach(r=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"===typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}
1(r)&&r.name.endsWith(t)){(function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(const s of e){if("/"===s){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=s}r===e&&(t=r);return{name:t,version:n}}(e.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",t]),!ie)return r;return[...r,["http.request.redirect_start",sh(e.redirectStart)],["http.request.fetch_start",sh(e.fetchStart)],["http.request.domain_lookup_start",sh(e.domainLookupStart)],["http.request.domain_lookup_end",sh(e.domainLookupEnd)],["http.request.connect_start",sh(e.connectStart)],["http.request.secure_connection_start",sh(e.secureConnectionStart)],["http.request.connection_end",sh(e.connectEnd)],["http.request.request_start",sh(e.requestStart)],["http.request.response_start",sh(e.responseStart)],["http.request.response_end",sh(e.responseEnd)]]})(r).forEach(t=>e.setAttribute(...t)),setTimeout(n)}})})}function sh(e=0){return((ie||performance.timeOrigin)+e)/1e3}function oh(e){try{return new URL(e,gi.location.origin).href}catch(t){return}}const ih={...Dr,markBackgroundTransactions:!0,routingInstrumentation:function(e,t=!0,n=!0){if(!gi||!gi.location)return void(fi&&D.warn("Could not initialize routing instrumentation due to invalid location"));let r,s=gi.location.href;t&&(r=e({name:gi.location.pathname,startTimestamp:ie?ie/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&to(({to:t,from:n})=>{void 0===n&&s&&-1!==s.indexOf(t)?s=void 0:n!==t&&(s=void 0,r&&(fi&&D.log(`[Tracing] Finishing current transaction with op: ${r.op}`),r.end()),r=e({name:gi.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...th};class ah{constructor(e){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,Hr(),fi&&(this._hasSetTracePropagationTargets=!(!e||!e.tracePropagationTargets&&!e.tracingOrigins)),this.options={...ih,...e},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=Wp(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&Vp(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&Gp(),this.options._experiments.enableInteractions&&Yp(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,t){this._getCurrentHub=t;const n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:s,startTransactionOnLocationChange:o,startTransactionOnPageLoad:i,markBackgroundTransactions:a,traceFetch:c,traceXHR:u,shouldCreateSpanForRequest:l,enableHTTPTimings:d,_experiments:p}=this.options,h=r&&r.tracePropagationTargets,f=h||this.options.tracePropagationTargets;fi&&this._hasSetTracePropagationTargets&&h&&D.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),s(e=>{const n=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,e,t),n},i,o),a&&Np(),p.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),nh({traceFetch:c,traceXHR:u,tracePropagationTargets:f,shouldCreateSpanForRequest:l,enableHTTPTimings:d})}_createRouteTransaction(e){if(!this._getCurrentHub)return void(fi&&D.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`));const t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:s,heartbeatInterval:o}=this.options,i="pageload"===e.op;let a;if(i){const t=i?ch("sentry-trace"):"",n=i?ch("baggage"):void 0,{traceId:r,dsc:s,parentSpanId:o,sampled:c}=Ee(t,n);a={traceId:r,parentSpanId:o,parentSampled:c,...e,metadata:{...e.metadata,dynamicSamplingContext:s},trimEnd:!0}}else a={trimEnd:!0,...e};const c="function"===typeof n?n(a):a,u=void 0===c?{...a,sampled:!1}:c;u.metadata=u.name!==a.name?{...u.metadata,source:"custom"}:u.metadata,this._latestRoute.name=u.name,this._latestRoute.context=u,!1===u.sampled&&fi&&D.log(`[Tracing] Will not send ${u.op} transaction because of beforeNavigate.`),fi&&D.log(`[Tracing] Starting ${u.op} transaction on scope`);const{location:l}=gi,d=Ur(t,u,r,s,!0,{location:l},o,i);return i&&gi.document&&(gi.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(gi.document.readyState)&&d.sendAutoFinishSignal()}),["interactive","complete"].includes(gi.document.readyState)&&d.sendAutoFinishSignal()),d.registerBeforeFinishCallback(e=>{this._collectWebVitals(),Kp(e)}),d}_registerInteractionListener(){let e;const t=()=>{const{idleTimeout:t,finalTimeout:n,heartbeatInterval:r}=this.options,s="ui.action.click",o=ar();if(o&&o.op&&["navigation","pageload"].includes(o.op))return void(fi&&D.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`));if(e&&(e.setFinishReason("interactionInterrupted"),e.end(),e=void 0),!this._getCurrentHub)return void(fi&&D.warn(`[Tracing] Did not create ${s}
1 transaction because _getCurrentHub is invalid.`));if(!this._latestRoute.name)return void(fi&&D.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`));const i=this._getCurrentHub(),{location:a}=gi,c={name:this._latestRoute.name,op:s,trimEnd:!0,data:{[An]:this._latestRoute.context?uh(this._latestRoute.context):"url"}};e=Ur(i,c,t,n,!0,{location:a},r)};["click"].forEach(e=>{gi.document&&addEventListener(e,t,{once:!1,capture:!0})})}_registerInpInteractionListener(){const e=({entries:e})=>{const t=Ot(),n=void 0!==t&&void 0!==t.getIntegrationByName?t.getIntegrationByName("Replay"):void 0,r=void 0!==n?n.getReplayId():void 0,s=ar(),o=Dt(),i=void 0!==o?o.getUser():void 0;e.forEach(e=>{if(function(e){return"duration"in e}(e)){const t=e.interactionId;if(void 0===t)return;const n=this._interactionIdToRouteNameMapping[t],o=e.duration,a=e.startTime,c=Object.keys(this._interactionIdToRouteNameMapping),u=c.length>0?c.reduce((e,t)=>this._interactionIdToRouteNameMapping[e].duration<this._interactionIdToRouteNameMapping[t].duration?e:t):void 0;if("first-input"===e.entryType){if(c.map(e=>this._interactionIdToRouteNameMapping[e]).some(e=>e.duration===o&&e.startTime===a))return}if(!t)return;if(n)n.duration=Math.max(n.duration,o);else if(c.length<10||void 0===u||o>this._interactionIdToRouteNameMapping[u].duration){const e=this._latestRoute.name,n=this._latestRoute.context;e&&n&&(u&&Object.keys(this._interactionIdToRouteNameMapping).length>=10&&delete this._interactionIdToRouteNameMapping[u],this._interactionIdToRouteNameMapping[t]={routeName:e,duration:o,parentContext:n,user:i,activeTransaction:s,replayId:r,startTime:a})}}})};Wi("event",e),Wi("first-input",e)}}function ch(e){const t=C(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function uh(e){const t=e.attributes&&e.attributes[An],n=e.data&&e.data[An],r=e.metadata&&e.metadata.source;return t||n||r}const lh={...Dr,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...th},dh=(e={})=>{const t=!!fi&&!(!e.tracePropagationTargets&&!e.tracingOrigins);Hr(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const n={...lh,...e},r=Wp(),s={};n.enableInp&&Vp(s,n.interactionsSampleRate),n.enableLongTask&&Gp(),n._experiments.enableInteractions&&Yp();const o={name:void 0,context:void 0};function i(e){const t=Ve(),{beforeStartSpan:s,idleTimeout:i,finalTimeout:a,heartbeatInterval:c}=n,u="pageload"===e.op;let l;if(u){const t=u?fh("sentry-trace"):"",n=u?fh("baggage"):void 0,{traceId:r,dsc:s,parentSpanId:o,sampled:i}=Ee(t,n);l={traceId:r,parentSpanId:o,parentSampled:i,...e,metadata:{...e.metadata,dynamicSamplingContext:s},trimEnd:!0}}else l={trimEnd:!0,...e};const d=s?s(l):l;d.metadata=d.name!==l.name?{...d.metadata,source:"custom"}:d.metadata,o.name=d.name,o.context=d,!1===d.sampled&&fi&&D.log(`[Tracing] Will not send ${d.op} transaction because of beforeNavigate.`),fi&&D.log(`[Tracing] Starting ${d.op} transaction on scope`);const{location:p}=gi,h=Ur(t,d,i,a,!0,{location:p},c,u);return u&&gi.document&&(gi.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(gi.document.readyState)&&h.sendAutoFinishSignal()}),["interactive","complete"].includes(gi.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback(e=>{r(),Kp(e)}),h}return{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(e){const r=e.getOptions(),{markBackgroundSpan:a,traceFetch:c,traceXHR:u,shouldCreateSpanForRequest:l,enableHTTPTimings:d,_experiments:p}=n,h=r&&r.tracePropagationTargets,f=h||n.tracePropagationTargets;let m;fi&&t&&h&&D.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let g=gi.location&&gi.location.href;if(e.on&&(e.on("startNavigationSpan",e=>{m&&(fi&&D.log(`[Tracing] Finishing current transaction with op: ${Ae(m).op}`),m.end()),m=i({op:"navigation",...e})}),e.on("startPageLoadSpan",e=>{m&&(fi&&D.log(`[Tracing] Finishing current transaction with op: ${Ae(m).op}`),m.end()),m=i({op:"pageload",...e})})),n.instrumentPageLoad&&e.emit&&gi.location){const t={name:gi.location.pathname,startTimestamp:ie?ie/1e3:void 0,origin:"auto.pageload.browser",attributes:{[An]:"url"}};ph(e,t)}n.instrumentNavigation&&e.emit&&gi.location&&to(({to:t,from:n})=>{if(void 0===n&&g&&-1!==g.indexOf(t))g=void 0;else if(n!==t){g=void 0;const t={name:gi.location.pathname,origin:"auto.navigation.browser",attributes:{[An]:"url"}};hh(e,t)}}),a&&Np(),p.enableInteractions&&function(e,t){let n;const r=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:o}=e,i="ui.action.click",a=ar();if(a&&a.op&&["navigation","pageload"].includes(a.op))return void(fi&&D.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`));if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name)return void(fi&&D.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`));const{location:c}=gi,u={name:t.name,op:i,trimEnd:!0,data:{[An]:t.context?mh(t.context):"url"}};n=Ur(Ve(),u,r,s,!0,{location:c},o)};
1["click"].forEach(e=>{gi.document&&addEventListener(e,r,{once:!1,capture:!0})})}(n,o),n.enableInp&&function(e,t){const n=({entries:n})=>{const r=Ot(),s=void 0!==r&&void 0!==r.getIntegrationByName?r.getIntegrationByName("Replay"):void 0,o=void 0!==s?s.getReplayId():void 0,i=ar(),a=Dt(),c=void 0!==a?a.getUser():void 0;n.forEach(n=>{if(function(e){return"duration"in e}(n)){const r=n.interactionId;if(void 0===r)return;const s=e[r],a=n.duration,u=n.startTime,l=Object.keys(e),d=l.length>0?l.reduce((t,n)=>e[t].duration<e[n].duration?t:n):void 0;if("first-input"===n.entryType){if(l.map(t=>e[t]).some(e=>e.duration===a&&e.startTime===u))return}if(!r)return;if(s)s.duration=Math.max(s.duration,a);else if(l.length<10||void 0===d||a>e[d].duration){const n=t.name,s=t.context;n&&s&&(d&&Object.keys(e).length>=10&&delete e[d],e[r]={routeName:n,duration:a,parentContext:s,user:c,activeTransaction:i,replayId:o,startTime:u})}}})};Wi("event",n),Wi("first-input",n)}(s,o),nh({traceFetch:c,traceXHR:u,tracePropagationTargets:f,shouldCreateSpanForRequest:l,enableHTTPTimings:d})},options:n}};function ph(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);const n=yr();return"pageload"===(n&&Ae(n).op)?n:void 0}function hh(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);const n=yr();return"navigation"===(n&&Ae(n).op)?n:void 0}function fh(e){const t=C(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function mh(e){const t=e.attributes&&e.attributes[An],n=e.data&&e.data[An],r=e.metadata&&e.metadata.source;return t||n||r}function gh(e,t){J&&D.info(`[Offline]: ${e}`,t)}function yh(e){return t=>{const n=e(t),r=t.createStore?t.createStore(t):void 0;let s,o=5e3;function i(e,n,r){return s=["replay_event","replay_recording","client_report"],!_n(e,(e,t)=>s.includes(t))&&(!t.shouldStore||t.shouldStore(e,n,r));var s}function a(e){r&&(s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const e=await r.pop();e&&(gh("Attempting to send previously queued event"),u(e).catch(e=>{gh("Failed to retry sending",e)}))},e),"number"!==typeof s&&s.unref&&s.unref())}function c(){s||(a(o),o=Math.min(2*o,36e5))}async function u(e){try{const t=await n.send(e);let r=100;if(t)if(t.headers&&t.headers["retry-after"])r=qr(t.headers["retry-after"]);else if((t.statusCode||0)>=400)return t;return a(r),o=5e3,t}catch(t){if(r&&await i(e,t,o))return await r.insert(e),c(),gh("Error sending. Event queued",t),{};throw t}}return t.flushAtStartup&&c(),{send:u,flush:e=>n.flush(e)}}}function _h(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function vh(e){return _h(e.getAllKeys())}function bh(e){let t;function n(){return void 0==t&&(t=function(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=_h(n);return e=>r.then(n=>e(n.transaction(t,"readwrite").objectStore(t)))}(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async t=>{try{const r=await bn(t,e.textEncoder);await function(e,t,n){return e(e=>vh(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),_h(e.transaction)}))}(n(),r,e.maxQueueSize||30)}catch(r){}},pop:async()=>{try{const t=await function(e){return e(e=>vh(e).then(t=>{if(0!==t.length)return _h(e.get(t[0])).then(n=>(e.delete(t[0]),_h(e.transaction).then(()=>n)))}))}(n());if(t)return function(e,t,n){let r="string"===typeof e?t.encode(e):e;function s(e){const t=r.subarray(0,e);return r=r.subarray(e+1),t}function o(){let e=r.indexOf(10);return e<0&&(e=r.length),JSON.parse(n.decode(s(e)))}const i=o(),a=[];for(;r.length;){const e=o(),t="number"===typeof e.length?e.length:void 0;a.push([e,t?s(t):o()])}return[i,a]}(t,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch(t){}}}}function Sh(e){return function(e){return t=>e({...t,createStore:bh})}(yh(e))}const kh=1e6,wh=String(0),xh="main";let Th="",Eh="",Ch="",Ih=ls.navigator&&ls.navigator.userAgent||"",Rh="";const Mh=ls.navigator&&ls.navigator.language||ls.navigator&&ls.navigator.languages&&ls.navigator.languages[0]||"";const Oh=ls.navigator&&ls.navigator.userAgentData;var Ah;function Dh(e){return function(e){return!("thread_metadata"in e)}(e)?function(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[wh]:{name:xh}}};if(!e.samples.length)return r;const s=e.samples[0].timestamp,o="number"===typeof performance.timeOrigin?performance.timeOrigin:ie||0,i=o-(ie||o);for(let a=0;a<e.samples.length;a++){const o=e.samples[a];if(void 0===o.stackId){void 0===t&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((o.timestamp+i-s)*kh).toFixed(0),stack_id:t,thread_id:wh};continue}let c=e.stacks[o.stackId];const u=[];for(;c;){u.push(c.frameId);const t=e.frames[c.frameId];void 0===r.frames[c.frameId]&&(r.frames[c.frameId]={function:t.name,abs_path:"number"===typeof t.resourceId?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),c=void 0===c.parentId?void 0:e.stacks[c.parentId]}const l={elapsed_since_start_ns:((o.timestamp+i-s)*kh).toFixed(0),stack_id:n,thread_id:wh};r.stacks[n]=u,r.samples[a]=l,n++}return r}(e):e}function Lh(e,t,n,r){if("transaction"!==r.type)throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(void 0===n||null===n)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=function(e){const t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return"string"===typeof t&&32!==t.length&&ms&&D.log(`[Profiling] Invalid traceId: ${t} on profiled event`),"string"!==typeof t?"":t}(r),o=Dh(n),i=t||("number"===typeof r.start_timestamp?1e3*r.start_timestamp:Date.now()),a="number"===typeof r.timestamp?1e3*r.timestamp:Date.now();return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||V,runtime:{name:"javascript",version:ls.navigator.userAgent},os:{name:Th,version:Eh,build_number:Ih},device:{locale:Mh,model:Rh,manufacturer:Ih,architecture:Ch,is_emulator:!1},debug_meta:{images:$h(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||K(),trace_id:s,active_thread_id:wh,relative_start_ns:"0",relative_end_ns:(1e6*(a-i)).toFixed(0)}]}}function Nh(e){return"pageload"===e.op}"object"===typeof(Ah=Oh)&&null!==Ah&&"getHighEntropyValues"in Ah&&Oh.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Th=e.platform||"",Ch=e.architecture||"",Rh=e.model||"",Eh=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){const t=e.fullVersionList[e.fullVersionList.length-1];Ih=`${t.brand} ${t.version}`}}).catch(e=>{});const Ph=new WeakMap;function $h(e){const t=b._sentryDebugIds;if(!t)return[];const n=Ot(),r=n&&n.getOptions(),s=r&&r.stackParser;if(!s)return[];let o;const i=Ph.get(s);i?o=i:(o=new Map,Ph.set(s,o));const a=Object.keys(t).reduce((e,n)=>{let r;const i=o.get(n);i?r=i:(r=s(n),o.set(n,r));for(let s=r.length-1;s>=0;s--){const o=r[s],i=o&&o.filename;if(o&&i){e[i]=t[n];break}}return e},{}),c=[];for(const u of e)u&&a[u]&&c.push({type:"sourcemap",code_file:u,debug_id:a[u]});return c}let Fh=!1;function Bh(e){if(Fh)return ms&&D.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return ms&&D.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=Ot(),n=t&&t.getOptions();if(!n)return ms&&D.log("[Profiling] Profiling disabled, no options foun
1d."),!1;const r=n.profilesSampleRate;if(!("number"!==typeof(s=r)&&"boolean"!==typeof s||"number"===typeof s&&isNaN(s)?(ms&&D.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),0):!0===s||!1===s||!(s<0||s>1)||(ms&&D.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${s}.`),0)))return ms&&D.warn("[Profiling] Discarding profile because of invalid sample rate."),!1;var s;if(!r)return ms&&D.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1;return!!(!0===r||Math.random()<r)||(ms&&D.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1)}function jh(e,t,n,r){return function(e){return e.samples.length<2?(ms&&D.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):!!e.frames.length||(ms&&D.log("[Profiling] Discarding profile because it contains no frames"),!1)}(n)?Lh(e,t,n,r):null}const Uh=new Map;function Hh(e){const t=Uh.get(e);return t&&Uh.delete(e),t}function zh(e){return e?Bh(e)?qh(e):e:(ms&&D.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function qh(e){let t;Nh(e)&&(t=1e3*se());const n=function(){const e=ls.Profiler;if("function"!==typeof e)return void(ms&&D.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."));const t=Math.floor(3e3);try{return new e({sampleInterval:10,maxBufferSize:t})}catch(n){ms&&(D.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),D.log("[Profiling] Disabling profiling for current user session.")),Fh=!0}}();if(!n)return e;ms&&D.log(`[Profiling] started profiling transaction: ${Ae(e).description}`);const r=K();async function s(){return e&&n?n.stop().then(t=>(o&&(ls.clearTimeout(o),o=void 0),ms&&D.log(`[Profiling] stopped profiling of transaction: ${Ae(e).description}`),t?(function(e,t){if(Uh.set(e,t),Uh.size>30){const e=Uh.keys().next().value;Uh.delete(e)}}(r,t),null):(ms&&D.log(`[Profiling] profiler returned null profile for: ${Ae(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(e=>(ms&&D.log("[Profiling] error while stopping profiler:",e),null)):null}let o=ls.setTimeout(()=>{ms&&D.log("[Profiling] max profile duration elapsed, stopping profiling for:",Ae(e).description),s()},3e4);const i=e.end.bind(e);return e.end=function(){return e?(s().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),i()},()=>{i()}),e):i()},e}const Wh="BrowserProfiling",Gh=()=>({name:Wh,setupOnce(){},setup(e){const t=Dt().getTransaction();t&&Nh(t)&&Bh(t)&&qh(t),"function"===typeof e.on?(e.on("startTransaction",e=>{Bh(e)&&qh(e)}),e.on("beforeEnvelope",e=>{if(!Uh.size)return;const t=function(e){const t=[];return _n(e,(e,n)=>{if("transaction"===n)for(let r=1;r<e.length;r++){const n=e[r];n&&n.contexts&&n.contexts.profile&&n.contexts.profile.profile_id&&t.push(e[r])}}),t}(e);if(!t.length)return;const n=[];for(const r of t){const e=r&&r.contexts,t=e&&e.profile&&e.profile.profile_id,s=e&&e.profile&&e.profile.start_timestamp;if("string"!==typeof t){ms&&D.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!t){ms&&D.log("[Profiling] cannot find profile for a transaction without a profile context");continue}e&&e.profile&&delete e.profile;const o=Hh(t);if(!o){ms&&D.log(`[Profiling] Could not retrieve profile for transaction: ${t}`);continue}const i=jh(t,s,o,r);i&&n.push(i)}!function(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n])}(e,n)})):D.warn("[Profiling] Client does not support hooks, profiling will be disabled")}}),Yh=zt(Wh,Gh);let Vh={};ls.Sentry&&ls.Sentry.Integrations&&(Vh=ls.Sentry.Integrations);const Jh={...Vh,...ln,...s}},38341(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function s(){return"npm"}n.d(t,{Z:()=>r,e:()=>s})},36284(e,t,n){"use strict";n.d(t,{wD:()=>o});var r=n(38341);e=n.hmd(e);var s=n(65606);function o(){return!(0,r.Z)()&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof s?s:0)}},65606(e){var t,n,r=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:s}
vendor: 1,312 bytes, lines 1-2
1catch(e){t=s}try{n="function"===typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var a,c=[],u=!1,l=-1;function d(){u&&a&&(u=!1,a.length?c=a.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=i(d);u=!0;for(var t=c.length;t;){for(a=c,c=[];++l<t;)a&&a[l].run();l=-1,t=c.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||u||i(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}}]); 2//# sourceMappingURL=sentry-a5dd88fa6fcfe6410ff2.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.