1import{b as jf}from"./chunk-PPKPC3QE.js";import{c as Hf}from"./chunk-6X7RWQ4F.js";import{a as co}from"./chunk-YDVBW2FS.js";import{a as ao}from"./chunk-2UWYRMYK.js";import{d as Uf}from"./chunk-5JKDAHHF.js";import{d as Bf}from"./chunk-LXUUL66B.js";import{h as Ff}from"./chunk-X7QEYDQU.js";import{$j as $c,Ac as Mc,Af as Uc,Ba as $s,Bf as ef,Cf as br,Ch as pf,Cj as yf,Dc as Op,Df as Qs,Ec as Pp,Ef as $t,F as Cc,Fc as qs,Ff as Zs,Gc as Mp,Gf as At,Gj as Sf,H as En,Hc as Dp,Hf as eo,Hj as Ef,Ic as xp,Ij as Tf,Jf as tf,Jj as Hc,K as re,Kc as Lp,Kf as Gn,Kj as ro,L as Nc,Lf as nf,Lj as If,Mc as Up,Mf as rf,Mj as vf,N as de,Nf as Fc,Nj as ze,O as wt,Oc as Gs,Of as Bc,Oj as bf,P as pt,Pe as Ys,Pf as sf,Pj as wf,Q as Y,Qc as Fp,Qj as Rf,R as Oc,Rj as Af,Sc as Bp,Sj as kf,Tc as Hp,Tf as of,Tj as io,U as wp,Uc as jp,Uf as to,Uj as so,Vc as $p,Vj as Cf,W as Rt,Wc as Wp,Wj as oo,Xc as Vp,Xj as wr,Xk as xf,Yd as Q,Yj as Nf,Yk as Lf,Z as Rp,Zb as Ws,Zd as jt,Zj as zn,_b as Cp,_c as zs,_j as jc,a as vp,ac as fi,ak as Of,bd as qp,be as Kp,bf as on,bk as Wc,cd as Gp,ce as Dc,cf as Js,ck as Vc,d as Ac,dd as zp,df as Lc,dk as kt,ef as Yp,ei as ff,ek as Rr,fa as js,ff as Jp,fi as hf,fk as Pf,g as Bs,ga as Ap,gf as Xp,gi as mf,gk as qc,h as Ce,hc as Vs,hf as Qp,hk as Mf,i as $,ie as Er,je as xc,jf as Tr,jh as cf,k as kc,ke as Ks,kf as Ir,kh as uf,lh as lf,mh as df,mj as gf,n as sn,na as qn,o as Hs,oa as Pc,pj as _f,pk as Df,v as nt,vf as Xs,w as bp,wf as Zp,xf as mi,xg as af,y as Sr,yc as Np,yf as vr,yg as no,za as kp,zc as hi,zf as Tn}from"./chunk-245V6VJQ.js";import{a as f,b as C,d as yr,g as Ip,h as Vn,i as _}from"./chunk-BA6UUNIX.js";var U=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Ct="8.55.0";var F=globalThis;function In(t,e,n){let r=n||F,i=r.__SENTRY__=r.__SENTRY__||{},s=i[Ct]=i[Ct]||{};return s[t]||(s[t]=e())}var Ke=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var uS="Sentry Logger ",gi=["debug","info","warn","error","log","assert","trace"],Ar={};function Oe(t){if(!("console"in F))return t();let e=F.console,n={},r=Object.keys(Ar);r.forEach(i=>{let s=Ar[i];n[i]=e[i],e[i]=s});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function lS(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Ke?gi.forEach(n=>{e[n]=(...r)=>{t&&Oe(()=>{F.console[n](`${uS}[${n}]:`,...r)})}}
1):gi.forEach(n=>{e[n]=()=>{}}),e}var S=In("logger",lS);var Wt="?",$f=/\(error: (.*)\)/,Wf=/captureMessage|captureException/;function lo(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let s=[],o=n.split(` 2`);for(let a=r;a<o.length;a++){let c=o[a];if(c.length>1024)continue;let u=$f.test(c)?c.replace($f,"$1"):c;if(!u.match(/\S*Error: /)){for(let d of e){let l=d(u);if(l){s.push(l);break}}if(s.length>=50+i)break}}return Vf(s.slice(i))}}function zc(t){return Array.isArray(t)?lo(...t):t}function Vf(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(uo(e).function||"")&&e.pop(),e.reverse(),Wf.test(uo(e).function||"")&&(e.pop(),Wf.test(uo(e).function||"")&&e.pop()),e.slice(0,50).map(n=>C(f({},n),{filename:n.filename||uo(e).filename,function:n.function||Wt}))}function uo(t){return t[t.length-1]||{}}var Gc="<anonymous>";function Ye(t){try{return!t||typeof t!="function"?Gc:t.name||Gc}catch{return Gc}}function po(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var fo={},qf={};function De(t,e){fo[t]=fo[t]||[],fo[t].push(e)}function xe(t,e){if(!qf[t]){qf[t]=!0;try{e()}catch(n){Ke&&S.error(`Error while instrumenting ${t}`,n)}}}function Re(t,e){let n=t&&fo[t];if(n)for(let r of n)try{r(e)}catch(i){Ke&&S.error(`Error while triggering instrumentation handler. 3Type: ${t} 4Name: ${Ye(r)} 5Error:`,i)}}var Kc=null;function _i(t){let e="error";De(e,t),xe(e,dS)}function dS(){Kc=F.onerror,F.onerror=function(t,e,n,r,i){return Re("error",{column:r,error:i,line:n,msg:t,url:e}),Kc?Kc.apply(this,arguments):!1},F.onerror.__SENTRY_INSTRUMENTED__=!0}var Yc=null;function yi(t){let e="unhandledrejection";De(e,t),xe(e,pS)}function pS(){Yc=F.onunhandledrejection,F.onunhandledrejection=function(t){return Re("unhandledrejection",t),Yc?Yc.apply(this,arguments):!0},F.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function rt(){return Si(F),F}function Si(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Ct,e[Ct]=e[Ct]||{}}var Gf=Object.prototype.toString;function Kn(t){switch(Gf.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return it(t,Error)}}function kr(t,e){return Gf.call(t)===`[object ${e}]`}function ho(t){return kr(t,"ErrorEvent")}function mo(t){return kr(t,"DOMError")}function Jc(t){return kr(t,"DOMException")}function Ne(t){return kr(t,"String")}function Cr(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Yn(t){return t===null||Cr(t)||typeof t!="object"&&typeof t!="function"}function Nt(t){return kr(t,"Object")}function Jn(t){return typeof Event<"u"&&it(t,Event)}function Xc(t){return typeof Element<"u"&&it(t,Element)}function Qc(t){return kr(t,"RegExp")}function an(t){return!!(t&&t.then&&typeof t.then=="function")}function Zc(t){return Nt(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function it(t,e){try{return t instanceof e}catch{return!1}}function Ei(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}var Nr=F,fS=80;function Le(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],s=0,o=0,a=" > ",c=a.length,u,d=Array.isArray(e)?e:e.keyAttrs,l=!Array.isArray(e)&&e.maxStringLength||fS;for(;n&&s++<r&&(u=hS(n,d),!(u==="html"||s>1&&o+i.length*c+u.length>=l));)i.push(u),o+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function hS(t,e){let n=t,r=[];if(!n||!n.tagName)return"";if(Nr.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=e&&e.length?e.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let o=n.className;if(o&&Ne(o)){let a=o.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function Ti(){try{return Nr.document.location.href}catch{return""}}function eu(t){return Nr.document&&Nr.document.querySelector?Nr.document.querySelector(t):null}function Ii(t){if(!Nr.HTMLElement)return null;let e=t,n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function Vt(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function go(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{Ei(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function zf(t,e,n=!1){return Ne(t)?Qc(e)?e.test(t):Ne(e)?n?t===e:t.includes(e):!1:!1}function ft(t,e=[],n=!1){return e.some(r=>zf(t,r,n))}function Ee(t,e,n){if(!(e in t))return;let r=t[e],i=n(r);typeof i=="function"&&_o(i,r);try{t[e]=i}catch{Ke&&S.log(`Failed to replace method "${e}" in object`,t)}}function Te(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Ke&&S.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function _o(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Te(t,"__sentry_original__",e)}catch{}}function Xn(t){return t.__sentry_original__}function yo(t){if(Kn(t))return f({message:t.message,name:t.name,stack:t.stack},Yf(t));if(Jn(t)){let e=f({type:t.type,target:Kf(t.target),currentTarget:Kf(t.currentTarget)},Yf(t));return typeof CustomEvent<"u"&&it(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Kf(t){try{return Xc(t)?Le(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Yf(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function nu(t,e=40){let n=Object.keys(yo(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return Vt(r,e);for(let i=n.length;i>0;i--){let s=n.slice(0,i).join(", ");
5if(!(s.length>e))return i===n.length?s:Vt(s,e)}return""}function ae(t){return tu(t,new Map)}function tu(t,e){if(mS(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let i of Object.getOwnPropertyNames(t))typeof t[i]<"u"&&(r[i]=tu(t[i],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(i=>{r.push(tu(i,e))}),r}return t}function mS(t){if(!Nt(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var Jf=1e3;function qt(){return Date.now()/Jf}function gS(){let{performance:t}=F;if(!t||!t.now)return qt;let e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/Jf}var ge=gS(),vi,ye=(()=>{let{performance:t}=F;if(!t||!t.now){vi="none";return}let e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=i<e,o=t.timing&&t.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):e,u=c<e;return s||u?i<=c?(vi="timeOrigin",t.timeOrigin):(vi="navigationStart",o):(vi="dateNow",r)})();function Ie(){let t=F,e=t.crypto||t.msCrypto,n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Xf(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ot(t){let{message:e,event_id:n}=t;if(e)return e;let r=Xf(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Or(t,e,n){let r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function Gt(t,e){let n=Xf(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=f(f(f({},r),i),e),e&&"data"in e){let s=f(f({},i&&i.data),e.data);n.mechanism.data=s}}function So(t){if(_S(t))return!0;try{Te(t,"__sentry_captured__",!0)}catch{}return!1}function _S(t){try{return t.__sentry_captured__}catch{}}var cn;(function(t){t[t.PENDING=0]="PENDING";let n=1;t[t.RESOLVED=n]="RESOLVED";let r=2;t[t.REJECTED=r]="REJECTED"})(cn||(cn={}));function He(t){return new Pt(e=>{e(t)})}function vn(t){return new Pt((e,n)=>{n(t)})}var Pt=class t{constructor(e){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),this._state=cn.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,i)=>{this._handlers.push([!1,s=>{if(!e)r(s);else try{r(e(s))}catch(o){i(o)}},s=>{if(!n)i(s);else try{r(n(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let i,s;return this.then(o=>{s=!1,i=o,e&&e()},o=>{s=!0,i=o,e&&e()}).then(()=>{if(s){r(i);return}n(i)})})}__init(){this._resolve=e=>{this._setResult(cn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(cn.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===cn.PENDING){if(an(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===cn.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===cn.RESOLVED&&n[1](this._value),this._state===cn.REJECTED&&n[2](this._value),n[0]=!0)})}}};function Qf(t){let e=ge(),n={sid:Ie(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>yS(n)};return t&&un(n,t),n}function un(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||ge(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Ie()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n: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),t
5ypeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Zf(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),un(t,n)}function yS(t){return ae({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}function Je(){return Ie()}function Xe(){return Ie().substring(16)}function Pr(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&e&&Object.keys(e).length===0)return t;let r=f({},t);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=Pr(r[i],e[i],n-1));return r}var ru="_sentrySpan";function bn(t,e){e?Te(t,ru,e):delete t[ru]}function Qn(t){return t[ru]}var SS=100,iu=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Je(),spanId:Xe()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=f({},this._tags),e._extra=f({},this._extra),e._contexts=f({},this._contexts),this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=f({},this._sdkProcessingMetadata),e._propagationContext=f({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,bn(e,Qn(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&un(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=f(f({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=C(f({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=f(f({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=C(f({},this._extra),{[e]:n}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e=="function"?e(this):e,[r,i]=n instanceof st?[n.getScopeData(),n.getRequestSession()]:Nt(n)?[e,e.requestSession]:[],{tags:s,extra:o,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:l}=r||{};return this._tags=f(f({},this._tags),s),this._extra=f(f({},this._extra),o),this._contexts=f(f({},this._contexts),c),a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),i&&(this._requestSession=i),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._session=void 0,bn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Je()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:SS;if(r<=0)return this;let i=f({timestamp:qt()},e);return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.re
5cordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Qn(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Pr(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=f({spanId:Xe()},e),this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n&&n.event_id?n.event_id:Ie();if(!this._client)return S.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,C(f({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r&&r.event_id?r.event_id:Ie();if(!this._client)return S.warn("No client configured on scope - will not capture message!"),i;let s=new Error(e);return this._client.captureMessage(e,n,C(f({originalException:e,syntheticException:s},r),{event_id:i}),this),i}captureEvent(e,n){let r=n&&n.event_id?n.event_id:Ie();return this._client?(this._client.captureEvent(e,C(f({},n),{event_id:r}),this),r):(S.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}},st=iu;function eh(){return In("defaultCurrentScope",()=>new st)}function th(){return In("defaultIsolationScope",()=>new st)}var su=class{constructor(e,n){let r;e?r=e:r=new st;let i;n?i=n:i=new st,this._stack=[{scope:r}],this._isolationScope=i}withScope(e){let n=this._pushScope(),r;try{r=e(n)}catch(i){throw this._popScope(),i}return an(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Mr(){let t=rt(),e=Si(t);return e.stack=e.stack||new su(eh(),th())}function ES(t){return Mr().withScope(t)}function TS(t,e){let n=Mr();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function nh(t){return Mr().withScope(()=>t(Mr().getIsolationScope()))}function rh(){return{withIsolationScope:nh,withScope:ES,withSetScope:TS,withSetIsolationScope:(t,e)=>nh(e),getCurrentScope:()=>Mr().getScope(),getIsolationScope:()=>Mr().getIsolationScope()}}function zt(t){let e=Si(t);return e.acs?e.acs:rh()}function z(){let t=rt();return zt(t).getCurrentScope()}function ve(){let t=rt();return zt(t).getIsolationScope()}function Eo(){return In("globalScope",()=>new st)}function Zn(...t){let e=rt(),n=zt(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function M(){return z().getClient()}function ou(t){let e=t.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=e;return ae({trace_id:n,span_id:r,parent_span_id:i})}var IS="_sentryMetrics";function bi(t){let e=t[IS];if(!e)return;let n={};for(let[,[r,i]]of e)(n[r]||(n[r]=[])).push(ae(i));return n}var _e="sentry.source",Dr="sentry.sample_rate",je="sentry.op",ie="sentry.origin",xr="sentry.idle_span_finish_reason",wn="sentry.measurement_unit",Rn="sentry.measurement_value",wi="sentry.custom_span_name",au="sentry.profile_id",er="sentry.exclusive_time";function cu(t){if(t<400&&t>=100)return{code:1};if(t>=400&&t<500)switch(t){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}function Lr(t,e){t.setAttribute("http.response.status_code",e);let n=cu(e);n.message!=="unknown_error"&&t.setStatus(n)}var To="sentry-",vS=/^sentry-/,bS=8192;function Io(t){let e=wS(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,s])=>{if(i.match(vS)){let o=i.slice(To.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function uu(t){if(!t)return;let e=Object.entries(t).reduce((n,[r,i])=>(i&&(n[`${To}${r}`]=i),n),{});return RS(e)}function wS(t){if(!(!t||!Ne(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=ih(n);return Object.entries(r).forEach(([i,s])=>{e[i]=s}
5),e},{}):ih(t)}function ih(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function RS(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],i)=>{let s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=i===0?s:`${e},${s}`;return o.length>bS?(Ke&&S.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},"")}var vo=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function sh(t){if(!t)return;let e=t.match(vo);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function lu(t,e){let n=sh(t),r=Io(e);if(!n||!n.traceId)return{traceId:Je(),spanId:Xe()};let{traceId:i,parentSpanId:s,parentSampled:o}=n,a=Xe();return{traceId:i,parentSpanId:s,spanId:a,sampled:o,dsc:r||{}}}function Ri(t=Je(),e=Xe(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}var bo=0,pu=1,oh=!1;function ch(t){let{spanId:e,traceId:n}=t.spanContext(),{data:r,op:i,parent_span_id:s,status:o,origin:a}=H(t);return ae({parent_span_id:s,span_id:e,trace_id:n,data:r,op:i,status:o,origin:a})}function fu(t){let{spanId:e,traceId:n,isRemote:r}=t.spanContext(),i=r?e:H(t).parent_span_id,s=r?Xe():e;return ae({parent_span_id:i,span_id:s,trace_id:n})}function wo(t){let{traceId:e,spanId:n}=t.spanContext(),r=ht(t);return Ri(e,n,r)}function Mt(t){return typeof t=="number"?ah(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?ah(t.getTime()):ge()}function ah(t){return t>9999999999?t/1e3:t}function H(t){if(NS(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(CS(t)){let{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:a,status:c}=t;return ae({span_id:e,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:Mt(i),timestamp:Mt(o)||void 0,status:Ro(c),op:r[je],origin:r[ie],_metrics_summary:bi(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function CS(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function NS(t){return typeof t.getSpanJSON=="function"}function ht(t){let{traceFlags:e}=t.spanContext();return e===pu}function Ro(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var tr="_sentryChildSpans",du="_sentryRootSpan";function Ao(t,e){let n=t[du]||t;Te(e,du,n),t[tr]?t[tr].add(e):Te(t,tr,new Set([e]))}function uh(t,e){t[tr]&&t[tr].delete(e)}function An(t){let e=new Set;function n(r){if(!e.has(r)&&ht(r)){e.add(r);let i=r[tr]?Array.from(r[tr]):[];for(let s of i)n(s)}}return n(t),Array.from(e)}function te(t){return t[du]||t}function Z(){let t=rt(),e=zt(t);return e.getActiveSpan?e.getActiveSpan():Qn(z())}function ko(){oh||(Oe(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),oh=!0)}var lh=!1;function Co(){lh||(lh=!0,_i(hu),yi(hu))}function hu(){let t=Z(),e=t&&te(t);if(e){let n="internal_error";U&&S.log(`[Tracing] Root span: ${n} -> Global error occurred`),e.setStatus({code:2,message:n})}}hu.tag="sentry_tracingErrorCallback";var dh="_sentryScope",ph="_sentryIsolationScope";function fh(t,e,n){t&&(Te(t,ph,n),Te(t,dh,e))}function mu(t){return{scope:t[dh],isolationScope:t[ph]}}function $e(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=M(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}var ot=class{constructor(e={}){this._traceId=e.traceId||Je(),this._spanId=e.spanId||Xe()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:bo}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}};var Ur="production";var hh="_frozenDsc";function gu(t,e){Te(t,hh,e)}function _u(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i=ae({environment:n.environment||Ur,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",i),i}function Ai(t,e){let n=e.getPropagationContext();return n.dsc||_u(n.traceId,t)}function We(t){let e=M();if(!e)return{};let n=te(t),r=n[hh];if(r)return r;let i=n.spanContext().traceState,s=i&&i.get("sentry.dsc"),o=s&&Io(s);if(o)return o;let a=_u(t.spanContext().traceId,e),c=H(n),u=c.data||{},d=u[Dr];d!=null&&(a.sample_rate=`${d}`);let l=u[_e],p=c.description;return l!=="url"&&p&&(a.transaction=p),$e()&&(a.sampled=String(ht(n))),e.emit("createDsc",a,n),a}function mh(t){if(!U)return;let{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=H(t),{spanId:i}=t.spanContext(),s=ht(t),o=te(t),a=o===t,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${i}`];
5if(r&&u.push(`parent ID: ${r}`),!a){let{op:d,description:l}=H(o);u.push(`root ID: ${o.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}S.log(`${c} 6 ${u.join(` 7 `)}`)}function gh(t){if(!U)return;let{description:e="< unknown name >",op:n="< unknown op >"}=H(t),{spanId:r}=t.spanContext(),s=te(t)===t,o=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${e}" with ID ${r}`;S.log(o)}function kn(t){if(typeof t=="boolean")return Number(t);let e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){U&&S.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)}.`);return}return e}function _h(t,e){if(!$e(t))return[!1];let n=ve().getScopeData().sdkProcessingMetadata.normalizedRequest,r=C(f({},e),{normalizedRequest:e.normalizedRequest||n}),i;typeof t.tracesSampler=="function"?i=t.tracesSampler(r):r.parentSampled!==void 0?i=r.parentSampled:typeof t.tracesSampleRate<"u"?i=t.tracesSampleRate:i=1;let s=kn(i);return s===void 0?(U&&S.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):s?Math.random()<s?[!0,s]:(U&&S.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[!1,s]):(U&&S.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,s])}var OS=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function PS(t){return t==="http"||t==="https"}function mt(t,e=!1){let{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function yh(t){let e=OS.exec(t);if(!e){Oe(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",s="",o="",a=""]=e.slice(1),c="",u=a,d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){let l=u.match(/^\d+/);l&&(u=l[0])}return Sh({host:s,pass:i,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function Sh(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function MS(t){if(!Ke)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(S.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?PS(r)?e&&isNaN(parseInt(e,10))?(S.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(S.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(S.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ki(t){let e=typeof t=="string"?yh(t):Sh(t);if(!(!e||!MS(e)))return e}function Eh(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let s=0;s<e.length;s++)if(e[s]===i)return!0;return e.push(i),!1}function r(i){if(t)e.delete(i);else for(let s=0;s<e.length;s++)if(e[s]===i){e.splice(s,1);break}}return[n,r]}function Ve(t,e=100,n=1/0){try{return yu("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function No(t,e=3,n=100*1024){let r=Ve(t,e);return US(r)>n?No(t,e-1,n):r}function yu(t,e,n=1/0,r=1/0,i=Eh()){let[s,o]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;let a=DS(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;let c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(s(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return yu("",m,c-1,r,i)}catch{}let d=Array.isArray(e)?[]:{},l=0,p=yo(e);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(l>=r){d[m]="[MaxProperties ~]";break}let h=p[m];d[m]=yu(m,h,c-1,r,i),l++}return o(e),d}function DS(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(Ei(e))return"[VueViewModel]";if(Zc(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${Ye(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=xS(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function xS(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function LS(t){return~-encodeURI(t).split(/%..|./).length}function US(t){return LS(JSON.stringify(t))}function at(t,e=[]){return[t,e]}function Eu(t,e){let[n,r]=t;return[n,[...r,e]]}function Oo(t,e){let n=t[1];for(let r of n){let i=r[0].type;if(e(r,i))return!0}return!1}function Su(t){return F.__SENTRY__&&F.__SENTRY__.encodePolyfill?F.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function Tu(t){let[e,n]=t,r=JSON.stringify(e);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[Su(r),s]:r.push(typeof s=="string"?Su(s):s)}for(let s of n){let[o,a]=s;if(i(` 8${JSON.stringify(o)}
9`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ve(a))}i(c)}}return typeof r=="string"?r:FS(r)}function FS(t){let e=t.reduce((i,s)=>i+s.length,0),n=new Uint8Array(e),r=0;for(let i of t)n.set(i,r),r+=i.length;return n}function Iu(t){return[{type:"span"},t]}function vu(t){let e=typeof t.data=="string"?Su(t.data):t.data;return[ae({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var BS={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Po(t){return BS[t]}function Fr(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function Ci(t,e,n,r){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return f(f(f({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:mt(r)}),i&&{trace:ae(f({},i))})}function HS(t,e){return 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}function Th(t,e,n,r){let i=Fr(n),s=f(f({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:mt(e)}),o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return at(s,[o])}function Ih(t,e,n,r){let i=Fr(n),s=t.type&&t.type!=="replay_event"?t.type:"event";HS(t,n&&n.sdk);let o=Ci(t,i,r,e);return delete t.sdkProcessingMetadata,at(o,[[{type:s},t]])}function vh(t,e){function n(d){return!!d.trace_id&&!!d.public_key}let r=We(t[0]),i=e&&e.getDsn(),s=e&&e.getOptions().tunnel,o=f(f({sent_at:new Date().toISOString()},n(r)&&{trace:r}),!!s&&i&&{dsn:mt(i)}),a=e&&e.getOptions().beforeSendSpan,c=a?d=>{let l=a(H(d));return l||ko(),l}:d=>H(d),u=[];for(let d of t){let l=c(d);l&&u.push(Iu(l))}return at(o,u)}function Mo(t,e,n,r=Z()){let i=r&&te(r);i&&(U&&S.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),i.addEvent(t,{[Rn]:e,[wn]:n}))}function Do(t){if(!t||t.length===0)return;let e={};return t.forEach(n=>{let r=n.attributes||{},i=r[wn],s=r[Rn];typeof i=="string"&&typeof s=="number"&&(e[n.name]={value:s,unit:i})}),e}var bh=1e3,Br=class{constructor(e={}){this._traceId=e.traceId||Je(),this._spanId=e.spanId||Xe(),this._startTime=e.startTimestamp||ge(),this._attributes={},this.setAttributes(f({[ie]:"manual",[je]:e.op},e.attributes)),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,n){}spanContext(){let{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?pu:bo}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=Mt(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(_e,"custom"),this}end(e){this._endTime||(this._endTime=Mt(e),gh(this),this._onSpanEnded())}getSpanJSON(){return ae({data:this._attributes,description:this._name,op:this._attributes[je],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ro(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ie],_metrics_summary:bi(this),profile_id:this._attributes[au],exclusive_time:this._attributes[er],measurements:Do(this._events),is_segment:this._isStandaloneSpan&&te(this)===this||void 0,segment_id:this._isStandaloneSpan?te(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){U&&S.log("[Tracing] Adding an event to span:",e);let i=wh(n)?n:r||ge(),s=wh(n)?{}:n||{},o={name:e,time:Mt(i),attributes:s};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=M();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===te(this)))return;if(this._isStandaloneSpan){this._sampled?$S(vh([this],e)):(U&&S.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}let r=this._convertSpanToTransaction();r&&(mu(this).scope||z()).captureEvent(r)}_convertSpanToTransaction(){if(!Rh(H(this)))return;this._name||(U&&S.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:e,isolationScope:n}=mu(this),i=(e||z()).getClient()||M();if(this._sampled!==!0){U&&S.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),i&&i.recordDroppedEvent("sample_rate","transaction");return}let o=An(this).filter(l=>
9l!==this&&!jS(l)).map(l=>H(l)).filter(Rh),a=this._attributes[_e];delete this._attributes[wi],o.forEach(l=>{l.data&&delete l.data[wi]});let c=f({contexts:{trace:ch(this)},spans:o.length>bh?o.sort((l,p)=>l.start_timestamp-p.start_timestamp).slice(0,bh):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:f({capturedSpanScope:e,capturedSpanIsolationScope:n},ae({dynamicSamplingContext:We(this)})),_metrics_summary:bi(this)},a&&{transaction_info:{source:a}}),u=Do(this._events);return u&&Object.keys(u).length&&(U&&S.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}};function wh(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function Rh(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function jS(t){return t instanceof Br&&t.isStandaloneSpan()}function $S(t){let e=M();if(!e)return;let n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}var kh="__SENTRY_SUPPRESS_TRACING__";function ct(t){let e=Ch();if(e.startInactiveSpan)return e.startInactiveSpan(t);let n=VS(t),{forceTransaction:r,parentSpan:i}=t;return(t.scope?o=>Zn(t.scope,o):i!==void 0?o=>Ni(i,o):o=>o())(()=>{let o=z(),a=GS(o);return t.onlyIfParent&&!a?new ot:WS({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function Ni(t,e){let n=Ch();return n.withActiveSpan?n.withActiveSpan(t,e):Zn(r=>(bn(r,t||void 0),e(r)))}function WS({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!$e())return new ot;let i=ve(),s;if(t&&!n)s=qS(t,r,e),Ao(t,s);else if(t){let o=We(t),{traceId:a,spanId:c}=t.spanContext(),u=ht(t);s=Ah(f({traceId:a,parentSpanId:c},e),r,u),gu(s,o)}else{let{traceId:o,dsc:a,parentSpanId:c,sampled:u}=f(f({},i.getPropagationContext()),r.getPropagationContext());s=Ah(f({traceId:o,parentSpanId:c},e),r,u),a&&gu(s,a)}return mh(s),fh(s,r,i),s}function VS(t){let e=t.experimental||{},n=f({isStandalone:e.standalone},t);if(t.startTime){let r=f({},n);return r.startTimestamp=Mt(t.startTime),delete r.startTime,r}return n}function Ch(){let t=rt();return zt(t)}function Ah(t,e,n){let r=M(),i=r&&r.getOptions()||{},{name:s="",attributes:o}=t,[a,c]=e.getScopeData().sdkProcessingMetadata[kh]?[!1]:_h(i,{name:s,parentSampled:n,attributes:o,transactionContext:{name:s,parentSampled:n}}),u=new Br(C(f({},t),{attributes:f({[_e]:"custom"},t.attributes),sampled:a}));return c!==void 0&&u.setAttribute(Dr,c),r&&r.emit("spanStart",u),u}function qS(t,e,n){let{spanId:r,traceId:i}=t.spanContext(),s=e.getScopeData().sdkProcessingMetadata[kh]?!1:ht(t),o=s?new Br(C(f({},n),{parentSpanId:r,traceId:i,sampled:s})):new ot({traceId:i});Ao(t,o);let a=M();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function GS(t){let e=Qn(t);if(!e)return;let n=M();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?te(e):e}var Hr={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},zS="heartbeatFailed",KS="idleTimeout",YS="finalTimeout",JS="externalFinish";function xo(t,e={}){let n=new Map,r=!1,i,s=JS,o=!e.disableAutoFinish,a=[],{idleTimeout:c=Hr.idleTimeout,finalTimeout:u=Hr.finalTimeout,childSpanTimeout:d=Hr.childSpanTimeout,beforeSpanEnd:l}=e,p=M();if(!p||!$e())return new ot;let m=z(),h=Z(),g=XS(t);g.end=new Proxy(g.end,{apply(v,I,k){l&&l(g);let[B,...b]=k,D=B||ge(),L=Mt(D),X=An(g).filter(w=>w!==g);if(!X.length)return j(L),Reflect.apply(v,I,[L,...b]);let ce=X.map(w=>H(w).timestamp).filter(w=>!!w),be=ce.length?Math.max(...ce):void 0,T=H(g).start_timestamp,R=Math.min(T?T+u/1e3:1/0,Math.max(T||-1/0,Math.min(L,be||1/0)));return j(R),Reflect.apply(v,I,[R,...b])}});function y(){i&&(clearTimeout(i),i=void 0)}function E(v){y(),i=setTimeout(()=>{!r&&n.size===0&&o&&(s=KS,g.end(v))},c)}function A(v){i=setTimeout(()=>{!r&&o&&(s=zS,g.end(v))},d)}function O(v){y(),n.set(v,!0);let I=ge();A(I+d/1e3)}function P(v){if(n.has(v)&&n.delete(v),n.size===0){let I=ge();E(I+c/1e3)}}function j(v){r=!0,n.clear(),a.forEach(L=>L()),bn(m,h);let I=H(g),{start_timestamp:k}=I;if(!k)return;(I.data||{})[xr]||g.setAttribute(xr,s),S.log(`[Tracing] Idle span "${I.op}" finished`);let b=An(g).filter(L=>L!==g),D=0;b.forEach(L=>{L.isRecording()&&(L.setStatus({code:2,message:"cancelled"}),L.end(v),U&&S.log("[Tracing] Cancelling span since span ended early",JSON.stringify(L,void 0,2)));let X=H(L),{timestamp:ce=0,start_timestamp:be=0}=X,T=be<=v,R=(u+c)/1e3,w=ce-be<=R;if(U){let q=JSON.stringify(L,void 0,2);T?w||S.log("[Tracing] Discarding span since it finished after idle span final timeout",q):S.log("[Tracing] Discarding span since it happened after idle span was finished",q)}(!w||!T)&&(uh(g,L),D++)}),D>0&&g.setAttribute("sentry.idle_span_discarded_spans",D)}return a.push(p.on("spanStart",v=>{if(r||v===g||H(v).timestamp)return;An(g).includes(v)&&O(v.spanContext().spanId)})),a.push(p.on("spanEnd",v=>{r||P(v.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",v=>{v===g&&(o=!0,E(),n.size&&A())})),e.disableAutoFinish||E(),setTimeout(()=>{r||(g.setStatus({code:2,message:"deadline_exceeded"}),s=YS,g.end())},u),g}function XS(t){let e=ct(t);
9return bn(z(),e),U&&S.log("[Tracing] Started span is an idle span"),e}function Lo(t,e,n,r=0){return new Pt((i,s)=>{let o=t[r];if(e===null||typeof o!="function")i(e);else{let a=o(f({},e),n);U&&o.id&&a===null&&S.log(`Event processor "${o.id}" dropped event`),an(a)?a.then(c=>Lo(t,c,n,r+1).then(i)).then(null,s):Lo(t,a,n,r+1).then(i).then(null,s)}})}var Uo,Nh,Fo;function Oh(t){let e=F._sentryDebugIds;if(!e)return{};let n=Object.keys(e);return Fo&&n.length===Nh||(Nh=n.length,Fo=n.reduce((r,i)=>{Uo||(Uo={});let s=Uo[i];if(s)r[s[0]]=s[1];else{let o=t(i);for(let a=o.length-1;a>=0;a--){let c=o[a],u=c&&c.filename,d=e[i];if(u&&d){r[u]=d,Uo[i]=[u,d];break}}}return r},{})),Fo}function Ph(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=e;QS(t,e),r&&tE(t,r),nE(t,n),ZS(t,i),eE(t,s)}function bu(t,e){let{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:p,transactionName:m,span:h}=e;Bo(t,"extra",n),Bo(t,"tags",r),Bo(t,"user",i),Bo(t,"contexts",s),t.sdkProcessingMetadata=Pr(t.sdkProcessingMetadata,a,2),o&&(t.level=o),m&&(t.transactionName=m),h&&(t.span=h),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),l.length&&(t.attachments=[...t.attachments,...l]),t.propagationContext=f(f({},t.propagationContext),p)}function Bo(t,e,n){t[e]=Pr(t[e],n,1)}function QS(t,e){let{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=e,c=ae(n);c&&Object.keys(c).length&&(t.extra=f(f({},c),t.extra));let u=ae(r);u&&Object.keys(u).length&&(t.tags=f(f({},u),t.tags));let d=ae(i);d&&Object.keys(d).length&&(t.user=f(f({},d),t.user));let l=ae(s);l&&Object.keys(l).length&&(t.contexts=f(f({},l),t.contexts)),o&&(t.level=o),a&&t.type!=="transaction"&&(t.transaction=a)}function ZS(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function eE(t,e){t.sdkProcessingMetadata=f(f({},t.sdkProcessingMetadata),e)}function tE(t,e){t.contexts=f({trace:fu(e)},t.contexts),t.sdkProcessingMetadata=f({dynamicSamplingContext:We(e)},t.sdkProcessingMetadata);let n=te(e),r=H(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function nE(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function Oi(t,e,n,r,i,s){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c=C(f({},e),{event_id:e.event_id||n.event_id||Ie(),timestamp:e.timestamp||qt()}),u=n.integrations||t.integrations.map(y=>y.name);rE(c,t),oE(c,u),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&iE(c,t.stackParser);let d=cE(r,n.captureContext);n.mechanism&&Gt(c,n.mechanism);let l=i?i.getEventProcessors():[],p=Eo().getScopeData();if(s){let y=s.getScopeData();bu(p,y)}if(d){let y=d.getScopeData();bu(p,y)}let m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),Ph(c,p);let h=[...l,...p.eventProcessors];return Lo(h,c,n).then(y=>(y&&sE(y),typeof o=="number"&&o>0?aE(y,o,a):y))}function rE(t,e){let{environment:n,release:r,dist:i,maxValueLength:s=250}=e;t.environment=t.environment||n||Ur,!t.release&&r&&(t.release=r),!t.dist&&i&&(t.dist=i),t.message&&(t.message=Vt(t.message,s));let o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=Vt(o.value,s));let a=t.request;a&&a.url&&(a.url=Vt(a.url,s))}function iE(t,e){let n=Oh(e);try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{n&&i.filename&&(i.debug_id=n[i.filename])})})}catch{}}function sE(t){let e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.entries(e).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function oE(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function aE(t,e,n){if(!t)return null;let r=f(f(f(f(f({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>f(f({},i),i.data&&{data:Ve(i.data,e,n)}))}),t.user&&{user:Ve(t.user,e,n)}),t.contexts&&{contexts:Ve(t.contexts,e,n)}),t.extra&&{extra:Ve(t.extra,e,n)});return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Ve(t.contexts.trace.data,e,
9n))),t.spans&&(r.spans=t.spans.map(i=>f(f({},i),i.data&&{data:Ve(i.data,e,n)}))),t.contexts&&t.contexts.flags&&r.contexts&&(r.contexts.flags=Ve(t.contexts.flags,3,n)),r}function cE(t,e){if(!e)return t;let n=t?t.clone():new st;return n.update(e),n}function Mh(t){if(t)return uE(t)?{captureContext:t}:dE(t)?{captureContext:t}:t}function uE(t){return t instanceof st||typeof t=="function"}var lE=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function dE(t){return Object.keys(t).some(e=>lE.includes(e))}function Cn(t,e){return z().captureException(t,Mh(e))}function Pi(t,e){return z().captureEvent(t,e)}function jr(t,e){ve().setContext(t,e)}function Ho(){return ve().lastEventId()}function wu(){let t=M();return!!t&&t.getOptions().enabled!==!1&&!!t.getTransport()}function jo(t){ve().addEventProcessor(t)}function Mi(t){let e=M(),n=ve(),r=z(),{release:i,environment:s=Ur}=e&&e.getOptions()||{},{userAgent:o}=F.navigator||{},a=Qf(f(f({release:i,environment:s,user:r.getUser()||n.getUser()},o&&{userAgent:o}),t)),c=n.getSession();return c&&c.status==="ok"&&un(c,{status:"exited"}),$o(),n.setSession(a),r.setSession(a),a}function $o(){let t=ve(),e=z(),n=e.getSession()||t.getSession();n&&Zf(n),xh(),t.setSession(),e.setSession()}function xh(){let t=ve(),e=z(),n=M(),r=e.getSession()||t.getSession();r&&n&&n.captureSession(r)}function Di(t=!1){if(t){$o();return}xh()}var pE="7";function Lh(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function fE(t){return`${Lh(t)}${t.projectId}/envelope/`}function hE(t,e){let n={sentry_version:pE};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function Ru(t,e,n){return e||`${fE(t)}?${hE(t,n)}`}function Au(t,e){let n=ki(t);if(!n)return"";let r=`${Lh(n)}embed/error-page/`,i=`dsn=${mt(n)}`;for(let s in e)if(s!=="dsn"&&s!=="onClose")if(s==="user"){let o=e.user;if(!o)continue;o.name&&(i+=`&name=${encodeURIComponent(o.name)}`),o.email&&(i+=`&email=${encodeURIComponent(o.email)}`)}else i+=`&${encodeURIComponent(s)}=${encodeURIComponent(e[s])}`;return`${r}?${i}`}var Uh=[];function mE(t){let e={};return t.forEach(n=>{let{name:r}=n,i=e[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.values(e)}function ku(t){let e=t.defaultIntegrations||[],n=t.integrations;e.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){let o=n(e);r=Array.isArray(o)?o:[o]}else r=e;let i=mE(r),s=i.findIndex(o=>o.name==="Debug");if(s>-1){let[o]=i.splice(s,1);i.push(o)}return i}function Fh(t,e){let n={};return e.forEach(r=>{r&&Nu(t,r,n)}),n}function Cu(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Nu(t,e,n){if(n[e.name]){U&&S.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Uh.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Uh.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,s)=>r(i,s,t))}if(typeof e.processEvent=="function"){let r=e.processEvent.bind(e),i=Object.assign((s,o)=>r(s,o,t),{id:e.name});t.addEventProcessor(i)}U&&S.log(`Integration installed: ${e.name}`)}function Bh(t,e,n){let r=[{type:"client_report"},{timestamp:n||qt(),discarded_events:t}];return at(e?{dsn:e}:{},[r])}var Ue=class extends Error{constructor(e,n="warn"){super(e),this.message=e,this.logLevel=n}};var Hh="Not capturing exception because it's already been captured.",xi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=ki(e.dsn):U&&S.warn("No DSN provided, client will not send events."),this._dsn){let i=Ru(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(C(f({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:i}))}let r=["enableTracing","tracesSampleRate","tracesSampler"].find(i=>i in e&&e[i]==null);r&&Oe(()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(e,n,r){let i=Ie();if(So(e))return U&&S.log(Hh),i;let s=f({event_id:i},n);return this._process(this.eventFromException(e,s).then(o=>this._captureEvent(o,s,r))),s.event_id}captureMessage(e,n,r,i){let s=f({event_id:Ie()},r),o=Cr(e)?e:String(e),a=Yn(e)?this.eventFromMessage(o,n,s):this.eventFromException(e,s);return this._process(a.then(c=>this._captureEvent(c,s,i))),s.event_id}captureEvent(e,n,r){let i=Ie();if(n&&n.originalException&&So(n.originalException))return U&&S.log(Hh),i;let s=f({event_id:i},n),a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,s,a||r)),s.event_id}captureSession(e){typeof e.release!="string"?U&&S.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),un(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let n=this._transport;
9return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(i=>r&&i))):He(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];Nu(this,e,this._integrations),n||Cu(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Ih(e,this._dsn,this._options._metadata,this._options.tunnel);for(let s of n.attachments||[])r=Eu(r,vu(s));let i=this.sendEnvelope(r);i&&i.then(s=>this.emit("afterSendEvent",e,s),null)}sendSession(e){let n=Th(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){let i=typeof r=="number"?r:1,s=`${e}:${n}`;U&&S.log(`Recording outcome: "${s}"${i>1?` (${i} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+i}}on(e,n){let r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{let i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(e,...n){let r=this._hooks[e];r&&r.forEach(i=>i(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(U&&S.error("Error while sending envelope:",n),n)):(U&&S.error("Transport disabled"),He({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Fh(this,e),Cu(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",i=!1,s=n.exception&&n.exception.values;if(s){i=!0;for(let c of s){let u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(un(e,C(f({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new Pt(n=>{let r=0,i=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(r+=i,e&&r>=e&&(clearInterval(s),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r=z(),i=ve()){let s=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),Oi(s,e,n,r,this,i).then(a=>{if(a===null)return a;a.contexts=f({trace:ou(r)},a.contexts);let c=Ai(this,r);return a.sdkProcessingMetadata=f({dynamicSamplingContext:c},a.sdkProcessingMetadata),a})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(i=>i.event_id,i=>{U&&(i instanceof Ue&&i.logLevel==="log"?S.log(i.message):S.warn(i))})}_processEvent(e,n,r){let i=this.getOptions(),{sampleRate:s}=i,o=$h(e),a=jh(e),c=e.type||"error",u=`before send for type \`${c}\``,d=typeof s>"u"?void 0:kn(s);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",e),vn(new Ue(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));let l=c==="replay_event"?"replay":c,m=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,m).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",l,e),new Ue("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return h;let y=_E(this,i,h,n);return gE(y,u)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",l,e),o){let A=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",A)}throw new Ue(`${u} returned \`null\`, will not send event.`,"log")}let g=r&&r.getSession();if(!o&&g&&this._updateSessionFromEvent(g,h),o){let E=h.sdkProcessingMetadata&&h.sdkProcessingMetadata.spanCountBeforeProcessing||0,A=h.spans?h.spans.length:0,O=E-A;O>0&&this.recordDroppedEvent("before_send","span",O)}let y=h.transaction_info;if(o&&y&&h.transaction!==e.transaction){let E="custom";h.transaction_info=C(f({},y),{source:E})}return this.sendEvent(h,n),h}).then(null,h=>{throw h instanceof Ue?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new Ue(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${h}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{let[i,s]=n.split(":");return{reason:i,category:s,quantity:r}})}_flushOutcomes(){U&&S.log("Flushing outcomes...");let e=this._clearOutcomes();if(e.length===0){U&&S.log("No outcomes to send");return}if(!this._dsn){U&&S.log("No dsn provided, will not send outcomes");return}U&&S.log("Sending outcomes:",e);let n=Bh(e,this._options.tunnel&&mt(this._dsn));this.sendEnvelope(n)}};function gE(t,e){let n=`${e} must return \`null\` or a valid event.`;if(an(t))return t.then(r=>{if(!Nt(r)&&r!==null)throw new Ue(n);return r},r=>{throw new Ue(`${e} rejected with ${r}`)});if(!Nt(t)&&t!==null)throw new Ue(n);return t}function _E(t,e,n,r){let{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=e;if(jh(n)&&i)return i(n,r);if($h(n)){if(n.spans&&o){let a=[];for(let c of n.spans){let u=o(c);u?a.push(u):(ko(),t.recordDroppedEvent("before_send","span"))}n.spans=a}if(s){if(n.spans){let a=n.spans.length;n.sdkProcessingMetadata=C(f({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:a})}return s(n,r)}}return n}function jh(t){return t.type===void 0}function $h(t){return t.type==="transaction"}function Ou(t,e){e.debug===!0&&(U?S.enable():Oe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),z().update(e.initialScope);let r=new t(e);return Pu(r),r.init(),r}function Pu(t){z().setClient(t)}function Wh(t){let e=[];function n(){return t===void 0||e.length<t}function r(o){return e.splice(e.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!n())return vn(new Ue("Not adding Promise because buffer limit was reached."));let a=o();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function s(o){return new Pt((a,c)=>{let u=e.length;if(!u)return a(!0);let d=setTimeout(()=>{o&&o>0&&a(!1)},o);e.forEach(l=>{He(l).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:e,add:i,drain:s}}function Vh(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}function qh(t,e){return t[e]||t.all||0}function Li(t,e,n=Date.now()){return qh(t,e)>n}function Ui(t,{statusCode:e,headers:n},r=Date.now()){let i=f({},t),s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(let a of s.trim().split(",")){let[c,u,,,d]=a.split(":",5),l=parseInt(c,10),p=(isNaN(l)?60:l)*1e3;if(!u)i.all=r+p;else for(let m of u.split(";"))m==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(i[m]=r+p):i[m]=r+p}else o?i.all=r+Vh(o,r):e===429&&(i.all=r+60*1e3);return i}var yE=64;function Wo(t,e,n=Wh(t.bufferSize||yE)){let r={},i=o=>n.drain(o);function s(o){let a=[];if(Oo(o,(l,p)=>{let m=Po(p);if(Li(r,m)){let h=Gh(l,p);t.recordDroppedEvent("ratelimit_backoff",m,h)}else a.push(l)}),a.length===0)return He({});let c=at(o[0],a),u=l=>{Oo(c,(p,m)=>{let h=Gh(p,m);t.recordDroppedEvent(l,Po(m),h)})},d=()=>e({body:Tu(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&U&&S.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Ui(r,l),l),l=>{throw u("network_error"),l});return n.add(d).then(l=>l,l=>{if(l instanceof Ue)return U&&S.error("Skipped sending event because buffer is full."),u("queue_overflow"),He({});throw l})}return{send:s,flush:i}}function Gh(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function Mu(t,e){let n=e&&e.getDsn(),r=e&&e.getOptions().tunnel;return EE(t,n)||SE(t,r)}function SE(t,e){return e?zh(t)===zh(e):!1}
10function EE(t,e){return e?t.includes(e.host):!1}function zh(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function Fi(t,e,n=[e],r="npm"){let i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:Ct})),version:Ct}),t._metadata=i}function Bi(t={}){let e=M();if(!wu()||!e)return{};let n=rt(),r=zt(n);if(r.getTraceData)return r.getTraceData(t);let i=z(),s=t.span||Z(),o=s?wo(s):TE(i),a=s?We(s):Ai(e,i),c=uu(a);return vo.test(o)?{"sentry-trace":o,baggage:c}:(S.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function TE(t){let{traceId:e,sampled:n,spanId:r}=t.getPropagationContext();return Ri(e,r,n)}var IE=100;function gt(t,e){let n=M(),r=ve();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=IE}=n.getOptions();if(s<=0)return;let o=qt(),a=f({timestamp:o},t),c=i?Oe(()=>i(a,e)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,s))}var Kh,vE="FunctionToString",Yh=new WeakMap,bE=()=>({name:vE,setupOnce(){Kh=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=Xn(this),n=Yh.has(M())&&e!==void 0?e:this;return Kh.apply(n,t)}}catch{}},setup(t){Yh.set(t,!0)}}),$r=bE;var wE=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],RE="InboundFilters",AE=(t={})=>({name:RE,processEvent(e,n,r){let i=r.getOptions(),s=kE(t,i);return CE(e,s)?null:e}}),Wr=AE;function kE(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:wE],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function CE(t,e){return e.ignoreInternal&&xE(t)?(U&&S.warn(`Event dropped due to being internal Sentry Error. 11Event: ${Ot(t)}`),!0):NE(t,e.ignoreErrors)?(U&&S.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${Ot(t)}`),!0):UE(t)?(U&&S.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${Ot(t)}`),!0):OE(t,e.ignoreTransactions)?(U&&S.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 14Event: ${Ot(t)}`),!0):PE(t,e.denyUrls)?(U&&S.warn(`Event dropped due to being matched by \`denyUrls\` option. 15Event: ${Ot(t)}. 16Url: ${Vo(t)}`),!0):ME(t,e.allowUrls)?!1:(U&&S.warn(`Event dropped due to not being matched by \`allowUrls\` option. 17Event: ${Ot(t)}. 18Url: ${Vo(t)}`),!0)}function NE(t,e){return t.type||!e||!e.length?!1:DE(t).some(n=>ft(n,e))}function OE(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?ft(n,e):!1}function PE(t,e){if(!e||!e.length)return!1;let n=Vo(t);return n?ft(n,e):!1}function ME(t,e){if(!e||!e.length)return!0;let n=Vo(t);return n?ft(n,e):!0}function DE(t){let e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function xE(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function LE(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Vo(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?LE(e):null}catch{return U&&S.error(`Cannot extract url for event ${Ot(t)}`),null}}function UE(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}function xu(t,e,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!it(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=FE(Du(t,e,i,o.originalException,r,s.exception.values,a,0),n))}function Du(t,e,n,r,i,s,o,a){if(s.length>=n+1)return s;let c=[...s];if(it(r[i],Error)){Jh(o,a);let u=t(e,r[i]),d=c.length;Xh(u,i,d,a),c=Du(t,e,n,r[i],i,[u,...c],u,d)}
18return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(it(u,Error)){Jh(o,a);let l=t(e,u),p=c.length;Xh(l,`errors[${d}]`,p,a),c=Du(t,e,n,u,i,[l,...c],l,p)}}),c}function Jh(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=C(f(f({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Xh(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=C(f({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function FE(t,e){return t.map(n=>(n.value&&(n.value=Vt(n.value,e)),n))}function _t(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Lu(t){return t.split(/[?#]/,1)[0]}function Uu(t){let e="console";De(e,t),xe(e,BE)}function BE(){"console"in F&&gi.forEach(function(t){t in F.console&&Ee(F.console,t,function(e){return Ar[t]=e,function(...n){Re("console",{args:n,level:t});let i=Ar[t];i&&i.apply(F.console,n)}})})}function Hi(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var HE="Dedupe",jE=()=>{let t;return{name:HE,processEvent(e){if(e.type)return e;try{if($E(e,t))return U&&S.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Vr=jE;function $E(t,e){return e?!!(WE(t,e)||VE(t,e)):!1}function WE(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!em(t,e)||!Zh(t,e))}function VE(t,e){let n=Qh(e),r=Qh(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!em(t,e)||!Zh(t,e))}function Zh(t,e){let n=po(t),r=po(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let s=r[i],o=n[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function em(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Qh(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Fu(t,e,n,r,i="auto.http.browser"){if(!t.fetchData)return;let s=$e()&&e(t.fetchData.url);if(t.endTimestamp&&s){let p=t.fetchData.__span;if(!p)return;let m=r[p];m&&(zE(m,t),delete r[p]);return}let{method:o,url:a}=t.fetchData,c=GE(a),u=c?_t(c).host:void 0,d=!!Z(),l=s&&d?ct({name:`${o} ${a}`,attributes:{url:a,type:"fetch","http.method":o,"http.url":c,"server.address":u,[ie]:i,[je]:"http.client"}}):new ot;if(t.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(t.fetchData.url)){let p=t.args[0],m=t.args[1]||{},h=qE(p,m,$e()&&d?l:void 0);h&&(t.args[1]=m,m.headers=h)}return l}function qE(t,e,n){let r=Bi({span:n}),i=r["sentry-trace"],s=r.baggage;if(!i)return;let o=e.headers||(KE(t)?t.headers:void 0);if(o)if(YE(o)){let a=new Headers(o);if(a.set("sentry-trace",i),s){let c=a.get("baggage");if(c){let u=qo(c);a.set("baggage",u?`${u},${s}`:s)}else a.set("baggage",s)}return a}else if(Array.isArray(o)){let a=[...o.filter(c=>!(Array.isArray(c)&&c[0]==="sentry-trace")).map(c=>{if(Array.isArray(c)&&c[0]==="baggage"&&typeof c[1]=="string"){let[u,d,...l]=c;return[u,qo(d),...l]}else return c}),["sentry-trace",i]];return s&&a.push(["baggage",s]),a}else{let a="baggage"in o?o.baggage:void 0,c=[];return Array.isArray(a)?c=a.map(u=>typeof u=="string"?qo(u):u).filter(u=>u===""):a&&c.push(qo(a)),s&&c.push(s),C(f({},o),{"sentry-trace":i,baggage:c.length>0?c.join(","):void 0})}else return f({},r)}function GE(t){try{return new URL(t).href}catch{return}}function zE(t,e){if(e.response){Lr(t,e.response.status);let n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){let r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus({code:2,message:"internal_error"});t.end()}function qo(t){return t.split(",").filter(e=>!e.split("=")[0].startsWith(To)).join(",")}function KE(t){return typeof Request<"u"&&it(t,Request)}function YE(t){return typeof Headers<"u"&&it(t,Headers)}function Go(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var Bu=F;function zo(){if(!("fetch"in Bu))return!1;
18try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ji(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Hu(){if(typeof EdgeRuntime=="string")return!0;if(!zo())return!1;if(ji(Bu.fetch))return!0;let t=!1,e=Bu.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=ji(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Ke&&S.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function $i(t,e){let n="fetch";De(n,t),xe(n,()=>nm(void 0,e))}function $u(t){let e="fetch-body-resolved";De(e,t),xe(e,()=>nm(XE))}function nm(t,e=!1){e&&!Hu()||Ee(F,"fetch",function(n){return function(...r){let i=new Error,{method:s,url:o}=QE(r),a={args:r,fetchData:{method:s,url:o},startTimestamp:ge()*1e3,virtualError:i};return t||Re("fetch",f({},a)),n.apply(F,r).then(c=>_(this,null,function*(){return t?t(c):Re("fetch",C(f({},a),{endTimestamp:ge()*1e3,response:c})),c}),c=>{throw Re("fetch",C(f({},a),{endTimestamp:ge()*1e3,error:c})),Kn(c)&&c.stack===void 0&&(c.stack=i.stack,Te(c,"framesToPop",1)),c})}})}function JE(t,e){return _(this,null,function*(){if(t&&t.body){let n=t.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),s=!0;for(;s;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:a}=yield r.read();clearTimeout(o),a&&(e(),s=!1)}catch{s=!1}finally{clearTimeout(o)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}})}function XE(t){let e;try{e=t.clone()}catch{return}JE(e,()=>{Re("fetch-body-resolved",{endTimestamp:ge()*1e3,response:t})})}function ju(t,e){return!!t&&typeof t=="object"&&!!t[e]}function tm(t){return typeof t=="string"?t:t?ju(t,"url")?t.url:t.toString?t.toString():"":""}function QE(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:tm(n),method:ju(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:tm(e),method:ju(e,"method")?String(e.method).toUpperCase():"GET"}}function Wu(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Vu(){return"npm"}function rm(){return!Wu()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ko(){return typeof window<"u"&&(!rm()||ZE())}function ZE(){let t=F.process;return!!t&&t.type==="renderer"}var Yo=F;function qu(){let t=Yo.chrome,e=t&&t.app&&t.app.runtime,n="history"in Yo&&!!Yo.history.pushState&&!!Yo.history.replaceState;return!e&&n}function Gu(t,e){return t??e()}function qr(t){let e,n=t[0],r=1;for(;r<t.length;){let i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(e,...o)),e=void 0)}return n}var Gr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var _T=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",yt=(t,e,n,r)=>{let i,s;return o=>{e.value>=0&&(o||r)&&(s=e.value-(i||0),(s||i===void 0)&&(i=e.value,e.delta=s,e.rating=_T(e.value,n),t(e)))}};var N=F;var im=()=>`v4-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var ln=(t=!0)=>{let e=N.performance&&N.performance.getEntriesByType&&N.performance.getEntriesByType("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e};var Kt=()=>{let t=ln();return t&&t.activationStart||0};var St=(t,e)=>{let n=ln(),r="navigate";return n&&(N.document&&N.document.prerendering||Kt()>0?r="prerender":N.document&&N.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:im(),navigationType:r}};var Qe=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}};var Et=t=>{let e=n=>{(n.type==="pagehide"||N.document&&N.document.visibilityState==="hidden")&&t(n)};N.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))};var Nn=t=>{let e=!1;return()=>{e||(t(),e=!0)}};var Vi=-1,yT=()=>N.document.visibilityState==="hidden"&&!N.document.prerendering?0:1/0,Jo=t=>{N.document.visibilityState==="hidden"&&Vi>-1&&(Vi=t.type==="visibilitychange"?t.timeStamp:0,ET())},ST=()=>{addEventListener("visibilitychange",Jo,!0),addEventListener("prerenderingchange",Jo,!0)},ET=()=>{removeEventListener("visibilitychange",Jo,!0),removeEventListener("prerenderingchange",Jo,!0)},On=()=>(N.document&&Vi<0&&(Vi=yT(),ST()),{get firstHiddenTime(){return Vi}});var Yt=t=>{N.document&&N.document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()};var TT=[1800,3e3],sm=(t,e={})=>{Yt(()=>{let n=On(),r=St("FCP"),i,o=Qe("paint",a=>{a.forEach(c=>{c.name==="first-contentful-paint"&&(o.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Kt(),0),r.entries.push(c),i(!0)))})});o&&(i=yt(t,r,TT,e.reportAllChanges))})};var IT=[.1,.25],om=(t,e={})=>{sm(Nn(()=>{let n=St("CLS",0),r,i=0,s=[],o=c=>
18{c.forEach(u=>{if(!u.hadRecentInput){let d=s[0],l=s[s.length-1];i&&d&&l&&u.startTime-l.startTime<1e3&&u.startTime-d.startTime<5e3?(i+=u.value,s.push(u)):(i=u.value,s=[u])}}),i>n.value&&(n.value=i,n.entries=s,r())},a=Qe("layout-shift",o);a&&(r=yt(t,n,IT,e.reportAllChanges),Et(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))};var vT=[100,300],am=(t,e={})=>{Yt(()=>{let n=On(),r=St("FID"),i,s=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),i(!0))},o=c=>{c.forEach(s)},a=Qe("first-input",o);i=yt(t,r,vT,e.reportAllChanges),a&&Et(Nn(()=>{o(a.takeRecords()),a.disconnect()}))})};var cm=0,zu=1/0,Xo=0,bT=t=>{t.forEach(e=>{e.interactionId&&(zu=Math.min(zu,e.interactionId),Xo=Math.max(Xo,e.interactionId),cm=Xo?(Xo-zu)/7+1:0)})},Ku,um=()=>Ku?cm:performance.interactionCount||0,lm=()=>{"interactionCount"in performance||Ku||(Ku=Qe("event",bT,{type:"event",buffered:!0,durationThreshold:0}))};var dn=[],Yu=new Map,dm=40,wT=0,RT=()=>um()-wT,pm=()=>{let t=Math.min(dn.length-1,Math.floor(RT()/50));return dn[t]},Ju=10,AT=[],fm=t=>{if(AT.forEach(r=>r(t)),!(t.interactionId||t.entryType==="first-input"))return;let e=dn[dn.length-1],n=Yu.get(t.interactionId);if(n||dn.length<Ju||e&&t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(t);else{let r={id:t.interactionId,latency:t.duration,entries:[t]};Yu.set(r.id,r),dn.push(r)}dn.sort((r,i)=>i.latency-r.latency),dn.length>Ju&&dn.splice(Ju).forEach(r=>Yu.delete(r.id))}};var Qo=t=>{let e=N.requestIdleCallback||N.setTimeout,n=-1;return t=Nn(t),N.document&&N.document.visibilityState==="hidden"?t():(n=e(t),Et(t)),n};var kT=[200,500],hm=(t,e={})=>{"PerformanceEventTiming"in N&&"interactionId"in PerformanceEventTiming.prototype&&Yt(()=>{lm();let n=St("INP"),r,i=o=>{Qo(()=>{o.forEach(fm);let a=pm();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},s=Qe("event",i,{durationThreshold:e.durationThreshold!=null?e.durationThreshold:dm});r=yt(t,n,kT,e.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Et(()=>{i(s.takeRecords()),r(!0)}))})};var CT=[2500,4e3],mm={},gm=(t,e={})=>{Yt(()=>{let n=On(),r=St("LCP"),i,s=a=>{e.reportAllChanges||(a=a.slice(-1)),a.forEach(c=>{c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Kt(),0),r.entries=[c],i())})},o=Qe("largest-contentful-paint",s);if(o){i=yt(t,r,CT,e.reportAllChanges);let a=Nn(()=>{mm[r.id]||(s(o.takeRecords()),o.disconnect(),mm[r.id]=!0,i(!0))});["keydown","click"].forEach(c=>{N.document&&addEventListener(c,()=>Qo(a),{once:!0,capture:!0})}),Et(a)}})};var NT=[800,1800],Xu=t=>{N.document&&N.document.prerendering?Yt(()=>Xu(t)):N.document&&N.document.readyState!=="complete"?addEventListener("load",()=>Xu(t),!0):setTimeout(t,0)},_m=(t,e={})=>{let n=St("TTFB"),r=yt(t,n,NT,e.reportAllChanges);Xu(()=>{let i=ln();i&&(n.value=Math.max(i.responseStart-Kt(),0),n.entries=[i],r(!0))})};var qi={},Zo={},ym,Sm,Em,Tm,Im;function rr(t,e=!1){return Yi("cls",t,OT,ym,e)}function Gi(t,e=!1){return Yi("lcp",t,MT,Em,e)}function zi(t){return Yi("fid",t,PT,Sm)}function Qu(t){return Yi("ttfb",t,DT,Tm)}function Ki(t){return Yi("inp",t,xT,Im)}function Dt(t,e){return vm(t,e),Zo[t]||(LT(t),Zo[t]=!0),bm(t,e)}function zr(t,e){let n=qi[t];if(!(!n||!n.length))for(let r of n)try{r(e)}catch(i){Gr&&S.error(`Error while triggering instrumentation handler. 19Type: ${t} 20Name: ${Ye(r)} 21Error:`,i)}}function OT(){return om(t=>{zr("cls",{metric:t}),ym=t},{reportAllChanges:!0})}function PT(){return am(t=>{zr("fid",{metric:t}),Sm=t})}function MT(){return gm(t=>{zr("lcp",{metric:t}),Em=t},{reportAllChanges:!0})}function DT(){return _m(t=>{zr("ttfb",{metric:t}),Tm=t})}function xT(){return hm(t=>{zr("inp",{metric:t}),Im=t})}function Yi(t,e,n,r,i=!1){vm(t,e);let s;return Zo[t]||(s=n(),Zo[t]=!0),r&&e({metric:r}),bm(t,e,i?s:void 0)}function LT(t){let e={};t==="event"&&(e.durationThreshold=0),Qe(t,n=>{zr(t,{entries:n})},e)}function vm(t,e){qi[t]=qi[t]||[],qi[t].push(e)}function bm(t,e,n){return()=>{n&&n();let r=qi[t];if(!r)return;let i=r.indexOf(e);i!==-1&&r.splice(i,1)}}function wm(t){return"duration"in t}function ea(t){return typeof t=="number"&&isFinite(t)}
21function Jt(t,e,n,i){var r=yr(i,[]);let s=H(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),Ni(t,()=>{let o=ct(f({startTime:e},r));return o&&o.end(n),o})}function ta(t){let e=M();if(!e)return;let{name:n,transaction:r,attributes:i,startTime:s}=t,{release:o,environment:a}=e.getOptions(),c=e.getIntegrationByName("Replay"),u=c&&c.getReplayId(),d=z(),l=d.getUser(),p=l!==void 0?l.email||l.id||l.ip_address:void 0,m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}let h=f({release:o,environment:a,user:p||void 0,profile_id:m||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":N.navigator&&N.navigator.userAgent},i);return ct({name:n,attributes:h,startTime:s,experimental:{standalone:!0}})}function Ji(){return N&&N.addEventListener&&N.performance}function he(t){return t/1e3}function Xi(t){let e="unknown",n="unknown",r="";for(let i of t){if(i==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(i))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=i}return r===t&&(e=r),{name:e,version:n}}function Rm(){let t=0,e,n;if(!FT())return;let r=!1;function i(){r||(r=!0,n&&UT(t,e,n),s())}let s=rr(({metric:o})=>{let a=o.entries[o.entries.length-1];a&&(t=o.value,e=a)},!0);Et(()=>{i()}),setTimeout(()=>{let o=M();if(!o)return;let a=o.on("startNavigationSpan",()=>{i(),a&&a()}),c=Z(),u=c&&te(c),d=u&&H(u);d&&d.op==="pageload"&&(n=u.spanContext().spanId)},0)}function UT(t,e,n){Gr&&S.log(`Sending CLS span (${t})`);let r=he((ye||0)+(e&&e.startTime||0)),i=z().getScopeData().transactionName,s=e?Le(e.sources[0]&&e.sources[0].node):"Layout shift",o=ae({[ie]:"auto.http.browser.cls",[je]:"ui.webvital.cls",[er]:e&&e.duration||0,"sentry.pageload.span_id":n}),a=ta({name:s,transaction:i,attributes:o,startTime:r});a&&(a.addEvent("cls",{[wn]:"",[Rn]:t}),a.end(r))}function FT(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}var BT=2147483647,Am=0,Me={},Ze,Qi;function el({recordClsStandaloneSpans:t}){let e=Ji();if(e&&ye){e.mark&&N.performance.mark("sentry-tracing-init");let n=$T(),r=jT(),i=WT(),s=t?Rm():HT();return()=>{n(),r(),i(),s&&s()}}return()=>{}}function tl(){Dt("longtask",({entries:t})=>{let e=Z();if(!e)return;let{op:n,start_timestamp:r}=H(e);for(let i of t){let s=he(ye+i.startTime),o=he(i.duration);n==="navigation"&&r&&s<r||Jt(e,s,s+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[ie]:"auto.ui.browser.metrics"}})}})}function nl(){new PerformanceObserver(e=>{let n=Z();if(n)for(let r of e.getEntries()){if(!r.scripts[0])continue;let i=he(ye+r.startTime),{start_timestamp:s,op:o}=H(n);if(o==="navigation"&&s&&i<s)continue;let a=he(r.duration),c={[ie]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:p,sourceFunctionName:m,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,p&&(c["code.filepath"]=p),m&&(c["code.function"]=m),h!==-1&&(c["browser.script.source_char_position"]=h),Jt(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function rl(){Dt("event",({entries:t})=>{let e=Z();if(e){for(let n of t)if(n.name==="click"){let r=he(ye+n.startTime),i=he(n.duration),s={name:Le(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[ie]:"auto.ui.browser.metrics"}},o=Ii(n.target);o&&(s.attributes["ui.component_name"]=o),Jt(e,r,r+i,s)}}})}function HT(){return rr(({metric:t})=>{let e=t.entries[t.entries.length-1];e&&(Me.cls={value:t.value,unit:""},Qi=e)},!0)}function jT(){return Gi(({metric:t})=>{let e=t.entries[t.entries.length-1];e&&(Me.lcp={value:t.value,unit:"millisecond"},Ze=e)},!0)}function $T(){return zi(({metric:t})=>{let e=t.entries[t.entries.length-1];if(!e)return;let n=he(ye),r=he(e.startTime);Me.fid={value:t.value,unit:"millisecond"},Me["mark.fid"]={value:n+r,unit:"second"}})}function WT(){return Qu(({metric:t})=>{t.entries[t.entries.length-1]&&(Me.ttfb={value:t.value,unit:"millisecond"})})}function il(t,e){let n=Ji();if(!n||!n.getEntries||!ye)return;let r=he(ye),i=n.getEntries(),{op:s,start_timestamp:o}=H(t);if(i.slice(Am).forEach(a=>{let c=he(a.startTime),u=he(Math.max(0,a.duration));if(!(s==="navigation"&&o&&r+c<o))switch(a.entryType){case"navigation":{qT(t,a,r);break}case"mark":case"paint":case"measure":{VT(t,a,c,u,r);let d=On(),l=a.startTime<d.firstHiddenTime;a.name==="first-paint"&&l&&(Me.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&l&&(Me.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{KT(t,a,a.name,c,u,r);break}}}),Am=Math.max(i.length-1,0),YT(t),s==="pageload"){XT(Me);let a=Me["mark.fid"];a&&Me.fid&&(Jt(t,a.value,a.value+he(Me.fid.value),{name:"first input delay",op:"ui.action",attributes:{[ie]:"auto.ui.browser.metrics"}}),delete Me["mark.fid"]),(!("fcp"in Me)||!e.recordClsOnPageloadSpan)&&delete Me.cls,Object.entries(Me).forEach(([c,u])=>{Mo(c,u.value,u.unit)}),t.setAttribute("performance.timeOrigin",r),t.setAttribute("performance.activationStart",Kt()),JT(t)}Ze=void 0,Qi=void 0,Me={}}function VT(t,e,n,r,i){let s=ln(!1),o=he(s?s.requestStart:0),a=i+Math.max(n,o),c=i+n,u=c+r,d={[ie]:"auto.resource.browser.metrics"};
21return a!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=a),Jt(t,a,u,{name:e.name,op:e.entryType,attributes:d}),a}function qT(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{na(t,e,r,n)}),na(t,e,"secureConnection",n,"TLS/SSL"),na(t,e,"fetch",n,"cache"),na(t,e,"domainLookup",n,"DNS"),zT(t,e,n)}function na(t,e,n,r,i=n){let s=GT(n),o=e[s],a=e[`${n}Start`];!a||!o||Jt(t,r+he(a),r+he(o),{op:`browser.${i}`,name:e.name,attributes:{[ie]:"auto.ui.browser.metrics"}})}function GT(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function zT(t,e,n){let r=n+he(e.requestStart),i=n+he(e.responseEnd),s=n+he(e.responseStart);e.responseEnd&&(Jt(t,r,i,{op:"browser.request",name:e.name,attributes:{[ie]:"auto.ui.browser.metrics"}}),Jt(t,s,i,{op:"browser.response",name:e.name,attributes:{[ie]:"auto.ui.browser.metrics"}}))}function KT(t,e,n,r,i,s){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;let o=_t(n),a={[ie]:"auto.resource.browser.metrics"};Zu(a,e,"transferSize","http.response_transfer_size"),Zu(a,e,"encodedBodySize","http.response_content_length"),Zu(a,e,"decodedBodySize","http.decoded_response_content_length");let c=e.deliveryType;c!=null&&(a["http.response_delivery_type"]=c);let u=e.renderBlockingStatus;u&&(a["resource.render_blocking_status"]=u),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(N.location.origin);let{name:d,version:l}=Xi(e.nextHopProtocol);a["network.protocol.name"]=d,a["network.protocol.version"]=l;let p=s+r,m=p+i;Jt(t,p,m,{name:n.replace(N.location.origin,""),op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",attributes:a})}function YT(t){let e=N.navigator;if(!e)return;let n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),ea(n.rtt)&&(Me["connection.rtt"]={value:n.rtt,unit:"millisecond"})),ea(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`),ea(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}function JT(t){Ze&&(Ze.element&&t.setAttribute("lcp.element",Le(Ze.element)),Ze.id&&t.setAttribute("lcp.id",Ze.id),Ze.url&&t.setAttribute("lcp.url",Ze.url.trim().slice(0,200)),Ze.loadTime!=null&&t.setAttribute("lcp.loadTime",Ze.loadTime),Ze.renderTime!=null&&t.setAttribute("lcp.renderTime",Ze.renderTime),t.setAttribute("lcp.size",Ze.size)),Qi&&Qi.sources&&Qi.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,Le(e.node)))}function Zu(t,e,n,r){let i=e[n];i!=null&&i<BT&&(t[r]=i)}function XT(t){let e=ln(!1);if(!e)return;let{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}var QT=1e3,km,sl,ol;function Zi(t){let e="dom";De(e,t),xe(e,ZT)}function ZT(){if(!N.document)return;let t=Re.bind(null,"dom"),e=Cm(t,!0);N.document.addEventListener("click",e,!1),N.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=N[n],s=i&&i.prototype;!s||!s.hasOwnProperty||!s.hasOwnProperty("addEventListener")||(Ee(s,"addEventListener",function(o){return function(a,c,u){if(a==="click"||a=="keypress")try{let d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},l=d[a]=d[a]||{refCount:0};if(!l.handler){let p=Cm(t);l.handler=p,o.call(this,a,p,u)}l.refCount++}catch{}return o.call(this,a,c,u)}}),Ee(s,"removeEventListener",function(o){return function(a,c,u){if(a==="click"||a=="keypress")try{let d=this.__sentry_instrumentation_handlers__||{},l=d[a];l&&(l.refCount--,l.refCount<=0&&(o.call(this,a,l.handler,u),l.handler=void 0,delete d[a]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,a,c,u)}}))})}function eI(t){if(t.type!==sl)return!1;try{if(!t.target||t.target._sentryId!==ol)return!1}catch{}return!0}function tI(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Cm(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=nI(n);if(tI(n.type,r))return;Te(n,"_sentryCaptured",!0),r&&!r._sentryId&&Te(r,"_sentryId",Ie()
21);let i=n.type==="keypress"?"input":n.type;eI(n)||(t({event:n,name:i,global:e}),sl=n.type,ol=r?r._sentryId:void 0),clearTimeout(km),km=N.setTimeout(()=>{ol=void 0,sl=void 0},QT)}}function nI(t){try{return t.target}catch{return null}}var ra;function pn(t){let e="history";De(e,t),xe(e,rI)}function rI(){if(!qu())return;let t=N.onpopstate;N.onpopstate=function(...n){let r=N.location.href,i=ra;if(ra=r,Re("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let s=ra,o=String(i);ra=o,Re("history",{from:s,to:o})}return n.apply(this,r)}}Ee(N.history,"pushState",e),Ee(N.history,"replaceState",e)}var ia={};function sa(t){let e=ia[t];if(e)return e;let n=N[t];if(ji(n))return ia[t]=n.bind(N);let r=N.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let s=i.contentWindow;s&&s[t]&&(n=s[t]),r.head.removeChild(i)}catch(i){Gr&&S.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(ia[t]=n.bind(N))}function oa(t){ia[t]=void 0}function Pn(...t){return sa("setTimeout")(...t)}var xt="__sentry_xhr_v3__";function es(t){let e="xhr";De(e,t),xe(e,iI)}function iI(){if(!N.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){let i=new Error,s=ge()*1e3,o=Ne(r[0])?r[0].toUpperCase():void 0,a=sI(r[1]);if(!o||!a)return e.apply(n,r);n[xt]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let c=()=>{let u=n[xt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}let d={endTimestamp:ge()*1e3,startTimestamp:s,xhr:n,virtualError:i};Re("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){let[p,m]=l,h=d[xt];return h&&Ne(p)&&Ne(m)&&(h.request_headers[p.toLowerCase()]=m),u.apply(d,l)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){let i=n[xt];if(!i)return e.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let s={startTimestamp:ge()*1e3,xhr:n};return Re("xhr",s),e.apply(n,r)}})}function sI(t){if(Ne(t))return t;try{return t.toString()}catch{}}var al=[],aa=new Map;function cl(){if(Ji()&&ye){let e=oI();return()=>{e()}}return()=>{}}var Nm={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function oI(){return Ki(({metric:t})=>{if(t.value==null)return;let e=t.entries.find(h=>h.duration===t.value&&Nm[h.name]);if(!e)return;let{interactionId:n}=e,r=Nm[e.name],i=he(ye+e.startTime),s=he(t.value),o=Z(),a=o?te(o):void 0,u=(n!=null?aa.get(n):void 0)||a,d=u?H(u).description:z().getScopeData().transactionName,l=Le(e.target),p=ae({[ie]:"auto.http.browser.inp",[je]:`ui.interaction.${r}`,[er]:e.duration}),m=ta({name:l,transaction:d,attributes:p,startTime:i});m&&(m.addEvent("inp",{[wn]:"millisecond",[Rn]:t.value}),m.end(i+s))})}function ul(t){let e=({entries:n})=>{let r=Z(),i=r&&te(r);n.forEach(s=>{if(!wm(s)||!i)return;let o=s.interactionId;if(o!=null&&!aa.has(o)){if(al.length>10){let a=al.shift();aa.delete(a)}al.push(o),aa.set(o,i)}})};Dt("event",e),Dt("first-input",e)}var fe=F,Ul="sentryReplaySession",aI="replay_event",Fl="Unable to send Replay",cI=3e5,uI=9e5,lI=5e3,dI=5500,pI=6e4,fI=5e3,hI=3,Om=15e4,ca=5e3,mI=3e3,gI=300,Bl=2e7,_I=4999,yI=15e3,Pm=36e5;function hl(t,e){return t??e()}function ss(t){let e,n=t[0],r=1;for(;r<t.length;){let i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(e,...o)),e=void 0)}return n}var Pe=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}(Pe||{});function SI(t){return t.nodeType===t.ELEMENT_NODE}function ns(t){let e=ss([t,"optionalAccess",n=>n.host]);return ss([e,"optionalAccess",n=>n.shadowRoot])===t}function rs(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function EI(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function TI(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function fa(t){try{let e=t.rules||t.cssRules;return e?EI(Array.from(e,Zm).join("")):null}catch{return null}}function II(t){let e="";for(let n=0;n<t.style.length;n++){let r=t.style,i=r[n],s=r.getPropertyPriority(i);e+=`${i}:${r.getPropertyValue(i)}${s?" !important":""};`}return`${t.selectorText} { ${e} }`}function Zm(t){let e;if(bI(t))try{e=fa(t.styleSheet)||TI(t)}catch{}else if(wI(t)){let n=t.cssText,r=t.selectorText.includes(":"),i=typeof t.style.all=="string"&&t.style.all;if(i&&(n=II(t)),r&&(n=vI(n)),r||i)return n}return e||t.cssText}function vI(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function bI(t){return"styleSheet"in t}function wI(t){return"selectorText"in t}var ha=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;let n=ss([this,"access",r=>r.getMeta,"call",r=>r(e),"optionalAccess",r=>r.id]);return hl(n,()=>-1)}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let n=this.getId(e);
21this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){let r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function RI(){return new ha}function Ra({maskInputOptions:t,tagName:e,type:n}){return e==="OPTION"&&(e="SELECT"),!!(t[e.toLowerCase()]||n&&t[n]||n==="password"||e==="INPUT"&&!n&&t.text)}function os({isMasked:t,element:e,value:n,maskInputFn:r}){let i=n||"";return t?(r&&(i=r(i,e)),"*".repeat(i.length)):i}function ei(t){return t.toLowerCase()}function ml(t){return t.toUpperCase()}var Mm="__rrweb_original__";function AI(t){let e=t.getContext("2d");if(!e)return!0;let n=50;for(let r=0;r<t.width;r+=n)for(let i=0;i<t.height;i+=n){let s=e.getImageData,o=Mm in s?s[Mm]:s;if(new Uint32Array(o.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}function Hl(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?ei(e):null}function ma(t,e,n){return e==="INPUT"&&(n==="radio"||n==="checkbox")?t.getAttribute("value")||"":t.value}function eg(t,e){let n;try{n=new URL(t,hl(e,()=>window.location.href))}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=n.pathname.match(r);return hl(ss([i,"optionalAccess",s=>s[1]]),()=>null)}var Dm={};function tg(t){let e=Dm[t];if(e)return e;let n=window.document,r=window[t];if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(i)}catch{}return Dm[t]=r.bind(window)}function gl(...t){return tg("setTimeout")(...t)}function ng(...t){return tg("clearTimeout")(...t)}function rg(t){try{return t.contentDocument}catch{}}var kI=1,CI=new RegExp("[^a-z0-9-_:]"),as=-2;function jl(){return kI++}function NI(t){if(t instanceof HTMLFormElement)return"form";let e=ei(t.tagName);return CI.test(e)?"div":e}function OI(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var Kr,xm,PI=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,MI=/^(?:[a-z+]+:)?\/\//i,DI=/^www\..*/i,xI=/^(data:)([^,]*),(.*)/i;function ga(t,e){return(t||"").replace(PI,(n,r,i,s,o,a)=>{let c=i||o||a,u=r||s||"";if(!c)return n;if(MI.test(c)||DI.test(c))return`url(${u}${c}${u})`;if(xI.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${OI(e)+c}${u})`;let d=e.split("/"),l=c.split("/");d.pop();for(let p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}var LI=/^[^ \t\n\r\u000c]+/,UI=/^[, \t\n\r\u000c]+/;function FI(t,e){if(e.trim()==="")return e;let n=0;function r(s){let o,a=s.exec(e.substring(n));return a?(o=a[0],n+=o.length,o):""}let i=[];for(;r(UI),!(n>=e.length);){let s=r(LI);if(s.slice(-1)===",")s=Jr(t,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Jr(t,s);let a=!1;for(;;){let c=e.charAt(n);if(c===""){i.push((s+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((s+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return i.join(", ")}var Lm=new WeakMap;function Jr(t,e){return!e||e.trim()===""?e:Aa(t,e)}function BI(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Aa(t,e){let n=Lm.get(t);if(n||(n=t.createElement("a"),Lm.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function ig(t,e,n,r,i,s){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?Jr(t,r):n==="srcset"?FI(t,r):n==="style"?ga(r,Aa(t)):e==="object"&&n==="data"?Jr(t,r):typeof s=="function"?s(n,r,i):r)}
21function sg(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function HI(t,e,n,r){try{if(r&&t.matches(r))return!1;if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let i=t.classList.length;i--;){let s=t.classList[i];if(e.test(s))return!0}if(n)return t.matches(n)}catch{}return!1}function jI(t,e){for(let n=t.classList.length;n--;){let r=t.classList[n];if(e.test(r))return!0}return!1}function sr(t,e,n=1/0,r=0){return!t||t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:sr(t.parentNode,e,n,r+1)}function Xr(t,e){return n=>{let r=n;if(r===null)return!1;try{if(t){if(typeof t=="string"){if(r.matches(`.${t}`))return!0}else if(jI(r,t))return!0}return!!(e&&r.matches(e))}catch{return!1}}}function ti(t,e,n,r,i,s){try{let o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){let u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(s){if(c=sr(o,Xr(r,i)),c<0)return!0;a=sr(o,Xr(e,n),c>=0?c:1/0)}else{if(a=sr(o,Xr(e,n)),a<0)return!1;c=sr(o,Xr(r,i),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function $I(t,e,n){let r=t.contentWindow;if(!r)return;let i=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){let a=gl(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{ng(a),i=!0,e()});return}let o="about:blank";if(r.location.href!==o||t.src===o||t.src==="")return gl(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function WI(t,e,n){let r=!1,i;try{i=t.sheet}catch{return}if(i)return;let s=gl(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{ng(s),r=!0,e()})}function VI(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:h={},maskTextFn:g,maskInputFn:y,dataURLOptions:E={},inlineImages:A,recordCanvas:O,keepIframeSrcFn:P,newlyAddedElement:j=!1}=e,v=qI(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Pe.Document,childNodes:[],compatMode:t.compatMode}:{type:Pe.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Pe.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:v};case t.ELEMENT_NODE:return zI(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:h,maskInputFn:y,dataURLOptions:E,inlineImages:A,recordCanvas:O,keepIframeSrcFn:P,newlyAddedElement:j,rootId:v,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p});case t.TEXT_NODE:return GI(t,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:g,maskInputOptions:h,maskInputFn:y,rootId:v});case t.CDATA_SECTION_NODE:return{type:Pe.CDATA,textContent:"",rootId:v};case t.COMMENT_NODE:return{type:Pe.Comment,textContent:t.textContent||"",rootId:v};default:return!1}}function qI(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function GI(t,e){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=e,l=t.parentNode&&t.parentNode.tagName,p=t.textContent,m=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,g=l==="TEXTAREA"?!0:void 0;if(m&&p){try{t.nextSibling||t.previousSibling||ss([t,"access",E=>E.parentNode,"access",E=>E.sheet,"optionalAccess",E=>E.cssRules])&&(p=fa(t.parentNode.sheet))}catch(E){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${E}`,t)}p=ga(p,Aa(e.doc))}h&&(p="SCRIPT_PLACEHOLDER");let y=ti(t,r,s,i,o,n);if(!m&&!h&&!g&&p&&y&&(p=a?a(p,t.parentElement):p.replace(/[\S]/g,"*")),g&&p&&(c.textarea||y)&&(p=u?u(p,t.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){let E=Ra({type:null,tagName:l,maskInputOptions:c});p=os({isMasked:ti(t,r,s,i,o,E),element:t,value:p,maskInputFn:u})}return{type:Pe.Text,textContent:p||"",isStyle:m,rootId:d}}function zI(t,e){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h=!1,rootId:g,maskAllText:y,maskTextClass:E,unmaskTextClass:A,maskTextSelector:O,unmaskTextSelector:P}=e,j=HI(t,r,i,s),v=NI(t),I={},k=t.attributes.length;for(let b=0;b<k;b++){let D=t.attributes[b];D.name&&!sg(v,D.name,D.value)&&(I[D.name]=ig(n,v,ei(D.name),D.value,t,c))}if(v==="link"&&o){let b=Array.from(n.styleSheets).find(L=>L.href===t.href),D=null;b&&(D=fa(b)),D&&(I.rel=null,I.href=null,I.crossorigin=null,I._cssText=ga(D,b.href))}if(v==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){let b=fa(t.sheet);b&&(I._cssText=ga(b,Aa(n)))}if(v==="input"||v==="textarea"||v==="select"||v==="option"){let b=t,D=Hl(b),L=ma(b,ml(v),D),X=b.checked;if(D!=="submit"&&D!=="button"&&L){let ce=ti(b,E,O,A,P,Ra({type:D,tagName:ml(v),maskInputOptions:a}));I.value=os({isMasked:ce,element:b,value:L,maskInputFn:u})}X&&(I.checked=X)}if(v==="option"&&(t.selected&&!a.select?I.selected=!0:delete I.selected),v==="canvas"&&p){if(t.__context==="2d")AI(t)||(I.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){let b=t.toDataURL(d.type,d.quality),D=n.createElement("canvas");D.width=t.width,D.height=t.height;let L=D.toDataURL(d.type,d.quality);b!==L&&(I.rr_dataURL=b)}}if(v==="img"&&l){Kr||(Kr=n.createElement("canvas"),xm=Kr.getContext("2d"));let b=t,D=b.currentSrc||b.getAttribute("src")||"<unknown-src>",L=b.crossOrigin,X=()=>{b.removeEventListener("load",X);
21try{Kr.width=b.naturalWidth,Kr.height=b.naturalHeight,xm.drawImage(b,0,0),I.rr_dataURL=Kr.toDataURL(d.type,d.quality)}catch(ce){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?X():b.addEventListener("load",X);return}else console.warn(`Cannot inline img src=${D}! Error: ${ce}`)}b.crossOrigin==="anonymous"&&(L?I.crossOrigin=L:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?X():b.addEventListener("load",X)}if((v==="audio"||v==="video")&&(I.rr_mediaState=t.paused?"paused":"played",I.rr_mediaCurrentTime=t.currentTime),h||(t.scrollLeft&&(I.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(I.rr_scrollTop=t.scrollTop)),j){let{width:b,height:D}=t.getBoundingClientRect();I={class:I.class,rr_width:`${b}px`,rr_height:`${D}px`}}v==="iframe"&&!m(I.src)&&(!j&&!rg(t)&&(I.rr_src=I.src),delete I.src);let B;try{customElements.get(v)&&(B=!0)}catch{}return{type:Pe.Element,tagName:v,attributes:I,childNodes:[],isSVG:BI(t)||void 0,needBlock:j,rootId:g,isCustom:B}}function pe(t){return t==null?"":t.toLowerCase()}function KI(t,e){if(e.comment&&t.type===Pe.Comment)return!0;if(t.type===Pe.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&eg(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(pe(t.attributes.name).match(/^msapplication-tile(image|color)$/)||pe(t.attributes.name)==="application-name"||pe(t.attributes.rel)==="icon"||pe(t.attributes.rel)==="apple-touch-icon"||pe(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&pe(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(pe(t.attributes.property).match(/^(og|twitter|fb):/)||pe(t.attributes.name).match(/^(og|twitter):/)||pe(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(pe(t.attributes.name)==="robots"||pe(t.attributes.name)==="googlebot"||pe(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(pe(t.attributes.name)==="author"||pe(t.attributes.name)==="generator"||pe(t.attributes.name)==="framework"||pe(t.attributes.name)==="publisher"||pe(t.attributes.name)==="progid"||pe(t.attributes.property).match(/^article:/)||pe(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(pe(t.attributes.name)==="google-site-verification"||pe(t.attributes.name)==="yandex-verification"||pe(t.attributes.name)==="csrf-token"||pe(t.attributes.name)==="p:domain_verify"||pe(t.attributes.name)==="verify-v1"||pe(t.attributes.name)==="verification"||pe(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Qr(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:y,maskInputFn:E,slimDOMOptions:A,dataURLOptions:O={},inlineImages:P=!1,recordCanvas:j=!1,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:k=5e3,onStylesheetLoad:B,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:L=!1}=e,{preserveWhiteSpace:X=!0}=e,ce=VI(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:E,dataURLOptions:O,inlineImages:P,recordCanvas:j,keepIframeSrcFn:D,newlyAddedElement:L});if(!ce)return console.warn(t,"not serialized"),null;let be;r.hasNode(t)?be=r.getId(t):KI(ce,A)||!X&&ce.type===Pe.Text&&!ce.isStyle&&!ce.textContent.replace(/^\s+|\s+$/gm,"").length?be=as:be=jl();let T=Object.assign(ce,{id:be});if(r.add(t,T),be===as)return null;v&&v(t);let R=!p;if(T.type===Pe.Element){R=R&&!T.needBlock,delete T.needBlock;let w=t.shadowRoot;w&&rs(w)&&(T.isShadowHost=!0)}if((T.type===Pe.Document||T.type===Pe.Element)&&R){A.headWhitespace&&T.type===Pe.Element&&T.tagName==="head"&&(X=!1);let w={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:E,slimDOMOptions:A,dataURLOptions:O,inlineImages:P,recordCanvas:j,preserveWhiteSpace:X,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:B,stylesheetLoadTimeout:b,keepIframeSrcFn:D};for(let q of Array.from(t.childNodes)){let le=Qr(q,w);le&&T.childNodes.push(le)}if(SI(t)&&t.shadowRoot)for(let q of Array.from(t.shadowRoot.childNodes)){let le=Qr(q,w);le&&(rs(t.shadowRoot)&&(le.isShadow=!0),T.childNodes.push(le))}}return t.parentNode&&ns(t.parentNode)&&rs(t.parentNode)&&(T.isShadow=!0),T.type===Pe.Element&&T.tagName==="iframe"&&$I(t,()=>{let w=rg(t);if(w&&I){let q=Qr(w,{doc:w,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:E,slimDOMOptions:A,dataURLOptions:O,inlineImages:P,recordCanvas:j,preserveWhiteSpace:X,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:B,stylesheetLoadTimeout:b,keepIframeSrcFn:D});q&&I(t,q)}},k),T.type===Pe.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&eg(T.attributes.href)==="css")&&WI(t,()=>{if(B){let w=Qr(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:E,slimDOMOptions:A,dataURLOptions:O,inlineImages:P,recordCanvas:j,preserveWhiteSpace:X,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:B,stylesheetLoadTimeout:b,keepIframeSrcFn:D});w&&B(t,w)}},b),T}function YI(t,e){let{mirror:n=new ha,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:y,maskInputFn:E,slimDOM:A=!1,dataURLOptions:O,preserveWhiteSpace:P,onSerialize:j,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:k,stylesheetLoadTimeout:B,keepIframeSrcFn:b=()=>!1}=e||{};return Qr(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:E,slimDOMOptions:A===!0||A==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:A==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}
21:A===!1?{}:A,dataURLOptions:O,inlineImages:p,recordCanvas:m,preserveWhiteSpace:P,onSerialize:j,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:k,stylesheetLoadTimeout:B,keepIframeSrcFn:b,newlyAddedElement:!1})}function Mn(t){let e,n=t[0],r=1;for(;r<t.length;){let i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(e,...o)),e=void 0)}return n}function Ge(t,e,n=document){let r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}var Yr=`Please stop import mirror directly. Instead of that,\r 22now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 23or you can use record.mirror to access the mirror instance during recording.`,Um={map:{},getId(){return console.error(Yr),-1},getNode(){return console.error(Yr),null},removeNodeFromMap(){console.error(Yr)},has(){return console.error(Yr),!1},reset(){console.error(Yr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Um=new Proxy(Um,{get(t,e,n){return e==="map"&&console.error(Yr),Reflect.get(t,e,n)}}));function cs(t,e,n={}){let r=null,i=0;return function(...s){let o=Date.now();!i&&n.leading===!1&&(i=o);let a=e-(o-i),c=this;a<=0||a>e?(r&&(tv(r),r=null),i=o,t.apply(c,s)):!r&&n.trailing!==!1&&(r=ka(()=>{i=n.leading===!1?0:Date.now(),r=null,t.apply(c,s)},a))}}function og(t,e,n,r,i=window){let s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(o){ka(()=>{n.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>og(t,e,s||{},!0)}function $l(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}var _a=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(_a=()=>new Date().getTime());function ag(t){let e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:Mn([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Mn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Mn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:Mn([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Mn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Mn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function cg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ug(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function lg(t){return t?t.nodeType===t.ELEMENT_NODE?t:t.parentElement:null}function ut(t,e,n,r,i){if(!t)return!1;let s=lg(t);if(!s)return!1;let o=Xr(e,n);if(!i){let u=r&&s.matches(r);return o(s)&&!u}let a=sr(s,o),c=-1;return a<0?!1:(r&&(c=sr(s,Xr(null,r))),a>-1&&c<0?!0:a<c)}function JI(t,e){return e.getId(t)!==-1}function ll(t,e){return e.getId(t)===as}function dg(t,e){if(ns(t))return!1;let n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?dg(t.parentNode,e):!0:!0}function _l(t){return!!t.changedTouches}function XI(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=(...e)=>{let n=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function pg(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function fg(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function yl(t){return!!Mn([t,"optionalAccess",e=>e.shadowRoot])}var Sl=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Gu(this.styleIDMap.get(e),()=>-1)}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function hg(t){let e=null;return Mn([t,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function QI(t){let e=t,n;for(;n=hg(e);)e=n;return e}function ZI(t){let e=t.ownerDocument;if(!e)return!1;let n=QI(t);return e.contains(n)}function mg(t){let e=t.ownerDocument;return e?e.contains(t)||ZI(t):!1}var Fm={};function Wl(t){let e=Fm[t];if(e)return e;let n=window.document,r=window[t];if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(i)}catch{}return Fm[t]=r.bind(window)}function ev(...t){return Wl("requestAnimationFrame")(...t)}function ka(...t){return Wl("setTimeout")(...t)}function tv(...t){return Wl("clearTimeout")(...t)}var J=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(J||{}),K=(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.In
23put=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(K||{}),qe=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(qe||{}),fn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(fn||{});function Vl(t){try{return t.contentDocument}catch{}}function nv(t){try{return t.contentWindow}catch{}}function rv(t){let e,n=t[0],r=1;for(;r<t.length;){let i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(e,...o)),e=void 0)}return n}function Bm(t){return"__ln"in t}var El=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=rv([n,"optionalAccess",i=>i.next])||null;return n}addNode(e){let n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Bm(e.previousSibling)){let r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&Bm(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){let n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Hm=(t,e)=>`${t}@${e}`,Tl=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],n=new Set,r=new El,i=c=>{let u=c,d=as;for(;d===as;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},s=c=>{if(!c.parentNode||!mg(c))return;let u=ns(c.parentNode)?this.mirror.getId(hg(c)):this.mirror.getId(c.parentNode),d=i(c);if(u===-1||d===-1)return r.addNode(c);let l=Qr(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{pg(p,this.mirror)&&!ut(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),fg(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),yl(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{ut(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(p,m),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p))},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)}});l&&(e.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)jm(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(let c of this.addedSet)!$m(this.droppedSet,c)&&!jm(this.removes,c,this.mirror)||$m(this.movedSet,c)?s(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){let u=this.mirror.getId(o.value.parentNode),d=i(o.value);u!==-1&&d!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){let d=u;if(u=u.previous,d){let l=this.mirror.getId(d.value.parentNode);
23if(i(d.value)===-1)continue;if(l!==-1){c=d;break}else{let m=d.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=m.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),s(c.value)}let a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:u}=c;if(typeof u.style=="string"){let d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!ll(e.target,this.mirror))switch(e.type){case"characterData":{let n=e.target.textContent;!ut(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:ti(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,lg(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{let n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Hl(n),a=n.tagName;i=ma(n,a,o);let c=Ra({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=ti(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);i=os({isMasked:u,element:n,value:i,maskInputFn:this.maskInputFn})}if(ut(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===e.oldValue)return;let s=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!Vl(n))r="rr_src";else return;if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!sg(n.tagName,r)&&(s.attributes[r]=ig(this.doc,ei(n.tagName),ei(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}for(let a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(ut(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{let r=this.mirror.getId(n),i=ns(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);ut(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||ll(n,this.mirror)||!JI(n,this.mirror)||(this.addedSet.has(n)?(Il(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||dg(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Hm(r,i)]?Il(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:ns(e.target)&&rs(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(ll(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Hm(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ut(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEac
23h(r=>this.genAdds(r)),yl(e)&&e.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Il(t,e){t.delete(e),e.childNodes.forEach(n=>Il(t,n))}function jm(t,e,n){return t.length===0?!1:iv(t,e,n)}function iv(t,e,n){let r=e.parentNode;for(;r;){let i=n.getId(r);if(t.some(s=>s.id===i))return!0;r=r.parentNode}return!1}function $m(t,e){return t.size===0?!1:gg(t,e)}function gg(t,e){let{parentNode:n}=e;return n?t.has(n)?!0:gg(t,n):!1}var is;function sv(t){is=t}function ov(){is=void 0}var ne=t=>is?(...n)=>{try{return t(...n)}catch(r){if(is&&is(r)===!0)return()=>{};throw r}}:t;function Ut(t){let e,n=t[0],r=1;for(;r<t.length;){let i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(e,...o)),e=void 0)}return n}var Zr=[];function fs(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function _g(t,e){let n=new Tl;Zr.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver,i=Ut([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);i&&window[i]&&(r=window[i]);let s=new r(ne(o=>{t.onMutation&&t.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function av({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],a,c=cs(ne(l=>{let p=Date.now()-a;t(o.map(m=>(m.timeOffset-=p,m)),l),o=[],a=null}),s),u=ne(cs(ne(l=>{let p=fs(l),{clientX:m,clientY:h}=_l(l)?l.changedTouches[0]:l;a||(a=_a()),o.push({x:m,y:h,id:r.getId(p),timeOffset:_a()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?K.Drag:l instanceof MouseEvent?K.MouseMove:K.TouchMove)}),i,{trailing:!1})),d=[Ge("mousemove",u,n),Ge("touchmove",u,n),Ge("drag",u,n)];return ne(()=>{d.forEach(l=>l())})}function cv({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],u=null,d=l=>p=>{let m=fs(p);if(ut(m,r,i,s,!0))return;let h=null,g=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=fn.Mouse;break;case"touch":h=fn.Touch;break;case"pen":h=fn.Pen;break}h===fn.Touch?qe[l]===qe.MouseDown?g="TouchStart":qe[l]===qe.MouseUp&&(g="TouchEnd"):fn.Pen}else _l(p)&&(h=fn.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===fn.Touch||g.startsWith("Mouse")&&h===fn.Mouse)&&(h=null)):qe[l]===qe.Click&&(h=u,u=null);let y=_l(p)?p.changedTouches[0]:p;if(!y)return;let E=n.getId(m),{clientX:A,clientY:O}=y;ne(t)(f({type:qe[g],id:E,x:A,y:O},h!==null&&{pointerType:h}))};return Object.keys(qe).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let p=ei(l),m=d(l);if(window.PointerEvent)switch(qe[l]){case qe.MouseDown:case qe.MouseUp:p=p.replace("mouse","pointer");break;case qe.TouchStart:case qe.TouchEnd:return}c.push(Ge(p,m,e))}),ne(()=>
23{c.forEach(l=>l())})}function yg({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){let a=ne(cs(ne(c=>{let u=fs(c);if(!u||ut(u,r,i,s,!0))return;let d=n.getId(u);if(u===e&&e.defaultView){let l=ag(e.defaultView);t({id:d,x:l.left,y:l.top})}else t({id:d,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return Ge("scroll",a,e)}function uv({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=ne(cs(ne(()=>{let s=cg(),o=ug();(n!==s||r!==o)&&(t({width:Number(o),height:Number(s)}),n=s,r=o)}),200));return Ge("resize",i,e)}var lv=["INPUT","TEXTAREA","SELECT"],Wm=new WeakMap;function dv({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:p,unmaskTextClass:m,maskTextSelector:h,unmaskTextSelector:g}){function y(I){let k=fs(I),B=I.isTrusted,b=k&&ml(k.tagName);if(b==="OPTION"&&(k=k.parentElement),!k||!b||lv.indexOf(b)<0||ut(k,r,i,s,!0))return;let D=k;if(D.classList.contains(o)||a&&D.matches(a))return;let L=Hl(k),X=ma(D,b,L),ce=!1,be=Ra({maskInputOptions:c,tagName:b,type:L}),T=ti(k,p,h,m,g,be);(L==="radio"||L==="checkbox")&&(ce=k.checked),X=os({isMasked:T,element:k,value:X,maskInputFn:u}),E(k,l?{text:X,isChecked:ce,userTriggered:B}:{text:X,isChecked:ce});let R=k.name;L==="radio"&&R&&ce&&e.querySelectorAll(`input[type="radio"][name="${R}"]`).forEach(w=>{if(w!==k){let q=os({isMasked:T,element:w,value:ma(w,b,L),maskInputFn:u});E(w,l?{text:q,isChecked:!ce,userTriggered:!1}:{text:q,isChecked:!ce})}})}function E(I,k){let B=Wm.get(I);if(!B||B.text!==k.text||B.isChecked!==k.isChecked){Wm.set(I,k);let b=n.getId(I);ne(t)(C(f({},k),{id:b}))}}let O=(d.input==="last"?["change"]:["input","change"]).map(I=>Ge(I,ne(y),e)),P=e.defaultView;if(!P)return()=>{O.forEach(I=>I())};let j=P.Object.getOwnPropertyDescriptor(P.HTMLInputElement.prototype,"value"),v=[[P.HTMLInputElement.prototype,"value"],[P.HTMLInputElement.prototype,"checked"],[P.HTMLSelectElement.prototype,"value"],[P.HTMLTextAreaElement.prototype,"value"],[P.HTMLSelectElement.prototype,"selectedIndex"],[P.HTMLOptionElement.prototype,"selected"]];return j&&j.set&&O.push(...v.map(I=>og(I[0],I[1],{set(){ne(y)({target:this,isTrusted:!1})}},!1,P))),ne(()=>{O.forEach(I=>I())})}function ya(t){let e=[];function n(r,i){if(ua("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ua("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ua("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ua("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(t,e)}function Dn(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function pv({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ne((d,l,p)=>{let[m,h]=p,{id:g,styleId:y}=Dn(l,e,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&t({id:g,styleId:y,adds:[{rule:m,index:h}]}),d.apply(l,p)})});let s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:ne((d,l,p)=>{let[m]=p,{id:h,styleId:g}=Dn(l,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,removes:[{index:m}]}),d.apply(l,p)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ne((d,l,p)=>{let[m]=p,{id:h,styleId:g}=Dn(l,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,replace:m}),d.apply(l,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ne((d,l,p)=>{let[m]=p,{id:h,styleId:g}=Dn(l,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,replaceSync:m}),d.apply(l,p)})}));let c={};la("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(la("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),la("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),la("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};
23return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:ne((p,m,h)=>{let[g,y]=h,{id:E,styleId:A}=Dn(m.parentStyleSheet,e,n.styleMirror);return(E&&E!==-1||A&&A!==-1)&&t({id:E,styleId:A,adds:[{rule:g,index:[...ya(m),y||0]}]}),p.apply(m,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:ne((p,m,h)=>{let[g]=h,{id:y,styleId:E}=Dn(m.parentStyleSheet,e,n.styleMirror);return(y&&y!==-1||E&&E!==-1)&&t({id:y,styleId:E,removes:[{index:[...ya(m),g]}]}),p.apply(m,h)})})}),ne(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function Sg({mirror:t,stylesheetManager:e},n){let r=null;n.nodeName==="#document"?r=t.getId(n):r=t.getId(n.host);let i=n.nodeName==="#document"?Ut([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):Ut([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),s=Ut([i,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(Ut([i,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return Ut([s,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){let a=Ut([s,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{e.adoptStyleSheets(o,r)}catch{}return a}}),ne(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function fv({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ne((a,c,u)=>{let[d,l,p]=u;if(n.has(d))return s.apply(c,[d,l,p]);let{id:m,styleId:h}=Dn(Ut([c,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,set:{property:d,value:l,priority:p},index:ya(c.parentRule)}),a.apply(c,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ne((a,c,u)=>{let[d]=u;if(n.has(d))return o.apply(c,[d]);let{id:l,styleId:p}=Dn(Ut([c,"access",m=>m.parentRule,"optionalAccess",m=>m.parentStyleSheet]),e,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&t({id:l,styleId:p,remove:{property:d},index:ya(c.parentRule)}),a.apply(c,u)})}),ne(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function hv({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){let a=ne(u=>cs(ne(d=>{let l=fs(d);if(!l||ut(l,e,n,r,!0))return;let{currentTime:p,volume:m,muted:h,playbackRate:g}=l;t({type:u,id:i.getId(l),currentTime:p,volume:m,muted:h,playbackRate:g})}),s.media||500)),c=[Ge("play",a(0),o),Ge("pause",a(1),o),Ge("seeked",a(2),o),Ge("volumechange",a(3),o),Ge("ratechange",a(4),o)];return ne(()=>{c.forEach(u=>u())})}function mv({fontCb:t,doc:e}){let n=e.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,d){let l=new s(c,u,d);return i.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};let o=$l(e.fonts,"add",function(a){return function(c){return ka(ne(()=>{let u=i.get(c);u&&(t(u),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(o),ne(()=>{r.forEach(a=>a())})}function gv(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=t,a=!0,c=ne(()=>{let u=e.getSelection();if(!u||a&&Ut([u,"optionalAccess",p=>p.isCollapsed]))return;a=u.isCollapsed||!1;let d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){let m=u.getRangeAt(p),{startContainer:h,startOffset:g,endContainer:y,endOffset:E}=m;ut(h,r,i,s,!0)||ut(y,r,i,s,!0)||d.push({start:n.getId(h),startOffset:g,end:n.getId(y),endOffset:E})}o({ranges:d})});return c(),Ge("selectionchange",c)}function _v({doc:t,customElementCb:e}){let n=t.defaultView;return!n||!n.customElements?()=>{}:$l(n.customElements,"define",function(i){return function(s,o,a){try{e({define:{name:s}})}catch{}return i.apply(this,[s,o,a])}})}function yv(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=_g(t,t.doc));let i=av(t),s=cv(t),o=yg(t),a=uv(t,{win:n}),c=dv(t),u=hv(t),d=()=>{},l=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(d=pv(t,{win:n}),l=Sg(t,t.doc),p=fv(t,{win:n}),t.collectFonts&&(m=mv(t)));let h=gv(t),g=_v(t),y=[];for(let E of t.plugins)y.push(E.observer(E.callback,n,E.options));return ne(()=>{Zr.forEach(E=>E.reset()),Ut([r,"optionalAccess",E=>E.disconnect,"call",E=>
23E()]),i(),s(),o(),a(),c(),u(),d(),l(),p(),m(),h(),g(),y.forEach(E=>E())})}function ua(t){return typeof window[t]<"u"}function la(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}var us=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,n,r,i){let s=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),o.set(a,n)),a}getIds(e,n){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return n.map(s=>this.getId(e,s,r,i))}getRemoteId(e,n,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;let s=i.get(n);return s||-1}getRemoteIds(e,n){let r=this.getRemoteIdToIdMap(e);return n.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}};function Vm(t){let e,n=t[0],r=1;for(;r<t.length;){let i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(e,...o)),e=void 0)}return n}var vl=class{constructor(){this.crossOriginIframeMirror=new us(jl),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},bl=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new us(jl),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new us(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Vm([this,"access",i=>i.loadListener,"optionalCall",i=>i(e)]);let r=Vl(e);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(e){let n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let s=this.transformCrossOriginEvent(i,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(e,n){switch(n.type){case J.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);let r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:J.IncrementalSnapshot,data:{source:K.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case J.Meta:case J.Load:case J.DomContentLoaded:return!1;case J.Plugin:return n;case J.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case J.IncrementalSnapshot:switch(n.data.source){case K.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(r.node,i)}),n.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}
23),n.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case K.Drag:case K.TouchMove:case K.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case K.ViewportResize:return!1;case K.MediaInteraction:case K.MouseInteraction:case K.Scroll:case K.CanvasMutation:case K.Input:return this.replaceIds(n.data,e,["id"]),n;case K.StyleSheetRule:case K.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case K.Font:return n;case K.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),n;case K.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),Vm([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(i=>{this.replaceStyleIds(i,e,["styleId"])})]),n}}return!1}replace(e,n,r,i){for(let s of i)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=e.getIds(r,n[s]):n[s]=e.getId(r,n[s]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==Pe.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},wl=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Rl=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!rs(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let r=_g(C(f({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(yg(C(f({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),ka(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Sg({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let n=Vl(e),r=nv(e);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(e,n){let r=this;this.restoreHandlers.push($l(e.prototype,"attachShadow",function(i){return function(s){let o=i.call(this,s);return this.shadowRoot&&mg(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},Sa=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}},Al=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Sl,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;let r={id:n,styleIds:[]},i=[];for(let s of e){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:Zm(a),index:c}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},kl=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,n){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==n)}add(e,n){this.active||(this.active=!0,ev(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}},Se,Ea;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=qr([t,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}var Lt=RI();function hn(t={}){let{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:E,maskAttributeFn:A,maskInputFn:O,maskTextFn:P,maxCanvasSize:j=null,packFn:v,sampling:I={},dataURLOptions:k={},mousemoveWait:B,recordDOM:b=!0,recordCanvas:D=!1,recordCrossOriginIframes:L=!1,recordAfter:X=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:ce=!1,collectFonts:be=!1,inlineImages:T=!1,plugins:R,keepIframeSrcFn:w=()=>!1,ignoreCSSAttributes:q=new Set([]),errorHandler:le,onMutation:et,getCanvasManager:Fe}=t;sv(le);let tt=L?window.parent===window:!0,ue=!1;if(!tt)try{window.parent.document&&(ue=!1)}catch{ue=!0}if(tt&&!e)throw new Error("emit function is required");if(!tt&&!ue)return()=>{};B!==void 0&&I.mousemove===void 0&&(I.mousemove=B),Lt.reset();let gr=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},pi=E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:E==="all",headMetaDescKeywords:E==="all"}:E||{};XI();let we,vt=0,Be=se=>{for(let bt of R||[])bt.eventProcessor&&(se=bt.eventProcessor(se));return v&&!ue&&(se=v(se)),se};Se=(se,bt)=>{let ee=se;if(ee.timestamp=_a(),qr([Zr,"access",me=>me[0],"optionalAccess",me=>me.isFrozen,"call",me=>me()])&&ee.type!==J.FullSnapshot&&!(ee.type===J.IncrementalSnapshot&&ee.data.source===K.Mutation)&&Zr.forEach(me=>me.unfreeze()),tt)qr([e,"optionalCall",me=>me(Be(ee),bt)]);else if(ue){let me={type:"rrweb",event:Be(ee),origin:window.location.origin,isCheckout:bt};window.parent.postMessage(me,"*")}if(ee.type===J.FullSnapshot)we=ee,vt=0;else if(ee.type===J.IncrementalSnapshot){if(ee.data.source===K.Mutation&&ee.data.isAttachIframe)return;vt++;let me=r&&vt>=r,oe=n&&we&&ee.timestamp-we.timestamp>n;(me||oe)&&Rc(!0)}};let rn=se=>{Se({type:J.IncrementalSnapshot,data:f({source:K.Mutation},se)})},_r=se=>Se({type:J.IncrementalSnapshot,data:f({source:K.Scroll},se)}),oS=se=>Se({type:J.IncrementalSnapshot,data:f({source:K.CanvasMutation},se)}),aS=se=>Se({type:J.IncrementalSnapshot,data:f({source:K.AdoptedStyleSheet},se)}),jn=new Al({mutationCb:rn,adoptedStyleSheetCb:aS}),$n=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new vl:new bl({mirror:Lt,mutationCb:rn,stylesheetManager:jn,recordCrossOriginIframes:L,wrappedEmit:Se});for(let se of R||[])se.getMirror&&se.getMirror({nodeMirror:Lt,crossOriginIframeMirror:$n.crossOriginIframeMirror,crossOriginIframeStyleMirror:$n.crossOriginIframeStyleMirror});let bc=new kl,wc=Ev(Fe,{mirror:Lt,win:window,mutationCb:se=>Se({type:J.IncrementalSnapshot,data:f({source:K.CanvasMutation},se)}),recordCanvas:D,blockClass:i,blockSelector:s,unblockSelector:o,maxCanvasSize:j,sampling:I.canvas,dataURLOptions:k,errorHandler:le}),Fs=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new wl:new Rl({mutationCb:rn,scrollCb:_r,bypassOptions:{onMutation:et,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:h,maskInputOptions:gr,dataURLOptions:k,maskAttributeFn:A,maskTextFn:P,maskInputFn:O,recordCanvas:D,inlineImages:T,sampling:I,slimDOMOptions:pi,iframeManager:$n,stylesheetManager:jn,canvasManager:wc,keepIframeSrcFn:w,processedNodeManager:bc},mirror:Lt}),Rc=(se=!1)=>
23{if(!b)return;Se({type:J.Meta,data:{href:window.location.href,width:ug(),height:cg()}},se),jn.reset(),Fs.init(),Zr.forEach(ee=>ee.lock());let bt=YI(document,{mirror:Lt,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:h,maskAllInputs:gr,maskAttributeFn:A,maskInputFn:O,maskTextFn:P,slimDOM:pi,dataURLOptions:k,recordCanvas:D,inlineImages:T,onSerialize:ee=>{pg(ee,Lt)&&$n.addIframe(ee),fg(ee,Lt)&&jn.trackLinkElement(ee),yl(ee)&&Fs.addShadowRoot(ee.shadowRoot,document)},onIframeLoad:(ee,me)=>{$n.attachIframe(ee,me),ee.contentWindow&&wc.addWindow(ee.contentWindow),Fs.observeAttachShadow(ee)},onStylesheetLoad:(ee,me)=>{jn.attachLinkElement(ee,me)},keepIframeSrcFn:w});if(!bt)return console.warn("Failed to snapshot the document");Se({type:J.FullSnapshot,data:{node:bt,initialOffset:ag(window)}}),Zr.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&jn.adoptStyleSheets(document.adoptedStyleSheets,Lt.getId(document))};Ea=Rc;try{let se=[],bt=me=>ne(yv)({onMutation:et,mutationCb:rn,mousemoveCb:(oe,Wn)=>Se({type:J.IncrementalSnapshot,data:{source:Wn,positions:oe}}),mouseInteractionCb:oe=>Se({type:J.IncrementalSnapshot,data:f({source:K.MouseInteraction},oe)}),scrollCb:_r,viewportResizeCb:oe=>Se({type:J.IncrementalSnapshot,data:f({source:K.ViewportResize},oe)}),inputCb:oe=>Se({type:J.IncrementalSnapshot,data:f({source:K.Input},oe)}),mediaInteractionCb:oe=>Se({type:J.IncrementalSnapshot,data:f({source:K.MediaInteraction},oe)}),styleSheetRuleCb:oe=>Se({type:J.IncrementalSnapshot,data:f({source:K.StyleSheetRule},oe)}),styleDeclarationCb:oe=>Se({type:J.IncrementalSnapshot,data:f({source:K.StyleDeclaration},oe)}),canvasMutationCb:oS,fontCb:oe=>Se({type:J.IncrementalSnapshot,data:f({source:K.Font},oe)}),selectionCb:oe=>{Se({type:J.IncrementalSnapshot,data:f({source:K.Selection},oe)})},customElementCb:oe=>{Se({type:J.IncrementalSnapshot,data:f({source:K.CustomElement},oe)})},blockClass:i,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:gr,inlineStylesheet:h,sampling:I,recordDOM:b,recordCanvas:D,inlineImages:T,userTriggeredOnInput:ce,collectFonts:be,doc:me,maskAttributeFn:A,maskInputFn:O,maskTextFn:P,keepIframeSrcFn:w,blockSelector:s,unblockSelector:o,slimDOMOptions:pi,dataURLOptions:k,mirror:Lt,iframeManager:$n,stylesheetManager:jn,shadowDomManager:Fs,processedNodeManager:bc,canvasManager:wc,ignoreCSSAttributes:q,plugins:qr([R,"optionalAccess",oe=>oe.filter,"call",oe=>oe(Wn=>Wn.observer),"optionalAccess",oe=>oe.map,"call",oe=>oe(Wn=>({observer:Wn.observer,options:Wn.options,callback:cS=>Se({type:J.Plugin,data:{plugin:Wn.name,payload:cS}})}))])||[]},{});$n.addLoadListener(me=>{try{se.push(bt(me.contentDocument))}catch(oe){console.warn(oe)}});let ee=()=>{Rc(),se.push(bt(document))};return document.readyState==="interactive"||document.readyState==="complete"?ee():(se.push(Ge("DOMContentLoaded",()=>{Se({type:J.DomContentLoaded,data:{}}),X==="DOMContentLoaded"&&ee()})),se.push(Ge("load",()=>{Se({type:J.Load,data:{}}),X==="load"&&ee()},window))),()=>{se.forEach(me=>me()),bc.destroy(),Ea=void 0,ov()}}catch(se){console.warn(se)}}function Sv(t){if(!Ea)throw new Error("please take full snapshot after start recording");Ea(t)}hn.mirror=Lt;hn.takeFullSnapshot=Sv;function Ev(t,e){try{return t?t(e):new Sa}catch{return console.warn("Unable to initialize CanvasManager"),new Sa}}var Tv=3,Iv=5;function ql(t){return t>9999999999?t:t*1e3}function dl(t){return t>9999999999?t/1e3:t}function hs(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:J.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ve(e,10,1e3)}}),e.category==="console")))}var vv="button,a";function Eg(t){return t.closest(vv)||t}function Tg(t){let e=Ig(t);return!e||!(e instanceof Element)?e:Eg(e)}function Ig(t){return bv(t)?t.target:t}function bv(t){return typeof t=="object"&&!!t&&"target"in t}var xn;function wv(t){return xn||(xn=[],Rv()),xn.push(t),()=>{let e=xn?xn.indexOf(t):-1;e>-1&&xn.splice(e,1)}}function Rv(){Ee(fe,"open",function(t){return function(...e){if(xn)try{xn.forEach(n=>n())}catch{}return t.apply(fe,e)}})}var Av=new Set([K.Mutation,K.StyleSheetRule,K.StyleDeclaration,K.AdoptedStyleSheet,K.CanvasMutation,K.Selection,K.MediaInteraction]);function kv(t,e,n){t.handleClick(e,n)}var Cl=class{constructor(e,n,r=hs){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){let e=wv(()=>{this._lastMutation=qm()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,n){if(Nv(n,this._ignoreSelector)||!Ov(e))return;let r={timestamp:dl(e.timestamp),clickBreadcrumb:e,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=dl(e)}registerScroll(e=Date.now()){this._lastScroll=dl(e)}registerClick(e){let n=Eg(e);this._handleMultiClick(n)}_handleMultiClick(e){this._getClicks(e).forEach(n=>
23{n.clickCount++})}_getClicks(e){return this._clicks.filter(n=>n.node===e)}_checkClicks(){let e=[],n=qm();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&e.push(r)});for(let r of e){let i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let n=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,i=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!r&&!i,{clickCount:o,clickBreadcrumb:a}=e;if(s){let c=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:C(f({},a.data),{url:fe.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1})};this._addBreadcrumbEvent(n,d);return}if(o>1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:C(f({},a.data),{url:fe.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0})};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Pn(()=>this._checkClicks(),1e3)}},Cv=["A","BUTTON","INPUT"];function Nv(t,e){return!!(!Cv.includes(t.tagName)||t.tagName==="INPUT"&&!["submit","button"].includes(t.getAttribute("type")||"")||t.tagName==="A"&&(t.hasAttribute("download")||t.hasAttribute("target")&&t.getAttribute("target")!=="_self")||e&&t.matches(e))}function Ov(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function qm(){return Date.now()/1e3}function Pv(t,e){try{if(!Mv(e))return;let{source:n}=e.data;if(Av.has(n)&&t.registerMutation(e.timestamp),n===K.Scroll&&t.registerScroll(e.timestamp),Dv(e)){let{type:r,id:i}=e.data,s=hn.mirror.getNode(i);s instanceof HTMLElement&&r===qe.Click&&t.registerClick(s)}}catch{}}function Mv(t){return t.type===Tv}function Dv(t){return t.data.source===K.MouseInteraction}function Xt(t){return f({timestamp:Date.now()/1e3,type:"default"},t)}var Gl=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}(Gl||{}),xv=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Lv(t){let e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(let n in t)if(xv.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),e[r]=t[n]}return e}var Uv=t=>e=>{if(!t.isEnabled())return;let n=Fv(e);if(!n)return;let r=e.name==="click",i=r?e.event:void 0;r&&t.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&kv(t.clickDetector,n,Tg(e.event)),hs(t,n)};function vg(t,e){let n=hn.mirror.getId(t),r=n&&hn.mirror.getNode(n),i=r&&hn.mirror.getMeta(r),s=i&&Hv(i)?i:null;return{message:e,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(o=>o.type===Gl.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Lv(s.attributes)}}:{}}}function Fv(t){let{target:e,message:n}=Bv(t);return Xt(f({category:`ui.${t.name}`},vg(e,n)))}function Bv(t){let e=t.name==="click",n,r=null;try{r=e?Tg(t.event):Ig(t.event),n=Le(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Hv(t){return t.type===Gl.Element}function jv(t,e){if(!t.isEnabled())return;t.updateUserActivity();let n=$v(e);n&&hs(t,n)}function $v(t){let{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:o}=t;if(!o||Wv(o)||!s)return null;let a=e||r||i,c=s.length===1;if(!a&&c)return null;let u=Le(o,{maxStringLength:200})||"<unknown>",d=vg(o,u);return Xt({category:"ui.keyDown",message:u,data:C(f({},d.data),{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s})})}function Wv(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}var Vv={resource:Yv,paint:zv,navigation:Kv};function da(t,e){return({metric:n})=>void e.replayPerformanceEntries.push(t(n))}
23function qv(t){return t.map(Gv).filter(Boolean)}function Gv(t){let e=Vv[t.entryType];return e?e(t):null}function ni(t){return((ye||fe.performance.timeOrigin)+t)/1e3}function zv(t){let{duration:e,entryType:n,name:r,startTime:i}=t,s=ni(i);return{type:n,name:r,start:s,end:s+e,data:void 0}}function Kv(t){let{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:m,transferSize:h,type:g}=t;return i===0?null:{type:`${e}.${g}`,start:ni(m),end:ni(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:s,redirectCount:p}}}function Yv(t){let{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:ni(s),end:ni(i),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function Jv(t){let e=t.entries[t.entries.length-1],n=e&&e.element?[e.element]:void 0;return Ca(t,"largest-contentful-paint",n)}function Xv(t){return t.sources!==void 0}function Qv(t){let e=[],n=[];for(let r of t.entries)if(Xv(r)){let i=[];for(let s of r.sources)if(s.node){n.push(s.node);let o=hn.mirror.getId(s.node);o&&i.push(o)}e.push({value:r.value,nodeIds:i.length?i:void 0})}return Ca(t,"cumulative-layout-shift",n,e)}function Zv(t){let e=t.entries[t.entries.length-1],n=e&&e.target?[e.target]:void 0;return Ca(t,"first-input-delay",n)}function eb(t){let e=t.entries[t.entries.length-1],n=e&&e.target?[e.target]:void 0;return Ca(t,"interaction-to-next-paint",n)}function Ca(t,e,n,r){let i=t.value,s=t.rating,o=ni(i);return{type:"web-vital",name:e,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:n?n.map(a=>hn.mirror.getId(a)):void 0,attributions:r}}}function tb(t){function e(i){t.performanceEntries.includes(i)||t.performanceEntries.push(i)}function n({entries:i}){i.forEach(e)}let r=[];return["navigation","paint","resource"].forEach(i=>{r.push(Dt(i,n))}),r.push(Gi(da(Jv,t)),rr(da(Qv,t)),zi(da(Zv,t)),Ki(da(eb,t))),()=>{r.forEach(i=>i())}}var W=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nb='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))}
vendor: 4,591 bytes, line 23
23,M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;
23++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function rb(){let t=new Blob([nb]);return URL.createObjectURL(t)}var Gm=["info","warn","error","log"],pa="[Replay] ";function pl(t,e="info"){gt({category:"console",data:{logger:"replay"},level:e,message:`${pa}${t}`},{level:e})}function ib(){let t=!1,e=!1,n={exception:()=>{},infoTick:()=>{},setConfig:r=>{t=r.captureExceptions,e=r.traceInternals}};return W?(Gm.forEach(r=>{n[r]=(...i)=>{S[r](pa,...i),e&&pl(i.join(""),Hi(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),S.error(pa,r),t?Cn(r):e&&pl(r,"error")},n.infoTick=(...r)=>{S.info(pa,...r),e&&setTimeout(()=>pl(r[0]),0)}):Gm.forEach(r=>{n[r]=()=>{}}),n}
23var G=ib(),ls=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Bl}.`)}},Ta=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}addEvent(e){return _(this,null,function*(){let n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>Bl)throw new ls;this.events.push(e)})}finish(){return new Promise(e=>{let n=this.events;this.clear(),e(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(n=>n.timestamp).sort()[0];return e?ql(e):null}},Nl=class{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((e,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?e():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){W&&G.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,n){let r=this._getAndIncrementId();return new Promise((i,s)=>{let o=({data:a})=>{let c=a;if(c.method===e&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){W&&G.error("Error in compression worker: ",c.response),s(new Error("Error in compression worker"));return}i(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:e,arg:n})})}_getAndIncrementId(){return this._id++}},Ol=class{constructor(e){this._worker=new Nl(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let n=ql(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(e);return this._totalSize+=r.length,this._totalSize>Bl?Promise.reject(new ls):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{W&&G.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}_finishRequest(){return _(this,null,function*(){let e=yield this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e})}},Pl=class{constructor(e){this._fallback=new Ta,this._compression=new Ol(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}finish(){return _(this,null,function*(){return yield this.ensureWorkerIsLoaded(),this._used.finish()})}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}_ensureWorkerIsLoaded(){return _(this,null,function*(){try{yield this._compression.ensureReady()}catch(e){W&&G.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}yield this._switchToCompressionWorker()})}_switchToCompressionWorker(){return _(this,null,function*(){let{events:e,hasCheckout:n,waitForCheckout:r}=this._fallback,i=[];for(let s of e)i.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{yield Promise.all(i),this._fallback.clear()}catch(s){W&&G.exception(s,"Failed to add events when switching buffers.")}})}};function sb({useCompression:t,workerUrl:e}){if(t&&window.Worker){let n=ob(e);
23if(n)return n}return W&&G.info("Using simple buffer"),new Ta}function ob(t){try{let e=t||ab();if(!e)return;W&&G.info(`Using compression worker${t?` from ${t}`:""}`);let n=new Worker(e);return new Pl(n)}catch(e){W&&G.exception(e,"Failed to create compression worker")}}function ab(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?rb():""}function zl(){try{return"sessionStorage"in fe&&!!fe.sessionStorage}catch{return!1}}function cb(t){ub(),t.session=void 0}function ub(){if(zl())try{fe.sessionStorage.removeItem(Ul)}catch{}}function bg(t){return t===void 0?!1:Math.random()<t}function wg(t){let e=Date.now(),n=t.id||Ie(),r=t.started||e,i=t.lastActivity||e,s=t.segmentId||0,o=t.sampled,a=t.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:s,sampled:o,previousSessionId:a}}function Kl(t){if(zl())try{fe.sessionStorage.setItem(Ul,JSON.stringify(t))}catch{}}function lb(t,e){return bg(t)?"session":e?"buffer":!1}function zm({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){let i=lb(t,e),s=wg({sampled:i,previousSessionId:r});return n&&Kl(s),s}function db(){if(!zl())return null;try{let t=fe.sessionStorage.getItem(Ul);if(!t)return null;let e=JSON.parse(t);return W&&G.infoTick("Loading existing session"),wg(e)}catch{return null}}function Ml(t,e,n=+new Date){return t===null||e===void 0||e<0?!0:e===0?!1:t+e<=n}function Rg(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ml(t.started,e,r)||Ml(t.lastActivity,n,r)}function Ag(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!(!Rg(t,{sessionIdleExpire:e,maxReplayDuration:n})||t.sampled==="buffer"&&t.segmentId===0)}function fl({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){let i=r.stickySession&&db();return i?Ag(i,{sessionIdleExpire:t,maxReplayDuration:e})?(W&&G.infoTick("Session in sessionStorage is expired, creating new one..."),zm(r,{previousSessionId:i.id})):i:(W&&G.infoTick("Creating new session"),zm(r,{previousSessionId:n}))}function pb(t){return t.type===J.Custom}function Yl(t,e,n){return Cg(t,e)?(kg(t,e,n),!0):!1}function fb(t,e,n){return Cg(t,e)?kg(t,e,n):Promise.resolve(null)}function kg(t,e,n){return _(this,null,function*(){let{eventBuffer:r}=t;if(!r||r.waitForCheckout&&!n)return null;let i=t.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let s=t.getOptions(),o=hb(e,s.beforeAddRecordingEvent);return o?yield r.addEvent(o):void 0}catch(s){let o=s&&s instanceof ls,a=o?"addEventSizeExceeded":"addEvent";if(o&&i)return r.clear(),r.waitForCheckout=!0,null;t.handleException(s),yield t.stop({reason:a});let c=M();c&&c.recordDroppedEvent("internal_sdk_error","replay")}})}function Cg(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;let n=ql(e.timestamp);return n+t.timeouts.sessionIdlePause<Date.now()?!1:n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration?(W&&G.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function hb(t,e){try{if(typeof e=="function"&&pb(t))return e(t)}catch(n){return W&&G.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return t}function Jl(t){return!t.type}function Dl(t){return t.type==="transaction"}function mb(t){return t.type==="replay_event"}function Km(t){return t.type==="feedback"}function gb(t){return(e,n)=>{if(!t.isEnabled()||!Jl(e)&&!Dl(e))return;let r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(Dl(e)){_b(t,e);return}yb(t,e)}}}function _b(t,e){let n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}function yb(t,e){let n=t.getContext();if(e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id),t.recordingMode!=="buffer"||!e.tags||!e.tags.replayId)return;let{beforeErrorSampling:r}=t.getOptions();typeof r=="function"&&!r(e)||Pn(()=>_(this,null,function*(){try{yield t.sendBufferedReplayOrFlush()}catch(i){t.handleException(i)}}))}function Sb(t){return e=>{!t.isEnabled()||!Jl(e)||Eb(t,e)}}function Eb(t,e){let n=e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let r=Xt({category:"replay.hydrate-error",data:{url:Ti()}});hs(t,r)}}function Tb(t){let e=M();e&&e.on("beforeAddBreadcrumb",n=>Ib(t,n))}function Ib(t,e){if(!t.isEnabled()||!Ng(e))return;let n=vb(e);n&&hs(t,n)}function vb(t){return!Ng(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")?null:t.category==="console"?bb(t):Xt(t)}function bb(t){let e=t.data&&t.data.arguments;if(!Array.isArray(e)||e.length===0)return Xt(t);let n=!1,r=e.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>ca?(n=!0,`${i.slice(0,ca)}\u2026`):i;if(typeof i=="object")try{let s=Ve(i,7);return JSON.stringify(s).length>ca?(n=!0,`${JSON.stringify(s,null,2).slice(0,ca)}\u2026`):s}catch{}return i});return Xt(C(f({},t),{data:f(C(f({},t.data),{arguments:r}),n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{})}))}function Ng(t){return!!t.category}function wb(t,e){return t.type||!t.exception||!t.exception.values||!t.exception.values.length?!1:!!(e.originalException&&e.originalException.__rrweb__)}function Og(){let t=z().getPropagationContext().dsc;t&&delete t.replay_id;let e=Z();if(e){let n=We(e);delete n.replay_id}}function Rb(t,e){t.triggerUserActivity(),t.addUpdate(()=>e.timestamp?(t.throttledAddEvent({type:J.Custom,timestamp:e.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1):!0)}function Ab(t,e){return t.recordingMode!=="buffer"||e.message===Fl||!e.exception||e.type?!1:bg(t.getOptions().errorSampleRate)}function kb(t){return Object.assign((e,n)=>!t.isEnabled()||t.isPaused()?e:mb(e)?(delete e.breadcrumbs,e):!Jl(e)&&!Dl(e)&&!Km(e)?e:t.checkAndHandleExpiredSession()?Km(e)?(t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),Rb(t,e),e):wb(e,n)&&!t.getOptions()._experiments.captureExceptions?(W&&G.log("Ignoring error from rrweb internals",e),null):((Ab(t,e)||t.recordingMode==="session")&&(e.tags=C(f({},e.tags),{replayId:t.getSessionId()})),e):(Og(),e),{id:"Replay"})}function Na(t,e){return e.map(({type:n,start:r,end:i,name:s,data:o})=>{let a=t.throttledAddEvent({type:J.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:i,data:o}}});
23return typeof a=="string"?Promise.resolve(null):a})}function Cb(t){let{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}function Nb(t){return e=>{if(!t.isEnabled())return;let n=Cb(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(Na(t,[n]),!1)))}}function Ob(t,e){return W&&t.getOptions()._experiments.traceInternals?!1:Mu(e,M())}function Pg(t,e){t.isEnabled()&&e!==null&&(Ob(t,e.name)||t.addUpdate(()=>(Na(t,[e]),!0)))}function Oa(t){if(!t)return;let e=new TextEncoder;try{if(typeof t=="string")return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){let n=Lg(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function Mg(t){if(!t)return;let e=parseInt(t,10);return isNaN(e)?void 0:e}function Dg(t){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Lg(t)];if(!t)return[void 0]}catch(e){return W&&G.exception(e,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return W&&G.info("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Ia(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};let n=f({},t._meta),r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function xg(t,e){if(!e)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:o,request:a,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:i,data:ae({method:s,statusCode:o,request:a,response:c})}}function ds(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Ln(t,e,n){if(!e&&Object.keys(t).length===0)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};let r={headers:t,size:e},{body:i,warnings:s}=Pb(n);return r.body=i,s&&s.length>0&&(r._meta={warnings:s}),r}function xl(t,e){return Object.entries(t).reduce((n,[r,i])=>{let s=r.toLowerCase();return e.includes(s)&&t[r]&&(n[s]=i),n},{})}function Lg(t){return new URLSearchParams(t).toString()}function Pb(t){if(!t||typeof t!="string")return{body:t};let e=t.length>Om,n=Mb(t);if(e){let r=t.slice(0,Om);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch{}return{body:t}}function Mb(t){let e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function va(t,e){let n=Db(t);return ft(n,e)}function Db(t,e=fe.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(fe.location.origin))return t;let n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;let r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}function xb(t,e,n){return _(this,null,function*(){try{let r=yield Ub(t,e,n),i=xg("resource.fetch",r);Pg(n.replay,i)}catch(r){W&&G.exception(r,"Failed to capture fetch breadcrumb")}})}
23function Lb(t,e){let{input:n,response:r}=e,i=n?Ug(n):void 0,s=Oa(i),o=r?Mg(r.headers.get("content-length")):void 0;s!==void 0&&(t.data.request_body_size=s),o!==void 0&&(t.data.response_body_size=o)}function Ub(t,e,n){return _(this,null,function*(){let r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r}=e,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=t.data,l=va(o,n.networkDetailAllowUrls)&&!va(o,n.networkDetailDenyUrls),p=l?Fb(n,e.input,u):ds(u),m=yield Bb(l,n,e.response,d);return{startTimestamp:i,endTimestamp:s,url:o,method:a,statusCode:c,request:p,response:m}})}function Fb({networkCaptureBodies:t,networkRequestHeaders:e},n,r){let i=n?$b(n,e):{};if(!t)return Ln(i,r,void 0);let s=Ug(n),[o,a]=Dg(s),c=Ln(i,r,o);return a?Ia(c,a):c}function Bb(s,o,a,c){return _(this,arguments,function*(t,{networkCaptureBodies:e,networkResponseHeaders:n},r,i){if(!t&&i!==void 0)return ds(i);let u=r?Fg(r.headers,n):{};if(!r||!e&&i!==void 0)return Ln(u,i,void 0);let[d,l]=yield jb(r),p=Hb(d,{networkCaptureBodies:e,responseBodySize:i,captureDetails:t,headers:u});return l?Ia(p,l):p})}function Hb(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:i}){try{let s=t&&t.length&&n===void 0?Oa(t):n;return r?e?Ln(i,s,t):Ln(i,s,void 0):ds(s)}catch(s){return W&&G.exception(s,"Failed to serialize response body"),Ln(i,n,void 0)}}function jb(t){return _(this,null,function*(){let e=Wb(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{return[yield Vb(e)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(W&&G.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(W&&G.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}})}function Ug(t=[]){if(!(t.length!==2||typeof t[1]!="object"))return t[1].body}function Fg(t,e){let n={};return e.forEach(r=>{t.get(r)&&(n[r]=t.get(r))}),n}function $b(t,e){return t.length===1&&typeof t[0]!="string"?Ym(t[0],e):t.length===2?Ym(t[1],e):{}}function Ym(t,e){if(!t)return{};let n=t.headers;return n?n instanceof Headers?Fg(n,e):Array.isArray(n)?{}:xl(n,e):{}}function Wb(t){try{return t.clone()}catch(e){W&&G.exception(e,"Failed to clone response body")}}function Vb(t){return new Promise((e,n)=>{let r=Pn(()=>n(new Error("Timeout while trying to read response body")),500);qb(t).then(i=>e(i),i=>n(i)).finally(()=>clearTimeout(r))})}function qb(t){return _(this,null,function*(){return yield t.text()})}function Gb(t,e,n){return _(this,null,function*(){try{let r=Kb(t,e,n),i=xg("resource.xhr",r);Pg(n.replay,i)}catch(r){W&&G.exception(r,"Failed to capture xhr breadcrumb")}})}function zb(t,e){let{xhr:n,input:r}=e;if(!n)return;let i=Oa(r),s=n.getResponseHeader("content-length")?Mg(n.getResponseHeader("content-length")):Qb(n.response,n.responseType);i!==void 0&&(t.data.request_body_size=i),s!==void 0&&(t.data.response_body_size=s)}function Kb(t,e,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:a}=e,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=t.data;if(!c)return null;if(!a||!va(c,n.networkDetailAllowUrls)||va(c,n.networkDetailDenyUrls)){let v=ds(l),I=ds(p);return{startTimestamp:i,endTimestamp:s,url:c,method:u,statusCode:d,request:v,response:I}}let m=a[xt],h=m?xl(m.request_headers,n.networkRequestHeaders):{},g=xl(Yb(a),n.networkResponseHeaders),[y,E]=n.networkCaptureBodies?Dg(o):[void 0],[A,O]=n.networkCaptureBodies?Jb(a):[void 0],P=Ln(h,l,y),j=Ln(g,p,A);return{startTimestamp:i,endTimestamp:s,url:c,method:u,statusCode:d,request:E?Ia(P,E):P,response:O?Ia(j,O):j}}function Yb(t){let e=t.getAllResponseHeaders();return e?e.split(`\r 24`).reduce((n,r)=>{let[i,s]=r.split(": ");return s&&(n[i.toLowerCase()]=s),n},{}):{}}function Jb(t){let e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return Xb(t.response,t.responseType)}catch(n){e.push(n)}return W&&G.warn("Failed to get xhr response body",...e),[void 0]}function Xb(t,e){try{if(typeof t=="string")return[t];if(t instanceof Document)return[t.body.outerHTML];if(e==="json"&&t&&typeof t=="object")return[JSON.stringify(t)];if(!t)return[void 0]}catch(n){return W&&G.exception(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return W&&G.info("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Qb(t,e){try{let n=e==="json"&&t&&typeof t=="object"?JSON.stringify(t):t;return Oa(n)}catch{return}}function Zb(t){let e=M();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=t.getOptions(),a={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};e&&e.on("beforeAddBreadcrumb",(c,u)=>ew(a,c,u))}catch{}}function ew(t,e,n){if(e.data)try{tw(e)&&rw(n)&&(zb(e,n),Gb(e,n,t)),nw(e)&&iw(n)&&(Lb(e,n),xb(e,n,t))}catch(r){W&&G.exception(r,"Error when enriching network breadcrumb")}}function tw(t){return t.category==="xhr"}function nw(t){return t.category==="fetch"}function rw(t){return t&&t.xhr}function iw(t){return t&&t.response}function sw(t){let e=M();Zi(Uv(t)),pn(Nb(t)),Tb(t),Zb(t);let n=kb(t);jo(n),e&&(e.on("beforeSendEvent",Sb(t)),e.on("afterSendEvent",gb(t)),e.on("createDsc",r=>{let i=t.getSessionId();i&&t.isEnabled()&&t.recordingMode==="session"&&t.checkAndHandleExpiredSession()&&(r.replay_id=i)}),e.on("spanStart",r=>{t.lastActiveSpan=r}),e.on("spanEnd",r=>{t.lastActiveSpan=r}),e.on("beforeSendFeedback",(r,i)=>{let s=t.getSessionId();i&&i.includeReplay&&t.isEnabled()&&s&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=s)}))}function ow(t){return _(this,null,function*(){try{return Promise.all(Na(t,[aw(fe.performance.memory)]))}catch{return[]}})}function aw(t){let{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function cw(t,e,n){let r,i,s,o=n&&n.maxWait?Math.max(n.maxWait,e):0;function a(){return c(),r=t(),r}function c(){i!==void 0&&clearTimeout(i),s!==void 0&&clearTimeout(s),i=s=void 0}function u(){return i!==void 0||s!==void 0?a():r}function d(){return i&&clearTimeout(i),i=Pn(a,e),o&&s===void 0&&(s=Pn(a,o)),r}return d.cancel=c,d.flush=u,d}var ir=F.navigator;function uw(){return/iPhone|iPad|iPod/i.test(ir&&ir.userAgent||"")||/Macintosh/i.test(ir&&ir.userAgent||"")&&ir&&ir.maxTouchPoints&&ir.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function lw(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession()){W&&G.warn("Received replay event after session expired.");return}let i=r||!e;e=!0,t.clickDetector&&Pv(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&i&&t.setInitialState(),!Yl(t,n,i))return!0;
24if(!i)return!1;let s=t.session;if(pw(t,i),t.recordingMode==="buffer"&&s&&t.eventBuffer){let o=t.eventBuffer.getEarliestTimestamp();o&&(W&&G.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),s.started=o,t.getOptions().stickySession&&Kl(s))}return s&&s.previousSessionId||t.recordingMode==="session"&&t.flush(),!0})}}function dw(t){let e=t.getOptions();return{type:J.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:t.eventBuffer?t.eventBuffer.type==="worker":!1,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}function pw(t,e){!e||!t.session||t.session.segmentId!==0||Yl(t,dw(t),!1)}function fw(t,e,n,r){return at(Ci(t,Fr(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function hw({recordingData:t,headers:e}){let n,r=`${JSON.stringify(e)} 25`;if(typeof t=="string")n=`${r}${t}`;else{let s=new TextEncoder().encode(r);n=new Uint8Array(s.length+t.length),n.set(s),n.set(t,s.length)}return n}function mw(i){return _(this,arguments,function*({client:t,scope:e,replayId:n,event:r}){let s=typeof t._integrations=="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):void 0,o={event_id:n,integrations:s};t.emit("preprocessEvent",r,o);let a=yield Oi(t.getOptions(),r,o,e,t,ve());if(!a)return null;a.platform=a.platform||"javascript";let c=t.getSdkMetadata(),{name:u,version:d}=c&&c.sdk||{};return a.sdk=C(f({},a.sdk),{name:u||"sentry.javascript.unknown",version:d||"0.0.0"}),a})}function gw(o){return _(this,arguments,function*({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){let a=hw({recordingData:t,headers:{segment_id:n}}),{urls:c,errorIds:u,traceIds:d,initialTimestamp:l}=r,p=M(),m=z(),h=p&&p.getTransport(),g=p&&p.getDsn();if(!p||!h||!g||!s.sampled)return He({});let y={type:aI,replay_start_timestamp:l/1e3,timestamp:i/1e3,error_ids:u,trace_ids:d,urls:c,replay_id:e,segment_id:n,replay_type:s.sampled},E=yield mw({scope:m,client:p,replayId:e,event:y});if(!E)return p.recordDroppedEvent("event_processor","replay",y),W&&G.info("An event processor returned `null`, will not send event."),He({});delete E.sdkProcessingMetadata;let A=fw(E,a,g,p.getOptions().tunnel),O;try{O=yield h.send(A)}catch(j){let v=new Error(Fl);try{v.cause=j}catch{}throw v}if(typeof O.statusCode=="number"&&(O.statusCode<200||O.statusCode>=300))throw new ba(O.statusCode);let P=Ui({},O);if(Li(P,"replay"))throw new ps(P);return O})}var ba=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},ps=class extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}};function Bg(n){return _(this,arguments,function*(t,e={count:0,interval:fI}){let{recordingData:r,onError:i}=t;if(r.length)try{return yield gw(t),!0}catch(s){if(s instanceof ba||s instanceof ps)throw s;if(jr("Replays",{_retryCount:e.count}),i&&i(s),e.count>=hI){let o=new Error(`${Fl} - max retries exceeded`);try{o.cause=s}catch{}throw o}return e.interval*=++e.count,new Promise((o,a)=>{Pn(()=>_(this,null,function*(){try{yield Bg(t,e),o(!0)}catch(c){a(c)}}),e.interval)})}})}var Hg="__THROTTLED",_w="__SKIPPED";function yw(t,e,n){let r=new Map,i=a=>{let c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0),o=!1;return(...a)=>{let c=Math.floor(Date.now()/1e3);if(i(c),s()>=e){let d=o;return o=!0,d?_w:Hg}o=!1;let u=r.get(c)||0;return r.set(c,u+1),t(...a)}}var Ll=class t{constructor({options:e,recordingOptions:n}){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),t.prototype.__init5.call(this),t.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:cI,sessionIdleExpire:uI},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=e,this._debouncedFlush=cw(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=yw((o,a)=>fb(this,o,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),s=r?{threshold:Math.min(mI,r),timeout:r,scrollTimeout:gI,ignoreSelector:i?i.join(","):""}:void 0;if(s&&(this.clickDetector=new Cl(this,s)),W){let o=e._experiments;G.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){W&&G.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(e),!this.session){W&&G.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",W&&G.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}
25start(){if(this._isEnabled&&this.recordingMode==="session"){W&&G.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){W&&G.info("Buffering is in progress, call `flush()` to save the replay");return}W&&G.infoTick("Starting replay in session mode"),this._updateUserActivity();let e=fl({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled){W&&G.info("Buffering is in progress, call `flush()` to save the replay");return}W&&G.infoTick("Starting replay in buffer mode");let e=fl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=hn(f(C(f(C(f(f({},this._recordingOptions),this.recordingMode==="buffer"?{checkoutEveryNms:pI}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)}),{emit:lw(this)}),uw()),{onMutation:this._onMutationHandler}),e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}))}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}stop(){return _(this,arguments,function*({forceFlush:e=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{W&&G.info(`Stopping Replay${n?` triggered by ${n}`:""}`),Og(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&(yield this._flush({force:!0})),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,cb(this)}catch(r){this.handleException(r)}}})}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),W&&G.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),W&&G.info("Resuming replay"))}sendBufferedReplayOrFlush(){return _(this,arguments,function*({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();W&&G.info("Converting buffer to session"),yield this.flushImmediate();let r=this.stopRecording();!e||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())})}addUpdate(e){let n=e();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Ml(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${fe.location.pathname}${fe.location.hash}${fe.location.search}`,n=`${fe.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(e,n){let r=this._throttledAddEvent(e,n);if(r===Hg){let i=Xt({category:"replay.throttled"});this.addUpdate(()=>!Yl(this,{type:Iv,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){let e=this.lastActiveSpan||Z(),n=e&&te(e),i=(n&&H(n).data||{})[_e];if(!(!n||!i||!["route","custom"].includes(i)))return H(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=sb({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){let n=this._options.errorSampleRate>0,r=fl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;let e=this.session;return Ag(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}_refreshSession(e){return _(this,null,function*(){this._isEnabled&&(yield this.stop({reason:"refresh session"}),this.initializeSampling(e.id))})}_addListeners(){try{fe.document.addEventListener("visibilitychange",this._handleVisibilityChange),fe.addEventListener("blur",this._handleWindowBlur),fe.addEventListener("focus",this._handleWindowFocus),fe.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(sw(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=tb(this)}_removeListeners(){try{fe.document.removeEventListener("visibilitychange",this._handleVisibilityChange),fe.removeEventListener("blur",this._handleWindowBlur),fe.removeEventListener("focus",this._handleWindowFocus),fe.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{fe.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
25dTasks()}}__init2(){this._handleWindowBlur=()=>{let e=Xt({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{let e=Xt({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{jv(this,e)}}_doChangeToBackgroundTasks(e){!this.session||Rg(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){W&&G.info("Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:J.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=qv(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let n=this._context.initialTimestamp/1e3;e=e.filter(r=>r.start>=n)}return Promise.all(Na(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:n}=this;if(!e||!n||this._requiresManualStart||e.segmentId)return;let r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}
25_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}_runFlush(){return _(this,null,function*(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){W&&G.error("No session or eventBuffer found to flush.");return}if(yield this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(yield ow(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");let r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();let s=yield this.eventBuffer.finish();yield Bg({replayId:e,recordingData:s,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});let r=M();if(r){let i=n instanceof ps?"ratelimit_backoff":"send_error";r.recordDroppedEvent(i,"replay")}}})}__init5(){this._flush=(...n)=>_(this,[...n],function*({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){W&&G.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let r=this.session.started,s=Date.now()-r;this._debouncedFlush.cancel();let o=s<this._options.minReplayDuration,a=s>this._options.maxReplayDuration+5e3;if(o||a){W&&G.info(`Session duration (${Math.floor(s/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}let c=this.eventBuffer;c&&this.session.segmentId===0&&!c.hasCheckout&&W&&G.info("Flushing initial segment without checkout.");let u=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{yield this._flushLock}catch(d){this.handleException(d)}finally{this._flushLock=void 0,u&&this._debouncedFlush()}})}_maybeSaveSession(){this.session&&this._options.stickySession&&Kl(this.session)}__init6(){this._onMutationHandler=e=>{let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=r&&n>r;if(n>i||s){let o=Xt({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(o)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}};function ts(t,e){return[...t,...e].join(",")}function Sw({mask:t,unmask:e,block:n,unblock:r,ignore:i}){let s=["base","iframe[srcdoc]:not([src])"],o=ts(t,[".sentry-mask","[data-sentry-mask]"]),a=ts(e,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:ts(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:ts(r,[]),ignoreSelector:ts(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Ew({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){return!r||i.unmaskTextSelector&&t.matches(i.unmaskTextSelector)?s:n.includes(e)||e==="value"&&t.tagName==="INPUT"&&["submit","button"].includes(t.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}var Jm='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Tw=["content-length","content-type","accept"],Xm=!1,Iw=t=>new wa(t),wa=class t{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=lI,flushMaxDelay:n=dI,minReplayDuration:r=_I,maxReplayDuration:i=Pm,stickySession:s=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:m=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:E=[],networkCaptureBodies:A=!0,networkRequestHeaders:O=[],networkResponseHeaders:P=[],mask:j=[],maskAttributes:v=["title","placeholder"],unmask:I=[],block:k=[],unblock:B=[],ignore:b=[],maskFn:D,beforeAddRecordingEvent:L,beforeErrorSampling:X,onError:ce}={}){this.name=t.id;let be=Sw({mask:j,unmask:I,block:k,unblock:B,ignore:b});if(this._recordingOptions=C(f({maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:D,maskInputFn:D,maskAttributeFn:(T,R,w)=>Ew({maskAttributes:v,maskAllText:u,privacyOptions:be,key:T,value:R,el:w})},be),{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:T=>{try{T.__rrweb__=!0}catch{}}}),this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(r,yI),maxReplayDuration:Math.min(i,Pm),stickySession:s,useCompression:o,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:m,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:y,networkDetailDenyUrls:E,networkCaptureBodies:A,networkRequestHeaders:Qm(O),networkResponseHeaders:Qm(P),beforeAddRecordingEvent:L,beforeErrorSampling:X,onError:ce,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Jm}`:Jm),this._isInitialized&&Ko())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Xm}set _isInitialized(e){Xm=e}afterAllSetup(e){!Ko()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}
25startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}getRecordingMode(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let n=vw(this._initialOptions,e);this._replay=new Ll({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let n=e.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};wa.__initStatic();function vw(t,e){let n=e.getOptions(),r=f({sessionSampleRate:0,errorSampleRate:0},ae(t)),i=kn(n.replaysSessionSampleRate),s=kn(n.replaysOnErrorSampleRate);return i==null&&s==null&&Oe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),s!=null&&(r.errorSampleRate=s),r}function Qm(t){return[...Tw,...t.map(e=>e.toLowerCase())]}var x=F,Xl=0;function Ql(){return Xl>0}function bw(){Xl++,setTimeout(()=>{Xl--})}function or(t,e={}){function n(i){return typeof i=="function"}if(!n(t))return t;try{let i=t.__sentry_wrapped__;if(i)return typeof i=="function"?i:t;if(Xn(t))return t}catch{return t}let r=function(...i){try{let s=i.map(o=>or(o,e));return t.apply(this,s)}catch(s){throw bw(),Zn(o=>{o.addEventProcessor(a=>(e.mechanism&&(Or(a,void 0,void 0),Gt(a,e.mechanism)),a.extra=C(f({},a.extra),{arguments:i}),a)),Cn(s)}),s}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}_o(r,t),Te(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var Ae=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Pa(t,e){let n=td(t,e),r={type:Cw(e),value:Nw(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ww(t,e,n,r){let i=M(),s=i&&i.getOptions().normalizeDepth,o=Mw(e),a={__serialized__:No(e,s)};if(o)return{exception:{values:[Pa(t,o)]},extra:a};let c={exception:{values:[{type:Jn(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Ow(e,{isUnhandledRejection:r})}]},extra:a};if(n){let u=td(t,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Zl(t,e){return{exception:{values:[Pa(t,e)]}}}function td(t,e){let n=e.stacktrace||e.stack||"",r=Aw(e),i=kw(e);try{return t(n,r,i)}catch{}return[]}var Rw=/Minified React error #\d+;/i;function Aw(t){return t&&Rw.test(t.message)?1:0}function kw(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function jg(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Cw(t){let e=t&&t.name;return!e&&jg(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Nw(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:jg(t)&&Array.isArray(t.message)&&t.message.length==2?t.message[1]:e:"No error message"}function $g(t,e,n,r){let i=n&&n.syntheticException||void 0,s=Ma(t,e,i,r);return Gt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),He(s)}function Wg(t,e,n="info",r,i){let s=r&&r.syntheticException||void 0,o=ed(t,e,s,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),He(o)}function Ma(t,e,n,r,i){let s;if(ho(e)&&e.error)return Zl(t,e.error);if(mo(e)||Jc(e)){let o=e;if("stack"in e)s=Zl(t,e);else{let a=o.name||(mo(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;s=ed(t,c,n,r),Or(s,c)}return"code"in o&&(s.tags=C(f({},s.tags),{"DOMException.code":`${o.code}`})),s}return Kn(e)?Zl(t,e):Nt(e)||Jn(e)?(s=ww(t,e,n,i),Gt(s,{synthetic:!0}),s):(s=ed(t,e,n,r),Or(s,`${e}`,void 0),Gt(s,{synthetic:!0}),s)}function ed(t,e,n,r){let i={};if(r&&n){let s=td(t,n);s.length&&(i.exception={values:[{value:e,stacktrace:{frames:s}}]}),Gt(i,{synthetic:!0})}
25if(Cr(e)){let{__sentry_template_string__:s,__sentry_template_values__:o}=e;return i.logentry={message:s,params:o},i}return i.message=e,i}function Ow(t,{isUnhandledRejection:e}){let n=nu(t),r=e?"promise rejection":"exception";return ho(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Jn(t)?`Event \`${Pw(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Pw(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Mw(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function Vg(t,{metadata:e,tunnel:n,dsn:r}){let i=f(f({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!r&&{dsn:mt(r)}),s=Dw(t);return at(i,[s])}function Dw(t){return[{type:"user_report"},t]}var Da=class extends xi{constructor(e){let n=f({parentSpanIsAlwaysRootSpan:!0},e),r=x.SENTRY_SDK_SOURCE||Vu();Fi(n,"browser",["browser"],r),super(n),n.sendClientReports&&x.document&&x.document.addEventListener("visibilitychange",()=>{x.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return $g(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Wg(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Ae&&S.warn("SDK not enabled, will not capture user feedback.");return}let n=Vg(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}};function qg(t,e=sa("fetch")){let n=0,r=0;function i(s){let o=s.body.length;n+=o,r++;let a=f({body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return oa("fetch"),vn("No fetch implementation available");try{return e(t.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return oa("fetch"),n-=o,r--,vn(c)}}return Wo(t,i)}var xw=30;var Lw=50;function nd(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?Wt:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Uw=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Fw=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Bw=/\((\S*)(?::(\d+))(?::(\d+))\)/,Hw=t=>{let e=Uw.exec(t);if(e){let[,r,i,s]=e;return nd(r,Wt,+i,+s)}let n=Fw.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let o=Bw.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}let[i,s]=zg(n[1]||Wt,n[2]);return nd(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},jw=[xw,Hw],$w=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ww=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Vw=t=>{let e=$w.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let s=Ww.exec(e[3]);s&&(e[1]=e[1]||"eval",e[3]=s[1],e[4]=s[2],e[5]="")}let r=e[3],i=e[1]||Wt;return[i,r]=zg(i,r),nd(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},qw=[Lw,Vw];var Gw=[jw,qw],Gg=lo(...Gw),zg=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Wt,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var xa=1024,zw="Breadcrumbs",Kw=(t={})=>{let e=f({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:zw,setup(n){e.console&&Uu(Xw(n)),e.dom&&Zi(Jw(n,e.dom)),e.xhr&&es(Qw(n)),e.fetch&&$i(Zw(n)),e.history&&pn(eR(n)),e.sentry&&n.on("beforeSendEvent",Yw(n))}}},ms=Kw;function Yw(t){return function(n){M()===t&>({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ot(n)},{event:n})}}function Jw(t,e){return function(r){if(M()!==t)return;let i,s,o=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>xa&&(Ae&&S.warn(`\`dom.maxStringLength\` cannot exceed ${xa}, but a value of ${a} was configured. Sentry will use ${xa}
25 instead.`),a=xa),typeof o=="string"&&(o=[o]);try{let u=r.event,d=tR(u)?u.target:u;i=Le(d,{keyAttrs:o,maxStringLength:a}),s=Ii(d)}catch{i="<unknown>"}if(i.length===0)return;let c={category:`ui.${r.name}`,message:i};s&&(c.data={"ui.component_name":s}),gt(c,{event:r.event,name:r.name,global:r.global})}}function Xw(t){return function(n){if(M()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Hi(n.level),message:go(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${go(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;gt(r,{input:n.args,level:n.level})}}function Qw(t){return function(n){if(M()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[xt];if(!r||!i||!s)return;let{method:o,url:a,status_code:c,body:u}=s,d={method:o,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i},p=Go(c);gt({category:"xhr",data:d,type:"http",level:p},l)}}function Zw(t){return function(n){if(M()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let s=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};gt({category:"fetch",data:s,level:"error",type:"http"},o)}else{let s=n.response,o=C(f({},n.fetchData),{status_code:s&&s.status}),a={input:n.args,response:s,startTimestamp:r,endTimestamp:i},c=Go(o.status_code);gt({category:"fetch",data:o,type:"http",level:c},a)}}}function eR(t){return function(n){if(M()!==t)return;let r=n.from,i=n.to,s=_t(x.location.href),o=r?_t(r):void 0,a=_t(i);(!o||!o.path)&&(o=s),s.protocol===a.protocol&&s.host===a.host&&(i=a.relative),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),gt({category:"navigation",data:{from:r,to:i}})}}function tR(t){return!!t&&!!t.target}var nR=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],rR="BrowserApiErrors",iR=(t={})=>{let e=f({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:rR,setupOnce(){e.setTimeout&&Ee(x,"setTimeout",Kg),e.setInterval&&Ee(x,"setInterval",Kg),e.requestAnimationFrame&&Ee(x,"requestAnimationFrame",sR),e.XMLHttpRequest&&"XMLHttpRequest"in x&&Ee(XMLHttpRequest.prototype,"send",oR);let n=e.eventTarget;n&&(Array.isArray(n)?n:nR).forEach(aR)}}},Yg=iR;function Kg(t){return function(...e){let n=e[0];return e[0]=or(n,{mechanism:{data:{function:Ye(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function sR(t){return function(e){return t.apply(this,[or(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Ye(t)},handled:!1,type:"instrument"}})])}}function oR(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&Ee(n,i,function(s){let o={mechanism:{data:{function:i,handler:Ye(s)},handled:!1,type:"instrument"}},a=Xn(s);return a&&(o.mechanism.data.handler=Ye(a)),or(s,o)})}),t.apply(this,e)}}function aR(t){let n=x[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ee(r,"addEventListener",function(i){return function(s,o,a){try{cR(o)&&(o.handleEvent=or(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ye(o),target:t},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[s,or(o,{mechanism:{data:{function:"addEventListener",handler:Ye(o),target:t},handled:!1,type:"instrument"}}),a])}}),Ee(r,"removeEventListener",function(i){return function(s,o,a){try{let c=o.__sentry_wrapped__;c&&i.call(this,s,c,a)}catch{}return i.call(this,s,o,a)}}))}function cR(t){return typeof t.handleEvent=="function"}var gs=()=>({name:"BrowserSession",setupOnce(){if(typeof x.document>"u"){Ae&&S.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Mi({ignoreDuration:!0}),Di(),pn(({from:t,to:e})=>{t!==void 0&&t!==e&&(Mi({ignoreDuration:!0}),Di())})}});var uR="GlobalHandlers",lR=(t={})=>{let e=f({onerror:!0,onunhandledrejection:!0}
25,t);return{name:uR,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(dR(n),Jg("onerror")),e.onunhandledrejection&&(pR(n),Jg("onunhandledrejection"))}}},_s=lR;function dR(t){_i(e=>{let{stackParser:n,attachStacktrace:r}=Xg();if(M()!==t||Ql())return;let{msg:i,url:s,line:o,column:a,error:c}=e,u=mR(Ma(n,c||i,void 0,r,!1),s,o,a);u.level="error",Pi(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function pR(t){yi(e=>{let{stackParser:n,attachStacktrace:r}=Xg();if(M()!==t||Ql())return;let i=fR(e),s=Yn(i)?hR(i):Ma(n,i,void 0,r,!0);s.level="error",Pi(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function fR(t){if(Yn(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function hR(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function mR(t,e,n,r){let i=t.exception=t.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=r,d=n,l=Ne(e)&&e.length>0?e:Ti();return c.length===0&&c.push({colno:u,filename:l,function:Wt,in_app:!0,lineno:d}),t}function Jg(t){Ae&&S.log(`Global Handler attached: ${t}`)}function Xg(){let t=M();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var ys=()=>({name:"HttpContext",preprocessEvent(t){if(!x.navigator&&!x.location&&!x.document)return;let e=t.request&&t.request.url||x.location&&x.location.href,{referrer:n}=x.document||{},{userAgent:r}=x.navigator||{},i=f(f(f({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=C(f(f({},t.request),e&&{url:e}),{headers:i});t.request=s}});var gR="cause",_R=5,yR="LinkedErrors",SR=(t={})=>{let e=t.limit||_R,n=t.key||gR;return{name:yR,preprocessEvent(r,i,s){let o=s.getOptions();xu(Pa,o.stackParser,o.maxValueLength,n,e,r,i)}}},Ss=SR;function Qg(t){let e=[Wr(),$r(),Yg(),ms(),_s(),Ss(),Vr(),ys()];return t.autoSessionTracking!==!1&&e.push(gs()),e}function ER(t={}){let e={defaultIntegrations:Qg(t),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:x.SENTRY_RELEASE&&x.SENTRY_RELEASE.id?x.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return t.defaultIntegrations==null&&delete t.defaultIntegrations,f(f({},e),t)}function TR(){let t=typeof x.window<"u"&&x;if(!t)return!1;let e=t.chrome?"chrome":"browser",n=t[e],r=n&&n.runtime&&n.runtime.id,i=x.location&&x.location.href||"",s=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&x===x.top&&s.some(c=>i.startsWith(`${c}//`)),a=typeof t.nw<"u";return!!r&&!o&&!a}function rd(t={}){let e=ER(t);if(!e.skipBrowserExtensionCheck&&TR()){Oe(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}Ae&&(zo()||S.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));let n=C(f({},e),{stackParser:zc(e.stackParser||Gg),integrations:ku(e),transport:e.transport||qg});return Ou(Da,n)}function La(t={}){if(!x.document){Ae&&S.error("Global document not defined in showReportDialog call");return}let e=z(),n=e.getClient(),r=n&&n.getDsn();if(!r){Ae&&S.error("DSN not configured for showReportDialog call");return}if(e&&(t.user=f(f({},e.getUser()),t.user)),!t.eventId){let a=Ho();a&&(t.eventId=a)}let i=x.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=Au(r,t),t.onLoad&&(i.onload=t.onLoad);let{onClose:s}=t;if(s){let a=c=>{if(c.data==="__sentry_reportdialog_closed__")try{s()}finally{x.removeEventListener("message",a)}};x.addEventListener("message",a)}let o=x.document.head||x.document.body;o?o.appendChild(i):Ae&&S.error("Not injecting report dialog. No injection point found in HTML")}var Zg=new WeakMap,id=new Map,Es={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function t_(t,e){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:a}=f({traceFetch:Es.traceFetch,traceXHR:Es.traceXHR,trackFetchStreamPerformance:Es.trackFetchStreamPerformance},e),c=typeof s=="function"?s:l=>!0,u=l=>bR(l,a),d={};n&&(t.addEventProcessor(l=>(l.type==="transaction"&&l.spans&&l.spans.forEach(p=>{if(p.op==="http.client"){let m=id.get(p.span_id);m&&(p.timestamp=m/1e3,id.delete(p.span_id))}}),l)),i&&$u(l=>{if(l.response){let p=Zg.get(l.response);p&&l.endTimestamp&&id.set(p,l.endTimestamp)}}),$i(l=>{let p=Fu(l,c,u,d);if(l.response&&l.fetchData.__span&&Zg.set(l.response,l.fetchData.__span),p){let m=n_(l.fetchData.url),h=m?_t(m).host:void 0;p.setAttributes({"http.url":m,"server.address":h})}o&&p&&e_(p)})),r&&es(l=>{let p=wR(l,c,u,d);o&&p&&e_(p)})}function IR(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function e_(t){let{url:e}=H(t).data||{};if(!e||typeof e!="string")return;let n=Dt("resource",({entries:r})=>{r.forEach(i=>
25{IR(i)&&i.name.endsWith(e)&&(vR(i).forEach(o=>t.setAttribute(...o)),setTimeout(n))})})}function Qt(t=0){return((ye||performance.timeOrigin)+t)/1e3}function vR(t){let{name:e,version:n}=Xi(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),ye?[...r,["http.request.redirect_start",Qt(t.redirectStart)],["http.request.fetch_start",Qt(t.fetchStart)],["http.request.domain_lookup_start",Qt(t.domainLookupStart)],["http.request.domain_lookup_end",Qt(t.domainLookupEnd)],["http.request.connect_start",Qt(t.connectStart)],["http.request.secure_connection_start",Qt(t.secureConnectionStart)],["http.request.connection_end",Qt(t.connectEnd)],["http.request.request_start",Qt(t.requestStart)],["http.request.response_start",Qt(t.responseStart)],["http.request.response_end",Qt(t.responseEnd)]]:r}function bR(t,e){let n=x.location&&x.location.href;if(n){let r,i;try{r=new URL(t,n),i=new URL(n).origin}catch{return!1}let s=r.origin===i;return e?ft(r.toString(),e)||s&&ft(r.pathname,e):s}else{let r=!!t.match(/^\/(?!\/)/);return e?ft(t,e):r}}function wR(t,e,n,r){let i=t.xhr,s=i&&i[xt];if(!i||i.__sentry_own_request__||!s)return;let o=$e()&&e(s.url);if(t.endTimestamp&&o){let l=i.__sentry_xhr_span_id__;if(!l)return;let p=r[l];p&&s.status_code!==void 0&&(Lr(p,s.status_code),p.end(),delete r[l]);return}let a=n_(s.url),c=a?_t(a).host:void 0,u=!!Z(),d=o&&u?ct({name:`${s.method} ${s.url}`,attributes:{type:"xhr","http.method":s.method,"http.url":a,url:s.url,"server.address":c,[ie]:"auto.http.browser",[je]:"http.client"}}):new ot;return i.__sentry_xhr_span_id__=d.spanContext().spanId,r[i.__sentry_xhr_span_id__]=d,n(s.url)&&RR(i,$e()&&u?d:void 0),d}function RR(t,e){let{"sentry-trace":n,baggage:r}=Bi({span:e});n&&AR(t,n,r)}function AR(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader("baggage",n)}catch{}}function n_(t){try{return new URL(t,x.location.origin).href}catch{return}}function r_(){x&&x.document?x.document.addEventListener("visibilitychange",()=>{let t=Z();if(!t)return;let e=te(t);if(x.document.hidden&&e){let n="cancelled",{op:r,status:i}=H(e);Ae&&S.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||e.setStatus({code:2,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):Ae&&S.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var kR="BrowserTracing",CR=f(C(f({},Hr),{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{}}),Es),sd=(t={})=>{Co();let{enableInp:e,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:i,enableStandaloneClsSpans:s},beforeStartSpan:o,idleTimeout:a,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:d,traceFetch:l,traceXHR:p,trackFetchStreamPerformance:m,shouldCreateSpanForRequest:h,enableHTTPTimings:g,instrumentPageLoad:y,instrumentNavigation:E}=f(f({},CR),t),A=el({recordClsStandaloneSpans:s||!1});e&&cl(),r&&F.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?nl():n&&tl(),i&&rl();let O={name:void 0,source:void 0};function P(j,v){let I=v.op==="pageload",k=o?o(v):v,B=k.attributes||{};v.name!==k.name&&(B[_e]="custom",k.attributes=B),O.name=k.name,O.source=B[_e];let b=xo(k,{idleTimeout:a,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:I,beforeSpanEnd:L=>{A(),il(L,{recordClsOnPageloadSpan:!s})}});function D(){["interactive","complete"].includes(x.document.readyState)&&j.emit("idleSpanEnableAutoFinish",b)}return I&&x.document&&(x.document.addEventListener("readystatechange",()=>{D()}),D()),b}return{name:kR,afterAllSetup(j){let v,I=x.location&&x.location.href;function k(){v&&!H(v).timestamp&&(Ae&&S.log(`[Tracing] Finishing current active span with op: ${H(v).op}`),v.end())}j.on("startNavigationSpan",B=>{M()===j&&(k(),v=P(j,f({op:"navigation"},B)))}),j.on("startPageLoadSpan",(B,b={})=>{if(M()!==j)return;k();let D=b.sentryTrace||i_("sentry-trace"),L=b.baggage||i_("baggage"),X=lu(D,L);z().setPropagationContext(X),v=P(j,f({op:"pageload"},B))}),j.on("spanEnd",B=>{let b=H(B).op;if(B!==te(B)||b!=="navigation"&&b!=="pageload")return;let D=z(),L=D.getPropagationContext();D.setPropagationContext(C(f({},L),{sampled:L.sampled!==void 0?L.sampled:ht(B),dsc:L.dsc||We(B)}))}),x.location&&(y&&s_(j,{name:x.location.pathname,startTime:ye?ye/1e3:void 0,attributes:{[_e]:"url",[ie]:"auto.pageload.browser"}}),E&&pn(({to:B,from:b})=>{if(b===void 0&&I&&I.indexOf(B)!==-1){I=void 0;return}b!==B&&(I=void 0,Ua(j,{name:x.location.pathname,attributes:{[_e]:"url",[ie]:"auto.navigation.browser"}}))})),d&&r_(),i&&NR(a,c,u,O),e&&ul(),t_(j,{traceFetch:l,traceXHR:p,trackFetchStreamPerformance:m,tracePropagationTargets:j.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:g})}}};function s_(t,e,n){t.emit("startPageLoadSpan",e,n),z().setTransactionName(e.name);let r=Z();return(r&&H(r).op)==="pageload"?r:void 0}function Ua(t,e){ve().setPropagationContext({traceId:Je()}),z().setPropagationContext({traceId:Je()}),t.emit("startNavigationSpan",e),z().setTransactionName(e.name);let n=Z();return(n&&H(n).op)==="navigation"?n:void 0}function i_(t){let e=eu(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function NR(t,e,n,r){let i,s=()=>{let o="ui.action.click",a=Z(),c=a&&te(a);if(c){let u=H(c).op;
25if(["navigation","pageload"].includes(u)){Ae&&S.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(xr,"interactionInterrupted"),i.end(),i=void 0),!r.name){Ae&&S.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}i=xo({name:r.name,op:o,attributes:{[_e]:r.source||"url"}},{idleTimeout:t,finalTimeout:e,childSpanTimeout:n})};x.document&&addEventListener("click",s,{once:!1,capture:!0})}var o_=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__;function PR(t={}){let e=[Wr(),$r(),ms(),_s(),Ss(),Vr(),ys()];return t.autoSessionTracking!==!1&&e.push(gs()),e}function Pj(t){let e=f({defaultIntegrations:PR()},t);return Fi(e,"angular"),MR(),rd(e)}function MR(){let e=Ws&&Ws.major?parseInt(Ws.major,10):void 0;e&&(e<14&&o_&&S.warn(`This Sentry SDK does not officially support Angular ${e}.`,"This SDK only supports Angular 14 and above.","If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.","Otherwise, please consider upgrading your Angular version."),jr("angular",{version:e}))}var DR=typeof Zone<"u"&&Zone.root&&Zone.root.run;function ri(t){return DR?Zone.root.run(t):t()}function xR(t){return t&&t.ngOriginalError?t.ngOriginalError:t}function LR(t){return a_(t.error)?t.error:typeof ErrorEvent<"u"&&t.error instanceof ErrorEvent&&t.error.message?t.error.message:typeof t.error=="string"?`Server returned code ${t.status} with body "${t.error}"`:t.message}function a_(t){if(t instanceof Error)return!0;if(t===null||typeof t!="object")return!1;let e=t;return Ne(e.name)&&Ne(e.message)&&(e.stack===void 0||Ne(e.stack))}var UR=(()=>{class t{constructor(n){this._options=f({logErrors:!0},n)}ngOnDestroy(){this._removeAfterSendEventListener&&this._removeAfterSendEventListener()}handleError(n){let r=this._extractError(n)||"Handled unknown error",i=ri(()=>Cn(r,{mechanism:{type:"angular",handled:!1}}));if(this._options.logErrors&&Oe(()=>console.error(r)),this._options.showDialog){let s=M();s&&!this._removeAfterSendEventListener?this._removeAfterSendEventListener=s.on("afterSendEvent",o=>{!o.type&&o.event_id&&ri(()=>{La(C(f({},this._options.dialogOptions),{eventId:o.event_id}))})}):s||ri(()=>{La(C(f({},this._options.dialogOptions),{eventId:i}))})}}_extractError(n){if(this._options.extractor){let r=this._defaultExtractor.bind(this);return this._options.extractor(n,r)}return this._defaultExtractor(n)}_defaultExtractor(n){let r=xR(n);return r instanceof Op?LR(r):typeof r=="string"||a_(r)?r:null}}return t.\u0275fac=function(n){return new(n||t)(Y("errorHandlerOptions"))},t.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function c_(t){return new UR(t)}var FR="ui.angular.routing";var u_;function Mj(t={}){return t.instrumentNavigation!==!1&&(u_=!0),sd(C(f({},t),{instrumentNavigation:!1}))}function BR(t,e){let n=e&&H(e).data||{};e&&n[_e]==="url"&&(e.updateName(t),e.setAttribute(_e,"route"),e.setAttribute(ie,`auto.${H(e).op}.angular`))}var od=(()=>{class t{constructor(n){this._router=n,this.navStart$=this._router.events.pipe(nt(r=>r instanceof Hp),En(r=>{if(!u_){o_&&S.error("Angular integration has tracing enabled, but Tracing integration is not configured");return}this._routingSpan&&(this._routingSpan.end(),this._routingSpan=null);let i=M(),s=Lu(r.url);if(i){this._isPageloadOngoing()?this._pageloadOngoing=!1:ri(()=>{Ua(i,{name:s,attributes:{[ie]:"auto.navigation.angular",[_e]:"url"}})}),this._routingSpan=ri(()=>ct({name:`${r.url}`,op:FR,attributes:f({[ie]:"auto.ui.angular",[_e]:"url",url:s},r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})}))||null;return}})),this.resEnd$=this._router.events.pipe(nt(r=>r instanceof Vp),En(r=>{let i=HR(r.state.root);i&&z().setTransactionName(i);let s=Z(),o=s&&te(s);BR(i,o)})),this.navEnd$=this._router.events.pipe(nt(r=>r instanceof jp||r instanceof $p||r instanceof Wp),En(()=>{this._routingSpan&&(ri(()=>{this._routingSpan.end()}),this._routingSpan=null)})),this._routingSpan=null,this._pageloadOngoing=!0,this._subscription=new vp,this._subscription.add(this.navStart$.subscribe()),this._subscription.add(this.resEnd$.subscribe()),this._subscription.add(this.navEnd$.subscribe())}ngOnDestroy(){this._subscription.unsubscribe()}_isPageloadOngoing(){if(!this._pageloadOngoing)return!1;let n=Z();if(!n)return this._pageloadOngoing=!1,!1;let r=te(n);return this._pageloadOngoing=H(r).op==="pageload",this._pageloadOngoing}}return t.\u0275fac=function(n){return new(n||t)(Y(zs))},t.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function HR(t){let e=[],n=t&&t.firstChild;for(;n;
25){let i=n&&n.routeConfig&&n.routeConfig.path;if(i==null)break;e.push(i),n=n.firstChild}let r=e.filter(i=>i).join("/");return r?`/${r}/`:"/"}var ad={production:!0,local:!1},Ts=new lf;function l_(t){return new re(3e3,!1)}function $R(){return new re(3100,!1)}function WR(){return new re(3101,!1)}function VR(t){return new re(3001,!1)}function qR(t){return new re(3003,!1)}function GR(t){return new re(3004,!1)}function zR(t,e){return new re(3005,!1)}function KR(){return new re(3006,!1)}function YR(){return new re(3007,!1)}function JR(t,e){return new re(3008,!1)}function XR(t){return new re(3002,!1)}function QR(t,e,n,r,i){return new re(3010,!1)}function ZR(){return new re(3011,!1)}function eA(){return new re(3012,!1)}function tA(){return new re(3200,!1)}function nA(){return new re(3202,!1)}function rA(){return new re(3013,!1)}function iA(t){return new re(3014,!1)}function sA(t){return new re(3015,!1)}function oA(t){return new re(3016,!1)}function aA(t,e){return new re(3404,!1)}function cA(t){return new re(3502,!1)}function uA(t){return new re(3503,!1)}function lA(){return new re(3300,!1)}function dA(t){return new re(3504,!1)}function pA(t){return new re(3301,!1)}function fA(t,e){return new re(3302,!1)}function hA(t){return new re(3303,!1)}function mA(t,e){return new re(3400,!1)}function gA(t){return new re(3401,!1)}function _A(t){return new re(3402,!1)}function yA(t,e){return new re(3505,!1)}function Un(t){switch(t.length){case 0:return new Er;case 1:return t[0];default:return new xc(t)}}function b_(t,e,n=new Map,r=new Map){let i=[],s=[],o=-1,a=null;if(e.forEach(c=>{let u=c.get("offset"),d=u==o,l=d&&a||new Map;c.forEach((p,m)=>{let h=m,g=p;if(m!=="offset")switch(h=t.normalizePropertyName(h,i),g){case Ks:g=n.get(m);break;case jt:g=r.get(m);break;default:g=t.normalizeStyleValue(m,h,g,i);break}l.set(h,g)}),d||s.push(l),a=l,o=u}),i.length)throw cA(i);return s}function Nd(t,e,n,r){switch(e){case"start":t.onStart(()=>r(n&&cd(n,"start",t)));break;case"done":t.onDone(()=>r(n&&cd(n,"done",t)));break;case"destroy":t.onDestroy(()=>r(n&&cd(n,"destroy",t)));break}}function cd(t,e,n){let r=n.totalTime,i=!!n.disabled,s=Od(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,r??t.totalTime,i),o=t._data;return o!=null&&(s._data=o),s}function Od(t,e,n,r,i="",s=0,o){return{element:t,triggerName:e,fromState:n,toState:r,phaseName:i,totalTime:s,disabled:!!o}}function dt(t,e,n){let r=t.get(e);return r||t.set(e,r=n),r}function d_(t){let e=t.indexOf(":"),n=t.substring(1,e),r=t.slice(e+1);return[n,r]}var SA=typeof document>"u"?null:document.documentElement;function Pd(t){let e=t.parentNode||t.host||null;return e===SA?null:e}function EA(t){return t.substring(1,6)=="ebkit"}var ar=null,p_=!1;function TA(t){ar||(ar=IA()||{},p_=ar.style?"WebkitAppearance"in ar.style:!1);let e=!0;return ar.style&&!EA(t)&&(e=t in ar.style,!e&&p_&&(e="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in ar.style)),e}function IA(){return typeof document<"u"?document.body:null}function w_(t,e){for(;e;){if(e===t)return!0;e=Pd(e)}return!1}function R_(t,e,n){if(n)return Array.from(t.querySelectorAll(e));let r=t.querySelector(e);return r?[r]:[]}var Md=(()=>{let e=class e{validateStyleProperty(r){return TA(r)}containsElement(r,i){return w_(r,i)}getParentElement(r){return Pd(r)}query(r,i,s){return R_(r,i,s)}computeStyle(r,i,s){return s||""}animate(r,i,s,o,a,c=[],u){return new Er(s,o)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=de({token:e,factory:e.\u0275fac});let t=e;return t})(),Ud=class Ud{};Ud.NOOP=new Md;var lr=Ud,dr=class{};var vA=1e3,A_="{{",bA="}}",k_="ng-enter",hd="ng-leave",Fa="ng-trigger",Wa=".ng-trigger",f_="ng-animating",md=".ng-animating";function mn(t){if(typeof t=="number")return t;let e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:gd(parseFloat(e[1]),e[2])}function gd(t,e){switch(e){case"s":return t*vA;default:return t}}function Va(t,e,n){return t.hasOwnProperty("duration")?t:wA(t,e,n)}function wA(t,e,n){let r=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,s=0,o="";if(typeof t=="string"){let a=t.match(r);if(a===null)return e.push(l_(t)),{duration:0,delay:0,easing:""};i=gd(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(s=gd(parseFloat(c),a[4]));let u=a[5];u&&(o=u)}else i=t;if(!n){let a=!1,c=e.length;i<0&&(e.push($R()),a=!0),s<0&&(e.push(WR()),a=!0),a&&e.splice(c,0,l_(t))}return{duration:i,delay:s,easing:o}}
vendor: 43,980 bytes, line 25
25function RA(t){return t.length?t[0]instanceof Map?t:t.map(e=>new Map(Object.entries(e))):[]}function Zt(t,e,n){e.forEach((r,i)=>{let s=Dd(i);n&&!n.has(i)&&n.set(i,t.style[s]),t.style[s]=r})}function ur(t,e){e.forEach((n,r)=>{let i=Dd(r);t.style[i]=""})}function Is(t){return Array.isArray(t)?t.length==1?t[0]:Kp(t):t}function AA(t,e,n){let r=e.params||{},i=C_(t);i.length&&i.forEach(s=>{r.hasOwnProperty(s)||n.push(VR(s))})}var _d=new RegExp(`${A_}\\s*(.+?)\\s*${bA}`,"g");function C_(t){let e=[];if(typeof t=="string"){let n;for(;n=_d.exec(t);)e.push(n[1]);_d.lastIndex=0}return e}function bs(t,e,n){let r=`${t}`,i=r.replace(_d,(s,o)=>{let a=e[o];return a==null&&(n.push(qR(o)),a=""),a.toString()});return i==r?t:i}var kA=/-+([a-z0-9])/g;function Dd(t){return t.replace(kA,(...e)=>e[1].toUpperCase())}function CA(t,e){return t===0||e===0}function NA(t,e,n){if(n.size&&e.length){let r=e[0],i=[];if(n.forEach((s,o)=>{r.has(o)||i.push(o),r.set(o,s)}),i.length)for(let s=1;s<e.length;s++){let o=e[s];i.forEach(a=>o.set(a,xd(t,a)))}}return e}function lt(t,e,n){switch(e.type){case Q.Trigger:return t.visitTrigger(e,n);case Q.State:return t.visitState(e,n);case Q.Transition:return t.visitTransition(e,n);case Q.Sequence:return t.visitSequence(e,n);case Q.Group:return t.visitGroup(e,n);case Q.Animate:return t.visitAnimate(e,n);case Q.Keyframes:return t.visitKeyframes(e,n);case Q.Style:return t.visitStyle(e,n);case Q.Reference:return t.visitReference(e,n);case Q.AnimateChild:return t.visitAnimateChild(e,n);case Q.AnimateRef:return t.visitAnimateRef(e,n);case Q.Query:return t.visitQuery(e,n);case Q.Stagger:return t.visitStagger(e,n);default:throw GR(e.type)}}function xd(t,e){return window.getComputedStyle(t)[e]}var OA=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),qa=class extends dr{normalizePropertyName(e,n){return Dd(e)}normalizeStyleValue(e,n,r,i){let s="",o=r.toString().trim();if(OA.has(n)&&r!==0&&r!=="0")if(typeof r=="number")s="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(zR(e,r))}return o+s}};var Ga="*";function PA(t,e){let n=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(r=>MA(r,n,e)):n.push(t),n}function MA(t,e,n){if(t[0]==":"){let c=DA(t,n);if(typeof c=="function"){e.push(c);return}t=c}let r=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(r==null||r.length<4)return n.push(sA(t)),e;let i=r[1],s=r[2],o=r[3];e.push(h_(i,o));let a=i==Ga&&o==Ga;s[0]=="<"&&!a&&e.push(h_(o,i))}function DA(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,r)=>parseFloat(r)>parseFloat(n);case":decrement":return(n,r)=>parseFloat(r)<parseFloat(n);default:return e.push(oA(t)),"* => *"}}var Ba=new Set(["true","1"]),Ha=new Set(["false","0"]);function h_(t,e){let n=Ba.has(t)||Ha.has(t),r=Ba.has(e)||Ha.has(e);return(i,s)=>{let o=t==Ga||t==i,a=e==Ga||e==s;return!o&&n&&typeof i=="boolean"&&(o=i?Ba.has(t):Ha.has(t)),!a&&r&&typeof s=="boolean"&&(a=s?Ba.has(e):Ha.has(e)),o&&a}}var N_=":self",xA=new RegExp(`s*${N_}s*,?`,"g");function O_(t,e,n,r){return new yd(t).build(e,n,r)}var m_="",yd=class{constructor(e){this._driver=e}build(e,n,r){let i=new Sd(n);return this._resetContextStyleTimingState(i),lt(this,Is(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=m_,e.collectedStyles=new Map,e.collectedStyles.set(m_,new Map),e.currentTime=0}visitTrigger(e,n){let r=n.queryCount=0,i=n.depCount=0,s=[],o=[];return e.name.charAt(0)=="@"&&n.errors.push(KR()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(n),a.type==Q.State){let c=a,u=c.name;u.toString().split(/\s*,\s*/).forEach(d=>{c.name=d,s.push(this.visitState(c,n))}),c.name=u}else if(a.type==Q.Transition){let c=this.visitTransition(a,n);r+=c.queryCount,i+=c.depCount,o.push(c)}else n.errors.push(YR())}),{type:Q.Trigger,name:e.name,states:s,transitions:o,queryCount:r,depCount:i,options:null}}visitState(e,n){let r=this.visitStyle(e.styles,n),i=e.options&&e.options.params||null;if(r.containsDynamicStyles){let s=new Set,o=i||{};r.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{C_(c).forEach(u=>{o.hasOwnProperty(u)||s.add(u)})})}),s.size&&n.errors.push(JR(e.name,[...s.values()]))}return{type:Q.State,name:e.name,style:r,options:i?{params:i}:null}}visitTransition(e,n){n.queryCount=0,n.depCount=0;let r=lt(this,Is(e.animation),n),i=PA(e.expr,n.errors);return{type:Q.Transition,matchers:i,animation:r,queryCount:n.queryCount,depCount:n.depCount,options:cr(e.options)}}visitSequence(e,n){return{type:Q.Sequence,steps:e.steps.map(r=>lt(this,r,n)),options:cr(e.options)}}visitGroup(e,n){let r=n.currentTime,i=0,s=e.steps.map(o=>{n.currentTime=r;let a=lt(this,o,n);return i=Math.max(i,n.currentTime),a});return n.currentTime=i,{type:Q.Group,steps:s,options:cr(e.options)}}visitAnimate(e,n){let r=BA(e.timings,n.errors);n.currentAnimateTimings=r;let i,s=e.styles?e.styles:Dc({});if(s.type==Q.Keyframes)i=this.visitKeyframes(s,n);else{let o=e.styles,a=!1;if(!o){a=!0;let u={};r.easing&&(u.easing=r.easing),o=Dc(u)}n.currentTime+=r.duration+r.delay;let c=this.visitStyle(o,n);c.isEmptyStep=a,i=c}return n.currentAnimateTimings=null,{type:Q.Animate,timings:r,style:i,options:null}}visitStyle(e,n){let r=this._makeStyleAst(e,n);return this._validateStyleAst(r,n),r}_makeStyleAst(e,n){let r=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===jt?r.push(a):n.errors.push(XR(a)):r.push(new Map(Object.entries(a)));let s=!1,o=null;return r.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!s)){for(let c of a.values())if(c.toString().indexOf(A_)>=0){s=!0;break}}}),{type:Q.Style,styles:r,easing:o,offset:e.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(e,n){let r=n.currentAnimateTimings,i=n.currentTime,s=n.currentTime;r&&s>0&&(s-=r.duration+r.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,c)=>{let u=n.collectedStyles.get(n.currentQuerySelector),d=u.get(c),l=!0;d&&(s!=i&&s>=d.startTime&&i<=d.endTime&&(n.errors.push(QR(c,d.startTime,d.endTime,s,i)),l=!1),s=d.startTime),l&&u.set(c,{startTime:s,endTime:i}),n.options&&AA(a,n.options,n.errors)})})}visitKeyframes(e,n){let r={type:Q.Keyframes,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(ZR()),r;let i=1,s=0,o=[],a=!1,c=!1,u=0,d=e.steps.map(E=>{let A=this._makeStyleAst(E,n),O=A.offset!=null?A.offset:FA(A.styles),P=0;return O!=null&&(s++,P=A.offset=O),c=c||P<0||P>1,a=a||P<u,u=P,o.push(P),A});c&&n.errors.push(eA()),a&&n.errors.push(tA());let l=e.steps.length,p=0;s>0&&s<l?n.errors.push(nA()):s==0&&(p=i/(l-1));let m=l-1,h=n.currentTime,g=n.currentAnimateTimings,y=g.duration;return d.forEach((E,A)=>{let O=p>0?A==m?1:p*A:o[A],P=O*y;n.currentTime=h+g.delay+P,g.duration=P,this._validateStyleAst(E,n),E.offset=O,r.styles.push(E)}),r}visitReference(e,n){return{type:Q.Reference,animation:lt(this,Is(e.animation),n),options:cr(e.options)}}visitAnimateChild(e,n){return n.depCount++,{type:Q.AnimateChild,options:cr(e.options)}}visitAnimateRef(e,n){return{type:Q.AnimateRef,animation:this.visitReference(e.animation,n),options:cr(e.options)}}visitQuery(e,n){let r=n.currentQuerySelector,i=e.options||{};n.queryCount++,n.currentQuery=e;let[s,o]=LA(e.selector);n.currentQuerySelector=r.length?r+" "+s:s,dt(n.collectedStyles,n.currentQuerySelector,new Map);let a=lt(this,Is(e.animation),n);return n.currentQuery=null,n.currentQuerySelector=r,{type:Q.Query,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:cr(e.options)}}visitStagger(e,n){n.currentQuery||n.errors.push(rA());let r=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Va(e.timings,n.errors,!0);return{type:Q.Stagger,animation:lt(this,Is(e.animation),n),timings:r,options:null}}};function LA(t){let e=!!t.split(/\s*,\s*/).find(n=>n==N_);return e&&(t=t.replace(xA,"")),t=t.replace(/@\*/g,Wa).replace(/@\w+/g,n=>Wa+"-"+n.slice(1)).replace(/:animating/g,md),[t,e]}function UA(t){return t?f({},t):null}var Sd=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function FA(t){if(typeof t=="string")return null;let e=null;if(Array.isArray(t))t.forEach(n=>{if(n instanceof Map&&n.has("offset")){let r=n;e=parseFloat(r.get("offset")),r.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}return e}function BA(t,e){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let s=Va(t,e).duration;return ud(s,0,"")}let n=t;if(n.split(/\s+/).some(s=>s.charAt(0)=="{"&&s.charAt(1)=="{")){let s=ud(0,0,"");return s.dynamic=!0,s.strValue=n,s}let i=Va(n,e);return ud(i.duration,i.delay,i.easing)}function cr(t){return t?(t=f({},t),t.params&&(t.params=UA(t.params))):t={},t}function ud(t,e,n){return{duration:t,delay:e,easing:n}}function Ld(t,e,n,r,i,s,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:r,duration:i,delay:s,totalTime:i+s,easing:o,subTimeline:a}}var ws=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,n){let r=this._map.get(e);r||this._map.set(e,r=[]),r.push(...n)}has(e){return this._map.has(e)}clear(){this._map.clear()}},HA=1,jA=":enter",$A=new RegExp(jA,"g"),WA=":leave",VA=new RegExp(WA,"g");function P_(t,e,n,r,i,s=new Map,o=new Map,a,c,u=[]){return new Ed().buildKeyframes(t,e,n,r,i,s,o,a,c,u)}var Ed=class{buildKeyframes(e,n,r,i,s,o,a,c,u,d=[]){u=u||new ws;let l=new Td(e,n,u,i,s,d,[]);l.options=c;let p=c.delay?mn(c.delay):0;l.currentTimeline.delayNextStep(p),l.currentTimeline.setStyles([o],null,l.errors,c),lt(this,r,l);let m=l.timelines.filter(h=>h.containsAnimation());if(m.length&&a.size){let h;for(let g=m.length-1;g>=0;g--){let y=m[g];if(y.element===n){h=y;break}}h&&!h.allowOnlyTimelineStyles()&&h.setStyles([a],null,l.errors,c)}return m.length?m.map(h=>h.buildKeyframes()):[Ld(n,[],[],[],0,p,"",!1)]}visitTrigger(e,n){}visitState(e,n){}visitTransition(e,n){}visitAnimateChild(e,n){let r=n.subInstructions.get(n.element);if(r){let i=n.createSubContext(e.options),s=n.currentTimeline.currentTime,o=this._visitSubInstructions(r,i,i.options);s!=o&&n.transformIntoNewTimeline(o)}n.previousNode=e}visitAnimateRef(e,n){let r=n.createSubContext(e.options);r.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],n,r),this.visitReference(e.animation,r),n.transformIntoNewTimeline(r.currentTimeline.currentTime),n.previousNode=e}_applyAnimationRefDelays(e,n,r){for(let i of e){let s=i?.delay;if(s){let o=typeof s=="number"?s:mn(bs(s,i?.params??{},n.errors));r.delayNextStep(o)}}}_visitSubInstructions(e,n,r){let s=n.currentTimeline.currentTime,o=r.duration!=null?mn(r.duration):null,a=r.delay!=null?mn(r.delay):null;return o!==0&&e.forEach(c=>{let u=n.appendInstructionToTimeline(c,o,a);s=Math.max(s,u.duration+u.delay)}),s}visitReference(e,n){n.updateOptions(e.options,!0),lt(this,e.animation,n),n.previousNode=e}visitSequence(e,n){let r=n.subContextCount,i=n,s=e.options;if(s&&(s.params||s.delay)&&(i=n.createSubContext(s),i.transformIntoNewTimeline(),s.delay!=null)){i.previousNode.type==Q.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=za);let o=mn(s.delay);i.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>lt(this,o,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),n.previousNode=e}visitGroup(e,n){let r=[],i=n.currentTimeline.currentTime,s=e.options&&e.options.delay?mn(e.options.delay):0;e.steps.forEach(o=>{let a=n.createSubContext(e.options);s&&a.delayNextStep(s),lt(this,o,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(o=>n.currentTimeline.mergeTimelineCollectedStyles(o)),n.transformIntoNewTimeline(i),n.previousNode=e}_visitTiming(e,n){if(e.dynamic){let r=e.strValue,i=n.params?bs(r,n.params,n.errors):r;return Va(i,n.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,n){let r=n.currentAnimateTimings=this._visitTiming(e.timings,n),i=n.currentTimeline;r.delay&&(n.incrementTime(r.delay),i.snapshotCurrentStyles());let s=e.style;s.type==Q.Keyframes?this.visitKeyframes(s,n):(n.incrementTime(r.duration),this.visitStyle(s,n),i.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=e}visitStyle(e,n){let r=n.currentTimeline,i=n.currentAnimateTimings;!i&&r.hasCurrentStyleProperties()&&r.forwardFrame();let s=i&&i.easing||e.easing;e.isEmptyStep?r.applyEmptyStep(s):r.setStyles(e.styles,s,n.errors,n.options),n.previousNode=e}visitKeyframes(e,n){let r=n.currentAnimateTimings,i=n.currentTimeline.duration,s=r.duration,a=n.createSubContext().currentTimeline;a.easing=r.easing,e.styles.forEach(c=>{let u=c.offset||0;a.forwardTime(u*s),a.setStyles(c.styles,c.easing,n.errors,n.options),a.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(a),n.transformIntoNewTimeline(i+s),n.previousNode=e}visitQuery(e,n){let r=n.currentTimeline.currentTime,i=e.options||{},s=i.delay?mn(i.delay):0;s&&(n.previousNode.type===Q.Style||r==0&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=za);let o=r,a=n.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,n.errors);n.currentQueryTotal=a.length;let c=null;a.forEach((u,d)=>{n.currentQueryIndex=d;let l=n.createSubContext(e.options,u);s&&l.delayNextStep(s),u===n.element&&(c=l.currentTimeline),lt(this,e.animation,l),l.currentTimeline.applyStylesToKeyframe();let p=l.currentTimeline.currentTime;o=Math.max(o,p)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(o),c&&(n.currentTimeline.mergeTimelineCollectedStyles(c),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=e}visitStagger(e,n){let r=n.parentContext,i=n.currentTimeline,s=e.timings,o=Math.abs(s.duration),a=o*(n.currentQueryTotal-1),c=o*n.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":c=a-c;break;case"full":c=r.currentStaggerTime;break}let d=n.currentTimeline;c&&d.delayNextStep(c);let l=d.currentTime;lt(this,e.animation,n),n.previousNode=e,r.currentStaggerTime=i.currentTime-l+(i.startTime-r.currentTimeline.startTime)}},za={},Td=class t{constructor(e,n,r,i,s,o,a,c){this._driver=e,this.element=n,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=za,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new Ka(this._driver,n,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,n){if(!e)return;let r=e,i=this.options;r.duration!=null&&(i.duration=mn(r.duration)),r.delay!=null&&(i.delay=mn(r.delay));let s=r.params;if(s){let o=i.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!n||!o.hasOwnProperty(a))&&(o[a]=bs(s[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let n=this.options.params;if(n){let r=e.params={};Object.keys(n).forEach(i=>{r[i]=n[i]})}}return e}createSubContext(e=null,n,r){let i=n||this.element,s=new t(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(e),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(e){return this.previousNode=za,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,n,r){let i={duration:n??e.duration,delay:this.currentTimeline.currentTime+(r??0)+e.delay,easing:""},s=new Id(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(s),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,n,r,i,s,o){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace($A,"."+this._enterClassName),e=e.replace(VA,"."+this._leaveClassName);let c=r!=1,u=this._driver.query(this.element,e,c);r!==0&&(u=r<0?u.slice(u.length+r,u.length):u.slice(0,r)),a.push(...u)}return!s&&a.length==0&&o.push(iA(n)),a}},Ka=class t{constructor(e,n,r,i){this._driver=e,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let n=this._keyframes.size===1&&this._pendingStyles.size;this.duration||n?(this.forwardTime(this.currentTime+e),n&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=HA,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,n){this._localTimelineStyles.set(e,n),this._globalTimelineStyles.set(e,n),this._styleSummary.set(e,{time:this.currentTime,value:n})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[n,r]of this._globalTimelineStyles)this._backFill.set(n,r||jt),this._currentKeyframe.set(n,jt);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,n,r,i){n&&this._previousKeyframe.set("easing",n);let s=i&&i.params||{},o=qA(e,this._globalTimelineStyles);for(let[a,c]of o){let u=bs(c,s,r);this._pendingStyles.set(a,u),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??jt),this._updateStyle(a,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,n)=>{this._currentKeyframe.set(n,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,n)=>{this._currentKeyframe.has(n)||this._currentKeyframe.set(n,e)}))}snapshotCurrentStyles(){for(let[e,n]of this._localTimelineStyles)this._pendingStyles.set(e,n),this._updateStyle(e,n)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let n in this._currentKeyframe)e.push(n);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((n,r)=>{let i=this._styleSummary.get(r);(!i||n.time>i.time)&&this._updateStyle(r,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,n=new Set,r=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,c)=>{let u=new Map([...this._backFill,...a]);u.forEach((d,l)=>{d===Ks?e.add(l):d===jt&&n.add(l)}),r||u.set("offset",c/this.duration),i.push(u)});let s=[...e.values()],o=[...n.values()];if(r){let a=i[0],c=new Map(a);a.set("offset",0),c.set("offset",1),i=[a,c]}return Ld(this.element,i,s,o,this.duration,this.startTime,this.easing,!1)}},Id=class extends Ka{constructor(e,n,r,i,s,o,a=!1){super(e,n,o.delay),this.keyframes=r,this.preStyleProps=i,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:n,duration:r,easing:i}=this.timings;if(this._stretchStartingKeyframe&&n){let s=[],o=r+n,a=n/o,c=new Map(e[0]);c.set("offset",0),s.push(c);let u=new Map(e[0]);u.set("offset",g_(a)),s.push(u);let d=e.length-1;for(let l=1;l<=d;l++){let p=new Map(e[l]),m=p.get("offset"),h=n+m*r;p.set("offset",g_(h/o)),s.push(p)}r=o,n=0,i="",e=s}return Ld(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)}};function g_(t,e=3){let n=Math.pow(10,e-1);return Math.round(t*n)/n}function qA(t,e){let n=new Map,r;return t.forEach(i=>{if(i==="*"){r??=e.keys();for(let s of r)n.set(s,jt)}else for(let[s,o]of i)n.set(s,o)}),n}function __(t,e,n,r,i,s,o,a,c,u,d,l,p){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:n,fromStyles:s,toState:r,toStyles:o,timelines:a,queriedElements:c,preStyleProps:u,postStyleProps:d,totalTime:l,errors:p}}var ld={},Ya=class{constructor(e,n,r){this._triggerName=e,this.ast=n,this._stateStyles=r}match(e,n,r,i){return GA(this.ast.matchers,e,n,r,i)}buildStyles(e,n,r){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(n,r):new Map}build(e,n,r,i,s,o,a,c,u,d){let l=[],p=this.ast.options&&this.ast.options.params||ld,m=a&&a.params||ld,h=this.buildStyles(r,m,l),g=c&&c.params||ld,y=this.buildStyles(i,g,l),E=new Set,A=new Map,O=new Map,P=i==="void",j={params:M_(g,p),delay:this.ast.options?.delay},v=d?[]:P_(e,n,this.ast.animation,s,o,h,y,j,u,l),I=0;return v.forEach(k=>{I=Math.max(k.duration+k.delay,I)}),l.length?__(n,this._triggerName,r,i,P,h,y,[],[],A,O,I,l):(v.forEach(k=>{let B=k.element,b=dt(A,B,new Set);k.preStyleProps.forEach(L=>b.add(L));let D=dt(O,B,new Set);k.postStyleProps.forEach(L=>D.add(L)),B!==n&&E.add(B)}),__(n,this._triggerName,r,i,P,h,y,v,[...E.values()],A,O,I))}};function GA(t,e,n,r,i){return t.some(s=>s(e,n,r,i))}function M_(t,e){let n=f({},e);return Object.entries(t).forEach(([r,i])=>{i!=null&&(n[r]=i)}),n}var vd=class{constructor(e,n,r){this.styles=e,this.defaultParams=n,this.normalizer=r}buildStyles(e,n){let r=new Map,i=M_(e,this.defaultParams);return this.styles.styles.forEach(s=>{typeof s!="string"&&s.forEach((o,a)=>{o&&(o=bs(o,i,n));let c=this.normalizer.normalizePropertyName(a,n);o=this.normalizer.normalizeStyleValue(a,c,o,n),r.set(a,o)})}),r}};function zA(t,e,n){return new bd(t,e,n)}var bd=class{constructor(e,n,r){this.name=e,this.ast=n,this._normalizer=r,this.transitionFactories=[],this.states=new Map,n.states.forEach(i=>{let s=i.options&&i.options.params||{};this.states.set(i.name,new vd(i.style,s,r))}),y_(this.states,"true","1"),y_(this.states,"false","0"),n.transitions.forEach(i=>{this.transitionFactories.push(new Ya(e,i,this.states))}),this.fallbackTransition=KA(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,n,r,i){return this.transitionFactories.find(o=>o.match(e,n,r,i))||null}matchStyles(e,n,r){return this.fallbackTransition.buildStyles(e,n,r)}};function KA(t,e,n){let r=[(o,a)=>!0],i={type:Q.Sequence,steps:[],options:null},s={type:Q.Transition,animation:i,matchers:r,options:null,queryCount:0,depCount:0};return new Ya(t,s,e)}function y_(t,e,n){t.has(e)?t.has(n)||t.set(n,t.get(e)):t.has(n)&&t.set(e,t.get(n))}var YA=new ws,wd=class{constructor(e,n,r){this.bodyNode=e,this._driver=n,this._normalizer=r,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,n){let r=[],i=[],s=O_(this._driver,n,r,i);if(r.length)throw uA(r);i.length&&void 0,this._animations.set(e,s)}_buildPlayer(e,n,r){let i=e.element,s=b_(this._normalizer,e.keyframes,n,r);return this._driver.animate(i,s,e.duration,e.delay,e.easing,[],!0)}create(e,n,r={}){let i=[],s=this._animations.get(e),o,a=new Map;if(s?(o=P_(this._driver,n,s,k_,hd,new Map,new Map,r,YA,i),o.forEach(d=>{let l=dt(a,d.element,new Map);d.postStyleProps.forEach(p=>l.set(p,null))})):(i.push(lA()),o=[]),i.length)throw dA(i);a.forEach((d,l)=>{d.forEach((p,m)=>{d.set(m,this._driver.computeStyle(l,m,jt))})});let c=o.map(d=>{let l=a.get(d.element);return this._buildPlayer(d,new Map,l)}),u=Un(c);return this._playersById.set(e,u),u.onDestroy(()=>this.destroy(e)),this.players.push(u),u}destroy(e){let n=this._getPlayer(e);n.destroy(),this._playersById.delete(e);let r=this.players.indexOf(n);r>=0&&this.players.splice(r,1)}_getPlayer(e){let n=this._playersById.get(e);if(!n)throw pA(e);return n}listen(e,n,r,i){let s=Od(n,"","","");return Nd(this._getPlayer(e),r,s,i),()=>{}}command(e,n,r,i){if(r=="register"){this.register(e,i[0]);return}if(r=="create"){let o=i[0]||{};this.create(e,n,o);return}let s=this._getPlayer(e);switch(r){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},S_="ng-animate-queued",JA=".ng-animate-queued",dd="ng-animate-disabled",XA=".ng-animate-disabled",QA="ng-star-inserted",ZA=".ng-star-inserted",ek=[],D_={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},tk={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ft="__ng_removed",Rs=class{get params(){return this.options.params}constructor(e,n=""){this.namespaceId=n;let r=e&&e.hasOwnProperty("value"),i=r?e.value:e;if(this.value=rk(i),r){let s=e,{value:o}=s,a=yr(s,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let n=e.params;if(n){let r=this.options.params;Object.keys(n).forEach(i=>{r[i]==null&&(r[i]=n[i])})}}},vs="void",pd=new Rs(vs),Rd=class{constructor(e,n,r){this.id=e,this.hostElement=n,this._engine=r,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,It(n,this._hostClassName)}listen(e,n,r,i){if(!this._triggers.has(n))throw fA(r,n);if(r==null||r.length==0)throw hA(n);if(!ik(r))throw mA(r,n);let s=dt(this._elementListeners,e,[]),o={name:n,phase:r,callback:i};s.push(o);let a=dt(this._engine.statesByElement,e,new Map);return a.has(n)||(It(e,Fa),It(e,Fa+"-"+n),a.set(n,pd)),()=>{this._engine.afterFlush(()=>{let c=s.indexOf(o);c>=0&&s.splice(c,1),this._triggers.has(n)||a.delete(n)})}}register(e,n){return this._triggers.has(e)?!1:(this._triggers.set(e,n),!0)}_getTrigger(e){let n=this._triggers.get(e);if(!n)throw gA(e);return n}trigger(e,n,r,i=!0){let s=this._getTrigger(n),o=new As(this.id,n,e),a=this._engine.statesByElement.get(e);a||(It(e,Fa),It(e,Fa+"-"+n),this._engine.statesByElement.set(e,a=new Map));let c=a.get(n),u=new Rs(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&c&&u.absorbOptions(c.options),a.set(n,u),c||(c=pd),!(u.value===vs)&&c.value===u.value){if(!ak(c.params,u.params)){let g=[],y=s.matchStyles(c.value,c.params,g),E=s.matchStyles(u.value,u.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{ur(e,y),Zt(e,E)})}return}let p=dt(this._engine.playersByElement,e,[]);p.forEach(g=>{g.namespaceId==this.id&&g.triggerName==n&&g.queued&&g.destroy()});let m=s.matchTransition(c.value,u.value,e,u.params),h=!1;if(!m){if(!i)return;m=s.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:n,transition:m,fromState:c,toState:u,player:o,isFallbackTransition:h}),h||(It(e,S_),o.onStart(()=>{ii(e,S_)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let y=this._engine.playersByElement.get(e);if(y){let E=y.indexOf(o);E>=0&&y.splice(E,1)}}),this.players.push(o),p.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(n=>n.delete(e)),this._elementListeners.forEach((n,r)=>{this._elementListeners.set(r,n.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let n=this._engine.playersByElement.get(e);n&&(n.forEach(r=>r.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,n){let r=this._engine.driver.query(e,Wa,!0);r.forEach(i=>{if(i[Ft])return;let s=this._engine.fetchNamespacesByElement(i);s.size?s.forEach(o=>o.triggerLeaveAnimation(i,n,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,n,r,i){let s=this._engine.statesByElement.get(e),o=new Map;if(s){let a=[];if(s.forEach((c,u)=>{if(o.set(u,c.value),this._triggers.has(u)){let d=this.trigger(e,u,vs,i);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,n,o),r&&Un(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let n=this._elementListeners.get(e),r=this._engine.statesByElement.get(e);if(n&&r){let i=new Set;n.forEach(s=>{let o=s.name;if(i.has(o))return;i.add(o);let c=this._triggers.get(o).fallbackTransition,u=r.get(o)||pd,d=new Rs(vs),l=new As(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:c,fromState:u,toState:d,player:l,isFallbackTransition:!0})})}}removeNode(e,n){let r=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,n),this.triggerLeaveAnimation(e,n,!0))return;let i=!1;if(r.totalAnimations){let s=r.players.length?r.playersByQueriedElement.get(e):[];if(s&&s.length)i=!0;else{let o=e;for(;o=o.parentNode;)if(r.statesByElement.get(o)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)r.markElementAsRemoved(this.id,e,!1,n);else{let s=e[Ft];(!s||s===D_)&&(r.afterFlush(()=>this.clearElementCache(e)),r.destroyInnerAnimations(e),r._onRemovalComplete(e,n))}}insertNode(e,n){It(e,this._hostClassName)}drainQueuedTransitions(e){let n=[];return this._queue.forEach(r=>{let i=r.player;if(i.destroyed)return;let s=r.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==r.triggerName){let c=Od(s,r.triggerName,r.fromState.value,r.toState.value);c._data=e,Nd(r.player,a.phase,c,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):n.push(r)}),this._queue=[],n.sort((r,i)=>{let s=r.transition.ast.depCount,o=i.transition.ast.depCount;return s==0||o==0?s-o:this._engine.driver.containsElement(r.element,i.element)?1:-1})}destroy(e){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Ad=class{_onRemovalComplete(e,n){this.onRemovalComplete(e,n)}constructor(e,n,r){this.bodyNode=e,this.driver=n,this._normalizer=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,s)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(n=>{n.players.forEach(r=>{r.queued&&e.push(r)})}),e}createNamespace(e,n){let r=new Rd(e,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(r,n):(this.newHostElements.set(n,r),this.collectEnterElement(n)),this._namespaceLookup[e]=r}_balanceNamespaceList(e,n){let r=this._namespaceList,i=this.namespacesByHostElement;if(r.length-1>=0){let o=!1,a=this.driver.getParentElement(n);for(;a;){let c=i.get(a);if(c){let u=r.indexOf(c);r.splice(u+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||r.unshift(e)}else r.push(e);return i.set(n,e),e}register(e,n){let r=this._namespaceLookup[e];return r||(r=this.createNamespace(e,n)),r}registerTrigger(e,n,r){let i=this._namespaceLookup[e];i&&i.register(n,r)&&this.totalAnimations++}destroy(e,n){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let r=this._fetchNamespace(e);this.namespacesByHostElement.delete(r.hostElement);let i=this._namespaceList.indexOf(r);i>=0&&this._namespaceList.splice(i,1),r.destroy(n),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let n=new Set,r=this.statesByElement.get(e);if(r){for(let i of r.values())if(i.namespaceId){let s=this._fetchNamespace(i.namespaceId);s&&n.add(s)}}return n}trigger(e,n,r,i){if(ja(n)){let s=this._fetchNamespace(e);if(s)return s.trigger(n,r,i),!0}return!1}insertNode(e,n,r,i){if(!ja(n))return;let s=n[Ft];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;let o=this.collectedLeaveElements.indexOf(n);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(n,r)}i&&this.collectEnterElement(n)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,n){n?this.disabledNodes.has(e)||(this.disabledNodes.add(e),It(e,dd)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ii(e,dd))}removeNode(e,n,r){if(ja(n)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(n,r):this.markElementAsRemoved(e,n,!1,r);let s=this.namespacesByHostElement.get(n);s&&s.id!==e&&s.removeNode(n,r)}else this._onRemovalComplete(n,r)}markElementAsRemoved(e,n,r,i,s){this.collectedLeaveElements.push(n),n[Ft]={namespaceId:e,setForRemoval:i,hasAnimation:r,removedBeforeQueried:!1,previousTriggersValues:s}}listen(e,n,r,i,s){return ja(n)?this._fetchNamespace(e).listen(n,r,i,s):()=>{}}_buildInstruction(e,n,r,i,s){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,r,i,e.fromState.options,e.toState.options,n,s)}destroyInnerAnimations(e){let n=this.driver.query(e,Wa,!0);n.forEach(r=>this.destroyActiveAnimationsForElement(r)),this.playersByQueriedElement.size!=0&&(n=this.driver.query(e,md,!0),n.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(e){let n=this.playersByElement.get(e);n&&n.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(e){let n=this.playersByQueriedElement.get(e);n&&n.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return Un(this.players).onDone(()=>e());e()})}processLeaveNode(e){let n=e[Ft];if(n&&n.setForRemoval){if(e[Ft]=D_,n.namespaceId){this.destroyInnerAnimations(e);let r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}e.classList?.contains(dd)&&this.markElementAsDisabled(e,!1),this.driver.query(e,XA,!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(e=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,i)=>this._balanceNamespaceList(r,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;r<this.collectedEnterElements.length;r++){let i=this.collectedEnterElements[r];It(i,QA)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let r=[];try{n=this._flushAnimations(r,e)}finally{for(let i=0;i<r.length;i++)r[i]()}}else for(let r=0;r<this.collectedLeaveElements.length;r++){let i=this.collectedLeaveElements[r];this.processLeaveNode(i)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(r=>r()),this._flushFns=[],this._whenQuietFns.length){let r=this._whenQuietFns;this._whenQuietFns=[],n.length?Un(n).onDone(()=>{r.forEach(i=>i())}):r.forEach(i=>i())}}reportError(e){throw _A(e)}_flushAnimations(e,n){let r=new ws,i=[],s=new Map,o=[],a=new Map,c=new Map,u=new Map,d=new Set;this.disabledNodes.forEach(T=>{d.add(T);let R=this.driver.query(T,JA,!0);for(let w=0;w<R.length;w++)d.add(R[w])});let l=this.bodyNode,p=Array.from(this.statesByElement.keys()),m=I_(p,this.collectedEnterElements),h=new Map,g=0;m.forEach((T,R)=>{let w=k_+g++;h.set(R,w),T.forEach(q=>It(q,w))});let y=[],E=new Set,A=new Set;for(let T=0;T<this.collectedLeaveElements.length;T++){let R=this.collectedLeaveElements[T],w=R[Ft];w&&w.setForRemoval&&(y.push(R),E.add(R),w.hasAnimation?this.driver.query(R,ZA,!0).forEach(q=>E.add(q)):A.add(R))}let O=new Map,P=I_(p,Array.from(E));P.forEach((T,R)=>{let w=hd+g++;O.set(R,w),T.forEach(q=>It(q,w))}),e.push(()=>{m.forEach((T,R)=>{let w=h.get(R);T.forEach(q=>ii(q,w))}),P.forEach((T,R)=>{let w=O.get(R);T.forEach(q=>ii(q,w))}),y.forEach(T=>{this.processLeaveNode(T)})});let j=[],v=[];for(let T=this._namespaceList.length-1;T>=0;T--)this._namespaceList[T].drainQueuedTransitions(n).forEach(w=>{let q=w.player,le=w.element;if(j.push(q),this.collectedEnterElements.length){let we=le[Ft];if(we&&we.setForMove){if(we.previousTriggersValues&&we.previousTriggersValues.has(w.triggerName)){let vt=we.previousTriggersValues.get(w.triggerName),Be=this.statesByElement.get(w.element);if(Be&&Be.has(w.triggerName)){let rn=Be.get(w.triggerName);rn.value=vt,Be.set(w.triggerName,rn)}}q.destroy();return}}let et=!l||!this.driver.containsElement(l,le),Fe=O.get(le),tt=h.get(le),ue=this._buildInstruction(w,r,tt,Fe,et);if(ue.errors&&ue.errors.length){v.push(ue);return}if(et){q.onStart(()=>ur(le,ue.fromStyles)),q.onDestroy(()=>Zt(le,ue.toStyles)),i.push(q);return}if(w.isFallbackTransition){q.onStart(()=>ur(le,ue.fromStyles)),q.onDestroy(()=>Zt(le,ue.toStyles)),i.push(q);return}let gr=[];ue.timelines.forEach(we=>{we.stretchStartingKeyframe=!0,this.disabledNodes.has(we.element)||gr.push(we)}),ue.timelines=gr,r.append(le,ue.timelines);let pi={instruction:ue,player:q,element:le};o.push(pi),ue.queriedElements.forEach(we=>dt(a,we,[]).push(q)),ue.preStyleProps.forEach((we,vt)=>{if(we.size){let Be=c.get(vt);Be||c.set(vt,Be=new Set),we.forEach((rn,_r)=>Be.add(_r))}}),ue.postStyleProps.forEach((we,vt)=>{let Be=u.get(vt);Be||u.set(vt,Be=new Set),we.forEach((rn,_r)=>Be.add(_r))})});if(v.length){let T=[];v.forEach(R=>{T.push(yA(R.triggerName,R.errors))}),j.forEach(R=>R.destroy()),this.reportError(T)}let I=new Map,k=new Map;o.forEach(T=>{let R=T.element;r.has(R)&&(k.set(R,R),this._beforeAnimationBuild(T.player.namespaceId,T.instruction,I))}),i.forEach(T=>{let R=T.element;this._getPreviousPlayers(R,!1,T.namespaceId,T.triggerName,null).forEach(q=>{dt(I,R,[]).push(q),q.destroy()})});let B=y.filter(T=>v_(T,c,u)),b=new Map;T_(b,this.driver,A,u,jt).forEach(T=>{v_(T,c,u)&&B.push(T)});let L=new Map;m.forEach((T,R)=>{T_(L,this.driver,new Set(T),c,Ks)}),B.forEach(T=>{let R=b.get(T),w=L.get(T);b.set(T,new Map([...R?.entries()??[],...w?.entries()??[]]))});let X=[],ce=[],be={};o.forEach(T=>{let{element:R,player:w,instruction:q}=T;if(r.has(R)){if(d.has(R)){w.onDestroy(()=>Zt(R,q.toStyles)),w.disabled=!0,w.overrideTotalTime(q.totalTime),i.push(w);return}let le=be;if(k.size>1){let Fe=R,tt=[];for(;Fe=Fe.parentNode;){let ue=k.get(Fe);if(ue){le=ue;break}tt.push(Fe)}tt.forEach(ue=>k.set(ue,le))}let et=this._buildAnimation(w.namespaceId,q,I,s,L,b);if(w.setRealPlayer(et),le===be)X.push(w);else{let Fe=this.playersByElement.get(le);Fe&&Fe.length&&(w.parentPlayer=Un(Fe)),i.push(w)}}else ur(R,q.fromStyles),w.onDestroy(()=>Zt(R,q.toStyles)),ce.push(w),d.has(R)&&i.push(w)}),ce.forEach(T=>{let R=s.get(T.element);if(R&&R.length){let w=Un(R);T.setRealPlayer(w)}}),i.forEach(T=>{T.parentPlayer?T.syncPlayerEvents(T.parentPlayer):T.destroy()});for(let T=0;T<y.length;T++){let R=y[T],w=R[Ft];if(ii(R,hd),w&&w.hasAnimation)continue;let q=[];if(a.size){let et=a.get(R);et&&et.length&&q.push(...et);let Fe=this.driver.query(R,md,!0);for(let tt=0;tt<Fe.length;tt++){let ue=a.get(Fe[tt]);ue&&ue.length&&q.push(...ue)}}let le=q.filter(et=>!et.destroyed);le.length?sk(this,R,le):this.processLeaveNode(R)}return y.length=0,X.forEach(T=>{this.players.push(T),T.onDone(()=>{T.destroy();let R=this.players.indexOf(T);this.players.splice(R,1)}),T.play()}),X}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,n,r,i,s){let o=[];if(n){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let c=!s||s==vs;a.forEach(u=>{u.queued||!c&&u.triggerName!=i||o.push(u)})}}return(r||i)&&(o=o.filter(a=>!(r&&r!=a.namespaceId||i&&i!=a.triggerName))),o}_beforeAnimationBuild(e,n,r){let i=n.triggerName,s=n.element,o=n.isRemovalTransition?void 0:e,a=n.isRemovalTransition?void 0:i;for(let c of n.timelines){let u=c.element,d=u!==s,l=dt(r,u,[]);this._getPreviousPlayers(u,d,o,a,n.toState).forEach(m=>{let h=m.getRealPlayer();h.beforeDestroy&&h.beforeDestroy(),m.destroy(),l.push(m)})}ur(s,n.fromStyles)}_buildAnimation(e,n,r,i,s,o){let a=n.triggerName,c=n.element,u=[],d=new Set,l=new Set,p=n.timelines.map(h=>{let g=h.element;d.add(g);let y=g[Ft];if(y&&y.removedBeforeQueried)return new Er(h.duration,h.delay);let E=g!==c,A=ok((r.get(g)||ek).map(I=>I.getRealPlayer())).filter(I=>{let k=I;return k.element?k.element===g:!1}),O=s.get(g),P=o.get(g),j=b_(this._normalizer,h.keyframes,O,P),v=this._buildPlayer(h,j,A);if(h.subTimeline&&i&&l.add(g),E){let I=new As(e,a,g);I.setRealPlayer(v),u.push(I)}return v});u.forEach(h=>{dt(this.playersByQueriedElement,h.element,[]).push(h),h.onDone(()=>nk(this.playersByQueriedElement,h.element,h))}),d.forEach(h=>It(h,f_));let m=Un(p);return m.onDestroy(()=>{d.forEach(h=>ii(h,f_)),Zt(c,n.toStyles)}),l.forEach(h=>{dt(i,h,[]).push(m)}),m}_buildPlayer(e,n,r){return n.length>0?this.driver.animate(e.element,n,e.duration,e.delay,e.easing,r):new Er(e.duration,e.delay)}},As=class{constructor(e,n,r){this.namespaceId=e,this.triggerName=n,this.element=r,this._player=new Er,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((n,r)=>{n.forEach(i=>Nd(e,r,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let n=this._player;n.triggerCallback&&e.onStart(()=>n.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,n){dt(this._queuedCallbacks,e,[]).push(n)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let n=this._player;n.triggerCallback&&n.triggerCallback(e)}};function nk(t,e,n){let r=t.get(e);if(r){if(r.length){let i=r.indexOf(n);r.splice(i,1)}r.length==0&&t.delete(e)}return r}function rk(t){return t??null}function ja(t){return t&&t.nodeType===1}function ik(t){return t=="start"||t=="done"}function E_(t,e){let n=t.style.display;return t.style.display=e??"none",n}function T_(t,e,n,r,i){let s=[];
25n.forEach(c=>s.push(E_(c)));let o=[];r.forEach((c,u)=>{let d=new Map;c.forEach(l=>{let p=e.computeStyle(u,l,i);d.set(l,p),(!p||p.length==0)&&(u[Ft]=tk,o.push(u))}),t.set(u,d)});let a=0;return n.forEach(c=>E_(c,s[a++])),o}function I_(t,e){let n=new Map;if(t.forEach(a=>n.set(a,[])),e.length==0)return n;let r=1,i=new Set(e),s=new Map;function o(a){if(!a)return r;let c=s.get(a);if(c)return c;let u=a.parentNode;return n.has(u)?c=u:i.has(u)?c=r:c=o(u),s.set(a,c),c}return e.forEach(a=>{let c=o(a);c!==r&&n.get(c).push(a)}),n}function It(t,e){t.classList?.add(e)}function ii(t,e){t.classList?.remove(e)}function sk(t,e,n){Un(n).onDone(()=>t.processLeaveNode(e))}function ok(t){let e=[];return x_(t,e),e}function x_(t,e){for(let n=0;n<t.length;n++){let r=t[n];r instanceof xc?x_(r.players,e):e.push(r)}}function ak(t,e){let n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(let i=0;i<n.length;i++){let s=n[i];if(!e.hasOwnProperty(s)||t[s]!==e[s])return!1}return!0}function v_(t,e,n){let r=n.get(t);if(!r)return!1;let i=e.get(t);return i?r.forEach(s=>i.add(s)):e.set(t,r),n.delete(t),!0}var oi=class{constructor(e,n,r){this._driver=n,this._normalizer=r,this._triggerCache={},this.onRemovalComplete=(i,s)=>{},this._transitionEngine=new Ad(e.body,n,r),this._timelineEngine=new wd(e.body,n,r),this._transitionEngine.onRemovalComplete=(i,s)=>this.onRemovalComplete(i,s)}registerTrigger(e,n,r,i,s){let o=e+"-"+i,a=this._triggerCache[o];if(!a){let c=[],u=[],d=O_(this._driver,s,c,u);if(c.length)throw aA(i,c);u.length&&void 0,a=zA(i,d,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(n,i,a)}register(e,n){this._transitionEngine.register(e,n)}destroy(e,n){this._transitionEngine.destroy(e,n)}onInsert(e,n,r,i){this._transitionEngine.insertNode(e,n,r,i)}onRemove(e,n,r){this._transitionEngine.removeNode(e,n,r)}disableAnimations(e,n){this._transitionEngine.markElementAsDisabled(e,n)}process(e,n,r,i){if(r.charAt(0)=="@"){let[s,o]=d_(r),a=i;this._timelineEngine.command(s,n,o,a)}else this._transitionEngine.trigger(e,n,r,i)}listen(e,n,r,i,s){if(r.charAt(0)=="@"){let[o,a]=d_(r);return this._timelineEngine.listen(o,n,a,s)}return this._transitionEngine.listen(e,n,r,i,s)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function ck(t,e){let n=null,r=null;return Array.isArray(e)&&e.length?(n=fd(e[0]),e.length>1&&(r=fd(e[e.length-1]))):e instanceof Map&&(n=fd(e)),n||r?new kd(t,n,r):null}var si=class si{constructor(e,n,r){this._element=e,this._startStyles=n,this._endStyles=r,this._state=0;let i=si.initialStylesByElement.get(e);i||si.initialStylesByElement.set(e,i=new Map),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&Zt(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Zt(this._element,this._initialStyles),this._endStyles&&(Zt(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(si.initialStylesByElement.delete(this._element),this._startStyles&&(ur(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ur(this._element,this._endStyles),this._endStyles=null),Zt(this._element,this._initialStyles),this._state=3)}};si.initialStylesByElement=new WeakMap;var kd=si;function fd(t){let e=null;return t.forEach((n,r)=>{uk(r)&&(e=e||new Map,e.set(r,n))}),e}function uk(t){return t==="display"||t==="position"}var Ja=class{constructor(e,n,r,i){this.element=e,this.keyframes=n,this.options=r,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e
25=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let n=()=>this._onFinish();this.domPlayer.addEventListener("finish",n),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",n)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let n=[];return e.forEach(r=>{n.push(Object.fromEntries(r))}),n}_triggerWebAnimation(e,n,r){return e.animate(this._convertKeyframesToObject(n),r)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((r,i)=>{i!=="offset"&&e.set(i,this._finished?r:xd(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let n=e==="start"?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}},Xa=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,n){return w_(e,n)}getParentElement(e){return Pd(e)}query(e,n,r){return R_(e,n,r)}computeStyle(e,n,r){return xd(e,n)}animate(e,n,r,i,s,o=[]){let a=i==0?"both":"forwards",c={duration:r,delay:i,fill:a};s&&(c.easing=s);let u=new Map,d=o.filter(m=>m instanceof Ja);CA(r,i)&&d.forEach(m=>{m.currentSnapshot.forEach((h,g)=>u.set(g,h))});let l=RA(n).map(m=>new Map(m));l=NA(e,l,u);let p=ck(e,l);return new Ja(e,l,c,p)}};var $a="@",L_="@.disabled",Qa=class{constructor(e,n,r,i){this.namespaceId=e,this.delegate=n,this.engine=r,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,n){return this.delegate.createElement(e,n)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,n){this.delegate.appendChild(e,n),this.engine.onInsert(this.namespaceId,n,e,!1)}insertBefore(e,n,r,i=!0){this.delegate.insertBefore(e,n,r),this.engine.onInsert(this.namespaceId,n,e,i)}removeChild(e,n,r){this.engine.onRemove(this.namespaceId,n,this.delegate)}selectRootElement(e,n){return this.delegate.selectRootElement(e,n)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,n,r,i){this.delegate.setAttribute(e,n,r,i)}removeAttribute(e,n,r){this.delegate.removeAttribute(e,n,r)}addClass(e,n){this.delegate.addClass(e,n)}removeClass(e,n){this.delegate.removeClass(e,n)}setStyle(e,n,r,i){this.delegate.setStyle(e,n,r,i)}removeStyle(e,n,r){this.delegate.removeStyle(e,n,r)}setProperty(e,n,r){n.charAt(0)==$a&&n==L_?this.disableAnimations(e,!!r):this.delegate.setProperty(e,n,r)}setValue(e,n){this.delegate.setValue(e,n)}listen(e,n,r){return this.delegate.listen(e,n,r)}disableAnimations(e,n){this.engine.disableAnimations(e,n)}},Cd=class extends Qa{constructor(e,n,r,i,s){super(n,r,i,s),this.factory=e,this.namespaceId=n}setProperty(e,n,r){n.charAt(0)==$a?n.charAt(1)=="."&&n==L_?(r=r===void 0?!0:!!r,this.disableAnimations(e,r)):this.engine.process(this.namespaceId,e,n.slice(1),r):this.delegate.setProperty(e,n,r)}listen(e,n,r){if(n.charAt(0)==$a){let i=lk(e),s=n.slice(1),o="";return s.charAt(0)!=$a&&([s,o]=dk(s)),this.engine.listen(this.namespaceId,i,s,o,a=>{let c=a._data||-1;this.factory.scheduleListenerCallback(c,r,a)})}return this.delegate.listen(e,n,r)}};function lk(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function dk(t){let e=t.indexOf("."),n=t.substring(0,e),r=t.slice(e+1);return[n,r]}var Za=class{constructor(e,n,r){this.delegate=e,this.engine=n,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,n.onRemovalComplete=(i,s)=>{let o=s?.parentNode(i);o&&s.removeChild(o,i)}}createRenderer(e,n){let r="",i=this.delegate.createRenderer(e,n);if(!e||!n?.data?.animation){let u=this._rendererCache,d=u.get(i);if(!d){let l=()=>u.delete(i);d=new Qa(r,i,this.engine,l),u.set(i,d)}return d}let s=n.id,o=n.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=u=>{Array.isArray(u)?u.forEach(a):this.engine.registerTrigger(s,o,e,u.name,u)};return n.data.animation.forEach(a),new Cd(this,o,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,n,r){if(e>=0&&e<this._microtaskId){this._zone.run(()=>n(r));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>
25{i.forEach(s=>{let[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),i.push([n,r])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var fk=(()=>{let e=class e extends oi{constructor(r,i,s){super(r,i,s)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(i){return new(i||e)(Y(Vs),Y(lr),Y(dr))},e.\u0275prov=de({token:e,factory:e.\u0275fac});let t=e;return t})();function hk(){return new qa}function mk(t,e,n){return new Za(t,e,n)}var F_=[{provide:dr,useFactory:hk},{provide:oi,useClass:fk},{provide:kp,useFactory:mk,deps:[Lp,oi,$s]}],U_=[{provide:lr,useFactory:()=>new Xa},{provide:Pc,useValue:"BrowserAnimations"},...F_],gk=[{provide:lr,useClass:Md},{provide:Pc,useValue:"NoopAnimations"},...F_],B_=(()=>{let e=class e{static withConfig(r){return{ngModule:e,providers:r.disableAnimations?gk:U_}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=Rt({type:e}),e.\u0275inj=wt({providers:U_,imports:[Up]});let t=e;return t})();var Bd=(()=>{let e=class e{constructor(r,i,s){this.store=r,this.settings=i,this.platform=s}canActivate(r){return this.platform.isBrowser?this.store.select(no.user).pipe(nt(s=>!!s),sn(s=>s.is_authenticated?this.settings.ACCOUNT_EMAIL_VERIFICATION==="mandatory"&&!s.is_verified?(this.store.dispatch(new Fc(["/auth/not-verified"])),!1):this.settings.RT_AUTH_APPROVE_IS_REQUIRED&&!s.is_approved?(this.store.dispatch(new Fc(["/auth/not-approved"])),!1):!0:!0)):!1}};e.\u0275fac=function(i){return new(i||e)(Y($t),Y(on),Y(Js))},e.\u0275prov=de({token:e,factory:e.\u0275fac});let t=e;return t})();var j_=[{path:Ys.restricted,loadChildren:()=>import("./chunk-KO35UDC4.js").then(t=>t.RestrictedModule),canActivate:[ao,co]},{path:Ys.auth,loadChildren:()=>import("./chunk-EISW3TJF.js").then(t=>t.AuthMatComponentsModule)},{path:Ys.public,loadChildren:()=>import("./chunk-JRFU6YAN.js").then(t=>t.PublicModule)}];var $_={name:"@loadwords/frontend",version:"7.6.0",license:"MIT",scripts:{ng:"ng","start-frontend":"nx serve frontend --proxy-config proxy.conf.json --watch --configuration=uk","validate-i18n":"node tools/validate-i18n.js","build-frontend":'yarn validate-i18n && NODE_OPTIONS="--max-old-space-size=8192" nx build frontend --configuration=production',test:"nx run-many -t test -p frontend,mobile,core",lint:"nx run-many -t lint -p frontend,mobile,core","webdriver-update":"webdriver-manager update","extract-i18n":"nx run frontend:extract-i18n --output-path ./apps/frontend/src/locales","split-i18n":"node tools/split-i18n.js","copy-proxy":"node ./apps/frontend/copy-proxy-server.js","start-uk":"nx serve frontend --proxy-config proxy.conf.json --watch --configuration=uk","serve:ssr:en":"node dist/apps/frontend/server/en/server.mjs","serve:ssr:uk":"node dist/apps/frontend/server/uk/server.mjs","serve:ssr":"node ./apps/frontend/copy-proxy-server.js && node dist/apps/frontend/server/primary-server.mjs","make-sprite":"gulp svgSprite --cwd ./apps/frontend/","start-mobile":"nx serve mobile --host=localhost --port=8100","build-mobile":"nx build mobile --configuration=production --skipNxCache && gulp purifyCSS --cwd ./apps/mobile/","build-mobile:stag":"nx build mobile --configuration=staging --skipNxCache && gulp purifyCSS --cwd ./apps/mobile/","build-mobile:dev":"nx build mobile --configuration=development --skipNxCache && gulp purifyCSS --cwd ./apps/mobile/","sync-mobile-ios":'export export PATH="/opt/homebrew/opt/ruby/bin:$PATH" && nx sync mobile ios',"start-frontend-tech-docs":"nx serve frontend-tech-docs","start-backend-tech-docs":"nx serve backend-tech-docs","start-user-docs":"nx serve user-docs","build-user-docs":"nx build user-docs",e2e:"cd apps/frontend && npx cypress run --headless","e2e:open":"cd apps/frontend && npx cypress open","e2e:ci":"cd apps/frontend && npx cypress run --headless",playwright:"cd apps/frontend && npx playwright test","playwright:ui":"cd apps/frontend && npx playwright test --ui","playwright:headed":"cd apps/frontend && npx playwright test --headed","playwright:chromium":"cd apps/frontend && npx playwright test --project=chromium","playwright:codegen":"cd apps/frontend && npx playwright codegen http://localhost:4200/en","playwright:codegen:har":"cd apps/frontend && npx playwright codegen http://localhost:4200/en --save-har=playwright/har/recording.har","playwright:codegen:prod":"cd apps/frontend && npx playwright codegen https://loadwords.com/en --save-har=playwright/har/production.har"},private:!0,dependencies:{"@angular/animations":"18.1.0","@angular/cdk":"18.0.6","@angular/common":"18.1.0","@angular/compiler":"18.1.0","@angular/core":"18.1.0","@angular/forms":"18.1.0","@angular/material":"18.0.6","@angular/material-moment-adapter":"^19.2.7","@angular/platform-browser":"18.1.0","@angular/platform-browser-dynamic":"18.1.0","@angular/platform-server":"18.1.0","@angular/router":"18.1.0","@angular/ssr":"18.1.0","@awesome-cordova-plugins/core":"^6.6.0","@awesome-cordova-plugins/image-picker":"^6.6.0","@awesome-cordova-plugins/ionic-webview":"^6.6.0","@awesome-cordova-plugins/splash-screen":"^6.6.0","@capacitor-community/sqlite":"7.0.3","@capacitor-firebase/authentication":"7.5.
250","@capacitor/android":"7.4.5","@capacitor/app":"7.1.1","@capacitor/browser":"7.0.3","@capacitor/camera":"7.0.3","@capacitor/core":"7.4.5","@capacitor/ios":"7.4.5","@capacitor/preferences":"7.0.3","@capacitor/share":"7.0.3","@capacitor/splash-screen":"7.0.4","@capacitor/status-bar":"^7.0.0","@capawesome/capacitor-android-edge-to-edge-support":"^7.2.0","@docusaurus/core":"3.4.0","@docusaurus/preset-classic":"3.4.0","@fortawesome/angular-fontawesome":"^1.0.0","@fortawesome/fontawesome-svg-core":"^6.7.1","@fortawesome/free-brands-svg-icons":"^6.7.1","@fortawesome/free-solid-svg-icons":"^6.7.1","@ionic/angular":"7","@ionic/pwa-elements":"^3.2.2","@ionic/storage":"^4.0.0","@material/animation":"^14.0.0","@mdx-js/react":"^3.0.0","@ngx-translate/core":"^15.0.0","@ngx-translate/http-loader":"^8.0.0","@ngxs/devtools-plugin":"^3.8.2","@ngxs/logger-plugin":"^3.8.2","@ngxs/router-plugin":"^3.8.2","@ngxs/storage-plugin":"^3.8.2","@ngxs/store":"^3.8.2","@nx/angular":"19.5.7","@nxext/capacitor":"^19.0.0","@sentry/angular":"8.55.0","@sentry/capacitor":"^1.4.0","@types/google.maps":"^3.58.1","angular-cropperjs":"^14.0.1",bootstrap:"^5.3.3","caniuse-lite":"1.0.30001660","capacitor-native-biometric":"^4.2.2",clsx:"^2.0.0",cpx:"^1.5.0",cropperjs:"^1.6.1",dompurify:"^3.0.1",echarts:"^5.5.1",express:"^4.18.2","express-rate-limit":"^7.5.0",fabric:"^6.4.2",firebase:"^11.0.2","font-awesome":"^4.7.0","fs-extra":"^11.2.0",got:"^12.6.0",gulp:"^5.0.0","gulp-purifycss":"^0.2.0",ionicons:"^7.2.2","jeep-sqlite":"^2.8.0",loadtest:"^8.1.1",lodash:"^4.17.21","lottie-web":"^5.12.2",moment:"^2.30.1","ng-extract-i18n-merge":"^2.9.1","ngx-chips":"^3.0.0","ngx-cookie-service":"^17.0.1","ngx-file-drop":"^16.0.0","ngx-image-cropper":"^7.2.1","ngx-lottie":"^12.0.0","ngx-mask":"^17.0.4","ngx-mat-select-search":"^7.0.7","ngx-page-scroll":"^12.0.0","ngx-page-scroll-core":"^12.0.0","ngx-quill":"26.0.10","ngx-sharebuttons":"^15.0.6","ngxs-reset-plugin":"^3.0.0","prism-react-renderer":"^2.3.0",quill:"^2.0.3",react:"^18.0.0","react-dom":"^18.0.0","rehype-katex":"7","remark-math":"6",rxjs:"~7.8.0",tslib:"^2.6.2",xml2js:"^0.6.2","zone.js":"~0.14.3"},devDependencies:{"@angular-devkit/build-angular":"18.1.0","@angular-devkit/core":"18","@angular-devkit/schematics":"18","@angular-eslint/builder":"18.1.0","@angular-eslint/eslint-plugin":"18.1.0","@angular-eslint/eslint-plugin-template":"18.1.0","@angular-eslint/schematics":"18.1.0","@angular-eslint/template-parser":"18.1.0","@angular/cli":"18.1.0","@angular/compiler":"18.1.0","@angular/compiler-cli":"18.1.0","@angular/language-service":"18.1.0","@angular/localize":"18.1.0","@capacitor/assets":"^3.0.5","@capacitor/cli":"7.4.5","@docusaurus/module-type-aliases":"3.4.0","@docusaurus/tsconfig":"3.4.0","@docusaurus/types":"3.4.0","@ionic/angular-toolkit":"^11.0.0","@ngx-i18nsupport/ngx-i18nsupport":"^1.1.6","@nx-extend/docusaurus":"2","@nx/cypress":"^22.2.6","@nx/devkit":"22.3.3","@nx/eslint":"19.5.7","@nx/eslint-plugin":"19.5.7","@nx/jest":"19.5.7","@nx/js":"22.2.6","@nx/playwright":"^22.3.3","@nx/web":"19.5.7","@nx/workspace":"19.5.7","@playwright/test":"^1.57.0","@schematics/angular":"18.0.1","@swc-node/register":"~1.9.1","@swc/core":"~1.5.7","@swc/helpers":"~0.5.11","@types/express":"^4.17.0","@types/jasmine":"~4.3.1","@types/jasminewd2":"^2.0.10","@types/jest":"^29.4.0","@types/node":"^20.12.12","@typescript-eslint/eslint-plugin":"^7.16.0","@typescript-eslint/parser":"^7.16.0","@typescript-eslint/utils":"^7.16.0",autoprefixer:"^10.4.0","browser-sync":"^3.0.0",cypress:"^15.6.0",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-cypress":"^3.5.0","eslint-plugin-playwright":"^1.6.2","eslint-plugin-prettier":"^5.1.3",gulp:"^5.0.0","gulp-purifycss":"^0.2.0","gulp-svg-sprite":"^2.0.3","http-proxy-middleware":"^2.0.6","jasmine-core":"^5.1.1","jasmine-spec-reporter":"~7.0.0",jest:"^29.4.1","jest-environment-jsdom":"^29.4.1","jest-junit":"^16.0.0","jest-preset-angular":"~14.1.0","jsonc-eslint-parser":"^2.1.0",karma:"~6.4.1","karma-chrome-launcher":"~3.1.1","karma-coverage-istanbul-reporter":"~3.0.3","karma-jasmine":"~5.1.0","karma-jasmine-html-reporter":"^2.0.0",mobile:"^0.0.1","ng-packagr":"~18.1.0","ng2-mock-component":"^0.2.0",nx:"19.5.7",postcss:"^8.4.5","postcss-url":"~10.1.3",prettier:"^3.2.5",protractor:"^7.0.0","ts-jest":"^29.1.0","ts-node":"~10.9.1",typescript:"~5.5.3",vite:"^6.0.0"},resolutions:{"@nrwl/devkit":"19.8.14","@nrwl/tao":"19.8.14","caniuse-lite":"1.0.30001660","@angular-devkit/core":"18.1.0","@angular-devkit/schematics":"18.1.0","@angular-devkit/build-angular":"18.1.0","@angular-devkit/architect":"0.1801.0","@schematics/angular":"18.2.21"},packageManager:"[email protected]"};var z_=!1,Hd=new pt(z_?"NGXS_STORAGE_PLUGIN_OPTIONS":""),K_=new pt(z_?"STORAGE_ENGINE":""),jd="@@STATE";
25function yk(t){return Object.assign({key:[jd],storage:0,serialize:JSON.stringify,deserialize:JSON.parse,beforeSerialize:e=>e,afterDeserialize:e=>e},t)}function Sk(t,e){return Mc(e)?null:t.storage===0?localStorage:t.storage===1?sessionStorage:null}function W_(t,e){return e&&e.namespace?`${e.namespace}:${t}`:t}function Y_(t){return t!=null&&!!t.engine}var V_="NGXS_OPTIONS_META";function Ek(t){return Y_(t)&&(t=t.key),t.hasOwnProperty(V_)&&(t=t[V_].name),t instanceof nf?t.getName():t}var Tk=!1,J_=new pt(Tk?"FINAL_NGXS_STORAGE_PLUGIN_OPTIONS":"");function Ik(t,e){let r=(Array.isArray(e.key)?e.key:[e.key]).map(i=>{let s=Ek(i),o=Y_(i)?t.get(i.engine):t.get(K_);return{key:s,engine:o}});return Object.assign(Object.assign({},e),{keysWithEngines:r})}var q_=!1,vk=(()=>{class t{constructor(n,r){this._options=n,this._platformId=r,this._keysWithEngines=this._options.keysWithEngines,this._usesDefaultStateKey=this._keysWithEngines.length===1&&this._keysWithEngines[0].key===jd}handle(n,r,i){var s;if(Mc(this._platformId))return i(n,r);let o=Zp(r),a=o(br),c=o(Qs),u=a||c,d=!1;if(u){let l=c&&r.addedStates;for(let{key:p,engine:m}of this._keysWithEngines){if(!this._usesDefaultStateKey&&l){let y=p.indexOf(bk),E=y>-1?p.slice(0,y):p;if(!l.hasOwnProperty(E))continue}let h=W_(p,this._options),g=m.getItem(h);if(g!=="undefined"&&g!=null){try{let y=this._options.deserialize(g);g=this._options.afterDeserialize(y,p)}catch{q_&&console.error(`Error ocurred while deserializing the ${h} store value, falling back to empty object, the value obtained from the store: `,g),g={}}(s=this._options.migrations)===null||s===void 0||s.forEach(y=>{let E=y.version===vr(g,y.versionKey||"version"),A=!y.key&&this._usesDefaultStateKey||y.key===p;E&&A&&(g=y.migrate(g),d=!0)}),this._usesDefaultStateKey?(g&&l&&Object.keys(l).length>0&&(g=Object.keys(l).reduce((y,E)=>(g.hasOwnProperty(E)&&(y[E]=g[E]),y),{})),n=Object.assign(Object.assign({},n),g)):n=mi(n,p,g)}}}return i(n,r).pipe(En(l=>{if(!(u&&!d))for(let{key:p,engine:m}of this._keysWithEngines){let h=l,g=W_(p,this._options);p!==jd&&(h=vr(l,p));try{let y=this._options.beforeSerialize(h,p);m.setItem(g,this._options.serialize(y))}catch(y){q_&&(y&&(y.name==="QuotaExceededError"||y.name==="NS_ERROR_DOM_QUOTA_REACHED")?console.error(`The ${g} store value exceeds the browser storage quota: `,h):console.error(`Error ocurred while serializing the ${g} store value, value not updated, the value obtained from the store: `,h))}}}))}}return t.\u0275fac=function(n){return new(n||t)(Y(J_),Y(qn))},t.\u0275prov=de({token:t,factory:t.\u0275fac}),t})(),bk=".",wk=!1,G_=new pt(wk?"USER_OPTIONS":""),X_=(()=>{class t{static forRoot(n){return{ngModule:t,providers:[{provide:Tn,useClass:vk,multi:!0},{provide:G_,useValue:n},{provide:Hd,useFactory:yk,deps:[G_]},{provide:K_,useFactory:Sk,deps:[Hd,qn]},{provide:J_,useFactory:Ik,deps:[js,Hd]}]}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=Rt({type:t}),t.\u0275inj=wt({}),t})(),Q_=!1,y$=new pt(Q_?"LOCAL_STORAGE_ENGINE":"",{providedIn:"root",factory:()=>hi(Oc(qn))?localStorage:null}),S$=new pt(Q_?"SESSION_STORAGE_ENGINE":"",{providedIn:"root",factory:()=>hi(Oc(qn))?sessionStorage:null});var ey=new pt("NGXS_DEVTOOLS_OPTIONS"),Rk=(()=>{class t{constructor(n,r,i){this._options=n,this._injector=r,this._ngZone=i,this.devtoolsExtension=null,this.globalDevtools=Nc.__REDUX_DEVTOOLS_EXTENSION__||Nc.devToolsExtension,this.unsubscribe=null,this.connect()}ngOnDestroy(){this.unsubscribe!==null&&this.unsubscribe(),this.globalDevtools&&this.globalDevtools.disconnect()}get store(){return this._injector.get($t)}handle(n,r,i){return!this.devtoolsExtension||this._options.disabled?i(n,r):i(n,r).pipe(bp(s=>{let o=this.store.snapshot();throw this.sendToDevTools(n,r,o),s}),En(s=>{this.sendToDevTools(n,r,s)}))}sendToDevTools(n,r,i){let s=Xs(r);s===br.type?this.devtoolsExtension.init(n):this.devtoolsExtension.send(Object.assign(Object.assign({},r),{action:null,type:s}),i)}dispatched(n){if(n.type==="DISPATCH"){if(n.payload.type==="JUMP_TO_ACTION"||n.payload.type==="JUMP_TO_STATE"){let r=JSON.parse(n.state);r.router&&r.router.trigger&&(r.router.trigger="devtools"),this.store.reset(r)}else if(n.payload.type==="TOGGLE_ACTION")console.warn("Skip is not supported at this time.");else if(n.payload.type==="IMPORT_STATE"){let{actionsById:r,computedStates:i,currentStateIndex:s}=n.payload.nextLiftedState;this.devtoolsExtension.init(i[0].state),Object.keys(r).filter(o=>o!=="0").forEach(o=>this.devtoolsExtension.send(r[o],i[o].state)),this.store.reset(i[s].state)}}else if(n.type==="ACTION"){let r=JSON.parse(n.payload);this.store.dispatch(r)}}connect(){!this.globalDevtools||this._options.disabled||(this.devtoolsExtension=this._ngZone.runOutsideAngular(()=>this.globalDevtools.connect(this._options)),this.unsubscribe=this.devtoolsExtension.subscribe(n=>{(n.type==="DISPATCH"||n.type==="ACTION")&&this.dispatched(n)}))}}return t.\u0275fac=function(n){return new(n||t)(Y(ey),Y(js),Y($s))},t.\u0275prov=de({token:t,factory:t.\u0275fac}),t})();function Ak(t){return Object.assign({name:"NGXS"},t)}var Z_=new pt("USER_OPTIONS"),ty=(()=>{class t{static forRoot(n){return{ngModule:t,providers:[{provide:Tn,useClass:Rk,multi:!0},{provide:Z_,useValue:n},{provide:ey,useFactory:Ak,deps:[Z_]}]}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=Rt({type:t}),t.\u0275inj=wt({}),t})();function kk(){return()=>{}}var $d=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=de({token:t,factory:t.\u0275fac}),t})(),ny=(()=>{class t{constructor(n,r,i){this.actions$=n,this.store=r,this.resetService=i,this.actions$.pipe(Uc(br),Sr(1)).subscribe(()=>this.resetService.initialState=this.store.snapshot()),this.actions$.pipe(Uc(Qs)).subscribe(({addedStates:s})=>this.resetService.initialState=f(f({},this.resetService.initialState),s))}}return t.\u0275fac=function(n){return new(n||t)(Y(ef),Y($t),Y($d))},t.\u0275prov=de({token:t,factory:t.\u0275fac}),t})(),Ck=(()=>{class t{constructor(...n){let r=Vd(fi());this.statesToKeep=n.reduce(r,[])}}return t.type="@@CLEAR_STATE",t})(),Nk=(()=>{class t{constructor(...n){let r=Vd(fi());this.statesToReset=n.reduce(r,[])}}return t.type="@@RESET_STATE",t})(),Ok=(()=>{class t{constructor(...n){let r=Vd(fi());this.statesToKeep=n.reduce(r,[])}}return t.type="@@RESET_STATE_ALL",t})(),Pk=(()=>{class t{constructor(...n){let r=Mk(fi()),[i,s]=n.reduce(r,[[],[]]);this.statesToOverwrite=i,this.values=s}}return t.type="@@OVERWRITE_STATE",t})();function Wd(t,e){let n=new Object(tf(t));return!(n.name&&"defaults"in n)&&e===-2?(console.warn(`Reset Plugin Warning: ${n.name} is not a state class.`),null):n}function Vd(t){return(e,n)=>{let r=Wd(n,~t);return r?e.concat(r):e}}function Mk(t){return(e,[n,r])=>{let i=Wd(n,~t);return i?[e[0].concat(i),e[1].concat(r)]:e}}var Dk=(()=>{class t{constructor(n){this.resetService=n}clearStates(n,r){return r.reduce((i,s)=>{let o=ec(s);if(!o)return i;let a=o.split("."),c=vr(n,o);return a.reduceRight((u,d)=>d in i?{[d]:f(f({},i[d]),u)}:{[d]:u}
25,c)},{})}overwriteStates(n,r,i){return r.forEach((s,o)=>{let a=ec(s);a&&(n=mi(n,a,i[o]))}),n}resetStates(n,r){return r.forEach(i=>{let s=ec(i);s&&(n=mi(n,s,typeof i.defaults>"u"?{}:i.defaults),i.children&&(n=this.resetStates(n,i.children.map(Wd))))}),n}resetStatesAll(n,r){let[i,s]=r.reduce((o,a)=>{let c=ec(a);return c&&(o[0].push(a),o[1].push(vr(n,c))),o},[[],[]]);return this.overwriteStates(this.resetService.initialState,i,s)}handle(n,r,i){switch(Xs(r)){case Ck.type:n=this.clearStates(n,r.statesToKeep);break;case Nk.type:n=this.resetStates(n,r.statesToReset);break;case Ok.type:n=this.resetStatesAll(n,r.statesToKeep);break;case Pk.type:let{statesToOverwrite:o,values:a}=r;n=this.overwriteStates(n,o,a);break;default:break}return i(n,r)}}return t.\u0275fac=function(n){return new(n||t)(Y($d))},t.\u0275prov=de({token:t,factory:t.\u0275fac}),t})();function ec(t){return t.path}var ry=(()=>{class t{static forRoot(){return{ngModule:t,providers:[$d,ny,{provide:wp,useFactory:kk,deps:[ny],multi:!0},{provide:Tn,useClass:Dk,multi:!0}]}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=Rt({type:t}),t.\u0275inj=wt({}),t})();var Fn=function(t){return t.List="list",t.Create="create",t.Retrieve="retrieve",t.Update="update",t.Partial_update="partial_update",t.Destroy="destroy",t.Download="download",t}(Fn||{}),tc={ACTIONS_LIMIT_IN_SINGLE_REQUEST:10,RETRIEVE_LIMIT:10,SHOULD_REMOVE_REQUEST_WHEN_LIMIT_OVER:!0},ai=new pt("RtSyncConfig"),gn=class{},iy={loading:!1,loaded:!0,pendingStatus:!1,successfulRequestList:null,failRequestList:null,requestList:[],requestListInPending:[]};var sy=Ip(ff());var ci=(()=>{let e=class e{constructor(r,i,s,o){this.http=r,this.connectionService=i,this.platform=s,this.injectedConfig=o,this.config=(0,sy.default)(tc,o)}generateFewRequests(r){let i=new Ac(null);if(r?.length){let s=[];for(let o of r)s.push(this.generateRequest(o));return Hs(s).pipe(nt((...o)=>o[0].every(a=>!!a)),sn((...o)=>[...o[0]]),sn(o=>o.filter(a=>a.retrievesLeft>0)))}else i.next([]);return i.asObservable().pipe(nt(s=>!!s))}generateRequest(r){let i=new Ac(null);return r.data.prePatchModel&&this.config.DATA_PRE_PATCH_RULES_LIST[r.data.prePatchModel]&&this.config.DATA_PRE_PATCH_RULES_LIST[r.data.prePatchModel].prePatchFunction?this.config.DATA_PRE_PATCH_RULES_LIST[r.data.prePatchModel].prePatchFunction(r.data).pipe(nt(s=>!!s),Sr(1)).subscribe(s=>{let o=C(f({},r),{data:s});i.next(this.formData(o))}):i.next(this.formData(r)),i.asObservable().pipe(nt(s=>!!s))}formData(r){let i=r.retrievesLeft;this.config.SHOULD_REMOVE_REQUEST_WHEN_LIMIT_OVER&&i--;let s={action:r.action,model:r.model,id:r.id,retrievesLeft:i};if(r.action===Fn.Destroy||r.action===Fn.Retrieve||r.action===Fn.Download)return Object.assign(s,{parameters:{pk:r.data.id}});if(r.action===Fn.Create)return Object.assign(s,{data:r.data,parameters:{}});if(r.action===Fn.List)return Object.assign(s,{parameters:{}});if(r.action===Fn.Partial_update){let o=r.data,{pk:a}=o,c=yr(o,["pk"]);return Object.assign(s,{parameters:{pk:a},data:c,previous_data:r.previousData})}else throw new Error("Data not formed. Looks like wrong action were passed")}sendRequest(r){return this.connectionService.online$.pipe(Sr(1),Cc(i=>i?this.generateFewRequests(r).pipe(Sr(1),Cc(s=>s?.length?this.sendRequestByTypeAction(s):kc([]))):kc({connection:"Oops! No internet connection"})))}sendRequestByTypeAction(r){return this.http.post(`${this.platform.baseUrl}/api/v3/rt-sync/sync/`,r)}};e.\u0275fac=function(i){return new(i||e)(Y(Pp),Y(Tr),Y(Js),Y(ai,8))},e.\u0275prov=de({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var qd=(()=>{let e=class e{};e.type="[rt-sync] ResetLoadingIndicators";let t=e;return t})(),oy=(()=>{let e=class e{constructor(r){this.data=r}};e.type="[rt-sync] SuccessfulResponse";let t=e;return t})(),ay=(()=>{let e=class e{constructor(r){this.data=r}};e.type="[rt-sync] FailResponse";let t=e;return t})(),Gd=(()=>{let e=class e{constructor(r){this.requestData=r}};e.type="[rt-sync] AddRequestForSync";let t=e;return t})(),zd=(()=>{let e=class e{constructor(r){this.requestDataList=r}};e.type="[rt-sync] AddFewRequestsForSync";let t=e;return t})(),pr=(()=>{let e=class e{};e.type="[rt-sync] SendRequestByList";let t=e;return t})(),cy=(()=>{let e=class e{};e.type="[rt-sync] ForceResentPendingRequests";let t=e;return t})(),nc=(()=>{let e=class e{constructor(r){this.data=r}};e.type="[rt-sync] ResendRequestPending";let t=e;return t})(),ui=(()=>{let e=class e{constructor(r){this.data=r}};e.type="[rt-sync] GetResponseSuccess";let t=e;return t})(),Kd=(()=>{let e=class e{constructor(r){this.requestData=r}};e.type="[rt-sync] AddToResponseList";let t=e;return t})();var uy=Ip(ff());var rc,Bt,ke=(Bt=class{constructor(e,n,r,i,s){this.store=e,this.connectionService=n,this.rtSyncService=r,this.authService=i,this.injectedConfig=s,this.config=(0,uy.default)(tc,s)}static requestList(e){return e.requestList}static requestListInPending(e){return e.requestListInPending}static failResponseList(e){return e.failRequestList}static successfulResponseList(e){return e.successfulRequestList}static needSendRequest(e){return e.loaded&&!e.loading&&e.pendingStatus}static itemsForSync(e){return e.requestList.length+e.requestListInPending.length}ngxsOnInit(e){let n=e.getState();this.connectionService.online$.pipe(nt(o=>!!o)).subscribe(()=>{n.requestListInPending?.length&&e.dispatch(new nc(e.getState().requestListInPending)),n.requestList?.length&&e.dispatch(new pr)}),e.dispatch([new qd,new pr]);let r=this.store.select(rc.requestList).pipe(sn(o=>!!o.length)),i=this.store.select(rc.requestListInPending).pipe(sn(o=>!!o.length)),s=Hs([r,i]).pipe(sn(([o,a])=>o||a));this.authService.addLogoutDelayer(s)}
25resetLoadingIndicators(e){e.patchState({loading:!1,loaded:!0,pendingStatus:!1})}prepareRequest(e,{requestData:n}){e.patchState({requestList:[...e.getState().requestList,C(f({},n),{retrievesLeft:this.config.RETRIEVE_LIMIT})]}),e.dispatch(new pr)}prepareFewRequests(e,{requestDataList:n}){let r=n.map(i=>C(f({},i),{retrievesLeft:this.config.RETRIEVE_LIMIT}));e.patchState({requestList:[...e.getState().requestList,...r]}),e.dispatch(new pr)}sendRequestByList(e){if(e.getState().loading)e.getState().requestList&&e.getState().requestList.length&&e.patchState({pendingStatus:!0});else{let n=this.config.ACTIONS_LIMIT_IN_SINGLE_REQUEST,r=[...e.getState().requestList],i=[];if(r?.length>n&&(i=r.splice(n,r.length-1)),!r||!r.length)return;this.rtSyncService.sendRequest(r).subscribe({next:s=>e.dispatch(new ui(s)),error:s=>e.dispatch(new to(s))}),e.patchState({requestListInPending:[...e.getState().requestListInPending,...r],requestList:[...i],loading:!0,loaded:!1,pendingStatus:!1})}}getResponseSuccess(e,{data:n}){if(n.connection){e.dispatch(new of(n.connection));return}if(e.patchState({requestListInPending:[],loading:!1,loaded:!0}),e.getState()?.requestList?.length&&e.dispatch(new pr),n?.length)for(let r of n)r.status_code==="200"||r.status_code==="201"||r.status_code==="204"?e.dispatch(new oy(r)):e.dispatch(new ay(r))}ForceResentPendingRequests(e){e.patchState({loading:!1,loaded:!0});let n=e.getState().requestListInPending;this.rtSyncService.sendRequest(n).subscribe({next:r=>e.dispatch(new ui(r)),error:r=>e.dispatch(new to(r))})}resendRequestPending(e,{data:n}){this.rtSyncService.sendRequest(n).subscribe({next:r=>e.dispatch(new ui(r)),error:r=>e.dispatch(new to(r))})}addToResponseList(e,{requestData:n}){e.patchState({requestList:[...e.getState().requestList,C(f({},n),{retrievesLeft:this.config.RETRIEVE_LIMIT})]})}},rc=Bt,Bt.\u0275fac=function(n){return new(n||Bt)(Y($t),Y(Tr),Y(ci),Y(Ir),Y(ai,8))},Bt.\u0275prov=de({token:Bt,factory:Bt.\u0275fac}),Bt);Ce([At(qd),$("design:type",Function),$("design:paramtypes",[Object]),$("design:returntype",void 0)],ke.prototype,"resetLoadingIndicators",null);Ce([At(Gd),$("design:type",Function),$("design:paramtypes",[Object,Gd]),$("design:returntype",void 0)],ke.prototype,"prepareRequest",null);Ce([At(zd),$("design:type",Function),$("design:paramtypes",[Object,zd]),$("design:returntype",void 0)],ke.prototype,"prepareFewRequests",null);Ce([At(pr),$("design:type",Function),$("design:paramtypes",[Object]),$("design:returntype",void 0)],ke.prototype,"sendRequestByList",null);Ce([At(ui),$("design:type",Function),$("design:paramtypes",[Object,ui]),$("design:returntype",void 0)],ke.prototype,"getResponseSuccess",null);Ce([At(cy),$("design:type",Function),$("design:paramtypes",[Object]),$("design:returntype",void 0)],ke.prototype,"ForceResentPendingRequests",null);Ce([At(nc),$("design:type",Function),$("design:paramtypes",[Object,nc]),$("design:returntype",void 0)],ke.prototype,"resendRequestPending",null);Ce([At(Kd),$("design:type",Function),$("design:paramtypes",[Object,Kd]),$("design:returntype",void 0)],ke.prototype,"addToResponseList",null);Ce([Gn(),$("design:type",Function),$("design:paramtypes",[gn]),$("design:returntype",Object)],ke,"requestList",null);Ce([Gn(),$("design:type",Function),$("design:paramtypes",[gn]),$("design:returntype",Object)],ke,"requestListInPending",null);Ce([Gn(),$("design:type",Function),$("design:paramtypes",[gn]),$("design:returntype",Object)],ke,"failResponseList",null);Ce([Gn(),$("design:type",Function),$("design:paramtypes",[gn]),$("design:returntype",Object)],ke,"successfulResponseList",null);Ce([Gn(),$("design:type",Function),$("design:paramtypes",[gn]),$("design:returntype",Object)],ke,"needSendRequest",null);Ce([Gn(),$("design:type",Function),$("design:paramtypes",[gn]),$("design:returntype",Number)],ke,"itemsForSync",null);ke=rc=Ce([eo({name:"rtSync",defaults:iy}),$("design:paramtypes",[$t,Tr,ci,Ir,Object])],ke);var ly=(()=>{let e=class e{static forRoot(r){return{ngModule:e,declarations:[],imports:[Np,Zs.forFeature([ke])],providers:[ci,{provide:ai,useValue:r}]}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=Rt({type:e}),e.\u0275inj=wt({});let t=e;return t})();var en,ks=(en=class{constructor(e,n){this.titleService=e,this.settings=n}setTitle(e,{routerState:n}){let{root:r}=n;for(;r.firstChild;)r=r.firstChild;let{data:i}=r,s=i&&i.title?i.title:"";this.titleService.setTitle(this.settings.formatTitle(s))}},en.\u0275fac=function(n){return new(n||en)(Y(Gs),Y(on))},en.\u0275prov=de({token:en,factory:en.\u0275fac}),en);Ce([At(Bc),$("design:type",Function),$("design:paramtypes",[Object,Bc]),$("design:returntype",void 0)],ks.prototype,"setTitle",null);ks=Ce([eo({name:"rtTitles"}),$("design:paramtypes",[Gs,on])],ks);var dy=[Zs.forRoot([no,ks,af,hf,ke,_f,Lf],{developmentMode:!ad.production}),X_.forRoot({key:["rtSync","rtUpdatesManager","settingsTrainProgress"]}),ty.forRoot({disabled:ad.production}),sf.forRoot(),Fp,pf,ry.forRoot(),Bf,ly.forRoot({ACTIONS_LIMIT_IN_SINGLE_REQUEST:Ts.ACTIONS_LIMIT_IN_SINGLE_REQUEST,RETRIEVE_LIMIT:Ts.RT_SYNC_RETRIEVE_LIMIT,SHOULD_REMOVE_REQUEST_WHEN_LIMIT_OVER:!1}),Qp.forRoot({enableHeartbeat:!1,heartbeatInterval:3e4}),Ff,jf,mf.forRoot({forceLogoutConfig:{mode:"onImportant"},currentAppVersion:$_.version}),Uf,Hf.forRoot()];var ic=(()=>{let e=class e{constructor(r,i){this.document=r,this.platformId=i,this.documentIsAccessible=hi(this.platformId)}static getCookieRegExp(r){let i=r.replace(/([\[\]{}()|=;+?,.*^$])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(r){try{return decodeURIComponent(r)}catch{return r}}check(r){return this.documentIsAccessible?(r=encodeURIComponent(r),e.getCookieRegExp(r).test(this.document.cookie)):!1}get(r){if(this.documentIsAccessible&&this.check(r)){r=encodeURIComponent(r);let s=e.getCookieRegExp(r).exec(this.document.cookie);return s[1]?e.safeDecodeURIComponent(s[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let r={},i=this.document;return i.cookie&&i.cookie!==""&&i.cookie.split(";").forEach(s=>{let[o,a]=s.split("=");r[e.safeDecodeURIComponent(o.replace(/^ /,""))]=e.safeDecodeURIComponent(a)}),r}set(r,i,s,o,a,c,u,d){if(!this.documentIsAccessible)return;if(typeof s=="number"||s instanceof Date||o||a||c||u){let m={expires:s,path:o,domain:a,secure:c,sameSite:u||"Lax",partitioned:d};this.set(r,i,m);return}let l=encodeURIComponent(r)+"="+encodeURIComponent(i)+";",p=s||{};if(p.expires)if(typeof p.expires=="number"){let m=new Date(new Date().getTime()+p.expires*1e3*60*60*24);l+="expires="+m.toUTCString()+";"}else l+="expires="+p.expires.toUTCString()+";";p.path&&(l+="path="+p.path+";"),p.domain&&(l+="domain="+p.domain+";"),p.secure===!1&&p.sameSite==="None"&&(p.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${r} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),p.secure&&(l+="secure;"),p.sameSite||(p.sameSite="Lax"),l+="sameSite="+p.sameSite+";",p.partitioned&&(l+="Partitioned;"),this.document.cookie=l}delete(r,i,s,o,a="Lax"){if(!this.documentIsAccessible)return;let c=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(r,"",{expires:c,path:i,domain:s,secure:o,sameSite:a})}deleteAll(r,i,s,o="Lax"){if(!this.documentIsAccessible)return;let a=this.getAll();for(let c in a)a.hasOwnProperty(c)&&this.delete(c,r,i,s,o)}};e.\u0275fac=function(i){return new(i||e)(Y(Vs),Y(qn))},e.\u0275prov=de({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var py=(()=>{let e=class e{constructor(r){this.cookieService=r}intercept(r,i){return r=r.clone({setHeaders:{"X-CSRFToken":this.cookieService.get("
25csrftoken")}}),i.handle(r)}};e.\u0275fac=function(i){return new(i||e)(Y(ic))},e.\u0275prov=de({token:e,factory:e.\u0275fac});let t=e;return t})();var fy=[{provide:qs,useClass:rf,multi:!0},{provide:qs,useClass:py,multi:!0},{provide:qs,useClass:Sf,multi:!0},{provide:Tn,useClass:df,multi:!0},{provide:Yp,useFactory:Jp,deps:[Lc]},ao,co,Bd,Ir,ic,on,Xp,Lc,gf,Df,xf,{provide:on,useValue:Ts},{provide:uf,useClass:cf}];function ky(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}var Cy=ky,Ny=new so("auth","Firebase",ky());var lc=new Of("@firebase/auth");function Uk(t,...e){lc.logLevel<=$c.WARN&&lc.warn(`Auth (${Rr}): ${t}`,...e)}function oc(t,...e){lc.logLevel<=$c.ERROR&&lc.error(`Auth (${Rr}): ${t}`,...e)}function nn(t,...e){throw fp(t,...e)}function Ht(t,...e){return fp(t,...e)}function pp(t,e,n){let r=Object.assign(Object.assign({},Cy()),{[e]:n});return new so("auth","Firebase",r).create(e,{appName:t.name})}function fr(t){return pp(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Fk(t,e,n){let r=n;if(!(e instanceof r))throw r.name!==e.constructor.name&&nn(t,"argument-error"),pp(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function fp(t,...e){if(typeof t!="string"){let n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return Ny.create(t,...e)}function V(t,e,...n){if(!t)throw fp(e,...n)}function _n(t){let e="INTERNAL ASSERTION FAILED: "+t;throw oc(e),new Error(e)}function Sn(t,e){t||_n(e)}function Xd(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function Bk(){return hy()==="http:"||hy()==="https:"}function hy(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}function Hk(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Bk()||Rf()||"connection"in navigator)?navigator.onLine:!0}function jk(){if(typeof navigator>"u")return null;let t=navigator;return t.languages&&t.languages[0]||t.language||null}var hr=class{constructor(e,n){this.shortDelay=e,this.longDelay=n,Sn(n>e,"Short delay should be less than long delay!"),this.isMobile=bf()||Af()}get(){return Hk()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function hp(t,e){Sn(t.emulator,"Emulator should always be set here");let{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}var dc=class{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;_n("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;_n("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;_n("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var $k={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
25aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};var Wk=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],Vk=new hr(3e4,6e4);function mp(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}function di(s,o,a,c){return _(this,arguments,function*(t,e,n,r,i={}){return Oy(t,i,()=>_(this,null,function*(){let u={},d={};r&&(e==="GET"?d=r:u={body:JSON.stringify(r)});let l=wr(Object.assign({key:t.config.apiKey},d)).slice(1),p=yield t._getAdditionalHeaders();p["Content-Type"]="application/json",t.languageCode&&(p["X-Firebase-Locale"]=t.languageCode);let m=Object.assign({method:e,headers:p},u);return wf()||(m.referrerPolicy="no-referrer"),t.emulatorConfig&&ro(t.emulatorConfig.host)&&(m.credentials="include"),dc.fetch()(yield Py(t,t.config.apiHost,n,l),m)}))})}function Oy(t,e,n){return _(this,null,function*(){t._canInitEmulator=!1;let r=Object.assign(Object.assign({},$k),e);try{let i=new Qd(t),s=yield Promise.race([n(),i.promise]);i.clearNetworkTimeout();let o=yield s.json();if("needConfirmation"in o)throw sc(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let a=s.ok?o.errorMessage:o.error.message,[c,u]=a.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw sc(t,"credential-already-in-use",o);if(c==="EMAIL_EXISTS")throw sc(t,"email-already-in-use",o);if(c==="USER_DISABLED")throw sc(t,"user-disabled",o);let d=r[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw pp(t,d,u);nn(t,d)}}catch(i){if(i instanceof io)throw i;nn(t,"network-request-failed",{message:String(i)})}})}function qk(s,o,a,c){return _(this,arguments,function*(t,e,n,r,i={}){let u=yield di(t,e,n,r,i);return"mfaPendingCredential"in u&&nn(t,"multi-factor-auth-required",{_serverResponse:u}),u})}function Py(t,e,n,r){return _(this,null,function*(){let i=`${e}${n}?${r}`,s=t,o=s.config.emulator?hp(t.config,i):`${t.config.apiScheme}://${i}`;return Wk.includes(n)&&(yield s._persistenceManagerAvailable,s._getPersistenceType()==="COOKIE")?s._getPersistence()._getFinalTarget(o).toString():o})}var Qd=class{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Ht(this.auth,"network-request-failed")),Vk.get())})}};function sc(t,e,n){let r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=Ht(t,e,r);return i.customData._tokenResponse=n,i}function Gk(t,e){return _(this,null,function*(){return di(t,"POST","/v1/accounts:delete",e)})}function pc(t,e){return _(this,null,function*(){return di(t,"POST","/v1/accounts:lookup",e)})}function Cs(t){if(t)try{let e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}function My(t,e=!1){return _(this,null,function*(){let n=zn(t),r=yield n.getIdToken(e),i=gp(r);V(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");let s=typeof i.firebase=="object"?i.firebase:void 0,o=s?.sign_in_provider;return{claims:i,token:r,authTime:Cs(Yd(i.auth_time)),issuedAtTime:Cs(Yd(i.iat)),expirationTime:Cs(Yd(i.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}})}function Yd(t){return Number(t)*1e3}function gp(t){let[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return oc("JWT malformed, contained fewer than 3 sections"),null;try{let i=Ef(n);return i?JSON.parse(i):(oc("Failed to decode base64 JWT payload"),null)}catch(i){return oc("Caught error parsing JWT payload as JSON",i?.toString()),null}}function my(t){let e=gp(t);return V(e,"internal-error"),V(typeof e.exp<"u","internal-error"),V(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}function Os(t,e,n=!1){return _(this,null,function*(){if(n)return e;try{return yield e}catch(r){throw r instanceof io&&zk(r)&&t.auth.currentUser===t&&(yield t.auth.signOut()),r}})}function zk({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}var Zd=class{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){let r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;let i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;let n=this.getInterval(e);this.timerId=setTimeout(()=>_(this,null,function*(){yield this.iteration()}),n)}iteration(){return _(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Ps=class{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Cs(this.lastLoginAt),this.creationTime=Cs(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function fc(t){return _(this,null,function*(){var e;let n=t.auth,r=yield t.getIdToken(),i=yield Os(t,pc(n,{idToken:r}));V(i?.users.length,n,"internal-error");let s=i.users[0];t._notifyReloadListener(s);let o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?xy(s.providerUserInfo):[],a=Kk(t.providerData,o),c=t.isAnonymous,u=!(t.email&&s.passwordHash)&&!a?.length,d=c?u:!1,l={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:a,metadata:new Ps(s.createdAt,s.lastLoginAt),isAnonymous:d};Object.assign(t,l)})}function Dy(t){return _(this,null,function*(){let e=zn(t);yield fc(e),yield e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)})}function Kk(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function xy(t){return t.map(e=>{var{providerId:n}=e,r=Bs(e,["providerId"]);
vendor: 26,459 bytes, line 25
25return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}function Yk(t,e){return _(this,null,function*(){let n=yield Oy(t,{},()=>_(this,null,function*(){let r=wr({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=yield Py(t,i,"/v1/token",`key=${s}`),a=yield t._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";let c={method:"POST",headers:a,body:r};return t.emulatorConfig&&ro(t.emulatorConfig.host)&&(c.credentials="include"),dc.fetch()(o,c)}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}})}function Jk(t,e){return _(this,null,function*(){return di(t,"POST","/v2/accounts:revokeToken",mp(t,e))})}var Ns=class t{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){V(e.idToken,"internal-error"),V(typeof e.idToken<"u","internal-error"),V(typeof e.refreshToken<"u","internal-error");let n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):my(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){V(e.length!==0,"internal-error");let n=my(e);this.updateTokensAndExpiration(e,null,n)}getToken(e,n=!1){return _(this,null,function*(){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(V(this.refreshToken,e,"user-token-expired"),this.refreshToken?(yield this.refresh(e,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(e,n){return _(this,null,function*(){let{accessToken:r,refreshToken:i,expiresIn:s}=yield Yk(e,n);this.updateTokensAndExpiration(r,i,Number(s))})}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){let{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new t;return r&&(V(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(V(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(V(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new t,this.toJSON())}_performRefresh(){return _n("not implemented")}};function Bn(t,e){V(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}var Hn=class t{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,s=Bs(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Zd(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new Ps(s.createdAt||void 0,s.lastLoginAt||void 0)}getIdToken(e){return _(this,null,function*(){let n=yield Os(this,this.stsTokenManager.getToken(this.auth,e));return V(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n})}getIdTokenResult(e){return My(this,e)}reload(){return Dy(this)}_assign(e){this!==e&&(V(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let n=new t(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){V(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(e,n=!1){return _(this,null,function*(){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&(yield fc(this)),yield this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)})}delete(){return _(this,null,function*(){if(kt(this.auth.app))return Promise.reject(fr(this.auth));let e=yield this.getIdToken();return yield Os(this,Gk(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,s,o,a,c,u,d;let l=(r=n.displayName)!==null&&r!==void 0?r:void 0,p=(i=n.email)!==null&&i!==void 0?i:void 0,m=(s=n.phoneNumber)!==null&&s!==void 0?s:void 0,h=(o=n.photoURL)!==null&&o!==void 0?o:void 0,g=(a=n.tenantId)!==null&&a!==void 0?a:void 0,y=(c=n._redirectEventId)!==null&&c!==void 0?c:void 0,E=(u=n.createdAt)!==null&&u!==void 0?u:void 0,A=(d=n.lastLoginAt)!==null&&d!==void 0?d:void 0,{uid:O,emailVerified:P,isAnonymous:j,providerData:v,stsTokenManager:I}=n;V(O&&I,e,"internal-error");let k=Ns.fromJSON(this.name,I);V(typeof O=="string",e,"internal-error"),Bn(l,e.name),Bn(p,e.name),V(typeof P=="boolean",e,"internal-error"),V(typeof j=="boolean",e,"internal-error"),Bn(m,e.name),Bn(h,e.name),Bn(g,e.name),Bn(y,e.name),Bn(E,e.name),Bn(A,e.name);let B=new t({uid:O,auth:e,email:p,emailVerified:P,displayName:l,isAnonymous:j,photoURL:h,phoneNumber:m,tenantId:g,stsTokenManager:k,createdAt:E,lastLoginAt:A});return v&&Array.isArray(v)&&(B.providerData=v.map(b=>Object.assign({},b))),y&&(B._redirectEventId=y),B}static _fromIdTokenResponse(e,n,r=!1){return _(this,null,function*(){let i=new Ns;i.updateFromServerResponse(n);let s=new t({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return yield fc(s),s})}static _fromGetAccountInfoResponse(e,n,r){return _(this,null,function*(){let i=n.users[0];V(i.localId!==void 0,"internal-error");let s=i.providerUserInfo!==void 0?xy(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!s?.length,a=new Ns;a.updateFromIdToken(r);let c=new t({uid:i.localId,auth:e,stsTokenManager:a,isAnonymous:o}),u={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:s,metadata:new Ps(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!s?.length};return Object.assign(c,u),c})}};var gy=new Map;function yn(t){Sn(t instanceof Function,"Expected a class definition");let e=gy.get(t);return e?(Sn(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,gy.set(t,e),e)}var Xk=(()=>{class t{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return _(this,null,function*(){return!0})}_set(n,r){return _(this,null,function*(){this.storage[n]=r})}_get(n){return _(this,null,function*(){let r=this.storage[n];return r===void 0?null:r})}_remove(n){return _(this,null,function*(){delete this.storage[n]})}_addListener(n,r){}_removeListener(n,r){}}return t.type="NONE",t})(),ep=Xk;function ac(t,e,n){return`firebase:${t}:${e}:${n}`}var hc=class t{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;let{config:i,name:s}=this.auth;this.fullUserKey=ac(this.userKey,i.apiKey,s),this.fullPersistenceKey=ac("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){return _(this,null,function*(){let e=yield this.persistence._get(this.fullUserKey);if(!e)return null;if(typeof e=="string"){let n=yield pc(this.auth,{idToken:e}).catch(()=>{});return n?Hn._fromGetAccountInfoResponse(this.auth,n,e):null}return Hn._fromJSON(this.auth,e)})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){return _(this,null,function*(){if(this.persistence===e)return;let n=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,n,r="authUser"){return _(this,null,function*(){if(!n.length)return new t(yn(ep),e,r);let i=(yield Promise.all(n.map(u=>_(this,null,function*(){if(yield u._isAvailable())return u})))).filter(u=>u),s=i[0]||yn(ep),o=ac(r,e.config.apiKey,e.name),a=null;for(let u of n)try{let d=yield u._get(o);if(d){let l;if(typeof d=="string"){let p=yield pc(e,{idToken:d}).catch(()=>{});if(!p)break;l=yield Hn._fromGetAccountInfoResponse(e,p,d)}else l=Hn._fromJSON(e,d);u!==s&&(a=l),s=u;break}}catch{}let c=i.filter(u=>u._shouldAllowMigration);return!s._shouldAllowMigration||!c.length?new t(s,e,r):(s=c[0],a&&(yield s._set(o,a.toJSON())),yield Promise.all(n.map(u=>_(this,null,function*(){if(u!==s)try{yield u._remove(o)}catch{}}))),new t(s,e,r))})}};function _y(t){let e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(By(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Ly(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(jy(e))return"Blackberry";if($y(e))return"Webos";if(Uy(e))return"Safari";if((e.includes("chrome/")||Fy(e))&&!e.includes("edge/"))return"Chrome";if(Hy(e))return"Android";{let n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if(r?.length===2)return r[1]}return"Other"}function Ly(t=ze()){return/firefox\//i.test(t)}function Uy(t=ze()){let e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Fy(t=ze()){return/crios\//i.test(t)}function By(t=ze()){return/iemobile/i.test(t)}function Hy(t=ze()){return/android/i.test(t)}function jy(t=ze()){return/blackberry/i.test(t)}function $y(t=ze()){return/webos/i.test(t)}function _p(t=ze()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function Qk(t=ze()){var e;return _p(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function Zk(){return kf()&&document.documentMode===10}function Wy(t=ze()){return _p(t)||Hy(t)||$y(t)||jy(t)||/windows phone/i.test(t)||By(t)}function Vy(t,e=[]){let n;switch(t){case"Browser":n=_y(ze());break;case"Worker":n=`${_y(ze())}-${t}`;break;default:n=t}let r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${Rr}/${r}`}var tp=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){let r=s=>new Promise((o,a)=>{try{let c=e(s);o(c)}catch(c){a(c)}});r.onAbort=n,this.queue.push(r);let i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(e){return _(this,null,function*(){if(this.auth.currentUser===e)return;let n=[];try{for(let r of this.queue)yield r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(let i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r?.message})}})}};function eC(n){return _(this,arguments,function*(t,e={}){return di(t,"GET","/v2/passwordPolicy",mp(t,e))})}var tC=6,np=class{constructor(e){var n,r,i,s;let o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=o.minPasswordLength)!==null&&n!==void 0?n:tC,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=e.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(s=e.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var n,r,i,s,o,a;let c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,c),this.validatePasswordCharacterOptions(e,c),c.isValid&&(c.isValid=(n=c.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(r=c.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(i=c.containsLowercaseLetter)!==null&&i!==void 0?i:!0),c.isValid&&(c.isValid=(s=c.containsUppercaseLetter)!==null&&s!==void 0?s:!0),c.isValid&&(c.isValid=(o=c.containsNumericCharacter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(a=c.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),c}validatePasswordLengthOptions(e,n){let r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}};var rp=class{constructor(e,n,r,i){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new mc(this),this.idTokenSubscription=new mc(this),this.beforeStateQueue=new tp(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Ny,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(s=>this._resolvePersistenceManagerAvailable=s)}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=yn(n)),this._initializationPromise=this.queue(()=>_(this,null,function*(){var r,i,s;if(!this._deleted&&(this.persistenceManager=yield hc.create(this,e),(r=this._resolvePersistenceManagerAvailable)===null||r===void 0||r.call(this),!this._deleted)){if(!((i=this._popupRedirectResolver)===null||i===void 0)&&i._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((s=this.currentUser)===null||s===void 0?void 0:s.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return _(this,null,function*(){if(this._deleted)return;let e=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(e,!0)}})}initializeCurrentUserFromIdToken(e){return _(this,null,function*(){try{let n=yield pc(this,{idToken:e}),r=yield Hn._fromGetAccountInfoResponse(this,n,e);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(e){return _(this,null,function*(){var n;if(kt(this.app)){let o=this.app.settings.authIdToken;return o?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(a,a))}):this.directlySetCurrentUser(null)}let r=yield this.assertedPersistence.getCurrentUser(),i=r,s=!1;if(e&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,a=i?._redirectEventId,c=yield this.tryRedirectSignIn(e);(!o||o===a)&&c?.user&&(i=c.user,s=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(s)try{yield this.beforeStateQueue.runMiddleware(i)}catch(o){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return V(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(e){return _(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(e){return _(this,null,function*(){try{yield fc(e)}catch(n){if(n?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)})}useDeviceLanguage(){this.languageCode=jk()}_delete(){return _(this,null,function*(){this._deleted=!0})}updateCurrentUser(e){return _(this,null,function*(){if(kt(this.app))return Promise.reject(fr(this));let n=e?zn(e):null;return n&&V(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(e,n=!1){return _(this,null,function*(){if(!this._deleted)return e&&V(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(e)),this.queue(()=>_(this,null,function*(){yield this.directlySetCurrentUser(e),this.notifyAuthListeners()}))})}signOut(){return _(this,null,function*(){return kt(this.app)?Promise.reject(fr(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(e){return kt(this.app)?Promise.reject(fr(this)):this.queue(()=>_(this,null,function*(){yield this.assertedPersistence.setPersistence(yn(e))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(e){return _(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return _(this,null,function*(){let e=yield eC(this),n=new np(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new so("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),e()},n)}})}revokeAccessToken(e){return _(this,null,function*(){if(this.currentUser){let n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield Jk(this,r)}})}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}_setRedirectUser(e,n){return _(this,null,function*(){let r=yield this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)})}getOrInitRedirectPersistenceManager(e){return _(this,null,function*(){if(!this.redirectPersistenceManager){let n=e&&yn(e)||this._popupRedirectResolver;V(n,this,"argument-error"),this.redirectPersistenceManager=yield hc.create(this,[yn(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(e){return _(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>_(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===e?this.redirectUser:null})}_persistUserIfCurrent(e){return _(this,null,function*(){if(e===this.currentUser)return this.queue(()=>_(this,null,function*(){return this.directlySetCurrentUser(e)}))})}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let r=(n=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};let s=typeof n=="function"?n:n.next.bind(n),o=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(V(a,this,"internal-error"),a.then(()=>{o||s(this.currentUser)}),typeof n=="function"){let c=e.addObserver(n,r,i);return()=>{o=!0,c()}}else{let c=e.addObserver(n);return()=>{o=!0,c()}}}directlySetCurrentUser(e){return _(this,null,function*(){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?yield this.assertedPersistence.setCurrentUser(e):yield this.assertedPersistence.removeCurrentUser()})}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return V(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Vy(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return _(this,null,function*(){var e;let n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);let r=yield(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);let i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return _(this,null,function*(){var e;if(kt(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let n=yield(e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken();return n?.error&&Uk(`Error while retrieving App Check token: ${n.error}`),n?.token})}};function Ic(t){return zn(t)}var mc=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=Nf(n=>this.observer=n)}get next(){return V(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var yp={loadJS(){return _(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function nC(t){yp=t}function rC(t){return yp.loadJS(t)}function iC(){return yp.gapiScript}function qy(t){return`__${t}${Math.floor(Math.random()*1e6)}`}function Gy(t,e){let n=Vc(t,"auth");if(n.isInitialized()){let i=n.getImmediate(),s=n.getOptions();if(oo(s,e??{}))return i;nn(i,"already-initialized")}return n.initialize({options:e})}function sC(t,e){let n=e?.persistence||[],r=(Array.isArray(n)?n:[n]).map(yn);e?.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e?.popupRedirectResolver)}function zy(t,e,n){let r=Ic(t);
25V(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");let i=!!n?.disableWarnings,s=Ky(e),{host:o,port:a}=oC(e),c=a===null?"":`:${a}`,u={url:`${s}//${o}${c}/`},d=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator){V(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),V(oo(u,r.config.emulator)&&oo(d,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=u,r.emulatorConfig=d,r.settings.appVerificationDisabledForTesting=!0,ro(o)?(If(`${s}//${o}${c}`),vf("Auth",!0)):i||aC()}function Ky(t){let e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function oC(t){let e=Ky(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let s=i[1];return{host:s,port:yy(r.substr(s.length+1))}}else{let[s,o]=r.split(":");return{host:s,port:yy(o)}}}function yy(t){if(!t)return null;let e=Number(t);return isNaN(e)?null:e}function aC(){function t(){let e=d
25ocument.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}var Ms=class{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return _n("not implemented")}_getIdTokenResponse(e){return _n("not implemented")}_linkToIdToken(e,n){return _n("not implemented")}_getReauthenticationResolver(e){return _n("not implemented")}};function li(t,e){return _(this,null,function*(){return qk(t,"POST","/v1/accounts:signInWithIdp",mp(t,e))})}var cC="http://localhost",Ds=class t extends Ms{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let n=new t(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):nn("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
25once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i}=n,s=Bs(n,["providerId","signInMethod"]);if(!r||!i)return null;let o=new t(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){let n=this.buildRequest();return li(e,n)}_linkToIdToken(e,n){let r=this.buildRequest();return r.idToken=n,li(e,r)}_getReauthenticationResolver(e){let n=this.buildRequest();return n.autoCreate=!1,li(e,n)}buildRequest(){let e={requestUri:cC,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=wr(n)}return e}};var xs=class{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}};var gc=class extends xs{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}},ip=class t extends gc{static credentialFromJSON(e){let n=typeof e=="string"?JSON.parse(e):e;return V("providerId"in n&&"signInMethod"in n,"argument-error"),Ds._fromParams(n)}credential(e){return this._credential(Object.assign(Object.assign({},e),{nonce:e.rawNonce}))}_credential(e){return V(e.idToken||e.accessToken,"argument-error"),Ds._fromParams(Object.assign(Object.assign({}
25,e),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(e){return t.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return t.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:n,oauthAccessToken:r,oauthTokenSecret:i,pendingToken:s,nonce:o,providerId:a}=e;if(!r&&!i&&!n&&!s||!a)return null;try{return new t(a)._credential({idToken:n,accessToken:r,nonce:o,pendingToken:s})}catch{return null}}};var Ls=class t{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static _fromIdTokenResponse(e,n,r,i=!1){return _(this,null,function*(){let s=yield Hn._fromIdTokenResponse(e,r,i),o=Sy(r);return new t({user:s,providerId:o,_tokenResponse:r,operationType:n})})}static _forOperation(e,n,r){return _(this,null,function*(){yield e._updateTokensIfNecessary(r,!0);let i=Sy(r);return new t({user:e,providerId:i,_tokenResponse:r,operationType:n})})}};function Sy(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}var sp=class t extends io{constructor(e,n,r,i){var s;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,t.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new t(e,n,r,i)}};function Yy(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?sp._fromErrorAndOperation(t,s,e,r):s})}function uC(t,e,n=!1){return _(this,null,function*(){let r=yield Os(t,e._linkToIdToken(t.auth,yield t.getIdToken()),n);return Ls._forOperation(t,"link",r)})}function lC(t,e,n=!1){return _(this,null,function*(){let{auth:r}=t;if(kt(r.app))return Promise.reject(fr(r));let i="reauthenticate";try{let s=yield Os(t,Yy(r,i,e,t),n);V(s.idToken,r,"internal-error");let o=gp(s.idToken);V(o,r,"internal-error");let{sub:a}=o;return V(t.uid===a,r,"user-mismatch"),Ls._forOperation(t,i,s)}catch(s){throw s?.code==="auth/user-not-found"&&nn(r,"user-mismatch"),s}})}function dC(t,e,n=!1){return _(this,null,function*(){if(kt(t.app))return Promise.reject(fr(t));let r="signIn",i=yield Yy(t,r,e),s=yield Ls._fromIdTokenResponse(t,r,i);return n||(yield t._updateCurrentUser(s.user)),s})}function Jy(t,e,n,r){return zn(t).onIdTokenChanged(e,n,r)}function Xy(t,e,n){return zn(t).beforeAuthStateChanged(e,n)}var _c="__sak";var yc=class{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(_c,"1"),this.storage.removeItem(_c),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){let n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}};var pC=1e3,fC=10,hC=(()=>{class t extends yc{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(n,r)=>this.onStorageEvent(n,r),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Wy(),this._shouldAllowMigration=!0}forAllChangedKeys(n){for(let r of Object.keys(this.listeners)){let i=this.storage.getItem(r),s=this.localCache[r];i!==s&&n(r,s,i)}}onStorageEvent(n,r=!1){if(!n.key){this.forAllChangedKeys((a,c,u)=>{this.notifyListeners(a,u)});return}let i=n.key;r?this.detachListener():this.stopPolling();let s=()=>{let a=this.storage.getItem(i);!r&&this.localCache[i]===a||this.notifyListeners(i,a)},o=this.storage.getItem(i);Zk()&&o!==n.newValue&&n.newValue!==n.oldValue?setTimeout(s,fC):s()}notifyListeners(n,r){this.localCache[n]=r;let i=this.listeners[n];if(i)for(let s of Array.from(i))s(r&&JSON.parse(r))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((n,r,i)=>{this.onStorageEvent(new StorageEvent("storage",{key:n,oldValue:r,newValue:i}),!0)})},pC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(n,r){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[n]||(this.listeners[n]=new Set,this.localCache[n]=this.storage.getItem(n)),this.listeners[n].add(r)}_removeListener(n,r){this.listeners[n]&&(this.listeners[n].delete(r),this.listeners[n].size===0&&delete this.listeners[n]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(n,r){return _(this,null,function*(){yield Vn(t.prototype,this,"_set").call(this,n,r),this.localCache[n]=JSON.stringify(r)})}_get(n){return _(this,null,function*(){let r=yield Vn(t.prototype,this,"_get").call(this,n);return this.localCache[n]=JSON.stringify(r),r})}_remove(n){return _(this,null,function*(){yield Vn(t.prototype,this,"_remove").call(this,n),delete this.localCache[n]})}}return t.type="LOCAL",t})(),Qy=hC;var mC=(()=>{class t extends yc{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(n,r){}_removeListener(n,r){}}return t.type="SESSION",t})(),Sp=mC;function gC(t){return Promise.all(t.map(e=>_(this,null,function*(){try{return{fulfilled:!0,value:yield e}}catch(n){return{fulfilled:!1,reason:n}}})))}var _C=(()=>{class t{constructor(n){this.eventTarget=n,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(n){let r=this.receivers.find(s=>s.isListeningto(n));if(r)return r;let i=new t(n);return this.receivers.push(i),i}isListeningto(n){return this.eventTarget===n}handleEvent(n){return _(this,null,function*(){let r=n,{eventId:i,eventType:s,data:o}=r.data,a=this.handlersMap[s];if(!a?.size)return;r.ports[0].postMessage({status:"ack",eventId:i,eventType:s});let c=Array.from(a).map(d=>_(this,null,function*(){return d(r.origin,o)})),u=yield gC(c);r.ports[0].postMessage({status:"done",eventId:i,eventType:s,response:u})})}_subscribe(n,r){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[n]||(this.handlersMap[n]=new Set),this.handlersMap[n].add(r)}_unsubscribe(n,r){this.handlersMap[n]&&r&&this.handlersMap[n].delete(r),(!r||this.handlersMap[n].size===0)&&delete this.handlersMap[n],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}t.receivers=[];return t})();function Ep(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}var op=class{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}_send(e,n,r=50){return _(this,null,function*(){let i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let s,o;return new Promise((a,c)=>{let u=Ep("",20);i.port1.start();let d=setTimeout(()=>{c(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(l){let p=l;if(p.data.eventId===u)switch(p.data.status){case"ack":clearTimeout(d),s=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),a(p.data.response);break;default:clearTimeout(d),clearTimeout(s),c(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:u,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})})}};function tn(){return window}
vendor: 6,378 bytes, line 25
25function yC(t){tn().location.href=t}function Zy(){return typeof tn().WorkerGlobalScope<"u"&&typeof tn().importScripts=="function"}function SC(){return _(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function EC(){var t;return((t=navigator?.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function TC(){return Zy()?self:null}var eS="firebaseLocalStorageDb",IC=1,Sc="firebaseLocalStorage",tS="fbase_key",mr=class{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}};function vc(t,e){return t.transaction([Sc],e?"readwrite":"readonly").objectStore(Sc)}function vC(){let t=indexedDB.deleteDatabase(eS);return new mr(t).toPromise()}function ap(){let t=indexedDB.open(eS,IC);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{let r=t.result;try{r.createObjectStore(Sc,{keyPath:tS})}catch(i){n(i)}}),t.addEventListener("success",()=>_(this,null,function*(){let r=t.result;r.objectStoreNames.contains(Sc)?e(r):(r.close(),yield vC(),e(yield ap()))}))})}function Ey(t,e,n){return _(this,null,function*(){let r=vc(t,!0).put({[tS]:e,value:n});return new mr(r).toPromise()})}function bC(t,e){return _(this,null,function*(){let n=vc(t,!1).get(e),r=yield new mr(n).toPromise();return r===void 0?null:r.value})}function Ty(t,e){let n=vc(t,!0).delete(e);return new mr(n).toPromise()}var wC=800,RC=3,AC=(()=>{class t{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return _(this,null,function*(){return this.db?this.db:(this.db=yield ap(),this.db)})}_withRetries(n){return _(this,null,function*(){let r=0;for(;;)try{let i=yield this._openDb();return yield n(i)}catch(i){if(r++>RC)throw i;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return _(this,null,function*(){return Zy()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return _(this,null,function*(){this.receiver=_C._getInstance(TC()),this.receiver._subscribe("keyChanged",(n,r)=>_(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(r.key)}})),this.receiver._subscribe("ping",(n,r)=>_(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return _(this,null,function*(){var n,r;if(this.activeServiceWorker=yield SC(),!this.activeServiceWorker)return;this.sender=new op(this.activeServiceWorker);let i=yield this.sender._send("ping",{},800);i&&!((n=i[0])===null||n===void 0)&&n.fulfilled&&!((r=i[0])===null||r===void 0)&&r.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(n){return _(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||EC()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:n},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return _(this,null,function*(){try{if(!indexedDB)return!1;let n=yield ap();return yield Ey(n,_c,"1"),yield Ty(n,_c),!0}catch{}return!1})}_withPendingWrite(n){return _(this,null,function*(){this.pendingWrites++;try{yield n()}finally{this.pendingWrites--}})}_set(n,r){return _(this,null,function*(){return this._withPendingWrite(()=>_(this,null,function*(){return yield this._withRetries(i=>Ey(i,n,r)),this.localCache[n]=r,this.notifyServiceWorker(n)}))})}_get(n){return _(this,null,function*(){let r=yield this._withRetries(i=>bC(i,n));return this.localCache[n]=r,r})}_remove(n){return _(this,null,function*(){return this._withPendingWrite(()=>_(this,null,function*(){return yield this._withRetries(r=>Ty(r,n)),delete this.localCache[n],this.notifyServiceWorker(n)}))})}_poll(){return _(this,null,function*(){let n=yield this._withRetries(s=>{let o=vc(s,!1).getAll();return new mr(o).toPromise()});if(!n)return[];if(this.pendingWrites!==0)return[];let r=[],i=new Set;if(n.length!==0)for(let{fbase_key:s,value:o}of n)i.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),r.push(s));for(let s of Object.keys(this.localCache))this.localCache[s]&&!i.has(s)&&(this.notifyListeners(s,null),r.push(s));return r})}notifyListeners(n,r){this.localCache[n]=r;let i=this.listeners[n];if(i)for(let s of Array.from(i))s(r)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>_(this,null,function*(){return this._poll()}),wC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(n,r){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[n]||(this.listeners[n]=new Set,this._get(n)),this.listeners[n].add(r)}_removeListener(n,r){this.listeners[n]&&(this.listeners[n].delete(r),this.listeners[n].size===0&&delete this.listeners[n]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return t.type="LOCAL",t})(),nS=AC;var nV=qy("rcb"),rV=new hr(3e4,6e4);function rS(t,e){return e?yn(e):(V(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}var Us=class extends Ms{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return li(e,this._buildIdpRequest())}_linkToIdToken(e,n){return li(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return li(e,this._buildIdpRequest())}_buildIdpRequest(e){let n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}};function kC(t){return dC(t.auth,new Us(t),t.bypassAuthState)}function CC(t){let{auth:e,user:n}=t;return V(n,e,"internal-error"),lC(n,new Us(t),t.bypassAuthState)}function NC(t){return _(this,null,function*(){let{auth:e,user:n}=t;return V(n,e,"internal-error"),uC(n,new Us(t),t.bypassAuthState)})}var Ec=class{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}
25execute(){return new Promise((e,n)=>_(this,null,function*(){this.pendingPromise={resolve:e,reject:n};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}}))}onAuthEvent(e){return _(this,null,function*(){let{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:a}=e;if(o){this.reject(o);return}let c={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(a)(c))}catch(u){this.reject(u)}})}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return kC;case"linkViaPopup":case"linkViaRedirect":return NC;case"reauthViaPopup":case"reauthViaRedirect":return CC;default:nn(this.auth,"internal-error")}}resolve(e){Sn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Sn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var OC=new hr(2e3,1e4);function PC(t,e,n){return _(this,null,function*(){if(kt(t.app))return Promise.reject(Ht(t,"operation-not-supported-in-this-environment"));let r=Ic(t);Fk(t,e,xs);let i=rS(r,n);return new MC(r,"signInViaPopup",e,i).executeNotNull()})}var MC=(()=>{class t extends Ec{constructor(n,r,i,s,o){super(n,r,s,o),this.provider=i,this.authWindow=null,this.pollId=null,t.currentPopupAction&&t.currentPopupAction.cancel(),t.currentPopupAction=this}executeNotNull(){return _(this,null,function*(){let n=yield this.execute();return V(n,this.auth,"internal-error"),n})}onExecution(){return _(this,null,function*(){Sn(this.filter.length===1,"Popup operations only handle one event");let n=Ep();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],n),this.authWindow.associatedEvent=n,this.resolver._originValidation(this.auth).catch(r=>{this.reject(r)}),this.resolver._isIframeWebStorageSupported(this.auth,r=>{r||this.reject(Ht(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var n;return((n=this.authWindow)===null||n===void 0?void 0:n.associatedEvent)||null}cancel(){this.reject(Ht(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,t.currentPopupAction=null}pollUserCancellation(){let n=()=>{var r,i;if(!((i=(r=this.authWindow)===null||r===void 0?void 0:r.window)===null||i===void 0)&&i.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Ht(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(n,OC.get())};n()}}t.currentPopupAction=null;return t})(),DC="pendingRedirect",cc=new Map,cp=class t extends Ec{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}execute(){return _(this,null,function*(){let e=cc.get(this.auth._key());if(!e){try{let r=(yield xC(this.resolver,this.auth))?yield Vn(t.prototype,this,"execute").call(this):null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}cc.set(this.auth._key(),e)}return this.bypassAuthState||cc.set(this.auth._key(),()=>Promise.resolve(null)),e()})}onAuthEvent(e){return _(this,null,function*(){if(e.type==="signInViaRedirect")return Vn(t.prototype,this,"onAuthEvent").call(this,e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){let n=yield this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,Vn(t.prototype,this,"onAuthEvent").call(this,e);this.resolve(null)}})}onExecution(){return _(this,null,function*(){})}cleanUp(){}};function xC(t,e){return _(this,null,function*(){let n=FC(e),r=UC(t);if(!(yield r._isAvailable()))return!1;let i=(yield r._get(n))==="true";return yield r._remove(n),i})}function LC(t,e){cc.set(t._key(),e)}function UC(t){return yn(t._redirectPersistence)}function FC(t){return ac(DC,t.config.apiKey,t.name)}
25function BC(t,e,n=!1){return _(this,null,function*(){if(kt(t.app))return Promise.reject(fr(t));let r=Ic(t),i=rS(r,e),o=yield new cp(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,yield r._persistUserIfCurrent(o.user),yield r._setRedirectUser(null,e)),o})}var HC=10*60*1e3,up=class{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!jC(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!iS(e)){let i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(Ht(this.auth,i))}else n.onAuthEvent(e)}isEventForConsumer(e,n){let r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=HC&&this.cachedEventUids.clear(),this.cachedEventUids.has(Iy(e))}saveEventToCache(e){this.cachedEventUids.add(Iy(e)),this.lastProcessedEventTime=Date.now()}};function Iy(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function iS({type:t,error:e}){return t==="unknown"&&e?.code==="auth/no-auth-event"}function jC(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return iS(t);default:return!1}}function $C(n){return _(this,arguments,function*(t,e={}){return di(t,"GET","/v1/projects",e)})}var WC=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,VC=/^https?/;function qC(t){return _(this,null,function*(){if(t.config.emulator)return;let{authorizedDomains:e}=yield $C(t);for(let n of e)try{if(GC(n))return}catch{}nn(t,"unauthorized-domain")})}function GC(t){let e=Xd(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){let o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!VC.test(n))return!1;if(WC.test(t))return r===t;let i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}var zC=new hr(3e4,6e4);function vy(){let t=tn().___jsl;if(t?.H){for(let e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}function KC(t){return new Promise((e,n)=>{var r,i,s;function o(){vy(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{vy(),n(Ht(t,"network-request-failed"))},timeout:zC.get()})}if(!((i=(r=tn().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((s=tn().gapi)===null||s===void 0)&&s.load)o();else{let a=qy("iframefcb");return tn()[a]=()=>{gapi.load?o():n(Ht(t,"network-request-failed"))},rC(`${iC()}?onload=${a}`).catch(c=>n(c))}}).catch(e=>{throw uc=null,e})}var uc=null;function YC(t){return uc=uc||KC(t),uc}var JC=new hr(5e3,15e3),XC="__/auth/iframe",QC="emulator/auth/iframe",ZC={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},eN=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function tN(t){let e=t.config;V(e.authDomain,t,"auth-domain-config-required");let n=e.emulator?hp(e,QC):`https://${t.config.authDomain}/${XC}`,r={apiKey:e.apiKey,appName:t.name,v:Rr},i=eN.get(t.config.apiHost);i&&(r.eid=i);let s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${wr(r).slice(1)}`}function nN(t){return _(this,null,function*(){let e=yield YC(t),n=tn().gapi;return V(n,t,"internal-error"),e.open({where:document.body,url:tN(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:ZC,dontclear:!0},r=>new Promise((i,s)=>_(this,null,function*(){yield r.restyle({setHideOnLeave:!1});let o=Ht(t,"network-request-failed"),a=tn().setTimeout(()=>{s(o)},JC.get());function c(){tn().clearTimeout(a),i(r)}r.ping(c).then(c,()=>{s(o)})})))})}var rN={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},iN=500,sN=600,oN="_blank",aN="http://localhost",Tc=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function cN(t,e,n,r=iN,i=sN){let s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWi
25dth-r)/2,0).toString(),a="",c=Object.assign(Object.assign({},rN),{width:r.toString(),height:i.toString(),top:s,left:o}),u=ze().toLowerCase();n&&(a=Fy(u)?oN:n),Ly(u)&&(e=e||aN,c.scrollbars="yes");let d=Object.entries(c).reduce((p,[m,h])=>`${p}${m}=${h},`,"");if(Qk(u)&&a!=="_self")return uN(e||"",a),new Tc(null);let l=window.open(e||"",a,d);V(l,t,"popup-blocked");try{l.focus()}catch{}return new Tc(l)}function uN(t,e){let n=document.createElement("a");n.href=t,n.target=e;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}var lN="__/auth/handler",dN="emulator/auth/handler",pN=encodeURIComponent("fac");function by(t,e,n,r,i,s){return _(this,null,function*(){V(t.config.authDomain,t,"auth-domain-config-required"),V(t.config.apiKey,t,"invalid-api-key");let o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:Rr,eventId:i};if(e instanceof xs){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",Cf(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(let[d,l]of Object.entries(s||{}))o[d]=l}if(e instanceof gc){let d=e.getScopes().filter(l=>l!=="");d.length>0&&(o.scopes=d.join(","))}t.tenantId&&(o.tid=t.tenantId);let a=o;for(let d of Object.keys(a))a[d]===void 0&&delete a[d];let c=yield t._getAppCheckToken(),u=c?`#${pN}=${encodeURIComponent(c)}`:"";return`${fN(t)}?${wr(a).slice(1)}${u}`})}function fN({config:t}){return t.emulator?hp(t,dN):`https://${t.authDomain}/${lN}`}var Jd="webStorageSupport",lp=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Sp,this._completeRedirectFn=BC,this._overrideRedirectResult=LC}_openPopup(e,n,r,i){return _(this,null,function*(){var s;Sn((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");let o=yield by(e,n,r,Xd(),i);return cN(e,o,Ep())})}_openRedirect(e,n,r,i){return _(this,null,function*(){yield this._originValidation(e);let s=yield by(e,n,r,Xd(),i);return yC(s),new Promise(()=>{})})}_initialize(e){let n=e._key();if(this.eventManagers[n]){let{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(Sn(s,"If manager is not set, promise should be"),s)}let r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}initAndGetManager(e){return _(this,null,function*(){let n=yield nN(e),r=new up(e);return n.register("authEvent",i=>(V(i?.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r})}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(Jd,{type:Jd},i=>{var s;let o=(s=i?.[0])===null||s===void 0?void 0:s[Jd];o!==void 0&&n(!!o),nn(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=qC(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return Wy()||Uy()||_p()}},sS=lp;var wy="@firebase/auth",Ry="1.10.8";var dp=class{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}getToken(e){return _(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(e)}:null})}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let n=this.auth.onIdTokenChanged(r=>{e(r?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){V(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function hN(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function mN(t){Wc(new jc("auth",(e,{options:n})=>{let r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;V(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});let c={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Vy(t)},u=new rp(r,i,s,c);return sC(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),Wc(new jc("auth-internal",e=>{let n=Ic(e.getProvider("auth").getImmediate());return(r=>new dp(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),qc(wy,Ry,hN(t)),qc(wy,Ry,"esm2017")}var gN=5*60,_N=Hc("authIdTokenMaxAge")||gN,Ay=null,yN=t=>e=>_(void 0,null,function*(){let n=e&&(yield e.getIdTokenResult()),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>_N)return;let i=n?.token;Ay!==i&&(Ay=i,yield fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function Tp(t=Pf()){let e=Vc(t,"auth");if(e.isInitialized())return e.getImmediate();let n=Gy(t,{popupRedirectResolver:sS,persistence:[nS,Qy,Sp]}
25),r=Hc("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(r,location.origin);if(location.origin===s.origin){let o=yN(s.toString());Xy(n,o,()=>o(n.currentUser)),Jy(n,a=>o(a))}}let i=Tf("auth");return i&&zy(n,`http://${i}`),n}function SN(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}nC({loadJS(t){return new Promise((e,n)=>{let r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{let s=Ht("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",SN().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});mN("Browser");var jq={providers:[{provide:Ap,useValue:c_({showDialog:!0})},{provide:od,deps:[zs]},{provide:Cp,useFactory:()=>()=>{},deps:[od],multi:!0},Mp(xp(),Dp()),Rp(dy,B_),fy,qp(j_,Gp({anchorScrolling:"enabled"}),zp()),Bp(),yf({player:()=>import("./chunk-QE6R4UK2.js")})]},$q=Tp(Mf);export{Iw as a,Pj as b,Mj as c,ic as d,Bd as e,ip as f,PC as g,ad as h,jq as i,$q as j}; 26/**i18n:72a8156f2b0a27c44e91949a9d6568ed3c0cad9f6d6b782a01a79f3f1c778fa5*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.