/*! For license information please see LICENSES */ (window.webpackJsonp=window.webpackJsonp||[]).push([[374],{293:function(t,e,n){"use strict";n.r(e),n.d(e,"FunctionToString",(function(){return c.a})),n.d(e,"Hub",(function(){return l.a})),n.d(e,"InboundFilters",(function(){return d.a})),n.d(e,"ModuleMetadata",(function(){return h.a})),n.d(e,"SDK_VERSION",(function(){return m.a})),n.d(e,"Scope",(function(){return f.a})),n.d(e,"addBreadcrumb",(function(){return _.a})),n.d(e,"addGlobalEventProcessor",(function(){return y.a})),n.d(e,"addTracingExtensions",(function(){return w.a})),n.d(e,"captureEvent",(function(){return _.c})),n.d(e,"captureException",(function(){return _.d})),n.d(e,"captureMessage",(function(){return _.e})),n.d(e,"close",(function(){return _.f})),n.d(e,"configureScope",(function(){return _.g})),n.d(e,"createTransport",(function(){return base.a})),n.d(e,"extractTraceparentData",(function(){return k.a})),n.d(e,"flush",(function(){return _.h})),n.d(e,"getActiveSpan",(function(){return S.a})),n.d(e,"getActiveTransaction",(function(){return v.a})),n.d(e,"getCurrentHub",(function(){return l.c})),n.d(e,"getHubFromCarrier",(function(){return l.d})),n.d(e,"lastEventId",(function(){return _.i})),n.d(e,"makeMain",(function(){return l.f})),n.d(e,"makeMultiplexedTransport",(function(){return I.a})),n.d(e,"setContext",(function(){return _.j})),n.d(e,"setExtra",(function(){return _.k})),n.d(e,"setExtras",(function(){return _.l})),n.d(e,"setMeasurement",(function(){return C.a})),n.d(e,"setTag",(function(){return _.m})),n.d(e,"setTags",(function(){return _.n})),n.d(e,"setUser",(function(){return _.o})),n.d(e,"spanStatusfromHttpCode",(function(){return E.c})),n.d(e,"startInactiveSpan",(function(){return S.c})),n.d(e,"startSpan",(function(){return S.d})),n.d(e,"startSpanManual",(function(){return S.e})),n.d(e,"startTransaction",(function(){return _.p})),n.d(e,"trace",(function(){return S.f})),n.d(e,"withScope",(function(){return _.q})),n.d(e,"WINDOW",(function(){return T.a})),n.d(e,"BrowserClient",(function(){return A.a})),n.d(e,"makeFetchTransport",(function(){return x.a})),n.d(e,"makeXHRTransport",(function(){return R.a})),n.d(e,"chromeStackLineParser",(function(){return D.a})),n.d(e,"defaultStackLineParsers",(function(){return D.b})),n.d(e,"defaultStackParser",(function(){return D.c})),n.d(e,"geckoStackLineParser",(function(){return D.d})),n.d(e,"opera10StackLineParser",(function(){return D.e})),n.d(e,"opera11StackLineParser",(function(){return D.f})),n.d(e,"winjsStackLineParser",(function(){return D.g})),n.d(e,"eventFromException",(function(){return N.a})),n.d(e,"eventFromMessage",(function(){return N.b})),n.d(e,"exceptionFromError",(function(){return N.d})),n.d(e,"createUserFeedbackEnvelope",(function(){return M.a})),n.d(e,"captureUserFeedback",(function(){return O.captureUserFeedback})),n.d(e,"defaultIntegrations",(function(){return O.defaultIntegrations})),n.d(e,"forceLoad",(function(){return O.forceLoad})),n.d(e,"init",(function(){return O.init})),n.d(e,"onLoad",(function(){return O.onLoad})),n.d(e,"showReportDialog",(function(){return O.showReportDialog})),n.d(e,"wrap",(function(){return O.wrap})),n.d(e,"Replay",(function(){return Z.a})),n.d(e,"BrowserTracing",(function(){return Rt})),n.d(e,"defaultRequestInstrumentationOptions",(function(){return It})),n.d(e,"instrumentOutgoingRequests",(function(){return Ct})),n.d(e,"makeBrowserOfflineTransport",(function(){return Lt})),n.d(e,"onProfilingStartRouteTransaction",(function(){return re})),n.d(e,"BrowserProfilingIntegration",(function(){return se})),n.d(e,"GlobalHandlers",(function(){return B.a})),n.d(e,"TryCatch",(function(){return U.a})),n.d(e,"Breadcrumbs",(function(){return L.a})),n.d(e,"LinkedErrors",(function(){return F.a})),n.d(e,"HttpContext",(function(){return z.a})),n.d(e,"Dedupe",(function(){return G.a})),n.d(e,"Integrations",(function(){return oe}));var r={};n.r(r),n.d(r,"GlobalHandlers",(function(){return B.a})),n.d(r,"TryCatch",(function(){return U.a})),n.d(r,"Breadcrumbs",(function(){return L.a})),n.d(r,"LinkedErrors",(function(){return F.a})),n.d(r,"HttpContext",(function(){return z.a})),n.d(r,"Dedupe",(function(){return G.a}));var o=n(87),c=n(258),l=n(24),d=n(259),h=n(480),m=n(473),f=n(138),_=n(64),y=n(110),w=n(219),base=n(353),k=n(351),S=n(155),v=n(181),I=n(477),C=n(475),E=n(134),T=n(34),A=n(399),x=n(398),R=n(396),D=n(381),N=n(130),M=n(397),O=n(380),B=n(387),U=n(386),L=n(390),F=n(391),z=n(389),G=n(388),Z=n(2957),Y=n(218),P=n(22),W=n(362),H=n(44);const j=H.a;var V=n(97);const K=(t,e,n)=>{let r,o;return c=>{e.value>=0&&(c||n)&&(o=e.value-(r||0),(o||void 0===r)&&(r=e.value,e.delta=o,t(e)))}},J=()=>j.__WEB_VITALS_POLYFILL__?j.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=j.performance.timing,e=j.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):j.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Q=()=>{const t=J();return t&&t.activationStart||0},X=(t,e)=>{const n=J();let r="navigate";return n&&(r=j.document.prerendering||Q()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},$=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{e(t.getEntries())}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},tt=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==j.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let et=-1;const nt=()=>(et<0&&(et="hidden"!==j.document.visibilityState||j.document.prerendering?1/0:0,tt((({timeStamp:t})=>{et=t}),!0)),{get firstHiddenTime(){return et}}),at={};function st(t){return"number"==typeof t&&isFinite(t)}function it(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function ot(time){return time/1e3}function ct(){return j&&j.addEventListener&&j.performance}let lt,ut,ht=0,pt={};function mt(){const t=ct();if(t&&V.a){t.mark&&j.performance.mark("sentry-tracing-init"),(t=>{const e=nt(),n=X("FID");let r;const o=t=>{t.startTime{t.forEach(o)},l=$("first-input",c);r=K(t,n),l&&tt((()=>{c(l.takeRecords()),l.disconnect()}),!0)})((t=>{const e=t.entries.pop();if(!e)return;const n=ot(V.a),r=ot(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Measurements] Adding FID"),pt.fid={value:t.value,unit:"millisecond"},pt["mark.fid"]={value:n+r,unit:"second"}}));const e=(t=>{const e=X("CLS",0);let n,r=0,o=[];const c=t=>{t.forEach((t=>{if(!t.hadRecentInput){const c=o[0],l=o[o.length-1];r&&0!==o.length&&t.startTime-l.startTime<1e3&&t.startTime-c.startTime<5e3?(r+=t.value,o.push(t)):(r=t.value,o=[t]),r>e.value&&(e.value=r,e.entries=o,n&&n())}}))},l=$("layout-shift",c);if(l){n=K(t,e);const r=()=>{c(l.takeRecords()),n(!0)};return tt(r),r}})((t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Measurements] Adding CLS"),pt.cls={value:t.value,unit:""},ut=e)})),n=(t=>{const e=nt(),n=X("LCP");let r;const o=t=>{const o=t[t.length-1];if(o){const t=Math.max(o.startTime-Q(),0);t{at[n.id]||(o(c.takeRecords()),c.disconnect(),at[n.id]=!0,r(!0))};return["keydown","click"].forEach((t=>{addEventListener(t,e,{once:!0,capture:!0})})),tt(e,!0),e}})((t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Measurements] Adding LCP"),pt.lcp={value:t.value,unit:"millisecond"},lt=e)}));return()=>{e&&e(),n&&n()}}return()=>{}}function ft(t){const e=ct();if(!e||!j.performance.getEntries||!V.a)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Tracing] Adding & adjusting spans using Performance API");const n=ot(V.a),r=e.getEntries();let o,c;if(r.slice(ht).forEach((e=>{const r=ot(e.startTime),l=ot(e.duration);if(!("navigation"===t.op&&n+r{gt(t,e,r,n)})),gt(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),gt(t,e,"fetch",n,"cache","domainLookupStart"),gt(t,e,"domainLookup",n,"DNS"),function(t,e,n){it(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+ot(e.requestStart),endTimestamp:n+ot(e.responseEnd)}),it(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+ot(e.responseStart),endTimestamp:n+ot(e.responseEnd)})}(t,e,n)}(t,e,n),o=n+ot(e.responseStart),c=n+ot(e.requestStart);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,o){const c=o+n,l=c+r;it(t,{description:e.name,endTimestamp:l,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:c})}(t,e,r,l,n);const o=nt(),c=e.startTime{if(!pt[e]||n>=t.startTimestamp)return;const r=pt[e].value,o=n+ot(r),c=Math.abs(1e3*(o-t.startTimestamp)),l=c-r;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log(`[Measurements] Normalized ${e} from ${r} to ${c} (${l})`),pt[e].value=c}));const e=pt["mark.fid"];e&&pt.fid&&(it(t,{description:"first input delay",endTimestamp:e.value+ot(pt.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:e.value}),delete pt["mark.fid"]),"fcp"in pt||delete pt.cls,Object.keys(pt).forEach((e=>{t.setMeasurement(e,pt[e].value,pt[e].unit)})),function(t){lt&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Measurements] Adding LCP Data"),lt.element&&t.setTag("lcp.element",Object(W.c)(lt.element)),lt.id&&t.setTag("lcp.id",lt.id),lt.url&&t.setTag("lcp.url",lt.url.trim().slice(0,200)),t.setTag("lcp.size",lt.size));ut&&ut.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Measurements] Adding CLS Data"),ut.sources.forEach(((source,e)=>t.setTag(`cls.source.${e+1}`,Object(W.c)(source.node)))))}(t)}lt=void 0,ut=void 0,pt={}}function gt(t,e,n,r,o,c){const l=c?e[c]:e[`${n}End`],d=e[`${n}Start`];d&&l&&it(t,{op:"browser",origin:"auto.browser.browser.metrics",description:o||n,startTimestamp:r+ot(d),endTimestamp:r+ot(l)})}var _t=n(160),yt=n(135),bt=n(365),wt=n(79),kt=n(497),St=n(28);const vt=["localhost",/^\/(?!\/)/],It={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:vt,tracePropagationTargets:vt};function Ct(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:o,shouldCreateSpanForRequest:c,enableHTTPTimings:d}={traceFetch:It.traceFetch,traceXHR:It.traceXHR,...t},h="function"==typeof c?c:t=>!0,m=t=>function(t,e){return Object(wt.c)(t,e||vt)}(t,r||o),f={};e&&Object(bt.b)("fetch",(t=>{const e=function(t,e,n,r){if(!Object(_t.a)()||!t.fetchData)return;const o=e(t.fetchData.url);if(t.endTimestamp&&o){const e=t.fetchData.__span;if(!e)return;const span=r[e];if(span){if(t.response){span.setHttpStatus(t.response.status);const e=t.response&&t.response.headers&&t.response.headers.get("content-length"),n=parseInt(e);n>0&&span.setData("http.response_content_length",n)}else t.error&&span.setStatus("internal_error");span.finish(),delete r[e]}return}const c=Object(l.c)(),d=c.getScope(),h=c.getClient(),m=d.getSpan(),{method:f,url:_}=t.fetchData,span=o&&m?m.startChild({data:{url:_,type:"fetch","http.method":f},description:`${f} ${_}`,op:"http.client",origin:"auto.http.browser"}):void 0;span&&(t.fetchData.__span=span.spanId,r[span.spanId]=span);if(n(t.fetchData.url)&&h){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=function(t,e,n,r,o){const span=o||n.getSpan(),c=span&&span.transaction,{traceId:l,sampled:d,dsc:h}=n.getPropagationContext(),m=span?span.toTraceparent():Object(k.b)(l,void 0,d),f=c?c.getDynamicSamplingContext():h||Object(yt.a)(l,e,n),_=Object(kt.c)(f),y="undefined"!=typeof Request&&Object(St.g)(t,Request)?t.headers:r.headers;if(y){if("undefined"!=typeof Headers&&Object(St.g)(y,Headers)){const t=new Headers(y);return t.append("sentry-trace",m),_&&t.append(kt.a,_),t}if(Array.isArray(y)){const t=[...y,["sentry-trace",m]];return _&&t.push([kt.a,_]),t}{const t="baggage"in y?y.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),_&&e.push(_),{...y,"sentry-trace":m,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":m,baggage:_}}(e,h,d,n,span)}return span}(t,h,m,f);d&&e&&Et(e)})),n&&Object(bt.b)("xhr",(t=>{const e=function(t,e,n,r){const o=t.xhr,c=o&&o[bt.a];if(!Object(_t.a)()||o&&o.__sentry_own_request__||!o||!c)return;const d=e(c.url);if(t.endTimestamp&&d){const t=o.__sentry_xhr_span_id__;if(!t)return;const span=r[t];return void(span&&(span.setHttpStatus(c.status_code),span.finish(),delete r[t]))}const h=Object(l.c)(),m=h.getScope(),f=m.getSpan(),span=d&&f?f.startChild({data:{...c.data,type:"xhr","http.method":c.method,url:c.url},description:`${c.method} ${c.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;span&&(o.__sentry_xhr_span_id__=span.spanId,r[o.__sentry_xhr_span_id__]=span);if(o.setRequestHeader&&n(c.url))if(span){const t=span&&span.transaction,e=t&&t.getDynamicSamplingContext(),n=Object(kt.c)(e);At(o,span.toTraceparent(),n)}else{const t=h.getClient(),{traceId:e,sampled:n,dsc:r}=m.getPropagationContext(),c=Object(k.b)(e,void 0,n),l=r||(t?Object(yt.a)(e,t,m):void 0);At(o,c,Object(kt.c)(l))}return span}(t,h,m,f);d&&e&&Et(e)}))}function Et(span){const t=span.data.url,e=new PerformanceObserver((n=>{n.getEntries().forEach((n=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(n)&&n.name.endsWith(t)){(function(t){const{name:e,version:n}=function(t){let e="unknown",n="unknown",r="";for(const o of t){if("/"===o){[e,n]=t.split("/");break}if(!isNaN(Number(o))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=o}r===t&&(e=r);return{name:e,version:n}}(t.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",e]),!V.a)return r;return[...r,["http.request.redirect_start",Tt(t.redirectStart)],["http.request.fetch_start",Tt(t.fetchStart)],["http.request.domain_lookup_start",Tt(t.domainLookupStart)],["http.request.domain_lookup_end",Tt(t.domainLookupEnd)],["http.request.connect_start",Tt(t.connectStart)],["http.request.secure_connection_start",Tt(t.secureConnectionStart)],["http.request.connection_end",Tt(t.connectEnd)],["http.request.request_start",Tt(t.requestStart)],["http.request.response_start",Tt(t.responseStart)],["http.request.response_end",Tt(t.responseEnd)]]})(n).forEach((data=>span.setData(...data))),e.disconnect()}}))}));e.observe({entryTypes:["resource"]})}function Tt(time=0){return((V.a||performance.timeOrigin)+time)/1e3}function At(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(kt.a,n)}catch(t){}}const xt={...Y.b,markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!j||!j.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn("Could not initialize routing instrumentation due to invalid location"));let r,o=j.location.href;e&&(r=t({name:j.location.pathname,startTimestamp:V.a?V.a/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&Object(bt.b)("history",(({to:e,from:n})=>{void 0===n&&o&&-1!==o.indexOf(e)?o=void 0:n!==e&&(o=void 0,r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log(`[Tracing] Finishing current transaction with op: ${r.op}`),r.finish()),r=t({name:j.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...It};class Rt{constructor(t){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,Object(w.a)(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!(!t||!t.tracePropagationTargets&&!t.tracingOrigins)),this.options={...xt,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=mt(),this.options.enableLongTask&&$("longtask",(t=>{for(const e of t){const t=Object(v.a)();if(!t)return;const n=ot(V.a+e.startTime),r=ot(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})),this.options._experiments.enableInteractions&&$("event",(t=>{for(const e of t){const t=Object(v.a)();if(!t)return;if("click"===e.name){const n=ot(V.a+e.startTime),r=ot(e.duration);t.startChild({description:Object(W.c)(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}}}),{durationThreshold:0})}setupOnce(t,e){this._getCurrentHub=e;const n=e().getClient(),r=n&&n.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:c,startTransactionOnPageLoad:l,markBackgroundTransactions:d,traceFetch:h,traceXHR:m,shouldCreateSpanForRequest:f,enableHTTPTimings:_,_experiments:y}=this.options,w=r&&r.tracePropagationTargets,k=w||this.options.tracePropagationTargets;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&w&&P.c.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),o((t=>{const n=this._createRouteTransaction(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n}),l,c),d&&(j&&j.document?j.document.addEventListener("visibilitychange",(()=>{const t=Object(v.a)();if(j.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn("[Tracing] Could not set up background tab detection due to lack of global document")),y.enableInteractions&&this._registerInteractionListener(),Ct({traceFetch:h,traceXHR:m,tracePropagationTargets:k,shouldCreateSpanForRequest:f,enableHTTPTimings:_})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`));const e=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:o,heartbeatInterval:c}=this.options,l="pageload"===t.op,d=l?Dt("sentry-trace"):"",h=l?Dt("baggage"):"",{traceparentData:m,dynamicSamplingContext:f,propagationContext:_}=Object(k.c)(d,h),y={...t,...m,metadata:{...t.metadata,dynamicSamplingContext:m&&!f?{}:f},trimEnd:!0},S="function"==typeof n?n(y):y,v=void 0===S?{...y,sampled:!1}:S;v.metadata=v.name!==y.name?{...v.metadata,source:"custom"}:v.metadata,this._latestRouteName=v.name,this._latestRouteSource=v.metadata&&v.metadata.source,!1===v.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log(`[Tracing] Will not send ${v.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log(`[Tracing] Starting ${v.op} transaction on scope`);const{location:I}=j,C=Object(w.b)(e,v,r,o,!0,{location:I},c),E=e.getScope();return l&&m?E.setPropagationContext(_):E.setPropagationContext({traceId:C.traceId,spanId:C.spanId,parentSpanId:C.parentSpanId,sampled:C.sampled}),C.registerBeforeFinishCallback((t=>{this._collectWebVitals(),ft(t)})),C}_registerInteractionListener(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:r}=this.options,o="ui.action.click",c=Object(v.a)();if(c&&c.op&&["navigation","pageload"].includes(c.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`));if(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`));const l=this._getCurrentHub(),{location:d}=j,h={name:this._latestRouteName,op:o,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};t=Object(w.b)(l,h,e,n,!0,{location:d},r)};["click"].forEach((t=>{addEventListener(t,e,{once:!1,capture:!0})}))}}function Dt(t){const e=Object(W.a)(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}var Nt=n(476),Mt=n(225);function Ot(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function Bt(t){return Ot(t.getAllKeys())}function Ut(t){let e;function n(){return null==e&&(e=function(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const r=Ot(n);return t=>r.then((n=>t(n.transaction(e,"readwrite").objectStore(e))))}(t.dbName||"sentry-offline",t.storeName||"queue")),e}return{insert:async e=>{try{const r=await Object(Mt.j)(e,t.textEncoder);await function(t,e,n){return t((t=>Bt(t).then((r=>{if(!(r.length>=n))return t.put(e,Math.max(...r,0)+1),Ot(t.transaction)}))))}(n(),r,t.maxQueueSize||30)}catch(t){}},pop:async()=>{try{const e=await function(t){return t((t=>Bt(t).then((e=>{if(0!==e.length)return Ot(t.get(e[0])).then((n=>(t.delete(e[0]),Ot(t.transaction).then((()=>n)))))}))))}(n());if(e)return Object(Mt.i)(e,t.textEncoder||new TextEncoder,t.textDecoder||new TextDecoder)}catch(t){}}}}function Lt(t){return function(t){return e=>t({...e,createStore:Ut})}(Object(Nt.a)(t))}var Ft=n(40),zt=n(133);const Gt=1e6,Zt=String(0),Yt="main";let Pt="",Wt="",Ht="",jt=T.a.navigator&&T.a.navigator.userAgent||"",Vt="";const Kt=T.a.navigator&&T.a.navigator.language||T.a.navigator&&T.a.navigator.languages&&T.a.navigator.languages[0]||"";const qt=T.a.navigator&&T.a.navigator.userAgentData;var data;function Jt(t){return function(t){return!("thread_metadata"in t)}(t)?function(input){let t,e=0;const n={samples:[],stacks:[],frames:[],thread_metadata:{[Zt]:{name:Yt}}};if(!input.samples.length)return n;const r=input.samples[0].timestamp,o="number"==typeof performance.timeOrigin?performance.timeOrigin:V.a||0,c=o-(V.a||o);for(let i=0;i{if(Pt=t.platform||"",Ht=t.architecture||"",Vt=t.model||"",Wt=t.platformVersion||"",t.fullVersionList&&t.fullVersionList.length>0){const e=t.fullVersionList[t.fullVersionList.length-1];jt=`${e.brand} ${e.version}`}})).catch((t=>{}));const Xt=new WeakMap;function $t(t){const e=H.a._sentryDebugIds;if(!e)return[];const n=Object(l.c)();if(!n)return[];const r=n.getClient();if(!r)return[];const o=r.getOptions();if(!o)return[];const c=o.stackParser;if(!c)return[];let d;const h=Xt.get(c);h?d=h:(d=new Map,Xt.set(c,d));const m=Object.keys(e).reduce(((t,n)=>{let r;const o=d.get(n);o?r=o:(r=c(n),d.set(n,r));for(let i=r.length-1;i>=0;i--){const o=r[i],c=o&&o.filename;if(o&&c){t[c]=e[n];break}}return t}),{}),f=[];for(const path of t)path&&m[path]&&f.push({type:"sourcemap",code_file:path,debug_id:m[path]});return f}function te(t,e,n){return function(t){return t.samples.length<2?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):!!t.frames.length||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] Discarding profile because it contains no frames"),!1)}(e)?Qt(n,e,t):null}const ee=new Map;let ne=!1;function re(t){return t?ae(t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] Transaction is undefined, skipping profiling"),t)}function ae(t){const e=T.a.Profiler;if("function"!=typeof e)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."),t;if(ne)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] Profiling has been disabled for the duration of the current user session."),t;const n=Object(l.c)().getClient(),r=n&&n.getOptions();if(!r)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] Profiling disabled, no options found."),t;const o=r.profilesSampleRate;if(!("number"!=typeof(c=o)&&"boolean"!=typeof c||"number"==typeof c&&isNaN(c)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(c)} of type ${JSON.stringify(typeof c)}.`),0):!0===c||!1===c||!(c<0||c>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${c}.`),0)))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.warn("[Profiling] Discarding profile because of invalid sample rate."),t;var c;if(!o)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),t;if(!(!0===o||Math.random()(e.finish(),_&&(T.a.clearTimeout(_),_=void 0),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log(`[Profiling] stopped profiling of transaction: ${t.name||t.description}`),p?(function(t,e){if(ee.set(t,e),ee.size>30){const t=ee.keys().next().value;ee.delete(t)}}(m,p),null):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log(`[Profiling] profiler returned null profile for: ${t.name||t.description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null)))).catch((t=>(e.finish(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] error while stopping profiler:",t),null)))}let _=T.a.setTimeout((()=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&P.c.log("[Profiling] max profile duration elapsed, stopping profiling for:",t.name||t.description),f()}),3e4);const y=t.finish.bind(t);return t.finish=function(){return t?(f().then((()=>{t.setContext("profile",{profile_id:m}),y()}),(()=>{y()})),t):y()},t}class se{static __initStatic(){this.id="BrowserProfilingIntegration"}constructor(){this.name=se.id}setupOnce(t,e){this.getCurrentHub=e;const n=this.getCurrentHub().getClient();n&&"function"==typeof n.on?(n.on("startTransaction",(t=>{ae(t)})),n.on("beforeEnvelope",(t=>{if(!ee.size)return;const e=function(t){const e=[];return Object(Mt.g)(t,((t,n)=>{if("transaction"===n)for(let n=1;nthis.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,meta){const e=meta.id;this.idNodeMap.set(e,t),this.nodeMetaMap.set(t,meta)}replace(t,e){const n=this.getNode(t);if(n){const meta=this.nodeMetaMap.get(n);meta&&this.nodeMetaMap.set(e,meta)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function z({maskInputOptions:t,tagName:e,type:n}){return"OPTION"===e&&(e="SELECT"),Boolean(t[e.toLowerCase()]||n&&t[n]||"password"===n||"INPUT"===e&&!n&&t.text)}function G({isMasked:t,element:element,value:e,maskInputFn:n}){let text=e||"";return t?(n&&(text=n(text,element)),"*".repeat(text.length)):text}function Z(t){return t.toLowerCase()}function Y(t){return t.toUpperCase()}const P="__rrweb_original__";function W(element){const t=element.type;return element.hasAttribute("data-rr-is-password")?"password":t?Z(t):null}function H(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let j=1;const V=new RegExp("[^a-z0-9-_:]");function K(){return j++}let J,Q;const X=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,$=/^(?:[a-z+]+:)?\/\//i,tt=/^www\..*/i,et=/^(data:)([^,]*),(.*)/i;function nt(t,e){return(t||"").replace(X,((t,n,r,o,c,l)=>{const d=r||c||l,h=n||o||"";if(!d)return t;if($.test(d)||tt.test(d))return`url(${h}${d}${h})`;if(et.test(d))return`url(${h}${d}${h})`;if("/"===d[0])return`url(${h}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+d}${h})`;const m=e.split("/"),f=d.split("/");m.pop();for(const t of f)"."!==t&&(".."===t?m.pop():m.push(t));return`url(${h}${m.join("/")}${h})`}))}const at=/^[^ \t\n\r\u000c]+/,st=/^[, \t\n\r\u000c]+/;function it(t,e){if(!e||""===e.trim())return e;const a=t.createElement("a");return a.href=e,a.href}function ot(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function ct(){const a=document.createElement("a");return a.href="",a.href}function lt(t,e,n,r,element,o){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?it(t,r):"background"!==n||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const o=t.exec(e.substring(n));return o?(r=o[0],n+=r.length,r):""}const output=[];for(;r(st),!(n>=e.length);){let o=r(at);if(","===o.slice(-1))o=it(t,o.substring(0,o.length-1)),output.push(o);else{let r="";o=it(t,o);let c=!1;for(;;){const t=e.charAt(n);if(""===t){output.push((o+r).trim());break}if(c)")"===t&&(c=!1);else{if(","===t){n+=1,output.push((o+r).trim());break}"("===t&&(c=!0)}r+=t,n+=1}}}return output.join(", ")}(t,r):"style"===n?nt(r,ct()):"object"===e&&"data"===n?it(t,r):"function"==typeof o?o(n,r,element):r:it(t,r):r}function ut(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function ht(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:ht(t.parentNode,e,n,r+1):-1}function pt(t,e){return n=>{const r=n;if(null===r)return!1;if(t)if("string"==typeof t){if(r.matches(`.${t}`))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}}function mt(t,e,n,r,o,c){try{const l=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===l)return!1;let d=-1,h=-1;if(c){if(h=ht(l,pt(r,o)),h<0)return!0;d=ht(l,pt(e,n),h>=0?h:1/0)}else{if(d=ht(l,pt(e,n)),d<0)return!1;h=ht(l,pt(r,o),d>=0?d:1/0)}return d>=0?!(h>=0)||d<=h:!(h>=0)&&!!c}catch(t){}return!!c}function ft(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:c,unblockSelector:l,maskAllText:d,maskAttributeFn:h,maskTextClass:m,unmaskTextClass:f,maskTextSelector:_,unmaskTextSelector:y,inlineStylesheet:w,maskInputOptions:k={},maskTextFn:S,maskInputFn:v,dataURLOptions:I={},inlineImages:C,recordCanvas:E,keepIframeSrcFn:T,newlyAddedElement:A=!1}=e,x=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:M.Document,childNodes:[],compatMode:t.compatMode}:{type:M.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:M.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:x};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:c,inlineStylesheet:l,maskInputOptions:d={},maskAttributeFn:h,maskInputFn:m,dataURLOptions:f={},inlineImages:_,recordCanvas:y,keepIframeSrcFn:w,newlyAddedElement:k=!1,rootId:S,maskAllText:v,maskTextClass:I,unmaskTextClass:C,maskTextSelector:E,unmaskTextSelector:T}=e,A=function(element,t,e,n){try{if(n&&element.matches(n))return!1;if("string"==typeof t){if(element.classList.contains(t))return!0}else for(let e=element.classList.length;e--;){const n=element.classList[e];if(t.test(n))return!0}if(e)return element.matches(e)}catch(t){}return!1}(t,r,o,c),x=function(element){if(element instanceof HTMLFormElement)return"form";const t=Z(element.tagName);return V.test(t)?"div":t}(t);let R={};const D=t.attributes.length;for(let i=0;is.href===t.href));let r=null;e&&(r=U(e)),r&&(delete R.rel,delete R.href,R._cssText=nt(r,e.href))}if("style"===x&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=U(t.sheet);e&&(R._cssText=nt(e,ct()))}if("input"===x||"textarea"===x||"select"===x||"option"===x){const e=t,n=W(e),r=H(e,Y(x),n),o=e.checked;if("submit"!==n&&"button"!==n&&r){const t=mt(e,I,E,C,T,z({type:n,tagName:Y(x),maskInputOptions:d}));R.value=G({isMasked:t,element:e,value:r,maskInputFn:m})}o&&(R.checked=o)}"option"===x&&(t.selected&&!d.select?R.selected=!0:delete R.selected);if("canvas"===x&&y)if("2d"===t.__context)(function(canvas){const t=canvas.getContext("2d");if(!t)return!0;for(let e=0;e0!==t)))return!1}return!0})(t)||(R.rr_dataURL=t.toDataURL(f.type,f.quality));else if(!("__context"in t)){const e=t.toDataURL(f.type,f.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height;e!==n.toDataURL(f.type,f.quality)&&(R.rr_dataURL=e)}if("img"===x&&_){J||(J=n.createElement("canvas"),Q=J.getContext("2d"));const image=t,e=image.crossOrigin;image.crossOrigin="anonymous";const r=()=>{image.removeEventListener("load",r);try{J.width=image.naturalWidth,J.height=image.naturalHeight,Q.drawImage(image,0,0),R.rr_dataURL=J.toDataURL(f.type,f.quality)}catch(t){console.warn(`Cannot inline img src=${image.currentSrc}! Error: ${t}`)}e?R.crossOrigin=e:image.removeAttribute("crossorigin")};image.complete&&0!==image.naturalWidth?r():image.addEventListener("load",r)}"audio"!==x&&"video"!==x||(R.rr_mediaState=t.paused?"paused":"played",R.rr_mediaCurrentTime=t.currentTime);k||(t.scrollLeft&&(R.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(R.rr_scrollTop=t.scrollTop));if(A){const{width:e,height:n}=t.getBoundingClientRect();R={class:R.class,rr_width:`${e}px`,rr_height:`${n}px`}}"iframe"!==x||w(R.src)||(t.contentDocument||(R.rr_src=R.src),delete R.src);let N;try{customElements.get(x)&&(N=!0)}catch(t){}return{type:M.Element,tagName:x,attributes:R,childNodes:[],isSVG:ot(t)||void 0,needBlock:A,rootId:S,isCustom:N}}(t,{doc:n,blockClass:o,blockSelector:c,unblockSelector:l,inlineStylesheet:w,maskAttributeFn:h,maskInputOptions:k,maskInputFn:v,dataURLOptions:I,inlineImages:C,recordCanvas:E,keepIframeSrcFn:T,newlyAddedElement:A,rootId:x,maskAllText:d,maskTextClass:m,unmaskTextClass:f,maskTextSelector:_,unmaskTextSelector:y});case t.TEXT_NODE:return function(t,e){var n;const{maskAllText:r,maskTextClass:o,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,maskTextFn:h,maskInputOptions:m,maskInputFn:f,rootId:_}=e,y=t.parentNode&&t.parentNode.tagName;let w=t.textContent;const k="STYLE"===y||void 0,S="SCRIPT"===y||void 0,v="TEXTAREA"===y||void 0;if(k&&w){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(w=U(t.parentNode.sheet))}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}w=nt(w,ct())}S&&(w="SCRIPT_PLACEHOLDER");const I=mt(t,o,l,c,d,r);k||S||v||!w||!I||(w=h?h(w):w.replace(/[\S]/g,"*"));v&&w&&(m.textarea||I)&&(w=f?f(w,t.parentNode):w.replace(/[\S]/g,"*"));if("OPTION"===y&&w){w=G({isMasked:mt(t,o,l,c,d,z({type:null,tagName:y,maskInputOptions:m})),element:t,value:w,maskInputFn:f})}return{type:M.Text,textContent:w||"",isStyle:k,rootId:_}}(t,{maskAllText:d,maskTextClass:m,unmaskTextClass:f,maskTextSelector:_,unmaskTextSelector:y,maskTextFn:S,maskInputOptions:k,maskInputFn:v,rootId:x});case t.CDATA_SECTION_NODE:return{type:M.CDATA,textContent:"",rootId:x};case t.COMMENT_NODE:return{type:M.Comment,textContent:t.textContent||"",rootId:x};default:return!1}}function gt(t){return null==t?"":t.toLowerCase()}function _t(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:c,unblockSelector:l,maskAllText:d,maskTextClass:h,unmaskTextClass:m,maskTextSelector:f,unmaskTextSelector:_,skipChild:y=!1,inlineStylesheet:w=!0,maskInputOptions:k={},maskAttributeFn:S,maskTextFn:v,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E={},inlineImages:T=!1,recordCanvas:A=!1,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:D=5e3,onStylesheetLoad:N,stylesheetLoadTimeout:U=5e3,keepIframeSrcFn:L=(()=>!1),newlyAddedElement:F=!1}=e;let{preserveWhiteSpace:z=!0}=e;const G=ft(t,{doc:n,mirror:r,blockClass:o,blockSelector:c,maskAllText:d,unblockSelector:l,maskTextClass:h,unmaskTextClass:m,maskTextSelector:f,unmaskTextSelector:_,inlineStylesheet:w,maskInputOptions:k,maskAttributeFn:S,maskTextFn:v,maskInputFn:I,dataURLOptions:E,inlineImages:T,recordCanvas:A,keepIframeSrcFn:L,newlyAddedElement:F});if(!G)return console.warn(t,"not serialized"),null;let Z;Z=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===M.Comment)return!0;if(t.type===M.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(gt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===gt(t.attributes.name)||"icon"===gt(t.attributes.rel)||"apple-touch-icon"===gt(t.attributes.rel)||"shortcut icon"===gt(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&>(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(gt(t.attributes.property).match(/^(og|twitter|fb):/)||gt(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===gt(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===gt(t.attributes.name)||"googlebot"===gt(t.attributes.name)||"bingbot"===gt(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===gt(t.attributes.name)||"generator"===gt(t.attributes.name)||"framework"===gt(t.attributes.name)||"publisher"===gt(t.attributes.name)||"progid"===gt(t.attributes.name)||gt(t.attributes.property).match(/^article:/)||gt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===gt(t.attributes.name)||"yandex-verification"===gt(t.attributes.name)||"csrf-token"===gt(t.attributes.name)||"p:domain_verify"===gt(t.attributes.name)||"verify-v1"===gt(t.attributes.name)||"verification"===gt(t.attributes.name)||"shopify-checkout-api-token"===gt(t.attributes.name)))return!0}}return!1}(G,C)&&(z||G.type!==M.Text||G.isStyle||G.textContent.replace(/^\s+|\s+$/gm,"").length)?K():-2;const Y=Object.assign(G,{id:Z});if(r.add(t,Y),-2===Z)return null;x&&x(t);let P=!y;if(Y.type===M.Element){P=P&&!Y.needBlock,delete Y.needBlock;const e=t.shadowRoot;e&&B(e)&&(Y.isShadowHost=!0)}if((Y.type===M.Document||Y.type===M.Element)&&P){C.headWhitespace&&Y.type===M.Element&&"head"===Y.tagName&&(z=!1);const e={doc:n,mirror:r,blockClass:o,blockSelector:c,maskAllText:d,unblockSelector:l,maskTextClass:h,unmaskTextClass:m,maskTextSelector:f,unmaskTextSelector:_,skipChild:y,inlineStylesheet:w,maskInputOptions:k,maskAttributeFn:S,maskTextFn:v,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:A,preserveWhiteSpace:z,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:N,stylesheetLoadTimeout:U,keepIframeSrcFn:L};for(const n of Array.from(t.childNodes)){const t=_t(n,e);t&&Y.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const r=_t(n,e);r&&(B(t.shadowRoot)&&(r.isShadow=!0),Y.childNodes.push(r))}}return t.parentNode&&O(t.parentNode)&&B(t.parentNode)&&(Y.isShadow=!0),Y.type===M.Element&&"iframe"===Y.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let o,c=!1;try{o=r.document.readyState}catch(t){return}if("complete"!==o){const r=setTimeout((()=>{c||(e(),c=!0)}),n);return void t.addEventListener("load",(()=>{clearTimeout(r),c=!0,e()}))}const l="about:blank";if(r.location.href!==l||t.src===l||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,(()=>{const e=t.contentDocument;if(e&&R){const n=_t(e,{doc:e,mirror:r,blockClass:o,blockSelector:c,unblockSelector:l,maskAllText:d,maskTextClass:h,unmaskTextClass:m,maskTextSelector:f,unmaskTextSelector:_,skipChild:!1,inlineStylesheet:w,maskInputOptions:k,maskAttributeFn:S,maskTextFn:v,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:A,preserveWhiteSpace:z,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:N,stylesheetLoadTimeout:U,keepIframeSrcFn:L});n&&R(t,n)}}),D),Y.type===M.Element&&"link"===Y.tagName&&"stylesheet"===Y.attributes.rel&&function(link,t,e){let n,r=!1;try{n=link.sheet}catch(t){return}if(n)return;const o=setTimeout((()=>{r||(t(),r=!0)}),e);link.addEventListener("load",(()=>{clearTimeout(o),r=!0,t()}))}(t,(()=>{if(N){const e=_t(t,{doc:n,mirror:r,blockClass:o,blockSelector:c,unblockSelector:l,maskAllText:d,maskTextClass:h,unmaskTextClass:m,maskTextSelector:f,unmaskTextSelector:_,skipChild:!1,inlineStylesheet:w,maskInputOptions:k,maskAttributeFn:S,maskTextFn:v,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:A,preserveWhiteSpace:z,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:N,stylesheetLoadTimeout:U,keepIframeSrcFn:L});e&&N(t,e)}}),U),Y}function yt(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const bt="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 wt={map:{},getId:()=>(console.error(bt),-1),getNode:()=>(console.error(bt),null),removeNodeFromMap(){console.error(bt)},has:()=>(console.error(bt),!1),reset(){console.error(bt)}};function kt(t,e,n={}){let r=null,o=0;return function(...c){const l=Date.now();o||!1!==n.leading||(o=l);const d=e-(l-o),h=this;d<=0||d>e?(r&&(clearTimeout(r),r=null),o=l,t.apply(h,c)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,t.apply(h,c)}),d))}}function St(t,e,n,r,o=window){const c=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(t){setTimeout((()=>{n.set.call(this,t)}),0),c&&c.set&&c.set.call(this,t)}}),()=>St(t,e,c||{},!0)}function vt(source,t,e){try{if(!(t in source))return()=>{};const n=source[t],r=e(n);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n}})),source[t]=r,()=>{source[t]=n}}catch(t){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(wt=new Proxy(wt,{get:(t,e,n)=>("map"===e&&console.error(bt),Reflect.get(t,e,n))}));let It=Date.now;function Ct(t){var e,n,r,o,c,l;const d=t.document;return{left:d.scrollingElement?d.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:(null==d?void 0:d.documentElement.scrollLeft)||(null===(n=null===(e=null==d?void 0:d.body)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null==d?void 0:d.body)||void 0===r?void 0:r.scrollLeft)||0,top:d.scrollingElement?d.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==d?void 0:d.documentElement.scrollTop)||(null===(c=null===(o=null==d?void 0:d.body)||void 0===o?void 0:o.parentElement)||void 0===c?void 0:c.scrollTop)||(null===(l=null==d?void 0:d.body)||void 0===l?void 0:l.scrollTop)||0}}function Et(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Tt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function At(t,e,n,r,o){if(!t)return!1;const c=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!c)return!1;const l=pt(e,n);if(!o){const t=r&&c.matches(r);return l(c)&&!t}const d=ht(c,l);let h=-1;return!(d<0)&&(r&&(h=ht(c,pt(null,r))),d>-1&&h<0||d(new Date).getTime());class Bt{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ut(t){var e,n;let r=null;return(null===(n=null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(r=t.getRootNode().host),r}function Lt(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=Ut(n);)n=e;return n}(t);return e.contains(n)}function Ft(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||Lt(t))}var zt=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(zt||{}),Gt=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Gt||{}),Zt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Zt||{}),Yt=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Yt||{}),Pt=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Pt||{});function Wt(t){return"__ln"in t}class Ht{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n`${t}@${e}`;class Vt{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new Ht,r=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},o=o=>{if(!o.parentNode||!Ft(o))return;const c=O(o.parentNode)?this.mirror.getId(Ut(o)):this.mirror.getId(o.parentNode),l=r(o);if(-1===c||-1===l)return n.addNode(o);const d=_t(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{Nt(t,this.mirror)&&this.iframeManager.addIframe(t),Mt(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Ot(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(iframe,t)=>{this.iframeManager.attachIframe(iframe,t),this.shadowDomManager.observeAttachShadow(iframe)},onStylesheetLoad:(link,t)=>{this.stylesheetManager.attachLinkElement(link,t)}});d&&(t.push({parentId:c,nextId:l,node:d}),e.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)qt(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||o(t);for(const t of this.addedSet)Qt(this.droppedSet,t)||qt(this.removes,t,this.mirror)?Qt(this.movedSet,t)?o(t):this.droppedSet.add(t):o(t);let c=null;for(;n.length;){let t=null;if(c){const e=this.mirror.getId(c.value.parentNode),n=r(c.value);-1!==e&&-1!==n&&(t=c)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;if(-1!==this.mirror.getId(r)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}c=t.previous,n.removeNode(t.value),o(t.value)}const l={texts:this.texts.map((text=>({id:this.mirror.getId(text.node),value:text.value}))).filter((text=>!e.has(text.id))).filter((text=>this.mirror.has(text.id))),attributes:this.attributes.map((t=>{const{attributes:e}=t;if("string"==typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t._unchangedStyles);n.length!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(l.texts.length||l.attributes.length||l.removes.length||l.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=t=>{if(xt(t.target,this.mirror))return;let e;try{e=document.implementation.createHTMLDocument()}catch(t){e=this.doc}switch(t.type){case"characterData":{const e=t.target.textContent;At(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:mt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if("value"===r){const e=W(n),r=n.tagName;o=H(n,r,e);const c=z({maskInputOptions:this.maskInputOptions,tagName:r,type:e});o=G({isMasked:mt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c),element:n,value:o,maskInputFn:this.maskInputFn})}if(At(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let c=this.attributes.find((a=>a.node===t.target));if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){if(n.contentDocument)return;r="rr_src"}if(c||(c={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(c)),"type"===r&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!ut(n.tagName,r)&&(c.attributes[r]=lt(this.doc,Z(n.tagName),Z(r),o,n,this.maskAttributeFn),"style"===r)){const r=e.createElement("span");t.oldValue&&r.setAttribute("style",t.oldValue);for(const t of Array.from(n.style)){const e=n.style.getPropertyValue(t),o=n.style.getPropertyPriority(t);e!==r.style.getPropertyValue(t)||o!==r.style.getPropertyPriority(t)?c.styleDiff[t]=""===o?e:[e,o]:c._unchangedStyles[t]=[e,o]}for(const t of Array.from(r.style))""===n.style.getPropertyValue(t)&&(c.styleDiff[t]=!1)}break}case"childList":if(At(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{const n=this.mirror.getId(e),r=O(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);At(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||xt(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Kt(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||Rt(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[jt(n,r)]?Kt(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!O(t.target)||!B(t.target))||void 0})),this.mapRemoves.push(e))}))}},this.genAdds=(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(xt(t,this.mirror))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[jt(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);At(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach((t=>this.genAdds(t))),Ot(t)&&t.shadowRoot.childNodes.forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Kt(t,e){t.delete(e),e.childNodes.forEach((e=>Kt(t,e)))}function qt(t,e,n){return 0!==t.length&&Jt(t,e,n)}function Jt(t,e,n){const{parentNode:r}=e;if(!r)return!1;const o=n.getId(r);return!!t.some((t=>t.id===o))||Jt(t,r,n)}function Qt(t,e){return 0!==t.size&&Xt(t,e)}function Xt(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Xt(t,n))}let $t;function te(t){$t=t}function ee(){$t=void 0}const ne=t=>{if(!$t)return t;return(...e)=>{try{return t(...e)}catch(t){if($t&&!0===$t(t))return()=>{};throw t}}},re=[];function ae(t){try{if("composedPath"in t){const path=t.composedPath();if(path.length)return path[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function se(t,e){var n,r;const o=new Vt;re.push(o),o.init(t);let c=window.MutationObserver||window.__rrMutationObserver;const l=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");l&&window[l]&&(c=window[l]);const d=new c(ne((e=>{t.onMutation&&!1===t.onMutation(e)||o.processMutations.bind(o)(e)})));return d.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),d}function ie({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:c,sampling:l}){if(!1===l.mouseInteraction)return()=>{};const d=!0===l.mouseInteraction||void 0===l.mouseInteraction?{}:l.mouseInteraction,h=[];let m=null;return Object.keys(Zt).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==d[t])).forEach((l=>{let d=Z(l);const f=(e=>l=>{const d=ae(l);if(At(d,r,o,c,!0))return;let h=null,f=e;if("pointerType"in l){switch(l.pointerType){case"mouse":h=Yt.Mouse;break;case"touch":h=Yt.Touch;break;case"pen":h=Yt.Pen}h===Yt.Touch?Zt[e]===Zt.MouseDown?f="TouchStart":Zt[e]===Zt.MouseUp&&(f="TouchEnd"):Yt.Pen}else Dt(l)&&(h=Yt.Touch);null!==h?(m=h,(f.startsWith("Touch")&&h===Yt.Touch||f.startsWith("Mouse")&&h===Yt.Mouse)&&(h=null)):Zt[e]===Zt.Click&&(h=m,m=null);const _=Dt(l)?l.changedTouches[0]:l;if(!_)return;const y=n.getId(d),{clientX:w,clientY:k}=_;ne(t)(Object.assign({type:Zt[f],id:y,x:w,y:k},null!==h&&{pointerType:h}))})(l);if(window.PointerEvent)switch(Zt[l]){case Zt.MouseDown:case Zt.MouseUp:d=d.replace("mouse","pointer");break;case Zt.TouchStart:case Zt.TouchEnd:return}h.push(yt(d,f,e))})),ne((()=>{h.forEach((t=>t()))}))}function oe({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:c,sampling:l}){return yt("scroll",ne(kt(ne((l=>{const d=ae(l);if(!d||At(d,r,o,c,!0))return;const h=n.getId(d);if(d===e&&e.defaultView){const n=Ct(e.defaultView);t({id:h,x:n.left,y:n.top})}else t({id:h,x:d.scrollLeft,y:d.scrollTop})})),l.scroll||100)),e)}function ce(t,e){const n=Object.assign({},t);return e||delete n.userTriggered,n}const le=["INPUT","TEXTAREA","SELECT"],de=new WeakMap;function ue(t){return function(t,e){if(fe("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||fe("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||fe("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||fe("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function he(t,e,n){let r,o;return t?(t.ownerNode?r=e.getId(t.ownerNode):o=n.getId(t),{styleId:o,id:r}):{}}function pe({mirror:t,stylesheetManager:e},n){var r,o,c;let l=null;l="#document"===n.nodeName?t.getId(n):t.getId(n.host);const d="#document"===n.nodeName?null===(r=n.defaultView)||void 0===r?void 0:r.Document:null===(c=null===(o=n.ownerDocument)||void 0===o?void 0:o.defaultView)||void 0===c?void 0:c.ShadowRoot,h=Object.getOwnPropertyDescriptor(null==d?void 0:d.prototype,"adoptedStyleSheets");return null!==l&&-1!==l&&d&&h?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get(){var t;return null===(t=h.get)||void 0===t?void 0:t.call(this)},set(t){var n;const r=null===(n=h.set)||void 0===n?void 0:n.call(this,t);if(null!==l&&-1!==l)try{e.adoptStyleSheets(t,l)}catch(t){}return r}}),ne((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))):()=>{}}function me(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:c,viewportResizeCb:l,inputCb:d,mediaInteractionCb:h,styleSheetRuleCb:m,styleDeclarationCb:f,canvasMutationCb:_,fontCb:y,selectionCb:w,customElementCb:k}=t;t.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),n(...p)},t.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},t.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),o(...p)},t.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),c(...p)},t.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),l(...p)},t.inputCb=(...p)=>{e.input&&e.input(...p),d(...p)},t.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),h(...p)},t.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),m(...p)},t.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),f(...p)},t.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),_(...p)},t.fontCb=(...p)=>{e.font&&e.font(...p),y(...p)},t.selectionCb=(...p)=>{e.selection&&e.selection(...p),w(...p)},t.customElementCb=(...t)=>{e.customElement&&e.customElement(...t),k(...t)}}(t,e);const r=se(t,t.doc),o=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const o="number"==typeof e.mousemove?e.mousemove:50,c="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let l,d=[];const h=kt(ne((source=>{const e=Date.now()-l;t(d.map((p=>(p.timeOffset-=e,p))),source),d=[],l=null})),c),m=ne(kt(ne((t=>{const e=ae(t),{clientX:n,clientY:o}=Dt(t)?t.changedTouches[0]:t;l||(l=It()),d.push({x:n,y:o,id:r.getId(e),timeOffset:It()-l}),h("undefined"!=typeof DragEvent&&t instanceof DragEvent?Gt.Drag:t instanceof MouseEvent?Gt.MouseMove:Gt.TouchMove)})),o,{trailing:!1})),f=[yt("mousemove",m,n),yt("touchmove",m,n),yt("drag",m,n)];return ne((()=>{f.forEach((t=>t()))}))}(t),c=ie(t),l=oe(t),d=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return yt("resize",ne(kt(ne((()=>{const e=Et(),o=Tt();n===e&&r===o||(t({width:Number(o),height:Number(e)}),n=e,r=o)})),200)),e)}(t,{win:n}),h=function({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:c,ignoreClass:l,ignoreSelector:d,maskInputOptions:h,maskInputFn:m,sampling:f,userTriggeredOnInput:_,maskTextClass:y,unmaskTextClass:w,maskTextSelector:k,unmaskTextSelector:S}){function v(t){let n=ae(t);const f=t.isTrusted,v=n&&Y(n.tagName);if("OPTION"===v&&(n=n.parentElement),!n||!v||le.indexOf(v)<0||At(n,r,o,c,!0))return;const C=n;if(C.classList.contains(l)||d&&C.matches(d))return;const E=W(n);let text=H(C,v,E),T=!1;const A=z({maskInputOptions:h,tagName:v,type:E}),x=mt(n,y,k,w,S,A);"radio"!==E&&"checkbox"!==E||(T=n.checked),text=G({isMasked:x,element:n,value:text,maskInputFn:m}),I(n,ne(ce)({text:text,isChecked:T,userTriggered:f},_));const R=n.name;"radio"===E&&R&&T&&e.querySelectorAll(`input[type="radio"][name="${R}"]`).forEach((t=>{if(t!==n){const text=G({isMasked:x,element:t,value:H(t,v,E),maskInputFn:m});I(t,ne(ce)({text:text,isChecked:!T,userTriggered:!1},_))}}))}function I(e,r){const o=de.get(e);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){de.set(e,r);const o=n.getId(e);ne(t)(Object.assign(Object.assign({},r),{id:o}))}}const C=("last"===f.input?["change"]:["input","change"]).map((t=>yt(t,ne(v),e))),E=e.defaultView;if(!E)return()=>{C.forEach((t=>t()))};const T=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),A=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return T&&T.set&&C.push(...A.map((p=>St(p[0],p[1],{set(){ne(v)({target:this,isTrusted:!1})}},!1,E)))),ne((()=>{C.forEach((t=>t()))}))}(t),m=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:o,sampling:c,doc:l}){const d=ne((l=>kt(ne((c=>{const d=ae(c);if(!d||At(d,e,n,r,!0))return;const{currentTime:h,volume:m,muted:f,playbackRate:_}=d;t({type:l,id:o.getId(d),currentTime:h,volume:m,muted:f,playbackRate:_})})),c.media||500))),h=[yt("play",d(0),l),yt("pause",d(1),l),yt("seeked",d(2),l),yt("volumechange",d(3),l),yt("ratechange",d(4),l)];return ne((()=>{h.forEach((t=>t()))}))}(t),f=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ne(((r,o,c)=>{const[l,d]=c,{id:h,styleId:m}=he(o,e,n.styleMirror);return(h&&-1!==h||m&&-1!==m)&&t({id:h,styleId:m,adds:[{rule:l,index:d}]}),r.apply(o,c)}))});const c=r.CSSStyleSheet.prototype.deleteRule;let l,d;r.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:ne(((r,o,c)=>{const[l]=c,{id:d,styleId:h}=he(o,e,n.styleMirror);return(d&&-1!==d||h&&-1!==h)&&t({id:d,styleId:h,removes:[{index:l}]}),r.apply(o,c)}))}),r.CSSStyleSheet.prototype.replace&&(l=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:ne(((r,o,c)=>{const[text]=c,{id:l,styleId:d}=he(o,e,n.styleMirror);return(l&&-1!==l||d&&-1!==d)&&t({id:l,styleId:d,replace:text}),r.apply(o,c)}))})),r.CSSStyleSheet.prototype.replaceSync&&(d=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:ne(((r,o,c)=>{const[text]=c,{id:l,styleId:d}=he(o,e,n.styleMirror);return(l&&-1!==l||d&&-1!==d)&&t({id:l,styleId:d,replaceSync:text}),r.apply(o,c)}))}));const h={};ge("CSSGroupingRule")?h.CSSGroupingRule=r.CSSGroupingRule:(ge("CSSMediaRule")&&(h.CSSMediaRule=r.CSSMediaRule),ge("CSSConditionRule")&&(h.CSSConditionRule=r.CSSConditionRule),ge("CSSSupportsRule")&&(h.CSSSupportsRule=r.CSSSupportsRule));const m={};return Object.entries(h).forEach((([r,o])=>{m[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(m[r].insertRule,{apply:ne(((r,o,c)=>{const[l,d]=c,{id:h,styleId:m}=he(o.parentStyleSheet,e,n.styleMirror);return(h&&-1!==h||m&&-1!==m)&&t({id:h,styleId:m,adds:[{rule:l,index:[...ue(o),d||0]}]}),r.apply(o,c)}))}),o.prototype.deleteRule=new Proxy(m[r].deleteRule,{apply:ne(((r,o,c)=>{const[l]=c,{id:d,styleId:h}=he(o.parentStyleSheet,e,n.styleMirror);return(d&&-1!==d||h&&-1!==h)&&t({id:d,styleId:h,removes:[{index:[...ue(o),l]}]}),r.apply(o,c)}))})})),ne((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=c,l&&(r.CSSStyleSheet.prototype.replace=l),d&&(r.CSSStyleSheet.prototype.replaceSync=d),Object.entries(h).forEach((([t,e])=>{e.prototype.insertRule=m[t].insertRule,e.prototype.deleteRule=m[t].deleteRule}))}))}(t,{win:n}),_=pe(t,t.doc),y=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const c=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(c,{apply:ne(((o,l,d)=>{var h;const[m,f,_]=d;if(n.has(m))return c.apply(l,[m,f,_]);const{id:y,styleId:w}=he(null===(h=l.parentRule)||void 0===h?void 0:h.parentStyleSheet,e,r.styleMirror);return(y&&-1!==y||w&&-1!==w)&&t({id:y,styleId:w,set:{property:m,value:f,priority:_},index:ue(l.parentRule)}),o.apply(l,d)}))});const l=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:ne(((o,c,d)=>{var h;const[m]=d;if(n.has(m))return l.apply(c,[m]);const{id:f,styleId:_}=he(null===(h=c.parentRule)||void 0===h?void 0:h.parentStyleSheet,e,r.styleMirror);return(f&&-1!==f||_&&-1!==_)&&t({id:f,styleId:_,remove:{property:m},index:ue(c.parentRule)}),o.apply(c,d)}))}),ne((()=>{o.CSSStyleDeclaration.prototype.setProperty=c,o.CSSStyleDeclaration.prototype.removeProperty=l}))}(t,{win:n}),w=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,c=n.FontFace;n.FontFace=function(t,source,e){const n=new c(t,source,e);return o.set(n,{family:t,buffer:"string"!=typeof source,descriptors:e,fontSource:"string"==typeof source?source:JSON.stringify(Array.from(new Uint8Array(source)))}),n};const l=vt(e.fonts,"add",(function(e){return function(n){return setTimeout(ne((()=>{const p=o.get(n);p&&(t(p),o.delete(n))})),0),e.apply(this,[n])}}));return r.push((()=>{n.FontFace=c})),r.push(l),ne((()=>{r.forEach((t=>t()))}))}(t):()=>{},k=function(param){const{doc:t,mirror:e,blockClass:n,blockSelector:r,unblockSelector:o,selectionCb:c}=param;let l=!0;const d=ne((()=>{const d=t.getSelection();if(!d||l&&(null==d?void 0:d.isCollapsed))return;l=d.isCollapsed||!1;const h=[],m=d.rangeCount||0;for(let i=0;i{}}(t),v=[];for(const e of t.plugins)v.push(e.observer(e.callback,n,e.options));return ne((()=>{re.forEach((b=>b.reset())),r.disconnect(),o(),c(),l(),d(),h(),m(),f(),_(),y(),w(),k(),S(),v.forEach((t=>t()))}))}function fe(t){return void 0!==window[t]}function ge(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class _e{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(iframe,t,e,n){const r=e||this.getIdToRemoteIdMap(iframe),o=n||this.getRemoteIdToIdMap(iframe);let c=r.get(t);return c||(c=this.generateIdFn(),r.set(t,c),o.set(c,t)),c}getIds(iframe,t){const e=this.getIdToRemoteIdMap(iframe),n=this.getRemoteIdToIdMap(iframe);return t.map((t=>this.getId(iframe,t,e,n)))}getRemoteId(iframe,t,map){const e=map||this.getRemoteIdToIdMap(iframe);if("number"!=typeof t)return t;const n=e.get(t);return n||-1}getRemoteIds(iframe,t){const e=this.getRemoteIdToIdMap(iframe);return t.map((t=>this.getRemoteId(iframe,t,e)))}reset(iframe){if(!iframe)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(iframe),this.iframeRemoteIdToIdMap.delete(iframe)}getIdToRemoteIdMap(iframe){let t=this.iframeIdToRemoteIdMap.get(iframe);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(iframe,t)),t}getRemoteIdToIdMap(iframe){let t=this.iframeRemoteIdToIdMap.get(iframe);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(iframe,t)),t}}class ye{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new _e(K),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new _e(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){var n;switch(e.type){case zt.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:zt.IncrementalSnapshot,data:{source:Gt.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case zt.Meta:case zt.Load:case zt.DomContentLoaded:return!1;case zt.Plugin:return e;case zt.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case zt.IncrementalSnapshot:switch(e.data.source){case Gt.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Gt.Drag:case Gt.TouchMove:case Gt.MouseMove:return e.data.positions.forEach((p=>{this.replaceIds(p,t,["id"])})),e;case Gt.ViewportResize:return!1;case Gt.MediaInteraction:case Gt.MouseInteraction:case Gt.Scroll:case Gt.CanvasMutation:case Gt.Input:return this.replaceIds(e.data,t,["id"]),e;case Gt.StyleSheetRule:case Gt.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Gt.Font:return e;case Gt.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case Gt.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null===(n=e.data.styles)||void 0===n||n.forEach((style=>{this.replaceStyleIds(style,t,["styleId"])})),e}}return!1}replace(t,e,n,r){for(const o of r)(Array.isArray(e[o])||"number"==typeof e[o])&&(Array.isArray(e[o])?e[o]=t.getIds(n,e[o]):e[o]=t.getId(n,e[o]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===M.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}class be{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(!B(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=se(Object.assign(Object.assign({},this.bypassOptions),{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(oe(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(pe({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(element,t){const e=this;this.restoreHandlers.push(vt(element.prototype,"attachShadow",(function(n){return function(option){const r=n.call(this,option);return this.shadowRoot&&Ft(this)&&e.addShadowRoot(this.shadowRoot,t),r}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}function we(t,e,n,r){return new(n||(n=Promise))((function(o,c){function l(t){try{h(r.next(t))}catch(t){c(t)}}function d(t){try{h(r.throw(t))}catch(t){c(t)}}function h(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(l,d)}h((r=r.apply(t,e||[])).next())}))}for(var ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i=0;i{if(!t||!Te(t,e)&&"object"!=typeof t)return;const r=function(t,e){let n=ve.get(t);return n||(n=new Map,ve.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let o=r.indexOf(t);return-1===o&&(o=r.length,r.push(t)),o};function Ce(t,e,n){if(t instanceof Array)return t.map((t=>Ce(t,e,n)));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray){return{rr_type:t.constructor.name,args:[Object.values(t)]}}if(t instanceof ArrayBuffer){const e=t.constructor.name,n=function(t){var i,e=new Uint8Array(t),n=e.length,r="";for(i=0;i>2],r+=ke[(3&e[i])<<4|e[i+1]>>4],r+=ke[(15&e[i+1])<<2|e[i+2]>>6],r+=ke[63&e[i+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(t);return{rr_type:e,base64:n}}if(t instanceof DataView){return{rr_type:t.constructor.name,args:[Ce(t.buffer,e,n),t.byteOffset,t.byteLength]}}if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}if(t instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:t.toDataURL()}}if(t instanceof ImageData){return{rr_type:t.constructor.name,args:[Ce(t.data,e,n),t.width,t.height]}}if(Te(t,e)||"object"==typeof t){return{rr_type:t.constructor.name,index:Ie(t,e,n)}}return t}const Ee=(t,e,n)=>[...t].map((t=>Ce(t,e,n))),Te=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(n.find((n=>t instanceof e[n])))};function Ae(t,e,n,r,o){const c=[];try{const l=vt(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(c,...l){if(!At(this,e,n,r,!0)){const t=function(t){return"experimental-webgl"===t?"webgl":t}(c);if("__context"in this||(this.__context=t),o&&["webgl","webgl2"].includes(t))if(l[0]&&"object"==typeof l[0]){const t=l[0];t.preserveDrawingBuffer||(t.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[c,...l])}}));c.push(l)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{c.forEach((t=>t()))}}function xe(t,e,n,r,o,c,l,d){const h=[],m=Object.getOwnPropertyNames(t);for(const l of m)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof t[l])continue;const m=vt(t,l,(function(t){return function(...h){const m=t.apply(this,h);if(Ie(m,d,this),"tagName"in this.canvas&&!At(this.canvas,r,o,c,!0)){const t=Ee([...h],d,this),r={type:e,property:l,args:t};n(this.canvas,r)}return m}}));h.push(m)}catch(r){const o=St(t,l,{set(t){n(this.canvas,{type:e,property:l,args:[t],setter:!0})}});h.push(o)}return h}function Re(t,e,n){var r=void 0===e?null:e,source=function(t,e){var n=atob(t);if(e){for(var r=new Uint8Array(n.length),i=0,o=n.length;i{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)};const{sampling:e="all",win:n,blockClass:r,blockSelector:o,unblockSelector:c,recordCanvas:l,dataURLOptions:d}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,l&&"all"===e&&this.initCanvasMutationObserver(n,r,o,c),l&&"number"==typeof e&&this.initCanvasFPSObserver(e,n,r,o,c,{dataURLOptions:d})}initCanvasFPSObserver(t,e,n,r,o,c){const l=Ae(e,n,r,o,!0),d=new Map,h=new Be;h.onmessage=t=>{const{id:e}=t.data;if(d.set(e,!1),!("base64"in t.data))return;const{base64:n,type:r,width:o,height:c}=t.data;this.mutationCb({id:e,type:Pt["2D"],commands:[{property:"clearRect",args:[0,0,o,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};const m=1e3/t;let f,_=0;const y=t=>{_&&t-_{const t=[];return e.document.querySelectorAll("canvas").forEach((canvas=>{At(canvas,n,r,o,!0)||t.push(canvas)})),t})().forEach((canvas=>we(this,void 0,void 0,(function*(){var t;const e=this.mirror.getId(canvas);if(d.get(e))return;if(d.set(e,!0),["webgl","webgl2"].includes(canvas.__context)){const e=canvas.getContext(canvas.__context);!1===(null===(t=null==e?void 0:e.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)&&e.clear(e.COLOR_BUFFER_BIT)}const n=yield createImageBitmap(canvas);h.postMessage({id:e,bitmap:n,width:canvas.width,height:canvas.height,dataURLOptions:c.dataURLOptions},[n])}))))),f=requestAnimationFrame(y)};f=requestAnimationFrame(y),this.resetObservers=()=>{l(),cancelAnimationFrame(f)}}initCanvasMutationObserver(t,e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=Ae(t,e,n,r,!1),c=function(t,e,n,r,o){const c=[],l=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const d of l)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[d])continue;const l=vt(e.CanvasRenderingContext2D.prototype,d,(function(c){return function(...l){return At(this.canvas,n,r,o,!0)||setTimeout((()=>{const n=Ee([...l],e,this);t(this.canvas,{type:Pt["2D"],property:d,args:n})}),0),c.apply(this,l)}}));c.push(l)}catch(n){const r=St(e.CanvasRenderingContext2D.prototype,d,{set(e){t(this.canvas,{type:Pt["2D"],property:d,args:[e],setter:!0})}});c.push(r)}return()=>{c.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,n,r),l=function(t,e,n,r,o,c){const l=[];return l.push(...xe(e.WebGLRenderingContext.prototype,Pt.WebGL,t,n,r,o,0,e)),void 0!==e.WebGL2RenderingContext&&l.push(...xe(e.WebGL2RenderingContext.prototype,Pt.WebGL2,t,n,r,o,0,e)),()=>{l.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,n,r,this.mirror);this.resetObservers=()=>{o(),c(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,canvas)=>{const e=this.mirror.getId(canvas);this.flushPendingCanvasMutationFor(canvas,e)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(canvas,t){if(this.frozen||this.locked)return;const e=this.pendingCanvasMutations.get(canvas);if(!e||-1===t)return;const n=e.map((t=>{const e=function(s,t){var e={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&t.indexOf(p)<0&&(e[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);i({rule:L(t),index:e})))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Fe{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some((t=>t!==e))}add(t,e){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function ze(t){return Object.assign(Object.assign({},t),{timestamp:It()})}let Ge,Ze,Ye,Pe=!1;const We=new F;function He(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:c=null,unblockSelector:l=null,ignoreClass:d="rr-ignore",ignoreSelector:h=null,maskAllText:m=!1,maskTextClass:f="rr-mask",unmaskTextClass:_=null,maskTextSelector:y=null,unmaskTextSelector:w=null,inlineStylesheet:k=!0,maskAllInputs:S,maskInputOptions:v,slimDOMOptions:I,maskAttributeFn:C,maskInputFn:E,maskTextFn:T,hooks:A,packFn:x,sampling:R={},dataURLOptions:D={},mousemoveWait:N,recordCanvas:M=!1,recordCrossOriginIframes:O=!1,recordAfter:B=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:U=!1,collectFonts:L=!1,inlineImages:z=!1,plugins:G,keepIframeSrcFn:Z=(()=>!1),ignoreCSSAttributes:Y=new Set([]),errorHandler:P,onMutation:W}=t;te(P);const H=!O||window.parent===window;let j=!1;if(!H)try{window.parent.document&&(j=!1)}catch(t){j=!0}if(H&&!e)throw new Error("emit function is required");void 0!==N&&void 0===R.mousemove&&(R.mousemove=N),We.reset();const V=!0===S?{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!==v?v:{},K=!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===I,headMetaDescKeywords:"all"===I}:I||{};let J;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let Q=0;const X=t=>{for(const e of G||[])e.eventProcessor&&(t=e.eventProcessor(t));return x&&!j&&(t=x(t)),t};Ge=(t,o)=>{var c;if(!(null===(c=re[0])||void 0===c?void 0:c.isFrozen())||t.type===zt.FullSnapshot||t.type===zt.IncrementalSnapshot&&t.data.source===Gt.Mutation||re.forEach((t=>t.unfreeze())),H)null==e||e(X(t),o);else if(j){const e={type:"rrweb",event:X(t),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(t.type===zt.FullSnapshot)J=t,Q=0;else if(t.type===zt.IncrementalSnapshot){if(t.data.source===Gt.Mutation&&t.data.isAttachIframe)return;Q++;const e=r&&Q>=r,o=n&&t.timestamp-J.timestamp>n;(e||o)&&Ze(!0)}};const $=t=>{Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.Mutation},t)}))},tt=p=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.Scroll},p)})),et=p=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.CanvasMutation},p)})),nt=new Le({mutationCb:$,adoptedStyleSheetCb:a=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.AdoptedStyleSheet},a)}))}),at=new ye({mirror:We,mutationCb:$,stylesheetManager:nt,recordCrossOriginIframes:O,wrappedEmit:Ge});for(const t of G||[])t.getMirror&&t.getMirror({nodeMirror:We,crossOriginIframeMirror:at.crossOriginIframeMirror,crossOriginIframeStyleMirror:at.crossOriginIframeStyleMirror});const st=new Fe;Ye=new Ue({recordCanvas:M,mutationCb:et,win:window,blockClass:o,blockSelector:c,unblockSelector:l,mirror:We,sampling:R.canvas,dataURLOptions:D});const it=new be({mutationCb:$,scrollCb:tt,bypassOptions:{onMutation:W,blockClass:o,blockSelector:c,unblockSelector:l,maskAllText:m,maskTextClass:f,unmaskTextClass:_,maskTextSelector:y,unmaskTextSelector:w,inlineStylesheet:k,maskInputOptions:V,dataURLOptions:D,maskAttributeFn:C,maskTextFn:T,maskInputFn:E,recordCanvas:M,inlineImages:z,sampling:R,slimDOMOptions:K,iframeManager:at,stylesheetManager:nt,canvasManager:Ye,keepIframeSrcFn:Z,processedNodeManager:st},mirror:We});Ze=(t=!1)=>{Ge(ze({type:zt.Meta,data:{href:window.location.href,width:Tt(),height:Et()}}),t),nt.reset(),it.init(),re.forEach((t=>t.lock()));const e=function(t,e){const{mirror:n=new F,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:c=null,maskAllText:l=!1,maskTextClass:d="rr-mask",unmaskTextClass:h=null,maskTextSelector:m=null,unmaskTextSelector:f=null,inlineStylesheet:_=!0,inlineImages:y=!1,recordCanvas:w=!1,maskAllInputs:k=!1,maskAttributeFn:S,maskTextFn:v,maskInputFn:I,slimDOM:C=!1,dataURLOptions:E,preserveWhiteSpace:T,onSerialize:A,onIframeLoad:x,iframeLoadTimeout:R,onStylesheetLoad:D,stylesheetLoadTimeout:N,keepIframeSrcFn:M=(()=>!1)}=e||{};return _t(t,{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:c,maskAllText:l,maskTextClass:d,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:_,maskInputOptions:!0===k?{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===k?{}:k,maskAttributeFn:S,maskTextFn:v,maskInputFn:I,slimDOMOptions:!0===C||"all"===C?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===C,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===C?{}:C,dataURLOptions:E,inlineImages:y,recordCanvas:w,preserveWhiteSpace:T,onSerialize:A,onIframeLoad:x,iframeLoadTimeout:R,onStylesheetLoad:D,stylesheetLoadTimeout:N,keepIframeSrcFn:M,newlyAddedElement:!1})}(document,{mirror:We,blockClass:o,blockSelector:c,unblockSelector:l,maskAllText:m,maskTextClass:f,unmaskTextClass:_,maskTextSelector:y,unmaskTextSelector:w,inlineStylesheet:k,maskAllInputs:V,maskAttributeFn:C,maskInputFn:E,maskTextFn:T,slimDOM:K,dataURLOptions:D,recordCanvas:M,inlineImages:z,onSerialize:t=>{Nt(t,We)&&at.addIframe(t),Mt(t,We)&&nt.trackLinkElement(t),Ot(t)&&it.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(iframe,t)=>{at.attachIframe(iframe,t),it.observeAttachShadow(iframe)},onStylesheetLoad:(t,e)=>{nt.attachLinkElement(t,e)},keepIframeSrcFn:Z});if(!e)return console.warn("Failed to snapshot the document");Ge(ze({type:zt.FullSnapshot,data:{node:e,initialOffset:Ct(window)}}),t),re.forEach((t=>t.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&nt.adoptStyleSheets(document.adoptedStyleSheets,We.getId(document))};try{const t=[],e=t=>{var e;return ne(me)({onMutation:W,mutationCb:$,mousemoveCb:(t,source)=>Ge(ze({type:zt.IncrementalSnapshot,data:{source:source,positions:t}})),mouseInteractionCb:t=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.MouseInteraction},t)})),scrollCb:tt,viewportResizeCb:t=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.ViewportResize},t)})),inputCb:t=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.Input},t)})),mediaInteractionCb:p=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.MediaInteraction},p)})),styleSheetRuleCb:t=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.StyleSheetRule},t)})),styleDeclarationCb:t=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.StyleDeclaration},t)})),canvasMutationCb:et,fontCb:p=>Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.Font},p)})),selectionCb:p=>{Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.Selection},p)}))},customElementCb:t=>{Ge(ze({type:zt.IncrementalSnapshot,data:Object.assign({source:Gt.CustomElement},t)}))},blockClass:o,ignoreClass:d,ignoreSelector:h,maskAllText:m,maskTextClass:f,unmaskTextClass:_,maskTextSelector:y,unmaskTextSelector:w,maskInputOptions:V,inlineStylesheet:k,sampling:R,recordCanvas:M,inlineImages:z,userTriggeredOnInput:U,collectFonts:L,doc:t,maskAttributeFn:C,maskInputFn:E,maskTextFn:T,keepIframeSrcFn:Z,blockSelector:c,unblockSelector:l,slimDOMOptions:K,dataURLOptions:D,mirror:We,iframeManager:at,stylesheetManager:nt,shadowDomManager:it,processedNodeManager:st,canvasManager:Ye,ignoreCSSAttributes:Y,plugins:(null===(e=null==G?void 0:G.filter((p=>p.observer)))||void 0===e?void 0:e.map((p=>({observer:p.observer,options:p.options,callback:t=>Ge(ze({type:zt.Plugin,data:{plugin:p.name,payload:t}}))}))))||[]},A)};at.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}}));const n=()=>{Ze(),t.push(e(document)),Pe=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(yt("DOMContentLoaded",(()=>{Ge(ze({type:zt.DomContentLoaded,data:{}})),"DOMContentLoaded"===B&&n()}))),t.push(yt("load",(()=>{Ge(ze({type:zt.Load,data:{}})),"load"===B&&n()}),window))),()=>{t.forEach((t=>t())),st.destroy(),Pe=!1,ee()}}catch(t){console.warn(t)}}function je(t){return t>9999999999?t:1e3*t}function Ve(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate((()=>(t.throttledAddEvent({type:zt.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:Object(m.a)(e,10,1e3)}}),"console"===e.category))))}He.addCustomEvent=(t,e)=>{if(!Pe)throw new Error("please add custom event after start recording");Ge(ze({type:zt.Custom,data:{tag:t,payload:e}}))},He.freezePage=()=>{re.forEach((t=>t.freeze()))},He.takeFullSnapshot=t=>{if(!Pe)throw new Error("please take full snapshot after start recording");Ze(t)},He.mirror=We;function Ke(t){const e=qe(t);if(!(e&&e instanceof Element))return e;return e.closest("button,a")||e}function qe(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let Je;function Qe(t){return Je||(Je=[],Object(f.e)(E,"open",(function(t){return function(...e){if(Je)try{Je.forEach((t=>t()))}catch(t){}return t.apply(E,e)}}))),Je.push(t),()=>{const e=Je?Je.indexOf(t):-1;e>-1&&Je.splice(e,1)}}class Xe{constructor(t,e,n=Ve){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=e.timeout/1e3,this._threshold=e.threshold/1e3,this._scollTimeout=e.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=e.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=()=>{this._lastScroll=tn()},e=Qe((()=>{this._lastMutation=tn()})),n=t=>{if(!t.target)return;const e=Ke(t);e&&this._handleMultiClick(e)},r=new MutationObserver((()=>{this._lastMutation=tn()}));r.observe(E.document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),E.addEventListener("scroll",t,{passive:!0}),E.addEventListener("click",n,{passive:!0}),this._teardown=()=>{E.removeEventListener("scroll",t),E.removeEventListener("click",n),e(),r.disconnect(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,e){if(function(t,e){if(!$e.includes(t.tagName))return!0;if("INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||""))return!0;if("A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))return!0;if(e&&t.matches(e))return!0;return!1}(e,this._ignoreSelector)||!function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:(r=t.timestamp,r>9999999999?r/1e3:r),clickBreadcrumb:t,clickCount:0,node:e};var r;this._clicks.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}_handleMultiClick(t){this._getClicks(t).forEach((t=>{t.clickCount++}))}_getClicks(t){return this._clicks.filter((e=>e.node===t))}_checkClicks(){const t=[],e=tn();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<=e&&t.push(n)}));for(const e of t){const t=this._clicks.indexOf(e);t>-1&&(this._generateBreadcrumbs(e),this._clicks.splice(t,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,r=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:c,clickBreadcrumb:l}=t;if(o){const n=1e3*Math.min(t.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:l.message,timestamp:l.timestamp,category:"ui.slowClickDetected",data:{...l.data,url:E.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:c||1}};this._addBreadcrumbEvent(e,o)}else if(c>1){const t={type:"default",message:l.message,timestamp:l.timestamp,category:"ui.multiClick",data:{...l.data,url:E.location.href,route:e.getCurrentRoute(),clickCount:c,metric:!0}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const $e=["A","BUTTON","INPUT"];function tn(){return Date.now()/1e3}function en(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var nn;!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(nn||(nn={}));const rn=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled"]);function an(t){const e={};for(const n in t)if(rn.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}const sn=t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Ke(t.event):qe(t.event),n=Object(_.c)(r,{maxStringLength:200})||""}catch(t){n=""}return{target:r,message:n}}(t);return en({category:`ui.${t.name}`,...on(e,n)})}(e);if(!n)return;const r="click"===e.name,o=r&&e.event;var c,l,d;!(r&&t.clickDetector&&o)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(c=t.clickDetector,l=n,d=Ke(e.event),c.handleClick(l,d)),Ve(t,n)};function on(t,e){const n=He.mirror.getId(t),r=n&&He.mirror.getNode(n),meta=r&&He.mirror.getMeta(r),element=meta&&function(t){return t.type===nn.Element}(meta)?meta:null;return{message:e,data:element?{nodeId:n,node:{id:n,tagName:element.tagName,textContent:Array.from(element.childNodes).map((t=>t.type===nn.Text&&t.textContent)).filter(Boolean).map((text=>text.trim())).join(""),attributes:an(element.attributes)}}:{}}}function cn(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:o,key:c,target:l}=t;if(!l||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(l)||!c)return null;const d=e||r||o,h=1===c.length;if(!d&&h)return null;const m=Object(_.c)(l,{maxStringLength:200})||"",f=on(l,m);return en({category:"ui.keyDown",message:m,data:{...f.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:o,key:c}})}(e);n&&Ve(t,n)}const ln=["name","type","startTime","transferSize","duration"];function dn(a){return function(b){return ln.every((t=>a[t]===b[t]))}}function un(t){const e=new PerformanceObserver((e=>{const n=function(t,e){const[n,r,o]=t.reduce(((t,e)=>("navigation"===e.entryType?t[0].push(e):"largest-contentful-paint"===e.entryType?t[1].push(e):t[2].push(e),t)),[[],[],[]]),c=[],l=[];let d=r.length?r[r.length-1]:void 0;return e.forEach((t=>{if("largest-contentful-paint"!==t.entryType)if("navigation"!==t.entryType)c.push(t);else{const e=t;t.duration>0&&!n.find(dn(e))&&!l.find(dn(e))&&l.push(e)}else(!d||d.startTimea.startTime-b.startTime))}(t.performanceEvents,e.getEntries());t.performanceEvents=n}));return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach((t=>{try{e.observe({type:t,buffered:!0})}catch(t){}})),e}function hn(t,e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(y.c.info(t),e&&mn(t))}function pn(t,e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(y.c.info(t),e&&setTimeout((()=>{mn(t)}),0))}function mn(t){Object(r.c)().addBreadcrumb({category:"console",data:{logger:"replay"},level:"info",message:t},{level:"info"})}class fn extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class gn{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this._totalSize+=e,this._totalSize>D)throw new fn;this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear(),t(JSON.stringify(e))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];return t?je(t):null}}class _n{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((t,e)=>{this._worker.addEventListener("message",(({data:data})=>{data.success?t():e()}),{once:!0}),this._worker.addEventListener("error",(t=>{e(t)}),{once:!0})}))),this._ensureReadyPromise}destroy(){hn("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const c=({data:data})=>{const e=data;if(e.method===t&&e.id===n){if(this._worker.removeEventListener("message",c),!e.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.error("[Replay]",e.response),void o(new Error("Error in compression worker"));r(e.response)}};this._worker.addEventListener("message",c),this._worker.postMessage({id:n,method:t,arg:e})}))}_getAndIncrementId(){return this._id++}}class yn{constructor(t){this._worker=new _n(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=je(t.timestamp);(!this._earliestTimestamp||eD?Promise.reject(new fn):this._sendEventToWorker(data)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear")}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(data){return this._worker.postMessage("addEvent",data)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class bn{constructor(t){this._fallback=new gn,this._compression=new yn(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){return void hn("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:e}=this._fallback,n=[];for(const e of t)n.push(this._compression.addEvent(e));this._compression.hasCheckout=e,this._used=this._compression;try{await Promise.all(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.warn("[Replay] Failed to add events when switching buffers.",t)}}}function wn({useCompression:t}){if(t&&window.Worker)try{const t=function(){const t=new Blob(['/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&sr){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_outi+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_watern&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindexi&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindexi&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<>>=p,c-=p),c<15&&(f+=z[a++]<>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a>3,a-=k,c-=k<<3,f&=(1<{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whavexe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(t)}();hn("[Replay] Using compression worker");const e=new Worker(t);return new bn(e)}catch(t){hn("[Replay] Failed to create compression worker")}return hn("[Replay] Using simple buffer"),new gn}function kn(){try{return"sessionStorage"in E&&!!E.sessionStorage}catch(t){return!1}}function Sn(t){!function(){if(!kn())return;try{E.sessionStorage.removeItem(T)}catch(t){}}(),t.session=void 0}function vn(t){return void 0!==t&&Math.random()t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)||(hn(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,t.getOptions()._experiments.traceInternals),!1))}function On(t){return!t.type}function Bn(t){return"transaction"===t.type}function Un(t){const e=function(){const t=Object(r.c)().getClient();if(!t)return!1;const e=t.getTransport();if(!e)return!1;return e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!t.isEnabled()||!On(n)&&!Bn(n))return;const o=r&&r.statusCode;e&&(!o||o<200||o>=300)||(Bn(n)?function(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}(t,n):function(t,e){const n=t.getContext();e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id);"buffer"===t.recordingMode&&e.tags&&e.tags.replayId&&setTimeout((()=>{t.sendBufferedReplayOrFlush()}))}(t,n))}}function Ln(t,e=!1){const n=e?Un(t):void 0;return Object.assign(((e,r)=>{if(!t.isEnabled())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!On(e)&&!Bn(e))return e;if(!t.checkAndHandleExpiredSession())return e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length)&&(!(!e.originalException||!e.originalException.__rrweb__)||t.exception.values.some((t=>!!(t.stacktrace&&t.stacktrace.frames&&t.stacktrace.frames.length)&&t.stacktrace.frames.some((t=>t.filename&&t.filename.includes("/rrweb/src/"))))))}(e,r)&&!t.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.log("[Replay] Ignoring error from rrweb internals",e),null;const o=function(t,e){return"buffer"===t.recordingMode&&e.message!==A&&!(!e.exception||e.type)&&vn(t.getOptions().errorSampleRate)}(t,e);return(o||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),n&&n(e,{statusCode:200}),e}),{id:"Replay"})}function Fn(t,e){return e.map((({type:e,start:n,end:r,name:o,data:data})=>{const c=t.throttledAddEvent({type:zt.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:o,startTimestamp:n,endTimestamp:r,data:data}}});return"string"==typeof c?Promise.resolve(null):c}))}function zn(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate((()=>(Fn(t,[n]),!1))))}}function Gn(t,e){t.isEnabled()&&null!==e&&(function(t,e){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!t.getOptions()._experiments.traceInternals)&&Object(o.a)(e,Object(r.c)())}(t,e.name)||t.addUpdate((()=>(Fn(t,[e]),!0))))}function Zn(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,o=r[k.a];if(!e||!n||!o)return null;const{method:c,url:l,status_code:d}=o;return void 0===l?null:{type:"resource.xhr",name:l,start:e/1e3,end:n/1e3,data:{method:c,statusCode:d}}}(e);Gn(t,n)}}const Yn=10,Pn=11,Wn=12,Hn=13,jn=14,Vn=15,Kn=20,qn=21,Jn=22,Qn=23,Xn=["true","false","null"];function $n(t,e){if(!e.length)return t;let n=t;const r=e.length-1;n=function(t,e){switch(e){case Yn:return`${t}"~~":"~~"`;case 11:return`${t}:"~~"`;case 12:return`${t}~~":"~~"`;case Hn:return function(t){const e=t.lastIndexOf(":"),n=t.slice(e+1);if(Xn.includes(n.trim()))return`${t},"~~":"~~"`;return`${t.slice(0,e+1)}"~~"`}(t);case 14:return`${t}~~"`;case Vn:return`${t},"~~":"~~"`;case Kn:return`${t}"~~"`;case qn:return function(t){const e=function(t){for(let i=t.length-1;i>=0;i--){const e=t[i];if(","===e||"["===e)return i}return-1}(t);if(e>-1){const n=t.slice(e+1);return Xn.includes(n.trim())?`${t},"~~"`:`${t.slice(0,e+1)}"~~"`}return t}(t);case 22:return`${t}~~"`;case Qn:return`${t},"~~"`}return t}(n,e[r]);for(let i=r;i>=0;i--){switch(e[i]){case Yn:n=`${n}}`;break;case Kn:n=`${n}]`}}return n}function er(t,e,n){const r=t[t.length-1],o=e[n];if(!/\s/.test(o))if('"'!==o||nr(e,n))switch(o){case"{":!function(t,e){if(!e)return void t.push(Yn);if(e===Hn)return void t.push(Yn);e===qn&&t.push(Yn);if(e===Kn)t.push(Yn)}(t,r);break;case"[":!function(t,e){if(!e)return t.push(Kn),void t.push(qn);if(e===Hn)return t.push(Kn),void t.push(qn);e===qn&&(t.push(Kn),t.push(qn));if(e===Kn)t.push(Kn),t.push(qn)}(t,r);break;case":":!function(t,e){e===Pn&&(t.pop(),t.push(Hn))}(t,r);break;case",":!function(t,e){if(e===Hn)return void t.pop();if(e===Vn)return t.pop(),void t.pop();if(e===qn)return;if(e===Qn)t.pop()}(t,r);break;case"}":!function(t,e){e===Yn&&t.pop();e===Hn&&(t.pop(),t.pop());e===Vn&&(t.pop(),t.pop(),t.pop());t[t.length-1]===Hn&&t.push(Vn);t[t.length-1]===qn&&t.push(Qn)}(t,r);break;case"]":!function(t,e){e===Kn&&t.pop();e===qn&&(t.pop(),t.pop());e===Qn&&(t.pop(),t.pop(),t.pop());t[t.length-1]===Hn&&t.push(Vn);t[t.length-1]===qn&&t.push(Qn)}(t,r)}else!function(t,e){if(e===jn)return t.pop(),void t.push(Vn);if(e===Jn)return t.pop(),void t.push(Qn);if(e===Hn)return void t.push(jn);if(e===qn)return void t.push(Jn);if(e===Yn)return void t.push(Wn);if(e===Wn)t.pop(),t.push(11)}(t,r)}function nr(t,e){return"\\"===t[e-1]&&!nr(t,e-1)}function rr(t){return $n(t,function(t){const e=[];for(let n=0;nx;if(function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(body))try{const e=t?rr(body.slice(0,x)):body;return{body:JSON.parse(e),warnings:t?["JSON_TRUNCATED"]:[]}}catch(e){return{body:t?`${body.slice(0,x)}…`:body,warnings:t?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:t?`${body.slice(0,x)}…`:body,warnings:t?["TEXT_TRUNCATED"]:[]}}(body);return n.body=r,o.length>0&&(n._meta={warnings:o}),n}function dr(t,e){return Object.keys(t).reduce(((n,r)=>{const o=r.toLowerCase();return e.includes(o)&&t[r]&&(n[o]=t[r]),n}),{})}function ur(t){return new URLSearchParams(t).toString()}function pr(t,e){const n=function(t,e=E.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(E.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;if(!t.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(t);return Object(S.c)(n,e)}async function mr(t,e,n){try{const data=await async function(t,e,n){const{startTimestamp:r,endTimestamp:o}=e,{url:c,method:l,status_code:d=0,request_body_size:h,response_body_size:m}=t.data,f=pr(c,n.networkDetailAllowUrls)&&!pr(c,n.networkDetailDenyUrls),_=f?function({networkCaptureBodies:t,networkRequestHeaders:e},input,n){const r=function(t,e){if(1===t.length&&"string"!=typeof t[0])return _r(t[0],e);if(2===t.length)return _r(t[1],e);return{}}(input,e);if(!t)return lr(r,n,void 0);const o=ir(fr(input));return lr(r,n,o)}(n,e.input,h):cr(h),y=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},o,c){if(!t&&void 0!==c)return cr(c);const l=gr(o.headers,r);if(!e&&void 0!==c)return lr(l,c,void 0);try{const r=o.clone(),d=await async function(t){try{return await t.text()}catch(t){return}}(r),h=d&&d.length&&void 0===c?ar(d,n):c;return t?lr(l,h,e?d:void 0):cr(h)}catch(t){return lr(l,c,void 0)}}(f,n,e.response,m);return{startTimestamp:r,endTimestamp:o,url:c,method:l,statusCode:d,request:_,response:y}}(t,e,n),r=or("resource.fetch",data);Gn(n.replay,r)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.error("[Replay] Failed to capture fetch breadcrumb",t)}}function fr(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function gr(t,e){const n={};return e.forEach((header=>{t.get(header)&&(n[header]=t.get(header))})),n}function _r(input,t){if(!input)return{};const e=input.headers;return e?e instanceof Headers?gr(e,t):Array.isArray(e)?{}:dr(e,t):{}}async function yr(t,e,n){try{const data=function(t,e,n){const{startTimestamp:r,endTimestamp:o,input:input,xhr:c}=e,{url:l,method:d,status_code:h=0,request_body_size:m,response_body_size:f}=t.data;if(!l)return null;if(!pr(l,n.networkDetailAllowUrls)||pr(l,n.networkDetailDenyUrls)){return{startTimestamp:r,endTimestamp:o,url:l,method:d,statusCode:h,request:cr(m),response:cr(f)}}const _=c[k.a],y=_?dr(_.request_headers,n.networkRequestHeaders):{},w=dr(function(t){const e=t.getAllResponseHeaders();if(!e)return{};return e.split("\r\n").reduce(((t,line)=>{const[e,n]=line.split(": ");return t[e.toLowerCase()]=n,t}),{})}(c),n.networkResponseHeaders),S=lr(y,m,n.networkCaptureBodies?ir(input):void 0),v=lr(w,f,n.networkCaptureBodies?e.xhr.responseText:void 0);return{startTimestamp:r,endTimestamp:o,url:l,method:d,statusCode:h,request:S,response:v}}(t,e,n),r=or("resource.xhr",data);Gn(n.replay,r)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.error("[Replay] Failed to capture fetch breadcrumb",t)}}function wr(t){const e=Object(r.c)().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:c,networkRequestHeaders:l,networkResponseHeaders:d}=t.getOptions(),h={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:c,networkRequestHeaders:l,networkResponseHeaders:d};e&&e.on?e.on("beforeAddBreadcrumb",((t,e)=>function(t,e,n){if(!e.data)return;try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(!function(t,e,n){const{xhr:r,input:input}=e,o=ar(input,n.textEncoder),c=r.getResponseHeader("content-length")?sr(r.getResponseHeader("content-length")):ar(r.response,n.textEncoder);void 0!==o&&(t.data.request_body_size=o),void 0!==c&&(t.data.response_body_size=c)}(e,n,t),yr(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(!function(t,e,n){const{input:input,response:r}=e,o=ar(fr(input),n.textEncoder),c=r?sr(r.headers.get("content-length")):void 0;void 0!==o&&(t.data.request_body_size=o),void 0!==c&&(t.data.response_body_size=c)}(e,n,t),mr(e,n,t))}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.warn("Error when enriching network breadcrumb")}}(h,t,e))):(Object(k.b)("fetch",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:o}=t;if(!n)return null;const{method:c,url:l}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:l,data:{method:c,statusCode:o?o.status:void 0}}}(e);Gn(t,n)}}(t)),Object(k.b)("xhr",Zn(t)))}catch(t){}}let kr=null;const Sr=t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();if(kr===e||!e)return null;if(kr=e,!function(t){return!!t.category}(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return en(t);let n=!1;const r=e.map((t=>{if(!t)return t;if("string"==typeof t)return t.length>R?(n=!0,`${t.slice(0,R)}…`):t;if("object"==typeof t)try{const e=Object(m.a)(t,7),r=JSON.stringify(e);if(r.length>R){const t=rr(r.slice(0,R)),e=JSON.parse(t);return n=!0,e}return e}catch(t){}return t}));return en({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return en(e)}(e);n&&Ve(t,n)};function vr(t){return!(!t||!t.on)}function Ir(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,time=Date.now()/1e3;return{type:"memory",name:"memory",start:time,end:time,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}const Cr={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:o,startTime:c,decodedBodySize:l,encodedBodySize:d,responseStatus:h,transferSize:m}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${e}.${n}`,start:Tr(c),end:Tr(o),name:r,data:{size:m,statusCode:h,decodedBodySize:l,encodedBodySize:d}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:o}=t,c=Tr(o);return{type:n,name:r,start:c,end:c+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:o,domComplete:c,encodedBodySize:l,domContentLoadedEventStart:d,domContentLoadedEventEnd:h,domInteractive:m,loadEventStart:f,loadEventEnd:_,redirectCount:y,startTime:w,transferSize:k,type:S}=t;if(0===o)return null;return{type:`${e}.${S}`,start:Tr(w),end:Tr(c),name:n,data:{size:k,decodedBodySize:r,encodedBodySize:l,duration:o,domInteractive:m,domContentLoadedEventStart:d,domContentLoadedEventEnd:h,loadEventStart:f,loadEventEnd:_,domComplete:c,redirectCount:y}}},"largest-contentful-paint":function(t){const{entryType:e,startTime:n,size:r}=t;let o=0;if(E.performance){const t=E.performance.getEntriesByType("navigation")[0];o=t&&t.activationStart||0}const c=Math.max(n-o,0),l=Tr(o)+c/1e3;return{type:e,name:e,start:l,end:l,data:{value:c,size:r,nodeId:He.mirror.getId(t.element)}}}};function Er(t){return void 0===Cr[t.entryType]?null:Cr[t.entryType](t)}function Tr(time){return((v.a||E.performance.timeOrigin)+time)/1e3}function Ar(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.warn("[Replay] Received replay event after session expired."));const o=r||!e;e=!0,t.addUpdate((()=>{if("buffer"===t.recordingMode&&o&&t.setInitialState(),!Dn(t,n,o))return!0;if(!o)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return;Dn(t,function(t){const e=t.getOptions();return{type:zt.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,o),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(hn(`[Replay] Updating session start time to earliest event in buffer to ${new Date(e)}`,t.getOptions()._experiments.traceInternals),t.session.started=e,t.getOptions().stickySession&&In(t.session))}return"session"===t.recordingMode&&t.flush(),!0}))}}async function xr({recordingData:t,replayId:e,segmentId:n,eventContext:o,timestamp:c,session:d}){const h=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:m,errorIds:f,traceIds:_,initialTimestamp:y}=o,w=Object(r.c)(),k=w.getClient(),S=w.getScope(),v=k&&k.getTransport(),C=k&&k.getDsn();if(!(k&&v&&C&&d.sampled))return;const E={type:"replay_event",replay_start_timestamp:y/1e3,timestamp:c/1e3,error_ids:f,trace_ids:_,urls:m,replay_id:e,segment_id:n,replay_type:d.sampled},T=await async function({client:t,scope:e,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations)};t.emit&&t.emit("preprocessEvent",r,o);const c=await Object(l.a)(t.getOptions(),r,o,e,t);if(!c)return null;c.platform=c.platform||"javascript";const d=t.getSdkMetadata&&t.getSdkMetadata(),{name:h,version:m}=d&&d.sdk||{};return c.sdk={...c.sdk,name:h||"sentry.javascript.unknown",version:m||"0.0.0"},c}({scope:S,client:k,replayId:e,event:E});if(!T)return k.recordDroppedEvent("event_processor","replay",E),void hn("An event processor returned `null`, will not send event.");delete T.sdkProcessingMetadata;const x=function(t,e,n,r){return Object(I.c)(Object(I.d)(t,Object(I.h)(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(T,h,C,k.getOptions().tunnel);let R;try{R=await v.send(x)}catch(t){const e=new Error(A);try{e.cause=t}catch(t){}throw e}if(!R)return R;if("number"==typeof R.statusCode&&(R.statusCode<200||R.statusCode>=300))throw new Rr(R.statusCode);return R}class Rr extends Error{constructor(t){super(`Transport returned status code ${t}`)}}async function Dr(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;if(n.length)try{return await xr(t),!0}catch(n){if(n instanceof Rr)throw n;if(Object(d.j)("Replays",{_retryCount:e.count}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r._experiments&&r._experiments.captureExceptions&&Object(d.d)(n),e.count>=3){const t=new Error("Unable to send Replay - max retries exceeded");try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await Dr(t,e),n(!0)}catch(t){r(t)}}),e.interval)}))}}const Nr="__THROTTLED";function Mr(t,e,n){const r=new Map;let o=!1;return(...c)=>{const l=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;r.forEach(((t,n)=>{na+b),0)>=e){const t=o;return o=!0,t?"__SKIPPED":Nr}o=!1;const d=r.get(l)||0;return r.set(l,d+1),t(...c)}}class Or{constructor({options:t,recordingOptions:e}){Or.prototype.__init.call(this),Or.prototype.__init2.call(this),Or.prototype.__init3.call(this),Or.prototype.__init4.call(this),Or.prototype.__init5.call(this),Or.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEvents=[],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=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,o,c;const l=n&&n.maxWait?Math.max(n.maxWait,e):0;function d(){return h(),r=t(),r}function h(){void 0!==o&&clearTimeout(o),void 0!==c&&clearTimeout(c),o=c=void 0}function m(){return o&&clearTimeout(o),o=setTimeout(d,e),l&&void 0===c&&(c=setTimeout(d,l)),r}return m.cancel=h,m.flush=function(){return void 0!==o||void 0!==c?d():r},m}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Mr(((t,e)=>function(t,e,n){return Mn(t,e)?Nn(t,e,n):Promise.resolve(null)}(this,t,e)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;o&&(this.clickDetector=new Xe(this,o))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this._options;e<=0&&n<=0||(this._initializeSessionForSampling(t),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",pn(`[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");pn("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const t=Rn({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");pn("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Rn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=He({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Ar(this),onMutation:this._onMutationHandler})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:e}={}){if(this._isEnabled){this._isEnabled=!1;try{hn("[Replay] Stopping Replay"+(e?` triggered by ${e}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Sn(this)}catch(t){this._handleException(t)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),hn("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),hn("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();hn("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();t&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(e),this._updateSessionActivity(e),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&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&&Tn(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const t=`${E.location.pathname}${E.location.hash}${E.location.search}`,e=`${E.location.origin}${t}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===Nr){const t=en({category:"replay.throttled"});this.addUpdate((()=>!Dn(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})))}return n}getCurrentRoute(){const t=this.lastTransaction||Object(r.c)().getScope().getTransaction();if(t&&["route","custom"].includes(t.metadata.source))return t.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=wn({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.error("[Replay]",t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Object(d.d)(t)}_initializeSessionForSampling(t){const e=this._options.errorSampleRate>0,n=Rn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:e});this.session=n}_checkSession(){if(!this.session)return!1;const t=this.session;return!xn(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(t),!1)}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{E.document.addEventListener("visibilitychange",this._handleVisibilityChange),E.addEventListener("blur",this._handleWindowBlur),E.addEventListener("focus",this._handleWindowFocus),E.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(t){const e=Object(r.c)().getScope(),n=Object(r.c)().getClient();e.addScopeListener(Sr(t)),Object(k.b)("dom",sn(t)),Object(k.b)("history",zn(t)),wr(t);const o=Ln(t,!vr(n));n&&n.addEventProcessor?n.addEventProcessor(o):Object(c.a)(o),vr(n)&&(n.on("afterSendEvent",Un(t)),n.on("createDsc",(e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&(e.replay_id=n)})),n.on("startTransaction",(e=>{t.lastTransaction=e})),n.on("finishTransaction",(e=>{t.lastTransaction=e})))}(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}"PerformanceObserver"in E&&(this._performanceObserver=un(this))}_removeListeners(){try{E.document.removeEventListener("visibilitychange",this._handleVisibilityChange),E.removeEventListener("blur",this._handleWindowBlur),E.removeEventListener("focus",this._handleWindowFocus),E.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=void 0)}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{"visible"===E.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=en({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=en({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{cn(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;An(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):hn("[Replay] Document has become active, but session has expired")}_triggerFullSnapshot(t=!0){try{hn("[Replay] Taking full rrweb snapshot"),He.takeFullSnapshot(t)}catch(t){this._handleException(t)}}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate((()=>{this.throttledAddEvent({type:zt.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}_addPerformanceEntries(){const t=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(Fn(this,function(t){return t.map(Er).filter(Boolean)}(t)))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&nthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await Dr({replayId:t,recordingData:o,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:e})}catch(t){this._handleException(t),this.stop({reason:"sendReplay"});const e=Object(r.c)().getClient();e&&e.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.error("[Replay] No session found to flush."));const e=this.session.started,n=Date.now()-e;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||o)return hn(`[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 c=this.eventBuffer;if(c&&0===this.session.segmentId&&!c.hasCheckout&&hn("[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(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&y.c.error(t)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&In(this.session)}__init6(){this._onMutationHandler=t=>{const e=t.length,n=this._options.mutationLimit,r=n&&e>n;if(e>this._options.mutationBreadcrumbLimit||r){const t=en({category:"replay.mutations",data:{count:e,limit:r}});this._createCustomBreadcrumb(t)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function Br(t,e,n,r){const o=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&o.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),o.join(",")}function Ur(){return"undefined"!=typeof window&&(!Object(C.b)()||void 0!==t&&"renderer"===t.type)}const Lr='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Fr=["content-length","content-type","accept"];let zr=!1;class Gr{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:c=!0,_experiments:l={},sessionSampleRate:d,errorSampleRate:h,maskAllText:m=!0,maskAllInputs:f=!0,blockAllMedia:_=!0,mutationBreadcrumbLimit:y=750,mutationLimit:w=1e4,slowClickTimeout:k=7e3,slowClickIgnoreSelectors:S=[],networkDetailAllowUrls:v=[],networkDetailDenyUrls:I=[],networkCaptureBodies:C=!0,networkRequestHeaders:E=[],networkResponseHeaders:T=[],mask:mask=[],maskAttributes:A=["title","placeholder"],unmask:x=[],block:R=[],unblock:D=[],ignore:M=[],maskFn:O,beforeAddRecordingEvent:B,blockClass:U,blockSelector:L,maskInputOptions:F,maskTextClass:z,maskTextSelector:G,ignoreClass:Z}={}){this.name=Gr.id;const Y=function({mask:mask,unmask:t,block:e,unblock:n,ignore:r,blockClass:o,blockSelector:c,maskTextClass:l,maskTextSelector:d,ignoreClass:h}){const m={maskTextSelector:Br(mask,[".sentry-mask","[data-sentry-mask]"],l,d),unmaskTextSelector:Br(t,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:Br(e,[".sentry-block","[data-sentry-block]",'base[href="/"]'],o,c),unblockSelector:Br(n,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Br(r,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],h)};return o instanceof RegExp&&(m.blockClass=o),l instanceof RegExp&&(m.maskTextClass=l),m}({mask:mask,unmask:x,block:R,unblock:D,ignore:M,blockClass:U,blockSelector:L,maskTextClass:z,maskTextSelector:G,ignoreClass:Z});if(this._recordingOptions={maskAllInputs:f,maskAllText:m,maskInputOptions:{...F||{},password:!0},maskTextFn:O,maskInputFn:O,maskAttributeFn:(t,e,n)=>function({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:o,value:c}){return r?o.unmaskTextSelector&&t.matches(o.unmaskTextSelector)?c:n.includes(e)||"value"===e&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"")?c.replace(/[\S]/g,"*"):c:c}({maskAttributes:A,maskAllText:m,privacyOptions:Y,key:t,value:e,el:n}),...Y,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch(t){}return!0}},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,N),stickySession:o,sessionSampleRate:d,errorSampleRate:h,useCompression:c,blockAllMedia:_,maskAllInputs:f,maskAllText:m,mutationBreadcrumbLimit:y,mutationLimit:w,slowClickTimeout:k,slowClickIgnoreSelectors:S,networkDetailAllowUrls:v,networkDetailDenyUrls:I,networkCaptureBodies:C,networkRequestHeaders:Zr(E),networkResponseHeaders:Zr(T),beforeAddRecordingEvent:B,_experiments:l},"number"==typeof d&&(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: ${d} })`),this._initialOptions.sessionSampleRate=d),"number"==typeof h&&(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: ${h} })`),this._initialOptions.errorSampleRate=h),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Lr}`:Lr),this._isInitialized&&Ur())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return zr}set _isInitialized(t){zr=t}setupOnce(){Ur()&&(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(t){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const t=function(t){const e=Object(r.c)().getClient(),n=e&&e.getOptions(),o={sessionSampleRate:0,errorSampleRate:0,...Object(f.c)(t)};if(!n)return console.warn("SDK client is not available."),o;null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.");"number"==typeof n.replaysSessionSampleRate&&(o.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(o.errorSampleRate=n.replaysOnErrorSampleRate);return o}(this._initialOptions);this._replay=new Or({options:t,recordingOptions:this._recordingOptions})}}function Zr(t){return[...Fr,...t.map((header=>header.toLowerCase()))]}Gr.__initStatic()}).call(this,n(148))}}]); //# sourceMappingURL=ba08fcc.modern.js.map