Files
recipe-importer/mindmegette-alt-example/mindmegette_alt_files/main-KEQVUP2L.js.download
T
2026-02-24 20:24:09 +01:00

25 lines
326 KiB
Plaintext

import{I as np,Q as as,R as rp,S as ip,U as sp,f as Jd,i as Qd,k as Zd,r as ep,w as tp}from"./chunk-NXXCN4X6.js";import"./chunk-3PK6PTMF.js";import"./chunk-S2I6LAFF.js";import"./chunk-D7TQLDUO.js";import"./chunk-IFUM2CJH.js";import"./chunk-4VRDQ6AZ.js";import"./chunk-RC2YZIMI.js";import"./chunk-AHBE2OKE.js";import"./chunk-XISOC4QO.js";import"./chunk-CXDVRN4H.js";import"./chunk-2XAF5AL6.js";import"./chunk-YJSTBVTY.js";import"./chunk-I6XIXKXP.js";import"./chunk-IREHCKRK.js";import"./chunk-7UZYLBAF.js";import"./chunk-YBEQ5ILM.js";import"./chunk-ZYPJUNBD.js";import"./chunk-AE7D4QK7.js";import"./chunk-PZNKEKSS.js";import"./chunk-RXHGQ3CD.js";import"./chunk-JEEWUIMW.js";import"./chunk-FPFTWF55.js";import"./chunk-XWV47NFP.js";import"./chunk-F6HDIMRO.js";import"./chunk-IGOEUS6Z.js";import{A as Xd,a as Fd,b as Ud,c as Bd,i as Yd}from"./chunk-WYW7PZGW.js";import"./chunk-VG3SOASF.js";import"./chunk-COKSO2NU.js";import"./chunk-7DXGHFUO.js";import"./chunk-4YJKFTC3.js";import{d as qd,e as Vd,f as Kd}from"./chunk-ORBKUQY7.js";import"./chunk-2YARJSMT.js";import{C as Ca,N as J,O as _t,P as Hd,Q as Na,R as bn,S as os,T as Gr,Xa as zd,Ya as Wd,Yb as Gd,kb as jd,qa as $d}from"./chunk-GRRMVSDF.js";import{$ as Nt,$b as Zl,$d as Nd,Ac as id,Fc as sd,Ga as tn,H as en,Ha as $l,Hb as Jl,J as Dl,Ja as zl,Kc as od,Lc as ad,Ma as Wl,Mb as Wr,Na as jl,Nb as wa,Oa as at,Ob as Ql,Qa as rs,Ra as Hr,S as Ll,Va as is,Vc as cd,Wc as ud,Ya as Gl,Zb as ss,Zc as ld,_ as Ta,_c as dd,a as p,ad as pd,ae as Md,b as v,ba,bd as fd,c as Gn,ca as ie,cb as ql,cd as md,dd as hd,ea as Mt,eb as Vl,ed as gd,fa as Br,fc as ed,fe as Ra,ga as Fl,gc as td,ha as kt,hd as _d,ia as ns,id as Sd,j as q,ja as Ul,jb as $r,jc as nd,je as kd,k as Ol,kb as qn,kc as rd,kd as yd,ke as Aa,lb as Tn,ld as jr,le as xd,m as Pl,mb as zr,md as Ed,nd as Td,od as bd,pa as Bl,pd as vd,pe as Od,qb as Kl,ra as Hl,rb as Yl,rd as Id,re as Pd,sb as Xl,sd as wd,se as Dd,td as Vn,ud as Rd,wd as Ad,xb as Ia,xd as Cd,y as Ea,ya as va,ze as Ld}from"./chunk-PSYBIMTL.js";var ap=(()=>{let e=class e{constructor(r,i,s,o,a,c,u,l){this.seoService=r,this.utilsService=i,this.schemaService=s,this.router=o,this.analyticsService=a,this.rssFeedService=c,this.urlService=u,this.scrollPositionService=l,this.renderer=ns(jl),this.environment=Bd(),this.unsubscribe$=new Pl,this.isFirstNavigation=!0}ngOnInit(){Ra.url=this.seoService.hostUrl,this.utilsService.isBrowser()&&(this.setupAnalyticsTracking(),this.scrollPositionService.setupScrollPositionListener()),this.router.events.pipe(en(r=>r instanceof jr)).pipe(Ta(this.unsubscribe$)).subscribe(r=>{this.schemaService.removeStructuredData(),this.schemaService.insertSchema(Ra),this.isFirstNavigation||this.rssFeedService.removeRssFeed(!0),this.rssFeedService.addRssFeed(!0),this.urlService.setPreviousUrl(r.url)})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}setupAnalyticsTracking(){let r=this.router.events.pipe(en(i=>i instanceof jr)).pipe(Nt(i=>{!this.isFirstNavigation&&typeof pp_gemius_hit<"u"&&pp_gemius_hit(this.environment.gemiusId,`page=${i.urlAfterRedirects}`),setTimeout(()=>{this.isFirstNavigation=!1},0)}));this.router.events.pipe(en(i=>i instanceof vd)).pipe(Dl(r),Ea(([i])=>i?.snapshot?.firstChild?.data),Ea(i=>i?.omitGlobalPageView),Ta(this.unsubscribe$)).subscribe(i=>{i||setTimeout(()=>{this.analyticsService.sendPageView()},100)})}};e.\u0275fac=function(i){return new(i||e)(at(Dd),at(Md),at(Pd),at(Vn),at($d),at(Yd),at(Xd),at(jd))},e.\u0275cmp=rs({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(i,s){i&1&&zr(0,"router-outlet")},dependencies:[wd],encapsulation:2,changeDetection:0});let t=e;return t})();function cp(t){return new ie(3e3,!1)}function a_(){return new ie(3100,!1)}function c_(){return new ie(3101,!1)}function u_(t){return new ie(3001,!1)}function l_(t){return new ie(3003,!1)}function d_(t){return new ie(3004,!1)}function lp(t,e){return new ie(3005,!1)}function dp(){return new ie(3006,!1)}function pp(){return new ie(3007,!1)}function fp(t,e){return new ie(3008,!1)}function mp(t){return new ie(3002,!1)}function hp(t,e,n,r,i){return new ie(3010,!1)}function gp(){return new ie(3011,!1)}function _p(){return new ie(3012,!1)}function Sp(){return new ie(3200,!1)}function yp(){return new ie(3202,!1)}function Ep(){return new ie(3013,!1)}function Tp(t){return new ie(3014,!1)}function bp(t){return new ie(3015,!1)}function vp(t){return new ie(3016,!1)}function Ip(t,e){return new ie(3404,!1)}function p_(t){return new ie(3502,!1)}function wp(t){return new ie(3503,!1)}function Rp(){return new ie(3300,!1)}function Ap(t){return new ie(3504,!1)}function Cp(t){return new ie(3301,!1)}function Np(t,e){return new ie(3302,!1)}function Mp(t){return new ie(3303,!1)}function kp(t,e){return new ie(3400,!1)}function xp(t){return new ie(3401,!1)}function Op(t){return new ie(3402,!1)}function Pp(t,e){return new ie(3505,!1)}function Wt(t){switch(t.length){case 0:return new bn;case 1:return t[0];default:return new os(t)}}function Oa(t,e,n=new Map,r=new Map){let i=[],s=[],o=-1,a=null;if(e.forEach(c=>{let u=c.get("offset"),l=u==o,d=l&&a||new Map;c.forEach((f,m)=>{let h=m,g=f;if(m!=="offset")switch(h=t.normalizePropertyName(h,i),g){case Gr:g=n.get(m);break;case _t:g=r.get(m);break;default:g=t.normalizeStyleValue(m,h,g,i);break}d.set(h,g)}),l||s.push(d),a=d,o=u}),i.length)throw p_(i);return s}function cs(t,e,n,r){switch(e){case"start":t.onStart(()=>r(n&&Ma(n,"start",t)));break;case"done":t.onDone(()=>r(n&&Ma(n,"done",t)));break;case"destroy":t.onDestroy(()=>r(n&&Ma(n,"destroy",t)));break}}function Ma(t,e,n){let r=n.totalTime,i=!!n.disabled,s=us(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 us(t,e,n,r,i="",s=0,o){return{element:t,triggerName:e,fromState:n,toState:r,phaseName:i,totalTime:s,disabled:!!o}}function qe(t,e,n){let r=t.get(e);return r||t.set(e,r=n),r}function Pa(t){let e=t.indexOf(":"),n=t.substring(1,e),r=t.slice(e+1);return[n,r]}var f_=typeof document>"u"?null:document.documentElement;function ls(t){let e=t.parentNode||t.host||null;return e===f_?null:e}function m_(t){return t.substring(1,6)=="ebkit"}var vn=null,up=!1;function Dp(t){vn||(vn=h_()||{},up=vn.style?"WebkitAppearance"in vn.style:!1);let e=!0;return vn.style&&!m_(t)&&(e=t in vn.style,!e&&up&&(e="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in vn.style)),e}function h_(){return typeof document<"u"?document.body:null}function Da(t,e){for(;e;){if(e===t)return!0;e=ls(e)}return!1}function La(t,e,n){if(n)return Array.from(t.querySelectorAll(e));let r=t.querySelector(e);return r?[r]:[]}var g_=1e3,Fa="{{",__="}}",Ua="ng-enter",ds="ng-leave",qr="ng-trigger",Vr=".ng-trigger",Ba="ng-animating",ps=".ng-animating";function xt(t){if(typeof t=="number")return t;let e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:ka(parseFloat(e[1]),e[2])}function ka(t,e){switch(e){case"s":return t*g_;default:return t}}function Kr(t,e,n){return t.hasOwnProperty("duration")?t:y_(t,e,n)}var S_=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function y_(t,e,n){let r,i=0,s="";if(typeof t=="string"){let o=t.match(S_);if(o===null)return e.push(cp(t)),{duration:0,delay:0,easing:""};r=ka(parseFloat(o[1]),o[2]);let a=o[3];a!=null&&(i=ka(parseFloat(a),o[4]));let c=o[5];c&&(s=c)}else r=t;if(!n){let o=!1,a=e.length;r<0&&(e.push(a_()),o=!0),i<0&&(e.push(c_()),o=!0),o&&e.splice(a,0,cp(t))}return{duration:r,delay:i,easing:s}}function Lp(t){return t.length?t[0]instanceof Map?t:t.map(e=>new Map(Object.entries(e))):[]}function St(t,e,n){e.forEach((r,i)=>{let s=fs(i);n&&!n.has(i)&&n.set(i,t.style[s]),t.style[s]=r})}function nn(t,e){e.forEach((n,r)=>{let i=fs(r);t.style[i]=""})}function Yn(t){return Array.isArray(t)?t.length==1?t[0]:Hd(t):t}function Fp(t,e,n){let r=e.params||{},i=Ha(t);i.length&&i.forEach(s=>{r.hasOwnProperty(s)||n.push(u_(s))})}var xa=new RegExp(`${Fa}\\s*(.+?)\\s*${__}`,"g");function Ha(t){let e=[];if(typeof t=="string"){let n;for(;n=xa.exec(t);)e.push(n[1]);xa.lastIndex=0}return e}function Xn(t,e,n){let r=`${t}`,i=r.replace(xa,(s,o)=>{let a=e[o];return a==null&&(n.push(l_(o)),a=""),a.toString()});return i==r?t:i}var E_=/-+([a-z0-9])/g;function fs(t){return t.replace(E_,(...e)=>e[1].toUpperCase())}function Up(t,e){return t===0||e===0}function Bp(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,ms(t,a)))}}return e}function Ve(t,e,n){switch(e.type){case J.Trigger:return t.visitTrigger(e,n);case J.State:return t.visitState(e,n);case J.Transition:return t.visitTransition(e,n);case J.Sequence:return t.visitSequence(e,n);case J.Group:return t.visitGroup(e,n);case J.Animate:return t.visitAnimate(e,n);case J.Keyframes:return t.visitKeyframes(e,n);case J.Style:return t.visitStyle(e,n);case J.Reference:return t.visitReference(e,n);case J.AnimateChild:return t.visitAnimateChild(e,n);case J.AnimateRef:return t.visitAnimateRef(e,n);case J.Query:return t.visitQuery(e,n);case J.Stagger:return t.visitStagger(e,n);default:throw d_(e.type)}}function ms(t,e){return window.getComputedStyle(t)[e]}var rc=(()=>{class t{validateStyleProperty(n){return Dp(n)}containsElement(n,r){return Da(n,r)}getParentElement(n){return ls(n)}query(n,r,i){return La(n,r,i)}computeStyle(n,r,i){return i||""}animate(n,r,i,s,o,a=[],c){return new bn(i,s)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Mt({token:t,factory:t.\u0275fac})}return t})(),wn=class{static NOOP=new rc},Rn=class{};var T_=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"]),ys=class extends Rn{normalizePropertyName(e,n){return fs(e)}normalizeStyleValue(e,n,r,i){let s="",o=r.toString().trim();if(T_.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(lp(e,r))}return o+s}};var Es="*";function b_(t,e){let n=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(r=>v_(r,n,e)):n.push(t),n}function v_(t,e,n){if(t[0]==":"){let c=I_(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(bp(t)),e;let i=r[1],s=r[2],o=r[3];e.push(Hp(i,o));let a=i==Es&&o==Es;s[0]=="<"&&!a&&e.push(Hp(o,i))}function I_(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(vp(t)),"* => *"}}var hs=new Set(["true","1"]),gs=new Set(["false","0"]);function Hp(t,e){let n=hs.has(t)||gs.has(t),r=hs.has(e)||gs.has(e);return(i,s)=>{let o=t==Es||t==i,a=e==Es||e==s;return!o&&n&&typeof i=="boolean"&&(o=i?hs.has(t):gs.has(t)),!a&&r&&typeof s=="boolean"&&(a=s?hs.has(e):gs.has(e)),o&&a}}var Xp=":self",w_=new RegExp(`s*${Xp}s*,?`,"g");function Jp(t,e,n,r){return new qa(t).build(e,n,r)}var $p="",qa=class{_driver;constructor(e){this._driver=e}build(e,n,r){let i=new Va(n);return this._resetContextStyleTimingState(i),Ve(this,Yn(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=$p,e.collectedStyles=new Map,e.collectedStyles.set($p,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(dp()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(n),a.type==J.State){let c=a,u=c.name;u.toString().split(/\s*,\s*/).forEach(l=>{c.name=l,s.push(this.visitState(c,n))}),c.name=u}else if(a.type==J.Transition){let c=this.visitTransition(a,n);r+=c.queryCount,i+=c.depCount,o.push(c)}else n.errors.push(pp())}),{type:J.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=>{Ha(c).forEach(u=>{o.hasOwnProperty(u)||s.add(u)})})}),s.size&&n.errors.push(fp(e.name,[...s.values()]))}return{type:J.State,name:e.name,style:r,options:i?{params:i}:null}}visitTransition(e,n){n.queryCount=0,n.depCount=0;let r=Ve(this,Yn(e.animation),n),i=b_(e.expr,n.errors);return{type:J.Transition,matchers:i,animation:r,queryCount:n.queryCount,depCount:n.depCount,options:In(e.options)}}visitSequence(e,n){return{type:J.Sequence,steps:e.steps.map(r=>Ve(this,r,n)),options:In(e.options)}}visitGroup(e,n){let r=n.currentTime,i=0,s=e.steps.map(o=>{n.currentTime=r;let a=Ve(this,o,n);return i=Math.max(i,n.currentTime),a});return n.currentTime=i,{type:J.Group,steps:s,options:In(e.options)}}visitAnimate(e,n){let r=N_(e.timings,n.errors);n.currentAnimateTimings=r;let i,s=e.styles?e.styles:Na({});if(s.type==J.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=Na(u)}n.currentTime+=r.duration+r.delay;let c=this.visitStyle(o,n);c.isEmptyStep=a,i=c}return n.currentAnimateTimings=null,{type:J.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===_t?r.push(a):n.errors.push(mp(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(Fa)>=0){s=!0;break}}}),{type:J.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),l=u.get(c),d=!0;l&&(s!=i&&s>=l.startTime&&i<=l.endTime&&(n.errors.push(hp(c,l.startTime,l.endTime,s,i)),d=!1),s=l.startTime),d&&u.set(c,{startTime:s,endTime:i}),n.options&&Fp(a,n.options,n.errors)})})}visitKeyframes(e,n){let r={type:J.Keyframes,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(gp()),r;let i=1,s=0,o=[],a=!1,c=!1,u=0,l=e.steps.map(b=>{let N=this._makeStyleAst(b,n),F=N.offset!=null?N.offset:C_(N.styles),D=0;return F!=null&&(s++,D=N.offset=F),c=c||D<0||D>1,a=a||D<u,u=D,o.push(D),N});c&&n.errors.push(_p()),a&&n.errors.push(Sp());let d=e.steps.length,f=0;s>0&&s<d?n.errors.push(yp()):s==0&&(f=i/(d-1));let m=d-1,h=n.currentTime,g=n.currentAnimateTimings,S=g.duration;return l.forEach((b,N)=>{let F=f>0?N==m?1:f*N:o[N],D=F*S;n.currentTime=h+g.delay+D,g.duration=D,this._validateStyleAst(b,n),b.offset=F,r.styles.push(b)}),r}visitReference(e,n){return{type:J.Reference,animation:Ve(this,Yn(e.animation),n),options:In(e.options)}}visitAnimateChild(e,n){return n.depCount++,{type:J.AnimateChild,options:In(e.options)}}visitAnimateRef(e,n){return{type:J.AnimateRef,animation:this.visitReference(e.animation,n),options:In(e.options)}}visitQuery(e,n){let r=n.currentQuerySelector,i=e.options||{};n.queryCount++,n.currentQuery=e;let[s,o]=R_(e.selector);n.currentQuerySelector=r.length?r+" "+s:s,qe(n.collectedStyles,n.currentQuerySelector,new Map);let a=Ve(this,Yn(e.animation),n);return n.currentQuery=null,n.currentQuerySelector=r,{type:J.Query,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:In(e.options)}}visitStagger(e,n){n.currentQuery||n.errors.push(Ep());let r=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Kr(e.timings,n.errors,!0);return{type:J.Stagger,animation:Ve(this,Yn(e.animation),n),timings:r,options:null}}};function R_(t){let e=!!t.split(/\s*,\s*/).find(n=>n==Xp);return e&&(t=t.replace(w_,"")),t=t.replace(/@\*/g,Vr).replace(/@\w+/g,n=>Vr+"-"+n.slice(1)).replace(/:animating/g,ps),[t,e]}function A_(t){return t?p({},t):null}var Va=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function C_(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 N_(t,e){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let s=Kr(t,e).duration;return $a(s,0,"")}let n=t;if(n.split(/\s+/).some(s=>s.charAt(0)=="{"&&s.charAt(1)=="{")){let s=$a(0,0,"");return s.dynamic=!0,s.strValue=n,s}let i=Kr(n,e);return $a(i.duration,i.delay,i.easing)}function In(t){return t?(t=p({},t),t.params&&(t.params=A_(t.params))):t={},t}function $a(t,e,n){return{duration:t,delay:e,easing:n}}function ic(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 Xr=class{_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()}},M_=1,k_=":enter",x_=new RegExp(k_,"g"),O_=":leave",P_=new RegExp(O_,"g");function Qp(t,e,n,r,i,s=new Map,o=new Map,a,c,u=[]){return new Ka().buildKeyframes(t,e,n,r,i,s,o,a,c,u)}var Ka=class{buildKeyframes(e,n,r,i,s,o,a,c,u,l=[]){u=u||new Xr;let d=new Ya(e,n,u,i,s,l,[]);d.options=c;let f=c.delay?xt(c.delay):0;d.currentTimeline.delayNextStep(f),d.currentTimeline.setStyles([o],null,d.errors,c),Ve(this,r,d);let m=d.timelines.filter(h=>h.containsAnimation());if(m.length&&a.size){let h;for(let g=m.length-1;g>=0;g--){let S=m[g];if(S.element===n){h=S;break}}h&&!h.allowOnlyTimelineStyles()&&h.setStyles([a],null,d.errors,c)}return m.length?m.map(h=>h.buildKeyframes()):[ic(n,[],[],[],0,f,"",!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:xt(Xn(s,i?.params??{},n.errors));r.delayNextStep(o)}}}_visitSubInstructions(e,n,r){let s=n.currentTimeline.currentTime,o=r.duration!=null?xt(r.duration):null,a=r.delay!=null?xt(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),Ve(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==J.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ts);let o=xt(s.delay);i.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>Ve(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?xt(e.options.delay):0;e.steps.forEach(o=>{let a=n.createSubContext(e.options);s&&a.delayNextStep(s),Ve(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?Xn(r,n.params,n.errors):r;return Kr(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==J.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?xt(i.delay):0;s&&(n.previousNode.type===J.Style||r==0&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=Ts);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,l)=>{n.currentQueryIndex=l;let d=n.createSubContext(e.options,u);s&&d.delayNextStep(s),u===n.element&&(c=d.currentTimeline),Ve(this,e.animation,d),d.currentTimeline.applyStylesToKeyframe();let f=d.currentTimeline.currentTime;o=Math.max(o,f)}),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 l=n.currentTimeline;c&&l.delayNextStep(c);let d=l.currentTime;Ve(this,e.animation,n),n.previousNode=e,r.currentStaggerTime=i.currentTime-d+(i.startTime-r.currentTimeline.startTime)}},Ts={},Ya=class t{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ts;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;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.currentTimeline=c||new bs(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=xt(r.duration)),r.delay!=null&&(i.delay=xt(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]=Xn(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=Ts,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 Xa(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(x_,"."+this._enterClassName),e=e.replace(P_,"."+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(Tp(n)),a}},bs=class t{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,n,r,i){this._driver=e,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,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+=M_,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||_t),this._currentKeyframe.set(n,_t);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,n,r,i){n&&this._previousKeyframe.set("easing",n);let s=i&&i.params||{},o=D_(e,this._globalTimelineStyles);for(let[a,c]of o){let u=Xn(c,s,r);this._pendingStyles.set(a,u),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??_t),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((l,d)=>{l===Gr?e.add(d):l===_t&&n.add(d)}),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 ic(this.element,i,s,o,this.duration,this.startTime,this.easing,!1)}},Xa=class extends bs{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;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",zp(a)),s.push(u);let l=e.length-1;for(let d=1;d<=l;d++){let f=new Map(e[d]),m=f.get("offset"),h=n+m*r;f.set("offset",zp(h/o)),s.push(f)}r=o,n=0,i="",e=s}return ic(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)}};function zp(t,e=3){let n=Math.pow(10,e-1);return Math.round(t*n)/n}function D_(t,e){let n=new Map,r;return t.forEach(i=>{if(i==="*"){r??=e.keys();for(let s of r)n.set(s,_t)}else for(let[s,o]of i)n.set(s,o)}),n}function Wp(t,e,n,r,i,s,o,a,c,u,l,d,f){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:n,fromStyles:s,toState:r,toStyles:o,timelines:a,queriedElements:c,preStyleProps:u,postStyleProps:l,totalTime:d,errors:f}}var za={},vs=class{_triggerName;ast;_stateStyles;constructor(e,n,r){this._triggerName=e,this.ast=n,this._stateStyles=r}match(e,n,r,i){return L_(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,l){let d=[],f=this.ast.options&&this.ast.options.params||za,m=a&&a.params||za,h=this.buildStyles(r,m,d),g=c&&c.params||za,S=this.buildStyles(i,g,d),b=new Set,N=new Map,F=new Map,D=i==="void",Q={params:Zp(g,f),delay:this.ast.options?.delay},O=l?[]:Qp(e,n,this.ast.animation,s,o,h,S,Q,u,d),E=0;return O.forEach(C=>{E=Math.max(C.duration+C.delay,E)}),d.length?Wp(n,this._triggerName,r,i,D,h,S,[],[],N,F,E,d):(O.forEach(C=>{let ne=C.element,A=qe(N,ne,new Set);C.preStyleProps.forEach(j=>A.add(j));let P=qe(F,ne,new Set);C.postStyleProps.forEach(j=>P.add(j)),ne!==n&&b.add(ne)}),Wp(n,this._triggerName,r,i,D,h,S,O,[...b.values()],N,F,E))}};function L_(t,e,n,r,i){return t.some(s=>s(e,n,r,i))}function Zp(t,e){let n=p({},e);return Object.entries(t).forEach(([r,i])=>{i!=null&&(n[r]=i)}),n}var Ja=class{styles;defaultParams;normalizer;constructor(e,n,r){this.styles=e,this.defaultParams=n,this.normalizer=r}buildStyles(e,n){let r=new Map,i=Zp(e,this.defaultParams);return this.styles.styles.forEach(s=>{typeof s!="string"&&s.forEach((o,a)=>{o&&(o=Xn(o,i,n));let c=this.normalizer.normalizePropertyName(a,n);o=this.normalizer.normalizeStyleValue(a,c,o,n),r.set(a,o)})}),r}};function F_(t,e,n){return new Qa(t,e,n)}var Qa=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,n,r){this.name=e,this.ast=n,this._normalizer=r,n.states.forEach(i=>{let s=i.options&&i.options.params||{};this.states.set(i.name,new Ja(i.style,s,r))}),jp(this.states,"true","1"),jp(this.states,"false","0"),n.transitions.forEach(i=>{this.transitionFactories.push(new vs(e,i,this.states))}),this.fallbackTransition=U_(e,this.states)}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 U_(t,e,n){let r=[(o,a)=>!0],i={type:J.Sequence,steps:[],options:null},s={type:J.Transition,animation:i,matchers:r,options:null,queryCount:0,depCount:0};return new vs(t,s,e)}function jp(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 B_=new Xr,Za=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,n,r){this.bodyNode=e,this._driver=n,this._normalizer=r}register(e,n){let r=[],i=[],s=Jp(this._driver,n,r,i);if(r.length)throw wp(r);this._animations.set(e,s)}_buildPlayer(e,n,r){let i=e.element,s=Oa(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=Qp(this._driver,n,s,Ua,ds,new Map,new Map,r,B_,i),o.forEach(l=>{let d=qe(a,l.element,new Map);l.postStyleProps.forEach(f=>d.set(f,null))})):(i.push(Rp()),o=[]),i.length)throw Ap(i);a.forEach((l,d)=>{l.forEach((f,m)=>{l.set(m,this._driver.computeStyle(d,m,_t))})});let c=o.map(l=>{let d=a.get(l.element);return this._buildPlayer(l,new Map,d)}),u=Wt(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 Cp(e);return n}listen(e,n,r,i){let s=us(n,"","","");return cs(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}}},Gp="ng-animate-queued",H_=".ng-animate-queued",Wa="ng-animate-disabled",$_=".ng-animate-disabled",z_="ng-star-inserted",W_=".ng-star-inserted",j_=[],ef={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},G_={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},yt="__ng_removed",Jr=class{namespaceId;value;options;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=V_(i),r){let s=e,{value:o}=s,a=Gn(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])})}}},Yr="void",ja=new Jr(Yr),ec=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,n,r){this.id=e,this.hostElement=n,this._engine=r,this._hostClassName="ng-tns-"+e,ct(n,this._hostClassName)}listen(e,n,r,i){if(!this._triggers.has(n))throw Np(r,n);if(r==null||r.length==0)throw Mp(n);if(!K_(r))throw kp(r,n);let s=qe(this._elementListeners,e,[]),o={name:n,phase:r,callback:i};s.push(o);let a=qe(this._engine.statesByElement,e,new Map);return a.has(n)||(ct(e,qr),ct(e,qr+"-"+n),a.set(n,ja)),()=>{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 xp(e);return n}trigger(e,n,r,i=!0){let s=this._getTrigger(n),o=new Qr(this.id,n,e),a=this._engine.statesByElement.get(e);a||(ct(e,qr),ct(e,qr+"-"+n),this._engine.statesByElement.set(e,a=new Map));let c=a.get(n),u=new Jr(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&c&&u.absorbOptions(c.options),a.set(n,u),c||(c=ja),!(u.value===Yr)&&c.value===u.value){if(!J_(c.params,u.params)){let g=[],S=s.matchStyles(c.value,c.params,g),b=s.matchStyles(u.value,u.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{nn(e,S),St(e,b)})}return}let f=qe(this._engine.playersByElement,e,[]);f.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||(ct(e,Gp),o.onStart(()=>{Jn(e,Gp)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let S=this._engine.playersByElement.get(e);if(S){let b=S.indexOf(o);b>=0&&S.splice(b,1)}}),this.players.push(o),f.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,Vr,!0);r.forEach(i=>{if(i[yt])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 l=this.trigger(e,u,Yr,i);l&&a.push(l)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,n,o),r&&Wt(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)||ja,l=new Jr(Yr),d=new Qr(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:c,fromState:u,toState:l,player:d,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[yt];(!s||s===ef)&&(r.afterFlush(()=>this.clearElementCache(e)),r.destroyInnerAnimations(e),r._onRemovalComplete(e,n))}}insertNode(e,n){ct(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=us(s,r.triggerName,r.fromState.value,r.toState.value);c._data=e,cs(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)}},tc=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,n)=>{};_onRemovalComplete(e,n){this.onRemovalComplete(e,n)}constructor(e,n,r){this.bodyNode=e,this.driver=n,this._normalizer=r}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 ec(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(_s(n)){let s=this._fetchNamespace(e);if(s)return s.trigger(n,r,i),!0}return!1}insertNode(e,n,r,i){if(!_s(n))return;let s=n[yt];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),ct(e,Wa)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Jn(e,Wa))}removeNode(e,n,r){if(_s(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[yt]={namespaceId:e,setForRemoval:i,hasAnimation:r,removedBeforeQueried:!1,previousTriggersValues:s}}listen(e,n,r,i,s){return _s(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,Vr,!0);n.forEach(r=>this.destroyActiveAnimationsForElement(r)),this.playersByQueriedElement.size!=0&&(n=this.driver.query(e,ps,!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 Wt(this.players).onDone(()=>e());e()})}processLeaveNode(e){let n=e[yt];if(n&&n.setForRemoval){if(e[yt]=ef,n.namespaceId){this.destroyInnerAnimations(e);let r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}e.classList?.contains(Wa)&&this.markElementAsDisabled(e,!1),this.driver.query(e,$_,!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];ct(i,z_)}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?Wt(n).onDone(()=>{r.forEach(i=>i())}):r.forEach(i=>i())}}reportError(e){throw Op(e)}_flushAnimations(e,n){let r=new Xr,i=[],s=new Map,o=[],a=new Map,c=new Map,u=new Map,l=new Set;this.disabledNodes.forEach(T=>{l.add(T);let w=this.driver.query(T,H_,!0);for(let y=0;y<w.length;y++)l.add(w[y])});let d=this.bodyNode,f=Array.from(this.statesByElement.keys()),m=Kp(f,this.collectedEnterElements),h=new Map,g=0;m.forEach((T,w)=>{let y=Ua+g++;h.set(w,y),T.forEach(M=>ct(M,y))});let S=[],b=new Set,N=new Set;for(let T=0;T<this.collectedLeaveElements.length;T++){let w=this.collectedLeaveElements[T],y=w[yt];y&&y.setForRemoval&&(S.push(w),b.add(w),y.hasAnimation?this.driver.query(w,W_,!0).forEach(M=>b.add(M)):N.add(w))}let F=new Map,D=Kp(f,Array.from(b));D.forEach((T,w)=>{let y=ds+g++;F.set(w,y),T.forEach(M=>ct(M,y))}),e.push(()=>{m.forEach((T,w)=>{let y=h.get(w);T.forEach(M=>Jn(M,y))}),D.forEach((T,w)=>{let y=F.get(w);T.forEach(M=>Jn(M,y))}),S.forEach(T=>{this.processLeaveNode(T)})});let Q=[],O=[];for(let T=this._namespaceList.length-1;T>=0;T--)this._namespaceList[T].drainQueuedTransitions(n).forEach(y=>{let M=y.player,R=y.element;if(Q.push(M),this.collectedEnterElements.length){let pe=R[yt];if(pe&&pe.setForMove){if(pe.previousTriggersValues&&pe.previousTriggersValues.has(y.triggerName)){let Ge=pe.previousTriggersValues.get(y.triggerName),ke=this.statesByElement.get(y.element);if(ke&&ke.has(y.triggerName)){let Ct=ke.get(y.triggerName);Ct.value=Ge,ke.set(y.triggerName,Ct)}}M.destroy();return}}let K=!d||!this.driver.containsElement(d,R),Y=F.get(R),oe=h.get(R),X=this._buildInstruction(y,r,oe,Y,K);if(X.errors&&X.errors.length){O.push(X);return}if(K){M.onStart(()=>nn(R,X.fromStyles)),M.onDestroy(()=>St(R,X.toStyles)),i.push(M);return}if(y.isFallbackTransition){M.onStart(()=>nn(R,X.fromStyles)),M.onDestroy(()=>St(R,X.toStyles)),i.push(M);return}let Oe=[];X.timelines.forEach(pe=>{pe.stretchStartingKeyframe=!0,this.disabledNodes.has(pe.element)||Oe.push(pe)}),X.timelines=Oe,r.append(R,X.timelines);let Zt={instruction:X,player:M,element:R};o.push(Zt),X.queriedElements.forEach(pe=>qe(a,pe,[]).push(M)),X.preStyleProps.forEach((pe,Ge)=>{if(pe.size){let ke=c.get(Ge);ke||c.set(Ge,ke=new Set),pe.forEach((Ct,jn)=>ke.add(jn))}}),X.postStyleProps.forEach((pe,Ge)=>{let ke=u.get(Ge);ke||u.set(Ge,ke=new Set),pe.forEach((Ct,jn)=>ke.add(jn))})});if(O.length){let T=[];O.forEach(w=>{T.push(Pp(w.triggerName,w.errors))}),Q.forEach(w=>w.destroy()),this.reportError(T)}let E=new Map,C=new Map;o.forEach(T=>{let w=T.element;r.has(w)&&(C.set(w,w),this._beforeAnimationBuild(T.player.namespaceId,T.instruction,E))}),i.forEach(T=>{let w=T.element;this._getPreviousPlayers(w,!1,T.namespaceId,T.triggerName,null).forEach(M=>{qe(E,w,[]).push(M),M.destroy()})});let ne=S.filter(T=>Yp(T,c,u)),A=new Map;Vp(A,this.driver,N,u,_t).forEach(T=>{Yp(T,c,u)&&ne.push(T)});let j=new Map;m.forEach((T,w)=>{Vp(j,this.driver,new Set(T),c,Gr)}),ne.forEach(T=>{let w=A.get(T),y=j.get(T);A.set(T,new Map([...w?.entries()??[],...y?.entries()??[]]))});let Z=[],G=[],ge={};o.forEach(T=>{let{element:w,player:y,instruction:M}=T;if(r.has(w)){if(l.has(w)){y.onDestroy(()=>St(w,M.toStyles)),y.disabled=!0,y.overrideTotalTime(M.totalTime),i.push(y);return}let R=ge;if(C.size>1){let Y=w,oe=[];for(;Y=Y.parentNode;){let X=C.get(Y);if(X){R=X;break}oe.push(Y)}oe.forEach(X=>C.set(X,R))}let K=this._buildAnimation(y.namespaceId,M,E,s,j,A);if(y.setRealPlayer(K),R===ge)Z.push(y);else{let Y=this.playersByElement.get(R);Y&&Y.length&&(y.parentPlayer=Wt(Y)),i.push(y)}}else nn(w,M.fromStyles),y.onDestroy(()=>St(w,M.toStyles)),G.push(y),l.has(w)&&i.push(y)}),G.forEach(T=>{let w=s.get(T.element);if(w&&w.length){let y=Wt(w);T.setRealPlayer(y)}}),i.forEach(T=>{T.parentPlayer?T.syncPlayerEvents(T.parentPlayer):T.destroy()});for(let T=0;T<S.length;T++){let w=S[T],y=w[yt];if(Jn(w,ds),y&&y.hasAnimation)continue;let M=[];if(a.size){let K=a.get(w);K&&K.length&&M.push(...K);let Y=this.driver.query(w,ps,!0);for(let oe=0;oe<Y.length;oe++){let X=a.get(Y[oe]);X&&X.length&&M.push(...X)}}let R=M.filter(K=>!K.destroyed);R.length?Y_(this,w,R):this.processLeaveNode(w)}return S.length=0,Z.forEach(T=>{this.players.push(T),T.onDone(()=>{T.destroy();let w=this.players.indexOf(T);this.players.splice(w,1)}),T.play()}),Z}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==Yr;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,l=u!==s,d=qe(r,u,[]);this._getPreviousPlayers(u,l,o,a,n.toState).forEach(m=>{let h=m.getRealPlayer();h.beforeDestroy&&h.beforeDestroy(),m.destroy(),d.push(m)})}nn(s,n.fromStyles)}_buildAnimation(e,n,r,i,s,o){let a=n.triggerName,c=n.element,u=[],l=new Set,d=new Set,f=n.timelines.map(h=>{let g=h.element;l.add(g);let S=g[yt];if(S&&S.removedBeforeQueried)return new bn(h.duration,h.delay);let b=g!==c,N=X_((r.get(g)||j_).map(E=>E.getRealPlayer())).filter(E=>{let C=E;return C.element?C.element===g:!1}),F=s.get(g),D=o.get(g),Q=Oa(this._normalizer,h.keyframes,F,D),O=this._buildPlayer(h,Q,N);if(h.subTimeline&&i&&d.add(g),b){let E=new Qr(e,a,g);E.setRealPlayer(O),u.push(E)}return O});u.forEach(h=>{qe(this.playersByQueriedElement,h.element,[]).push(h),h.onDone(()=>q_(this.playersByQueriedElement,h.element,h))}),l.forEach(h=>ct(h,Ba));let m=Wt(f);return m.onDestroy(()=>{l.forEach(h=>Jn(h,Ba)),St(c,n.toStyles)}),d.forEach(h=>{qe(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 bn(e.duration,e.delay)}},Qr=class{namespaceId;triggerName;element;_player=new bn;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,n,r){this.namespaceId=e,this.triggerName=n,this.element=r}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((n,r)=>{n.forEach(i=>cs(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){qe(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 q_(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 V_(t){return t??null}function _s(t){return t&&t.nodeType===1}function K_(t){return t=="start"||t=="done"}function qp(t,e){let n=t.style.display;return t.style.display=e??"none",n}function Vp(t,e,n,r,i){let s=[];n.forEach(c=>s.push(qp(c)));let o=[];r.forEach((c,u)=>{let l=new Map;c.forEach(d=>{let f=e.computeStyle(u,d,i);l.set(d,f),(!f||f.length==0)&&(u[yt]=G_,o.push(u))}),t.set(u,l)});let a=0;return n.forEach(c=>qp(c,s[a++])),o}function Kp(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 ct(t,e){t.classList?.add(e)}function Jn(t,e){t.classList?.remove(e)}function Y_(t,e,n){Wt(n).onDone(()=>t.processLeaveNode(e))}function X_(t){let e=[];return tf(t,e),e}function tf(t,e){for(let n=0;n<t.length;n++){let r=t[n];r instanceof os?tf(r.players,e):e.push(r)}}function J_(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 Yp(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 Qn=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,n)=>{};constructor(e,n,r){this._driver=n,this._normalizer=r,this._transitionEngine=new tc(e.body,n,r),this._timelineEngine=new Za(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=[],l=Jp(this._driver,s,c,u);if(c.length)throw Ip(i,c);a=F_(i,l,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]=Pa(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]=Pa(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 Q_(t,e){let n=null,r=null;return Array.isArray(e)&&e.length?(n=Ga(e[0]),e.length>1&&(r=Ga(e[e.length-1]))):e instanceof Map&&(n=Ga(e)),n||r?new Z_(t,n,r):null}var Z_=(()=>{class t{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(n,r,i){this._element=n,this._startStyles=r,this._endStyles=i;let s=t.initialStylesByElement.get(n);s||t.initialStylesByElement.set(n,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&St(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(St(this._element,this._initialStyles),this._endStyles&&(St(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(nn(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(nn(this._element,this._endStyles),this._endStyles=null),St(this._element,this._initialStyles),this._state=3)}}return t})();function Ga(t){let e=null;return t.forEach((n,r)=>{eS(r)&&(e=e||new Map,e.set(r,n))}),e}function eS(t){return t==="display"||t==="position"}var Is=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,n,r,i){this.element=e,this.keyframes=n,this.options=r,this._specialStyles=i,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=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,n=this._triggerWebAnimation(this.element,e,this.options);if(!n)return this._onFinish(),null;this.domPlayer=n,this._finalKeyframe=e.length?e[e.length-1]:new Map;let r=()=>this._onFinish();return n.addEventListener("finish",r),this.onDestroy(()=>{n.removeEventListener("finish",r)}),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){let i=this._convertKeyframesToObject(n);try{return e.animate(i,r)}catch{return null}}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(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(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?.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||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}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:ms(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let n=e==="start"?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}},ws=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,n){return Da(e,n)}getParentElement(e){return ls(e)}query(e,n,r){return La(e,n,r)}computeStyle(e,n,r){return ms(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,l=o.filter(m=>m instanceof Is);Up(r,i)&&l.forEach(m=>{m.currentSnapshot.forEach((h,g)=>u.set(g,h))});let d=Lp(n).map(m=>new Map(m));d=Bp(e,d,u);let f=Q_(e,d);return new Is(e,d,c,f)}};var Ss="@",nf="@.disabled",Rs=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,n,r,i){this.namespaceId=e,this.delegate=n,this.engine=r,this._onDestroy=i}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,i){if(i){this.delegate.removeChild(e,n,r,i);return}this.parentNode(n)&&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)==Ss&&n==nf?this.disableAnimations(e,!!r):this.delegate.setProperty(e,n,r)}setValue(e,n){this.delegate.setValue(e,n)}listen(e,n,r,i){return this.delegate.listen(e,n,r,i)}disableAnimations(e,n){this.engine.disableAnimations(e,n)}},nc=class extends Rs{factory;constructor(e,n,r,i,s){super(n,r,i,s),this.factory=e,this.namespaceId=n}setProperty(e,n,r){n.charAt(0)==Ss?n.charAt(1)=="."&&n==nf?(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,i){if(n.charAt(0)==Ss){let s=tS(e),o=n.slice(1),a="";return o.charAt(0)!=Ss&&([o,a]=nS(o)),this.engine.listen(this.namespaceId,s,o,a,c=>{let u=c._data||-1;this.factory.scheduleListenerCallback(u,r,c)})}return this.delegate.listen(e,n,r,i)}};function tS(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function nS(t){let e=t.indexOf("."),n=t.substring(0,e),r=t.slice(e+1);return[n,r]}var As=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,n,r){this.delegate=e,this.engine=n,this._zone=r,n.onRemovalComplete=(i,s)=>{s?.removeChild(null,i)}}createRenderer(e,n){let i=this.delegate.createRenderer(e,n);if(!e||!n?.data?.animation){let u=this._rendererCache,l=u.get(i);if(!l){let d=()=>u.delete(i);l=new Rs("",i,this.engine,d),u.set(i,l)}return l}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 nc(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(()=>{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()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var iS=(()=>{class t extends Qn{constructor(n,r,i){super(n,r,i)}ngOnDestroy(){this.flush()}static \u0275fac=function(r){return new(r||t)(kt(Bl),kt(wn),kt(Rn))};static \u0275prov=Mt({token:t,factory:t.\u0275fac})}return t})();function sS(){return new ys}function oS(t,e,n){return new As(t,e,n)}var rf=[{provide:Rn,useFactory:sS},{provide:Qn,useClass:iS},{provide:Wl,useFactory:oS,deps:[cd,Qn,zl]}],rA=[{provide:wn,useClass:rc},{provide:va,useValue:"NoopAnimations"},...rf],aS=[{provide:wn,useFactory:()=>new ws},{provide:va,useFactory:()=>"BrowserAnimations"},...rf];function sf(){return $l("NgEagerAnimations"),[...aS]}var cS=(t,e)=>({titleData:t,newsletterData:e}),uS=()=>["/"],lS=()=>["/","hirlevel-feliratkozas"],dS=()=>["/","elmenyek"];function pS(t,e){t&1&&Xl(0)}function fS(t,e){if(t&1&&(Kl(0),is(1,pS,1,0,"ng-container",3),zr(2,"app-latest-recipes-recommendation",4),Yl()),t&2){let n=e.ngIf,r=Ia(),i=Jl(5);tn(),$r("ngTemplateOutlet",i)("ngTemplateOutletContext",Zl(2,cS,r.subscribeTitleData,n))}}function mS(t,e){t&1&&(qn(0,"mindmegette-simple-button",9),Wr(1," Tov\xE1bb az \xE9lm\xE9nyekhez "),Tn()),t&2&&$r("routerLink",ss(1,dS))}function hS(t,e){if(t&1&&(qn(0,"div",5)(1,"div",6)(2,"h2"),Wr(3),Tn(),zr(4,"i",7),Tn(),qn(5,"span",8),Wr(6),Tn(),ql(7,mS,2,2,"mindmegette-simple-button",9),qn(8,"mindmegette-simple-button",10),Wr(9),Tn()()),t&2){let n=e.newsletterData,r=e.titleData,i=Ia();tn(3),wa(r),tn(3),wa(i.subscribeBodyText),tn(),Vl((n==null?null:n.state)==="subscribe"?7:-1),tn(),$r("routerLink",(n==null?null:n.state)!=="confirm"?ss(5,uS):ss(6,lS)),tn(),Ql(" ",(n==null?null:n.state)!=="confirm"?"Tov\xE1bb a f\u0151oldalra":"M\xE1sik e-mail c\xEDm megad\xE1sa"," ")}}var Cs=(()=>{let e=class e{constructor(r){this.activatedRoute=r,this.subscribeBodyText="",this.subscribeTitleData="",this.newsletterSubscribeData$=this.activatedRoute.data.pipe(Nt(i=>{switch(i?.state){case"confirm":{this.subscribeBodyText=Kd,this.subscribeTitleData="Meger\u0151s\xEDt\xE9s folyamatban";break}case"subscribe":{this.subscribeBodyText=qd,this.subscribeTitleData="Sikeres feliratkoz\xE1s";break}case"unsubscribe":{this.subscribeBodyText=Vd,this.subscribeTitleData="Sikeres leiratkoz\xE1s";break}}}))}};e.\u0275fac=function(i){return new(i||e)(at(Id))},e.\u0275cmp=rs({type:e,selectors:[["app-newsletter-subscribe"]],decls:6,vars:3,consts:[["subscribeBody",""],[1,"newsletter-subscribe-body"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"recommendation"],[1,"newsletter-subscribe-content"],[1,"newsletter-subscribe-content-title-container"],[1,"icon","icon-done"],[1,"newsletter-subscribe-content-description"],["color","primary","icon","mindmegette-icon-white-right-arrow","iconPosition","right",1,"gastro-button",3,"routerLink"],["color","primary","icon","mindmegette-icon-white-right-arrow","iconPosition","right",3,"routerLink"]],template:function(i,s){i&1&&(qn(0,"app-sticky-image-wrapper")(1,"section",1),is(2,fS,3,5,"ng-container",2),ed(3,"async"),Tn()(),is(4,hS,10,7,"ng-template",null,0,nd)),i&2&&(tn(2),$r("ngIf",td(3,1,s.newsletterSubscribeData$)))},dependencies:[np,sd,od,tp,Rd,Jd,ad],styles:[".newsletter-subscribe-body[_ngcontent-%COMP%]{margin:32px 40px;display:flex;flex-direction:column;gap:32px}.newsletter-subscribe-body[_ngcontent-%COMP%] app-latest-recipes-recommendation.recommendation{margin-top:40px;padding:10px 0}.newsletter-subscribe-body[_ngcontent-%COMP%] app-latest-recipes-recommendation.recommendation .title{font-size:16px;line-height:24px}.newsletter-subscribe-body[_ngcontent-%COMP%] app-latest-recipes-recommendation.recommendation .author-name{font-size:12px;line-height:16px}.newsletter-subscribe-body[_ngcontent-%COMP%] mindmegette-simple-button .btn-primary{line-height:24px}.newsletter-subscribe-body[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:24px;width:24px;background-color:var(--kui-green-700);border-radius:50%}.newsletter-subscribe-body[_ngcontent-%COMP%] mindmegette-simple-button[_ngcontent-%COMP%]{margin:initial}@media (max-width: 767.98px){.newsletter-subscribe-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:20px 0 0;align-items:center;gap:40px}}.newsletter-subscribe-content-title-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}@media (max-width: 767.98px){.newsletter-subscribe-content-title-container[_ngcontent-%COMP%]{flex-direction:column-reverse;gap:20px;margin-bottom:0}}.newsletter-subscribe-content-title-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--kui-green-700);font-style:normal;font-weight:600;letter-spacing:-.4px;line-height:48px}@media (max-width: 767.98px){.newsletter-subscribe-content-title-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:30px;line-height:36px}}.newsletter-subscribe-content-description[_ngcontent-%COMP%]{font-family:var(--kui-font-secondary);display:inline-block;font-size:16px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.16px;margin-bottom:40px;color:var(--kui-gray-950)}@media (max-width: 767.98px){.newsletter-subscribe-content-description[_ngcontent-%COMP%]{text-align:center;margin-bottom:0}}.gastro-button[_ngcontent-%COMP%]{margin-bottom:40px!important}.homepage-button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}"],changeDetection:0});let t=e;return t})();var of=[{path:"layout-editor",loadChildren:()=>import("./chunk-OKMJ6B6D.js").then(t=>t.layoutEditorRoutes)},{path:"",component:Zd,resolve:{data:sp},children:[{path:"",pathMatch:"full",loadChildren:()=>import("./chunk-OMMZY5QA.js").then(t=>t.homeRoutes)},{path:"assets/:file",redirectTo:"404"},{path:"assets/:dir/:file",redirectTo:"404"},{path:"script/:file",redirectTo:"404"},{path:"elmenyek",loadChildren:()=>import("./chunk-5GGVB25I.js").then(t=>t.gastroRoutes)},{path:"rovat/:categorySlug",loadChildren:()=>import("./chunk-YZIQZVDF.js").then(t=>t.categoryRoutes),data:{omitGlobalPageView:!0}},{path:"recept",loadChildren:()=>import("./chunk-TIKS5FPH.js").then(t=>t.randomRecipeRouting)},{path:"recept/:recipeSlug",loadChildren:()=>import("./chunk-COBQ4PLD.js").then(t=>t.recipePageRoutes),data:{skipSeoMetaCheck:!0}},{path:"receptkategoria/:recipeCategorySlug",loadChildren:()=>import("./chunk-LHGKE2DR.js").then(t=>t.recipeCategoryRoutes)},{path:"hozzavalok",loadChildren:()=>import("./chunk-HAUFFQDY.js").then(t=>t.ingredientListRouting)},{path:"hozzavalo/:ingredientSlug",loadChildren:()=>import("./chunk-ZNHCYWVS.js").then(t=>t.ingredientPageRouting)},{path:"valogatas/:selectionSlug",loadChildren:()=>import("./chunk-N7IRHKHJ.js").then(t=>t.selectionPageRouting)},{path:"szerzo",loadChildren:()=>import("./chunk-LAJ57KHN.js").then(t=>t.AUTHOR_ROUTES)},{path:"szerzok",loadChildren:()=>import("./chunk-LAJ57KHN.js").then(t=>t.AUTHOR_ROUTES)},{path:"heti-menu",loadChildren:()=>import("./chunk-37RRQNPM.js").then(t=>t.weeklyMenuRoutes)},{path:"turpik",loadChildren:()=>import("./chunk-RMV3635Y.js").then(t=>t.bestPracticesRouting),data:{isTapeHidden:!0}},{path:"receptek-a-z",loadChildren:()=>import("./chunk-6UUER57G.js").then(t=>t.recipeCategoryAZRouting)},{path:"legfrissebb-receptek",loadChildren:()=>import("./chunk-FKZ3NP53.js").then(t=>t.latestRecipesPageRouting)},{path:"elrendezes-elonezet/:layoutHash",loadChildren:()=>import("./chunk-KDOXPVOV.js").then(t=>t.layoutPreviewRoutes)},{path:"hozzavalo-elonezet/:previewHash",loadChildren:()=>import("./chunk-ZNHCYWVS.js").then(t=>t.ingredientPageRouting)},{path:"recept-elonezet/:previewHash",loadChildren:()=>import("./chunk-COBQ4PLD.js").then(t=>t.recipePageRoutes),data:{skipSeoMetaCheck:!0}},{path:"heti-menu-elonezet/:previewHash",loadChildren:()=>import("./chunk-37RRQNPM.js").then(t=>t.weeklyMenuRoutes)},{path:"valogatas-elonezet/:previewHash",loadChildren:()=>import("./chunk-N7IRHKHJ.js").then(t=>t.selectionPageRouting)},{path:"cikk-elonezet/:previewHash",loadChildren:()=>import("./chunk-P4JSCXTA.js").then(t=>t.articlePageRoutes),data:{skipSeoMetaCheck:!0,omitGlobalPageView:!0}},{path:"cikk-elonezet/:previewHash/:previewType",loadChildren:()=>import("./chunk-P4JSCXTA.js").then(t=>t.articlePageRoutes),data:{skipSeoMetaCheck:!0,omitGlobalPageView:!0}},{path:"kereses",loadChildren:()=>import("./chunk-OZKQLU2I.js").then(t=>t.searchPageRouting)},{path:"hirlevel-feliratkozas",data:{isFullWidth:!0,isTapeHidden:!0},loadChildren:()=>import("./chunk-GCEFG5BV.js").then(t=>t.newsletterRoutes)},{path:"panaszkezeles",loadChildren:()=>import("./chunk-2QZVMH4F.js").then(t=>t.complaintHandlingRoutes)},{path:"hirlevel-feliratkozas-megerositese",data:{state:"confirm",isFullWidth:!0,isTapeHidden:!0},component:Cs},{path:"hirlevel-feliratkozas-sikeres",data:{state:"subscribe",isFullWidth:!0,isTapeHidden:!0},component:Cs},{path:"hirlevel-leiratkozas",data:{state:"unsubscribe",isFullWidth:!0,isTapeHidden:!0},component:Cs},{path:"regisztracio",data:{isFullWidth:!0,isTapeHidden:!0},loadChildren:()=>import("./chunk-KDRPTI7F.js").then(t=>t.registrationRouting)},{path:"bejelentkezes",data:{isFullWidth:!0,isTapeHidden:!0},loadChildren:()=>import("./chunk-3HEY36YH.js").then(t=>t.loginRouting)},{path:"elfelejtett-jelszo",data:{isFullWidth:!0,isTapeHidden:!0},loadChildren:()=>import("./chunk-AUJ345QY.js").then(t=>t.forgotPasswordRouting)},{path:"kijelentkezes",data:{isFullWidth:!0,isTapeHidden:!0},canActivate:[as],loadChildren:()=>import("./chunk-YX3IVC5P.js").then(t=>t.logoutRouting)},{path:"profil",data:{isFullWidth:!0,isTapeHidden:!0},loadChildren:()=>import("./chunk-RBRN5575.js").then(t=>t.profileRoutes)},{path:"receptbekuldes",data:{isFullWidth:!0,isTapeHidden:!0},canActivate:[as],loadChildren:()=>import("./chunk-YDVSFMBU.js").then(t=>t.recipeSubmitRouting)},{path:"turpi-bekuldes",data:{isFullWidth:!0,isTapeHidden:!0},canActivate:[as],loadChildren:()=>import("./chunk-2M2LTAHT.js").then(t=>t.bestPracticeSubmitRouting)},{path:"cimke",loadChildren:()=>import("./chunk-IKWOZKLN.js").then(t=>t.tagsPageRoutes)},{path:"galeria/:gallerySlug",loadChildren:()=>import("./chunk-TXFCUUTK.js").then(t=>t.galleryLayerRoutes)},{path:"gasztro-szotar",loadChildren:()=>import("./chunk-2EW7ERNM.js").then(t=>t.glossaryRoutes)},{path:"gasztro-szotar-elonezet",loadChildren:()=>import("./chunk-2EW7ERNM.js").then(t=>t.glossaryRoutes),data:{skipSeoMetaCheck:!0,omitGlobalPageView:!0}},{path:":categorySlug/:articleSlug",loadChildren:()=>import("./chunk-P4JSCXTA.js").then(t=>t.articlePageRoutes),data:{skipSeoMetaCheck:!0,omitGlobalPageView:!0}},{path:"404",data:{isTapeHidden:!0},component:ep,canActivate:[Gd]},{path:":slug",loadChildren:()=>import("./chunk-K5OP4GME.js").then(t=>t.staticPageRoutes)},{path:"**",redirectTo:"404"}]}];var gS=new Fl("google-tag-manager-config");var af=(()=>{let e=class e{static forRoot(r){return{ngModule:e,providers:[{provide:gS,useValue:r}]}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=Hr({type:e}),e.\u0275inj=Br({});let t=e;return t})();var _S=new ld(()=>!1),SS=(()=>{let e=class e{constructor(r){this.loader=r}intercept(r,i){if(r.context.get(_S)===!0)return i.handle(r);let s=!1,o=this.loader.useRef("http");return i.handle(r).pipe(Nt(()=>{s||(o.start(),s=!0)}),Ll(()=>s&&o.complete()))}};e.\u0275fac=function(i){return new(i||e)(kt(Qd))},e.\u0275prov=Mt({token:e,factory:e.\u0275fac});let t=e;return t})();function cf(){return{provide:pd,useClass:SS,multi:!0}}var I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var U=globalThis;var Ot="10.30.0";function Qe(){return An(U),U}function An(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Ot,e[Ot]=e[Ot]||{}}function Et(t,e,n=U){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Ot]=r[Ot]||{};return i[t]||(i[t]=e())}var sc=["debug","info","warn","error","log","assert","trace"],yS="Sentry Logger ",Zn={};function Pe(t){if(!("console"in U))return t();let e=U.console,n={},r=Object.keys(Zn);r.forEach(i=>{let s=Zn[i];n[i]=e[i],e[i]=s});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function ES(){ac().enabled=!0}function TS(){ac().enabled=!1}function uf(){return ac().enabled}function bS(...t){oc("log",...t)}function vS(...t){oc("warn",...t)}function IS(...t){oc("error",...t)}function oc(t,...e){I&&uf()&&Pe(()=>{U.console[t](`${yS}[${t}]:`,...e)})}function ac(){return I?Et("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var _={enable:ES,disable:TS,isEnabled:uf,log:bS,warn:vS,error:IS};var lf=/\(error: (.*)\)/,df=/captureMessage|captureException/;function Ms(...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(`
`);for(let a=r;a<o.length;a++){let c=o[a];c.length>1024&&(c=c.slice(0,1024));let u=lf.test(c)?c.replace(lf,"$1"):c;if(!u.match(/\S*Error: /)){for(let l of e){let d=l(u);if(d){s.push(d);break}}if(s.length>=50+i)break}}return pf(s.slice(i))}}function uc(t){return Array.isArray(t)?Ms(...t):t}function pf(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(Ns(e).function||"")&&e.pop(),e.reverse(),df.test(Ns(e).function||"")&&(e.pop(),df.test(Ns(e).function||"")&&e.pop()),e.slice(0,50).map(n=>v(p({},n),{filename:n.filename||Ns(e).filename,function:n.function||"?"}))}function Ns(t){return t[t.length-1]||{}}var cc="<anonymous>";function Ke(t){try{return!t||typeof t!="function"?cc:t.name||cc}catch{return cc}}function ks(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}}}function xs(t){return"__v_isVNode"in t&&t.__v_isVNode?"[VueVNode]":"[VueViewModel]"}var Os={},ff={};function De(t,e){Os[t]=Os[t]||[],Os[t].push(e)}function Le(t,e){if(!ff[t]){ff[t]=!0;try{e()}catch(n){I&&_.error(`Error while instrumenting ${t}`,n)}}}function Ie(t,e){let n=t&&Os[t];if(n)for(let r of n)try{r(e)}catch(i){I&&_.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${Ke(r)}
Error:`,i)}}var lc=null;function Zr(t){let e="error";De(e,t),Le(e,wS)}function wS(){lc=U.onerror,U.onerror=function(t,e,n,r,i){return Ie("error",{column:r,error:i,line:n,msg:t,url:e}),lc?lc.apply(this,arguments):!1},U.onerror.__SENTRY_INSTRUMENTED__=!0}var dc=null;function ei(t){let e="unhandledrejection";De(e,t),Le(e,RS)}function RS(){dc=U.onunhandledrejection,U.onunhandledrejection=function(t){return Ie("unhandledrejection",t),dc?dc.apply(this,arguments):!0},U.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var mf=Object.prototype.toString;function Cn(t){switch(mf.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ze(t,Error)}}function er(t,e){return mf.call(t)===`[object ${e}]`}function Ps(t){return er(t,"ErrorEvent")}function Ds(t){return er(t,"DOMError")}function pc(t){return er(t,"DOMException")}function Re(t){return er(t,"String")}function tr(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Tt(t){return t===null||tr(t)||typeof t!="object"&&typeof t!="function"}function jt(t){return er(t,"Object")}function Nn(t){return typeof Event<"u"&&Ze(t,Event)}function fc(t){return typeof Element<"u"&&Ze(t,Element)}function mc(t){return er(t,"RegExp")}function ut(t){return!!(t?.then&&typeof t.then=="function")}function hc(t){return jt(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Ze(t,e){try{return t instanceof e}catch{return!1}}function ti(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue||t.__v_isVNode))}function ni(t){return typeof Request<"u"&&Ze(t,Request)}var gc=U,AS=80;function ye(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],s=0,o=0,a=" > ",c=a.length,u,l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||AS;for(;n&&s++<r&&(u=CS(n,l),!(u==="html"||s>1&&o+i.length*c+u.length>=d));)i.push(u),o+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function CS(t,e){let n=t,r=[];if(!n?.tagName)return"";if(gc.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?.length?e.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i?.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let o=n.className;if(o&&Re(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 et(){try{return gc.document.location.href}catch{return""}}function ri(t){if(!gc.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 be(t,e,n){if(!(e in t))return;let r=t[e];if(typeof r!="function")return;let i=n(r);typeof i=="function"&&Ls(i,r);try{t[e]=i}catch{I&&_.log(`Failed to replace method "${e}" in object`,t)}}function _e(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{I&&_.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Ls(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,_e(t,"__sentry_original__",e)}catch{}}function Mn(t){return t.__sentry_original__}function Fs(t){if(Cn(t))return p({message:t.message,name:t.name,stack:t.stack},gf(t));if(Nn(t)){let e=p({type:t.type,target:hf(t.target),currentTarget:hf(t.currentTarget)},gf(t));return typeof CustomEvent<"u"&&Ze(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function hf(t){try{return fc(t)?ye(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function gf(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 _c(t){let e=Object.keys(Fs(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"}function nr(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Us(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{ti(i)?n.push(xs(i)):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function rr(t,e,n=!1){return Re(t)?mc(e)?e.test(t):Re(e)?n?t===e:t.includes(e):!1:!1}function Ye(t,e=[],n=!1){return e.some(r=>rr(t,r,n))}function NS(){let t=U;return t.crypto||t.msCrypto}var Sc;function MS(){return Math.random()*16}function ve(t=NS()){try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"")}catch{}return Sc||(Sc="10000000100040008000"+1e11),Sc.replace(/[018]/g,e=>(e^(MS()&15)>>e/4).toString(16))}function _f(t){return t.exception?.values?.[0]}function Pt(t){let{message:e,event_id:n}=t;if(e)return e;let r=_f(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ir(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 Dt(t,e){let n=_f(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=p(p(p({},r),i),e),e&&"data"in e){let s=p(p({},i?.data),e.data);n.mechanism.data=s}}function Bs(t){if(kS(t))return!0;try{_e(t,"__sentry_captured__",!0)}catch{}return!1}function kS(t){try{return t.__sentry_captured__}catch{}}var yf=1e3;function tt(){return Date.now()/yf}function xS(){let{performance:t}=U;if(!t?.now||!t.timeOrigin)return tt;let e=t.timeOrigin;return()=>(e+t.now())/yf}var Sf;function le(){return(Sf??(Sf=xS()))()}var yc;function OS(){let{performance:t}=U;if(!t?.now)return[void 0,"none"];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?.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):e,u=c<e;return s||u?i<=c?[t.timeOrigin,"timeOrigin"]:[o,"navigationStart"]:[r,"dateNow"]}function Se(){return yc||(yc=OS()),yc[0]}function Ef(t){let e=le(),n={sid:ve(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>PS(n)};return t&&Gt(n,t),n}function Gt(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||le(),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:ve()),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),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Tf(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),Gt(t,n)}function PS(t){return{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 rn(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;let r=p({},t);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=rn(r[i],e[i],n-1));return r}function Ue(){return ve()}function Fe(){return ve().substring(16)}var Ec="_sentrySpan";function qt(t,e){e?_e(t,Ec,e):delete t[Ec]}function kn(t){return t[Ec]}var DS=100,Xe=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ue(),sampleRand:Math.random()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=p({},this._tags),e._attributes=p({},this._attributes),e._extra=p({},this._extra),e._contexts=p({},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._attachments=[...this._attachments],e._sdkProcessingMetadata=p({},this._sdkProcessingMetadata),e._propagationContext=p({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,qt(e,kn(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&&Gt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags=p(p({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this.setTags({[e]:n})}setAttributes(e){return this._attributes=p(p({},this._attributes),e),this._notifyScopeListeners(),this}setAttribute(e,n){return this.setAttributes({[e]:n})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra=p(p({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=v(p({},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=n instanceof t?n.getScopeData():jt(n)?e:void 0,{tags:i,attributes:s,extra:o,user:a,contexts:c,level:u,fingerprint:l=[],propagationContext:d}=r||{};return this._tags=p(p({},this._tags),i),this._attributes=p(p({},this._attributes),s),this._extra=p(p({},this._extra),o),this._contexts=p(p({},this._contexts),c),a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),l.length&&(this._fingerprint=l),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,qt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ue(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:DS;if(r<=0)return this;let i=v(p({timestamp:tt()},e),{message:e.message?nr(e.message,2048):e.message});return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("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,attributes:this._attributes,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:kn(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=rn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n?.event_id||ve();if(!this._client)return I&&_.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,v(p({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r?.event_id||ve();if(!this._client)return I&&_.warn("No client configured on scope - will not capture message!"),i;let s=r?.syntheticException??new Error(e);return this._client.captureMessage(e,n,v(p({originalException:e,syntheticException:s},r),{event_id:i}),this),i}captureEvent(e,n){let r=n?.event_id||ve();return this._client?(this._client.captureEvent(e,v(p({},n),{event_id:r}),this),r):(I&&_.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)}};function bf(){return Et("defaultCurrentScope",()=>new Xe)}function vf(){return Et("defaultIsolationScope",()=>new Xe)}var Tc=class{constructor(e,n){let r;e?r=e:r=new Xe;let i;n?i=n:i=new Xe,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 ut(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 sr(){let t=Qe(),e=An(t);return e.stack=e.stack||new Tc(bf(),vf())}function LS(t){return sr().withScope(t)}function FS(t,e){let n=sr();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function If(t){return sr().withScope(()=>t(sr().getIsolationScope()))}function wf(){return{withIsolationScope:If,withScope:LS,withSetScope:FS,withSetIsolationScope:(t,e)=>If(e),getCurrentScope:()=>sr().getScope(),getIsolationScope:()=>sr().getIsolationScope()}}function Lt(t){let e=An(t);return e.acs?e.acs:wf()}function B(){let t=Qe();return Lt(t).getCurrentScope()}function Ae(){let t=Qe();return Lt(t).getIsolationScope()}function Hs(){return Et("globalScope",()=>new Xe)}function sn(...t){let e=Qe(),n=Lt(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function k(){return B().getClient()}function bc(t){let e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=e,s={trace_id:n,span_id:i||Fe()};return r&&(s.parent_span_id=r),s}var he="sentry.source",on="sentry.sample_rate",ii="sentry.previous_trace_sample_rate",Ce="sentry.op",te="sentry.origin",an="sentry.idle_span_finish_reason",Ft="sentry.measurement_unit",Ut="sentry.measurement_value",si="sentry.custom_span_name",or="sentry.profile_id",lt="sentry.exclusive_time";var vc="sentry.link.type";function Ic(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:"internal_error"}}function ar(t,e){t.setAttribute("http.response.status_code",e);let n=Ic(e);n.message!=="unknown_error"&&t.setStatus(n)}var Rf="_sentryScope",Af="_sentryIsolationScope";function US(t){try{let e=U.WeakRef;if(typeof e=="function")return new e(t)}catch{}return t}function BS(t){if(t){if(typeof t=="object"&&"deref"in t&&typeof t.deref=="function")try{return t.deref()}catch{return}return t}}function Cf(t,e,n){t&&(_e(t,Af,US(n)),_e(t,Rf,e))}function xn(t){let e=t;return{scope:e[Rf],isolationScope:BS(e[Af])}}var $s="sentry-",HS=/^sentry-/,$S=8192;function zs(t){let e=zS(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,s])=>{if(i.match(HS)){let o=i.slice($s.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function wc(t){if(!t)return;let e=Object.entries(t).reduce((n,[r,i])=>(i&&(n[`${$s}${r}`]=i),n),{});return WS(e)}function zS(t){if(!(!t||!Re(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=Nf(n);return Object.entries(r).forEach(([i,s])=>{e[i]=s}),e},{}):Nf(t)}function Nf(t){return t.split(",").map(e=>{let n=e.indexOf("=");if(n===-1)return[];let r=e.slice(0,n),i=e.slice(n+1);return[r,i].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function WS(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>$S?(I&&_.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},"")}var jS=/^o(\d+)\./,GS=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function qS(t){return t==="http"||t==="https"}function nt(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 VS(t){let e=GS.exec(t);if(!e){Pe(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",s="",o="",a=""]=e.slice(1),c="",u=a,l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){let d=u.match(/^\d+/);d&&(u=d[0])}return Mf({host:s,pass:i,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function Mf(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function KS(t){if(!I)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(_.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?qS(r)?e&&isNaN(parseInt(e,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function YS(t){return t.match(jS)?.[1]}function kf(t){let e=t.getOptions(),{host:n}=t.getDsn()||{},r;return e.orgId?r=String(e.orgId):n&&(r=YS(n)),r}function Ws(t){let e=typeof t=="string"?VS(t):Mf(t);if(!(!e||!KS(e)))return e}function rt(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))return e}var js=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function xf(t){if(!t)return;let e=t.match(js);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 Rc(t,e){let n=xf(t),r=zs(e);if(!n?.traceId)return{traceId:Ue(),sampleRand:Math.random()};let i=XS(n,r);r&&(r.sample_rand=i.toString());let{traceId:s,parentSpanId:o,parentSampled:a}=n;return{traceId:s,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:i}}function oi(t=Ue(),e=Fe(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function Gs(t=Ue(),e=Fe(),n){return`00-${t}-${e}-${n?"01":"00"}`}function XS(t,e){let n=rt(e?.sample_rand);if(n!==void 0)return n;let r=rt(e?.sample_rate);return r&&t?.parentSampled!==void 0?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}var qs=0,Vs=1,Of=!1;function Lf(t){let{spanId:e,traceId:n}=t.spanContext(),{data:r,op:i,parent_span_id:s,status:o,origin:a,links:c}=L(t);return{parent_span_id:s,span_id:e,trace_id:n,data:r,op:i,status:o,origin:a,links:c}}function Cc(t){let{spanId:e,traceId:n,isRemote:r}=t.spanContext(),i=r?e:L(t).parent_span_id,s=xn(t).scope,o=r?s?.getPropagationContext().propagationSpanId||Fe():e;return{parent_span_id:i,span_id:o,trace_id:n}}function Ks(t){let{traceId:e,spanId:n}=t.spanContext(),r=it(t);return oi(e,n,r)}function Ff(t){let{traceId:e,spanId:n}=t.spanContext(),r=it(t);return Gs(e,n,r)}function Ys(t){if(t&&t.length>0)return t.map(o=>{var a=o,{context:c}=a,u=c,{spanId:e,traceId:n,traceFlags:r}=u,i=Gn(u,["spanId","traceId","traceFlags"]),{attributes:s}=a;return p({span_id:e,trace_id:n,sampled:r===Vs,attributes:s},i)})}function bt(t){return typeof t=="number"?Pf(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Pf(t.getTime()):le()}function Pf(t){return t>9999999999?t/1e3:t}function L(t){if(ZS(t))return t.getSpanJSON();let{spanId:e,traceId:n}=t.spanContext();if(QS(t)){let{attributes:r,startTime:i,name:s,endTime:o,status:a,links:c}=t,u="parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0;return{span_id:e,trace_id:n,data:r,description:s,parent_span_id:u,start_timestamp:bt(i),timestamp:bt(o)||void 0,status:Xs(a),op:r[Ce],origin:r[te],links:Ys(c)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function QS(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function ZS(t){return typeof t.getSpanJSON=="function"}function it(t){let{traceFlags:e}=t.spanContext();return e===Vs}function Xs(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"internal_error"}var On="_sentryChildSpans",Ac="_sentryRootSpan";function Js(t,e){let n=t[Ac]||t;_e(e,Ac,n),t[On]?t[On].add(e):_e(t,On,new Set([e]))}function Uf(t,e){t[On]&&t[On].delete(e)}function cn(t){let e=new Set;function n(r){if(!e.has(r)&&it(r)){e.add(r);let i=r[On]?Array.from(r[On]):[];for(let s of i)n(s)}}return n(t),Array.from(e)}function se(t){return t[Ac]||t}function ue(){let t=Qe(),e=Lt(t);return e.getActiveSpan?e.getActiveSpan():kn(B())}function ai(){Of||(Pe(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Of=!0)}var Bf=!1;function Qs(){if(Bf)return;function t(){let e=ue(),n=e&&se(e);if(n){let r="internal_error";I&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}t.tag="sentry_tracingErrorCallback",Bf=!0,Zr(t),ei(t)}function Ne(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=t||k()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}function Hf(t){_.log(`Ignoring span ${t.op} - ${t.description} because it matches \`ignoreSpans\`.`)}function Pn(t,e){if(!e?.length||!t.description)return!1;for(let n of e){if(ey(n)){if(rr(t.description,n))return I&&Hf(t),!0;continue}if(!n.name&&!n.op)continue;let r=n.name?rr(t.description,n.name):!0,i=n.op?t.op&&rr(t.op,n.op):!0;if(r&&i)return I&&Hf(t),!0}return!1}function $f(t,e){let n=e.parent_span_id,r=e.span_id;if(n)for(let i of t)i.parent_span_id===r&&(i.parent_span_id=n)}function ey(t){return typeof t=="string"||t instanceof RegExp}var cr="production";var zf="_frozenDsc";function ur(t,e){_e(t,zf,e)}function Nc(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i={environment:n.environment||cr,release:n.release,public_key:r,trace_id:t,org_id:kf(e)};return e.emit("createDsc",i),i}function ci(t,e){let n=e.getPropagationContext();return n.dsc||Nc(n.traceId,t)}function Me(t){let e=k();if(!e)return{};let n=se(t),r=L(n),i=r.data,s=n.spanContext().traceState,o=s?.get("sentry.sample_rate")??i[on]??i[ii];function a(h){return(typeof o=="number"||typeof o=="string")&&(h.sample_rate=`${o}`),h}let c=n[zf];if(c)return a(c);let u=s?.get("sentry.dsc"),l=u&&zs(u);if(l)return a(l);let d=Nc(t.spanContext().traceId,e),f=i[he],m=r.description;return f!=="url"&&m&&(d.transaction=m),Ne()&&(d.sampled=String(it(n)),d.sample_rand=s?.get("sentry.sample_rand")??xn(n).scope?.getPropagationContext().sampleRand.toString()),a(d),e.emit("createDsc",d,n),d}var Be=class{constructor(e={}){this._traceId=e.traceId||Ue(),this._spanId=e.spanId||Fe()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:qs}}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){}};function He(t,e=100,n=1/0){try{return Mc("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Zs(t,e=3,n=100*1024){let r=He(t,e);return iy(r)>n?Zs(t,e-1,n):r}function Mc(t,e,n=1/0,r=1/0,i=sy()){let[s,o]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;let a=ty(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 Mc("",m,c-1,r,i)}catch{}let l=Array.isArray(e)?[]:{},d=0,f=Fs(e);for(let m in f){if(!Object.prototype.hasOwnProperty.call(f,m))continue;if(d>=r){l[m]="[MaxProperties ~]";break}let h=f[m];l[m]=Mc(m,h,c-1,r,i),d++}return o(e),l}function ty(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(ti(e))return xs(e);if(hc(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${Ke(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=ny(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ny(t){let e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function ry(t){return~-encodeURI(t).split(/%..|./).length}function iy(t){return ry(JSON.stringify(t))}function sy(){let t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function $e(t,e=[]){return[t,e]}function xc(t,e){let[n,r]=t;return[n,[...r,e]]}function eo(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 kc(t){let e=An(U);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function Oc(t){let[e,n]=t,r=JSON.stringify(e);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[kc(r),s]:r.push(typeof s=="string"?kc(s):s)}for(let s of n){let[o,a]=s;if(i(`
${JSON.stringify(o)}
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(He(a))}i(c)}}return typeof r=="string"?r:oy(r)}function oy(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 Pc(t){return[{type:"span"},t]}function Dc(t){let e=typeof t.data=="string"?kc(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}var ay={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function to(t){return ay[t]}function lr(t){if(!t?.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function ui(t,e,n,r){let i=t.sdkProcessingMetadata?.dynamicSamplingContext;return p(p(p({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:nt(r)}),i&&{trace:i})}function cy(t,e){if(!e)return t;let n=t.sdk||{};return t.sdk=v(p({},n),{name:n.name||e.name,version:n.version||e.version,integrations:[...t.sdk?.integrations||[],...e.integrations||[]],packages:[...t.sdk?.packages||[],...e.packages||[]],settings:t.sdk?.settings||e.settings?p(p({},t.sdk?.settings),e.settings):void 0}),t}function Wf(t,e,n,r){let i=lr(n),s=p(p({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:nt(e)}),o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return $e(s,[o])}function jf(t,e,n,r){let i=lr(n),s=t.type&&t.type!=="replay_event"?t.type:"event";cy(t,n?.sdk);let o=ui(t,i,r,e);return delete t.sdkProcessingMetadata,$e(o,[[{type:s},t]])}function Gf(t,e){function n(m){return!!m.trace_id&&!!m.public_key}let r=Me(t[0]),i=e?.getDsn(),s=e?.getOptions().tunnel,o=p(p({sent_at:new Date().toISOString()},n(r)&&{trace:r}),!!s&&i&&{dsn:nt(i)}),{beforeSendSpan:a,ignoreSpans:c}=e?.getOptions()||{},u=c?.length?t.filter(m=>!Pn(L(m),c)):t,l=t.length-u.length;l&&e?.recordDroppedEvent("before_send","span",l);let d=a?m=>{let h=L(m),g=a(h);return g||(ai(),h)}:L,f=[];for(let m of u){let h=d(m);h&&f.push(Pc(h))}return $e(o,f)}function qf(t){if(!I)return;let{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=L(t),{spanId:i}=t.spanContext(),s=it(t),o=se(t),a=o===t,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${i}`];if(r&&u.push(`parent ID: ${r}`),!a){let{op:l,description:d}=L(o);u.push(`root ID: ${o.spanContext().spanId}`),l&&u.push(`root op: ${l}`),d&&u.push(`root description: ${d}`)}_.log(`${c}
${u.join(`
`)}`)}function Vf(t){if(!I)return;let{description:e="< unknown name >",op:n="< unknown op >"}=L(t),{spanId:r}=t.spanContext(),s=se(t)===t,o=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${e}" with ID ${r}`;_.log(o)}function no(t,e,n,r=ue()){let i=r&&se(r);i&&(I&&_.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),i.addEvent(t,{[Ut]:e,[Ft]:n}))}function ro(t){if(!t||t.length===0)return;let e={};return t.forEach(n=>{let r=n.attributes||{},i=r[Ft],s=r[Ut];typeof i=="string"&&typeof s=="number"&&(e[n.name]={value:s,unit:i})}),e}var Kf=1e3,ln=class{constructor(e={}){this._traceId=e.traceId||Ue(),this._spanId=e.spanId||Fe(),this._startTime=e.startTimestamp||le(),this._links=e.links,this._attributes={},this.setAttributes(p({[te]:"manual",[Ce]: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._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,n){}spanContext(){let{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Vs:qs}}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=bt(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(he,"custom"),this}end(e){this._endTime||(this._endTime=bt(e),Vf(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ce],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Xs(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[te],profile_id:this._attributes[or],exclusive_time:this._attributes[lt],measurements:ro(this._events),is_segment:this._isStandaloneSpan&&se(this)===this||void 0,segment_id:this._isStandaloneSpan?se(this).spanContext().spanId:void 0,links:Ys(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){I&&_.log("[Tracing] Adding an event to span:",e);let i=Yf(n)?n:r||le(),s=Yf(n)?{}:n||{},o={name:e,time:bt(i),attributes:s};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=k();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===se(this)))return;if(this._isStandaloneSpan){this._sampled?ly(Gf([this],e)):(I&&_.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&&(xn(this).scope||B()).captureEvent(r)}_convertSpanToTransaction(){if(!Xf(L(this)))return;this._name||(I&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:e,isolationScope:n}=xn(this),r=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let s=cn(this).filter(l=>l!==this&&!uy(l)).map(l=>L(l)).filter(Xf),o=this._attributes[he];delete this._attributes[si],s.forEach(l=>{delete l.data[si]});let a=p({contexts:{trace:Lf(this)},spans:s.length>Kf?s.sort((l,d)=>l.start_timestamp-d.start_timestamp).slice(0,Kf):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,dynamicSamplingContext:Me(this)},request:r},o&&{transaction_info:{source:o}}),c=ro(this._events);return c&&Object.keys(c).length&&(I&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}};function Yf(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function Xf(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function uy(t){return t instanceof ln&&t.isStandaloneSpan()}function ly(t){let e=k();if(!e)return;let n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}function Jf(t,e,n=()=>{},r=()=>{}){let i;try{i=t()}catch(s){throw e(s),n(),s}return dy(i,e,n,r)}function dy(t,e,n,r){return ut(t)?t.then(i=>(n(),r(i),i),i=>{throw e(i),n(),i}):(n(),r(t),t)}function Qf(t,e,n){if(!Ne(t))return[!1];let r,i;typeof t.tracesSampler=="function"?(i=t.tracesSampler(v(p({},e),{inheritOrSampleWith:a=>typeof e.parentSampleRate=="number"?e.parentSampleRate:typeof e.parentSampled=="boolean"?Number(e.parentSampled):a})),r=!0):e.parentSampled!==void 0?i=e.parentSampled:typeof t.tracesSampleRate<"u"&&(i=t.tracesSampleRate,r=!0);let s=rt(i);if(s===void 0)return I&&_.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!s)return I&&_.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,r];let o=n<s;return o||I&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,s,r]}var em="__SENTRY_SUPPRESS_TRACING__";function io(t,e){let n=Lc();if(n.startSpan)return n.startSpan(t,e);let r=nm(t),{forceTransaction:i,parentSpan:s,scope:o}=t,a=o?.clone();return sn(a,()=>fy(s)(()=>{let u=B(),l=rm(u,s),f=t.onlyIfParent&&!l?new Be:tm({parentSpan:l,spanArguments:r,forceTransaction:i,scope:u});return qt(u,f),Jf(()=>e(f),()=>{let{status:m}=L(f);f.isRecording()&&(!m||m==="ok")&&f.setStatus({code:2,message:"internal_error"})},()=>{f.end()})}))}function ze(t){let e=Lc();if(e.startInactiveSpan)return e.startInactiveSpan(t);let n=nm(t),{forceTransaction:r,parentSpan:i}=t;return(t.scope?o=>sn(t.scope,o):i!==void 0?o=>dr(i,o):o=>o())(()=>{let o=B(),a=rm(o,i);return t.onlyIfParent&&!a?new Be:tm({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function dr(t,e){let n=Lc();return n.withActiveSpan?n.withActiveSpan(t,e):sn(r=>(qt(r,t||void 0),e(r)))}function tm({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Ne()){let o=new Be;if(n||!t){let a=p({sampled:"false",sample_rate:"0",transaction:e.name},Me(o));ur(o,a)}return o}let i=Ae(),s;if(t&&!n)s=py(t,r,e),Js(t,s);else if(t){let o=Me(t),{traceId:a,spanId:c}=t.spanContext(),u=it(t);s=Zf(p({traceId:a,parentSpanId:c},e),r,u),ur(s,o)}else{let{traceId:o,dsc:a,parentSpanId:c,sampled:u}=p(p({},i.getPropagationContext()),r.getPropagationContext());s=Zf(p({traceId:o,parentSpanId:c},e),r,u),a&&ur(s,a)}return qf(s),Cf(s,r,i),s}function nm(t){let e=t.experimental||{},n=p({isStandalone:e.standalone},t);if(t.startTime){let r=p({},n);return r.startTimestamp=bt(t.startTime),delete r.startTime,r}return n}function Lc(){let t=Qe();return Lt(t)}function Zf(t,e,n){let r=k(),i=r?.getOptions()||{},{name:s=""}=t,o={spanAttributes:p({},t.attributes),spanName:s,parentSampled:n};r?.emit("beforeSampling",o,{decision:!1});let a=o.parentSampled??n,c=o.spanAttributes,u=e.getPropagationContext(),[l,d,f]=e.getScopeData().sdkProcessingMetadata[em]?[!1]:Qf(i,{name:s,parentSampled:a,attributes:c,parentSampleRate:rt(u.dsc?.sample_rate)},u.sampleRand),m=new ln(v(p({},t),{attributes:p({[he]:"custom",[on]:d!==void 0&&f?d:void 0},c),sampled:l}));return!l&&r&&(I&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",m),m}function py(t,e,n){let{spanId:r,traceId:i}=t.spanContext(),s=e.getScopeData().sdkProcessingMetadata[em]?!1:it(t),o=s?new ln(v(p({},n),{parentSpanId:r,traceId:i,sampled:s})):new Be({traceId:i});Js(t,o);let a=k();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function rm(t,e){if(e)return e;if(e===null)return;let n=kn(t);if(!n)return;let r=k();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?se(n):n}function fy(t){return t!==void 0?e=>dr(t,e):e=>e()}var pr={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},my="heartbeatFailed",hy="idleTimeout",gy="finalTimeout",_y="externalFinish";function so(t,e={}){let n=new Map,r=!1,i,s=_y,o=!e.disableAutoFinish,a=[],{idleTimeout:c=pr.idleTimeout,finalTimeout:u=pr.finalTimeout,childSpanTimeout:l=pr.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=e,m=k();if(!m||!Ne()){let E=new Be,C=p({sample_rate:"0",sampled:"false"},Me(E));return ur(E,C),E}let h=B(),g=ue(),S=Sy(t);S.end=new Proxy(S.end,{apply(E,C,ne){if(d&&d(S),C instanceof Be)return;let[A,...P]=ne,j=A||le(),Z=bt(j),G=cn(S).filter(R=>R!==S),ge=L(S);if(!G.length||!f)return O(Z),Reflect.apply(E,C,[Z,...P]);let T=m.getOptions().ignoreSpans,w=G?.reduce((R,K)=>{let Y=L(K);return!Y.timestamp||T&&Pn(Y,T)?R:R?Math.max(R,Y.timestamp):Y.timestamp},void 0),y=ge.start_timestamp,M=Math.min(y?y+u/1e3:1/0,Math.max(y||-1/0,Math.min(Z,w||1/0)));return O(M),Reflect.apply(E,C,[M,...P])}});function b(){i&&(clearTimeout(i),i=void 0)}function N(E){b(),i=setTimeout(()=>{!r&&n.size===0&&o&&(s=hy,S.end(E))},c)}function F(E){i=setTimeout(()=>{!r&&o&&(s=my,S.end(E))},l)}function D(E){b(),n.set(E,!0);let C=le();F(C+l/1e3)}function Q(E){if(n.has(E)&&n.delete(E),n.size===0){let C=le();N(C+c/1e3)}}function O(E){r=!0,n.clear(),a.forEach(G=>G()),qt(h,g);let C=L(S),{start_timestamp:ne}=C;if(!ne)return;C.data[an]||S.setAttribute(an,s);let P=C.status;(!P||P==="unknown")&&S.setStatus({code:1}),_.log(`[Tracing] Idle span "${C.op}" finished`);let j=cn(S).filter(G=>G!==S),Z=0;j.forEach(G=>{G.isRecording()&&(G.setStatus({code:2,message:"cancelled"}),G.end(E),I&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(G,void 0,2)));let ge=L(G),{timestamp:T=0,start_timestamp:w=0}=ge,y=w<=E,M=(u+c)/1e3,R=T-w<=M;if(I){let K=JSON.stringify(G,void 0,2);y?R||_.log("[Tracing] Discarding span since it finished after idle span final timeout",K):_.log("[Tracing] Discarding span since it happened after idle span was finished",K)}(!R||!y)&&(Uf(S,G),Z++)}),Z>0&&S.setAttribute("sentry.idle_span_discarded_spans",Z)}return a.push(m.on("spanStart",E=>{if(r||E===S||L(E).timestamp||E instanceof ln&&E.isStandaloneSpan())return;cn(S).includes(E)&&D(E.spanContext().spanId)})),a.push(m.on("spanEnd",E=>{r||Q(E.spanContext().spanId)})),a.push(m.on("idleSpanEnableAutoFinish",E=>{E===S&&(o=!0,N(),n.size&&F())})),e.disableAutoFinish||N(),setTimeout(()=>{r||(S.setStatus({code:2,message:"deadline_exceeded"}),s=gy,S.end())},u),S}function Sy(t){let e=ze(t);return qt(B(),e),I&&_.log("[Tracing] Started span is an idle span"),e}var Fc=0,im=1,sm=2;function dn(t){return new li(e=>{e(t)})}function Dn(t){return new li((e,n)=>{n(t)})}var li=class t{constructor(e){this._state=Fc,this._handlers=[],this._runExecutor(e)}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)})})}_executeHandlers(){if(this._state===Fc)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===im&&n[1](this._value),this._state===sm&&n[2](this._value),n[0]=!0)})}_runExecutor(e){let n=(s,o)=>{if(this._state===Fc){if(ut(o)){o.then(r,i);return}this._state=s,this._value=o,this._executeHandlers()}},r=s=>{n(im,s)},i=s=>{n(sm,s)};try{e(r,i)}catch(s){i(s)}}};function om(t,e,n,r=0){try{let i=Uc(e,n,t,r);return ut(i)?i:dn(i)}catch(i){return Dn(i)}}function Uc(t,e,n,r){let i=n[r];if(!t||!i)return t;let s=i(p({},t),e);return I&&s===null&&_.log(`Event processor "${i.id||"?"}" dropped event`),ut(s)?s.then(o=>Uc(o,e,n,r+1)):Uc(s,e,n,r+1)}function am(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=e;yy(t,e),r&&by(t,r),vy(t,n),Ey(t,i),Ty(t,s)}function Bc(t,e){let{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:f,transactionName:m,span:h}=e;oo(t,"extra",n),oo(t,"tags",r),oo(t,"user",i),oo(t,"contexts",s),t.sdkProcessingMetadata=rn(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]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext=p(p({},t.propagationContext),f)}function oo(t,e,n){t[e]=rn(t[e],n,1)}function yy(t,e){let{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=e;Object.keys(n).length&&(t.extra=p(p({},n),t.extra)),Object.keys(r).length&&(t.tags=p(p({},r),t.tags)),Object.keys(i).length&&(t.user=p(p({},i),t.user)),Object.keys(s).length&&(t.contexts=p(p({},s),t.contexts)),o&&(t.level=o),a&&t.type!=="transaction"&&(t.transaction=a)}function Ey(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Ty(t,e){t.sdkProcessingMetadata=p(p({},t.sdkProcessingMetadata),e)}function by(t,e){t.contexts=p({trace:Cc(e)},t.contexts),t.sdkProcessingMetadata=p({dynamicSamplingContext:Me(e)},t.sdkProcessingMetadata);let n=se(e),r=L(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function vy(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}var Ln,cm,um,pn;function lm(t){let e=U._sentryDebugIds,n=U._debugIds;if(!e&&!n)return{};let r=e?Object.keys(e):[],i=n?Object.keys(n):[];if(pn&&r.length===cm&&i.length===um)return pn;cm=r.length,um=i.length,pn={},Ln||(Ln={});let s=(o,a)=>{for(let c of o){let u=a[c],l=Ln?.[c];if(l&&pn&&u)pn[l[0]]=u,Ln&&(Ln[c]=[l[0],u]);else if(u){let d=t(c);for(let f=d.length-1;f>=0;f--){let h=d[f]?.filename;if(h&&pn&&Ln){pn[h]=u,Ln[c]=[h,u];break}}}}};return e&&s(r,e),n&&s(i,n),pn}function di(t,e,n,r,i,s){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c=v(p({},e),{event_id:e.event_id||n.event_id||ve(),timestamp:e.timestamp||tt()}),u=n.integrations||t.integrations.map(S=>S.name);Iy(c,t),Ay(c,u),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&wy(c,t.stackParser);let l=Ny(r,n.captureContext);n.mechanism&&Dt(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Hs().getScopeData();if(s){let S=s.getScopeData();Bc(f,S)}if(l){let S=l.getScopeData();Bc(f,S)}let m=[...n.attachments||[],...f.attachments];m.length&&(n.attachments=m),am(c,f);let h=[...d,...f.eventProcessors];return om(h,c,n).then(S=>(S&&Ry(S),typeof o=="number"&&o>0?Cy(S,o,a):S))}function Iy(t,e){let{environment:n,release:r,dist:i,maxValueLength:s}=e;t.environment=t.environment||n||cr,!t.release&&r&&(t.release=r),!t.dist&&i&&(t.dist=i);let o=t.request;o?.url&&s&&(o.url=nr(o.url,s)),s&&t.exception?.values?.forEach(a=>{a.value&&(a.value=nr(a.value,s))})}function wy(t,e){let n=lm(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Ry(t){let e={};if(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)})}),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 Ay(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Cy(t,e,n){if(!t)return null;let r=p(p(p(p(p({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>p(p({},i),i.data&&{data:He(i.data,e,n)}))}),t.user&&{user:He(t.user,e,n)}),t.contexts&&{contexts:He(t.contexts,e,n)}),t.extra&&{extra:He(t.extra,e,n)});return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=He(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>p(p({},i),i.data&&{data:He(i.data,e,n)}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=He(t.contexts.flags,3,n)),r}function Ny(t,e){if(!e)return t;let n=t?t.clone():new Xe;return n.update(e),n}function dm(t){if(t)return My(t)?{captureContext:t}:xy(t)?{captureContext:t}:t}function My(t){return t instanceof Xe||typeof t=="function"}var ky=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function xy(t){return Object.keys(t).some(e=>ky.includes(e))}function fn(t,e){return B().captureException(t,dm(e))}function pi(t,e){return B().captureEvent(t,e)}function fr(t,e){Ae().setContext(t,e)}function ao(){return Ae().lastEventId()}function co(){let t=k();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}function uo(t){Ae().addEventProcessor(t)}function fi(t){let e=Ae(),n=B(),{userAgent:r}=U.navigator||{},i=Ef(p(p({user:n.getUser()||e.getUser()},r&&{userAgent:r}),t)),s=e.getSession();return s?.status==="ok"&&Gt(s,{status:"exited"}),lo(),e.setSession(i),i}function lo(){let t=Ae(),n=B().getSession()||t.getSession();n&&Tf(n),fm(),t.setSession()}function fm(){let t=Ae(),e=k(),n=t.getSession();n&&e&&e.captureSession(n)}function mi(t=!1){if(t){lo();return}fm()}var Oy="7";function mm(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Py(t){return`${mm(t)}${t.projectId}/envelope/`}function Dy(t,e){let n={sentry_version:Oy};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function Hc(t,e,n){return e||`${Py(t)}?${Dy(t,n)}`}function $c(t,e){let n=Ws(t);if(!n)return"";let r=`${mm(n)}embed/error-page/`,i=`dsn=${nt(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 zc=[];function Ly(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 Wc(t){let e=t.defaultIntegrations||[],n=t.integrations;e.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){let i=n(e);r=Array.isArray(i)?i:[i]}else r=e;return Ly(r)}function hm(t,e){let n={};return e.forEach(r=>{r&&Gc(t,r,n)}),n}function jc(t,e){for(let n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function Gc(t,e,n){if(n[e.name]){I&&_.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,!zc.includes(e.name)&&typeof e.setupOnce=="function"&&(e.setupOnce(),zc.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)}I&&_.log(`Integration installed: ${e.name}`)}function Fy(t){return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{items:t}]}function gm(t,e,n,r){let i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=nt(r)),$e(i,[Fy(t)])}function hi(t,e){let n=e??Uy(t)??[];if(n.length===0)return;let r=t.getOptions(),i=gm(n,r._metadata,r.tunnel,t.getDsn());_m().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(i)}function Uy(t){return _m().get(t)}function _m(){return Et("clientToLogBufferMap",()=>new WeakMap)}function By(t){return[{type:"trace_metric",item_count:t.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:t}]}function Sm(t,e,n,r){let i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=nt(r)),$e(i,[By(t)])}function gi(t,e){let n=e??Hy(t)??[];if(n.length===0)return;let r=t.getOptions(),i=Sm(n,r._metadata,r.tunnel,t.getDsn());ym().set(t,[]),t.emit("flushMetrics"),t.sendEnvelope(i)}function Hy(t){return ym().get(t)}function ym(){return Et("clientToMetricBufferMap",()=>new WeakMap)}var mr=Symbol.for("SentryBufferFullError");function Fn(t=100){let e=new Set;function n(){return e.size<t}function r(o){e.delete(o)}function i(o){if(!n())return Dn(mr);let a=o();return e.add(a),a.then(()=>r(a),()=>r(a)),a}function s(o){if(!e.size)return dn(!0);let a=Promise.allSettled(Array.from(e)).then(()=>!0);if(!o)return a;let c=[a,new Promise(u=>setTimeout(()=>u(!1),o))];return Promise.race(c)}return{get $(){return Array.from(e)},add:i,drain:s}}function Em(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 Tm(t,e){return t[e]||t.all||0}function _i(t,e,n=Date.now()){return Tm(t,e)>n}function Si(t,{statusCode:e,headers:n},r=Date.now()){let i=p({},t),s=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(s)for(let a of s.trim().split(",")){let[c,u,,,l]=a.split(":",5),d=parseInt(c,10),f=(isNaN(d)?60:d)*1e3;if(!u)i.all=r+f;else for(let m of u.split(";"))m==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(i[m]=r+f):i[m]=r+f}else o?i.all=r+Em(o,r):e===429&&(i.all=r+60*1e3);return i}var qc=64;function po(t,e,n=Fn(t.bufferSize||qc)){let r={},i=o=>n.drain(o);function s(o){let a=[];if(eo(o,(d,f)=>{let m=to(f);_i(r,m)?t.recordDroppedEvent("ratelimit_backoff",m):a.push(d)}),a.length===0)return Promise.resolve({});let c=$e(o[0],a),u=d=>{eo(c,(f,m)=>{t.recordDroppedEvent(d,to(m))})},l=()=>e({body:Oc(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&I&&_.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Si(r,d),d),d=>{throw u("network_error"),I&&_.error("Encountered error running transport request:",d),d});return n.add(l).then(d=>d,d=>{if(d===mr)return I&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:s,flush:i}}function bm(t,e,n){let r=[{type:"client_report"},{timestamp:n||tt(),discarded_events:t}];return $e(e?{dsn:e}:{},[r])}function fo(t){let e=[];t.message&&e.push(t.message);try{let n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function vm(t){let{trace_id:e,parent_span_id:n,span_id:r,status:i,origin:s,data:o,op:a}=t.contexts?.trace??{};return{data:o??{},description:t.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:i,timestamp:t.timestamp,trace_id:e??"",origin:s,profile_id:o?.[or],exclusive_time:o?.[lt],measurements:t.measurements,is_segment:!0}}function Im(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:p(p(p({},t.data),t.profile_id&&{[or]:t.profile_id}),t.exclusive_time&&{[lt]:t.exclusive_time})}},measurements:t.measurements}}var wm="Not capturing exception because it's already been captured.",Rm="Discarded session because of missing or non-string release",xm=Symbol.for("SentryInternalError"),Om=Symbol.for("SentryDoNotSendEventError"),$y=5e3;function mo(t){return{message:t,[xm]:!0}}function Vc(t){return{message:t,[Om]:!0}}function Am(t){return!!t&&typeof t=="object"&&xm in t}function Cm(t){return!!t&&typeof t=="object"&&Om in t}function Nm(t,e,n,r,i){let s=0,o,a=!1;t.on(n,()=>{s=0,clearTimeout(o),a=!1}),t.on(e,c=>{s+=r(c),s>=8e5?i(t):a||(a=!0,o=setTimeout(()=>{i(t)},$y))}),t.on("flush",()=>{i(t)})}var yi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Fn(e.transportOptions?.bufferSize??qc),e.dsn?this._dsn=Ws(e.dsn):I&&_.warn("No DSN provided, client will not send events."),this._dsn){let r=Hc(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(v(p({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:r}))}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Nm(this,"afterCaptureLog","flushLogs",Gy,hi),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Nm(this,"afterCaptureMetric","flushMetrics",jy,gi)}captureException(e,n,r){let i=ve();if(Bs(e))return I&&_.log(wm),i;let s=p({event_id:i},n);return this._process(()=>this.eventFromException(e,s).then(o=>this._captureEvent(o,s,r)).then(o=>o),"error"),s.event_id}captureMessage(e,n,r,i){let s=p({event_id:ve()},r),o=tr(e)?e:String(e),a=Tt(e),c=a?this.eventFromMessage(o,n,s):this.eventFromException(e,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,i)),a?"unknown":"error"),s.event_id}captureEvent(e,n,r){let i=ve();if(n?.originalException&&Bs(n.originalException))return I&&_.log(wm),i;let s=p({event_id:i},n),o=e.sdkProcessingMetadata||{},a=o.capturedSpanScope,c=o.capturedSpanIsolationScope,u=Mm(e.type);return this._process(()=>this._captureEvent(e,s,a||r,c),u),s.event_id}captureSession(e){this.sendSession(e),Gt(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){return q(this,null,function*(){let n=this._transport;if(!n)return!0;this.emit("flush");let r=yield this._isClientDoneProcessing(e),i=yield n.flush(e);return r&&i})}close(e){return q(this,null,function*(){let n=yield this.flush(e);return 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];Gc(this,e,this._integrations),n||jc(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=jf(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of n.attachments||[])r=xc(r,Dc(i));this.sendEnvelope(r).then(i=>this.emit("afterSendEvent",e,i))}sendSession(e){let{release:n,environment:r=cr}=this._options;if("aggregates"in e){let s=e.attrs||{};if(!s.release&&!n){I&&_.warn(Rm);return}s.release=s.release||n,s.environment=s.environment||r,e.attrs=s}else{if(!e.release&&!n){I&&_.warn(Rm);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);let i=Wf(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){let i=`${e}:${n}`;I&&_.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,n){let r=this._hooks[e]=this._hooks[e]||new Set,i=(...s)=>n(...s);return r.add(i),()=>{r.delete(i)}}emit(e,...n){let r=this._hooks[e];r&&r.forEach(i=>i(...n))}sendEnvelope(e){return q(this,null,function*(){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return yield this._transport.send(e)}catch(n){return I&&_.error("Error while sending envelope:",n),{}}return I&&_.error("Transport disabled"),{}})}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=hm(this,e),jc(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",i=!1,s=n.exception?.values;if(s){i=!0,r=!1;for(let c of s)if(c.mechanism?.handled===!1){r=!0;break}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(Gt(e,v(p({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return q(this,null,function*(){let n=0;for(;!e||n<e;){if(yield new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,i){let s=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o?.length&&(n.integrations=o),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),di(s,e,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts=p({trace:bc(r)},a.contexts);let c=ci(this,r);return a.sdkProcessingMetadata=p({dynamicSamplingContext:c},a.sdkProcessingMetadata),a})}_captureEvent(e,n={},r=B(),i=Ae()){return I&&Kc(e)&&_.log(`Captured error event \`${fo(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,i).then(s=>s.event_id,s=>{I&&(Cm(s)?_.log(s.message):Am(s)?_.warn(s.message):_.warn(s))})}_processEvent(e,n,r,i){let s=this.getOptions(),{sampleRate:o}=s,a=Pm(e),c=Kc(e),l=`before send for type \`${e.type||"error"}\``,d=typeof o>"u"?void 0:rt(o);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),Dn(Vc(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));let f=Mm(e.type);return this._prepareEvent(e,n,r,i).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",f),Vc("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return m;let g=Wy(this,s,m,n);return zy(g,l)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",f),a){let b=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw Vc(`${l} returned \`null\`, will not send event.`)}let h=r.getSession()||i.getSession();if(c&&h&&this._updateSessionFromEvent(h,m),a){let S=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,b=m.spans?m.spans.length:0,N=S-b;N>0&&this.recordDroppedEvent("before_send","span",N)}let g=m.transaction_info;if(a&&g&&m.transaction!==e.transaction){let S="custom";m.transaction_info=v(p({},g),{source:S})}return this.sendEvent(m,n),m}).then(null,m=>{throw Cm(m)||Am(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),mo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${m}`))})}_process(e,n){this._numProcessing++,this._promiseBuffer.add(e).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===mr&&this.recordDroppedEvent("queue_overflow",n),r))}_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(){I&&_.log("Flushing outcomes...");let e=this._clearOutcomes();if(e.length===0){I&&_.log("No outcomes to send");return}if(!this._dsn){I&&_.log("No dsn provided, will not send outcomes");return}I&&_.log("Sending outcomes:",e);let n=bm(e,this._options.tunnel&&nt(this._dsn));this.sendEnvelope(n)}};function Mm(t){return t==="replay_event"?"replay":t||"error"}function zy(t,e){let n=`${e} must return \`null\` or a valid event.`;if(ut(t))return t.then(r=>{if(!jt(r)&&r!==null)throw mo(n);return r},r=>{throw mo(`${e} rejected with ${r}`)});if(!jt(t)&&t!==null)throw mo(n);return t}function Wy(t,e,n,r){let{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o,ignoreSpans:a}=e,c=n;if(Kc(c)&&i)return i(c,r);if(Pm(c)){if(o||a){let u=vm(c);if(a?.length&&Pn(u,a))return null;if(o){let l=o(u);l?c=rn(n,Im(l)):ai()}if(c.spans){let l=[],d=c.spans;for(let m of d){if(a?.length&&Pn(m,a)){$f(d,m);continue}if(o){let h=o(m);h?l.push(h):(ai(),l.push(m))}else l.push(m)}let f=c.spans.length-l.length;f&&t.recordDroppedEvent("before_send","span",f),c.spans=l}}if(s){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata=v(p({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:u})}return s(c,r)}}return c}function Kc(t){return t.type===void 0}function Pm(t){return t.type==="transaction"}function jy(t){let e=0;return t.name&&(e+=t.name.length*2),e+=8,e+Dm(t.attributes)}function Gy(t){let e=0;return t.message&&(e+=t.message.length*2),e+Dm(t.attributes)}function Dm(t){if(!t)return 0;let e=0;return Object.values(t).forEach(n=>{Array.isArray(n)?e+=n.length*km(n[0]):Tt(n)?e+=km(n):e+=100}),e}function km(t){return typeof t=="string"?t.length*2:typeof t=="number"?8:typeof t=="boolean"?4:0}function Yc(t,e){e.debug===!0&&(I?_.enable():Pe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),B().update(e.initialScope);let r=new t(e);return Xc(r),r.init(),r}function Xc(t){B().setClient(t)}var qy="thismessage:/";function hr(t){return"isRelative"in t}function Un(t,e){let n=t.indexOf("://")<=0&&t.indexOf("//")!==0,r=e??(n?qy:void 0);try{if("canParse"in URL&&!URL.canParse(t,r))return;let i=new URL(t,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function Jc(t){if(hr(t))return t.pathname;let e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}function vt(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 Ei(t){return t.split(/[?#]/,1)[0]}function Qc(t,e){let n=e?.getDsn(),r=e?.getOptions().tunnel;return Ky(t,n)||Vy(t,r)}function Vy(t,e){return e?Lm(t)===Lm(e):!1}function Ky(t,e){let n=Un(t);return!n||hr(n)?!1:e?n.host.includes(e.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function Lm(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function Zc(t){"aggregates"in t?t.attrs?.ip_address===void 0&&(t.attrs=v(p({},t.attrs),{ip_address:"{{auto}}"})):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function Ti(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:Ot})),version:Ot}),t._metadata=i}function gr(t={}){let e=t.client||k();if(!co()||!e)return{};let n=Qe(),r=Lt(n);if(r.getTraceData)return r.getTraceData(t);let i=t.scope||B(),s=t.span||ue(),o=s?Ks(s):Yy(i),a=s?Me(s):ci(e,i),c=wc(a);if(!js.test(o))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let l={"sentry-trace":o,baggage:c};if(t.propagateTraceparent){let d=s?Ff(s):Xy(i);d&&(l.traceparent=d)}return l}function Yy(t){let{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return oi(e,r,n)}function Xy(t){let{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return Gs(e,r,n)}function eu(t,e,n){let r,i,s,o=n?.maxWait?Math.max(n.maxWait,e):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=t(),r}function u(){i!==void 0&&clearTimeout(i),s!==void 0&&clearTimeout(s),i=s=void 0}function l(){return i!==void 0||s!==void 0?c():r}function d(){return i&&clearTimeout(i),i=a(c,e),o&&s===void 0&&(s=a(c,o)),r}return d.cancel=u,d.flush=l,d}var Jy=100;function dt(t,e){let n=k(),r=Ae();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Jy}=n.getOptions();if(s<=0)return;let o=tt(),a=p({timestamp:o},t),c=i?Pe(()=>i(a,e)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,s))}var Fm,Qy="FunctionToString",Um=new WeakMap,Zy=()=>({name:Qy,setupOnce(){Fm=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=Mn(this),n=Um.has(k())&&e!==void 0?e:this;return Fm.apply(n,t)}}catch{}},setup(t){Um.set(t,!0)}}),_r=Zy;var eE=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],tE="EventFilters",tu=(t={})=>{let e;return{name:tE,setup(n){let r=n.getOptions();e=Bm(t,r)},processEvent(n,r,i){if(!e){let s=i.getOptions();e=Bm(t,s)}return nE(n,e)?null:n}}},Sr=(t={})=>v(p({},tu(t)),{name:"InboundFilters"});function Bm(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:eE],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function nE(t,e){if(t.type){if(t.type==="transaction"&&iE(t,e.ignoreTransactions))return I&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${Pt(t)}`),!0}else{if(rE(t,e.ignoreErrors))return I&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${Pt(t)}`),!0;if(cE(t))return I&&_.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${Pt(t)}`),!0;if(sE(t,e.denyUrls))return I&&_.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${Pt(t)}.
Url: ${ho(t)}`),!0;if(!oE(t,e.allowUrls))return I&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${Pt(t)}.
Url: ${ho(t)}`),!0}return!1}function rE(t,e){return e?.length?fo(t).some(n=>Ye(n,e)):!1}function iE(t,e){if(!e?.length)return!1;let n=t.transaction;return n?Ye(n,e):!1}function sE(t,e){if(!e?.length)return!1;let n=ho(t);return n?Ye(n,e):!1}function oE(t,e){if(!e?.length)return!0;let n=ho(t);return n?Ye(n,e):!0}function aE(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 ho(t){try{let n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?aE(n):null}catch{return I&&_.error(`Cannot extract url for event ${Pt(t)}`),null}}function cE(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function ru(t,e,n,r,i,s){if(!i.exception?.values||!s||!Ze(s.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=nu(t,e,r,s.originalException,n,i.exception.values,o,0))}function nu(t,e,n,r,i,s,o,a){if(s.length>=n+1)return s;let c=[...s];if(Ze(r[i],Error)){Hm(o,a);let u=t(e,r[i]),l=c.length;$m(u,i,l,a),c=nu(t,e,n,r[i],i,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(Ze(u,Error)){Hm(o,a);let d=t(e,u),f=c.length;$m(d,`errors[${l}]`,f,a),c=nu(t,e,n,u,i,[d,...c],d,f)}}),c}function Hm(t,e){t.mechanism=v(p(p({handled:!0,type:"auto.core.linked_errors"},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function $m(t,e,n,r){t.mechanism=v(p({handled:!0},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function iu(t){let e="console";De(e,t),Le(e,uE)}function uE(){"console"in U&&sc.forEach(function(t){t in U.console&&be(U.console,t,function(e){return Zn[t]=e,function(...n){Ie("console",{args:n,level:t}),Zn[t]?.apply(U.console,n)}})})}function bi(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var lE="Dedupe",dE=()=>{let t;return{name:lE,processEvent(e){if(e.type)return e;try{if(pE(e,t))return I&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},yr=dE;function pE(t,e){return e?!!(fE(t,e)||mE(t,e)):!1}function fE(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!jm(t,e)||!Wm(t,e))}function mE(t,e){let n=zm(e),r=zm(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!jm(t,e)||!Wm(t,e))}function Wm(t,e){let n=ks(t),r=ks(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 jm(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 zm(t){return t.exception?.values?.[0]}function su(t,e,n,r,i){if(!t.fetchData)return;let{method:s,url:o}=t.fetchData,a=Ne()&&e(o);if(t.endTimestamp&&a){let m=t.fetchData.__span;if(!m)return;let h=r[m];h&&(_E(h,t),hE(h,t,i),delete r[m]);return}let{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof i=="object"?i:{spanOrigin:i},l=!!ue(),d=a&&l?ze(yE(o,s,c)):new Be;if(t.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(t.fetchData.url)){let m=t.args[0],h=t.args[1]||{},g=gE(m,h,Ne()&&l?d:void 0,u);g&&(t.args[1]=h,h.headers=g)}let f=k();if(f){let m={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};f.emit("beforeOutgoingRequestSpan",d,m)}return d}function hE(t,e,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(t,{headers:e.response?.headers,error:e.error})}function gE(t,e,n,r){let i=gr({span:n,propagateTraceparent:r}),s=i["sentry-trace"],o=i.baggage,a=i.traceparent;if(!s)return;let c=e.headers||(ni(t)?t.headers:void 0);if(c)if(SE(c)){let u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",s),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),o){let l=u.get("baggage");l?go(l)||u.set("baggage",`${l},${o}`):u.set("baggage",o)}return u}else if(Array.isArray(c)){let u=[...c];c.find(d=>d[0]==="sentry-trace")||u.push(["sentry-trace",s]),r&&a&&!c.find(d=>d[0]==="traceparent")&&u.push(["traceparent",a]);let l=c.find(d=>d[0]==="baggage"&&go(d[1]));return o&&!l&&u.push(["baggage",o]),u}else{let u="sentry-trace"in c?c["sentry-trace"]:void 0,l="traceparent"in c?c.traceparent:void 0,d="baggage"in c?c.baggage:void 0,f=d?Array.isArray(d)?[...d]:[d]:[],m=d&&(Array.isArray(d)?d.find(g=>go(g)):go(d));o&&!m&&f.push(o);let h=v(p({},c),{"sentry-trace":u??s,baggage:f.length>0?f.join(","):void 0});return r&&a&&!l&&(h.traceparent=a),h}else return p({},i)}function _E(t,e){if(e.response){ar(t,e.response.status);let n=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 go(t){return t.split(",").some(e=>e.trim().startsWith($s))}function SE(t){return typeof Headers<"u"&&Ze(t,Headers)}function yE(t,e,n){let r=Un(t);return{name:r?`${e} ${Jc(r)}`:e,attributes:EE(t,r,e,n)}}function EE(t,e,n,r){let i={url:t,type:"fetch","http.method":n,[te]:r,[Ce]:"http.client"};return e&&(hr(e)||(i["http.url"]=e.href,i["server.address"]=e.host),e.search&&(i["http.query"]=e.search),e.hash&&(i["http.fragment"]=e.hash)),i}function _o(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var vi=U;function ou(){return"history"in vi&&!!vi.history}function TE(){if(!("fetch"in vi))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Ii(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function au(){if(typeof EdgeRuntime=="string")return!0;if(!TE())return!1;if(Ii(vi.fetch))return!0;let t=!1,e=vi.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=Ii(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){I&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function wi(t,e){let n="fetch";De(n,t),Le(n,()=>qm(void 0,e))}function cu(t){let e="fetch-body-resolved";De(e,t),Le(e,()=>qm(vE))}function qm(t,e=!1){e&&!au()||be(U,"fetch",function(n){return function(...r){let i=new Error,{method:s,url:o}=IE(r),a={args:r,fetchData:{method:s,url:o},startTimestamp:le()*1e3,virtualError:i,headers:wE(r)};return t||Ie("fetch",p({},a)),n.apply(U,r).then(c=>q(null,null,function*(){return t?t(c):Ie("fetch",v(p({},a),{endTimestamp:le()*1e3,response:c})),c}),c=>{if(Ie("fetch",v(p({},a),{endTimestamp:le()*1e3,error:c})),Cn(c)&&c.stack===void 0&&(c.stack=i.stack,_e(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{let u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}function bE(t,e){return q(this,null,function*(){if(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 vE(t){let e;try{e=t.clone()}catch{return}bE(e,()=>{Ie("fetch-body-resolved",{endTimestamp:le()*1e3,response:t})})}function So(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Gm(t){return typeof t=="string"?t:t?So(t,"url")?t.url:t.toString?t.toString():"":""}function IE(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:Gm(n),method:So(r,"method")?String(r.method).toUpperCase():ni(n)&&So(n,"method")?String(n.method).toUpperCase():"GET"}}let e=t[0];return{url:Gm(e),method:So(e,"method")?String(e.method).toUpperCase():"GET"}}function wE(t){let[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(ni(e))return new Headers(e.headers)}catch{}}function uu(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function lu(){return"npm"}function Vm(){return!uu()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Er(){return typeof window<"u"&&(!Vm()||RE())}function RE(){return U.process?.type==="renderer"}var H=U,du=0;function pu(){return du>0}function WE(){du++,setTimeout(()=>{du--})}function Bn(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(Mn(t))return t}catch{return t}let r=function(...i){try{let s=i.map(o=>Bn(o,e));return t.apply(this,s)}catch(s){throw WE(),sn(o=>{o.addEventProcessor(a=>(e.mechanism&&(ir(a,void 0,void 0),Dt(a,e.mechanism)),a.extra=v(p({},a.extra),{arguments:i}),a)),fn(s)}),s}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}Ls(r,t),_e(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Ai(){let t=et(),{referrer:e}=H.document||{},{userAgent:n}=H.navigator||{},r=p(p({},e&&{Referer:e}),n&&{"User-Agent":n});return{url:t,headers:r}}function yo(t,e){let n=hu(t,e),r={type:KE(e),value:YE(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function jE(t,e,n,r){let s=k()?.getOptions().normalizeDepth,o=QE(e),a={__serialized__:Zs(e,s)};if(o)return{exception:{values:[yo(t,o)]},extra:a};let c={exception:{values:[{type:Nn(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:XE(e,{isUnhandledRejection:r})}]},extra:a};if(n){let u=hu(t,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function fu(t,e){return{exception:{values:[yo(t,e)]}}}function hu(t,e){let n=e.stacktrace||e.stack||"",r=qE(e),i=VE(e);try{return t(n,r,i)}catch{}return[]}var GE=/Minified React error #\d+;/i;function qE(t){return t&&GE.test(t.message)?1:0}function VE(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Km(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function KE(t){let e=t?.name;return!e&&Km(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function YE(t){let e=t?.message;return Km(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Ym(t,e,n,r){let i=n?.syntheticException||void 0,s=Eo(t,e,i,r);return Dt(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),dn(s)}function Xm(t,e,n="info",r,i){let s=r?.syntheticException||void 0,o=mu(t,e,s,i);return o.level=n,r?.event_id&&(o.event_id=r.event_id),dn(o)}function Eo(t,e,n,r,i){let s;if(Ps(e)&&e.error)return fu(t,e.error);if(Ds(e)||pc(e)){let o=e;if("stack"in e)s=fu(t,e);else{let a=o.name||(Ds(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;s=mu(t,c,n,r),ir(s,c)}return"code"in o&&(s.tags=v(p({},s.tags),{"DOMException.code":`${o.code}`})),s}return Cn(e)?fu(t,e):jt(e)||Nn(e)?(s=jE(t,e,n,i),Dt(s,{synthetic:!0}),s):(s=mu(t,e,n,r),ir(s,`${e}`,void 0),Dt(s,{synthetic:!0}),s)}function mu(t,e,n,r){let i={};if(r&&n){let s=hu(t,n);s.length&&(i.exception={values:[{value:e,stacktrace:{frames:s}}]}),Dt(i,{synthetic:!0})}if(tr(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 XE(t,{isUnhandledRejection:e}){let n=_c(t),r=e?"promise rejection":"exception";return Ps(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Nn(t)?`Event \`${JE(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function JE(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function QE(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}var To=class extends yi{constructor(e){let n=ZE(e),r=H.SENTRY_SDK_SOURCE||lu();Ti(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings=p({infer_ip:n.sendDefaultPii?"auto":"never"},n._metadata.sdk.settings)),super(n);let{sendDefaultPii:i,sendClientReports:s,enableLogs:o,_experiments:a,enableMetrics:c}=this._options,u=c??a?.enableMetrics??!0;H.document&&(s||o||u)&&H.document.addEventListener("visibilitychange",()=>{H.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),o&&hi(this),u&&gi(this))}),i&&this.on("beforeSendSession",Zc)}eventFromException(e,n){return Ym(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Xm(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,i)}};function ZE(t){return p({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:H.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var pt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var x=U;var eT=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",Bt=(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=eT(e.value,n),t(e)))}};var Vt=(t=!0)=>{let e=x.performance?.getEntriesByType?.("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e};var ft=()=>Vt()?.activationStart??0;function It(t,e,n){x.document&&x.addEventListener(t,e,n)}function Tr(t,e,n){x.document&&x.removeEventListener(t,e,n)}var br=-1,Jm=new Set,tT=()=>x.document?.visibilityState==="hidden"&&!x.document?.prerendering?0:1/0,bo=t=>{if(nT(t)&&br>-1){if(t.type==="visibilitychange"||t.type==="pagehide")for(let e of Jm)e();isFinite(br)||(br=t.type==="visibilitychange"?t.timeStamp:0,Tr("prerenderingchange",bo,!0))}},Ht=()=>{if(x.document&&br<0){let t=ft();br=(x.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>t)[0]?.startTime)??tT(),It("visibilitychange",bo,!0),It("pagehide",bo,!0),It("prerenderingchange",bo,!0)}return{get firstHiddenTime(){return br},onHidden(t){Jm.add(t)}}};function nT(t){return t.type==="pagehide"||x.document?.visibilityState==="hidden"}var Qm=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var $t=(t,e=-1)=>{let n=Vt(),r="navigate";return n&&(x.document?.prerendering||ft()>0?r="prerender":x.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:Qm(),navigationType:r}};var gu=new WeakMap;function vr(t,e){return gu.get(t)||gu.set(t,new e),gu.get(t)}var vo=class t{constructor(){t.prototype.__init.call(this),t.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}};var mt=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{e(i.getEntries())})});return r.observe(p({type:t,buffered:!0},n)),r}}catch{}};var Ir=t=>{let e=!1;return()=>{e||(t(),e=!0)}};var hn=t=>{x.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()};var rT=[1800,3e3],Zm=(t,e={})=>{hn(()=>{let n=Ht(),r=$t("FCP"),i,o=mt("paint",a=>{for(let c of a)c.name==="first-contentful-paint"&&(o.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-ft(),0),r.entries.push(c),i(!0)))});o&&(i=Bt(t,r,rT,e.reportAllChanges))})};var iT=[.1,.25],eh=(t,e={})=>{Zm(Ir(()=>{let n=$t("CLS",0),r,i=Ht(),s=vr(e,vo),o=c=>{for(let u of c)s._processEntry(u);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=mt("layout-shift",o);a&&(r=Bt(t,n,iT,e.reportAllChanges),i.onHidden(()=>{o(a.takeRecords()),r(!0)}),x?.setTimeout?.(r))}))};var th=0,_u=1/0,Io=0,sT=t=>{t.forEach(e=>{e.interactionId&&(_u=Math.min(_u,e.interactionId),Io=Math.max(Io,e.interactionId),th=Io?(Io-_u)/7+1:0)})},Su,yu=()=>Su?th:performance.interactionCount||0,nh=()=>{"interactionCount"in performance||Su||(Su=mt("event",sT,{type:"event",buffered:!0,durationThreshold:0}))};var Eu=10,rh=0,oT=()=>yu()-rh,wo=class t{constructor(){t.prototype.__init.call(this),t.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){rh=yu(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(oT()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType==="first-input"))return;let n=this._longestInteractionList.at(-1),r=this._longestInteractionMap.get(e.interactionId);if(r||this._longestInteractionList.length<Eu||e.duration>n._latency){if(r?e.duration>r._latency?(r.entries=[e],r._latency=e.duration):e.duration===r._latency&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,s)=>s._latency-i._latency),this._longestInteractionList.length>Eu){let i=this._longestInteractionList.splice(Eu);for(let s of i)this._longestInteractionMap.delete(s.id)}this._onAfterProcessingINPCandidate?.(r)}}};var Ro=t=>{let e=n=>{(n.type==="pagehide"||x.document?.visibilityState==="hidden")&&t(n)};It("visibilitychange",e,!0),It("pagehide",e,!0)};var Ao=t=>{let e=x.requestIdleCallback||x.setTimeout;x.document?.visibilityState==="hidden"?t():(t=Ir(t),It("visibilitychange",t,{once:!0,capture:!0}),e(()=>{t(),Tr("visibilitychange",t,{capture:!0})}),Ro(t))};var aT=[200,500],cT=40,ih=(t,e={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let n=Ht();hn(()=>{nh();let r=$t("INP"),i,s=vr(e,wo),o=c=>{Ao(()=>{for(let l of c)s._processEntry(l);let u=s._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,i())})},a=mt("event",o,{durationThreshold:e.durationThreshold??cT});i=Bt(t,r,aT,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(a.takeRecords()),i(!0)}))})};var Co=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}};var uT=[2500,4e3],sh=(t,e={})=>{hn(()=>{let n=Ht(),r=$t("LCP"),i,s=vr(e,Co),o=c=>{e.reportAllChanges||(c=c.slice(-1));for(let u of c)s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-ft(),0),r.entries=[u],i())},a=mt("largest-contentful-paint",o);if(a){i=Bt(t,r,uT,e.reportAllChanges);let c=Ir(()=>{o(a.takeRecords()),a.disconnect(),i(!0)}),u=l=>{l.isTrusted&&(Ao(c),Tr(l.type,u,{capture:!0}))};for(let l of["keydown","click","visibilitychange"])It(l,u,{capture:!0})}})};var lT=[800,1800],Tu=t=>{x.document?.prerendering?hn(()=>Tu(t)):x.document?.readyState!=="complete"?addEventListener("load",()=>Tu(t),!0):setTimeout(t)},oh=(t,e={})=>{let n=$t("TTFB"),r=Bt(t,n,lT,e.reportAllChanges);Tu(()=>{let i=Vt();i&&(n.value=Math.max(i.responseStart-ft(),0),n.entries=[i],r(!0))})};var Ci={},No={},ah,ch,uh,lh;function Hn(t,e=!1){return Mo("cls",t,dT,ah,e)}function $n(t,e=!1){return Mo("lcp",t,pT,ch,e)}function bu(t){return Mo("ttfb",t,fT,uh)}function Ni(t){return Mo("inp",t,mT,lh)}function st(t,e){return dh(t,e),No[t]||(hT(t),No[t]=!0),ph(t,e)}function Mi(t,e){let n=Ci[t];if(n?.length)for(let r of n)try{r(e)}catch(i){pt&&_.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${Ke(r)}
Error:`,i)}}function dT(){return eh(t=>{Mi("cls",{metric:t}),ah=t},{reportAllChanges:!0})}function pT(){return sh(t=>{Mi("lcp",{metric:t}),ch=t},{reportAllChanges:!0})}function fT(){return oh(t=>{Mi("ttfb",{metric:t}),uh=t})}function mT(){return ih(t=>{Mi("inp",{metric:t}),lh=t})}function Mo(t,e,n,r,i=!1){dh(t,e);let s;return No[t]||(s=n(),No[t]=!0),r&&e({metric:r}),ph(t,e,i?s:void 0)}function hT(t){let e={};t==="event"&&(e.durationThreshold=0),mt(t,n=>{Mi(t,{entries:n})},e)}function dh(t,e){Ci[t]=Ci[t]||[],Ci[t].push(e)}function ph(t,e,n){return()=>{n&&n();let r=Ci[t];if(!r)return;let i=r.indexOf(e);i!==-1&&r.splice(i,1)}}function fh(t){return"duration"in t}function ko(t){return typeof t=="number"&&isFinite(t)}function Kt(t,e,n,i){var r=Gn(i,[]);let s=L(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),dr(t,()=>{let o=ze(p({startTime:e},r));return o&&o.end(n),o})}function wr(t){let e=k();if(!e)return;let{name:n,transaction:r,attributes:i,startTime:s}=t,{release:o,environment:a,sendDefaultPii:c}=e.getOptions(),l=e.getIntegrationByName("Replay")?.getReplayId(),d=B(),f=d.getUser(),m=f!==void 0?f.email||f.id||f.ip_address:void 0,h;try{h=d.getScopeData().contexts.profile.profile_id}catch{}let g=p({release:o,environment:a,user:m||void 0,profile_id:h||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":x.navigator?.userAgent,"client.address":c?"{{auto}}":void 0},i);return ze({name:n,attributes:g,startTime:s,experimental:{standalone:!0}})}function Yt(){return x.addEventListener&&x.performance}function de(t){return t/1e3}function mh(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 xo(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function Oo(t,e){let n,r=!1;function i(a){!r&&n&&e(a,n),r=!0}Ro(()=>{i("pagehide")});let s=t.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(i("navigation"),s(),o())}),o=t.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,o()})}function hh(t){let e=0,n;if(!xo("layout-shift"))return;let r=Hn(({metric:i})=>{let s=i.entries[i.entries.length-1];s&&(e=i.value,n=s)},!0);Oo(t,(i,s)=>{gT(e,n,s,i),r()})}function gT(t,e,n,r){pt&&_.log(`Sending CLS span (${t})`);let i=e?de((Se()||0)+e.startTime):le(),s=B().getScopeData().transactionName,o=e?ye(e.sources[0]?.node):"Layout shift",a={[te]:"auto.http.browser.cls",[Ce]:"ui.webvital.cls",[lt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e?.sources&&e.sources.forEach((u,l)=>{a[`cls.source.${l+1}`]=ye(u.node)});let c=wr({name:o,transaction:s,attributes:a,startTime:i});c&&(c.addEvent("cls",{[Ft]:"",[Ut]:t}),c.end(i))}function gh(t){let e=0,n;if(!xo("largest-contentful-paint"))return;let r=$n(({metric:i})=>{let s=i.entries[i.entries.length-1];s&&(e=i.value,n=s)},!0);Oo(t,(i,s)=>{_T(e,n,s,i),r()})}function _T(t,e,n,r){pt&&_.log(`Sending LCP span (${t})`);let i=de((Se()||0)+(e?.startTime||0)),s=B().getScopeData().transactionName,o=e?ye(e.element):"Largest contentful paint",a={[te]:"auto.http.browser.lcp",[Ce]:"ui.webvital.lcp",[lt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e&&(e.element&&(a["lcp.element"]=ye(e.element)),e.id&&(a["lcp.id"]=e.id),e.url&&(a["lcp.url"]=e.url),e.loadTime!=null&&(a["lcp.loadTime"]=e.loadTime),e.renderTime!=null&&(a["lcp.renderTime"]=e.renderTime),e.size!=null&&(a["lcp.size"]=e.size));let c=wr({name:o,transaction:s,attributes:a,startTime:i});c&&(c.addEvent("lcp",{[Ft]:"millisecond",[Ut]:t}),c.end(i))}function ht(t){return t&&((Se()||performance.timeOrigin)+t)/1e3}function ki(t){let e={};if(t.nextHopProtocol!=null){let{name:n,version:r}=mh(t.nextHopProtocol);e["network.protocol.version"]=r,e["network.protocol.name"]=n}return Se()||Yt()?.timeOrigin?ST(v(p({},e),{"http.request.redirect_start":ht(t.redirectStart),"http.request.redirect_end":ht(t.redirectEnd),"http.request.worker_start":ht(t.workerStart),"http.request.fetch_start":ht(t.fetchStart),"http.request.domain_lookup_start":ht(t.domainLookupStart),"http.request.domain_lookup_end":ht(t.domainLookupEnd),"http.request.connect_start":ht(t.connectStart),"http.request.secure_connection_start":ht(t.secureConnectionStart),"http.request.connection_end":ht(t.connectEnd),"http.request.request_start":ht(t.requestStart),"http.request.response_start":ht(t.responseStart),"http.request.response_end":ht(t.responseEnd),"http.request.time_to_first_byte":t.responseStart!=null?t.responseStart/1e3:void 0})):e}function ST(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!=null))}var yT=2147483647,_h=0,wt={},Je,Do;function vu({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){let r=Yt();if(r&&Se()){r.mark&&x.performance.mark("sentry-tracing-init");let i=e?gh(n):TT(),s=bT(),o=t?hh(n):ET();return()=>{i?.(),s(),o?.()}}return()=>{}}function Iu(){st("longtask",({entries:t})=>{let e=ue();if(!e)return;let{op:n,start_timestamp:r}=L(e);for(let i of t){let s=de(Se()+i.startTime),o=de(i.duration);n==="navigation"&&r&&s<r||Kt(e,s,s+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[te]:"auto.ui.browser.metrics"}})}})}function wu(){new PerformanceObserver(e=>{let n=ue();if(n)for(let r of e.getEntries()){if(!r.scripts[0])continue;let i=de(Se()+r.startTime),{start_timestamp:s,op:o}=L(n);if(o==="navigation"&&s&&i<s)continue;let a=de(r.duration),c={[te]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:l,invokerType:d,sourceURL:f,sourceFunctionName:m,sourceCharPosition:h}=u;c["browser.script.invoker"]=l,c["browser.script.invoker_type"]=d,f&&(c["code.filepath"]=f),m&&(c["code.function"]=m),h!==-1&&(c["browser.script.source_char_position"]=h),Kt(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Ru(){st("event",({entries:t})=>{let e=ue();if(e){for(let n of t)if(n.name==="click"){let r=de(Se()+n.startTime),i=de(n.duration),s={name:ye(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[te]:"auto.ui.browser.metrics"}},o=ri(n.target);o&&(s.attributes["ui.component_name"]=o),Kt(e,r,r+i,s)}}})}function ET(){return Hn(({metric:t})=>{let e=t.entries[t.entries.length-1];e&&(wt.cls={value:t.value,unit:""},Do=e)},!0)}function TT(){return $n(({metric:t})=>{let e=t.entries[t.entries.length-1];e&&(wt.lcp={value:t.value,unit:"millisecond"},Je=e)},!0)}function bT(){return bu(({metric:t})=>{t.entries[t.entries.length-1]&&(wt.ttfb={value:t.value,unit:"millisecond"})})}function Au(t,e){let n=Yt(),r=Se();if(!n?.getEntries||!r)return;let i=de(r),s=n.getEntries(),{op:o,start_timestamp:a}=L(t);s.slice(_h).forEach(c=>{let u=de(c.startTime),l=de(Math.max(0,c.duration));if(!(o==="navigation"&&a&&i+u<a))switch(c.entryType){case"navigation":{RT(t,c,i);break}case"mark":case"paint":case"measure":{IT(t,c,u,l,i,e.ignorePerformanceApiSpans);let d=Ht(),f=c.startTime<d.firstHiddenTime;c.name==="first-paint"&&f&&(wt.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&f&&(wt.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{NT(t,c,c.name,u,l,i,e.ignoreResourceSpans);break}}}),_h=Math.max(s.length-1,0),MT(t),o==="pageload"&&(OT(wt),e.recordClsOnPageloadSpan||delete wt.cls,e.recordLcpOnPageloadSpan||delete wt.lcp,Object.entries(wt).forEach(([c,u])=>{no(c,u.value,u.unit)}),t.setAttribute("performance.timeOrigin",i),t.setAttribute("performance.activationStart",ft()),kT(t,e)),Je=void 0,Do=void 0,wt={}}function vT(t){if(t?.entryType==="measure")try{return t.detail.devtools.track==="Components \u269B"}catch{return}}function IT(t,e,n,r,i,s){if(vT(e)||["mark","measure"].includes(e.entryType)&&Ye(e.name,s))return;let o=Vt(!1),a=de(o?o.requestStart:0),c=i+Math.max(n,a),u=i+n,l=u+r,d={[te]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),wT(d,e),c<=l&&Kt(t,c,l,{name:e.name,op:e.entryType,attributes:d})}function wT(t,e){try{let n=e.detail;if(!n)return;if(typeof n=="object"){for(let[r,i]of Object.entries(n))if(i&&Tt(i))t[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{t[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(Tt(n)){t["sentry.browser.measure.detail"]=n;return}try{t["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function RT(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Po(t,e,r,n)}),Po(t,e,"secureConnection",n,"TLS/SSL"),Po(t,e,"fetch",n,"cache"),Po(t,e,"domainLookup",n,"DNS"),CT(t,e,n)}function Po(t,e,n,r,i=n){let s=AT(n),o=e[s],a=e[`${n}Start`];!a||!o||Kt(t,r+de(a),r+de(o),{op:`browser.${i}`,name:e.name,attributes:p({[te]:"auto.ui.browser.metrics"},n==="redirect"&&e.redirectCount!=null?{"http.redirect_count":e.redirectCount}:{})})}function AT(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function CT(t,e,n){let r=n+de(e.requestStart),i=n+de(e.responseEnd),s=n+de(e.responseStart);e.responseEnd&&(Kt(t,r,i,{op:"browser.request",name:e.name,attributes:{[te]:"auto.ui.browser.metrics"}}),Kt(t,s,i,{op:"browser.response",name:e.name,attributes:{[te]:"auto.ui.browser.metrics"}}))}function NT(t,e,n,r,i,s,o){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;let a=e.initiatorType?`resource.${e.initiatorType}`:"resource.other";if(o?.includes(a))return;let c={[te]:"auto.resource.browser.metrics"},u=vt(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(x.location.origin),xT(e,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);let l=p(p({},c),ki(e)),d=s+r,f=d+i;Kt(t,d,f,{name:n.replace(x.location.origin,""),op:a,attributes:l})}function MT(t){let e=x.navigator;if(!e)return;let n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),ko(n.rtt)&&(wt["connection.rtt"]={value:n.rtt,unit:"millisecond"})),ko(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`),ko(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}function kT(t,e){Je&&e.recordLcpOnPageloadSpan&&(Je.element&&t.setAttribute("lcp.element",ye(Je.element)),Je.id&&t.setAttribute("lcp.id",Je.id),Je.url&&t.setAttribute("lcp.url",Je.url.trim().slice(0,200)),Je.loadTime!=null&&t.setAttribute("lcp.loadTime",Je.loadTime),Je.renderTime!=null&&t.setAttribute("lcp.renderTime",Je.renderTime),t.setAttribute("lcp.size",Je.size)),Do?.sources&&e.recordClsOnPageloadSpan&&Do.sources.forEach((n,r)=>t.setAttribute(`cls.source.${r+1}`,ye(n.node)))}function xT(t,e,n){n.forEach(([r,i])=>{let s=t[r];s!=null&&(typeof s=="number"&&s<yT||typeof s=="string")&&(e[i]=s)})}function OT(t){let e=Vt(!1);if(!e)return;let{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Cu(){return Yt()&&Se()?st("element",PT):()=>{}}var PT=({entries:t})=>{let e=ue(),n=e?se(e):void 0,r=n?L(n).description:B().getScopeData().transactionName;t.forEach(i=>{let s=i;if(!s.identifier)return;let o=s.name,a=s.renderTime,c=s.loadTime,[u,l]=c?[de(c),"load-time"]:a?[de(a),"render-time"]:[le(),"entry-emission"],d=o==="image-paint"?de(Math.max(0,(a??0)-(c??0))):0,f={[te]:"auto.ui.browser.elementtiming",[Ce]:"ui.elementtiming",[he]:"component","sentry.span_start_time_source":l,"sentry.transaction_name":r,"element.id":s.id,"element.type":s.element?.tagName?.toLowerCase()||"unknown","element.size":s.naturalWidth&&s.naturalHeight?`${s.naturalWidth}x${s.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":s.url||void 0,"element.identifier":s.identifier,"element.paint_type":o};io({name:`element[${s.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},m=>{m.end(u+d)})})};var DT=1e3,Sh,Nu,Mu;function xi(t){De("dom",t),Le("dom",LT)}function LT(){if(!x.document)return;let t=Ie.bind(null,"dom"),e=yh(t,!0);x.document.addEventListener("click",e,!1),x.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=x[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(be(i,"addEventListener",function(s){return function(o,a,c){if(o==="click"||o=="keypress")try{let u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},l=u[o]=u[o]||{refCount:0};if(!l.handler){let d=yh(t);l.handler=d,s.call(this,o,d,c)}l.refCount++}catch{}return s.call(this,o,a,c)}}),be(i,"removeEventListener",function(s){return function(o,a,c){if(o==="click"||o=="keypress")try{let u=this.__sentry_instrumentation_handlers__||{},l=u[o];l&&(l.refCount--,l.refCount<=0&&(s.call(this,o,l.handler,c),l.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,a,c)}}))})}function FT(t){if(t.type!==Nu)return!1;try{if(!t.target||t.target._sentryId!==Mu)return!1}catch{}return!0}function UT(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function yh(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=BT(n);if(UT(n.type,r))return;_e(n,"_sentryCaptured",!0),r&&!r._sentryId&&_e(r,"_sentryId",ve());let i=n.type==="keypress"?"input":n.type;FT(n)||(t({event:n,name:i,global:e}),Nu=n.type,Mu=r?r._sentryId:void 0),clearTimeout(Sh),Sh=x.setTimeout(()=>{Mu=void 0,Nu=void 0},DT)}}function BT(t){try{return t.target}catch{return null}}var Lo;function Xt(t){let e="history";De(e,t),Le(e,HT)}function HT(){if(x.addEventListener("popstate",()=>{let e=x.location.href,n=Lo;if(Lo=e,n===e)return;Ie("history",{from:n,to:e})}),!ou())return;function t(e){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=Lo,s=$T(String(r));if(Lo=s,i===s)return e.apply(this,n);Ie("history",{from:i,to:s})}return e.apply(this,n)}}be(x.history,"pushState",t),be(x.history,"replaceState",t)}function $T(t){try{return new URL(t,x.location.origin).toString()}catch{return t}}var Fo={};function Uo(t){let e=Fo[t];if(e)return e;let n=x[t];if(Ii(n))return Fo[t]=n.bind(x);let r=x.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?.[t]&&(n=s[t]),r.head.removeChild(i)}catch(i){pt&&_.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(Fo[t]=n.bind(x))}function ku(t){Fo[t]=void 0}function zn(...t){return Uo("setTimeout")(...t)}var Rt="__sentry_xhr_v3__";function Oi(t){De("xhr",t),Le("xhr",zT)}function zT(){if(!x.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){let i=new Error,s=le()*1e3,o=Re(r[0])?r[0].toUpperCase():void 0,a=WT(r[1]);if(!o||!a)return e.apply(n,r);n[Rt]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let c=()=>{let u=n[Rt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}let l={endTimestamp:le()*1e3,startTimestamp:s,xhr:n,virtualError:i};Ie("xhr",l)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,l,d){return c(),u.apply(l,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,l,d){let[f,m]=d,h=l[Rt];return h&&Re(f)&&Re(m)&&(h.request_headers[f.toLowerCase()]=m),u.apply(l,d)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){let i=n[Rt];if(!i)return e.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let s={startTimestamp:le()*1e3,xhr:n};return Ie("xhr",s),e.apply(n,r)}})}function WT(t){if(Re(t))return t;try{return t.toString()}catch{}}function Bo(t){return new URLSearchParams(t).toString()}function Ho(t,e=_){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Bo(t)];if(!t)return[void 0]}catch(n){return pt&&e.error(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return pt&&e.log("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function $o(t=[]){if(!(t.length!==2||typeof t[1]!="object"))return t[1].body}function Pi(t){let e;try{e=t.getAllResponseHeaders()}catch(n){return pt&&_.error(n,"Failed to get xhr response headers",t),{}}return e?e.split(`\r
`).reduce((n,r)=>{let[i,s]=r.split(": ");return s&&(n[i.toLowerCase()]=s),n},{}):{}}var xu=[],zo=new Map,Rr=new Map,jT=60;function Pu(){if(Yt()&&Se()){let e=GT();return()=>{e()}}return()=>{}}var Ou={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 GT(){return Ni(qT)}var qT=({metric:t})=>{if(t.value==null)return;let e=de(t.value);if(e>jT)return;let n=t.entries.find(h=>h.duration===t.value&&Ou[h.name]);if(!n)return;let{interactionId:r}=n,i=Ou[n.name],s=de(Se()+n.startTime),o=ue(),a=o?se(o):void 0,c=r!=null?zo.get(r):void 0,u=c?.span||a,l=u?L(u).description:B().getScopeData().transactionName,d=c?.elementName||ye(n.target),f={[te]:"auto.http.browser.inp",[Ce]:`ui.interaction.${i}`,[lt]:n.duration},m=wr({name:d,transaction:l,attributes:f,startTime:s});m&&(m.addEvent("inp",{[Ft]:"millisecond",[Ut]:t.value}),m.end(s+e))};function Du(){let t=Object.keys(Ou);Er()&&t.forEach(i=>{x.addEventListener(i,e,{capture:!0,passive:!0})});function e(i){let s=i.target;if(!s)return;let o=ye(s),a=Math.round(i.timeStamp);if(Rr.set(a,o),Rr.size>50){let c=Rr.keys().next().value;c!==void 0&&Rr.delete(c)}}function n(i){let s=Math.round(i.startTime),o=Rr.get(s);if(!o)for(let a=-5;a<=5;a++){let c=Rr.get(s+a);if(c){o=c;break}}return o||"<unknown>"}let r=({entries:i})=>{let s=ue(),o=s&&se(s);i.forEach(a=>{if(!fh(a))return;let c=a.interactionId;if(c==null||zo.has(c))return;let u=a.target?ye(a.target):n(a);if(xu.length>10){let l=xu.shift();zo.delete(l)}xu.push(c),zo.set(c,{span:o,elementName:u})})};st("event",r),st("first-input",r)}var VT=40;function Eh(t,e=Uo("fetch")){let n=0,r=0;function i(s){return q(this,null,function*(){let o=s.body.length;n+=o,r++;let a=p({body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);try{let c=yield e(t.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw ku("fetch"),c}finally{n-=o,r--}})}return po(t,i,Fn(t.bufferSize||VT))}var Ee=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var KT=30;var YT=50;function Lu(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?"?":e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var XT=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,JT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,QT=/\((\S*)(?::(\d+))(?::(\d+))\)/,ZT=/at (.+?) ?\(data:(.+?),/,eb=t=>{let e=t.match(ZT);if(e)return{filename:`<data:${e[2]}>`,function:e[1]};let n=XT.exec(t);if(n){let[,i,s,o]=n;return Lu(i,"?",+s,+o)}let r=JT.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){let a=QT.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}let[s,o]=bh(r[1]||"?",r[2]);return Lu(o,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},tb=[KT,eb],nb=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,rb=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ib=t=>{let e=nb.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let s=rb.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]||"?";return[i,r]=bh(i,r),Lu(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},sb=[YT,ib];var ob=[tb,sb],Th=Ms(...ob),bh=(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]:"?",n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Wo=1024,ab="Breadcrumbs",cb=(t={})=>{let e=p({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:ab,setup(n){e.console&&iu(db(n)),e.dom&&xi(lb(n,e.dom)),e.xhr&&Oi(pb(n)),e.fetch&&wi(fb(n)),e.history&&Xt(mb(n)),e.sentry&&n.on("beforeSendEvent",ub(n))}}},Di=cb;function ub(t){return function(n){k()===t&&dt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Pt(n)},{event:n})}}function lb(t,e){return function(r){if(k()!==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>Wo&&(Ee&&_.warn(`\`dom.maxStringLength\` cannot exceed ${Wo}, but a value of ${a} was configured. Sentry will use ${Wo} instead.`),a=Wo),typeof o=="string"&&(o=[o]);try{let u=r.event,l=hb(u)?u.target:u;i=ye(l,{keyAttrs:o,maxStringLength:a}),s=ri(l)}catch{i="<unknown>"}if(i.length===0)return;let c={category:`ui.${r.name}`,message:i};s&&(c.data={"ui.component_name":s}),dt(c,{event:r.event,name:r.name,global:r.global})}}function db(t){return function(n){if(k()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:bi(n.level),message:Us(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Us(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;dt(r,{input:n.args,level:n.level})}}function pb(t){return function(n){if(k()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[Rt];if(!r||!i||!s)return;let{method:o,url:a,status_code:c,body:u}=s,l={method:o,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i},f={category:"xhr",data:l,type:"http",level:_o(c)};t.emit("beforeOutgoingRequestBreadcrumb",f,d),dt(f,d)}}function fb(t){return function(n){if(k()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let s=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:s,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",a,o),dt(a,o)}else{let s=n.response,o=v(p({},n.fetchData),{status_code:s?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,s?.status;let a={input:n.args,response:s,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:o,type:"http",level:_o(o.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",c,a),dt(c,a)}}}function mb(t){return function(n){if(k()!==t)return;let r=n.from,i=n.to,s=vt(H.location.href),o=r?vt(r):void 0,a=vt(i);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),dt({category:"navigation",data:{from:r,to:i}})}}function hb(t){return!!t&&!!t.target}var gb=["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"],_b="BrowserApiErrors",Sb=(t={})=>{let e=p({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:_b,setupOnce(){e.setTimeout&&be(H,"setTimeout",vh),e.setInterval&&be(H,"setInterval",vh),e.requestAnimationFrame&&be(H,"requestAnimationFrame",yb),e.XMLHttpRequest&&"XMLHttpRequest"in H&&be(XMLHttpRequest.prototype,"send",Eb);let n=e.eventTarget;n&&(Array.isArray(n)?n:gb).forEach(i=>Tb(i,e))}}},Ih=Sb;function vh(t){return function(...e){let n=e[0];return e[0]=Bn(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Ke(t)}`}}),t.apply(this,e)}}function yb(t){return function(e){return t.apply(this,[Bn(e,{mechanism:{data:{handler:Ke(t)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Eb(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&be(n,i,function(s){let o={mechanism:{data:{handler:Ke(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${i}`}},a=Mn(s);return a&&(o.mechanism.data.handler=Ke(a)),Bn(s,o)})}),t.apply(this,e)}}function Tb(t,e){let r=H[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(be(r,"addEventListener",function(i){return function(s,o,a){try{bb(o)&&(o.handleEvent=Bn(o.handleEvent,{mechanism:{data:{handler:Ke(o),target:t},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return e.unregisterOriginalCallbacks&&vb(this,s,o),i.apply(this,[s,Bn(o,{mechanism:{data:{handler:Ke(o),target:t},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),be(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 bb(t){return typeof t.handleEvent=="function"}function vb(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}var Li=()=>({name:"BrowserSession",setupOnce(){if(typeof H.document>"u"){Ee&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}fi({ignoreDuration:!0}),mi(),Xt(({from:t,to:e})=>{t!==void 0&&t!==e&&(fi({ignoreDuration:!0}),mi())})}});var Ib="GlobalHandlers",wb=(t={})=>{let e=p({onerror:!0,onunhandledrejection:!0},t);return{name:Ib,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Rb(n),wh("onerror")),e.onunhandledrejection&&(Ab(n),wh("onunhandledrejection"))}}},Fi=wb;function Rb(t){Zr(e=>{let{stackParser:n,attachStacktrace:r}=Rh();if(k()!==t||pu())return;let{msg:i,url:s,line:o,column:a,error:c}=e,u=Mb(Eo(n,c||i,void 0,r,!1),s,o,a);u.level="error",pi(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Ab(t){ei(e=>{let{stackParser:n,attachStacktrace:r}=Rh();if(k()!==t||pu())return;let i=Cb(e),s=Tt(i)?Nb(i):Eo(n,i,void 0,r,!0);s.level="error",pi(s,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Cb(t){if(Tt(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 Nb(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Mb(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,l=n,d=kb(e)??et();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),t}function wh(t){Ee&&_.log(`Global Handler attached: ${t}`)}function Rh(){return k()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function kb(t){if(!(!Re(t)||t.length===0)){if(t.startsWith("data:")){let e=t.match(/^data:([^;]+)/),n=e?e[1]:"text/javascript",r=t.includes("base64,");return`<data:${n}${r?",base64":""}>`}return t}}var Ui=()=>({name:"HttpContext",preprocessEvent(t){if(!H.navigator&&!H.location&&!H.document)return;let e=Ai(),n=p(p({},e.headers),t.request?.headers);t.request=v(p(p({},e),t.request),{headers:n})}});var xb="cause",Ob=5,Pb="LinkedErrors",Db=(t={})=>{let e=t.limit||Ob,n=t.key||xb;return{name:Pb,preprocessEvent(r,i,s){let o=s.getOptions();ru(yo,o.stackParser,n,e,r,i)}}},Bi=Db;function Ah(){return Lb()?(Ee&&Pe(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function Lb(){if(typeof H.window>"u")return!1;let t=H;if(t.nw||!(t.chrome||t.browser)?.runtime?.id)return!1;let n=et(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(H===H.top&&r.some(s=>n.startsWith(`${s}://`)))}function Ch(t){return[Sr(),_r(),Ih(),Di(),Fi(),Bi(),yr(),Ui(),Li()]}function Fu(t={}){let e=!t.skipBrowserExtensionCheck&&Ah(),n=t.defaultIntegrations==null?Ch():t.defaultIntegrations,r=v(p({},t),{enabled:e?!1:t.enabled,stackParser:uc(t.stackParser||Th),integrations:Wc({integrations:t.integrations,defaultIntegrations:n}),transport:t.transport||Eh});return Yc(To,r)}function jo(t={}){let e=H.document,n=e?.head||e?.body;if(!n){Ee&&_.error("[showReportDialog] Global document not defined");return}let r=B(),s=k()?.getDsn();if(!s){Ee&&_.error("[showReportDialog] DSN not configured");return}let o=v(p({},t),{user:p(p({},r.getUser()),t.user),eventId:t.eventId||ao()}),a=H.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=$c(s,o);let{onLoad:c,onClose:u}=o;if(c&&(a.onload=c),u){let l=d=>{if(d.data==="__sentry_reportdialog_closed__")try{u()}finally{H.removeEventListener("message",l)}};H.addEventListener("message",l)}n.appendChild(a)}var me=U,pl="sentryReplaySession",Fb="replay_event",fl="Unable to send Replay",Ub=3e5,Bb=9e5,Hb=5e3,$b=5500,zb=6e4,Wb=5e3,jb=3,Nh=15e4,Go=5e3,Gb=3e3,qb=300,ml=2e7,Vb=4999,Kb=5e4,Mh=36e5,Yb=Object.defineProperty,Xb=(t,e,n)=>e in t?Yb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kh=(t,e,n)=>Xb(t,typeof e!="symbol"?e+"":e,n),we=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(we||{});function Jb(t){return t.nodeType===t.ELEMENT_NODE}function zi(t){return t?.host?.shadowRoot===t}function Wi(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Qb(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 Zb(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 Xo(t){try{let e=t.rules||t.cssRules;return e?Qb(Array.from(e,Zh).join("")):null}catch{return null}}function ev(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 Zh(t){let e;if(nv(t))try{e=Xo(t.styleSheet)||Zb(t)}catch{}else if(rv(t)){let n=t.cssText,r=t.selectorText.includes(":"),i=typeof t.style.all=="string"&&t.style.all;if(i&&(n=ev(t)),r&&(n=tv(n)),r||i)return n}return e||t.cssText}function tv(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function nv(t){return"styleSheet"in t}function rv(t){return"selectorText"in t}var Jo=class{constructor(){kh(this,"idNodeMap",new Map),kh(this,"nodeMetaMap",new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-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);this.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 iv(){return new Jo}function ca({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 Gi({isMasked:t,element:e,value:n,maskInputFn:r}){let i=n||"";return t?(r&&(i=r(i,e)),"*".repeat(i.length)):i}function Pr(t){return t.toLowerCase()}function Wu(t){return t.toUpperCase()}var xh="__rrweb_original__";function sv(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=xh in s?s[xh]: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?Pr(e):null}function Qo(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,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}var Oh={};function tg(t){let e=Oh[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 Oh[t]=r.bind(window)}function ju(...t){return tg("setTimeout")(...t)}function ng(...t){return tg("clearTimeout")(...t)}function rg(t){try{return t.contentDocument}catch{}}var ov=1,av=new RegExp("[^a-z0-9-_:]"),qi=-2;function gl(){return ov++}function cv(t){if(t instanceof HTMLFormElement)return"form";let e=Pr(t.tagName);return av.test(e)?"div":e}function uv(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var Ar,Ph,lv=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,dv=/^(?:[a-z+]+:)?\/\//i,pv=/^www\..*/i,fv=/^(data:)([^,]*),(.*)/i;function mv(t,e){if(!t||e.size===0)return t;try{let n=t.split(";"),r=[];for(let i of n){if(i=i.trim(),!i)continue;let s=i.indexOf(":");if(s===-1){r.push(i);continue}let o=i.slice(0,s).trim();e.has(o)||r.push(i)}return r.join("; ")+(r.length>0&&t.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),t}}function Zo(t,e){return(t||"").replace(lv,(n,r,i,s,o,a)=>{let c=i||o||a,u=r||s||"";if(!c)return n;if(dv.test(c)||pv.test(c))return`url(${u}${c}${u})`;if(fv.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${uv(e)+c}${u})`;let l=e.split("/"),d=c.split("/");l.pop();for(let f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${u}${l.join("/")}${u})`})}var hv=/^[^ \t\n\r\u000c]+/,gv=/^[, \t\n\r\u000c]+/;function _v(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(gv),!(n>=e.length);){let s=r(hv);if(s.slice(-1)===",")s=Mr(t,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Mr(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 Dh=new WeakMap;function Mr(t,e){return!e||e.trim()===""?e:ua(t,e)}function Sv(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function ua(t,e){let n=Dh.get(t);if(n||(n=t.createElement("a"),Dh.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,o){if(!r)return r;if(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#"))return Mr(t,r);if(n==="xlink:href"&&r[0]!=="#")return Mr(t,r);if(n==="background"&&(e==="table"||e==="td"||e==="th"))return Mr(t,r);if(n==="srcset")return _v(t,r);if(n==="style"){let a=Zo(r,ua(t));return o&&o.size>0&&(a=mv(a,o)),a}else if(e==="object"&&n==="data")return Mr(t,r);return typeof s=="function"?s(n,r,i):r}function sg(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function yv(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 Ev(t,e){for(let n=t.classList.length;n--;){let r=t.classList[n];if(e.test(r))return!0}return!1}function Wn(t,e,n=1/0,r=0){return!t||t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Wn(t.parentNode,e,n,r+1)}function kr(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(Ev(r,t))return!0}return!!(e&&r.matches(e))}catch{return!1}}}function Dr(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=Wn(o,kr(r,i)),c<0)return!0;a=Wn(o,kr(e,n),c>=0?c:1/0)}else{if(a=Wn(o,kr(e,n)),a<0)return!1;c=Wn(o,kr(r,i),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function Tv(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=ju(()=>{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 ju(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function bv(t,e,n){let r=!1,i;try{i=t.sheet}catch{return}if(i)return;let s=ju(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{ng(s),r=!0,e()})}function vv(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:m,maskInputOptions:h={},maskTextFn:g,maskInputFn:S,dataURLOptions:b={},inlineImages:N,recordCanvas:F,keepIframeSrcFn:D,newlyAddedElement:Q=!1,ignoreCSSAttributes:O}=e,E=Iv(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:we.Document,childNodes:[],compatMode:t.compatMode}:{type:we.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:we.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:return Rv(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:h,maskInputFn:S,dataURLOptions:b,inlineImages:N,recordCanvas:F,keepIframeSrcFn:D,newlyAddedElement:Q,rootId:E,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:O});case t.TEXT_NODE:return wv(t,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:h,maskInputFn:S,rootId:E});case t.CDATA_SECTION_NODE:return{type:we.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:we.Comment,textContent:t.textContent||"",rootId:E};default:return!1}}function Iv(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function wv(t,e){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=e,d=t.parentNode&&t.parentNode.tagName,f=t.textContent,m=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(m&&f){try{t.nextSibling||t.previousSibling||t.parentNode.sheet?.cssRules&&(f=Xo(t.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,t)}f=Zo(f,ua(e.doc))}h&&(f="SCRIPT_PLACEHOLDER");let S=Dr(t,r,s,i,o,n);if(!m&&!h&&!g&&f&&S&&(f=a?a(f,t.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(c.textarea||S)&&(f=u?u(f,t.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){let b=ca({type:null,tagName:d,maskInputOptions:c});f=Gi({isMasked:Dr(t,r,s,i,o,b),element:t,value:f,maskInputFn:u})}return{type:we.Text,textContent:f||"",isStyle:m,rootId:l}}function Rv(t,e){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:h=!1,rootId:g,maskTextClass:S,unmaskTextClass:b,maskTextSelector:N,unmaskTextSelector:F,ignoreCSSAttributes:D}=e,Q=yv(t,r,i,s),O=cv(t),E={},C=t.attributes.length;for(let A=0;A<C;A++){let P=t.attributes[A];P.name&&!sg(O,P.name,P.value)&&(E[P.name]=ig(n,O,Pr(P.name),P.value,t,c,D))}if(O==="link"&&o){let A=Array.from(n.styleSheets).find(j=>j.href===t.href),P=null;A&&(P=Xo(A)),P&&(E.rel=null,E.href=null,E.crossorigin=null,E._cssText=Zo(P,A.href))}if(O==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){let A=Xo(t.sheet);A&&(E._cssText=Zo(A,ua(n)))}if(O==="input"||O==="textarea"||O==="select"||O==="option"){let A=t,P=hl(A),j=Qo(A,Wu(O),P),Z=A.checked;if(P!=="submit"&&P!=="button"&&j){let G=Dr(A,S,N,b,F,ca({type:P,tagName:Wu(O),maskInputOptions:a}));E.value=Gi({isMasked:G,element:A,value:j,maskInputFn:u})}Z&&(E.checked=Z)}if(O==="option"&&(t.selected&&!a.select?E.selected=!0:delete E.selected),O==="canvas"&&f){if(t.__context==="2d")sv(t)||(E.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){let A=t.toDataURL(l.type,l.quality),P=n.createElement("canvas");P.width=t.width,P.height=t.height;let j=P.toDataURL(l.type,l.quality);A!==j&&(E.rr_dataURL=A)}}if(O==="img"&&d){Ar||(Ar=n.createElement("canvas"),Ph=Ar.getContext("2d"));let A=t,P=A.currentSrc||A.getAttribute("src")||"<unknown-src>",j=A.crossOrigin,Z=()=>{A.removeEventListener("load",Z);try{Ar.width=A.naturalWidth,Ar.height=A.naturalHeight,Ph.drawImage(A,0,0),E.rr_dataURL=Ar.toDataURL(l.type,l.quality)}catch(G){if(A.crossOrigin!=="anonymous"){A.crossOrigin="anonymous",A.complete&&A.naturalWidth!==0?Z():A.addEventListener("load",Z);return}else console.warn(`Cannot inline img src=${P}! Error: ${G}`)}A.crossOrigin==="anonymous"&&(j?E.crossOrigin=j:A.removeAttribute("crossorigin"))};A.complete&&A.naturalWidth!==0?Z():A.addEventListener("load",Z)}if((O==="audio"||O==="video")&&(E.rr_mediaState=t.paused?"paused":"played",E.rr_mediaCurrentTime=t.currentTime),h||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),Q){let{width:A,height:P}=t.getBoundingClientRect();E={class:E.class,rr_width:`${A}px`,rr_height:`${P}px`}}O==="iframe"&&!m(E.src)&&(!Q&&!rg(t)&&(E.rr_src=E.src),delete E.src);let ne;try{customElements.get(O)&&(ne=!0)}catch{}return{type:we.Element,tagName:O,attributes:E,childNodes:[],isSVG:Sv(t)||void 0,needBlock:Q,rootId:g,isCustom:ne}}function fe(t){return t==null?"":t.toLowerCase()}function Av(t,e){if(e.comment&&t.type===we.Comment)return!0;if(t.type===we.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"&&(fe(t.attributes.name).match(/^msapplication-tile(image|color)$/)||fe(t.attributes.name)==="application-name"||fe(t.attributes.rel)==="icon"||fe(t.attributes.rel)==="apple-touch-icon"||fe(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&fe(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(fe(t.attributes.property).match(/^(og|twitter|fb):/)||fe(t.attributes.name).match(/^(og|twitter):/)||fe(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(fe(t.attributes.name)==="robots"||fe(t.attributes.name)==="googlebot"||fe(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(fe(t.attributes.name)==="author"||fe(t.attributes.name)==="generator"||fe(t.attributes.name)==="framework"||fe(t.attributes.name)==="publisher"||fe(t.attributes.name)==="progid"||fe(t.attributes.property).match(/^article:/)||fe(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(fe(t.attributes.name)==="google-site-verification"||fe(t.attributes.name)==="yandex-verification"||fe(t.attributes.name)==="csrf-token"||fe(t.attributes.name)==="p:domain_verify"||fe(t.attributes.name)==="verify-v1"||fe(t.attributes.name)==="verification"||fe(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function xr(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:m=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:S,maskInputFn:b,slimDOMOptions:N,dataURLOptions:F={},inlineImages:D=!1,recordCanvas:Q=!1,onSerialize:O,onIframeLoad:E,iframeLoadTimeout:C=5e3,onBlockedImageLoad:ne,onStylesheetLoad:A,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:j=()=>!1,newlyAddedElement:Z=!1,ignoreCSSAttributes:G}=e,{preserveWhiteSpace:ge=!0}=e,T=vv(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:b,dataURLOptions:F,inlineImages:D,recordCanvas:Q,keepIframeSrcFn:j,newlyAddedElement:Z,ignoreCSSAttributes:G});if(!T)return console.warn(t,"not serialized"),null;let w;r.hasNode(t)?w=r.getId(t):Av(T,N)||!ge&&T.type===we.Text&&!T.isStyle&&!T.textContent.replace(/^\s+|\s+$/gm,"").length?w=qi:w=gl();let y=Object.assign(T,{id:w});if(r.add(t,y),w===qi)return null;O&&O(t);let M=!f;if(y.type===we.Element){M=M&&!y.needBlock;let R=t.shadowRoot;R&&Wi(R)&&(y.isShadowHost=!0)}if((y.type===we.Document||y.type===we.Element)&&M){N.headWhitespace&&y.type===we.Element&&y.tagName==="head"&&(ge=!1);let R={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:b,slimDOMOptions:N,dataURLOptions:F,inlineImages:D,recordCanvas:Q,preserveWhiteSpace:ge,onSerialize:O,onIframeLoad:E,iframeLoadTimeout:C,onBlockedImageLoad:ne,onStylesheetLoad:A,stylesheetLoadTimeout:P,keepIframeSrcFn:j,ignoreCSSAttributes:G},K=t.childNodes?Array.from(t.childNodes):[];for(let Y of K){let oe=xr(Y,R);oe&&y.childNodes.push(oe)}if(Jb(t)&&t.shadowRoot)for(let Y of Array.from(t.shadowRoot.childNodes)){let oe=xr(Y,R);oe&&(Wi(t.shadowRoot)&&(oe.isShadow=!0),y.childNodes.push(oe))}}if(t.parentNode&&zi(t.parentNode)&&Wi(t.parentNode)&&(y.isShadow=!0),y.type===we.Element&&y.tagName==="iframe"&&!y.needBlock&&Tv(t,()=>{let R=rg(t);if(R&&E){let K=xr(R,{doc:R,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:b,slimDOMOptions:N,dataURLOptions:F,inlineImages:D,recordCanvas:Q,preserveWhiteSpace:ge,onSerialize:O,onIframeLoad:E,iframeLoadTimeout:C,onStylesheetLoad:A,stylesheetLoadTimeout:P,keepIframeSrcFn:j,ignoreCSSAttributes:G});K&&E(t,K)}},C),y.type===we.Element&&y.tagName==="img"&&!t.complete&&y.needBlock){let R=t,K=()=>{if(R.isConnected&&!R.complete&&ne)try{let Y=R.getBoundingClientRect();Y.width>0&&Y.height>0&&ne(R,y,Y)}catch{}R.removeEventListener("load",K)};R.isConnected&&R.addEventListener("load",K)}return y.type===we.Element&&y.tagName==="link"&&typeof y.attributes.rel=="string"&&(y.attributes.rel==="stylesheet"||y.attributes.rel==="preload"&&typeof y.attributes.href=="string"&&eg(y.attributes.href)==="css")&&bv(t,()=>{if(A){let R=xr(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:b,slimDOMOptions:N,dataURLOptions:F,inlineImages:D,recordCanvas:Q,preserveWhiteSpace:ge,onSerialize:O,onIframeLoad:E,iframeLoadTimeout:C,onStylesheetLoad:A,stylesheetLoadTimeout:P,keepIframeSrcFn:j,ignoreCSSAttributes:G});R&&A(t,R)}},P),y.type===we.Element&&delete y.needBlock,y}function Cv(t,e){let{mirror:n=new Jo,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:m=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:S,maskInputFn:b,slimDOM:N=!1,dataURLOptions:F,preserveWhiteSpace:D,onSerialize:Q,onIframeLoad:O,iframeLoadTimeout:E,onBlockedImageLoad:C,onStylesheetLoad:ne,stylesheetLoadTimeout:A,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:j=new Set([])}=e||{};return xr(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,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:S,maskInputFn:b,slimDOMOptions:N===!0||N==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:N==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:N===!1?{}:N,dataURLOptions:F,inlineImages:f,recordCanvas:m,preserveWhiteSpace:D,onSerialize:Q,onIframeLoad:O,iframeLoadTimeout:E,onBlockedImageLoad:C,onStylesheetLoad:ne,stylesheetLoadTimeout:A,keepIframeSrcFn:P,newlyAddedElement:!1,ignoreCSSAttributes:j})}function je(t,e,n=document){let r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}var Cr=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`,Lh={map:{},getId(){return console.error(Cr),-1},getNode(){return console.error(Cr),null},removeNodeFromMap(){console.error(Cr)},has(){return console.error(Cr),!1},reset(){console.error(Cr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Lh=new Proxy(Lh,{get(t,e,n){return e==="map"&&console.error(Cr),Reflect.get(t,e,n)}}));function Vi(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&&(Pv(r),r=null),i=o,t.apply(c,s)):!r&&n.trailing!==!1&&(r=la(()=>{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){la(()=>{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 ea=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ea=()=>new Date().getTime());function ag(t){let e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:e?.documentElement.scrollLeft||e?.body?.parentElement?.scrollLeft||e?.body?.scrollLeft||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:e?.documentElement.scrollTop||e?.body?.parentElement?.scrollTop||e?.body?.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){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}function ot(t,e,n,r,i){if(!t)return!1;let s=lg(t);if(!s)return!1;let o=kr(e,n);if(!i){let u=r&&s.matches(r);return o(s)&&!u}let a=Wn(s,o),c=-1;return a<0?!1:(r&&(c=Wn(s,kr(null,r))),a>-1&&c<0?!0:a<c)}function Nv(t,e){return e.getId(t)!==-1}function Uu(t,e){return e.getId(t)===qi}function dg(t,e){if(zi(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 Gu(t){return!!t.changedTouches}function Mv(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 qu(t){return!!t?.shadowRoot}var Vu=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return 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 mg(t){let e=null;return t.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function kv(t){let e=t,n;for(;n=mg(e);)e=n;return e}function xv(t){let e=t.ownerDocument;if(!e)return!1;let n=kv(t);return e.contains(n)}function hg(t){let e=t.ownerDocument;return e?e.contains(t)||xv(t):!1}var Fh={};function Sl(t){let e=Fh[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 Fh[t]=r.bind(window)}function Ov(...t){return Sl("requestAnimationFrame")(...t)}function la(...t){return Sl("setTimeout")(...t)}function Pv(...t){return Sl("clearTimeout")(...t)}var V=(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))(V||{}),W=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(W||{}),We=(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))(We||{}),Jt=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Jt||{}),Nr=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Nr||{});function yl(t){try{return t.contentDocument}catch{}}function Dv(t){try{return t.contentWindow}catch{}}function Uh(t){return"__ln"in t}var Ku=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=n?.next||null;return n}addNode(e){let n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Uh(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&&Uh(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--)}},Bh=(t,e)=>`${t}@${e}`,Yu=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 Ku,i=c=>{let u=c,l=qi;for(;l===qi;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},s=c=>{if(!c.parentNode||!hg(c))return;let u=zi(c.parentNode)?this.mirror.getId(mg(c)):this.mirror.getId(c.parentNode),l=i(c);if(u===-1||l===-1)return r.addNode(c);let d=xr(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:f=>{pg(f,this.mirror)&&!ot(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),fg(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),qu(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,m)=>{ot(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,m),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,m)=>{this.stylesheetManager.attachLinkElement(f,m)},onBlockedImageLoad:(f,m,{width:h,height:g})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:m.id,attributes:{style:{width:`${h}px`,height:`${g}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(e.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)Hh(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(let c of this.addedSet)!$h(this.droppedSet,c)&&!Hh(this.removes,c,this.mirror)||$h(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),l=i(o.value);u!==-1&&l!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){let l=u;if(u=u.previous,l){let d=this.mirror.getId(l.value.parentNode);if(i(l.value)===-1)continue;if(d!==-1){c=l;break}else{let m=l.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=m.parentNode.host;if(this.mirror.getId(h)!==-1){c=l;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 l=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+d).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(!Uu(e.target,this.mirror))switch(e.type){case"characterData":{let n=e.target.textContent;!ot(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:Dr(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=Qo(n,a,o);let c=ca({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Dr(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);i=Gi({isMasked:u,element:n,value:i,maskInputFn:this.maskInputFn})}if(ot(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(!yl(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,Pr(n.tagName),Pr(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(ot(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=zi(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);ot(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Uu(n,this.mirror)||!Nv(n,this.mirror)||(this.addedSet.has(n)?(Xu(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[Bh(r,i)]?Xu(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:zi(e.target)&&Wi(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(Uu(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[Bh(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ot(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(r=>this.genAdds(r)),qu(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","ignoreCSSAttributes"].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 Xu(t,e){t.delete(e),e.childNodes?.forEach(n=>Xu(t,n))}function Hh(t,e,n){return t.length===0?!1:Lv(t,e,n)}function Lv(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 $h(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 ji;function Fv(t){ji=t}function Uv(){ji=void 0}var re=t=>ji?(...n)=>{try{return t(...n)}catch(r){if(ji&&ji(r)===!0)return()=>{};throw r}}:t,Or=[];function Qi(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 Yu;Or.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);let s=new r(re(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 Bv({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=Vi(re(d=>{let f=Date.now()-a;t(o.map(m=>(m.timeOffset-=f,m)),d),o=[],a=null}),s),u=re(Vi(re(d=>{let f=Qi(d),{clientX:m,clientY:h}=Gu(d)?d.changedTouches[0]:d;a||(a=ea()),o.push({x:m,y:h,id:r.getId(f),timeOffset:ea()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?W.Drag:d instanceof MouseEvent?W.MouseMove:W.TouchMove)}),i,{trailing:!1})),l=[je("mousemove",u,n),je("touchmove",u,n),je("drag",u,n)];return re(()=>{l.forEach(d=>d())})}function Hv({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,l=d=>f=>{let m=Qi(f);if(ot(m,r,i,s,!0))return;let h=null,g=d;if("pointerType"in f){switch(f.pointerType){case"mouse":h=Jt.Mouse;break;case"touch":h=Jt.Touch;break;case"pen":h=Jt.Pen;break}h===Jt.Touch?We[d]===We.MouseDown?g="TouchStart":We[d]===We.MouseUp&&(g="TouchEnd"):Jt.Pen}else Gu(f)&&(h=Jt.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===Jt.Touch||g.startsWith("Mouse")&&h===Jt.Mouse)&&(h=null)):We[d]===We.Click&&(h=u,u=null);let S=Gu(f)?f.changedTouches[0]:f;if(!S)return;let b=n.getId(m),{clientX:N,clientY:F}=S;re(t)(p({type:We[g],id:b,x:N,y:F},h!==null&&{pointerType:h}))};return Object.keys(We).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=Pr(d),m=l(d);if(window.PointerEvent)switch(We[d]){case We.MouseDown:case We.MouseUp:f=f.replace("mouse","pointer");break;case We.TouchStart:case We.TouchEnd:return}c.push(je(f,m,e))}),re(()=>{c.forEach(d=>d())})}function Sg({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){let a=re(Vi(re(c=>{let u=Qi(c);if(!u||ot(u,r,i,s,!0))return;let l=n.getId(u);if(u===e&&e.defaultView){let d=ag(e.defaultView);t({id:l,x:d.left,y:d.top})}else t({id:l,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return je("scroll",a,e)}function $v({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=re(Vi(re(()=>{let s=cg(),o=ug();(n!==s||r!==o)&&(t({width:Number(o),height:Number(s)}),n=s,r=o)}),200));return je("resize",i,e)}var zv=["INPUT","TEXTAREA","SELECT"],zh=new WeakMap;function Wv({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:m,maskTextSelector:h,unmaskTextSelector:g}){function S(E){let C=Qi(E),ne=E.isTrusted,A=C&&Wu(C.tagName);if(A==="OPTION"&&(C=C.parentElement),!C||!A||zv.indexOf(A)<0||ot(C,r,i,s,!0))return;let P=C;if(P.classList.contains(o)||a&&P.matches(a))return;let j=hl(C),Z=Qo(P,A,j),G=!1,ge=ca({maskInputOptions:c,tagName:A,type:j}),T=Dr(C,f,h,m,g,ge);(j==="radio"||j==="checkbox")&&(G=C.checked),Z=Gi({isMasked:T,element:C,value:Z,maskInputFn:u}),b(C,d?{text:Z,isChecked:G,userTriggered:ne}:{text:Z,isChecked:G});let w=C.name;j==="radio"&&w&&G&&e.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(y=>{if(y!==C){let M=Gi({isMasked:T,element:y,value:Qo(y,A,j),maskInputFn:u});b(y,d?{text:M,isChecked:!G,userTriggered:!1}:{text:M,isChecked:!G})}})}function b(E,C){let ne=zh.get(E);if(!ne||ne.text!==C.text||ne.isChecked!==C.isChecked){zh.set(E,C);let A=n.getId(E);re(t)(v(p({},C),{id:A}))}}let F=(l.input==="last"?["change"]:["input","change"]).map(E=>je(E,re(S),e)),D=e.defaultView;if(!D)return()=>{F.forEach(E=>E())};let Q=D.Object.getOwnPropertyDescriptor(D.HTMLInputElement.prototype,"value"),O=[[D.HTMLInputElement.prototype,"value"],[D.HTMLInputElement.prototype,"checked"],[D.HTMLSelectElement.prototype,"value"],[D.HTMLTextAreaElement.prototype,"value"],[D.HTMLSelectElement.prototype,"selectedIndex"],[D.HTMLOptionElement.prototype,"selected"]];return Q&&Q.set&&F.push(...O.map(E=>og(E[0],E[1],{set(){re(S)({target:this,isTrusted:!1})}},!1,D))),re(()=>{F.forEach(E=>E())})}function ta(t){let e=[];function n(r,i){if(qo("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||qo("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||qo("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||qo("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 gn(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function jv({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:re((l,d,f)=>{let[m,h]=f,{id:g,styleId:S}=gn(d,e,n.styleMirror);return(g&&g!==-1||S&&S!==-1)&&t({id:g,styleId:S,adds:[{rule:m,index:h}]}),l.apply(d,f)})});let s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:re((l,d,f)=>{let[m]=f,{id:h,styleId:g}=gn(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,removes:[{index:m}]}),l.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:re((l,d,f)=>{let[m]=f,{id:h,styleId:g}=gn(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,replace:m}),l.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:re((l,d,f)=>{let[m]=f,{id:h,styleId:g}=gn(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,replaceSync:m}),l.apply(d,f)})}));let c={};Vo("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Vo("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Vo("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Vo("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(c).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:re((f,m,h)=>{let[g,S]=h,{id:b,styleId:N}=gn(m.parentStyleSheet,e,n.styleMirror);return(b&&b!==-1||N&&N!==-1)&&t({id:b,styleId:N,adds:[{rule:g,index:[...ta(m),S||0]}]}),f.apply(m,h)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:re((f,m,h)=>{let[g]=h,{id:S,styleId:b}=gn(m.parentStyleSheet,e,n.styleMirror);return(S&&S!==-1||b&&b!==-1)&&t({id:S,styleId:b,removes:[{index:[...ta(m),g]}]}),f.apply(m,h)})})}),re(()=>{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(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function yg({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"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(o){let a=s.set?.call(this,o);if(r!==null&&r!==-1)try{e.adoptStyleSheets(o,r)}catch{}return a}}),re(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function Gv({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:re((a,c,u)=>{let[l,d,f]=u;if(n.has(l))return s.apply(c,[l,d,f]);let{id:m,styleId:h}=gn(c.parentRule?.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,set:{property:l,value:d,priority:f},index:ta(c.parentRule)}),a.apply(c,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:re((a,c,u)=>{let[l]=u;if(n.has(l))return o.apply(c,[l]);let{id:d,styleId:f}=gn(c.parentRule?.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&t({id:d,styleId:f,remove:{property:l},index:ta(c.parentRule)}),a.apply(c,u)})}),re(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function qv({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){let a=re(u=>Vi(re(l=>{let d=Qi(l);if(!d||ot(d,e,n,r,!0))return;let{currentTime:f,volume:m,muted:h,playbackRate:g}=d;t({type:u,id:i.getId(d),currentTime:f,volume:m,muted:h,playbackRate:g})}),s.media||500)),c=[je("play",a(Nr.Play),o),je("pause",a(Nr.Pause),o),je("seeked",a(Nr.Seeked),o),je("volumechange",a(Nr.VolumeChange),o),je("ratechange",a(Nr.RateChange),o)];return re(()=>{c.forEach(u=>u())})}function Vv({fontCb:t,doc:e}){let n=e.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,l){let d=new s(c,u,l);return i.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};let o=_l(e.fonts,"add",function(a){return function(c){return la(re(()=>{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),re(()=>{r.forEach(a=>a())})}function Kv(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=t,a=!0,c=re(()=>{let u=e.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;let l=[],d=u.rangeCount||0;for(let f=0;f<d;f++){let m=u.getRangeAt(f),{startContainer:h,startOffset:g,endContainer:S,endOffset:b}=m;ot(h,r,i,s,!0)||ot(S,r,i,s,!0)||l.push({start:n.getId(h),startOffset:g,end:n.getId(S),endOffset:b})}o({ranges:l})});return c(),je("selectionchange",c)}function Yv({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 Xv(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=_g(t,t.doc));let i=Bv(t),s=Hv(t),o=Sg(t),a=$v(t,{win:n}),c=Wv(t),u=qv(t),l=()=>{},d=()=>{},f=()=>{},m=()=>{};t.recordDOM&&(l=jv(t,{win:n}),d=yg(t,t.doc),f=Gv(t,{win:n}),t.collectFonts&&(m=Vv(t)));let h=Kv(t),g=Yv(t),S=[];for(let b of t.plugins)S.push(b.observer(b.callback,n,b.options));return re(()=>{Or.forEach(b=>b.reset()),r?.disconnect(),i(),s(),o(),a(),c(),u(),l(),d(),f(),m(),h(),g(),S.forEach(b=>b())})}function qo(t){return typeof window[t]<"u"}function Vo(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}var Ki=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}},Ju=class{constructor(){this.crossOriginIframeMirror=new Ki(gl),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Qu=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ki(gl),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ki(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}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);let r=yl(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 V.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:V.IncrementalSnapshot,data:{source:W.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case V.Meta:case V.Load:case V.DomContentLoaded:return!1;case V.Plugin:return n;case V.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case V.IncrementalSnapshot:switch(n.data.source){case W.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"])}),n.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case W.Drag:case W.TouchMove:case W.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case W.ViewportResize:return!1;case W.MediaInteraction:case W.MouseInteraction:case W.Scroll:case W.CanvasMutation:case W.Input:return this.replaceIds(n.data,e,["id"]),n;case W.StyleSheetRule:case W.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case W.Font:return n;case W.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),n;case W.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,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!==we.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},Zu=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},el=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(!Wi(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let r=_g(v(p({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Sg(v(p({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),la(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(yg({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let n=yl(e),r=Dv(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&&hg(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()}},Wh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Hi=0;Hi<Wh.length;Hi++)Jv[Wh.charCodeAt(Hi)]=Hi;var Hi,na=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}},tl=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Vu,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:Zh(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){}},nl=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,Ov(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}},Te,ra;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=t.contentWindow?.Array.from||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}var At=iv();function Qt(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:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:m=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:S,slimDOMOptions:b,maskAttributeFn:N,maskInputFn:F,maskTextFn:D,maxCanvasSize:Q=null,packFn:O,sampling:E={},dataURLOptions:C={},mousemoveWait:ne,recordDOM:A=!0,recordCanvas:P=!1,recordCrossOriginIframes:j=!1,recordAfter:Z=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:ge=!1,inlineImages:T=!1,plugins:w,keepIframeSrcFn:y=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:R,onMutation:K,getCanvasManager:Y}=t;Fv(R);let oe=j?window.parent===window:!0,X=!1;if(!oe)try{window.parent.document&&(X=!1)}catch{X=!0}if(oe&&!e)throw new Error("emit function is required");if(!oe&&!X)return()=>{};ne!==void 0&&E.mousemove===void 0&&(E.mousemove=ne),At.reset();let Oe=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}:S!==void 0?S:{},Zt=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all"}:b||{};Mv();let pe,Ge=0,ke=ae=>{for(let gt of w||[])gt.eventProcessor&&(ae=gt.eventProcessor(ae));return O&&!X&&(ae=O(ae)),ae};Te=(ae,gt)=>{let ee=ae;if(ee.timestamp=ea(),Or[0]?.isFrozen()&&ee.type!==V.FullSnapshot&&!(ee.type===V.IncrementalSnapshot&&ee.data.source===W.Mutation)&&Or.forEach(xe=>xe.unfreeze()),oe)e?.(ke(ee),gt);else if(X){let xe={type:"rrweb",event:ke(ee),origin:window.location.origin,isCheckout:gt};window.parent.postMessage(xe,"*")}if(ee.type===V.FullSnapshot)pe=ee,Ge=0;else if(ee.type===V.IncrementalSnapshot){if(ee.data.source===W.Mutation&&ee.data.isAttachIframe)return;Ge++;let xe=r&&Ge>=r,ce=n&&pe&&ee.timestamp-pe.timestamp>n;(xe||ce)&&ya(!0)}};let Ct=ae=>{Te({type:V.IncrementalSnapshot,data:p({source:W.Mutation},ae)})},jn=ae=>Te({type:V.IncrementalSnapshot,data:p({source:W.Scroll},ae)}),s_=ae=>Te({type:V.IncrementalSnapshot,data:p({source:W.CanvasMutation},ae)}),o_=ae=>Te({type:V.IncrementalSnapshot,data:p({source:W.AdoptedStyleSheet},ae)}),yn=new tl({mutationCb:Ct,adoptedStyleSheetCb:o_}),En=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Ju:new Qu({mirror:At,mutationCb:Ct,stylesheetManager:yn,recordCrossOriginIframes:j,wrappedEmit:Te});for(let ae of w||[])ae.getMirror&&ae.getMirror({nodeMirror:At,crossOriginIframeMirror:En.crossOriginIframeMirror,crossOriginIframeStyleMirror:En.crossOriginIframeStyleMirror});let _a=new nl,Sa=Zv(Y,{mirror:At,win:window,mutationCb:ae=>Te({type:V.IncrementalSnapshot,data:p({source:W.CanvasMutation},ae)}),recordCanvas:P,blockClass:i,blockSelector:s,unblockSelector:o,maxCanvasSize:Q,sampling:E.canvas,dataURLOptions:C,errorHandler:R}),ts=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Zu:new el({mutationCb:Ct,scrollCb:jn,bypassOptions:{onMutation:K,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:m,inlineStylesheet:h,maskInputOptions:Oe,dataURLOptions:C,maskAttributeFn:N,maskTextFn:D,maskInputFn:F,recordCanvas:P,inlineImages:T,sampling:E,slimDOMOptions:Zt,iframeManager:En,stylesheetManager:yn,canvasManager:Sa,keepIframeSrcFn:y,processedNodeManager:_a,ignoreCSSAttributes:M},mirror:At}),ya=(ae=!1)=>{if(!A)return;Te({type:V.Meta,data:{href:window.location.href,width:ug(),height:cg()}},ae),yn.reset(),ts.init(),Or.forEach(ee=>ee.lock());let gt=Cv(document,{mirror:At,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:m,inlineStylesheet:h,maskAllInputs:Oe,maskAttributeFn:N,maskInputFn:F,maskTextFn:D,slimDOM:Zt,dataURLOptions:C,recordCanvas:P,inlineImages:T,onSerialize:ee=>{pg(ee,At)&&En.addIframe(ee),fg(ee,At)&&yn.trackLinkElement(ee),qu(ee)&&ts.addShadowRoot(ee.shadowRoot,document)},onIframeLoad:(ee,xe)=>{En.attachIframe(ee,xe),ee.contentWindow&&Sa.addWindow(ee.contentWindow),ts.observeAttachShadow(ee)},onStylesheetLoad:(ee,xe)=>{yn.attachLinkElement(ee,xe)},onBlockedImageLoad:(ee,xe,{width:ce,height:Ur})=>{Ct({adds:[],removes:[],texts:[],attributes:[{id:xe.id,attributes:{style:{width:`${ce}px`,height:`${Ur}px`}}}]})},keepIframeSrcFn:y,ignoreCSSAttributes:M});if(!gt)return console.warn("Failed to snapshot the document");Te({type:V.FullSnapshot,data:{node:gt,initialOffset:ag(window)}}),Or.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&yn.adoptStyleSheets(document.adoptedStyleSheets,At.getId(document))};ra=ya;try{let ae=[],gt=xe=>re(Xv)({onMutation:K,mutationCb:Ct,mousemoveCb:(ce,Ur)=>Te({type:V.IncrementalSnapshot,data:{source:Ur,positions:ce}}),mouseInteractionCb:ce=>Te({type:V.IncrementalSnapshot,data:p({source:W.MouseInteraction},ce)}),scrollCb:jn,viewportResizeCb:ce=>Te({type:V.IncrementalSnapshot,data:p({source:W.ViewportResize},ce)}),inputCb:ce=>Te({type:V.IncrementalSnapshot,data:p({source:W.Input},ce)}),mediaInteractionCb:ce=>Te({type:V.IncrementalSnapshot,data:p({source:W.MediaInteraction},ce)}),styleSheetRuleCb:ce=>Te({type:V.IncrementalSnapshot,data:p({source:W.StyleSheetRule},ce)}),styleDeclarationCb:ce=>Te({type:V.IncrementalSnapshot,data:p({source:W.StyleDeclaration},ce)}),canvasMutationCb:s_,fontCb:ce=>Te({type:V.IncrementalSnapshot,data:p({source:W.Font},ce)}),selectionCb:ce=>{Te({type:V.IncrementalSnapshot,data:p({source:W.Selection},ce)})},customElementCb:ce=>{Te({type:V.IncrementalSnapshot,data:p({source:W.CustomElement},ce)})},blockClass:i,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:m,maskInputOptions:Oe,inlineStylesheet:h,sampling:E,recordDOM:A,recordCanvas:P,inlineImages:T,userTriggeredOnInput:G,collectFonts:ge,doc:xe,maskAttributeFn:N,maskInputFn:F,maskTextFn:D,keepIframeSrcFn:y,blockSelector:s,unblockSelector:o,slimDOMOptions:Zt,dataURLOptions:C,mirror:At,iframeManager:En,stylesheetManager:yn,shadowDomManager:ts,processedNodeManager:_a,canvasManager:Sa,ignoreCSSAttributes:M,plugins:w?.filter(ce=>ce.observer)?.map(ce=>({observer:ce.observer,options:ce.options,callback:Ur=>Te({type:V.Plugin,data:{plugin:ce.name,payload:Ur}})}))||[]},{});En.addLoadListener(xe=>{try{ae.push(gt(xe.contentDocument))}catch(ce){console.warn(ce)}});let ee=()=>{ya(),ae.push(gt(document))};return document.readyState==="interactive"||document.readyState==="complete"?ee():(ae.push(je("DOMContentLoaded",()=>{Te({type:V.DomContentLoaded,data:{}}),Z==="DOMContentLoaded"&&ee()})),ae.push(je("load",()=>{Te({type:V.Load,data:{}}),Z==="load"&&ee()},window))),()=>{ae.forEach(xe=>xe()),_a.destroy(),ra=void 0,Uv()}}catch(ae){console.warn(ae)}}function Qv(t){if(!ra)throw new Error("please take full snapshot after start recording");ra(t)}Qt.mirror=At;Qt.takeFullSnapshot=Qv;function Zv(t,e){try{return t?t(e):new na}catch{return console.warn("Unable to initialize CanvasManager"),new na}}var jh;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(jh||(jh={}));var eI=3,tI=5;function El(t){return t>9999999999?t:t*1e3}function Bu(t){return t>9999999999?t/1e3:t}function Zi(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:V.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:He(e,10,1e3)}}),e.category==="console")))}var nI="button,a";function Eg(t){return t.closest(nI)||t}function Tg(t){let e=bg(t);return!e||!(e instanceof Element)?e:Eg(e)}function bg(t){return rI(t)?t.target:t}function rI(t){return typeof t=="object"&&!!t&&"target"in t}var _n;function iI(t){return _n||(_n=[],sI()),_n.push(t),()=>{let e=_n?_n.indexOf(t):-1;e>-1&&_n.splice(e,1)}}function sI(){be(me,"open",function(t){return function(...e){if(_n)try{_n.forEach(n=>n())}catch{}return t.apply(me,e)}})}var oI=new Set([W.Mutation,W.StyleSheetRule,W.StyleDeclaration,W.AdoptedStyleSheet,W.CanvasMutation,W.Selection,W.MediaInteraction]);function aI(t,e,n){t.handleClick(e,n)}var rl=class{constructor(e,n,r=Zi){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=iI(()=>{this._lastMutation=Gh()});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(uI(n,this._ignoreSelector)||!lI(e))return;let r={timestamp:Bu(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=Bu(e)}registerScroll(e=Date.now()){this._lastScroll=Bu(e)}registerClick(e){let n=Eg(e);this._handleMultiClick(n)}_handleMultiClick(e){this._getClicks(e).forEach(n=>{n.clickCount++})}_getClicks(e){return this._clicks.filter(n=>n.node===e)}_checkClicks(){let e=[],n=Gh();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",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:v(p({},a.data),{url:me.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1})};this._addBreadcrumbEvent(n,l);return}if(o>1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:v(p({},a.data),{url:me.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0})};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=zn(()=>this._checkClicks(),1e3)}},cI=["A","BUTTON","INPUT"];function uI(t,e){return!!(!cI.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 lI(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function Gh(){return Date.now()/1e3}function dI(t,e){try{if(!pI(e))return;let{source:n}=e.data;if(oI.has(n)&&t.registerMutation(e.timestamp),n===W.Scroll&&t.registerScroll(e.timestamp),fI(e)){let{type:r,id:i}=e.data,s=Qt.mirror.getNode(i);s instanceof HTMLElement&&r===We.Click&&t.registerClick(s)}}catch{}}function pI(t){return t.type===eI}function fI(t){return t.data.source===W.MouseInteraction}function zt(t){return p({timestamp:Date.now()/1e3,type:"default"},t)}var Tl=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Tl||{}),mI=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function hI(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(mI.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),e[r]=t[n]}return e}var gI=t=>e=>{if(!t.isEnabled())return;let n=_I(e);if(!n)return;let r=e.name==="click",i=r?e.event:void 0;r&&t.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&aI(t.clickDetector,n,Tg(e.event)),Zi(t,n)};function vg(t,e){let n=Qt.mirror.getId(t),r=n&&Qt.mirror.getNode(n),i=r&&Qt.mirror.getMeta(r),s=i&&yI(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===Tl.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:hI(s.attributes)}}:{}}}function _I(t){let{target:e,message:n}=SI(t);return zt(p({category:`ui.${t.name}`},vg(e,n)))}function SI(t){let e=t.name==="click",n,r=null;try{r=e?Tg(t.event):bg(t.event),n=ye(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function yI(t){return t.type===Tl.Element}function EI(t,e){if(!t.isEnabled())return;t.updateUserActivity();let n=TI(e);n&&Zi(t,n)}function TI(t){let{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:o}=t;if(!o||bI(o)||!s)return null;let a=e||r||i,c=s.length===1;if(!a&&c)return null;let u=ye(o,{maxStringLength:200})||"<unknown>",l=vg(o,u);return zt({category:"ui.keyDown",message:u,data:v(p({},l.data),{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s})})}function bI(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}var vI={resource:CI,paint:RI,navigation:AI};function Hu(t,e){return({metric:n})=>void e.replayPerformanceEntries.push(t(n))}function II(t){return t.map(wI).filter(Boolean)}function wI(t){let e=vI[t.entryType];return e?e(t):null}function Lr(t){return((Se()||me.performance.timeOrigin)+t)/1e3}function RI(t){let{duration:e,entryType:n,name:r,startTime:i}=t,s=Lr(i);return{type:n,name:r,start:s,end:s+e,data:void 0}}function AI(t){let{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:m,transferSize:h,type:g}=t;return i===0?null:{type:`${e}.${g}`,start:Lr(m),end:Lr(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:s,redirectCount:f}}}function CI(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:Lr(s),end:Lr(i),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function NI(t){let e=t.entries[t.entries.length-1],n=e?.element?[e.element]:void 0;return bl(t,"largest-contentful-paint",n)}function MI(t){return t.sources!==void 0}function kI(t){let e=[],n=[];for(let r of t.entries)if(MI(r)){let i=[];for(let s of r.sources)if(s.node){n.push(s.node);let o=Qt.mirror.getId(s.node);o&&i.push(o)}e.push({value:r.value,nodeIds:i.length?i:void 0})}return bl(t,"cumulative-layout-shift",n,e)}function xI(t){let e=t.entries[t.entries.length-1],n=e?.target?[e.target]:void 0;return bl(t,"interaction-to-next-paint",n)}function bl(t,e,n,r){let i=t.value,s=t.rating,o=Lr(i);return{type:"web-vital",name:e,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:n?n.map(a=>Qt.mirror.getId(a)):void 0,attributions:r}}}function OI(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(st(i,n))}),r.push($n(Hu(NI,t)),Hn(Hu(kI,t)),Ni(Hu(xI,t))),()=>{r.forEach(i=>i())}}var $=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,PI='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(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,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=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:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<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 s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,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[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(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[s[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=w,P=p,Q=y,R=g;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,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<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(s[t]^s[t+1]<<A^s[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||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++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|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function DI(){let t=new Blob([PI]);return URL.createObjectURL(t)}var qh=["log","warn","error"],Yo="[Replay] ";function $u(t,e="info"){dt({category:"console",data:{logger:"replay"},level:e,message:`${Yo}${t}`},{level:e})}function LI(){let t=!1,e=!1,n={exception:()=>{},infoTick:()=>{},setConfig:r=>{t=!!r.captureExceptions,e=!!r.traceInternals}};return $?(qh.forEach(r=>{n[r]=(...i)=>{_[r](Yo,...i),e&&$u(i.join(""),bi(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),_.error(Yo,r),t?fn(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):e&&$u(r,"error")},n.infoTick=(...r)=>{_.log(Yo,...r),e&&setTimeout(()=>$u(r[0]),0)}):qh.forEach(r=>{n[r]=()=>{}}),n}var z=LI(),Yi=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${ml}.`)}},ia=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 q(this,null,function*(){let n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>ml)throw new Yi;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?El(e):null}},il=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(){$&&z.log("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){$&&z.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++}},sl=class{constructor(e){this._worker=new il(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=El(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(e);return this._totalSize+=r.length,this._totalSize>ml?Promise.reject(new Yi):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{$&&z.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}_finishRequest(){return q(this,null,function*(){let e=yield this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e})}},ol=class{constructor(e){this._fallback=new ia,this._compression=new sl(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 q(this,null,function*(){return yield this.ensureWorkerIsLoaded(),this._used.finish()})}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}_ensureWorkerIsLoaded(){return q(this,null,function*(){try{yield this._compression.ensureReady()}catch(e){$&&z.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}yield this._switchToCompressionWorker()})}_switchToCompressionWorker(){return q(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){$&&z.exception(s,"Failed to add events when switching buffers.")}})}};function FI({useCompression:t,workerUrl:e}){if(t&&window.Worker){let n=UI(e);if(n)return n}return $&&z.log("Using simple buffer"),new ia}function UI(t){try{let e=t||BI();if(!e)return;$&&z.log(`Using compression worker${t?` from ${t}`:""}`);let n=new Worker(e);return new ol(n)}catch(e){$&&z.exception(e,"Failed to create compression worker")}}function BI(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?DI():""}function vl(){try{return"sessionStorage"in me&&!!me.sessionStorage}catch{return!1}}function HI(t){$I(),t.session=void 0}function $I(){if(vl())try{me.sessionStorage.removeItem(pl)}catch{}}function Ig(t){return t===void 0?!1:Math.random()<t}function da(t){if(vl())try{me.sessionStorage.setItem(pl,JSON.stringify(t))}catch{}}function wg(t){let e=Date.now(),n=t.id||ve(),r=t.started||e,i=t.lastActivity||e,s=t.segmentId||0,o=t.sampled,a=t.previousSessionId,c=t.dirty||!1;return{id:n,started:r,lastActivity:i,segmentId:s,sampled:o,previousSessionId:a,dirty:c}}function zI(t,e){return Ig(t)?"session":e?"buffer":!1}function Vh({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){let i=zI(t,e),s=wg({sampled:i,previousSessionId:r});return n&&da(s),s}function WI(){if(!vl())return null;try{let t=me.sessionStorage.getItem(pl);if(!t)return null;let e=JSON.parse(t);return $&&z.infoTick("Loading existing session"),wg(e)}catch{return null}}function al(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 al(t.started,e,r)||al(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 zu({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){let i=r.stickySession&&WI();return i?Ag(i,{sessionIdleExpire:t,maxReplayDuration:e})?($&&z.infoTick("Session in sessionStorage is expired, creating new one..."),Vh(r,{previousSessionId:i.id})):i:($&&z.infoTick("Creating new session"),Vh(r,{previousSessionId:n}))}function jI(t){return t.type===V.Custom}function Il(t,e,n){return Ng(t,e)?(Cg(t,e,n),!0):!1}function GI(t,e,n){return Ng(t,e)?Cg(t,e,n):Promise.resolve(null)}function Cg(t,e,n){return q(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=qI(e,s.beforeAddRecordingEvent);return o?yield r.addEvent(o):void 0}catch(s){let o=s&&s instanceof Yi,a=o?"addEventSizeExceeded":"addEvent",c=k();if(c){let u=o?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(o&&i)return r.clear(),r.waitForCheckout=!0,null;t.handleException(s),yield t.stop({reason:a})}})}function Ng(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;let n=El(e.timestamp);return n+t.timeouts.sessionIdlePause<Date.now()?!1:n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration?($&&z.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function qI(t,e){try{if(typeof e=="function"&&jI(t))return e(t)}catch(n){return $&&z.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return t}function wl(t){return!t.type}function cl(t){return t.type==="transaction"}function VI(t){return t.type==="replay_event"}function Kh(t){return t.type==="feedback"}function KI(t){return(e,n)=>{if(!t.isEnabled()||!wl(e)&&!cl(e))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(cl(e)){YI(t,e);return}XI(t,e)}}}function YI(t,e){let n=t.getContext();e.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}function XI(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)||zn(()=>q(null,null,function*(){try{yield t.sendBufferedReplayOrFlush()}catch(i){t.handleException(i)}}))}function JI(t){return e=>{!t.isEnabled()||!wl(e)||QI(t,e)}}function QI(t,e){let n=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=zt({category:"replay.hydrate-error",data:{url:et()}});Zi(t,r)}}function ZI(t){let e=k();e&&e.on("beforeAddBreadcrumb",n=>ew(t,n))}function ew(t,e){if(!t.isEnabled()||!Mg(e))return;let n=tw(e);n&&Zi(t,n)}function tw(t){return!Mg(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")?null:t.category==="console"?nw(t):zt(t)}function nw(t){let e=t.data?.arguments;if(!Array.isArray(e)||e.length===0)return zt(t);let n=!1,r=e.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Go?(n=!0,`${i.slice(0,Go)}\u2026`):i;if(typeof i=="object")try{let s=He(i,7);return JSON.stringify(s).length>Go?(n=!0,`${JSON.stringify(s,null,2).slice(0,Go)}\u2026`):s}catch{}return i});return zt(v(p({},t),{data:p(v(p({},t.data),{arguments:r}),n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{})}))}function Mg(t){return!!t.category}function rw(t,e){return t.type||!t.exception?.values?.length?!1:!!e.originalException?.__rrweb__}function kg(){let t=B().getPropagationContext().dsc;t&&delete t.replay_id;let e=ue();if(e){let n=Me(e);delete n.replay_id}}function iw(t,e){t.triggerUserActivity(),t.addUpdate(()=>e.timestamp?(t.throttledAddEvent({type:V.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 sw(t,e){return t.recordingMode!=="buffer"||e.message===fl||!e.exception||e.type?!1:Ig(t.getOptions().errorSampleRate)}function ow(t){return Object.assign((e,n)=>{if(!t.isEnabled()||t.isPaused())return e;if(VI(e))return delete e.breadcrumbs,e;if(!wl(e)&&!cl(e)&&!Kh(e))return e;if(!t.checkAndHandleExpiredSession())return kg(),e;if(Kh(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),iw(t,e),e;if(rw(e,n)&&!t.getOptions()._experiments.captureExceptions)return $&&z.log("Ignoring error from rrweb internals",e),null;let i=sw(t,e);if((i||t.recordingMode==="session")&&(e.tags=v(p({},e.tags),{replayId:t.getSessionId()})),i&&t.recordingMode==="buffer"&&t.session?.sampled==="buffer"){let o=t.session;o.dirty=!0,t.getOptions().stickySession&&da(o)}return e},{id:"Replay"})}function pa(t,e){return e.map(({type:n,start:r,end:i,name:s,data:o})=>{let a=t.throttledAddEvent({type:V.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:i,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function aw(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 cw(t){return e=>{if(!t.isEnabled())return;let n=aw(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(pa(t,[n]),!1)))}}function uw(t,e){return $&&t.getOptions()._experiments.traceInternals?!1:Qc(e,k())}function xg(t,e){t.isEnabled()&&e!==null&&(uw(t,e.name)||t.addUpdate(()=>(pa(t,[e]),!0)))}function fa(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=Bo(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function Og(t){if(!t)return;let e=parseInt(t,10);return isNaN(e)?void 0:e}function sa(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};let n=p({},t._meta),r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function Pg(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:{method:s,statusCode:o,request:a,response:c}}}function Xi(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Sn(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}=lw(n);return r.body=i,s?.length&&(r._meta={warnings:s}),r}function ul(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 lw(t){if(!t||typeof t!="string")return{body:t};let e=t.length>Nh,n=dw(t);if(e){let r=t.slice(0,Nh);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 dw(t){let e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function oa(t,e){let n=pw(t);return Ye(n,e)}function pw(t,e=me.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(me.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 fw(t,e,n){return q(this,null,function*(){try{let r=yield hw(t,e,n),i=Pg("resource.fetch",r);xg(n.replay,i)}catch(r){$&&z.exception(r,"Failed to capture fetch breadcrumb")}})}function mw(t,e){let{input:n,response:r}=e,i=n?$o(n):void 0,s=fa(i),o=r?Og(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 hw(t,e,n){return q(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:l}=t.data,d=oa(o,n.networkDetailAllowUrls)&&!oa(o,n.networkDetailDenyUrls),f=d?gw(n,e.input,u):Xi(u),m=yield _w(d,n,e.response,l);return{startTimestamp:i,endTimestamp:s,url:o,method:a,statusCode:c,request:f,response:m}})}function gw({networkCaptureBodies:t,networkRequestHeaders:e},n,r){let i=n?Ew(n,e):{};if(!t)return Sn(i,r,void 0);let s=$o(n),[o,a]=Ho(s,z),c=Sn(i,r,o);return a?sa(c,a):c}function _w(s,o,a,c){return q(this,arguments,function*(t,{networkCaptureBodies:e,networkResponseHeaders:n},r,i){if(!t&&i!==void 0)return Xi(i);let u=r?Dg(r.headers,n):{};if(!r||!e&&i!==void 0)return Sn(u,i,void 0);let[l,d]=yield yw(r),f=Sw(l,{networkCaptureBodies:e,responseBodySize:i,captureDetails:t,headers:u});return d?sa(f,d):f})}function Sw(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:i}){try{let s=t?.length&&n===void 0?fa(t):n;return r?e?Sn(i,s,t):Sn(i,s,void 0):Xi(s)}catch(s){return $&&z.exception(s,"Failed to serialize response body"),Sn(i,n,void 0)}}function yw(t){return q(this,null,function*(){let e=Tw(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{return[yield bw(e)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?($&&z.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):($&&z.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}})}function Dg(t,e){let n={};return e.forEach(r=>{t.get(r)&&(n[r]=t.get(r))}),n}function Ew(t,e){return t.length===1&&typeof t[0]!="string"?Yh(t[0],e):t.length===2?Yh(t[1],e):{}}function Yh(t,e){if(!t)return{};let n=t.headers;return n?n instanceof Headers?Dg(n,e):Array.isArray(n)?{}:ul(n,e):{}}function Tw(t){try{return t.clone()}catch(e){$&&z.exception(e,"Failed to clone response body")}}function bw(t){return new Promise((e,n)=>{let r=zn(()=>n(new Error("Timeout while trying to read response body")),500);vw(t).then(i=>e(i),i=>n(i)).finally(()=>clearTimeout(r))})}function vw(t){return q(this,null,function*(){return yield t.text()})}function Iw(t,e,n){return q(this,null,function*(){try{let r=Rw(t,e,n),i=Pg("resource.xhr",r);xg(n.replay,i)}catch(r){$&&z.exception(r,"Failed to capture xhr breadcrumb")}})}function ww(t,e){let{xhr:n,input:r}=e;if(!n)return;let i=fa(r),s=n.getResponseHeader("content-length")?Og(n.getResponseHeader("content-length")):Nw(n.response,n.responseType);i!==void 0&&(t.data.request_body_size=i),s!==void 0&&(t.data.response_body_size=s)}function Rw(t,e,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:a}=e,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:f}=t.data;if(!c)return null;if(!a||!oa(c,n.networkDetailAllowUrls)||oa(c,n.networkDetailDenyUrls)){let O=Xi(d),E=Xi(f);return{startTimestamp:i,endTimestamp:s,url:c,method:u,statusCode:l,request:O,response:E}}let m=a[Rt],h=m?ul(m.request_headers,n.networkRequestHeaders):{},g=ul(Pi(a),n.networkResponseHeaders),[S,b]=n.networkCaptureBodies?Ho(o,z):[void 0],[N,F]=n.networkCaptureBodies?Aw(a):[void 0],D=Sn(h,d,S),Q=Sn(g,f,N);return{startTimestamp:i,endTimestamp:s,url:c,method:u,statusCode:l,request:b?sa(D,b):D,response:F?sa(Q,F):Q}}function Aw(t){let e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return Cw(t.response,t.responseType)}catch(n){e.push(n)}return $&&z.warn("Failed to get xhr response body",...e),[void 0]}function Cw(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 $&&z.exception(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return $&&z.log("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Nw(t,e){try{let n=e==="json"&&t&&typeof t=="object"?JSON.stringify(t):t;return fa(n)}catch{return}}function Mw(t){let e=k();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)=>kw(a,c,u))}catch{}}function kw(t,e,n){if(e.data)try{xw(e)&&Pw(n)&&(ww(e,n),Iw(e,n,t)),Ow(e)&&Dw(n)&&(mw(e,n),fw(e,n,t))}catch(r){$&&z.exception(r,"Error when enriching network breadcrumb")}}function xw(t){return t.category==="xhr"}function Ow(t){return t.category==="fetch"}function Pw(t){return t?.xhr}function Dw(t){return t?.response}function Lw(t){let e=k();xi(gI(t)),Xt(cw(t)),ZI(t),Mw(t);let n=ow(t);uo(n),e&&(e.on("beforeSendEvent",JI(t)),e.on("afterSendEvent",KI(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)=>q(null,null,function*(){let s=t.getSessionId();i?.includeReplay&&t.isEnabled()&&s&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&(yield t.sendBufferedReplayOrFlush()),r.contexts.feedback.replay_id=s)})),e.on("openFeedbackWidget",()=>q(null,null,function*(){yield t.sendBufferedReplayOrFlush()})))}function Fw(t){return q(this,null,function*(){try{return Promise.all(pa(t,[Uw(me.performance.memory)]))}catch{return[]}})}function Uw(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 Bw(t,e,n){return eu(t,e,v(p({},n),{setTimeoutImpl:zn}))}var Ko=U.navigator;function Hw(){return/iPhone|iPad|iPod/i.test(Ko?.userAgent??"")||/Macintosh/i.test(Ko?.userAgent??"")&&Ko?.maxTouchPoints&&Ko?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function $w(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession()){$&&z.warn("Received replay event after session expired.");return}let i=r||!e;e=!0,t.clickDetector&&dI(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&i&&t.setInitialState(),!Il(t,n,i))return!0;if(!i)return!1;let s=t.session;if(Ww(t,i),t.recordingMode==="buffer"&&s&&t.eventBuffer&&!s.dirty){let o=t.eventBuffer.getEarliestTimestamp();o&&($&&z.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),s.started=o,t.getOptions().stickySession&&da(s))}return s?.previousSessionId||t.recordingMode==="session"&&t.flush(),!0})}}function zw(t){let e=t.getOptions();return{type:V.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 Ww(t,e){!e||!t.session||t.session.segmentId!==0||Il(t,zw(t),!1)}function jw(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}function Gw(t,e,n,r){return $e(ui(t,lr(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function qw({recordingData:t,headers:e}){let n,r=`${JSON.stringify(e)}
`;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 Vw(i){return q(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 di(t.getOptions(),r,o,e,t,Ae());if(!a)return null;t.emit("postprocessEvent",a,o),a.platform=a.platform||"javascript";let c=t.getSdkMetadata(),{name:u,version:l,settings:d}=c?.sdk||{};return a.sdk=v(p({},a.sdk),{name:u||"sentry.javascript.unknown",version:l||"0.0.0",settings:d}),a})}function Kw(o){return q(this,arguments,function*({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){let a=qw({recordingData:t,headers:{segment_id:n}}),{urls:c,errorIds:u,traceIds:l,initialTimestamp:d}=r,f=k(),m=B(),h=f?.getTransport(),g=f?.getDsn();if(!f||!h||!g||!s.sampled)return Promise.resolve({});let S={type:Fb,replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:u,trace_ids:l,urls:c,replay_id:e,segment_id:n,replay_type:s.sampled},b=yield Vw({scope:m,client:f,replayId:e,event:S});if(!b)return f.recordDroppedEvent("event_processor","replay"),$&&z.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete b.sdkProcessingMetadata;let N=Gw(b,a,g,f.getOptions().tunnel),F;try{F=yield h.send(N)}catch(Q){let O=new Error(fl);try{O.cause=Q}catch{}throw O}if(typeof F.statusCode=="number"&&(F.statusCode<200||F.statusCode>=300))throw new aa(F.statusCode);let D=Si({},F);if(_i(D,"replay"))throw new Ji(D);return F})}var aa=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},Ji=class extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}};function Lg(n){return q(this,arguments,function*(t,e={count:0,interval:Wb}){let{recordingData:r,onError:i}=t;if(r.length)try{return yield Kw(t),!0}catch(s){if(s instanceof aa||s instanceof Ji)throw s;if(fr("Replays",{_retryCount:e.count}),i&&i(s),e.count>=jb){let o=new Error(`${fl} - max retries exceeded`);try{o.cause=s}catch{}throw o}return e.interval*=++e.count,new Promise((o,a)=>{zn(()=>q(null,null,function*(){try{yield Lg(t,e),o(!0)}catch(c){a(c)}}),e.interval)})}})}var Fg="__THROTTLED",Yw="__SKIPPED";function Xw(t,e,n){let r=new Map,i=a=>{let c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},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 l=o;return o=!0,l?Yw:Fg}o=!1;let u=r.get(c)||0;return r.set(c,u+1),t(...a)}}var ll=class{constructor({options:e,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Ub,sessionIdleExpire:Bb},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=Bw(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Xw((o,a)=>GI(this,o,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),s=r?{threshold:Math.min(Gb,r),timeout:r,scrollTimeout:qb,ignoreSelector:i?i.join(","):""}:void 0;if(s&&(this.clickDetector=new rl(this,s)),$){let o=e._experiments;z.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{me.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let o=zt({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{let o=zt({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{EI(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){$&&z.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){$&&z.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",$&&z.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){$&&z.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){$&&z.log("Buffering is in progress, call `flush()` to save the replay");return}$&&z.infoTick("Starting replay in session mode"),this._updateUserActivity();let e=zu({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){$&&z.log("Buffering is in progress, call `flush()` to save the replay");return}$&&z.infoTick("Starting replay in buffer mode");let e=zu({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=Qt(p(v(p(v(p(p({},this._recordingOptions),this.recordingMode==="buffer"?{checkoutEveryNms:zb}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)}),{emit:$w(this)}),Hw()),{onMutation:this._onMutationHandler.bind(this)}),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 q(this,arguments,function*({forceFlush:e=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{$&&z.log(`Stopping Replay${n?` triggered by ${n}`:""}`),kg(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&(yield this._flush({force:!0})),this.eventBuffer?.destroy(),this.eventBuffer=null,HI(this)}catch(r){this.handleException(r)}}})}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),$&&z.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),$&&z.log("Resuming replay"))}sendBufferedReplayOrFlush(){return q(this,arguments,function*({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();$&&z.log("Converting buffer to session"),yield this.flushImmediate();let r=this.stopRecording();!e||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())})}addUpdate(e){let n=e();this.recordingMode==="buffer"||!this._isEnabled||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(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&al(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${me.location.pathname}${me.location.hash}${me.location.search}`,n=`${me.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===Fg){let i=zt({category:"replay.throttled"});this.addUpdate(()=>!Il(this,{type:tI,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){let e=this.lastActiveSpan||ue(),n=e&&se(e),i=(n&&L(n).data||{})[he];if(!(!n||!i||!["route","custom"].includes(i)))return L(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=FI({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=zu({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 q(this,null,function*(){this._isEnabled&&(yield this.stop({reason:"refresh session"}),this.initializeSampling(e.id))})}_addListeners(){try{me.document.addEventListener("visibilitychange",this._handleVisibilityChange),me.addEventListener("blur",this._handleWindowBlur),me.addEventListener("focus",this._handleWindowFocus),me.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Lw(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=OI(this)}_removeListeners(){try{me.document.removeEventListener("visibilitychange",this._handleVisibilityChange),me.removeEventListener("blur",this._handleWindowBlur),me.removeEventListener("focus",this._handleWindowFocus),me.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(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()){$&&z.log("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:V.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=II(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(pa(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)}_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 q(this,null,function*(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){$&&z.error("No session or eventBuffer found to flush.");return}if(yield this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(yield Fw(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 Lg({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=k();if(r){let i=n instanceof Ji?"ratelimit_backoff":"send_error";r.recordDroppedEvent(i,"replay")}}})}_flush(){return q(this,arguments,function*({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){$&&z.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();let s=i<this._options.minReplayDuration,o=i>this._options.maxReplayDuration+5e3;if(s||o){$&&z.log(`Session duration (${Math.floor(i/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&$&&z.log("Flushing initial segment without checkout.");let c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{yield this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}})}_maybeSaveSession(){this.session&&this._options.stickySession&&da(this.session)}_onMutationHandler(e){let{ignoreMutations:n}=this._options._experiments;if(n?.length&&e.some(a=>{let c=jw(a.target),u=n.join(",");return c?.matches(u)}))return!1;let r=e.length,i=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,o=i&&r>i;if(r>s||o){let a=zt({category:"replay.mutations",data:{count:r,limit:o}});this._createCustomBreadcrumb(a)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function $i(t,e){return[...t,...e].join(",")}function Jw({mask:t,unmask:e,block:n,unblock:r,ignore:i}){let s=["base","iframe[srcdoc]:not([src])"],o=$i(t,[".sentry-mask","[data-sentry-mask]"]),a=$i(e,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:$i(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:$i(r,[]),ignoreSelector:$i(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Qw({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 Xh='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Zw=["content-length","content-type","accept"],Jh=!1,Rl=t=>new dl(t),dl=class{constructor({flushMinDelay:e=Hb,flushMaxDelay:n=$b,minReplayDuration:r=Vb,maxReplayDuration:i=Mh,stickySession:s=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:l=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:m=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:b=[],networkCaptureBodies:N=!0,networkRequestHeaders:F=[],networkResponseHeaders:D=[],mask:Q=[],maskAttributes:O=["title","placeholder","aria-label"],unmask:E=[],block:C=[],unblock:ne=[],ignore:A=[],maskFn:P,beforeAddRecordingEvent:j,beforeErrorSampling:Z,onError:G}={}){this.name="Replay";let ge=Jw({mask:Q,unmask:E,block:C,unblock:ne,ignore:A});if(this._recordingOptions=v(p({maskAllInputs:l,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:P,maskInputFn:P,maskAttributeFn:(T,w,y)=>Qw({maskAttributes:O,maskAllText:u,privacyOptions:ge,key:T,value:w,el:y})},ge),{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:T=>{try{T.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes}),this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(r,Kb),maxReplayDuration:Math.min(i,Mh),stickySession:s,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:l,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:m,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:S,networkDetailDenyUrls:b,networkCaptureBodies:N,networkRequestHeaders:Qh(F),networkResponseHeaders:Qh(D),beforeAddRecordingEvent:j,beforeErrorSampling:Z,onError:G,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Xh}`:Xh,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Er())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Jh}set _isInitialized(e){Jh=e}afterAllSetup(e){!Er()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){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(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let n=eR(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{}}};function eR(t,e){let n=e.getOptions(),r=p({sessionSampleRate:0,errorSampleRate:0},t),i=rt(n.replaysSessionSampleRate),s=rt(n.replaysOnErrorSampleRate);return i==null&&s==null&&Pe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),s!=null&&(r.errorSampleRate=s),r}function Qh(t){return[...Zw,...t.map(e=>e.toLowerCase())]}function Ug(t){return t.split(",").some(e=>e.trim().startsWith("sentry-"))}function Al(t){try{return new URL(t,H.location.origin).href}catch{return}}function Bg(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Cl(t){try{return new Headers(t)}catch{return}}var Hg=new WeakMap,Nl=new Map,Ml={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function zg(t,e){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}=p(p({},Ml),e),l=typeof s=="function"?s:h=>!0,d=h=>tR(h,a),f={},m=t.getOptions().propagateTraceparent;n&&(t.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(g=>{if(g.op==="http.client"){let S=Nl.get(g.span_id);S&&(g.timestamp=S/1e3,Nl.delete(g.span_id))}}),h)),i&&cu(h=>{if(h.response){let g=Hg.get(h.response);g&&h.endTimestamp&&Nl.set(g,h.endTimestamp)}}),wi(h=>{let g=su(h,l,d,f,{propagateTraceparent:m,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&Hg.set(h.response,h.fetchData.__span),g){let S=Al(h.fetchData.url),b=S?vt(S).host:void 0;g.setAttributes({"http.url":S,"server.address":b}),o&&$g(g),c?.(g,{headers:h.headers})}})),r&&Oi(h=>{let g=nR(h,l,d,f,m,u);g&&(o&&$g(g),c?.(g,{headers:Cl(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}function $g(t){let{url:e}=L(t).data;if(!e||typeof e!="string")return;let n=st("resource",({entries:r})=>{r.forEach(i=>{Bg(i)&&i.name.endsWith(e)&&(t.setAttributes(ki(i)),setTimeout(n))})})}function tR(t,e){let n=et();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?Ye(r.toString(),e)||s&&Ye(r.pathname,e):s}else{let r=!!t.match(/^\/(?!\/)/);return e?Ye(t,e):r}}function nR(t,e,n,r,i,s){let o=t.xhr,a=o?.[Rt];if(!o||o.__sentry_own_request__||!a)return;let{url:c,method:u}=a,l=Ne()&&e(c);if(t.endTimestamp&&l){let b=o.__sentry_xhr_span_id__;if(!b)return;let N=r[b];N&&a.status_code!==void 0&&(ar(N,a.status_code),N.end(),s?.(N,{headers:Cl(Pi(o)),error:t.error}),delete r[b]);return}let d=Al(c),f=d?vt(d):vt(c),m=Ei(c),h=!!ue(),g=l&&h?ze({name:`${u} ${m}`,attributes:p(p({url:c,type:"xhr","http.method":u,"http.url":d,"server.address":f?.host,[te]:"auto.http.browser",[Ce]:"http.client"},f?.search&&{"http.query":f?.search}),f?.hash&&{"http.fragment":f?.hash})}):new Be;o.__sentry_xhr_span_id__=g.spanContext().spanId,r[o.__sentry_xhr_span_id__]=g,n(c)&&rR(o,Ne()&&h?g:void 0,i);let S=k();return S&&S.emit("beforeOutgoingRequestSpan",g,t),g}function rR(t,e,n){let{"sentry-trace":r,baggage:i,traceparent:s}=gr({span:e,propagateTraceparent:n});r&&iR(t,r,i,s)}function iR(t,e,n,r){let i=t.__sentry_xhr_v3__?.request_headers;if(!(i?.["sentry-trace"]||!t.setRequestHeader))try{if(t.setRequestHeader("sentry-trace",e),r&&!i?.traceparent&&t.setRequestHeader("traceparent",r),n){let s=i?.baggage;(!s||!Ug(s))&&t.setRequestHeader("baggage",n)}}catch{}}function Wg(){H.document?H.document.addEventListener("visibilitychange",()=>{let t=ue();if(!t)return;let e=se(t);if(H.document.hidden&&e){let n="cancelled",{op:r,status:i}=L(e);Ee&&_.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()}}):Ee&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var sR=3600,jg="sentry_previous_trace",oR="sentry.previous_trace";function Gg(t,{linkPreviousTrace:e,consistentTraceSampling:n}){let r=e==="session-storage",i=r?uR():void 0;t.on("spanStart",o=>{if(se(o)!==o)return;let a=B().getPropagationContext();i=aR(i,o,a),r&&cR(i)});let s=!0;n&&t.on("beforeSampling",o=>{if(!i)return;let a=B(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext(v(p({},c),{dsc:v(p({},c.dsc),{sample_rate:String(i.sampleRate),sampled:String(kl(i.spanContext))}),sampleRand:i.sampleRand})),o.parentSampled=kl(i.spanContext),o.parentSampleRate=i.sampleRate,o.spanAttributes=v(p({},o.spanAttributes),{[ii]:i.sampleRate})})}function aR(t,e,n){let r=L(e);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[on])}catch{return 0}}let s={spanContext:e.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!t)return s;let o=t.spanContext;return o.traceId===r.trace_id?t:(Date.now()/1e3-t.startTimestamp<=sR&&(Ee&&_.log(`Adding previous_trace ${o} link to span ${p({op:r.op},e.spanContext())}`),e.addLink({context:o,attributes:{[vc]:"previous_trace"}}),e.setAttribute(oR,`${o.traceId}-${o.spanId}-${kl(o)?1:0}`)),s)}function cR(t){try{H.sessionStorage.setItem(jg,JSON.stringify(t))}catch(e){Ee&&_.warn("Could not store previous trace in sessionStorage",e)}}function uR(){try{let t=H.sessionStorage?.getItem(jg);return JSON.parse(t)}catch{return}}function kl(t){return t.traceFlags===1}var lR="BrowserTracing",dR=p(v(p({},pr),{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{}}),Ml),xl=(t={})=>{let e={name:void 0,source:void 0},n=H.document,{enableInp:r,enableElementTiming:i,enableLongTask:s,enableLongAnimationFrame:o,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:l,idleTimeout:d,finalTimeout:f,childSpanTimeout:m,markBackgroundSpan:h,traceFetch:g,traceXHR:S,trackFetchStreamPerformance:b,shouldCreateSpanForRequest:N,enableHTTPTimings:F,ignoreResourceSpans:D,ignorePerformanceApiSpans:Q,instrumentPageLoad:O,instrumentNavigation:E,detectRedirects:C,linkPreviousTrace:ne,consistentTraceSampling:A,enableReportPageLoaded:P,onRequestSpanStart:j,onRequestSpanEnd:Z}=p(p({},dR),t),G,ge,T;function w(y,M,R=!0){let K=M.op==="pageload",Y=M.name,oe=l?l(M):M,X=oe.attributes||{};if(Y!==oe.name&&(X[he]="custom",oe.attributes=X),!R){let pe=tt();ze(v(p({},oe),{startTime:pe})).end(pe);return}e.name=oe.name,e.source=X[he];let Oe=so(oe,{idleTimeout:d,finalTimeout:f,childSpanTimeout:m,disableAutoFinish:K,beforeSpanEnd:pe=>{G?.(),Au(pe,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:D,ignorePerformanceApiSpans:Q}),Vg(y,void 0);let Ge=B(),ke=Ge.getPropagationContext();Ge.setPropagationContext(v(p({},ke),{traceId:Oe.spanContext().traceId,sampled:it(Oe),dsc:Me(pe)})),K&&(T=void 0)},trimIdleSpanEndTimestamp:!P});K&&P&&(T=Oe),Vg(y,Oe);function Zt(){n&&["interactive","complete"].includes(n.readyState)&&y.emit("idleSpanEnableAutoFinish",Oe)}K&&!P&&n&&(n.addEventListener("readystatechange",()=>{Zt()}),Zt())}return{name:lR,setup(y){if(Qs(),G=vu({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:y}),r&&Pu(),i&&Cu(),o&&U.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?wu():s&&Iu(),a&&Ru(),C&&n){let R=()=>{ge=le()};addEventListener("click",R,{capture:!0}),addEventListener("keydown",R,{capture:!0,passive:!0})}function M(){let R=es(y);R&&!L(R).timestamp&&(Ee&&_.log(`[Tracing] Finishing current active span with op: ${L(R).op}`),R.setAttribute(an,"cancelled"),R.end())}y.on("startNavigationSpan",(R,K)=>{if(k()!==y)return;if(K?.isRedirect){Ee&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),w(y,p({op:"navigation.redirect"},R),!1);return}ge=void 0,M(),Ae().setPropagationContext({traceId:Ue(),sampleRand:Math.random(),propagationSpanId:Ne()?void 0:Fe()});let Y=B();Y.setPropagationContext({traceId:Ue(),sampleRand:Math.random(),propagationSpanId:Ne()?void 0:Fe()}),Y.setSDKProcessingMetadata({normalizedRequest:void 0}),w(y,v(p({op:"navigation"},R),{parentSpan:null,forceTransaction:!0}))}),y.on("startPageLoadSpan",(R,K={})=>{if(k()!==y)return;M();let Y=K.sentryTrace||qg("sentry-trace"),oe=K.baggage||qg("baggage"),X=Rc(Y,oe),Oe=B();Oe.setPropagationContext(X),Ne()||(Oe.getPropagationContext().propagationSpanId=Fe()),Oe.setSDKProcessingMetadata({normalizedRequest:Ai()}),w(y,p({op:"pageload"},R))}),y.on("endPageloadSpan",()=>{P&&T&&(T.setAttribute(an,"reportPageLoaded"),T.end())})},afterAllSetup(y){let M=et();if(ne!=="off"&&Gg(y,{linkPreviousTrace:ne,consistentTraceSampling:A}),H.location){if(O){let R=Se();Yg(y,{name:H.location.pathname,startTime:R?R/1e3:void 0,attributes:{[he]:"url",[te]:"auto.pageload.browser"}})}E&&Xt(({to:R,from:K})=>{if(K===void 0&&M?.indexOf(R)!==-1){M=void 0;return}M=void 0;let Y=Un(R),oe=es(y),X=oe&&C&&fR(oe,ge);ma(y,{name:Y?.pathname||H.location.pathname,attributes:{[he]:"url",[te]:"auto.navigation.browser"}},{url:R,isRedirect:X})})}h&&Wg(),a&&pR(y,d,f,m,e),r&&Du(),zg(y,{traceFetch:g,traceXHR:S,trackFetchStreamPerformance:b,tracePropagationTargets:y.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:N,enableHTTPTimings:F,onRequestSpanStart:j,onRequestSpanEnd:Z})}}};function Yg(t,e,n){t.emit("startPageLoadSpan",e,n),B().setTransactionName(e.name);let r=es(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function ma(t,e,n){let{url:r,isRedirect:i}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:i}),t.emit("startNavigationSpan",e,{isRedirect:i});let s=B();return s.setTransactionName(e.name),r&&!i&&s.setSDKProcessingMetadata({normalizedRequest:v(p({},Ai()),{url:r})}),es(t)}function qg(t){return H.document?.querySelector(`meta[name=${t}]`)?.getAttribute("content")||void 0}function pR(t,e,n,r,i){let s=H.document,o,a=()=>{let c="ui.action.click",u=es(t);if(u){let l=L(u).op;if(["navigation","pageload"].includes(l)){Ee&&_.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(an,"interactionInterrupted"),o.end(),o=void 0),!i.name){Ee&&_.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}o=so({name:i.name,op:c,attributes:{[he]:i.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}var Xg="_sentry_idleSpan";function es(t){return t[Xg]}function Vg(t,e){_e(t,Xg,e)}var Kg=1.5;function fR(t,e){let n=L(t),r=tt(),i=n.start_timestamp;return!(r-i>Kg||e&&r-e<=Kg)}var Jg=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__;function hR(t={}){return[Sr(),_r(),Di(),Fi(),Bi(),yr(),Ui(),Li()]}function Qg(t){let e=p({defaultIntegrations:hR()},t);return Ti(e,"angular"),gR(),Fu(e)}function gR(){let e=ba?.major&&parseInt(ba.major,10);e&&(e<14&&Jg&&_.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."),fr("angular",{version:e}))}var _R=typeof Zone<"u"&&Zone.root?.run;function Fr(t){return _R?Zone.root.run(t):t()}function SR(t){return t&&t.ngOriginalError?t.ngOriginalError:t}function yR(t){return Zg(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 Zg(t){if(t instanceof Error)return!0;if(t===null||typeof t!="object")return!1;let e=t;return Re(e.name)&&Re(e.message)&&(e.stack===void 0||Re(e.stack))}var ER=(()=>{class t{constructor(n){this._options=p({logErrors:!0},n)}ngOnDestroy(){this._removeAfterSendEventListener&&this._removeAfterSendEventListener()}handleError(n){let r=this._extractError(n)||"Handled unknown error",i=Fr(()=>fn(r,{mechanism:{type:"auto.function.angular.error_handler",handled:!1}}));if(this._options.logErrors&&Pe(()=>console.error(r)),this._options.showDialog){let s=k();s&&!this._removeAfterSendEventListener?this._removeAfterSendEventListener=s.on("afterSendEvent",o=>{!o.type&&o.event_id&&Fr(()=>{jo(v(p({},this._options.dialogOptions),{eventId:o.event_id}))})}):s||Fr(()=>{jo(v(p({},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=SR(n);return r instanceof dd?yR(r):typeof r=="string"||Zg(r)?r:null}}return t.\u0275fac=function(n){return new(n||t)(kt("errorHandlerOptions"))},t.\u0275prov=Mt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function e_(t){return new ER(t)}var TR="ui.angular.routing";var t_;function n_(t={}){return t.instrumentNavigation!==!1&&(t_=!0),xl(v(p({},t),{instrumentNavigation:!1}))}function bR(t,e){let n=e&&L(e).data||{};e&&n[he]==="url"&&(e.updateName(t),e.setAttribute(he,"route"),e.setAttribute(te,`auto.${L(e).op}.angular`))}var ha=(()=>{class t{constructor(n){this._router=n,this.navStart$=this._router.events.pipe(en(r=>r instanceof yd),Nt(r=>{if(!t_){Jg&&_.error("Angular integration has tracing enabled, but Tracing integration is not configured");return}this._routingSpan&&(this._routingSpan.end(),this._routingSpan=null);let i=k(),s=Ei(r.url);if(i){this._isPageloadOngoing()?this._pageloadOngoing=!1:Fr(()=>{ma(i,{name:s,attributes:{[te]:"auto.navigation.angular",[he]:"url"}})}),this._routingSpan=Fr(()=>ze({name:`${r.url}`,op:TR,attributes:p({[te]:"auto.ui.angular",[he]:"url",url:s},r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})}))||null;return}})),this.resEnd$=this._router.events.pipe(en(r=>r instanceof bd),Nt(r=>{let i=vR(r.state.root);i&&B().setTransactionName(i);let s=ue(),o=s&&se(s);bR(i,o)})),this.navEnd$=this._router.events.pipe(en(r=>r instanceof jr||r instanceof Ed||r instanceof Td),Nt(()=>{this._routingSpan&&(Fr(()=>{this._routingSpan.end()}),this._routingSpan=null)})),this._routingSpan=null,this._pageloadOngoing=!0,this._subscription=new Ol,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=ue();if(!n)return this._pageloadOngoing=!1,!1;let r=se(n);return this._pageloadOngoing=L(r).op==="pageload",this._pageloadOngoing}}return t.\u0275fac=function(n){return new(n||t)(kt(Vn))},t.\u0275prov=Mt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function vR(t){let e=[],n=t?.firstChild;for(;n;){let i=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 IR=[{provide:"googleTagManagerId",deps:[Aa],useFactory:()=>xd().googleTagManager}],i_=new Ca;i_.setLocale(Nd);var ga={providers:[Od(),sf(),rd({eventCoalescing:!0}),Ad(of,Cd({scrollPositionRestoration:"top",anchorScrolling:"enabled"})),fd(gd(),hd(),md([ip,rp])),cf(),Ul(af),Sd(_d()),{provide:Ca,useValue:i_},{provide:zd,useFactory:Wd,deps:[Aa]},...IR]},wR={providers:[{provide:Hl,useValue:e_()},{provide:ha,deps:[Vn]},Gl(()=>{ns(ha)})]},RH=id(ga,wR);function RR(){return q(this,null,function*(){let t=yield kd(Fd);ud(ap,v(p({},ga),{providers:[Ld(t),{provide:Ud,useValue:t},...ga.providers]})).catch(r=>console.log(r));let{sentry:e,type:n}=t;e&&e.dsn&&Qg({dsn:e.dsn,denyUrls:[/inmobi/,/googleapis/,/cdn/,/ads/,/adocean/,/ado/,/gemius/,/polyfills.*\.js/],ignoreErrors:["pp_gemius_hit is not defined","Script error.","Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."],beforeSend(r){let s=r?.exception?.values?.[0]?.stacktrace?.frames||[],o=c=>(e.tracingOrigins??[]).some(u=>c.includes(u));return s.every(c=>{let u=c.filename||"";return!u.startsWith("http")||o(u)})?r:null},sendDefaultPii:!0,integrations:[n_(),Rl()],tracesSampleRate:e.tracesSampleRate,tracePropagationTargets:e.tracingOrigins,replaysSessionSampleRate:e.sampleRate,replaysOnErrorSampleRate:e.sampleRate,sampleRate:e.sampleRate,profilesSampleRate:e.profilesSampleRate,environment:n})})}RR();