!function(){"use strict";const t=Object.prototype.toString;function e(e){switch(t.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return d(e,Error)}}function n(e,n){return t.call(e)===`[object ${n}]`}function s(t){return n(t,"ErrorEvent")}function i(t){return n(t,"DOMError")}function r(t){return n(t,"String")}function a(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function o(t){return n(t,"Object")}function c(t){return"undefined"!=typeof Event&&d(t,Event)}function l(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function u(t){return"number"==typeof t&&t!=t}function d(t,e){try{return t instanceof e}catch(t){return!1}}function h(t){return t&&t.Math==Math?t:void 0}const _="object"==typeof globalThis&&h(globalThis)||"object"==typeof window&&h(window)||"object"==typeof self&&h(self)||"object"==typeof global&&h(global)||function(){return this}()||{};function p(){return _}function f(t,e,n){const s=n||_,i=s.__SENTRY__=s.__SENTRY__||{};return i[t]||(i[t]=e())}const m=p();function g(t,e={}){try{let n=t;const s=5,i=[];let r=0,a=0;const o=" > ",c=o.length;let l;const u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||80;for(;n&&r++1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(o)}catch(t){return""}}function y(t,e){const n=t,s=[];let i,a,o,c,l;if(!n||!n.tagName)return"";s.push(n.tagName.toLowerCase());const u=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(u&&u.length)u.forEach((t=>{s.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&s.push(`#${n.id}`),i=n.className,i&&r(i))for(a=i.split(/\s+/),l=0;l{const s=e[t]&&e[t].__sentry_original__;t in e&&s&&(n[t]=e[t],e[t]=s)}));try{return t()}finally{Object.keys(n).forEach((t=>{e[t]=n[t]}))}}function S(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?v.forEach((n=>{e[n]=(...e)=>{t&&b((()=>{_.console[n](`Sentry Logger [${n}]:`,...e)}))}})):v.forEach((t=>{e[t]=()=>{}})),e}let E;E="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?f("logger",S):S();const w=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function k(t,e=!1){const{host:n,path:s,pass:i,port:r,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&i?`:${i}`:""}@${n}${r?`:${r}`:""}/${s?`${s}/`:s}${a}`}function T(t){const e=w.exec(t);if(!e)return void console.error(`Invalid Sentry Dsn: ${t}`);const[n,s,i="",r,a="",o]=e.slice(1);let c="",l=o;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return R({host:r,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:s})}function R(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function x(t){const e="string"==typeof t?T(t):R(t);if(e&&function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;const{port:e,projectId:n,protocol:s}=t;return!(["protocol","publicKey","host","projectId"].find((e=>!t[e]&&(E.error(`Invalid Sentry Dsn: ${e} missing`),!0)))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(s)?e&&isNaN(parseInt(e,10))&&(E.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(E.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),1):(E.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}class D extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function C(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function N(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;eI(t,e,n)))}function B(t,e,n){if(!(e in t))return;const s=t[e],i=n(s);if("function"==typeof i)try{O(i,s)}catch(t){}t[e]=i}function A(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function O(t,e){const n=e.prototype||{};t.prototype=e.prototype=n,A(t,"__sentry_original__",e)}function L(t){return t.__sentry_original__}function M(t){if(e(t))return{message:t.message,name:t.name,stack:t.stack,...Y(t)};if(c(t)){const e={type:t.type,target:G(t.target),currentTarget:G(t.currentTarget),...Y(t)};return"undefined"!=typeof CustomEvent&&d(t,CustomEvent)&&(e.detail=t.detail),e}return t}function G(t){try{return e=t,"undefined"!=typeof Element&&d(e,Element)?g(t):Object.prototype.toString.call(t)}catch(t){return""}var e}function Y(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function z(t){return P(t,new Map)}function P(t,e){if(o(t)){const n=e.get(t);if(void 0!==n)return n;const s={};e.set(t,s);for(const n of Object.keys(t))void 0!==t[n]&&(s[n]=P(t[n],e));return s}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const s=[];return e.set(t,s),t.forEach((t=>{s.push(P(t,e))})),s}return t}const $=/\(error: (.*)\)/;function F(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{const s=[],i=t.split("\n");for(let t=n;t1024)continue;const r=$.test(n)?n.replace($,"$1"):n;if(!r.match(/\S*Error: /)){for(const t of e){const e=t(r);if(e){s.push(e);break}}if(s.length>=50)break}}return function(t){if(!t.length)return[];const e=t.slice(0,50),n=e[e.length-1].function;n&&/sentryWrapped/.test(n)&&e.pop();e.reverse();const s=e[e.length-1].function;s&&/captureMessage|captureException/.test(s)&&e.pop();return e.map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"})))}(s)}}const j="";function H(t){try{return t&&"function"==typeof t&&t.name||j}catch(t){return j}}const q=p();function W(){if(!("fetch"in q))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function Z(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const K=p();const V=p(),X={},J={};function Q(t){if(!J[t])switch(J[t]=!0,t){case"console":!function(){if(!("console"in V))return;v.forEach((function(t){t in V.console&&B(V.console,t,(function(e){return function(...n){et("console",{args:n,level:t}),e&&e.apply(V.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in V))return;const t=et.bind(null,"dom"),e=ot(t,!0);V.document.addEventListener("click",e,!1),V.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=V[e]&&V[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(B(n,"addEventListener",(function(e){return function(n,s,i){if("click"===n||"keypress"==n)try{const s=this,r=s.__sentry_instrumentation_handlers__=s.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){const s=ot(t);a.handler=s,e.call(this,n,s,i)}a.refCount++}catch(t){}return e.call(this,n,s,i)}})),B(n,"removeEventListener",(function(t){return function(e,n,s){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},r=i[e];r&&(r.refCount--,r.refCount<=0&&(t.call(this,e,r.handler,s),r.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,s)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in V))return;const t=XMLHttpRequest.prototype;B(t,"open",(function(t){return function(...e){const n=e[1],s=this.__sentry_xhr_v2__={method:r(e[0])?e[0].toUpperCase():e[0],url:e[1],request_headers:{}};r(n)&&"POST"===s.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this.__sentry_xhr_v2__;if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}et("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?B(this,"onreadystatechange",(function(t){return function(...e){return i(),t.apply(this,e)}})):this.addEventListener("readystatechange",i),B(this,"setRequestHeader",(function(t){return function(...e){const[n,s]=e,i=this.__sentry_xhr_v2__;return i&&(i.request_headers[n.toLowerCase()]=s),t.apply(this,e)}})),t.apply(this,e)}})),B(t,"send",(function(t){return function(...e){const n=this.__sentry_xhr_v2__;return n&&void 0!==e[0]&&(n.body=e[0]),et("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}();break;case"fetch":!function(){if(!function(){if(!W())return!1;if(Z(q.fetch))return!0;let t=!1;const e=q.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=Z(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t}())return;B(V,"fetch",(function(t){return function(...e){const{method:n,url:s}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:st(e),method:nt(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:st(e),method:nt(e,"method")?String(e.method).toUpperCase():"GET"}}(e),i={args:e,fetchData:{method:n,url:s},startTimestamp:Date.now()};return et("fetch",{...i}),t.apply(V,e).then((t=>(et("fetch",{...i,endTimestamp:Date.now(),response:t}),t)),(t=>{throw et("fetch",{...i,endTimestamp:Date.now(),error:t}),t}))}}))}();break;case"history":!function(){if(!function(){const t=K.chrome,e=t&&t.app&&t.app.runtime,n="history"in K&&!!K.history.pushState&&!!K.history.replaceState;return!e&&n}())return;const t=V.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=it,e=String(n);it=e,et("history",{from:t,to:e})}return t.apply(this,e)}}V.onpopstate=function(...e){const n=V.location.href,s=it;if(it=n,et("history",{from:s,to:n}),t)try{return t.apply(this,e)}catch(t){}},B(V.history,"pushState",e),B(V.history,"replaceState",e)}();break;case"error":ct=V.onerror,V.onerror=function(t,e,n,s,i){return et("error",{column:s,error:i,line:n,msg:t,url:e}),!(!ct||ct.__SENTRY_LOADER__)&&ct.apply(this,arguments)},V.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":lt=V.onunhandledrejection,V.onunhandledrejection=function(t){return et("unhandledrejection",t),!(lt&&!lt.__SENTRY_LOADER__)||lt.apply(this,arguments)},V.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("unknown instrumentation type:",t))}}function tt(t,e){X[t]=X[t]||[],X[t].push(e),Q(t)}function et(t,e){if(t&&X[t])for(const n of X[t]||[])try{n(e)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${H(n)}\nError:`,e)}}function nt(t,e){return!!t&&"object"==typeof t&&!!t[e]}function st(t){return"string"==typeof t?t:t?nt(t,"url")?t.url:t.toString?t.toString():"":""}let it;let rt,at;function ot(t,e=!1){return n=>{if(!n||at===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const s="keypress"===n.type?"input":n.type;(void 0===rt||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(at,n))&&(t({event:n,name:s,global:e}),at=n),clearTimeout(rt),rt=V.setTimeout((()=>{rt=void 0}),1e3)}}let ct=null;let lt=null;function ut(){const t=_,e=t.crypto||t.msCrypto;if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");const n=e&&e.getRandomValues?()=>e.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function dt(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ht(t){const{message:e,event_id:n}=t;if(e)return e;const s=dt(t);return s?s.type&&s.value?`${s.type}: ${s.value}`:s.type||s.value||n||"":n||""}function _t(t,e,n){const s=t.exception=t.exception||{},i=s.values=s.values||[],r=i[0]=i[0]||{};r.value||(r.value=e||""),r.type||(r.type=n||"Error")}function pt(t,e){const n=dt(t);if(!n)return;const s=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...s,...e},e&&"data"in e){const t={...s&&s.data,...e.data};n.mechanism.data=t}}function ft(t){if(t&&t.__sentry_captured__)return!0;try{A(t,"__sentry_captured__",!0)}catch(t){}return!1}function mt(t){return Array.isArray(t)?t:[t]}function gt(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function yt(t,e=100,n=1/0){try{return bt("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function vt(t,e=3,n=102400){const s=yt(t,e);return i=s,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(i))>n?vt(t,e-1,n):s;var i}function bt(t,e,n=1/0,s=1/0,i=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t=s){h[t]="[MaxProperties ~]";break}const e=p[t];h[t]=bt(t,e,l-1,s,i),_++}return a(e),h}var St;function Et(t){return new kt((e=>{e(t)}))}function wt(t){return new kt(((e,n)=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(St||(St={}));class kt{__init(){this._state=St.PENDING}__init2(){this._handlers=[]}constructor(t){kt.prototype.__init.call(this),kt.prototype.__init2.call(this),kt.prototype.__init3.call(this),kt.prototype.__init4.call(this),kt.prototype.__init5.call(this),kt.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new kt(((n,s)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){s(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){s(t)}else s(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new kt(((e,n)=>{let s,i;return this.then((e=>{i=!1,s=e,t&&t()}),(e=>{i=!0,s=e,t&&t()})).then((()=>{i?n(s):e(s)}))}))}__init3(){this._resolve=t=>{this._setResult(St.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(St.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===St.PENDING&&(l(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===St.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===St.RESOLVED&&t[1](this._value),this._state===St.REJECTED&&t[2](this._value),t[0]=!0)}))}}}function Tt(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(s){if(!(void 0===t||e.lengthn(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(t){return new kt(((n,s)=>{let i=e.length;if(!i)return n(!0);const r=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{Et(t).then((()=>{--i||(clearTimeout(r),n(!0))}),s)}))}))}}}function Rt(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",s=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:s,relative:e[5]+n+s}}const xt=["fatal","error","warning","log","info","debug"];const Dt=p(),Ct={nowSeconds:()=>Date.now()/1e3};const Nt=gt()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(t){return}var t,e}():function(){const{performance:t}=Dt;if(!t||!t.now)return;return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),It=void 0===Nt?Ct:{nowSeconds:()=>(Nt.timeOrigin+Nt.now())/1e3},Ut=Ct.nowSeconds.bind(Ct),Bt=It.nowSeconds.bind(It),At=(()=>{const{performance:t}=Dt;if(!t||!t.now)return;const e=36e5,n=t.now(),s=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-s):e,r=it+e.length),0),n=new Uint8Array(e);let s=0;for(const e of t)n.set(e,s),s+=e.length;return n}(i)}function $t(t,e){const n="string"==typeof t.data?zt(t.data,e):t.data;return[z({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const Ft={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function jt(t){return Ft[t]}function Ht(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function qt(t,e,n,s){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&{dsn:k(s)},...i&&{trace:z({...i})}}}function Wt(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const s=Date.parse(`${t}`);return isNaN(s)?6e4:s-e}const Zt="baggage",Kt="sentry-",Vt=/^sentry-/;function Xt(t){return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce(((t,[e,n],s)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,r=0===s?i:`${t},${i}`;return r.length>8192?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):r}),"")}(Object.entries(t).reduce(((t,[e,n])=>(n&&(t[`sentry-${e}`]=n),t)),{}))}function Jt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[e,n])=>(t[e]=n,t)),{})}const Qt="production";function te(t){const e=Bt(),n={sid:ut(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return z({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&ee(n,t),n}function ee(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Bt(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:ut()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class ne{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){const e=new ne;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&ee(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof ne?e:this}return t instanceof ne?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):o(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const s={timestamp:Ut(),...t};return this._breadcrumbs=[...this._breadcrumbs,s].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...se(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,e,n,s=0){return new kt(((i,r)=>{const a=t[s];if(null===e||"function"!=typeof a)i(e);else{const o=a({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===o&&E.log(`Event processor "${a.id}" dropped event`),l(o)?o.then((e=>this._notifyEventProcessors(t,e,n,s+1).then(i))).then(null,r):this._notifyEventProcessors(t,o,n,s+1).then(i).then(null,r)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?mt(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function se(){return f("globalEventProcessors",(()=>[]))}function ie(t){se().push(t)}const re=100;class ae{constructor(t,e=new ne,n=4){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version{i.captureException(t,{originalException:t,syntheticException:s,...e,event_id:n},r)})),n}captureMessage(t,e,n){const s=this._lastEventId=n&&n.event_id?n.event_id:ut(),i=new Error(t);return this._withClient(((r,a)=>{r.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:s},a)})),s}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ut();return t.type||(this._lastEventId=n),this._withClient(((s,i)=>{s.captureEvent(t,{...e,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:r=re}=s.getOptions&&s.getOptions()||{};if(r<=0)return;const a={timestamp:Ut(),...t},o=i?b((()=>i(a,e))):a;null!==o&&(s.emit&&s.emit("beforeAddBreadcrumb",o,e),n.addBreadcrumb(o,r))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=ce(this);try{t(this)}finally{ce(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||n||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),ee(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:s,environment:i=Qt}=n&&n.getOptions()||{},{userAgent:r}=_.navigator||{},a=te({release:s,environment:i,user:e.getUser(),...r&&{userAgent:r},...t}),o=e.getSession&&e.getSession();return o&&"ok"===o.status&&ee(o,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=oe().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function oe(){return _.__SENTRY__=_.__SENTRY__||{extensions:{},hub:void 0},_}function ce(t){const e=oe(),n=ue(e);return de(e,t),n}function le(){const t=oe();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=oe()){e=t,e&&e.__SENTRY__&&e.__SENTRY__.hub&&!ue(t).isOlderThan(4)||de(t,new ae);var e;return ue(t)}(t)}function ue(t){return f("hub",(()=>new ae),t)}function de(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}function he(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=le().getClient(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function _e(t){return(t||le()).getScope().getTransaction()}let pe=!1;function fe(){const t=_e();if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}fe.tag="sentry_tracingErrorCallback";class me{__init(){this.spans=[]}constructor(t=1e3){me.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class ge{__init2(){this.traceId=ut()}__init3(){this.spanId=ut().substring(16)}__init4(){this.startTimestamp=Bt()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(ge.prototype.__init2.call(this),ge.prototype.__init3.call(this),ge.prototype.__init4.call(this),ge.prototype.__init5.call(this),ge.prototype.__init6.call(this),ge.prototype.__init7.call(this),!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new ge({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`;e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},E.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t)),this.setData("http.response.status_code",t);const e=ye(t);return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&E.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:Bt()}toTraceparent(){let t="";return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${t}`}toContext(){return z({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return z({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return z({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function ye(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}class ve extends ge{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),ve.prototype.__init.call(this),ve.prototype.__init2.call(this),ve.prototype.__init3.call(this),this._hub=e||le(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t,e="custom"){this._name=t,this.metadata.source=e}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new me(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Transaction has no name, falling back to ``."),this.name=""),super.finish(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((t=>t!==this&&t.endTimestamp)):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce(((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t)).endTimestamp);const s=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...s,dynamicSamplingContext:this.getDynamicSamplingContext()},...s.source&&{transaction_info:{source:s.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){return z({...super.toContext(),name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const t=this._hub||le(),e=t&&t.getClient();if(!e)return{};const{environment:n,release:s}=e.getOptions()||{},{publicKey:i}=e.getDsn()||{},r=this.metadata.sampleRate,a=void 0!==r?r.toString():void 0,{segment:o}=t.getScope().getUser()||{},c=this.metadata.source,l=c&&"url"!==c?this.name:void 0,u=z({environment:n||Qt,release:s,transaction:l,user_segment:o,public_key:i,trace_id:this.traceId,sample_rate:a});return e.emit&&e.emit("createDsc",u),u}setHub(t){this._hub=t}}const be={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Se=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Ee extends me{constructor(t,e,n,s){super(s),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:Bt(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class we extends ve{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=Se[4]}constructor(t,e,n=be.idleTimeout,s=be.finalTimeout,i=be.heartbeatInterval,r=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=r,we.prototype.__init.call(this),we.prototype.__init2.call(this),we.prototype.__init3.call(this),we.prototype.__init4.call(this),we.prototype.__init5.call(this),we.prototype.__init6.call(this),r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope((t=>t.setSpan(this)))),this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Se[3],this.finish())}),this._finalTimeout)}finish(t=Bt()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter((e=>{if(e.spanId===this.spanId)return!0;e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const n=e.startTimestamp{this._finished||this._pushActivity(t)},n=t=>{this._finished||this._popActivity(t)};this.spanRecorder=new Ee(e,n,this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Se[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=Se[1],this.finish(t))}),this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=Bt();this._idleTimeoutCanceledPermanently?(this._finishReason=Se[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Se[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function ke(){const t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function Te(t,e,n){if(!he(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let s;return"function"==typeof e.tracesSampler?(s=e.tracesSampler(n),t.setMetadata({sampleRate:Number(s)})):void 0!==n.parentSampled?s=n.parentSampled:void 0!==e.tracesSampleRate?(s=e.tracesSampleRate,t.setMetadata({sampleRate:Number(s)})):(s=1,t.setMetadata({sampleRate:s})),function(t){if(u(t)||"number"!=typeof t&&"boolean"!=typeof t)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1;if(t<0||t>1)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1;return!0}(s)?s?(t.sampled=Math.random()`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}function Ae(t,e={}){const n="string"==typeof e?e:e.tunnel,s="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return n||`${function(t){return`${Ue(t)}${t.projectId}/envelope/`}(t)}?${Be(t,s)}`}const Oe=[];function Le(t){const e=t.defaultIntegrations||[],n=t.integrations;let s;e.forEach((t=>{t.isDefaultInstance=!0})),s=Array.isArray(n)?[...e,...n]:"function"==typeof n?mt(n(e)):e;const i=function(t){const e={};return t.forEach((t=>{const{name:n}=t,s=e[n];s&&!s.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)})),Object.keys(e).map((t=>e[t]))}(s),r=function(t,e){for(let n=0;n"Debug"===t.name));if(-1!==r){const[t]=i.splice(r,1);i.push(t)}return i}function Me(t,e){e[t.name]=t,-1===Oe.indexOf(t.name)&&(t.setupOnce(ie,le),Oe.push(t.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`Integration installed: ${t.name}`))}function Ge(t,e,n,s){const{normalizeDepth:i=3,normalizeMaxBreadth:r=1e3}=t,a={...e,event_id:e.event_id||n.event_id||ut(),timestamp:e.timestamp||Ut()},o=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:s,dist:i,maxValueLength:r=250}=e;"environment"in t||(t.environment="environment"in e?n:Qt);void 0===t.release&&void 0!==s&&(t.release=s);void 0===t.dist&&void 0!==i&&(t.dist=i);t.message&&(t.message=C(t.message,r));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=C(a.value,r));const o=t.request;o&&o.url&&(o.url=C(o.url,r))}(a,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(a,o),void 0===e.type&&function(t,e){const n=_._sentryDebugIds;if(!n)return;let s;const i=Ye.get(e);i?s=i:(s=new Map,Ye.set(e,s));const r=Object.keys(n).reduce(((t,i)=>{let r;const a=s.get(i);a?r=a:(r=e(i),s.set(i,r));for(let e=r.length-1;e>=0;e--){const s=r[e];if(s.filename){t[s.filename]=n[i];break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=r[t.filename])}))}))}catch(t){}}(a,t.stackParser);let c=s;n.captureContext&&(c=ne.clone(c).update(n.captureContext));let l=Et(a);if(c){if(c.getAttachments){const t=[...n.attachments||[],...c.getAttachments()];t.length&&(n.attachments=t)}l=c.applyToEvent(a,n)}return l.then((t=>(t&&function(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(t){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach((t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})}))}(t),"number"==typeof i&&i>0?function(t,e,n){if(!t)return null;const s={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:yt(t.data,e,n)}})))},...t.user&&{user:yt(t.user,e,n)},...t.contexts&&{contexts:yt(t.contexts,e,n)},...t.extra&&{extra:yt(t.extra,e,n)}};t.contexts&&t.contexts.trace&&s.contexts&&(s.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(s.contexts.trace.data=yt(t.contexts.trace.data,e,n)));t.spans&&(s.spans=t.spans.map((t=>(t.data&&(t.data=yt(t.data,e,n)),t))));return s}(t,i,r):t)))}const Ye=new WeakMap;const ze="Not capturing exception because it's already been captured.";class Pe{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(t){if(Pe.prototype.__init.call(this),Pe.prototype.__init2.call(this),Pe.prototype.__init3.call(this),Pe.prototype.__init4.call(this),Pe.prototype.__init5.call(this),this._options=t,t.dsn?this._dsn=x(t.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("No DSN provided, client will not do anything."),this._dsn){const e=Ae(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if(ft(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(ze));let s=e&&e.event_id;return this._process(this.eventFromException(t,e).then((t=>this._captureEvent(t,e,n))).then((t=>{s=t}))),s}captureMessage(t,e,n,s){let i=n&&n.event_id;const r=a(t)?this.eventFromMessage(String(t),e,n):this.eventFromException(t,n);return this._process(r.then((t=>this._captureEvent(t,n,s))).then((t=>{i=t}))),i}captureEvent(t,e,n){if(e&&e.originalException&&ft(e.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(ze));let s=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then((t=>{s=t}))),s}captureSession(t){this._isEnabled()?"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),ee(t,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?this._isClientDoneProcessing(t).then((n=>e.flush(t).then((t=>n&&t)))):Et(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,t)))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(t){const e={};return t.forEach((t=>{t&&Me(t,e)})),e}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){Me(t,this._integrations)}sendEvent(t,e={}){if(this._dsn){let n=function(t,e,n,s){const i=Ht(n),r=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const a=qt(t,i,s,e);return delete t.sdkProcessingMetadata,Mt(a,[[{type:r},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=Gt(n,$t(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(n);s&&s.then((e=>this.emit("afterSendEvent",t,e)),null)}}sendSession(t){if(this._dsn){const e=function(t,e,n,s){const i=Ht(n);return Mt({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!s&&{dsn:k(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach((t=>t(...e)))}_updateSessionFromEvent(t,e){let n=!1,s=!1;const i=e.exception&&e.exception.values;if(i){s=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const r="ok"===t.status;(r&&0===t.errors||r&&n)&&(ee(t,{...n&&{status:"crashed"},errors:t.errors||Number(s||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new kt((e=>{let n=0;const s=setInterval((()=>{0==this._numProcessing?(clearInterval(s),e(!0)):(n+=1,t&&n>=t&&(clearInterval(s),e(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(t,e,n){const s=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),Ge(s,t,e,n)}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then((t=>t.event_id),(t=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=t;"log"===e.logLevel?E.log(e.message):E.warn(e)}}))}_processEvent(t,e,n){const s=this.getOptions(),{sampleRate:i}=s;if(!this._isEnabled())return wt(new D("SDK not enabled, will not capture event.","log"));const r=Fe(t),a=$e(t),c=t.type||"error",u=`before send for type \`${c}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),wt(new D(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d="replay_event"===c?"replay":c;return this._prepareEvent(t,e,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",d,t),new D("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const i=function(t,e,n){const{beforeSend:s,beforeSendTransaction:i}=t;if($e(e)&&s)return s(e,n);if(Fe(e)&&i)return i(e,n);return e}(s,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(l(t))return t.then((t=>{if(!o(t)&&null!==t)throw new D(n);return t}),(t=>{throw new D(`${e} rejected with ${t}`)}));if(!o(t)&&null!==t)throw new D(n);return t}(i,u)})).then((s=>{if(null===s)throw this.recordDroppedEvent("before_send",d,t),new D(`${u} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!r&&i&&this._updateSessionFromEvent(i,s);const a=s.transaction_info;if(r&&a&&s.transaction!==t.transaction){const t="custom";s.transaction_info={...a,source:t}}return this.sendEvent(s,e),s})).then(null,(t=>{if(t instanceof D)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new D(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}_process(t){this._numProcessing++,t.then((t=>(this._numProcessing--,t)),(t=>(this._numProcessing--,t)))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,(t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("Error while sending event:",t)}));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map((e=>{const[n,s]=e.split(":");return{reason:n,category:s,quantity:t[e]}}))}}function $e(t){return void 0===t.type}function Fe(t){return"transaction"===t.type}function je(t,e,n=Tt(t.bufferSize||30)){let s={};function i(i){const r=[];if(Yt(i,((e,n)=>{const i=jt(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(s,i)){const s=He(e,n);t.recordDroppedEvent("ratelimit_backoff",i,s)}else r.push(e)})),0===r.length)return Et();const a=Mt(i[0],r),o=e=>{Yt(a,((n,s)=>{const i=He(n,s);t.recordDroppedEvent(e,jt(s),i)}))};return n.add((()=>e({body:Pt(a,t.textEncoder)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),s=function(t,{statusCode:e,headers:n},s=Date.now()){const i={...t},r=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(r)for(const t of r.trim().split(",")){const[e,n]=t.split(":",2),r=parseInt(e,10),a=1e3*(isNaN(r)?60:r);if(n)for(const t of n.split(";"))i[t]=s+a;else i.all=s+a}else a?i.all=s+Wt(a,s):429===e&&(i.all=s+6e4);return i}(s,t),t)),(t=>{throw o("network_error"),t})))).then((t=>t),(t=>{if(t instanceof D)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("Skipped sending event because buffer is full."),o("queue_overflow"),Et();throw t}))}return i.__sentry__baseTransport__=!0,{send:i,flush:t=>n.drain(t)}}function He(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}function qe(t,e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.info(`[Offline]: ${t}`,e)}function We(t){return e=>{const n=t(e),s=e.createStore?e.createStore(e):void 0;let i,r=5e3;function a(t,n,s){return i=["replay_event","replay_recording","client_report"],!Yt(t,((t,e)=>i.includes(e)))&&(!e.shouldStore||e.shouldStore(t,n,s));var i}function o(t){s&&(i&&clearTimeout(i),i=setTimeout((async()=>{i=void 0;const t=await s.pop();t&&(qe("Attempting to send previously queued event"),l(t).catch((t=>{qe("Failed to retry sending",t)})))}),t),"number"!=typeof i&&i.unref&&i.unref())}function c(){i||(o(r),r=Math.min(2*r,36e5))}async function l(t){try{const e=await n.send(t);let s=100;if(e)if(e.headers&&e.headers["retry-after"])s=Wt(e.headers["retry-after"]);else if((e.statusCode||0)>=400)return e;return o(s),r=5e3,e}catch(e){if(s&&await a(t,e,r))return await s.insert(t),c(),qe("Error sending. Event queued",e),{};throw e}}return e.flushAtStartup&&c(),{send:l,flush:t=>n.flush(t)}}}const Ze="7.57.0";let Ke;class Ve{constructor(){Ve.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Ve.id}setupOnce(){Ke=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=L(this)||this;return Ke.apply(e,t)}}catch(t){}}}Ve.__initStatic();const Xe=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Je=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class Qe{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Qe.id}constructor(t={}){this._options=t,Qe.prototype.__init.call(this)}setupOnce(t,e){const n=t=>{const n=e();if(n){const e=n.getIntegration(Qe);if(e){const s=n.getClient(),i=s?s.getOptions():{},r=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Xe],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:Je],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(e._options,i);return function(t,e){if(e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${ht(t)}`),!0;if(function(t,e){if(t.type||!e||!e.length)return!1;return function(t){if(t.message)return[t.message];if(t.exception){const{values:e}=t.exception;try{const{type:t="",value:n=""}=e&&e[e.length-1]||{};return[`${n}`,`${t}: ${n}`]}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error(`Cannot extract message for event ${ht(t)}`),[]}}return[]}(t).some((t=>U(t,e)))}(t,e.ignoreErrors))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ht(t)}`),!0;if(function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&U(n,e)}(t,e.ignoreTransactions))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ht(t)}`),!0;if(function(t,e){if(!e||!e.length)return!1;const n=tn(t);return!!n&&U(n,e)}(t,e.denyUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ht(t)}.\nUrl: ${tn(t)}`),!0;if(!function(t,e){if(!e||!e.length)return!0;const n=tn(t);return!n||U(n,e)}(t,e.allowUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ht(t)}.\nUrl: ${tn(t)}`),!0;return!1}(t,r)?null:t}}return t};n.id=this.name,t(n)}}function tn(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error(`Cannot extract url for event ${ht(t)}`),null}}Qe.__initStatic();var en=Object.freeze({__proto__:null,FunctionToString:Ve,InboundFilters:Qe});const nn=_;let sn=0;function rn(){return sn>0}function an(){sn++,setTimeout((()=>{sn--}))}function on(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(L(t))return t}catch(e){return t}const s=function(){const s=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=s.map((t=>on(t,e)));return t.apply(this,i)}catch(t){throw an(),Ie((n=>{n.addEventProcessor((t=>(e.mechanism&&(_t(t,void 0,void 0),pt(t,e.mechanism)),t.extra={...t.extra,arguments:s},t))),Ce(t)})),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e])}catch(t){}O(s,t),A(t,"__sentry_wrapped__",s);try{Object.getOwnPropertyDescriptor(s,"name").configurable&&Object.defineProperty(s,"name",{get:()=>t.name})}catch(t){}return s}function cn(t,e){const n=un(t,e),s={type:e&&e.name,value:hn(e)};return n.length&&(s.stacktrace={frames:n}),void 0===s.type&&""===s.value&&(s.value="Unrecoverable error caught"),s}function ln(t,e){return{exception:{values:[cn(t,e)]}}}function un(t,e){const n=e.stacktrace||e.stack||"",s=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(dn.test(t.message))return 1}return 0}(e);try{return t(n,s)}catch(t){}return[]}const dn=/Minified React error #\d+;/i;function hn(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function _n(t,e,n,s){const i=fn(t,e,n&&n.syntheticException||void 0,s);return pt(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Et(i)}function pn(t,e,n="info",s,i){const r=mn(t,e,s&&s.syntheticException||void 0,i);return r.level=n,s&&s.event_id&&(r.event_id=s.event_id),Et(r)}function fn(t,r,a,l,u){let d;if(s(r)&&r.error){return ln(t,r.error)}if(i(r)||n(r,"DOMException")){const e=r;if("stack"in r)d=ln(t,r);else{const n=e.name||(i(e)?"DOMError":"DOMException"),s=e.message?`${n}: ${e.message}`:n;d=mn(t,s,a,l),_t(d,s)}return"code"in e&&(d.tags={...d.tags,"DOMException.code":`${e.code}`}),d}if(e(r))return ln(t,r);if(o(r)||c(r)){return d=function(t,e,n,s){const i=le().getClient(),r=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:c(e)?e.constructor.name:s?"UnhandledRejection":"Error",value:gn(e,{isUnhandledRejection:s})}]},extra:{__serialized__:vt(e,r)}};if(n){const e=un(t,n);e.length&&(a.exception.values[0].stacktrace={frames:e})}return a}(t,r,a,u),pt(d,{synthetic:!0}),d}return d=mn(t,r,a,l),_t(d,`${r}`,void 0),pt(d,{synthetic:!0}),d}function mn(t,e,n,s){const i={message:e};if(s&&n){const s=un(t,n);s.length&&(i.exception={values:[{value:e,stacktrace:{frames:s}}]})}return i}function gn(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(M(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return C(n[0],e);for(let t=n.length;t>0;t--){const s=n.slice(0,t).join(", ");if(!(s.length>e))return t===n.length?s:C(s,e)}return""}(t),i=e?"promise rejection":"exception";if(s(t))return`Event \`ErrorEvent\` captured as ${i} with message \`${t.message}\``;if(c(t)){return`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${i}`}return`Object captured as ${i} with keys: ${n}`}const yn=1024,vn="Breadcrumbs";class bn{static __initStatic(){this.id=vn}__init(){this.name=bn.id}constructor(t){bn.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&tt("console",Sn),this.options.dom&&tt("dom",function(t){function e(e){let n,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>yn&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=yn),"string"==typeof s&&(s=[s]);try{const t=e.event;n=function(t){return!!t&&!!t.target}(t)?g(t.target,{keyAttrs:s,maxStringLength:i}):g(t,{keyAttrs:s,maxStringLength:i})}catch(t){n=""}0!==n.length&&le().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})}return e}(this.options.dom)),this.options.xhr&&tt("xhr",En),this.options.fetch&&tt("fetch",wn),this.options.history&&tt("history",kn)}addSentryBreadcrumb(t){this.options.sentry&&le().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ht(t)},{event:t})}}function Sn(t){for(let e=0;e{"hidden"===nn.document.visibilityState&&this._flushOutcomes()}))}eventFromException(t,e){return _n(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return pn(this._options.stackParser,t,e,n,this._options.attachStacktrace)}sendEvent(t,e){const n=this.getIntegrationById(vn);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(t),super.sendEvent(t,e)}captureUserFeedback(t){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("SDK not enabled, will not capture user feedback."));const e=Tn(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("Sending outcomes:",t);const e=(n=t,Mt((s=this._options.tunnel&&k(this._dsn))?{dsn:s}:{},[[{type:"client_report"},{timestamp:i||Ut(),discarded_events:n}]]));var n,s,i;this._sendEnvelope(e)}}let xn;function Dn(t,e=function(){if(xn)return xn;if(Z(nn.fetch))return xn=nn.fetch.bind(nn);const t=nn.document;let e=nn.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const s=n.contentWindow;s&&s.fetch&&(e=s.fetch),t.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return xn=e.bind(nn)}()){let n=0,s=0;return je(t,(function(i){const r=i.body.length;n+=r,s++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&s<15,...t.fetchOptions};try{return e(t.url,a).then((t=>(n-=r,s--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return xn=void 0,n-=r,s--,wt(t)}}))}function Cn(t){return je(t,(function(e){return new kt(((n,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&i.setRequestHeader(e,t.headers[e]);i.send(e.body)}))}))}const Nn="?";function In(t,e,n,s){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==s&&(i.colno=s),i}const Un=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Bn=/\((\S*)(?::(\d+))(?::(\d+))\)/,An=[30,t=>{const e=Un.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Bn.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=qn(e[1]||Nn,e[2]);return In(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],On=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ln=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Mn=[50,t=>{const e=On.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=Ln.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||Nn;return[n,t]=qn(n,t),In(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],Gn=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Yn=[40,t=>{const e=Gn.exec(t);return e?In(e[2],e[1]||Nn,+e[3],e[4]?+e[4]:void 0):void 0}],zn=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Pn=[10,t=>{const e=zn.exec(t);return e?In(e[2],e[3]||Nn,+e[1]):void 0}],$n=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Fn=[20,t=>{const e=$n.exec(t);return e?In(e[5],e[3]||e[4]||Nn,+e[1],+e[2]):void 0}],jn=[An,Mn,Yn],Hn=F(...jn),qn=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),s=-1!==t.indexOf("safari-web-extension");return n||s?[-1!==t.indexOf("@")?t.split("@")[0]:Nn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class Wn{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Wn.id}__init2(){this._installFunc={onerror:Zn,onunhandledrejection:Kn}}constructor(t){Wn.prototype.__init.call(this),Wn.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const n in t){const s=this._installFunc[n];s&&t[n]&&(e=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`Global Handler attached: ${e}`),s(),this._installFunc[n]=void 0)}var e}}function Zn(){tt("error",(t=>{const[e,n,i]=Jn();if(!e.getIntegration(Wn))return;const{msg:a,url:o,line:c,column:l,error:u}=t;if(rn()||u&&u.__sentry_own_request__)return;const d=void 0===u&&r(a)?function(t,e,n,i){const r=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let a=s(t)?t.message:t,o="Error";const c=a.match(r);c&&(o=c[1],a=c[2]);return Vn({exception:{values:[{type:o,value:a}]}},e,n,i)}(a,o,c,l):Vn(fn(n,u||a,void 0,i,!1),o,c,l);d.level="error",Xn(e,u,d,"onerror")}))}function Kn(){tt("unhandledrejection",(t=>{const[e,n,s]=Jn();if(!e.getIntegration(Wn))return;let i=t;try{"reason"in t?i=t.reason:"detail"in t&&"reason"in t.detail&&(i=t.detail.reason)}catch(t){}if(rn()||i&&i.__sentry_own_request__)return!0;const r=a(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:fn(n,i,void 0,s,!0);r.level="error",Xn(e,i,r,"onunhandledrejection")}))}function Vn(t,e,n,s){const i=t.exception=t.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},c=o.stacktrace=o.stacktrace||{},l=c.frames=c.frames||[],u=isNaN(parseInt(s,10))?void 0:s,d=isNaN(parseInt(n,10))?void 0:n,h=r(e)&&e.length>0?e:function(){try{return m.document.location.href}catch(t){return""}}();return 0===l.length&&l.push({colno:u,filename:h,function:"?",in_app:!0,lineno:d}),t}function Xn(t,e,n,s){pt(n,{handled:!1,type:s}),t.captureEvent(n,{originalException:e})}function Jn(){const t=le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}Wn.__initStatic();const Qn=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class ts{static __initStatic(){this.id="TryCatch"}__init(){this.name=ts.id}constructor(t){ts.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&B(nn,"setTimeout",es),this._options.setInterval&&B(nn,"setInterval",es),this._options.requestAnimationFrame&&B(nn,"requestAnimationFrame",ns),this._options.XMLHttpRequest&&"XMLHttpRequest"in nn&&B(XMLHttpRequest.prototype,"send",ss);const t=this._options.eventTarget;if(t){(Array.isArray(t)?t:Qn).forEach(is)}}}function es(t){return function(...e){const n=e[0];return e[0]=on(n,{mechanism:{data:{function:H(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function ns(t){return function(e){return t.apply(this,[on(e,{mechanism:{data:{function:"requestAnimationFrame",handler:H(t)},handled:!0,type:"instrument"}})])}}function ss(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&B(n,t,(function(e){const n={mechanism:{data:{function:t,handler:H(e)},handled:!0,type:"instrument"}},s=L(e);return s&&(n.mechanism.data.handler=H(s)),on(e,n)}))})),t.apply(this,e)}}function is(t){const e=nn,n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(B(n,"addEventListener",(function(e){return function(n,s,i){try{"function"==typeof s.handleEvent&&(s.handleEvent=on(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:H(s),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.apply(this,[n,on(s,{mechanism:{data:{function:"addEventListener",handler:H(s),target:t},handled:!0,type:"instrument"}}),i])}})),B(n,"removeEventListener",(function(t){return function(e,n,s){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,s)}catch(t){}return t.call(this,e,i,s)}})))}ts.__initStatic();class rs{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=rs.id}constructor(t={}){rs.prototype.__init.call(this),this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(){const t=le().getClient();t&&ie(((e,n)=>{const s=le().getIntegration(rs);return s?function(t,e,n,s,i){if(!(s.exception&&s.exception.values&&i&&d(i.originalException,Error)))return s;const r=as(t,n,i.originalException,e);return s.exception.values=[...r,...s.exception.values],s}(t.getOptions().stackParser,s._key,s._limit,e,n):e}))}}function as(t,e,n,s,i=[]){if(!d(n[s],Error)||i.length+1>=e)return i;const r=cn(t,n[s]);return as(t,e,n[s],s,[r,...i])}rs.__initStatic();class os{constructor(){os.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=os.id}setupOnce(){ie((t=>{if(le().getIntegration(os)){if(!nn.navigator&&!nn.location&&!nn.document)return t;const e=t.request&&t.request.url||nn.location&&nn.location.href,{referrer:n}=nn.document||{},{userAgent:s}=nn.navigator||{},i={...t.request&&t.request.headers,...n&&{Referer:n},...s&&{"User-Agent":s}},r={...t.request,...e&&{url:e},headers:i};return{...t,request:r}}return t}))}}os.__initStatic();class cs{constructor(){cs.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=cs.id}setupOnce(t,e){const n=t=>{if(t.type)return t;const n=e().getIntegration(cs);if(n){try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,s=e.message;if(!n&&!s)return!1;if(n&&!s||!n&&s)return!1;if(n!==s)return!1;if(!us(t,e))return!1;if(!ls(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=ds(e),s=ds(t);if(!n||!s)return!1;if(n.type!==s.type||n.value!==s.value)return!1;if(!us(t,e))return!1;if(!ls(t,e))return!1;return!0}(t,e))return!0;return!1}(t,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n._previousEvent=t}return n._previousEvent=t}return t};n.id=this.name,t(n)}}function ls(t,e){let n=hs(t),s=hs(e);if(!n&&!s)return!0;if(n&&!s||!n&&s)return!1;if(n=n,s=s,s.length!==n.length)return!1;for(let t=0;t{void 0!==t&&t!==e&&fs(le())}))}()}function fs(t){t.startSession({ignoreDuration:!0}),t.captureSession()}var ms=Object.freeze({__proto__:null,GlobalHandlers:Wn,TryCatch:ts,Breadcrumbs:bn,LinkedErrors:rs,HttpContext:os,Dedupe:cs});const gs=_,ys="sentryReplaySession",vs="Unable to send Replay",bs=15e4,Ss=5e3,Es=2e7;var ws;function ks(t){const e=null==t?void 0:t.host;return Boolean(e&&e.shadowRoot&&e.shadowRoot===t)}function Ts({maskInputOptions:t,tagName:e,type:n}){"option"===e.toLowerCase()&&(e="select");const s="string"==typeof n?n.toLowerCase():void 0;return t[e.toLowerCase()]||s&&t[s]||"password"===s||"input"===e&&!n&&t.text}function Rs({input:t,maskInputSelector:e,unmaskInputSelector:n,maskInputOptions:s,tagName:i,type:r,value:a,maskInputFn:o}){let c=a||"";return n&&t.matches(n)||(t.hasAttribute("data-rr-is-password")&&(r="password"),(Ts({maskInputOptions:s,tagName:i,type:r})||e&&t.matches(e))&&(c=o?o(c):"*".repeat(c.length))),c}!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"}(ws||(ws={}));const xs="__rrweb_original__";function Ds(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?e.toLowerCase():null}function Cs(t,e,n){return"string"==typeof n&&n.toLowerCase(),"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let Ns=1;const Is=new RegExp("[^a-z0-9-_:]");function Us(t){return t?t.replace(/[\S]/g,"*"):""}function Bs(t){try{const e=t.rules||t.cssRules;return e?Array.from(e).map(As).join(""):null}catch(t){return null}}function As(t){let e=t.cssText;if(function(t){return"styleSheet"in t}(t))try{e=Bs(t.styleSheet)||e}catch(t){}return Os(e)}function Os(t){if(t.indexOf(":")>-1){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}return t}let Ls,Ms;const Gs=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ys=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,zs=/^(data:)([^,]*),(.*)/i;function Ps(t,e){return(t||"").replace(Gs,((t,n,s,i,r,a)=>{const o=s||r||a,c=n||i||"";if(!o)return t;if(!Ys.test(o))return`url(${c}${o}${c})`;if(zs.test(o))return`url(${c}${o}${c})`;if("/"===o[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+o}${c})`;const l=e.split("/"),u=o.split("/");l.pop();for(const t of u)"."!==t&&(".."===t?l.pop():l.push(t));return`url(${c}${l.join("/")}${c})`}))}const $s=/^[^ \t\n\r\u000c]+/,Fs=/^[, \t\n\r\u000c]+/;function js(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function Hs(){const t=document.createElement("a");return t.href="",t.href}function qs(t,e,n,s,i,r,a,o){if(!i)return i;const c=s.toLowerCase(),l=n.toLowerCase();return"src"===c||"href"===c||"xlink:href"===c&&"#"!==i[0]?js(t,i):"background"!==c||"table"!==l&&"td"!==l&&"th"!==l?"srcset"===c?function(t,e){if(""===e.trim())return e;let n=0;function s(t){let s,i=t.exec(e.substring(n));return i?(s=i[0],n+=s.length,s):""}let i=[];for(;s(Fs),!(n>=e.length);){let r=s($s);if(","===r.slice(-1))r=js(t,r.substring(0,r.length-1)),i.push(r);else{let s="";r=js(t,r);let a=!1;for(;;){let t=e.charAt(n);if(""===t){i.push((r+s).trim());break}if(a)")"===t&&(a=!1);else{if(","===t){n+=1,i.push((r+s).trim());break}"("===t&&(a=!0)}s+=t,n+=1}}}return i.join(", ")}(t,i):"style"===c?Ps(i,Hs()):"object"===l&&"data"===c?js(t,i):r&&function(t,e,n,s){if(s&&t.matches(s))return!1;return["placeholder","title","aria-label"].indexOf(e)>-1||"input"===n&&"value"===e&&t.hasAttribute("type")&&["submit","button"].indexOf(t.getAttribute("type").toLowerCase())>-1}(e,c,l,a)?o?o(i):Us(i):i:js(t,i)}function Ws(t,e,n,s,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return Ws(t.parentNode,e,n,s,i);if(s&&(t.matches(s)||t.closest(s)))return!1;if(i)return!0;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;ne.href===t.href));let n=null;e&&(n=Bs(e)),n&&(delete T.rel,delete T.href,T._cssText=Ps(n,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=Bs(t.sheet);e&&(T._cssText=Ps(e,Hs()))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=Ds(e),s=Cs(e,k.toUpperCase(),n),i=t.checked;"submit"!==n&&"button"!==n&&s&&(T.value=Rs({input:e,type:n,tagName:k,value:s,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:p,maskInputFn:m})),i&&(T.checked=i)}if("option"===k&&(t.selected&&!p.select?T.selected=!0:delete T.selected),"canvas"===k&&v)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n0!==t)))return!1}return!0})(t)||(T.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){const e=t.toDataURL(g.type,g.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height;e!==n.toDataURL(g.type,g.quality)&&(T.rr_dataURL=e)}if("img"===k&&y){Ls||(Ls=s.createElement("canvas"),Ms=Ls.getContext("2d"));const e=t,n=e.crossOrigin;e.crossOrigin="anonymous";const i=()=>{try{Ls.width=e.naturalWidth,Ls.height=e.naturalHeight,Ms.drawImage(e,0,0),T.rr_dataURL=Ls.toDataURL(g.type,g.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}n?T.crossOrigin=n:delete T.crossOrigin};e.complete&&0!==e.naturalWidth?i():e.onload=i}if("audio"!==k&&"video"!==k||(T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop),e){const{width:e,height:n}=t.getBoundingClientRect();T={class:T.class,rr_width:`${e}px`,rr_height:`${n}px`}}return"iframe"!==k||b(T.src)||(t.contentDocument||(T.rr_src=T.src),delete T.src),{type:ws.Element,tagName:k,attributes:T,childNodes:[],isSVG:(w=t,Boolean("svg"===w.tagName||w.ownerSVGElement)||void 0),needBlock:e,rootId:S};case t.TEXT_NODE:const R=t.parentNode&&t.parentNode.tagName;let x=t.textContent;const D="STYLE"===R||void 0,C="SCRIPT"===R||void 0;if(D&&x){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(x=(E=t.parentNode.sheet).cssRules?Array.from(E.cssRules).map((t=>t.cssText?Os(t.cssText):"")).join(""):"")}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}x=Ps(x,Hs())}if(C&&(x="SCRIPT_PLACEHOLDER"),"TEXTAREA"===R&&x)x="";else if("OPTION"===R&&x){x=Rs({input:t.parentNode,type:null,tagName:R,value:x,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:p,maskInputFn:m})}else!D&&!C&&Ws(t,o,c,l,_)&&x&&(x=f?f(x):Us(x));return{type:ws.Text,textContent:x||"",isStyle:D,rootId:S};case t.CDATA_SECTION_NODE:return{type:ws.CDATA,textContent:"",rootId:S};case t.COMMENT_NODE:return{type:ws.Comment,textContent:t.textContent||"",rootId:S};default:return!1}var E,w}function Ks(t){return null==t?"":t.toLowerCase()}function Vs(t,e){const{doc:n,map:s,blockClass:i,blockSelector:r,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:h,unmaskInputSelector:_,maskAllText:p,maskInputOptions:f={},maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k=5e3,keepIframeSrcFn:T=(()=>!1)}=e;let{preserveWhiteSpace:R=!0}=e;const x=Zs(t,{doc:n,blockClass:i,blockSelector:r,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:d,maskInputSelector:h,unmaskInputSelector:_,maskAllText:p,maskInputOptions:f,maskTextFn:m,maskInputFn:g,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:T});if(!x)return console.warn(t,"not serialized"),null;let D;D="__sn"in t?t.__sn.id:!function(t,e){if(e.comment&&t.type===ws.Comment)return!0;if(t.type===ws.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&&(Ks(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ks(t.attributes.name)||"icon"===Ks(t.attributes.rel)||"apple-touch-icon"===Ks(t.attributes.rel)||"shortcut icon"===Ks(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Ks(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Ks(t.attributes.property).match(/^(og|twitter|fb):/)||Ks(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ks(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===Ks(t.attributes.name)||"googlebot"===Ks(t.attributes.name)||"bingbot"===Ks(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===Ks(t.attributes.name)||"generator"===Ks(t.attributes.name)||"framework"===Ks(t.attributes.name)||"publisher"===Ks(t.attributes.name)||"progid"===Ks(t.attributes.name)||Ks(t.attributes.property).match(/^article:/)||Ks(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===Ks(t.attributes.name)||"yandex-verification"===Ks(t.attributes.name)||"csrf-token"===Ks(t.attributes.name)||"p:domain_verify"===Ks(t.attributes.name)||"verify-v1"===Ks(t.attributes.name)||"verification"===Ks(t.attributes.name)||"shopify-checkout-api-token"===Ks(t.attributes.name)))return!0}}return!1}(x,y)&&(R||x.type!==ws.Text||x.isStyle||x.textContent.replace(/^\s+|\s+$/gm,"").length)?Ns++:-2;const C=Object.assign(x,{id:D});if(t.__sn=C,-2===D)return null;s[D]=t,E&&E(t);let N=!u;if(C.type===ws.Element&&(N=N&&!C.needBlock,delete C.needBlock,t.shadowRoot&&(C.isShadowHost=!0)),(C.type===ws.Document||C.type===ws.Element)&&N){y.headWhitespace&&x.type===ws.Element&&"head"===x.tagName&&(R=!1);const e={doc:n,map:s,blockClass:i,blockSelector:r,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u,inlineStylesheet:d,maskInputSelector:h,unmaskInputSelector:_,maskAllText:p,maskInputOptions:f,maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T};for(const n of Array.from(t.childNodes)){const t=Vs(n,e);t&&C.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 t=Vs(n,e);t&&(t.isShadow=!0,C.childNodes.push(t))}}return t.parentNode&&ks(t.parentNode)&&(C.isShadow=!0),C.type===ws.Element&&"iframe"===C.tagName&&function(t,e,n){const s=t.contentWindow;if(!s)return;let i,r=!1;try{i=s.document.readyState}catch(t){return}if("complete"!==i){const s=setTimeout((()=>{r||(e(),r=!0)}),n);return void t.addEventListener("load",(()=>{clearTimeout(s),r=!0,e()}))}const a="about:blank";s.location.href===a&&t.src!==a&&""!==t.src?t.addEventListener("load",e):setTimeout(e,0)}(t,(()=>{const e=t.contentDocument;if(e&&w){const n=Vs(e,{doc:e,map:s,blockClass:i,blockSelector:r,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputSelector:h,unmaskInputSelector:_,maskAllText:p,maskInputOptions:f,maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T});n&&w(t,n)}}),k),C}function Xs(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}var Js,Qs,ti,ei,ni,si;function ii(t,e,n=document){const s={capture:!0,passive:!0};return n.addEventListener(t,e,s),()=>n.removeEventListener(t,e,s)}!function(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"}(Js||(Js={})),function(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"}(Qs||(Qs={})),function(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"}(ti||(ti={})),function(t){t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2"}(ei||(ei={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange"}(ni||(ni={})),function(t){t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back"}(si||(si={}));const ri="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 ai={map:{},getId:()=>(console.error(ri),-1),getNode:()=>(console.error(ri),null),removeNodeFromMap(){console.error(ri)},has:()=>(console.error(ri),!1),reset(){console.error(ri)}};function oi(t,e,n={}){let s=null,i=0;return function(r){let a=Date.now();i||!1!==n.leading||(i=a);let o=e-(a-i),c=this,l=arguments;o<=0||o>e?(s&&(clearTimeout(s),s=null),i=a,t.apply(c,l)):s||!1===n.trailing||(s=setTimeout((()=>{i=!1===n.leading?0:Date.now(),s=null,t.apply(c,l)}),o))}}function ci(t,e,n,s,i=window){const r=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,s?n:{set(t){setTimeout((()=>{n.set.call(this,t)}),0),r&&r.set&&r.set.call(this,t)}}),()=>ci(t,e,r||{},!0)}function li(t,e,n){try{if(!(e in t))return()=>{};const s=t[e],i=n(s);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),t[e]=i,()=>{t[e]=s}}catch(t){return()=>{}}}function ui(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function di(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function hi(t,e,n,s){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let i=!1;const r=s&&t.matches(s);return"string"==typeof e?i=void 0!==t.closest?!r&&null!==t.closest("."+e):!r&&t.classList.contains(e):!r&&t.classList.forEach((t=>{e.test(t)&&(i=!0)})),!i&&n&&(i=t.matches(n)),!r&&i||hi(t.parentNode,e,n,s)}return t.nodeType,t.TEXT_NODE,hi(t.parentNode,e,n,s)}function _i(t){return"__sn"in t&&-2===t.__sn.id}function pi(t,e){if(ks(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||pi(t.parentNode,e))}function fi(t){return Boolean(t.changedTouches)}function mi(t){return"__sn"in t&&(t.__sn.type===ws.Element&&"iframe"===t.__sn.tagName)}function gi(t){return Boolean(null==t?void 0:t.shadowRoot)}function yi(t){return"__ln"in t}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ai=new Proxy(ai,{get:(t,e,n)=>("map"===e&&console.error(ri),Reflect.get(t,e,n))}));class vi{constructor(){this.length=0,this.head=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}`;function Si(t){return"__sn"in t}class Ei{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 vi,n=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},s=s=>{var i,r,a,o,c;const l=s.getRootNode?null===(i=s.getRootNode())||void 0===i?void 0:i.host:null;let u=l;for(;null===(a=null===(r=null==u?void 0:u.getRootNode)||void 0===r?void 0:r.call(u))||void 0===a?void 0:a.host;)u=(null===(c=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===c?void 0:c.host)||null;const d=!(this.doc.contains(s)||u&&this.doc.contains(u));if(!s.parentNode||d)return;const h=ks(s.parentNode)?this.mirror.getId(l):this.mirror.getId(s.parentNode),_=n(s);if(-1===h||-1===_)return e.addNode(s);let p=Vs(s,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{mi(t)&&this.iframeManager.addIframe(t),gi(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,document)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)}});p&&t.push({parentId:h,nextId:_,node:p})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)ki(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||s(t);for(const t of this.addedSet)Ti(this.droppedSet,t)||ki(this.removes,t,this.mirror)?Ti(this.movedSet,t)?s(t):this.droppedSet.add(t):s(t);let i=null;for(;e.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),s=n(i.value);-1!==e&&-1!==s&&(t=i)}if(!t)for(let s=e.length-1;s>=0;s--){const i=e.get(s);if(i){const e=this.mirror.getId(i.value.parentNode),s=n(i.value);if(-1!==e&&-1!==s){t=i;break}}}if(!t){for(;e.head;)e.removeNode(e.head.value);break}i=t.previous,e.removeNode(t.value),s(t.value)}const r={texts:this.texts.map((t=>({id:this.mirror.getId(t.node),value:t.value}))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>({id:this.mirror.getId(t.node),attributes:t.attributes}))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(r.texts.length||r.attributes.length||r.removes.length||r.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(r))},this.processMutation=t=>{if(!_i(t.target))switch(t.type){case"characterData":{const e=t.target.textContent;hi(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||e===t.oldValue||this.texts.push({value:Ws(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=e.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=Rs({input:e,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:e.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),hi(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===t.oldValue)return;let s=this.attributes.find((e=>e.node===t.target));if(s||(s={node:t.target,attributes:{}},this.attributes.push(s)),"type"===t.attributeName&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),"style"===t.attributeName){const n=this.doc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue),void 0!==s.attributes.style&&null!==s.attributes.style||(s.attributes.style={});try{const t=s.attributes.style;for(const s of Array.from(e.style)){const i=e.style.getPropertyValue(s),r=e.style.getPropertyPriority(s);i===n.style.getPropertyValue(s)&&r===n.style.getPropertyPriority(s)||(t[s]=""===r?i:[i,r])}for(const s of Array.from(n.style))""===e.style.getPropertyValue(s)&&(t[s]=!1)}catch(t){console.warn("[rrweb] Error when parsing update to style attribute:",t)}}else{const e=t.target;s.attributes[t.attributeName]=qs(this.doc,e,e.tagName,t.attributeName,n,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{const n=this.mirror.getId(e),s=ks(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);hi(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||_i(e)||(this.addedSet.has(e)?(wi(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||pi(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[bi(n,s)]?wi(this.movedSet,e):this.removes.push({parentId:s,id:n,isShadow:!!ks(t.target)||void 0})),this.mapRemoves.push(e))}))}},this.genAdds=(t,e)=>{if(!e||!hi(e,this.blockClass,this.blockSelector,this.unblockSelector)){if(Si(t)){if(_i(t))return;this.movedSet.add(t);let n=null;e&&Si(e)&&(n=e.__sn.id),n&&(this.movedMap[bi(t.__sn.id,n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);hi(t,this.blockClass,this.blockSelector,this.unblockSelector)||t.childNodes.forEach((t=>this.genAdds(t)))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].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 wi(t,e){t.delete(e),e.childNodes.forEach((e=>wi(t,e)))}function ki(t,e,n){const{parentNode:s}=e;if(!s)return!1;const i=n.getId(s);return!!t.some((t=>t.id===i))||ki(t,s,n)}function Ti(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Ti(t,n))}const Ri=t=>(...e)=>{try{return t(...e)}catch(t){try{t.__rrweb__=!0}catch(t){}throw t}},xi=[];function Di(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function Ci(t,e){var n,s;const i=new Ei;xi.push(i),i.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const a=null===(s=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===s?void 0:s.call(n,"MutationObserver");a&&window[a]&&(r=window[a]);const o=new r(Ri((e=>{t.onMutation&&!1===t.onMutation(e)||i.processMutations(e)})));return o.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ni({mouseInteractionCb:t,doc:e,mirror:n,blockClass:s,blockSelector:i,unblockSelector:r,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const o=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[];return Object.keys(ti).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==o[t])).forEach((a=>{const o=a.toLowerCase(),l=Ri((e=>a=>{const o=Di(a);if(hi(o,s,i,r))return;const c=fi(a)?a.changedTouches[0]:a;if(!c)return;const l=n.getId(o),{clientX:u,clientY:d}=c;Ri(t)({type:ti[e],id:l,x:u,y:d})})(a));c.push(ii(o,l,e))})),Ri((()=>{c.forEach((t=>t()))}))}function Ii({scrollCb:t,doc:e,mirror:n,blockClass:s,blockSelector:i,unblockSelector:r,sampling:a}){const o=oi((a=>{const o=Di(a);if(!o||hi(o,s,i,r))return;const c=n.getId(o);if(o===e){const n=e.scrollingElement||e.documentElement;Ri(t)({id:c,x:n.scrollLeft,y:n.scrollTop})}else Ri(t)({id:c,x:o.scrollLeft,y:o.scrollTop})}),a.scroll||100);return ii("scroll",Ri(o),e)}function Ui(t,e){const n=Object.assign({},t);return e||delete n.userTriggered,n}const Bi=["INPUT","TEXTAREA","SELECT"],Ai=new WeakMap;function Oi({inputCb:t,doc:e,mirror:n,blockClass:s,blockSelector:i,unblockSelector:r,ignoreClass:a,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:l,maskInputOptions:u,maskInputFn:d,sampling:h,userTriggeredOnInput:_}){function p(t){let n=Di(t);const h=n&&n.tagName,p=t.isTrusted;if("OPTION"===h&&(n=n.parentElement),!n||!h||Bi.indexOf(h)<0||hi(n,s,i,r))return;const m=n,g=Ds(m);if(m.classList.contains(a)||o&&m.matches(o))return;let y=Cs(m,h,g),v=!1;"radio"!==g&&"checkbox"!==g||(v=n.checked),function({tagName:t,type:e,maskInputOptions:n,maskInputSelector:s}){return s||Ts({maskInputOptions:n,tagName:t,type:e})}({maskInputOptions:u,maskInputSelector:c,tagName:h,type:g})&&(y=Rs({input:m,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:h,type:g,value:y,maskInputFn:d})),f(n,Ri(Ui)({text:y,isChecked:v,userTriggered:p},_));const b=n.name;"radio"===g&&b&&v&&e.querySelectorAll(`input[type="radio"][name="${b}"]`).forEach((t=>{if(t!==n){const e=Rs({input:t,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:h,type:g,value:Cs(t,h,g),maskInputFn:d});f(t,Ri(Ui)({text:e,isChecked:!v,userTriggered:!1},_))}}))}function f(e,s){const i=Ai.get(e);if(!i||i.text!==s.text||i.isChecked!==s.isChecked){Ai.set(e,s);const i=n.getId(e);t(Object.assign(Object.assign({},s),{id:i}))}}const m=("last"===h.input?["change"]:["input","change"]).map((t=>ii(t,Ri(p),e))),g=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),y=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...y.map((t=>ci(t[0],t[1],{set(){Ri(p)({target:this})}})))),Ri((()=>{m.forEach((t=>t()))}))}function Li(t){return function(t,e){if(Gi("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Gi("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Gi("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Gi("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else{const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function Mi(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){const{mutationCb:n,mousemoveCb:s,mouseInteractionCb:i,scrollCb:r,viewportResizeCb:a,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),n(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),s(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),i(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),r(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),a(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),o(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),c(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),l(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),d(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),h(...t)}}(t,e);const s=Ci(t,t.doc),i=function({mousemoveCb:t,sampling:e,doc:n,mirror:s}){if(!1===e.mousemove)return()=>{};const i="number"==typeof e.mousemove?e.mousemove:50,r="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let a,o=[];const c=oi((e=>{const n=Date.now()-a;Ri(t)(o.map((t=>(t.timeOffset-=n,t))),e),o=[],a=null}),r),l=oi((t=>{const e=Di(t),{clientX:n,clientY:i}=fi(t)?t.changedTouches[0]:t;a||(a=Date.now()),o.push({x:n,y:i,id:s.getId(e),timeOffset:Date.now()-a}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?Qs.Drag:t instanceof MouseEvent?Qs.MouseMove:Qs.TouchMove)}),i,{trailing:!1}),u=[ii("mousemove",Ri(l),n),ii("touchmove",Ri(l),n),ii("drag",Ri(l),n)];return Ri((()=>{u.forEach((t=>t()))}))}(t),r=Ni(t),a=Ii(t),o=function({viewportResizeCb:t}){let e=-1,n=-1;const s=oi((()=>{const s=ui(),i=di();e===s&&n===i||(Ri(t)({width:Number(i),height:Number(s)}),e=s,n=i)}),200);return ii("resize",Ri(s),window)}(t),c=Oi(t),l=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:s,mirror:i,sampling:r}){const a=a=>oi(Ri((r=>{const o=Di(r);if(!o||hi(o,e,n,s))return;const{currentTime:c,volume:l,muted:u}=o;t({type:a,id:i.getId(o),currentTime:c,volume:l,muted:u})})),r.media||500),o=[ii("play",a(0)),ii("pause",a(1)),ii("seeked",a(2)),ii("volumechange",a(3))];return Ri((()=>{o.forEach((t=>t()))}))}(t),u=function({styleSheetRuleCb:t,mirror:e},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:Ri(((n,s,i)=>{const[r,a]=i,o=e.getId(s.ownerNode);return-1!==o&&t({id:o,adds:[{rule:r,index:a}]}),n.apply(s,i)}))});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Ri(((n,s,i)=>{const[r]=i,a=e.getId(s.ownerNode);return-1!==a&&t({id:a,removes:[{index:r}]}),n.apply(s,i)}))});const r={};Yi("CSSGroupingRule")?r.CSSGroupingRule=n.CSSGroupingRule:(Yi("CSSMediaRule")&&(r.CSSMediaRule=n.CSSMediaRule),Yi("CSSConditionRule")&&(r.CSSConditionRule=n.CSSConditionRule),Yi("CSSSupportsRule")&&(r.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(r).forEach((([n,s])=>{a[n]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(a[n].insertRule,{apply:Ri(((n,s,i)=>{const[r,a]=i,o=e.getId(s.parentStyleSheet.ownerNode);return-1!==o&&t({id:o,adds:[{rule:r,index:[...Li(s),a||0]}]}),n.apply(s,i)}))}),s.prototype.deleteRule=new Proxy(a[n].deleteRule,{apply:Ri(((n,s,i)=>{const[r]=i,a=e.getId(s.parentStyleSheet.ownerNode);return-1!==a&&t({id:a,removes:[{index:[...Li(s),r]}]}),n.apply(s,i)}))})})),Ri((()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=i,Object.entries(r).forEach((([t,e])=>{e.prototype.insertRule=a[t].insertRule,e.prototype.deleteRule=a[t].deleteRule}))}))}(t,{win:n}),d=function({styleDeclarationCb:t,mirror:e},{win:n}){const s=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ri(((n,s,i)=>{var r,a;const[o,c,l]=i,u=e.getId(null===(a=null===(r=s.parentRule)||void 0===r?void 0:r.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==u&&t({id:u,set:{property:o,value:c,priority:l},index:Li(s.parentRule)}),n.apply(s,i)}))});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Ri(((n,s,i)=>{var r,a;const[o]=i,c=e.getId(null===(a=null===(r=s.parentRule)||void 0===r?void 0:r.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==c&&t({id:c,remove:{property:o},index:Li(s.parentRule)}),n.apply(s,i)}))}),Ri((()=>{n.CSSStyleDeclaration.prototype.setProperty=s,n.CSSStyleDeclaration.prototype.removeProperty=i}))}(t,{win:n}),h=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const s=[],i=new WeakMap,r=n.FontFace;n.FontFace=function(t,e,n){const s=new r(t,e,n);return i.set(s,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),s};const a=li(e.fonts,"add",(function(e){return function(n){return setTimeout((()=>{const e=i.get(n);e&&(t(e),i.delete(n))}),0),e.apply(this,[n])}}));return s.push((()=>{n.FontFace=r})),s.push(a),Ri((()=>{s.forEach((t=>t()))}))}(t):()=>{},_=[];for(const e of t.plugins)_.push(e.observer(e.callback,n,e.options));return Ri((()=>{xi.forEach((t=>t.reset())),s.disconnect(),i(),r(),a(),o(),c(),l();try{u(),d()}catch(t){}h(),_.forEach((t=>t()))}))}function Gi(t){return void 0!==window[t]}function Yi(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class zi{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n;this.mutationCb({adds:[{parentId:t.__sn.id,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,t)}}class Pi{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const e=this;this.restorePatches.push(li(HTMLElement.prototype,"attachShadow",(function(t){return function(){const n=t.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}addShadowRoot(t,e){Ci(Object.assign(Object.assign({},this.bypassOptions),{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Ii(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const e=this;this.restorePatches.push(li(t.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){const s=n.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,t.contentDocument),s}})))}}reset(){this.restorePatches.forEach((t=>t()))}}for(var $i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fi="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ji=0;ji<$i.length;ji++)Fi[$i.charCodeAt(ji)]=ji;const Hi=new Map;const qi=(t,e,n)=>{if(!t||!Ki(t,e)&&"object"!=typeof t)return;const s=function(t,e){let n=Hi.get(t);return n||(n=new Map,Hi.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let i=s.indexOf(t);return-1===i&&(i=s.length,s.push(t)),i};function Wi(t,e,n){if(t instanceof Array)return t.map((t=>Wi(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 e,n=new Uint8Array(t),s=n.length,i="";for(e=0;e>2],i+=$i[(3&n[e])<<4|n[e+1]>>4],i+=$i[(15&n[e+1])<<2|n[e+2]>>6],i+=$i[63&n[e+2]];return s%3==2?i=i.substring(0,i.length-1)+"=":s%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(t);return{rr_type:e,base64:n}}if(t instanceof DataView){return{rr_type:t.constructor.name,args:[Wi(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 ImageData){return{rr_type:t.constructor.name,args:[Wi(t.data,e,n),t.width,t.height]}}if(Ki(t,e)||"object"==typeof t){return{rr_type:t.constructor.name,index:qi(t,e,n)}}return t}const Zi=(t,e,n)=>[...t].map((t=>Wi(t,e,n))),Ki=(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 Vi(t,e,n,s,i,r,a,o){const c=[],l=Object.getOwnPropertyNames(t);for(const u of l)try{if("function"!=typeof t[u])continue;const l=li(t,u,(function(c){return function(...l){const d=c.apply(this,l);if(qi(d,o,t),!hi(this.canvas,s,r,i)){a.getId(this.canvas);const s=Zi([...l],o,t),i={type:e,property:u,args:s};n(this.canvas,i)}return d}}));c.push(l)}catch(s){const i=ci(t,u,{set(t){n(this.canvas,{type:e,property:u,args:[t],setter:!0})}});c.push(i)}return c}class Xi{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(t,e){!(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)},this.mutationCb=t.mutationCb,this.mirror=t.mirror,!0===t.recordCanvas&&this.initCanvasMutationObserver(t.win,t.blockClass,t.blockSelector,t.unblockSelector)}initCanvasMutationObserver(t,e,n,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=function(t,e,n,s){const i=[];try{const r=li(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(i,...r){return hi(this,e,n,s)||"__context"in this||(this.__context=i),t.apply(this,[i,...r])}}));i.push(r)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach((t=>t()))}}(t,e,s,n),r=function(t,e,n,s,i,r){const a=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const r of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[r])continue;const o=li(e.CanvasRenderingContext2D.prototype,r,(function(e){return function(...a){return hi(this.canvas,n,i,s)||setTimeout((()=>{const e=[...a];if("drawImage"===r&&e[0]&&e[0]instanceof HTMLCanvasElement){const t=e[0],n=t.getContext("2d");let s=null==n?void 0:n.getImageData(0,0,t.width,t.height),i=null==s?void 0:s.data;e[0]=JSON.stringify(i)}t(this.canvas,{type:ei["2D"],property:r,args:e})}),0),e.apply(this,a)}}));a.push(o)}catch(n){const s=ci(e.CanvasRenderingContext2D.prototype,r,{set(e){t(this.canvas,{type:ei["2D"],property:r,args:[e],setter:!0})}});a.push(s)}return()=>{a.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,s,n,this.mirror),a=function(t,e,n,s,i,r){const a=[];return a.push(...Vi(e.WebGLRenderingContext.prototype,ei.WebGL,t,n,s,i,r,e)),void 0!==e.WebGL2RenderingContext&&a.push(...Vi(e.WebGL2RenderingContext.prototype,ei.WebGL2,t,n,s,i,r,e)),()=>{a.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,s,n,this.mirror);this.resetObservers=()=>{i(),r(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const s=n.map((t=>{const e=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(t);it&&t.__sn?t.__sn.id:-1,getNode(t){return this.map[t]||null},removeNodeFromMap(t){const e=t.__sn&&t.__sn.id;delete this.map[e],t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))},has(t){return this.map.hasOwnProperty(t)},reset(){this.map={}}};function nr(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:r=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:h=null,unmaskInputSelector:_=null,inlineStylesheet:p=!0,maskAllText:f=!1,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskInputFn:v,maskTextFn:b,hooks:S,packFn:E,sampling:w={},mousemoveWait:k,recordCanvas:T=!1,userTriggeredOnInput:R=!1,collectFonts:x=!1,inlineImages:D=!1,plugins:C,keepIframeSrcFn:N=(()=>!1),onMutation:I}=t;if(!e)throw new Error("emit function is required");void 0!==k&&void 0===w.mousemove&&(w.mousemove=k);const U=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},B=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let A;!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=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let O=0;Qi=(t,i)=>{var r;if(!(null===(r=xi[0])||void 0===r?void 0:r.isFrozen())||t.type===Js.FullSnapshot||t.type===Js.IncrementalSnapshot&&t.data.source===Qs.Mutation||xi.forEach((t=>t.unfreeze())),e((t=>{for(const e of C||[])e.eventProcessor&&(t=e.eventProcessor(t));return E&&(t=E(t)),t})(t),i),t.type===Js.FullSnapshot)A=t,O=0;else if(t.type===Js.IncrementalSnapshot){if(t.data.source===Qs.Mutation&&t.data.isAttachIframe)return;O++;const e=s&&O>=s,i=n&&t.timestamp-A.timestamp>n;(e||i)&&tr(!0)}};const L=t=>{Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.Mutation},t)}))},M=t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.Scroll},t)})),G=t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.CanvasMutation},t)})),Y=new zi({mutationCb:L}),z=new Xi({recordCanvas:T,mutationCb:G,win:window,blockClass:i,blockSelector:r,unblockSelector:a,mirror:er}),P=new Pi({mutationCb:L,scrollCb:M,bypassOptions:{onMutation:I,blockClass:i,blockSelector:r,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:h,maskInputSelector:d,unmaskInputSelector:_,inlineStylesheet:p,maskAllText:f,maskInputOptions:U,maskTextFn:b,maskInputFn:v,recordCanvas:T,inlineImages:D,sampling:w,slimDOMOptions:B,iframeManager:Y,canvasManager:z},mirror:er});tr=(t=!1)=>{var e,n,s,o;Qi(Ji({type:Js.Meta,data:{href:window.location.href,width:di(),height:ui()}}),t),xi.forEach((t=>t.lock()));const[c,m]=function(t,e){const{blockClass:n="rr-block",blockSelector:s=null,unblockSelector:i=null,maskTextClass:r="rr-mask",maskTextSelector:a=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:h=null,maskAllText:_=!1,maskAllInputs:p=!1,maskTextFn:f,maskInputFn:m,slimDOM:g=!1,dataURLOptions:y,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:E,keepIframeSrcFn:w=(()=>!1)}=e||{},k={};return[Vs(t,{doc:t,map:k,blockClass:n,blockSelector:s,unblockSelector:i,maskTextClass:r,maskTextSelector:a,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:h,maskAllText:_,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===p?{}:p,maskTextFn:f,maskInputFn:m,slimDOMOptions:!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===g,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===g?{}:g,dataURLOptions:y,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:E,keepIframeSrcFn:w}),k]}(document,{blockClass:i,blockSelector:r,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:h,maskInputSelector:d,unmaskInputSelector:_,inlineStylesheet:p,maskAllText:f,maskAllInputs:U,maskTextFn:b,slimDOM:B,recordCanvas:T,inlineImages:D,onSerialize:t=>{mi(t)&&Y.addIframe(t),gi(t)&&P.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{Y.attachIframe(t,e),P.observeAttachShadow(t)},keepIframeSrcFn:N});if(!c)return console.warn("Failed to snapshot the document");er.map=m,Qi(Ji({type:Js.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),xi.forEach((t=>t.unlock()))};try{const t=[];t.push(ii("DOMContentLoaded",(()=>{Qi(Ji({type:Js.DomContentLoaded,data:{}}))})));const e=t=>{var e;return Ri(Mi)({onMutation:I,mutationCb:L,mousemoveCb:(t,e)=>Qi(Ji({type:Js.IncrementalSnapshot,data:{source:e,positions:t}})),mouseInteractionCb:t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.MouseInteraction},t)})),scrollCb:M,viewportResizeCb:t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.ViewportResize},t)})),inputCb:t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.Input},t)})),mediaInteractionCb:t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.MediaInteraction},t)})),styleSheetRuleCb:t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.StyleSheetRule},t)})),styleDeclarationCb:t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.StyleDeclaration},t)})),canvasMutationCb:G,fontCb:t=>Qi(Ji({type:Js.IncrementalSnapshot,data:Object.assign({source:Qs.Font},t)})),blockClass:i,ignoreClass:o,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:h,maskInputSelector:d,unmaskInputSelector:_,maskInputOptions:U,inlineStylesheet:p,sampling:w,recordCanvas:T,inlineImages:D,userTriggeredOnInput:R,collectFonts:x,doc:t,maskAllText:f,maskInputFn:v,maskTextFn:b,blockSelector:r,unblockSelector:a,slimDOMOptions:B,mirror:er,iframeManager:Y,shadowDomManager:P,canvasManager:z,plugins:(null===(e=null==C?void 0:C.filter((t=>t.observer)))||void 0===e?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Qi(Ji({type:Js.Plugin,data:{plugin:t.name,payload:e}}))}))))||[]},S)};Y.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}}));const n=()=>{tr(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():t.push(ii("load",(()=>{Qi(Ji({type:Js.Load,data:{}})),n()}),window)),()=>{t.forEach((t=>t()))}}catch(t){console.warn(t)}}function sr(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate((()=>(t.throttledAddEvent({type:Js.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:yt(e,10,1e3)}}),"console"===e.category))))}nr.addCustomEvent=(t,e)=>{if(!Qi)throw new Error("please add custom event after start recording");Qi(Ji({type:Js.Custom,data:{tag:t,payload:e}}))},nr.freezePage=()=>{xi.forEach((t=>t.freeze()))},nr.takeFullSnapshot=t=>{if(!tr)throw new Error("please take full snapshot after start recording");tr(t)},nr.mirror=er;function ir(t){const e=rr(t);if(!(e&&e instanceof Element))return e;return e.closest("button,a")||e}function rr(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let ar;function or(t){return ar||(ar=[],B(gs,"open",(function(t){return function(...e){if(ar)try{ar.forEach((t=>t()))}catch(t){}return t.apply(gs,e)}}))),ar.push(t),()=>{const e=ar?ar.indexOf(t):-1;e>-1&&ar.splice(e,1)}}class cr{__init(){this._lastMutation=0}__init2(){this._lastScroll=0}__init3(){this._clicks=[]}constructor(t,e,n=sr){cr.prototype.__init.call(this),cr.prototype.__init2.call(this),cr.prototype.__init3.call(this),this._timeout=e.timeout/1e3,this._multiClickTimeout=e.multiClickTimeout/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=ur()},e=or((()=>{this._lastMutation=ur()})),n=t=>{if(!t.target)return;const e=ir(t);e&&this._handleMultiClick(e)},s=new MutationObserver((()=>{this._lastMutation=ur()}));s.observe(gs.document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),gs.addEventListener("scroll",t,{passive:!0}),gs.addEventListener("click",n,{passive:!0}),this._teardown=()=>{gs.removeEventListener("scroll",t),gs.removeEventListener("click",n),e(),s.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(!lr.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;if(this._getClick(e))return;const n={timestamp:t.timestamp,clickBreadcrumb:t,clickCount:0,node:e};this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks()}_handleMultiClick(t){const e=this._getClick(t);e&&e.clickCount++}_getClick(t){const e=ur();return this._clicks.find((n=>n.node===t&&e-n.timestamp{!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);const s=n.scrollAfter||n.mutationAfter||0;(s&&s>=this._multiClickTimeout||n.timestamp+this._timeout<=e)&&t.push(n)}));for(const e of t){this._generateBreadcrumbs(e);const t=this._clicks.indexOf(e);-1!==t&&this._clicks.splice(t,1)}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!n&&!s,{clickCount:r,clickBreadcrumb:a}=t;if(i){const n=1e3*Math.min(t.mutationAfter||this._timeout,this._timeout),s=n<1e3*this._timeout?"mutation":"timeout",i={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:gs.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:s,clickCount:r||1}};this._addBreadcrumbEvent(e,i)}else if(r>1){const t={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:gs.location.href,route:e.getCurrentRoute(),clickCount:r,metric:!0}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const lr=["A","BUTTON","INPUT"];function ur(){return Date.now()/1e3}function dr(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var hr;!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"}(hr||(hr={}));const _r=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled"]);function pr(t){const e={};for(const n in t)if(_r.has(n)){let s=n;"data-testid"!==n&&"data-test-id"!==n||(s="testId"),e[s]=t[n]}return e}const fr=t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,s=null;try{s=e?ir(t.event):rr(t.event),n=g(s,{maxStringLength:200})||""}catch(t){n=""}return{target:s,message:n}}(t);return dr({category:`ui.${t.name}`,...mr(e,n)})}(e);if(!n)return;const s="click"===e.name,i=s&&e.event;var r,a,o;s&&t.clickDetector&&i&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&(r=t.clickDetector,a=n,o=ir(e.event),r.handleClick(a,o)),sr(t,n)};function mr(t,e){const n=t&&"__sn"in t&&t.__sn.type===hr.Element?t.__sn:null;return{message:e,data:n?{nodeId:n.id,node:{id:n.id,tagName:n.tagName,textContent:t?Array.from(t.childNodes).map((t=>"__sn"in t&&t.__sn.type===hr.Text&&t.__sn.textContent)).filter(Boolean).map((t=>t.trim())).join(""):"",attributes:pr(n.attributes)}}:{}}}function gr(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:s,altKey:i,key:r,target:a}=t;if(!a||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(a)||!r)return null;const o=e||s||i,c=1===r.length;if(!o&&c)return null;const l=g(a,{maxStringLength:200})||"",u=mr(a,l);return dr({category:"ui.keyDown",message:l,data:{...u.data,metaKey:e,shiftKey:n,ctrlKey:s,altKey:i,key:r}})}(e);n&&sr(t,n)}const yr=["name","type","startTime","transferSize","duration"];function vr(t){return function(e){return yr.every((n=>t[n]===e[n]))}}function br(t){const e=new PerformanceObserver((e=>{const n=function(t,e){const[n,s,i]=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)),[[],[],[]]),r=[],a=[];let o=s.length?s[s.length-1]:void 0;return e.forEach((t=>{if("largest-contentful-paint"!==t.entryType)if("navigation"!==t.entryType)r.push(t);else{const e=t;t.duration>0&&!n.find(vr(e))&&!a.find(vr(e))&&a.push(e)}else(!o||o.startTimet.startTime-e.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 Sr(t){return t>9999999999?t:1e3*t}class Er extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class wr{__init(){this._totalSize=0}constructor(){wr.prototype.__init.call(this),this.events=[]}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>Es)throw new Er;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}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];return t?Sr(t):null}}class kr{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((t,e)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?t():e()}),{once:!0}),this._worker.addEventListener("error",(t=>{e(t)}),{once:!0})}))),this._ensureReadyPromise}destroy(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise(((s,i)=>{const r=({data:e})=>{const a=e;if(a.method===t&&a.id===n){if(this._worker.removeEventListener("message",r),!a.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("[Replay]",a.response),void i(new Error("Error in compression worker"));s(a.response)}};this._worker.addEventListener("message",r),this._worker.postMessage({id:n,method:t,arg:e})}))}_getAndIncrementId(){return this._id++}}class Tr{__init(){this._totalSize=0}constructor(t){Tr.prototype.__init.call(this),this._worker=new kr(t),this._earliestTimestamp=null}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=Sr(t.timestamp);(!this._earliestTimestamp||eEs?Promise.reject(new Er):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this._worker.postMessage("clear")}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Rr{constructor(t){this._fallback=new wr,this._compression=new Tr(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}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(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Replay] Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t}=this._fallback,e=[];for(const n of t)e.push(this._compression.addEvent(n));this._used=this._compression;try{await Promise.all(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("[Replay] Failed to add events when switching buffers.",t)}}}function xr({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)}();("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Replay] Using compression worker");const e=new Worker(t);return new Rr(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Replay] Failed to create compression worker")}return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Replay] Using simple buffer"),new wr}function Dr(){return"sessionStorage"in gs&&!!gs.sessionStorage}function Cr(t){!function(){if(!Dr())return;try{gs.sessionStorage.removeItem(ys)}catch(t){}}(),t.session=void 0}function Nr(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function Ir(t,e,n=+new Date){return Nr(t.started,e.maxSessionLife,n)||Nr(t.lastActivity,e.sessionIdleExpire,n)}function Ur(t){return void 0!==t&&Math.random(){if(!Gr(n)&&!Yr(n))return;const i=s&&s.statusCode;e&&(!i||i<200||i>=300)||(Yr(n)&&n.contexts&&n.contexts.trace&&n.contexts.trace.trace_id?t.getContext().traceIds.add(n.contexts.trace.trace_id):Gr(n)&&(n.event_id&&t.getContext().errorIds.add(n.event_id),"buffer"===t.recordingMode&&n.tags&&n.tags.replayId&&setTimeout((()=>{t.sendBufferedReplayOrFlush()}))))}}function Pr(t,e=!1){const n=e?zr(t):void 0;return(e,s)=>{if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!Gr(e)&&!Yr(e))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,s)&&!t.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Replay] Ignoring error from rrweb internals",e),null;const i=function(t,e){return"buffer"===t.recordingMode&&e.message!==vs&&!(!e.exception||e.type)&&Ur(t.getOptions().errorSampleRate)}(t,e);return(i||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),n&&n(e,{statusCode:200}),e}}function $r(t,e){return e.map((({type:e,start:n,end:s,name:i,data:r})=>{const a=t.throttledAddEvent({type:Js.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:s,data:r}}});return"string"==typeof a?Promise.resolve(null):a}))}function Fr(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,s=Date.now()/1e3;return{type:"navigation.push",start:s,end:s,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate((()=>($r(t,[n]),!1))))}}function jr(t,e){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!t.getOptions()._experiments.traceInternals)&&function(t){const e=le().getClient(),n=e&&e.getDsn();return!!n&&t.includes(n.host)}(e)}function Hr(t,e){t.isEnabled()&&null!==e&&(jr(t,e.name)||t.addUpdate((()=>($r(t,[e]),!0))))}const qr=10,Wr=11,Zr=12,Kr=13,Vr=14,Xr=15,Jr=20,Qr=21,ta=22,ea=23,na=["true","false","null"];function sa(t,e){if(!e.length)return t;let n=t;const s=e.length-1;n=function(t,e){switch(e){case qr:return`${t}"~~":"~~"`;case 11:return`${t}:"~~"`;case 12:return`${t}~~":"~~"`;case Kr:return function(t){const e=t.lastIndexOf(":"),n=t.slice(e+1);if(na.includes(n.trim()))return`${t},"~~":"~~"`;return`${t.slice(0,e+1)}"~~"`}(t);case 14:return`${t}~~"`;case Xr:return`${t},"~~":"~~"`;case Jr:return`${t}"~~"`;case Qr:return function(t){const e=function(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(","===n||"["===n)return e}return-1}(t);if(e>-1){const n=t.slice(e+1);return na.includes(n.trim())?`${t},"~~"`:`${t.slice(0,e+1)}"~~"`}return t}(t);case 22:return`${t}~~"`;case ea:return`${t},"~~"`}return t}(n,e[s]);for(let t=s;t>=0;t--){switch(e[t]){case qr:n=`${n}}`;break;case Jr:n=`${n}]`}}return n}function ia(t,e,n){const s=t[t.length-1],i=e[n];if(!/\s/.test(i))if('"'!==i||ra(e,n))switch(i){case"{":!function(t,e){if(!e)return void t.push(qr);if(e===Kr)return void t.push(qr);e===Qr&&t.push(qr);if(e===Jr)t.push(qr)}(t,s);break;case"[":!function(t,e){if(!e)return t.push(Jr),void t.push(Qr);if(e===Kr)return t.push(Jr),void t.push(Qr);e===Qr&&(t.push(Jr),t.push(Qr));if(e===Jr)t.push(Jr),t.push(Qr)}(t,s);break;case":":!function(t,e){e===Wr&&(t.pop(),t.push(Kr))}(t,s);break;case",":!function(t,e){if(e===Kr)return void t.pop();if(e===Xr)return t.pop(),void t.pop();if(e===Qr)return;if(e===ea)t.pop()}(t,s);break;case"}":!function(t,e){e===qr&&t.pop();e===Kr&&(t.pop(),t.pop());e===Xr&&(t.pop(),t.pop(),t.pop());t[t.length-1]===Kr&&t.push(Xr);t[t.length-1]===Qr&&t.push(ea)}(t,s);break;case"]":!function(t,e){e===Jr&&t.pop();e===Qr&&(t.pop(),t.pop());e===ea&&(t.pop(),t.pop(),t.pop());t[t.length-1]===Kr&&t.push(Xr);t[t.length-1]===Qr&&t.push(ea)}(t,s)}else!function(t,e){if(e===Vr)return t.pop(),void t.push(Xr);if(e===ta)return t.pop(),void t.push(ea);if(e===Kr)return void t.push(Vr);if(e===Qr)return void t.push(ta);if(e===qr)return void t.push(Zr);if(e===Zr)t.pop(),t.push(11)}(t,s)}function ra(t,e){return"\\"===t[e-1]&&!ra(t,e-1)}function aa(t){return sa(t,function(t){const e=[];for(let n=0;nbs;if(function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t))try{const n=e?aa(t.slice(0,bs)):t;return{body:JSON.parse(n),warnings:e?["JSON_TRUNCATED"]:[]}}catch(n){return{body:e?`${t.slice(0,bs)}…`:t,warnings:e?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:e?`${t.slice(0,bs)}…`:t,warnings:e?["TEXT_TRUNCATED"]:[]}}(n);return s.body=i,r.length>0&&(s._meta={warnings:r}),s}function _a(t,e){return Object.keys(t).reduce(((n,s)=>{const i=s.toLowerCase();return e.includes(i)&&t[s]&&(n[i]=t[s]),n}),{})}function pa(t){return new URLSearchParams(t).toString()}function fa(t,e){const n=function(t,e=gs.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(gs.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const s=n.href;if(!t.endsWith("/")&&s.endsWith("/"))return s.slice(0,-1);return s}(t);return U(n,e)}async function ma(t,e,n){try{const s=await async function(t,e,n){const{startTimestamp:s,endTimestamp:i}=e,{url:r,method:a,status_code:o=0,request_body_size:c,response_body_size:l}=t.data,u=fa(r,n.networkDetailAllowUrls),d=u?function({networkCaptureBodies:t,networkRequestHeaders:e},n,s){const i=function(t,e){if(1===t.length&&"string"!=typeof t[0])return va(t[0],e);if(2===t.length)return va(t[1],e);return{}}(n,e);if(!t)return ha(i,s,void 0);const r=la(ga(n));return ha(i,s,r)}(n,e.input,c):da(c),h=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:s},i,r){if(!t&&void 0!==r)return da(r);const a=ya(i.headers,s);if(!e&&void 0!==r)return ha(a,r,void 0);try{const s=i.clone(),o=await async function(t){try{return await t.text()}catch(t){return}}(s),c=o&&o.length&&void 0===r?oa(o,n):r;return t?ha(a,c,e?o:void 0):da(c)}catch(t){return ha(a,r,void 0)}}(u,n,e.response,l);return{startTimestamp:s,endTimestamp:i,url:r,method:a,statusCode:o,request:d,response:h}}(t,e,n),i=ua("resource.fetch",s);Hr(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("[Replay] Failed to capture fetch breadcrumb",t)}}function ga(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function ya(t,e){const n={};return e.forEach((e=>{t.get(e)&&(n[e]=t.get(e))})),n}function va(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?ya(n,e):Array.isArray(n)?{}:_a(n,e):{}}async function ba(t,e,n){try{const s=function(t,e,n){const{startTimestamp:s,endTimestamp:i,input:r,xhr:a}=e,{url:o,method:c,status_code:l=0,request_body_size:u,response_body_size:d}=t.data;if(!o)return null;if(!fa(o,n.networkDetailAllowUrls)){return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:l,request:da(u),response:da(d)}}const h=a.__sentry_xhr_v2__,_=h?_a(h.request_headers,n.networkRequestHeaders):{},p=_a(function(t){const e=t.getAllResponseHeaders();if(!e)return{};return e.split("\r\n").reduce(((t,e)=>{const[n,s]=e.split(": ");return t[n.toLowerCase()]=s,t}),{})}(a),n.networkResponseHeaders),f=ha(_,u,n.networkCaptureBodies?la(r):void 0),m=ha(p,d,n.networkCaptureBodies?e.xhr.responseText:void 0);return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:l,request:f,response:m}}(t,e,n),i=ua("resource.xhr",s);Hr(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("[Replay] Failed to capture fetch breadcrumb",t)}}function Sa(t){const e=le().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:s,networkCaptureBodies:i,networkRequestHeaders:r,networkResponseHeaders:a}=t.getOptions(),o={replay:t,textEncoder:n,networkDetailAllowUrls:s,networkCaptureBodies:i,networkRequestHeaders:r,networkResponseHeaders:a};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:s,input:i}=e,r=oa(i,n.textEncoder),a=s.getResponseHeader("content-length")?ca(s.getResponseHeader("content-length")):oa(s.response,n.textEncoder);void 0!==r&&(t.data.request_body_size=r),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),ba(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(!function(t,e,n){const{input:s,response:i}=e,r=oa(ga(s),n.textEncoder),a=i?ca(i.headers.get("content-length")):void 0;void 0!==r&&(t.data.request_body_size=r),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),ma(e,n,t))}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Error when enriching network breadcrumb")}}(o,t,e))):(tt("fetch",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:s,response:i}=t;if(!n)return null;const{method:r,url:a}=s;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:a,data:{method:r,statusCode:i?i.status:void 0}}}(e);Hr(t,n)}}(t)),tt("xhr",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:s}=t,i=s.__sentry_xhr_v2__;if(!e||!n||!i)return null;const{method:r,url:a,status_code:o}=i;return void 0===a?null:{type:"resource.xhr",name:a,start:e/1e3,end:n/1e3,data:{method:r,statusCode:o}}}(e);Hr(t,n)}}(t)))}catch(t){}}let Ea=null;const wa=t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();if(Ea===e||!e)return null;if(Ea=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 dr(t);let n=!1;const s=e.map((t=>{if(!t)return t;if("string"==typeof t)return t.length>Ss?(n=!0,`${t.slice(0,Ss)}…`):t;if("object"==typeof t)try{const e=yt(t,7),s=JSON.stringify(e);if(s.length>Ss){const t=aa(s.slice(0,Ss)),e=JSON.parse(t);return n=!0,e}return e}catch(t){}return t}));return dr({...t,data:{...t.data,arguments:s,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return dr(e)}(e);n&&sr(t,n)};function ka(t){return!(!t||!t.on)}function Ta(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:s}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:s}}}}const Ra={resource:function(t){const{entryType:e,initiatorType:n,name:s,responseEnd:i,startTime:r,decodedBodySize:a,encodedBodySize:o,responseStatus:c,transferSize:l}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${e}.${n}`,start:Da(r),end:Da(i),name:s,data:{size:l,statusCode:c,decodedBodySize:a,encodedBodySize:o}}},paint:function(t){const{duration:e,entryType:n,name:s,startTime:i}=t,r=Da(i);return{type:n,name:s,start:r,end:r+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:s,duration:i,domComplete:r,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:h,startTime:_,transferSize:p,type:f}=t;if(0===i)return null;return{type:`${e}.${f}`,start:Da(_),end:Da(r),name:n,data:{size:p,decodedBodySize:s,encodedBodySize:a,duration:i,domInteractive:l,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:r,redirectCount:h}}},"largest-contentful-paint":function(t){const{entryType:e,startTime:n,size:s}=t;let i=0;if(gs.performance){const t=gs.performance.getEntriesByType("navigation")[0];i=t&&t.activationStart||0}const r=Math.max(n-i,0),a=Da(i)+r/1e3;return{type:e,name:e,start:a,end:a,data:{value:r,size:s,nodeId:nr.mirror.getId(t.element)}}}};function xa(t){return void 0===Ra[t.entryType]?null:Ra[t.entryType](t)}function Da(t){return((At||gs.performance.timeOrigin)+t)/1e3}function Ca(t){let e=!1;return(n,s)=>{if(!t.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("[Replay] Received replay event after session expired."));const i=s||!e;e=!0,t.addUpdate((()=>{if("buffer"===t.recordingMode&&i&&t.setInitialState(),Mr(t,n,i),!i)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return Promise.resolve(null);Mr(t,function(t){const e=t.getOptions();return{type:Js.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,i),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(t.session.started=e,t.getOptions().stickySession&&Br(t.session))}return"session"===t.recordingMode&&t.flush(),!0}))}}async function Na({recordingData:t,replayId:e,segmentId:n,eventContext:s,timestamp:i,session:r}){const a=function({recordingData:t,headers:e}){let n;const s=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${s}${t}`;else{const e=(new TextEncoder).encode(s);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:l,initialTimestamp:u}=s,d=le(),h=d.getClient(),_=d.getScope(),p=h&&h.getTransport(),f=h&&h.getDsn();if(!(h&&p&&f&&r.sampled))return;const m={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:o,replay_id:e,segment_id:n,replay_type:r.sampled},g=await async function({client:t,scope:e,replayId:n,event:s}){const i="object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations),r=await Ge(t.getOptions(),s,{event_id:n,integrations:i},e);if(!r)return null;r.platform=r.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:o,version:c}=a&&a.sdk||{};return r.sdk={...r.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},r}({scope:_,client:h,replayId:e,event:m});if(!g)return h.recordDroppedEvent("event_processor","replay",m),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("An event processor returned `null`, will not send event."));const y=function(t,e,n,s){return Mt(qt(t,Ht(t),s,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(g,a,f,h.getOptions().tunnel);let v;try{v=await p.send(y)}catch(t){const e=new Error(vs);try{e.cause=t}catch(t){}throw e}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new Ia(v.statusCode);return v}class Ia extends Error{constructor(t){super(`Transport returned status code ${t}`)}}async function Ua(t,e={count:0,interval:5e3}){const{recordingData:n,options:s}=t;if(n.length)try{return await Na(t),!0}catch(n){if(n instanceof Ia)throw n;if(Ne("Replays",{_retryCount:e.count}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s._experiments&&s._experiments.captureExceptions&&Ce(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,s)=>{setTimeout((async()=>{try{await Ua(t,e),n(!0)}catch(t){s(t)}}),e.interval)}))}}const Ba="__THROTTLED";function Aa(t,e,n){const s=new Map;let i=!1;return(...r)=>{const a=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;s.forEach(((t,n)=>{nt+e),0)>=e){const t=i;return i=!0,t?"__SKIPPED":Ba}i=!1;const o=s.get(a)||0;return s.set(a,o+1),t(...r)}}class Oa{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5,maxSessionLife:36e5}}__init5(){this._performanceObserver=null}__init6(){this._flushLock=null}__init7(){this._lastActivity=Date.now()}__init8(){this._isEnabled=!1}__init9(){this._isPaused=!1}__init10(){this._hasInitializedCoreListeners=!1}__init11(){this._stopRecording=null}__init12(){this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""}}constructor({options:t,recordingOptions:e}){Oa.prototype.__init.call(this),Oa.prototype.__init2.call(this),Oa.prototype.__init3.call(this),Oa.prototype.__init4.call(this),Oa.prototype.__init5.call(this),Oa.prototype.__init6.call(this),Oa.prototype.__init7.call(this),Oa.prototype.__init8.call(this),Oa.prototype.__init9.call(this),Oa.prototype.__init10.call(this),Oa.prototype.__init11.call(this),Oa.prototype.__init12.call(this),Oa.prototype.__init13.call(this),Oa.prototype.__init14.call(this),Oa.prototype.__init15.call(this),Oa.prototype.__init16.call(this),Oa.prototype.__init17.call(this),Oa.prototype.__init18.call(this),this._recordingOptions=e,this._options=t,this._debouncedFlush=function(t,e,n){let s,i,r;const a=n&&n.maxWait?Math.max(n.maxWait,e):0;function o(){return c(),s=t(),s}function c(){void 0!==i&&clearTimeout(i),void 0!==r&&clearTimeout(r),i=r=void 0}function l(){return i&&clearTimeout(i),i=setTimeout(o,e),a&&void 0===r&&(r=setTimeout(o,a)),s}return l.cancel=c,l.flush=function(){return void 0!==i||void 0!==r?o():s},l}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Aa(((t,e)=>Mr(this,t,e)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:s}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:s?s.join(","):"",multiClickTimeout:1e3}:void 0;i&&(this.clickDetector=new cr(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(){const{errorSampleRate:t,sessionSampleRate:e}=this._options;if(t<=0&&e<=0)return;this._loadAndCheckSession()&&(this.session?(this.session.sampled&&"session"!==this.session.sampled&&(this.recordingMode="buffer"),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");const t=this.session&&this.session.id,{session:e}=Lr({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:1,allowBuffering:!1});e.previousSessionId=t,this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");const t=this.session&&this.session.id,{session:e}=Lr({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:0,allowBuffering:!0});e.previousSessionId=t,this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=nr({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Ca(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(t){if(this._isEnabled)try{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e="[Replay] Stopping Replay"+(t?` triggered by ${t}`:"");(this.getOptions()._experiments.traceInternals?console.warn:E.log)(e)}this._isEnabled=!1,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),"session"===this.recordingMode&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Cr(this)}catch(t){this._handleException(t)}}pause(){this._isPaused=!0,this.stopRecording()}resume(){this._loadAndCheckSession()&&(this._isPaused=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();await this.flushImmediate();const n=this.stopRecording();t&&n&&(this.recordingMode="session",this.session&&(this.session.shouldRefresh=!1,this._updateUserActivity(e),this._updateSessionActivity(e),this.session.started=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._loadAndCheckSession())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(){const t=this.getSessionId();if(this._lastActivity&&Nr(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled)return void this.pause();if(!this._loadAndCheckSession())return;return t===this.getSessionId()||(this._triggerFullSnapshot(),!1)}setInitialState(){const t=`${gs.location.pathname}${gs.location.hash}${gs.location.search}`,e=`${gs.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===Ba){const t=dr({category:"replay.throttled"});this.addUpdate((()=>{Mr(this,{type:Js.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})}))}return n}getCurrentRoute(){const t=this.lastTransaction||le().getScope().getTransaction();if(t&&["route","custom"].includes(t.metadata.source))return t.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=xr({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this.startRecording()}_handleException(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("[Replay]",t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Ce(t)}_loadAndCheckSession(){const{type:t,session:e}=Lr({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0||"buffer"===this.recordingMode});"new"===t&&this.setInitialState();const n=this.getSessionId();return e.id!==n&&(e.previousSessionId=n),this.session=e,!!this.session.sampled||(this.stop("session unsampled"),!1)}_addListeners(){try{gs.document.addEventListener("visibilitychange",this._handleVisibilityChange),gs.addEventListener("blur",this._handleWindowBlur),gs.addEventListener("focus",this._handleWindowFocus),gs.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(t){const e=le().getScope(),n=le().getClient();e&&e.addScopeListener(wa(t)),tt("dom",fr(t)),tt("history",Fr(t)),Sa(t),ie(Pr(t,!ka(n))),ka(n)&&(n.on("afterSendEvent",zr(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 gs&&(this._performanceObserver=br(this))}_removeListeners(){try{gs.document.removeEventListener("visibilitychange",this._handleVisibilityChange),gs.removeEventListener("blur",this._handleWindowBlur),gs.removeEventListener("focus",this._handleWindowFocus),gs.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(t){this._handleException(t)}}__init13(){this._handleVisibilityChange=()=>{"visible"===gs.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init14(){this._handleWindowBlur=()=>{const t=dr({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init15(){this._handleWindowFocus=()=>{const t=dr({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init16(){this._handleKeyboardEvent=t=>{gr(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;const e=Ir(this.session,this.timeouts);t&&!e&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Replay] Document has become active, but session has expired")}_triggerFullSnapshot(t=!0){try{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Replay] Taking full rrweb snapshot"),nr.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:Js.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}_addPerformanceEntries(){const t=[...this.performanceEvents];return this.performanceEvents=[],Promise.all($r(this,function(t){return t.map(xa).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&&n{if(this._isEnabled||t)if(this.checkAndHandleExpiredSession())if(this.session){if(this._debouncedFlush.cancel(),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=null);try{await this._flushLock}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error(t)}finally{this._debouncedFlush()}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("[Replay] No session found to flush.");else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("[Replay] Attempting to finish replay event after session expired.")}}_maybeSaveSession(){this.session&&this._options.stickySession&&Br(this.session)}__init18(){this._onMutationHandler=t=>{const e=t.length,n=this._options.mutationLimit,s=n&&e>n;if(e>this._options.mutationBreadcrumbLimit||s){const t=dr({category:"replay.mutations",data:{count:e,limit:s}});this._createCustomBreadcrumb(t)}return!s||(this.stop("mutationLimit"),!1)}}}function La(t,e,n,s){const i=[...t,..."string"==typeof s?s.split(","):[],...e];return void 0!==n&&("string"==typeof n&&i.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.")),i.join(",")}function Ma({mask:t,unmask:e,block:n,unblock:s,ignore:i,blockClass:r,blockSelector:a,maskTextClass:o,maskTextSelector:c,ignoreClass:l}){const u=La(t,[".sentry-mask","[data-sentry-mask]"],o,c),d=La(e,[".sentry-unmask","[data-sentry-unmask]"]),h={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:La(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],r,a),unblockSelector:La(s,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:La(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return r instanceof RegExp&&(h.blockClass=r),o instanceof RegExp&&(h.maskTextClass=o),h}function Ga(){return"undefined"!=typeof window&&(!gt()||"undefined"!=typeof process&&"renderer"===process.type)}const Ya='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',za=["content-length","content-type","accept"];let Pa=!1;class $a{static __initStatic(){this.id="Replay"}__init(){this.name=$a.id}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,stickySession:n=!0,useCompression:s=!0,_experiments:i={},sessionSampleRate:r,errorSampleRate:a,maskAllText:o=!0,maskAllInputs:c=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:u=750,mutationLimit:d=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:_=[],networkDetailAllowUrls:p=[],networkCaptureBodies:f=!0,networkRequestHeaders:m=[],networkResponseHeaders:g=[],mask:y=[],unmask:v=[],block:b=[],unblock:S=[],ignore:E=[],maskFn:w,beforeAddRecordingEvent:k,blockClass:T,blockSelector:R,maskInputOptions:x,maskTextClass:D,maskTextSelector:C,ignoreClass:N}={}){if($a.prototype.__init.call(this),this._recordingOptions={maskAllInputs:c,maskAllText:o,maskInputOptions:{...x||{},password:!0},maskTextFn:w,maskInputFn:w,...Ma({mask:y,unmask:v,block:b,unblock:S,ignore:E,blockClass:T,blockSelector:R,maskTextClass:D,maskTextSelector:C,ignoreClass:N}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,stickySession:n,sessionSampleRate:r,errorSampleRate:a,useCompression:s,blockAllMedia:l,maskAllInputs:c,maskAllText:o,mutationBreadcrumbLimit:u,mutationLimit:d,slowClickTimeout:h,slowClickIgnoreSelectors:_,networkDetailAllowUrls:p,networkCaptureBodies:f,networkRequestHeaders:Fa(m),networkResponseHeaders:Fa(g),beforeAddRecordingEvent:k,_experiments:i},"number"==typeof r&&(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: ${r} })`),this._initialOptions.sessionSampleRate=r),"number"==typeof a&&(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: ${a} })`),this._initialOptions.errorSampleRate=a),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ya}`:Ya),this._isInitialized&&Ga())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Pa}set _isInitialized(t){Pa=t}setupOnce(){Ga()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop():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=le().getClient(),n=e&&e.getOptions(),s={sessionSampleRate:0,errorSampleRate:0,...z(t)};if(!n)return console.warn("SDK client is not available."),s;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&&(s.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(s.errorSampleRate=n.replaysOnErrorSampleRate);return s}(this._initialOptions);this._replay=new Oa({options:t,recordingOptions:this._recordingOptions})}}function Fa(t){return[...za,...t.map((t=>t.toLowerCase()))]}function ja(t){let e,n=t[0],s=1;for(;sn.call(e,...t))),e=void 0)}return n}$a.__initStatic();const Ha=_;const qa=(t,e,n)=>{let s,i;return r=>{e.value>=0&&(r||n)&&(i=e.value-(s||0),(i||void 0===s)&&(s=e.value,e.delta=i,t(e)))}},Wa=()=>Ha.__WEB_VITALS_POLYFILL__?Ha.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Ha.performance.timing,e=Ha.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})()):Ha.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Za=()=>{const t=Wa();return t&&t.activationStart||0},Ka=(t,e)=>{const n=Wa();let s="navigate";return n&&(s=Ha.document.prerendering||Za()>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:s}},Va=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const s=new PerformanceObserver((t=>{e(t.getEntries())}));return s.observe(Object.assign({type:t,buffered:!0},n||{})),s}}catch(t){}},Xa=(t,e)=>{const n=s=>{"pagehide"!==s.type&&"hidden"!==Ha.document.visibilityState||(t(s),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let Ja=-1;const Qa=()=>(Ja<0&&(Ja="hidden"!==Ha.document.visibilityState||Ha.document.prerendering?1/0:0,Xa((({timeStamp:t})=>{Ja=t}),!0)),{get firstHiddenTime(){return Ja}}),to={};function eo(t){return"number"==typeof t&&isFinite(t)}function no(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function so(t){return t/1e3}function io(){return Ha&&Ha.addEventListener&&Ha.performance}let ro,ao,oo=0,co={};function lo(){const t=io();if(t&&At){t.mark&&Ha.performance.mark("sentry-tracing-init"),(t=>{const e=Qa(),n=Ka("FID");let s;const i=t=>{t.startTime{t.forEach(i)},a=Va("first-input",r);s=qa(t,n),a&&Xa((()=>{r(a.takeRecords()),a.disconnect()}),!0)})((t=>{const e=t.entries.pop();if(!e)return;const n=so(At),s=so(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Measurements] Adding FID"),co.fid={value:t.value,unit:"millisecond"},co["mark.fid"]={value:n+s,unit:"second"}}));const e=(t=>{const e=Ka("CLS",0);let n,s=0,i=[];const r=t=>{t.forEach((t=>{if(!t.hadRecentInput){const r=i[0],a=i[i.length-1];s&&0!==i.length&&t.startTime-a.startTime<1e3&&t.startTime-r.startTime<5e3?(s+=t.value,i.push(t)):(s=t.value,i=[t]),s>e.value&&(e.value=s,e.entries=i,n&&n())}}))},a=Va("layout-shift",r);if(a){n=qa(t,e);const s=()=>{r(a.takeRecords()),n(!0)};return Xa(s),s}})((t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Measurements] Adding CLS"),co.cls={value:t.value,unit:""},ao=e)})),n=(t=>{const e=Qa(),n=Ka("LCP");let s;const i=t=>{const i=t[t.length-1];if(i){const t=Math.max(i.startTime-Za(),0);t{to[n.id]||(i(r.takeRecords()),r.disconnect(),to[n.id]=!0,s(!0))};return["keydown","click"].forEach((t=>{addEventListener(t,e,{once:!0,capture:!0})})),Xa(e,!0),e}})((t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Measurements] Adding LCP"),co.lcp={value:t.value,unit:"millisecond"},ro=e)}));return()=>{e&&e(),n&&n()}}return()=>{}}function uo(t){const e=io();if(!e||!Ha.performance.getEntries||!At)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Tracing] Adding & adjusting spans using Performance API");const n=so(At),s=e.getEntries();let i,r;if(s.slice(oo).forEach((e=>{const s=so(e.startTime),a=so(e.duration);if(!("navigation"===t.op&&n+s{ho(t,e,s,n)})),ho(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),ho(t,e,"fetch",n,"cache","domainLookupStart"),ho(t,e,"domainLookup",n,"DNS"),function(t,e,n){no(t,{op:"browser",description:"request",startTimestamp:n+so(e.requestStart),endTimestamp:n+so(e.responseEnd)}),no(t,{op:"browser",description:"response",startTimestamp:n+so(e.responseStart),endTimestamp:n+so(e.responseEnd)})}(t,e,n)}(t,e,n),i=n+so(e.responseStart),r=n+so(e.requestStart);break;case"mark":case"paint":case"measure":{!function(t,e,n,s,i){const r=i+n,a=r+s;no(t,{description:e.name,endTimestamp:a,op:e.entryType,startTimestamp:r})}(t,e,s,a,n);const i=Qa(),r=e.startTime{if(!co[e]||n>=t.startTimestamp)return;const s=co[e].value,i=n+so(s),r=Math.abs(1e3*(i-t.startTimestamp)),a=r-s;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Measurements] Normalized ${e} from ${s} to ${r} (${a})`),co[e].value=r}));const e=co["mark.fid"];e&&co.fid&&(no(t,{description:"first input delay",endTimestamp:e.value+so(co.fid.value),op:"ui.action",startTimestamp:e.value}),delete co["mark.fid"]),"fcp"in co||delete co.cls,Object.keys(co).forEach((e=>{t.setMeasurement(e,co[e].value,co[e].unit)})),function(t){ro&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Measurements] Adding LCP Data"),ro.element&&t.setTag("lcp.element",g(ro.element)),ro.id&&t.setTag("lcp.id",ro.id),ro.url&&t.setTag("lcp.url",ro.url.trim().slice(0,200)),t.setTag("lcp.size",ro.size));ao&&ao.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Measurements] Adding CLS Data"),ao.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,g(e.node)))))}(t)}ro=void 0,ao=void 0,co={}}function ho(t,e,n,s,i,r){const a=r?e[r]:e[`${n}End`],o=e[`${n}Start`];o&&a&&no(t,{op:"browser",description:i||n,startTimestamp:s+so(o),endTimestamp:s+so(a)})}const _o=["localhost",/^\/(?!\/)/],po={traceFetch:!0,traceXHR:!0,tracingOrigins:_o,tracePropagationTargets:_o,_experiments:{}};function fo(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:s,tracingOrigins:i,shouldCreateSpanForRequest:r,_experiments:a}={traceFetch:po.traceFetch,traceXHR:po.traceXHR,...t},o="function"==typeof r?r:t=>!0,c=t=>function(t,e){return U(t,e||_o)}(t,s||i),l={};e&&tt("fetch",(t=>{const e=function(t,e,n,s){if(!he()||!t.fetchData||!e(t.fetchData.url))return;if(t.endTimestamp){const e=t.fetchData.__span;if(!e)return;const n=s[e];if(n){if(t.response){n.setHttpStatus(t.response.status);const e=t.response&&t.response.headers&&t.response.headers.get("content-length"),s=parseInt(e);s>0&&n.setData("http.response_content_length",s)}else t.error&&n.setStatus("internal_error");n.finish(),delete s[e]}return}const i=le().getScope().getSpan(),r=i&&i.transaction;if(i&&r){const{method:e,url:a}=t.fetchData,o=i.startChild({data:{url:a,type:"fetch","http.method":e},description:`${e} ${a}`,op:"http.client"});t.fetchData.__span=o.spanId,s[o.spanId]=o;const c=t.args[0];t.args[1]=t.args[1]||{};const l=t.args[1];return n(t.fetchData.url)&&(l.headers=function(t,e,n,s){const i=Xt(e),r=n.toTraceparent(),a="undefined"!=typeof Request&&d(t,Request)?t.headers:s.headers;if(a){if("undefined"!=typeof Headers&&d(a,Headers)){const t=new Headers(a);return t.append("sentry-trace",r),i&&t.append(Zt,i),t}if(Array.isArray(a)){const t=[...a,["sentry-trace",r]];return i&&t.push([Zt,i]),t}{const t="baggage"in a?a.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),i&&e.push(i),{...a,"sentry-trace":r,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":r,baggage:i}}(c,r.getDynamicSamplingContext(),o,l)),o}}(t,o,c,l);ja([a,"optionalAccess",t=>t.enableHTTPTimings])&&e&&mo(e)})),n&&tt("xhr",(t=>{const e=function(t,e,n,s){const i=t.xhr,r=i&&i.__sentry_xhr_v2__;if(!he()||i&&i.__sentry_own_request__||!(i&&r&&e(r.url)))return;if(t.endTimestamp){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=s[t];return void(e&&(e.setHttpStatus(r.status_code),e.finish(),delete s[t]))}const a=le().getScope().getSpan(),o=a&&a.transaction;if(a&&o){const t=a.startChild({data:{...r.data,type:"xhr","http.method":r.method,url:r.url},description:`${r.method} ${r.url}`,op:"http.client"});if(i.__sentry_xhr_span_id__=t.spanId,s[i.__sentry_xhr_span_id__]=t,i.setRequestHeader&&n(r.url))try{i.setRequestHeader("sentry-trace",t.toTraceparent());const e=Xt(o.getDynamicSamplingContext());e&&i.setRequestHeader(Zt,e)}catch(t){}return t}}(t,o,c,l);ja([a,"optionalAccess",t=>t.enableHTTPTimings])&&e&&mo(e)}))}function mo(t){const e=t.data.url,n=new PerformanceObserver((s=>{s.getEntries().forEach((s=>{if(("fetch"===s.initiatorType||"xmlhttprequest"===s.initiatorType)&&s.name.endsWith(e)){(function(t){const e=t.nextHopProtocol.split("/")[1]||"none",n=[];e&&n.push(["network.protocol.version",e]);if(!At)return n;return[...n,["http.request.connect_start",(At+t.connectStart)/1e3],["http.request.request_start",(At+t.requestStart)/1e3],["http.request.response_start",(At+t.responseStart)/1e3]]})(s).forEach((e=>t.setData(...e))),n.disconnect()}}))}));n.observe({entryTypes:["resource"]})}const go={...be,markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!Ha||!Ha.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Could not initialize routing instrumentation due to invalid location"));let s,i=Ha.location.href;e&&(s=t({name:Ha.location.pathname,startTimestamp:At?At/1e3:void 0,op:"pageload",metadata:{source:"url"}})),n&&tt("history",(({to:e,from:n})=>{void 0===n&&i&&-1!==i.indexOf(e)?i=void 0:n!==e&&(i=void 0,s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.finish()),s=t({name:Ha.location.pathname,op:"navigation",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,...po};class yo{__init(){this.name="BrowserTracing"}__init2(){this._hasSetTracePropagationTargets=!1}constructor(t){yo.prototype.__init.call(this),yo.prototype.__init2.call(this),De(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!(!t||!t.tracePropagationTargets&&!t.tracingOrigins)),this.options={...go,...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=lo(),this.options.enableLongTask&&Va("longtask",(t=>{for(const e of t){const t=_e();if(!t)return;const n=so(At+e.startTime),s=so(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+s})}})),this.options._experiments.enableInteractions&&Va("event",(t=>{for(const e of t){const t=_e();if(!t)return;if("click"===e.name){const n=so(At+e.startTime),s=so(e.duration);t.startChild({description:g(e.target),op:`ui.interaction.${e.name}`,startTimestamp:n,endTimestamp:n+s})}}}),{durationThreshold:0})}setupOnce(t,e){this._getCurrentHub=e;const n=e().getClient(),s=n&&n.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:r,startTransactionOnPageLoad:a,markBackgroundTransactions:o,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,_experiments:d}=this.options,h=s&&s.tracePropagationTargets,_=h||this.options.tracePropagationTargets;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&h&&E.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."),i((t=>{const n=this._createRouteTransaction(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n}),a,r),o&&(Ha&&Ha.document?Ha.document.addEventListener("visibilitychange",(()=>{const t=_e();if(Ha.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.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__)&&E.warn("[Tracing] Could not set up background tab detection due to lack of global document")),d.enableInteractions&&this._registerInteractionListener(),fo({traceFetch:c,traceXHR:l,tracePropagationTargets:_,shouldCreateSpanForRequest:u,_experiments:{enableHTTPTimings:d.enableHTTPTimings}})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`));const{beforeNavigate:e,idleTimeout:n,finalTimeout:s,heartbeatInterval:i}=this.options,a="pageload"===t.op,o=a?vo("sentry-trace"):null,c=a?vo("baggage"):null,l=o?Lt(o):void 0,u=c?function(t){if(!r(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce(((t,e)=>({...t,...Jt(e)})),{});else{if(!t)return;e=Jt(t)}const n=Object.entries(e).reduce(((t,[e,n])=>(e.match(Vt)&&(t[e.slice(Kt.length)]=n),t)),{});return Object.keys(n).length>0?n:void 0}(c):void 0,d={...t,...l,metadata:{...t.metadata,dynamicSamplingContext:l&&!u?{}:u},trimEnd:!0},h="function"==typeof e?e(d):d,_=void 0===h?{...d,sampled:!1}:h;_.metadata=_.name!==d.name?{..._.metadata,source:"custom"}:_.metadata,this._latestRouteName=_.name,this._latestRouteSource=_.metadata&&_.metadata.source,!1===_.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Tracing] Will not send ${_.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Tracing] Starting ${_.op} transaction on scope`);const p=this._getCurrentHub(),{location:f}=Ha,m=xe(p,_,n,s,!0,{location:f},i);return m.registerBeforeFinishCallback((t=>{this._collectWebVitals(),uo(t)})),m}_registerInteractionListener(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:s}=this.options,i="ui.action.click",r=_e();if(r&&r.op&&["navigation","pageload"].includes(r.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`[Tracing] Did not create ${i} 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__)&&E.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`));const a=this._getCurrentHub(),{location:o}=Ha,c={name:this._latestRouteName,op:i,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};t=xe(a,c,e,n,!0,{location:o},s)};["click"].forEach((t=>{addEventListener(t,e,{once:!1,capture:!0})}))}}function vo(t){const e=(n=`meta[name=${t}]`,m.document&&m.document.querySelector?m.document.querySelector(n):null);var n;return e?e.getAttribute("content"):null}function bo(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function So(t){return bo(t.getAllKeys())}function Eo(t){let e;function n(){return null==e&&(e=function(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const s=bo(n);return t=>s.then((n=>t(n.transaction(e,"readwrite").objectStore(e))))}(t.dbName||"sentry-offline",t.storeName||"queue")),e}return{insert:async e=>{try{const s=await Pt(e,t.textEncoder);await function(t,e,n){return t((t=>So(t).then((s=>{if(!(s.length>=n))return t.put(e,Math.max(...s,0)+1),bo(t.transaction)}))))}(n(),s,t.maxQueueSize||30)}catch(t){}},pop:async()=>{try{const e=await function(t){return t((t=>So(t).then((e=>{if(0!==e.length)return bo(t.get(e[0])).then((n=>(t.delete(e[0]),bo(t.transaction).then((()=>n)))))}))))}(n());if(e)return function(t,e,n){let s="string"==typeof t?e.encode(t):t;function i(t){const e=s.subarray(0,t);return s=s.subarray(t+1),e}function r(){let t=s.indexOf(10);return t<0&&(t=s.length),JSON.parse(n.decode(i(t)))}const a=r(),o=[];for(;s.length;){const t=r(),e="number"==typeof t.length?t.length:void 0;o.push([t,e?i(e):r()])}return[a,o]}(e,t.textEncoder||new TextEncoder,t.textDecoder||new TextDecoder)}catch(t){}}}}const wo=1e6,ko=String(0),To="main";let Ro="",xo="",Do="",Co=nn.navigator&&nn.navigator.userAgent||"",No="";const Io=nn.navigator&&nn.navigator.language||nn.navigator&&nn.navigator.languages&&nn.navigator.languages[0]||"";const Uo=nn.navigator&&nn.navigator.userAgentData;var Bo;function Ao(t){return function(t){return!("thread_metadata"in t)}(t)?function(t){let e,n=0;const s={samples:[],stacks:[],frames:[],thread_metadata:{[ko]:{name:To}}};if(!t.samples.length)return s;const i=t.samples[0].timestamp;for(let r=0;r{if(Ro=t.platform||"",Do=t.architecture||"",No=t.model||"",xo=t.platformVersion||"",t.fullVersionList&&t.fullVersionList.length>0){const e=t.fullVersionList[t.fullVersionList.length-1];Co=`${e.brand} ${e.version}`}})).catch((t=>{}));const Lo=new WeakMap;function Mo(t){const e=_._sentryDebugIds;if(!e)return[];const n=le();if(!n)return[];const s=n.getClient();if(!s)return[];const i=s.getOptions();if(!i)return[];const r=i.stackParser;if(!r)return[];let a;const o=Lo.get(r);o?a=o:(a=new Map,Lo.set(r,a));const c=Object.keys(e).reduce(((t,n)=>{let s;const i=a.get(n);i?s=i:(s=r(n),a.set(n,s));for(let i=s.length-1;i>=0;i--){const r=s[i],a=r&&r.filename;if(r&&a){t[a]=e[n];break}}return t}),{}),l=[];for(const e of t)e&&c[e]&&l.push({type:"sourcemap",code_file:e,debug_id:c[e]});return l}function Go(t,e,n){return function(t){return t.samples.length<2?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):!!t.frames.length||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Profiling] Discarding profile because it contains no frames"),!1)}(e)?Oo(n,e,t):null}const Yo=new Map;let zo=!1;function Po(t){const e=nn.Profiler;if("function"!=typeof e)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."),t;if(zo)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Profiling] Profiling has been disabled for the duration of the current user session."),t;const n=le().getClient(),s=n&&n.getOptions();if(!s)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Profiling] Profiling disabled, no options found."),t;const i=s.profilesSampleRate;if(!("number"!=typeof(r=i)&&"boolean"!=typeof r||"number"==typeof r&&isNaN(r)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),0):!0===r||!1===r||!(r<0||r>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${r}.`),0)))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("[Profiling] Discarding profile because of invalid sample rate."),t;var r;if(!i)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),t;if(!(!0===i||Math.random()(e.finish(),u&&(nn.clearTimeout(u),u=void 0),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log(`[Profiling] stopped profiling of transaction: ${t.name||t.description}`),n?(function(t,e){if(Yo.set(t,e),Yo.size>30){const t=Yo.keys().next().value;Yo.delete(t)}}(c,n),null):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.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__)&&E.log("[Profiling] error while stopping profiler:",t),null)))}let u=nn.setTimeout((()=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Profiling] max profile duration elapsed, stopping profiling for:",t.name||t.description),l()}),3e4);const d=t.finish.bind(t);return t.finish=function(){return t?(l().then((()=>{t.setContext("profile",{profile_id:c}),d()}),(()=>{d()})),t):d()},t}class $o{constructor(){$o.prototype.__init.call(this),$o.prototype.__init2.call(this)}__init(){this.name="BrowserProfilingIntegration"}__init2(){this.getCurrentHub=void 0}setupOnce(t,e){this.getCurrentHub=e;const n=this.getCurrentHub().getClient();n&&"function"==typeof n.on?(n.on("startTransaction",(t=>{Po(t)})),n.on("beforeEnvelope",(t=>{if(!Yo.size)return;const e=function(t){const e=[];return Yt(t,((t,n)=>{if("transaction"===n)for(let n=1;n{const s=t(n),i={};return{send:async function(r){const a=e({envelope:r,getEvent:function(t){const e=t&&t.length?t:["event"];return function(t,e){let n;return Yt(t,((t,s)=>(e.includes(s)&&(n=Array.isArray(t)?t[1]:void 0),!!n))),n}(r,e)}}).map((e=>function(e){if(!i[e]){const s=T(e);if(!s)return;const r=Ae(s);i[e]=t({...n,url:r})}return i[e]}(e))).filter((t=>!!t));return 0===a.length&&a.push(s),(await Promise.all(a.map((t=>t.send(r)))))[0]},flush:async function(t){const e=[...Object.keys(i).map((t=>i[t])),s];return(await Promise.all(e.map((e=>e.flush(t))))).every((t=>t))}}}},setContext:Ne,setExtra:function(t,e){le().setExtra(t,e)},setExtras:function(t){le().setExtras(t)},setTag:function(t,e){le().setTag(t,e)},setTags:function(t){le().setTags(t)},setUser:function(t){le().setUser(t)},spanStatusfromHttpCode:ye,startTransaction:function(t,e){return le().startTransaction({...t},e)},trace:function(t,e,n=(()=>{})){const s={...t};void 0!==s.name&&void 0===s.description&&(s.description=s.name);const i=le(),r=i.getScope(),a=r.getSpan(),o=function(){if(he())return a?a.startChild(s):i.startTransaction(s)}();function c(){o&&o.finish(),i.getScope().setSpan(a)}let u;r.setSpan(o);try{u=e(o)}catch(t){throw o&&o.setStatus("internal_error"),n(t),c(),t}return l(u)?Promise.resolve(u).then((()=>{c()}),(t=>{o&&o.setStatus("internal_error"),n(t),c()})):c(),u},withScope:Ie,WINDOW:nn,BrowserClient:Rn,makeFetchTransport:Dn,makeXHRTransport:Cn,chromeStackLineParser:An,defaultStackLineParsers:jn,defaultStackParser:Hn,geckoStackLineParser:Mn,opera10StackLineParser:Pn,opera11StackLineParser:Fn,winjsStackLineParser:Yn,eventFromException:_n,eventFromMessage:pn,createUserFeedbackEnvelope:Tn,captureUserFeedback:function(t){const e=le().getClient();e&&e.captureUserFeedback(t)},close:function(t){const e=le().getClient();return e?e.close(t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Cannot flush events and disable SDK. No client defined."),Et(!1))},defaultIntegrations:_s,flush:function(t){const e=le().getClient();return e?e.flush(t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.warn("Cannot flush events. No client defined."),Et(!1))},forceLoad:function(){},init:ps,lastEventId:function(){return le().lastEventId()},onLoad:function(t){t()},showReportDialog:function(t={},e=le()){if(!nn.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("Global document not defined in showReportDialog call"));const{client:n,scope:s}=e.getStackTop(),i=t.dsn||n&&n.getDsn();if(!i)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("DSN not configured for showReportDialog call"));s&&(t.user={...s.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const r=nn.document.createElement("script");r.async=!0,r.src=function(t,e){const n=x(t);if(!n)return"";const s=`${Ue(n)}embed/error-page/`;let i=`dsn=${k(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${s}?${i}`}(i,t),t.onLoad&&(r.onload=t.onLoad);const a=nn.document.head||nn.document.body;a?a.appendChild(r):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.error("Not injecting report dialog. No injection point found in HTML")},wrap:function(t){return on(t)()},Replay:$a,BrowserTracing:yo,defaultRequestInstrumentationOptions:po,instrumentOutgoingRequests:fo,makeBrowserOfflineTransport:function(t){return function(t){return e=>t({...e,createStore:Eo})}(We(t))},onProfilingStartRouteTransaction:function(t){return t?Po(t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&E.log("[Profiling] Transaction is undefined, skipping profiling"),t)},BrowserProfilingIntegration:$o,GlobalHandlers:Wn,TryCatch:ts,Breadcrumbs:bn,LinkedErrors:rs,HttpContext:os,Dedupe:cs}),qo=Object.defineProperty;function Wo(t,e=!1){let n=window.crypto.getRandomValues(new Uint32Array(1))[0],s=`_${n}`;return Object.defineProperty(window,s,{value:n=>(e&&Reflect.deleteProperty(window,s),t?.(n)),writable:!1,configurable:!0}),n}async function Zo(t,e={}){return new Promise(((n,s)=>{let i=Wo((t=>{n(t),Reflect.deleteProperty(window,`_${r}`)}),!0),r=Wo((t=>{s(t),Reflect.deleteProperty(window,`_${i}`)}),!0);window.__TAURI_IPC__({cmd:t,callback:i,error:r,...e})}))}function Ko(t,e="asset"){let n=encodeURIComponent(t);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${n}`:`${e}://localhost/${n}`}((t,e)=>{for(var n in e)qo(t,n,{get:e[n],enumerable:!0})})({},{convertFileSrc:()=>Ko,invoke:()=>Zo,transformCallback:()=>Wo});const Vo={dsn:"https://123456@dummy.dsn/0",autoSessionTracking:!1,beforeSend:async function(t){var e,n;return delete t.sdk,delete t.breadcrumbs,delete t.environment,delete t.sdkProcessingMetadata,(null===(n=null===(e=null==t?void 0:t.request)||void 0===e?void 0:e.headers)||void 0===n?void 0:n["User-Agent"])&&delete t.request.headers["User-Agent"],await Zo("plugin:sentry|event",{event:t}),null},beforeBreadcrumb:function(t){return Zo("plugin:sentry|breadcrumb",{breadcrumb:t}),null}};window.Sentry=Ho,ps({...Vo,debug:__DEBUG__})}();