import"./core-inertia-4f5f4e00.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="364ba653-a299-4fd3-a5ef-e0ead76e4009",t._sentryDebugIdIdentifier="sentry-dbid-364ba653-a299-4fd3-a5ef-e0ead76e4009")}catch{}})();const To=Object.prototype.toString;function wo(t){switch(To.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Zt(t,Error)}}function ke(t,e){return To.call(t)===`[object ${e}]`}function ds(t){return ke(t,"ErrorEvent")}function Xs(t){return ke(t,"DOMError")}function Jc(t){return ke(t,"DOMException")}function xt(t){return ke(t,"String")}function fs(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function ps(t){return t===null||fs(t)||typeof t!="object"&&typeof t!="function"}function Ee(t){return ke(t,"Object")}function qn(t){return typeof Event<"u"&&Zt(t,Event)}function Xc(t){return typeof Element<"u"&&Zt(t,Element)}function Qc(t){return ke(t,"RegExp")}function Gn(t){return!!(t&&t.then&&typeof t.then=="function")}function Zc(t){return Ee(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function tu(t){return typeof t=="number"&&t!==t}function Zt(t,e){try{return t instanceof e}catch{return!1}}function Io(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function ye(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Qs(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const s=t[r];try{Io(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function eu(t,e,n=!1){return xt(t)?Qc(e)?e.test(t):xt(e)?n?t===e:t.includes(e):!1:!1}function Yn(t,e=[],n=!1){return e.some(r=>eu(t,r,n))}function nu(t,e,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!Zt(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=ru(Dr(t,e,s,o.originalException,r,i.exception.values,a,0),n))}function Dr(t,e,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(Zt(r[s],Error)){Zs(o,a);const u=t(e,r[s]),l=c.length;ti(u,s,l,a),c=Dr(t,e,n,r[s],s,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(Zt(u,Error)){Zs(o,a);const d=t(e,u),f=c.length;ti(d,`errors[${l}]`,f,a),c=Dr(t,e,n,u,s,[d,...c],d,f)}}),c}function Zs(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function ti(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function ru(t,e){return t.map(n=>(n.value&&(n.value=ye(n.value,e)),n))}function un(t){return t&&t.Math==Math?t:void 0}const N=typeof globalThis=="object"&&un(globalThis)||typeof window=="object"&&un(window)||typeof self=="object"&&un(self)||typeof global=="object"&&un(global)||function(){return this}()||{};function hs(){return N}function vo(t,e,n){const r=n||N,s=r.__SENTRY__=r.__SENTRY__||{};return s[t]||(s[t]=e())}const ms=hs(),su=80;function ko(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||su;for(;n&&i++<r&&(u=iu(n,l),!(u==="html"||i>1&&o+s.length*c+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function iu(t,e){const n=t,r=[];let s,i,o,a,c;if(!n||!n.tagName)return"";if(ms.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=e&&e.length?e.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(u&&u.length)u.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&xt(s))for(i=s.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);const l=["aria-label","type","name","title","alt"];for(c=0;c<l.length;c++)o=l[c],a=n.getAttribute(o),a&&r.push(`[${o}="${a}"]`);return r.join("")}function ou(){try{return ms.document.location.href}catch{return""}}function au(t){if(!ms.HTMLElement)return null;let e=t;const n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement&&e.dataset.sentryComponent)return e.dataset.sentryComponent;e=e.parentNode}return null}const Ze=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,cu="Sentry Logger ",Mr=["debug","info","warn","error","log","assert","trace"],Rn={};function Vn(t){if(!("console"in N))return t();const e=N.console,n={},r=Object.keys(Rn);r.forEach(s=>{const i=Rn[s];n[s]=e[s],e[s]=i});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function uu(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Ze?Mr.forEach(n=>{e[n]=(...r)=>{t&&Vn(()=>{N.console[n](`${cu}[${n}]:`,...r)})}}):Mr.forEach(n=>{e[n]=()=>{}}),e}const E=uu(),lu=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function du(t){return t==="http"||t==="https"}function tn(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function fu(t){const e=lu.exec(t);if(!e){Vn(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",i,o="",a]=e.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return Co({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function Co(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function pu(t){if(!Ze)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(E.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?du(r)?e&&isNaN(parseInt(e,10))?(E.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(E.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(E.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function hu(t){const e=typeof t=="string"?fu(t):Co(t);if(!(!e||!pu(e)))return e}class gt extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function X(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);typeof s=="function"&&Ro(s,r),t[e]=s}function te(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Ze&&E.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Ro(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,te(t,"__sentry_original__",e)}catch{}}function gs(t){return t.__sentry_original__}function mu(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function xo(t){if(wo(t))return{message:t.message,name:t.name,stack:t.stack,...ni(t)};if(qn(t)){const e={type:t.type,target:ei(t.target),currentTarget:ei(t.currentTarget),...ni(t)};return typeof CustomEvent<"u"&&Zt(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function ei(t){try{return Xc(t)?ko(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function ni(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function gu(t,e=40){const n=Object.keys(xo(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return ye(n[0],e);for(let r=n.length;r>0;r--){const s=n.slice(0,r).join(", ");if(!(s.length>e))return r===n.length?s:ye(s,e)}return""}function kt(t){return Nr(t,new Map)}function Nr(t,e){if(_u(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const s of Object.keys(t))typeof t[s]<"u"&&(r[s]=Nr(t[s],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(s=>{r.push(Nr(s,e))}),r}return t}function _u(t){if(!Ee(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const Oo=50,ri=/\(error: (.*)\)/,si=/captureMessage|captureException/;function Do(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const s=[],i=n.split(`
`);for(let o=r;o<i.length;o++){const a=i[o];if(a.length>1024)continue;const c=ri.test(a)?a.replace(ri,"$1"):a;if(!c.match(/\S*Error: /)){for(const u of e){const l=u(c);if(l){s.push(l);break}}if(s.length>=Oo)break}}return Su(s)}}function yu(t){return Array.isArray(t)?Do(...t):t}function Su(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),si.test(e[e.length-1].function||"")&&(e.pop(),si.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,Oo).map(n=>({...n,filename:n.filename||e[e.length-1].filename,function:n.function||"?"}))}const Sr="<anonymous>";function jt(t){try{return!t||typeof t!="function"?Sr:t.name||Sr}catch{return Sr}}const Tn={},ii={};function se(t,e){Tn[t]=Tn[t]||[],Tn[t].push(e)}function ie(t,e){ii[t]||(e(),ii[t]=!0)}function pt(t,e){const n=t&&Tn[t];if(n)for(const r of n)try{r(e)}catch(s){Ze&&E.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${jt(r)}
Error:`,s)}}function Eu(t){const e="console";se(e,t),ie(e,bu)}function bu(){"console"in N&&Mr.forEach(function(t){t in N.console&&X(N.console,t,function(e){return Rn[t]=e,function(...n){pt("console",{args:n,level:t});const s=Rn[t];s&&s.apply(N.console,n)}})})}function at(){const t=N,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Mo(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ft(t){const{message:e,event_id:n}=t;if(e)return e;const r=Mo(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ar(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function We(t,e){const n=Mo(t);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...e},e&&"data"in e){const i={...s&&s.data,...e.data};n.mechanism.data=i}}function oi(t){if(t&&t.__sentry_captured__)return!0;try{te(t,"__sentry_captured__",!0)}catch{}return!1}function No(t){return Array.isArray(t)?t:[t]}const le=N,Tu=1e3;let ai,$r,Lr;function wu(t){const e="dom";se(e,t),ie(e,Iu)}function Iu(){if(!le.document)return;const t=pt.bind(null,"dom"),e=ci(t,!0);le.document.addEventListener("click",e,!1),le.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const r=le[n]&&le[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(X(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){const d=ci(t);l.handler=d,s.call(this,i,d,a)}l.refCount++}catch{}return s.call(this,i,o,a)}}),X(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(s.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function vu(t){if(t.type!==$r)return!1;try{if(!t.target||t.target._sentryId!==Lr)return!1}catch{}return!0}function ku(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function ci(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Cu(n);if(ku(n.type,r))return;te(n,"_sentryCaptured",!0),r&&!r._sentryId&&te(r,"_sentryId",at());const s=n.type==="keypress"?"input":n.type;vu(n)||(t({event:n,name:s,global:e}),$r=n.type,Lr=r?r._sentryId:void 0),clearTimeout(ai),ai=le.setTimeout(()=>{Lr=void 0,$r=void 0},Tu)}}function Cu(t){try{return t.target}catch{return null}}const Pr=hs();function Ao(){if(!("fetch"in Pr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Fr(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Ru(){if(typeof EdgeRuntime=="string")return!0;if(!Ao())return!1;if(Fr(Pr.fetch))return!0;let t=!1;const e=Pr.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=Fr(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Ze&&E.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function xu(t){const e="fetch";se(e,t),ie(e,Ou)}function Ou(){Ru()&&X(N,"fetch",function(t){return function(...e){const{method:n,url:r}=Du(e),s={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return pt("fetch",{...s}),t.apply(N,e).then(i=>{const o={...s,endTimestamp:Date.now(),response:i};return pt("fetch",o),i},i=>{const o={...s,endTimestamp:Date.now(),error:i};throw pt("fetch",o),i})}})}function Br(t,e){return!!t&&typeof t=="object"&&!!t[e]}function ui(t){return typeof t=="string"?t:t?Br(t,"url")?t.url:t.toString?t.toString():"":""}function Du(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:ui(n),method:Br(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:ui(e),method:Br(e,"method")?String(e.method).toUpperCase():"GET"}}let ln=null;function Mu(t){const e="error";se(e,t),ie(e,Nu)}function Nu(){ln=N.onerror,N.onerror=function(t,e,n,r,s){return pt("error",{column:r,error:s,line:n,msg:t,url:e}),ln&&!ln.__SENTRY_LOADER__?ln.apply(this,arguments):!1},N.onerror.__SENTRY_INSTRUMENTED__=!0}let dn=null;function Au(t){const e="unhandledrejection";se(e,t),ie(e,$u)}function $u(){dn=N.onunhandledrejection,N.onunhandledrejection=function(t){return pt("unhandledrejection",t),dn&&!dn.__SENTRY_LOADER__?dn.apply(this,arguments):!0},N.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const fn=hs();function Lu(){const t=fn.chrome,e=t&&t.app&&t.app.runtime,n="history"in fn&&!!fn.history.pushState&&!!fn.history.replaceState;return!e&&n}const De=N;let pn;function $o(t){const e="history";se(e,t),ie(e,Pu)}function Pu(){if(!Lu())return;const t=De.onpopstate;De.onpopstate=function(...n){const r=De.location.href,s=pn;if(pn=r,pt("history",{from:s,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=pn,o=String(s);pn=o,pt("history",{from:i,to:o})}return n.apply(this,r)}}X(De.history,"pushState",e),X(De.history,"replaceState",e)}const Fu=N,Le="__sentry_xhr_v3__";function Bu(t){const e="xhr";se(e,t),ie(e,Uu)}function Uu(){if(!Fu.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;X(t,"open",function(e){return function(...n){const r=Date.now(),s=xt(n[0])?n[0].toUpperCase():void 0,i=Hu(n[1]);if(!s||!i)return e.apply(this,n);this[Le]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[Le];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};pt("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?X(this,"onreadystatechange",function(a){return function(...c){return o(),a.apply(this,c)}}):this.addEventListener("readystatechange",o),X(this,"setRequestHeader",function(a){return function(...c){const[u,l]=c,d=this[Le];return d&&xt(u)&&xt(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),e.apply(this,n)}}),X(t,"send",function(e){return function(...n){const r=this[Le];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return pt("xhr",s),e.apply(this,n)}})}function Hu(t){if(xt(t))return t;try{return t.toString()}catch{}}function ju(){return"npm"}function Wu(){const t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(s){if(t)return e.has(s)?!0:(e.add(s),!1);for(let i=0;i<e.length;i++)if(e[i]===s)return!0;return e.push(s),!1}function r(s){if(t)e.delete(s);else for(let i=0;i<e.length;i++)if(e[i]===s){e.splice(i,1);break}}return[n,r]}function Dt(t,e=100,n=1/0){try{return Ur("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Lo(t,e=3,n=100*1024){const r=Dt(t,e);return Yu(r)>n?Lo(t,e-1,n):r}function Ur(t,e,n=1/0,r=1/0,s=Wu()){const[i,o]=s;if(e==null||["number","boolean","string"].includes(typeof e)&&!tu(e))return e;const a=zu(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return Ur("",p,c-1,r,s)}catch{}const l=Array.isArray(e)?[]:{};let d=0;const f=xo(e);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){l[p]="[MaxProperties ~]";break}const h=f[p];l[p]=Ur(p,h,c-1,r,s),d++}return o(e),l}function zu(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(Io(e))return"[VueViewModel]";if(Zc(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${jt(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=qu(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function qu(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Gu(t){return~-encodeURI(t).split(/%..|./).length}function Yu(t){return Gu(JSON.stringify(t))}var wt;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(wt||(wt={}));function be(t){return new Ce(e=>{e(t)})}function _s(t){return new Ce((e,n)=>{n(t)})}let Ce=class Yt{constructor(e){Yt.prototype.__init.call(this),Yt.prototype.__init2.call(this),Yt.prototype.__init3.call(this),Yt.prototype.__init4.call(this),this._state=wt.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new Yt((r,s)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new Yt((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,e&&e()},o=>{i=!0,s=o,e&&e()}).then(()=>{if(i){r(s);return}n(s)})})}__init(){this._resolve=e=>{this._setResult(wt.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(wt.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===wt.PENDING){if(Gn(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===wt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===wt.RESOLVED&&n[1](this._value),this._state===wt.REJECTED&&n[2](this._value),n[0]=!0)})}}};function Vu(t){const e=[];function n(){return t===void 0||e.length<t}function r(o){return e.splice(e.indexOf(o),1)[0]}function s(o){if(!n())return _s(new gt("Not adding Promise because buffer limit was reached."));const a=o();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Ce((a,c)=>{let u=e.length;if(!u)return a(!0);const l=setTimeout(()=>{o&&o>0&&a(!1)},o);e.forEach(d=>{be(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:e,add:s,drain:i}}function Er(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const 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}}const Ku=["fatal","error","warning","log","info","debug"];function Ju(t){return t==="warn"?"warning":Ku.includes(t)?t:"log"}const Po=1e3;function en(){return Date.now()/Po}function Xu(){const{performance:t}=N;if(!t||!t.now)return en;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/Po}const ys=Xu();(()=>{const{performance:t}=N;if(!t||!t.now)return;const e=3600*1e3,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=s<e,o=t.timing&&t.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):e,u=c<e;return i||u?s<=c?t.timeOrigin:o:r})();function Re(t,e=[]){return[t,e]}function Qu(t,e){const[n,r]=t;return[n,[...r,e]]}function li(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function Hr(t,e){return(e||new TextEncoder).encode(t)}function Zu(t,e){const[n,r]=t;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[Hr(s,e),o]:s.push(typeof o=="string"?Hr(o,e):o)}for(const o of r){const[a,c]=o;if(i(`
${JSON.stringify(a)}
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(Dt(c))}i(u)}}return typeof s=="string"?s:tl(s)}function tl(t){const e=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function el(t,e){const n=typeof t.data=="string"?Hr(t.data,e):t.data;return[kt({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const nl={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function di(t){return nl[t]}function Fo(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function rl(t,e,n,r){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:tn(r)},...s&&{trace:kt({...s})}}}function sl(t,e,n){const r=[{type:"client_report"},{timestamp:n||en(),discarded_events:t}];return Re(e?{dsn:e}:{},[r])}const il=60*1e3;function ol(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?il:r-e}function al(t,e){return t[e]||t.all||0}function cl(t,e,n=Date.now()){return al(t,e)>n}function ul(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,l]=a.split(":",5),d=parseInt(c,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+ol(o,r):e===429&&(s.all=r+60*1e3);return s}const U=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Kn="production";function Ss(){return vo("globalEventProcessors",()=>[])}function ll(t){Ss().push(t)}function xn(t,e,n,r=0){return new Ce((s,i)=>{const o=t[r];if(e===null||typeof o!="function")s(e);else{const a=o({...e},n);U&&o.id&&a===null&&E.log(`Event processor "${o.id}" dropped event`),Gn(a)?a.then(c=>xn(t,c,n,r+1).then(s)).then(null,i):xn(t,a,n,r+1).then(s).then(null,i)}})}function Bo(t){const e=ys(),n={sid:at(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>dl(n)};return t&&ee(n,t),n}function ee(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||ys(),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:at()),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{const 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 Uo(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),ee(t,n)}function dl(t){return kt({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}})}const fl=1;function pl(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=ze(t);return kt({data:r,op:s,parent_span_id:i,span_id:e,status:o,tags:a,trace_id:n,origin:c})}function hl(t){return typeof t=="number"?fi(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?fi(t.getTime()):ys()}function fi(t){return t>9999999999?t/1e3:t}function ze(t){return ml(t)?t.getSpanJSON():typeof t.toJSON=="function"?t.toJSON():{}}function ml(t){return typeof t.getSpanJSON=="function"}function Ho(t){const{traceFlags:e}=t.spanContext();return!!(e&fl)}function gl(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||at(),timestamp:e.timestamp||en()},u=n.integrations||t.integrations.map(m=>m.name);_l(c,t),El(c,u),e.type===void 0&&yl(c,t.stackParser);const l=Tl(r,n.captureContext);n.mechanism&&We(c,n.mechanism);const d=s&&s.getEventProcessors?s.getEventProcessors():[],f=$l().getScopeData();if(i){const m=i.getScopeData();gi(f,m)}if(l){const m=l.getScopeData();gi(f,m)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Vo(c,f);const h=[...d,...Ss(),...f.eventProcessors];return xn(h,c,n).then(m=>(m&&Sl(m),typeof o=="number"&&o>0?bl(m,o,a):m))}function _l(t,e){const{environment:n,release:r,dist:s,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?n:Kn),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&s!==void 0&&(t.dist=s),t.message&&(t.message=ye(t.message,i));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=ye(o.value,i));const a=t.request;a&&a.url&&(a.url=ye(a.url,i))}const pi=new WeakMap;function yl(t,e){const n=N._sentryDebugIds;if(!n)return;let r;const s=pi.get(e);s?r=s:(r=new Map,pi.set(e,r));const i=Object.keys(n).reduce((o,a)=>{let c;const u=r.get(a);u?c=u:(c=e(a),r.set(a,c));for(let l=c.length-1;l>=0;l--){const d=c[l];if(d.filename){o[d.filename]=n[a];break}}return o},{});try{t.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Sl(t){const e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?e[s.abs_path]=s.debug_id:s.filename&&(e[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:e[r]})})}function El(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function bl(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:Dt(s.data,e,n)}}))},...t.user&&{user:Dt(t.user,e,n)},...t.contexts&&{contexts:Dt(t.contexts,e,n)},...t.extra&&{extra:Dt(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Dt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(s=>{const i=ze(s).data;return i&&(s.data=Dt(i,e,n)),s})),r}function Tl(t,e){if(!e)return t;const n=t?t.clone():new qe;return n.update(e),n}function wl(t){if(t)return Il(t)?{captureContext:t}:kl(t)?{captureContext:t}:t}function Il(t){return t instanceof qe||typeof t=="function"}const vl=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function kl(t){return Object.keys(t).some(e=>vl.includes(e))}function Cl(t,e){return bt().captureException(t,wl(e))}function jo(t,e){return bt().captureEvent(t,e)}function ne(t,e){bt().addBreadcrumb(t,e)}function Rl(...t){const e=bt();if(t.length===2){const[n,r]=t;return n?e.withScope(()=>(e.getStackTop().scope=n,r(n))):e.withScope(r)}return e.withScope(t[0])}function et(){return bt().getClient()}function oe(){return bt().getScope()}function hi(t){const e=et(),n=nn(),r=oe(),{release:s,environment:i=Kn}=e&&e.getOptions()||{},{userAgent:o}=N.navigator||{},a=Bo({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...t}),c=n.getSession();return c&&c.status==="ok"&&ee(c,{status:"exited"}),Wo(),n.setSession(a),r.setSession(a),a}function Wo(){const t=nn(),e=oe(),n=e.getSession()||t.getSession();n&&Uo(n),zo(),t.setSession(),e.setSession()}function zo(){const t=nn(),e=oe(),n=et(),r=e.getSession()||t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function mi(t=!1){if(t){Wo();return}zo()}function qo(t){return t.transaction}function Go(t,e,n){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=kt({environment:r.environment||Kn,release:r.release,user_segment:i,public_key:s,trace_id:t});return e.emit&&e.emit("createDsc",o),o}function Yo(t){const e=et();if(!e)return{};const n=Go(ze(t).trace_id||"",e,oe()),r=qo(t);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;i!=null&&(n.sample_rate=`${i}`);const a=ze(r);return o&&o!=="url"&&(n.transaction=a.description),n.sampled=String(Ho(r)),e.emit&&e.emit("createDsc",n),n}function Vo(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;xl(t,e),r&&Ml(t,r),Nl(t,n),Ol(t,s),Dl(t,i)}function gi(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:f,transactionName:p,span:h}=e;Me(t,"extra",n),Me(t,"tags",r),Me(t,"user",s),Me(t,"contexts",i),Me(t,"sdkProcessingMetadata",a),o&&(t.level=o),p&&(t.transactionName=p),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={...t.propagationContext,...f}}function Me(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function xl(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e,c=kt(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const u=kt(r);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const l=kt(s);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=kt(i);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts}),o&&(t.level=o),a&&(t.transaction=a)}function Ol(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Dl(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Ml(t,e){t.contexts={trace:pl(e),...t.contexts};const n=qo(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:Yo(e),...t.sdkProcessingMetadata};const r=ze(n).description;r&&(t.tags={transaction:r,...t.tags})}}function Nl(t,e){t.fingerprint=t.fingerprint?No(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}const Al=100;let br,qe=class wn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=_i()}static clone(e){return e?e.clone():new wn}clone(){const e=new wn;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&ee(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...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}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e;if(n instanceof wn){const r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Ee(n)){const r=e;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=_i(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:Al;if(r<=0)return this;const s={timestamp:en(),...e},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,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}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:n,_contexts:r,_tags:s,_extra:i,_user:o,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:f,_span:p}=this;return{breadcrumbs:e,attachments:n,contexts:r,tags:s,extra:i,user:o,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:d,transactionName:f,span:p}}applyToEvent(e,n={},r=[]){Vo(e,this.getScopeData());const s=[...r,...Ss(),...this._eventProcessors];return xn(s,e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n&&n.event_id?n.event_id:at();if(!this._client)return E.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){const s=r&&r.event_id?r.event_id:at();if(!this._client)return E.warn("No client configured on scope - will not capture message!"),s;const i=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s},this),s}captureEvent(e,n){const r=n&&n.event_id?n.event_id:at();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(E.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 $l(){return br||(br=new qe),br}function _i(){return{traceId:at(),spanId:at().substring(16)}}const Ge="7.119.2",Ko=parseFloat(Ge),Ll=100;let Jo=class{constructor(e,n,r,s=Ko){this._version=s;let i;n?i=n:(i=new qe,i.setClient(e));let o;r?o=r:(o=new qe,o.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version<e}bindClient(e){const n=this.getStackTop();n.client=e,n.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){const n=this.pushScope();let r;try{r=e(n)}catch(s){throw this.popScope(),s}return Gn(r)?r.then(s=>(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:at(),s=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:s,...n,event_id:r}),r}captureMessage(e,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:at(),i=new Error(e);return this.getScope().captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s}),s}captureEvent(e,n){const r=n&&n.event_id?n.event_id:at();return e.type||(this._lastEventId=r),this.getScope().captureEvent(e,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Ll}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const c={timestamp:en(),...e},u=i?Vn(()=>i(c,n)):c;u!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,n){this.getScope().setTag(e,n),this.getIsolationScope().setTag(e,n)}setExtra(e,n){this.getScope().setExtra(e,n),this.getIsolationScope().setExtra(e,n)}setContext(e,n){this.getScope().setContext(e,n),this.getIsolationScope().setContext(e,n)}configureScope(e){const{scope:n,client:r}=this.getStackTop();r&&e(n)}run(e){const n=yi(this);try{e(this)}finally{yi(n)}}getIntegration(e){const n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return U&&E.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){const r=this._callExtensionMethod("startTransaction",e,n);return U&&!r&&(this.getClient()?E.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):E.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&Uo(r),this._sendSessionUpdate(),n.setSession()}startSession(e){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=Kn}=r&&r.getOptions()||{},{userAgent:o}=N.navigator||{},a=Bo({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&ee(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:n}=this.getStackTop(),r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(e,...n){const s=Jn().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[e]=="function")return s.extensions[e].apply(this,n);U&&E.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Jn(){return N.__SENTRY__=N.__SENTRY__||{extensions:{},hub:void 0},N}function yi(t){const e=Jn(),n=jr(e);return Xo(e,t),n}function bt(){const t=Jn();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return Pl(t)}function nn(){return bt().getIsolationScope()}function Pl(t=Jn()){return(!Fl(t)||jr(t).isOlderThan(Ko))&&Xo(t,new Jo),jr(t)}function Fl(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function jr(t){return vo("hub",()=>new Jo,t)}function Xo(t,e){if(!t)return!1;const n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}function Qo(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=et(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Si(t){if(!Qo())return;const e=Ul(t),n=bt(),r=t.scope?t.scope.getSpan():Wr();if(t.onlyIfParent&&!r)return;const o=(t.scope||oe()).clone();return Bl(n,{parentSpan:r,spanContext:e,forceTransaction:t.forceTransaction,scope:o})}function Wr(){return oe().getSpan()}function Bl(t,{parentSpan:e,spanContext:n,forceTransaction:r,scope:s}){if(!Qo())return;const i=nn();let o;if(e&&!r)o=e.startChild(n);else if(e){const a=Yo(e),{traceId:c,spanId:u}=e.spanContext(),l=Ho(e);o=t.startTransaction({traceId:c,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:l}={...i.getPropagationContext(),...s.getPropagationContext()};o=t.startTransaction({traceId:a,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return s.setSpan(o),Wl(o,s,i),o}function Ul(t){if(t.startTime){const e={...t};return e.startTimestamp=hl(t.startTime),delete e.startTime,e}return t}const Hl="_sentryScope",jl="_sentryIsolationScope";function Wl(t,e,n){t&&(te(t,jl,n),te(t,Hl,e))}function zl(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function ql(t,e,n,r){const s=Fo(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:tn(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Re(i,[o])}function Gl(t,e,n,r){const s=Fo(n),i=t.type&&t.type!=="replay_event"?t.type:"event";zl(t,n&&n.sdk);const o=rl(t,s,r,e);return delete t.sdkProcessingMetadata,Re(o,[[{type:i},t]])}const Yl="7";function Vl(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Kl(t){return`${Vl(t)}${t.projectId}/envelope/`}function Jl(t,e){return mu({sentry_key:t.publicKey,sentry_version:Yl,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Xl(t,e={}){const n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${Kl(t)}?${Jl(t,r)}`}const Ei=[];function Ql(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.keys(e).map(n=>e[n])}function Zl(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...e,...n]:typeof n=="function"?r=No(n(e)):r=e;const s=Ql(r),i=ed(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function td(t,e){const n={};return e.forEach(r=>{r&&Zo(t,r,n)}),n}function bi(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Zo(t,e,n){if(n[e.name]){U&&E.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Ei.indexOf(e.name)===-1&&(e.setupOnce(ll,bt),Ei.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),t.on&&typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,i)=>r(s,i,t))}if(t.addEventProcessor&&typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((i,o)=>r(i,o,t),{id:e.name});t.addEventProcessor(s)}U&&E.log(`Integration installed: ${e.name}`)}function ed(t,e){for(let n=0;n<t.length;n++)if(e(t[n])===!0)return n;return-1}function Wt(t,e){return Object.assign(function(...r){return e(...r)},{id:t})}function nd(t){let e="";for(const n of t){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([i,o])=>`${i}:${o}`).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
`}return e}function rd(t,e,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&e&&(s.dsn=tn(e));const i=sd(t);return Re(s,[i])}function sd(t){const e=nd(t);return[{type:"statsd",length:e.length},e]}const Ti="Not capturing exception because it's already been captured.";class id{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=hu(e.dsn):U&&E.warn("No DSN provided, client will not send events."),this._dsn){const n=Xl(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){if(oi(e)){U&&E.log(Ti);return}let s=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(e,n,r,s){let i=r&&r.event_id;const o=fs(e)?e:String(e),a=ps(e)?this.eventFromMessage(o,n,r):this.eventFromException(e,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{i=c})),i}captureEvent(e,n,r){if(n&&n.originalException&&oi(n.originalException)){U&&E.log(Ti);return}let s=n&&n.event_id;const o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,n,o||r).then(a=>{s=a})),s}captureSession(e){typeof e.release!="string"?U&&E.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ee(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):be(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return U&&E.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const n=this._integrations[e.name];Zo(this,e,this._integrations),n||bi(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Gl(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Qu(r,el(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){const n=ql(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${e}:${n}`;U&&E.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}captureAggregateMetrics(e){U&&E.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const n=rd(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(e,n){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(n)}emit(e,...n){this._hooks[e]&&this._hooks[e].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=td(this,e),bi(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=e.status==="ok";(o&&e.errors===0||o&&r)&&(ee(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Ce(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,e&&r>=e&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,s=nn()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",e,n),gl(i,e,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:l,spanId:d,parentSpanId:f,dsc:p}=c;a.contexts={trace:{trace_id:l,span_id:d,parent_span_id:f},...a.contexts};const h=p||Go(l,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(s=>s.event_id,s=>{if(U){const i=s;i.logLevel==="log"?E.log(i.message):E.warn(i)}})}_processEvent(e,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=ea(e),a=ta(e),c=e.type||"error",u=`before send for type \`${c}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),_s(new gt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l=c==="replay_event"?"replay":c,f=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l,e),new gt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const g=ad(s,p,n);return od(g,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",l,e),o){const _=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",_)}throw new gt(`${u} returned \`null\`, will not send event.`,"log")}const h=r&&r.getSession();if(!o&&h&&this._updateSessionFromEvent(h,p),o){const m=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,_=p.spans?p.spans.length:0,b=m-_;b>0&&this.recordDroppedEvent("before_send","span",b)}const g=p.transaction_info;if(o&&g&&p.transaction!==e.transaction){const m="custom";p.transaction_info={...g,source:m}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof gt?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new gt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${p}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,n=>{U&&E.error("Error while sending event:",n)});U&&E.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:e[n]}})}}function od(t,e){const n=`${e} must return \`null\` or a valid event.`;if(Gn(t))return t.then(r=>{if(!Ee(r)&&r!==null)throw new gt(n);return r},r=>{throw new gt(`${e} rejected with ${r}`)});if(!Ee(t)&&t!==null)throw new gt(n);return t}function ad(t,e,n){const{beforeSend:r,beforeSendTransaction:s}=t;if(ta(e)&&r)return r(e,n);if(ea(e)&&s){if(e.spans){const i=e.spans.length;e.sdkProcessingMetadata={...e.sdkProcessingMetadata,spanCountBeforeProcessing:i}}return s(e,n)}return e}function ta(t){return t.type===void 0}function ea(t){return t.type==="transaction"}function cd(t,e){e.debug===!0&&(U?E.enable():Vn(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),oe().update(e.initialScope);const r=new t(e);ud(r),ld(r)}function ud(t){const n=bt().getStackTop();n.client=t,n.scope.setClient(t)}function ld(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}const dd=30;function na(t,e,n=Vu(t.bufferSize||dd)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(li(o,(d,f)=>{const p=di(f);if(cl(r,p)){const h=wi(d,f);t.recordDroppedEvent("ratelimit_backoff",p,h)}else a.push(d)}),a.length===0)return be();const c=Re(o[0],a),u=d=>{li(c,(f,p)=>{const h=wi(f,p);t.recordDroppedEvent(d,di(p),h)})},l=()=>e({body:Zu(c,t.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&U&&E.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=ul(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof gt)return U&&E.error("Skipped sending event because buffer is full."),u("queue_overflow"),be();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function wi(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function fd(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Ge})),version:Ge}),t._metadata=s}const pd=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],hd=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],ra="InboundFilters",md=(t={})=>({name:ra,setupOnce(){},processEvent(e,n,r){const s=r.getOptions(),i=gd(t,s);return _d(e,i)?null:e}}),sa=md;Wt(ra,sa);function gd(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:pd],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:hd],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function _d(t,e){return e.ignoreInternal&&wd(t)?(U&&E.warn(`Event dropped due to being internal Sentry Error.
Event: ${Ft(t)}`),!0):yd(t,e.ignoreErrors)?(U&&E.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${Ft(t)}`),!0):Sd(t,e.ignoreTransactions)?(U&&E.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${Ft(t)}`),!0):Ed(t,e.denyUrls)?(U&&E.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${Ft(t)}.
Url: ${On(t)}`),!0):bd(t,e.allowUrls)?!1:(U&&E.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${Ft(t)}.
Url: ${On(t)}`),!0)}function yd(t,e){return t.type||!e||!e.length?!1:Td(t).some(n=>Yn(n,e))}function Sd(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?Yn(n,e):!1}function Ed(t,e){if(!e||!e.length)return!1;const n=On(t);return n?Yn(n,e):!1}function bd(t,e){if(!e||!e.length)return!0;const n=On(t);return n?Yn(n,e):!0}function Td(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),U&&e.length===0&&E.error(`Could not extract message for event ${Ft(t)}`),e}function wd(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Id(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function On(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Id(e):null}catch{return U&&E.error(`Cannot extract url for event ${Ft(t)}`),null}}let Ii;const ia="FunctionToString",vi=new WeakMap,vd=()=>({name:ia,setupOnce(){Ii=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=gs(this),n=vi.has(et())&&e!==void 0?e:this;return Ii.apply(n,t)}}catch{}},setup(t){vi.set(t,!0)}}),oa=vd;Wt(ia,oa);const L=N;let zr=0;function aa(){return zr>0}function kd(){zr++,setTimeout(()=>{zr--})}function Te(t,e={},n){if(typeof t!="function")return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(gs(t))return t}catch{return t}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const i=s.map(o=>Te(o,e));return t.apply(this,i)}catch(i){throw kd(),Rl(o=>{o.addEventProcessor(a=>(e.mechanism&&(Ar(a,void 0,void 0),We(a,e.mechanism)),a.extra={...a.extra,arguments:s},a)),Cl(i)}),i}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}Ro(r,t),te(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}const Ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ca(t,e){const n=Es(t,e),r={type:e&&e.name,value:Od(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Cd(t,e,n,r){const s=et(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:qn(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Nd(e,{isUnhandledRejection:r})}]},extra:{__serialized__:Lo(e,i)}};if(n){const a=Es(t,n);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function Tr(t,e){return{exception:{values:[ca(t,e)]}}}function Es(t,e){const n=e.stacktrace||e.stack||"",r=xd(e);try{return t(n,r)}catch{}return[]}const Rd=/Minified React error #\d+;/i;function xd(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(Rd.test(t.message))return 1}return 0}function Od(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Dd(t,e,n,r){const s=n&&n.syntheticException||void 0,i=bs(t,e,s,r);return We(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),be(i)}function Md(t,e,n="info",r,s){const i=r&&r.syntheticException||void 0,o=qr(t,e,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),be(o)}function bs(t,e,n,r,s){let i;if(ds(e)&&e.error)return Tr(t,e.error);if(Xs(e)||Jc(e)){const o=e;if("stack"in e)i=Tr(t,e);else{const a=o.name||(Xs(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=qr(t,c,n,r),Ar(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return wo(e)?Tr(t,e):Ee(e)||qn(e)?(i=Cd(t,e,n,s),We(i,{synthetic:!0}),i):(i=qr(t,e,n,r),Ar(i,`${e}`,void 0),We(i,{synthetic:!0}),i)}function qr(t,e,n,r){const s={};if(r&&n){const i=Es(t,n);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]})}if(fs(e)){const{__sentry_template_string__:i,__sentry_template_values__:o}=e;return s.logentry={message:i,params:o},s}return s.message=e,s}function Nd(t,{isUnhandledRejection:e}){const n=gu(t),r=e?"promise rejection":"exception";return ds(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:qn(t)?`Event \`${Ad(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ad(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function $d(t,{metadata:e,tunnel:n,dsn:r}){const s={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:tn(r)}},i=Ld(t);return Re(s,[i])}function Ld(t){return[{type:"user_report"},t]}class Pd extends id{constructor(e){const n=L.SENTRY_SDK_SOURCE||ju();fd(e,"browser",["browser"],n),super(e),e.sendClientReports&&L.document&&L.document.addEventListener("visibilitychange",()=>{L.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return Dd(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Md(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Ct&&E.warn("SDK not enabled, will not capture user feedback.");return}const n=$d(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0){Ct&&E.log("No outcomes to send");return}if(!this._dsn){Ct&&E.log("No dsn provided, will not send outcomes");return}Ct&&E.log("Sending outcomes:",e);const n=sl(e,this._options.tunnel&&tn(this._dsn));this._sendEnvelope(n)}}let Pe;function Fd(){if(Pe)return Pe;if(Fr(L.fetch))return Pe=L.fetch.bind(L);const t=L.document;let e=L.fetch;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){Ct&&E.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Pe=e.bind(L)}function Bd(){Pe=void 0}function Ud(t,e=Fd()){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Bd(),n-=o,r--,_s(c)}}return na(t,s)}const Hd=4;function jd(t){function e(n){return new Ce((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===Hd&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const o in t.headers)Object.prototype.hasOwnProperty.call(t.headers,o)&&i.setRequestHeader(o,t.headers[o]);i.send(n.body)})}return na(t,e)}const Xn="?",Wd=30,zd=40,qd=50;function Ts(t,e,n,r){const s={filename:t,function:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Gd=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yd=/\((\S*)(?::(\d+))(?::(\d+))\)/,Vd=t=>{const e=Gd.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){const i=Yd.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}const[r,s]=ua(e[1]||Xn,e[2]);return Ts(s,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},Kd=[Wd,Vd],Jd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Xd=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Qd=t=>{const e=Jd.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=Xd.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],s=e[1]||Xn;return[s,r]=ua(s,r),Ts(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Zd=[qd,Qd],tf=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ef=t=>{const e=tf.exec(t);return e?Ts(e[2],e[1]||Xn,+e[3],e[4]?+e[4]:void 0):void 0},nf=[zd,ef],rf=[Kd,Zd,nf],sf=Do(...rf),ua=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Xn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},hn=1024,la="Breadcrumbs",of=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:la,setupOnce(){},setup(n){e.console&&Eu(uf(n)),e.dom&&wu(cf(n,e.dom)),e.xhr&&Bu(lf(n)),e.fetch&&xu(df(n)),e.history&&$o(ff(n)),e.sentry&&n.on&&n.on("beforeSendEvent",af(n))}}},da=of;Wt(la,da);function af(t){return function(n){et()===t&&ne({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ft(n)},{event:n})}}function cf(t,e){return function(r){if(et()!==t)return;let s,i,o=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>hn&&(Ct&&E.warn(`\`dom.maxStringLength\` cannot exceed ${hn}, but a value of ${a} was configured. Sentry will use ${hn} instead.`),a=hn),typeof o=="string"&&(o=[o]);try{const u=r.event,l=pf(u)?u.target:u;s=ko(l,{keyAttrs:o,maxStringLength:a}),i=au(l)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),ne(c,{event:r.event,name:r.name,global:r.global})}}function uf(t){return function(n){if(et()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Ju(n.level),message:Qs(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Qs(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;ne(r,{input:n.args,level:n.level})}}function lf(t){return function(n){if(et()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Le];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,l={method:o,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};ne({category:"xhr",data:l,type:"http"},d)}}function df(t){return function(n){if(et()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};ne({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s};ne({category:"fetch",data:o,type:"http"},a)}}}function ff(t){return function(n){if(et()!==t)return;let r=n.from,s=n.to;const i=Er(L.location.href);let o=r?Er(r):void 0;const a=Er(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),ne({category:"navigation",data:{from:r,to:s}})}}function pf(t){return!!t&&!!t.target}const fa="Dedupe",hf=()=>{let t;return{name:fa,setupOnce(){},processEvent(e){if(e.type)return e;try{if(mf(e,t))return Ct&&E.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},pa=hf;Wt(fa,pa);function mf(t,e){return e?!!(gf(t,e)||_f(t,e)):!1}function gf(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ma(t,e)||!ha(t,e))}function _f(t,e){const n=ki(e),r=ki(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ma(t,e)||!ha(t,e))}function ha(t,e){let n=Ci(t),r=Ci(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function ma(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 ki(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Ci(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}const ga="GlobalHandlers",yf=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:ga,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Sf(n),Ri("onerror")),e.onunhandledrejection&&(Ef(n),Ri("onunhandledrejection"))}}},_a=yf;Wt(ga,_a);function Sf(t){Mu(e=>{const{stackParser:n,attachStacktrace:r}=Sa();if(et()!==t||aa())return;const{msg:s,url:i,line:o,column:a,error:c}=e,u=c===void 0&&xt(s)?wf(s,i,o,a):ya(bs(n,c||s,void 0,r,!1),i,o,a);u.level="error",jo(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Ef(t){Au(e=>{const{stackParser:n,attachStacktrace:r}=Sa();if(et()!==t||aa())return;const s=bf(e),i=ps(s)?Tf(s):bs(n,s,void 0,r,!0);i.level="error",jo(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function bf(t){if(ps(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return t}function Tf(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function wf(t,e,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=ds(t)?t.message:t,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),ya({exception:{values:[{type:o,value:i}]}},e,n,r)}function ya(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=xt(e)&&e.length>0?e:ou();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),t}function Ri(t){Ct&&E.log(`Global Handler attached: ${t}`)}function Sa(){const t=et();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Ea="HttpContext",If=()=>({name:Ea,setupOnce(){},preprocessEvent(t){if(!L.navigator&&!L.location&&!L.document)return;const e=t.request&&t.request.url||L.location&&L.location.href,{referrer:n}=L.document||{},{userAgent:r}=L.navigator||{},s={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:s};t.request=i}}),ba=If;Wt(Ea,ba);const vf="cause",kf=5,Ta="LinkedErrors",Cf=(t={})=>{const e=t.limit||kf,n=t.key||vf;return{name:Ta,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();nu(ca,o.stackParser,o.maxValueLength,n,e,r,s)}}},wa=Cf;Wt(Ta,wa);const Rf=["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"],Ia="TryCatch",xf=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Ia,setupOnce(){e.setTimeout&&X(L,"setTimeout",xi),e.setInterval&&X(L,"setInterval",xi),e.requestAnimationFrame&&X(L,"requestAnimationFrame",Of),e.XMLHttpRequest&&"XMLHttpRequest"in L&&X(XMLHttpRequest.prototype,"send",Df);const n=e.eventTarget;n&&(Array.isArray(n)?n:Rf).forEach(Mf)}}},va=xf;Wt(Ia,va);function xi(t){return function(...e){const n=e[0];return e[0]=Te(n,{mechanism:{data:{function:jt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Of(t){return function(e){return t.apply(this,[Te(e,{mechanism:{data:{function:"requestAnimationFrame",handler:jt(t)},handled:!1,type:"instrument"}})])}}function Df(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&X(n,s,function(i){const o={mechanism:{data:{function:s,handler:jt(i)},handled:!1,type:"instrument"}},a=gs(i);return a&&(o.mechanism.data.handler=jt(a)),Te(i,o)})}),t.apply(this,e)}}function Mf(t){const e=L,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(X(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Te(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:jt(i),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Te(i,{mechanism:{data:{function:"addEventListener",handler:jt(i),target:t},handled:!1,type:"instrument"}}),o])}}),X(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}const Nf=[sa(),oa(),va(),da(),_a(),wa(),pa(),ba()];function ka(t){return[...Nf]}function Af(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=ka()),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),L.SENTRY_RELEASE&&L.SENTRY_RELEASE.id&&(t.release=L.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);const e={...t,stackParser:yu(t.stackParser||sf),integrations:Zl(t),transport:t.transport||(Ao()?Ud:jd)};cd(Pd,e),t.autoSessionTracking&&$f()}function $f(){if(typeof L.document>"u"){Ct&&E.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}hi({ignoreDuration:!0}),mi(),$o(({from:t,to:e})=>{t!==void 0&&t!==e&&(hi({ignoreDuration:!0}),mi())})}const Ca=Object.prototype.toString;function Lf(t){switch(Ca.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Qn(t,Error)}}function ws(t,e){return Ca.call(t)===`[object ${e}]`}function Xt(t){return ws(t,"String")}function Is(t){return ws(t,"Object")}function Pf(t){return typeof Event<"u"&&Qn(t,Event)}function Ff(t){return typeof Element<"u"&&Qn(t,Element)}function Bf(t){return ws(t,"RegExp")}function vs(t){return!!(t&&t.then&&typeof t.then=="function")}function Uf(t){return Is(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Hf(t){return typeof t=="number"&&t!==t}function Qn(t,e){try{return t instanceof e}catch{return!1}}function jf(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function wr(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Wf(t,e,n=!1){return Xt(t)?Bf(e)?e.test(t):Xt(e)?n?t===e:t.includes(e):!1:!1}function zf(t,e=[],n=!1){return e.some(r=>Wf(t,r,n))}function mn(t){return t&&t.Math==Math?t:void 0}const q=typeof globalThis=="object"&&mn(globalThis)||typeof window=="object"&&mn(window)||typeof self=="object"&&mn(self)||typeof global=="object"&&mn(global)||function(){return this}()||{};function ks(){return q}function Ra(t,e,n){const r=n||q,s=r.__SENTRY__=r.__SENTRY__||{};return s[t]||(s[t]=e())}const qf=ks(),Gf=80;function Cs(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Gf;for(;n&&i++<r&&(u=Yf(n,l),!(u==="html"||i>1&&o+s.length*c+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Yf(t,e){const n=t,r=[];let s,i,o,a,c;if(!n||!n.tagName)return"";if(qf.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=e&&e.length?e.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(u&&u.length)u.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&Xt(s))for(i=s.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);const l=["aria-label","type","name","title","alt"];for(c=0;c<l.length;c++)o=l[c],a=n.getAttribute(o),a&&r.push(`[${o}="${a}"]`);return r.join("")}const Zn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Vf="Sentry Logger ",Oi=["debug","info","warn","error","log","assert","trace"],Di={};function Ye(t){if(!("console"in q))return t();const e=q.console,n={},r=Object.keys(Di);r.forEach(s=>{const i=Di[s];n[s]=e[s],e[s]=i});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function Kf(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Zn?Oi.forEach(n=>{e[n]=(...r)=>{t&&Ye(()=>{q.console[n](`${Vf}[${n}]:`,...r)})}}):Oi.forEach(n=>{e[n]=()=>{}}),e}const k=Kf();function Jf(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function _t(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);typeof s=="function"&&Xf(s,r),t[e]=s}function Gr(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Zn&&k.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Xf(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,Gr(t,"__sentry_original__",e)}catch{}}function Qf(t){if(Lf(t))return{message:t.message,name:t.name,stack:t.stack,...Ni(t)};if(Pf(t)){const e={type:t.type,target:Mi(t.target),currentTarget:Mi(t.currentTarget),...Ni(t)};return typeof CustomEvent<"u"&&Qn(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Mi(t){try{return Ff(t)?Cs(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Ni(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function yt(t){return Yr(t,new Map)}function Yr(t,e){if(Zf(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const s of Object.keys(t))typeof t[s]<"u"&&(r[s]=Yr(t[s],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(s=>{r.push(Yr(s,e))}),r}return t}function Zf(t){if(!Is(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const Ir="<anonymous>";function Rs(t){try{return!t||typeof t!="function"?Ir:t.name||Ir}catch{return Ir}}const In={},Ai={};function tr(t,e){In[t]=In[t]||[],In[t].push(e)}function er(t,e){Ai[t]||(e(),Ai[t]=!0)}function Bt(t,e){const n=t&&In[t];if(n)for(const r of n)try{r(e)}catch(s){Zn&&k.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${Rs(r)}
Error:`,s)}}function it(){const t=q,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function tp(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ep(t,e){const n=tp(t);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...e},e&&"data"in e){const i={...s&&s.data,...e.data};n.mechanism.data=i}}function np(t){return Array.isArray(t)?t:[t]}const de=q,rp=1e3;let $i,Vr,Kr;function sp(t){const e="dom";tr(e,t),er(e,ip)}function ip(){if(!de.document)return;const t=Bt.bind(null,"dom"),e=Li(t,!0);de.document.addEventListener("click",e,!1),de.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const r=de[n]&&de[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(_t(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){const d=Li(t);l.handler=d,s.call(this,i,d,a)}l.refCount++}catch{}return s.call(this,i,o,a)}}),_t(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(s.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function op(t){if(t.type!==Vr)return!1;try{if(!t.target||t.target._sentryId!==Kr)return!1}catch{}return!0}function ap(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Li(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=cp(n);if(ap(n.type,r))return;Gr(n,"_sentryCaptured",!0),r&&!r._sentryId&&Gr(r,"_sentryId",it());const s=n.type==="keypress"?"input":n.type;op(n)||(t({event:n,name:s,global:e}),Vr=n.type,Kr=r?r._sentryId:void 0),clearTimeout($i),$i=de.setTimeout(()=>{Kr=void 0,Vr=void 0},rp)}}function cp(t){try{return t.target}catch{return null}}const Jr=ks();function up(){if(!("fetch"in Jr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Pi(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function lp(){if(typeof EdgeRuntime=="string")return!0;if(!up())return!1;if(Pi(Jr.fetch))return!0;let t=!1;const e=Jr.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=Pi(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Zn&&k.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function dp(t){const e="fetch";tr(e,t),er(e,fp)}function fp(){lp()&&_t(q,"fetch",function(t){return function(...e){const{method:n,url:r}=pp(e),s={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Bt("fetch",{...s}),t.apply(q,e).then(i=>{const o={...s,endTimestamp:Date.now(),response:i};return Bt("fetch",o),i},i=>{const o={...s,endTimestamp:Date.now(),error:i};throw Bt("fetch",o),i})}})}function Xr(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Fi(t){return typeof t=="string"?t:t?Xr(t,"url")?t.url:t.toString?t.toString():"":""}function pp(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:Fi(n),method:Xr(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:Fi(e),method:Xr(e,"method")?String(e.method).toUpperCase():"GET"}}const gn=ks();function hp(){const t=gn.chrome,e=t&&t.app&&t.app.runtime,n="history"in gn&&!!gn.history.pushState&&!!gn.history.replaceState;return!e&&n}const Ne=q;let _n;function mp(t){const e="history";tr(e,t),er(e,gp)}function gp(){if(!hp())return;const t=Ne.onpopstate;Ne.onpopstate=function(...n){const r=Ne.location.href,s=_n;if(_n=r,Bt("history",{from:s,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=_n,o=String(s);_n=o,Bt("history",{from:i,to:o})}return n.apply(this,r)}}_t(Ne.history,"pushState",e),_t(Ne.history,"replaceState",e)}const _p=q,pe="__sentry_xhr_v3__";function yp(t){const e="xhr";tr(e,t),er(e,Sp)}function Sp(){if(!_p.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;_t(t,"open",function(e){return function(...n){const r=Date.now(),s=Xt(n[0])?n[0].toUpperCase():void 0,i=Ep(n[1]);if(!s||!i)return e.apply(this,n);this[pe]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[pe];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};Bt("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?_t(this,"onreadystatechange",function(a){return function(...c){return o(),a.apply(this,c)}}):this.addEventListener("readystatechange",o),_t(this,"setRequestHeader",function(a){return function(...c){const[u,l]=c,d=this[pe];return d&&Xt(u)&&Xt(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),e.apply(this,n)}}),_t(t,"send",function(e){return function(...n){const r=this[pe];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return Bt("xhr",s),e.apply(this,n)}})}function Ep(t){if(Xt(t))return t;try{return t.toString()}catch{}}function bp(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Tp(){return!bp()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Bi(){return typeof window<"u"&&(!Tp()||wp())}function wp(){return q.process!==void 0&&q.process.type==="renderer"}function Ip(){const t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(s){if(t)return e.has(s)?!0:(e.add(s),!1);for(let i=0;i<e.length;i++)if(e[i]===s)return!0;return e.push(s),!1}function r(s){if(t)e.delete(s);else for(let i=0;i<e.length;i++)if(e[i]===s){e.splice(i,1);break}}return[n,r]}function Mt(t,e=100,n=1/0){try{return Qr("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Qr(t,e,n=1/0,r=1/0,s=Ip()){const[i,o]=s;if(e==null||["number","boolean","string"].includes(typeof e)&&!Hf(e))return e;const a=vp(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return Qr("",p,c-1,r,s)}catch{}const l=Array.isArray(e)?[]:{};let d=0;const f=Qf(e);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){l[p]="[MaxProperties ~]";break}const h=f[p];l[p]=Qr(p,h,c-1,r,s),d++}return o(e),l}function vp(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(jf(e))return"[VueViewModel]";if(Uf(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${Rs(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=kp(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function kp(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}var It;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(It||(It={}));let Cp=class Vt{constructor(e){Vt.prototype.__init.call(this),Vt.prototype.__init2.call(this),Vt.prototype.__init3.call(this),Vt.prototype.__init4.call(this),this._state=It.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new Vt((r,s)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new Vt((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,e&&e()},o=>{i=!0,s=o,e&&e()}).then(()=>{if(i){r(s);return}n(s)})})}__init(){this._resolve=e=>{this._setResult(It.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(It.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===It.PENDING){if(vs(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===It.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===It.RESOLVED&&n[1](this._value),this._state===It.REJECTED&&n[2](this._value),n[0]=!0)})}}};const xa=1e3;function nr(){return Date.now()/xa}function Rp(){const{performance:t}=q;if(!t||!t.now)return nr;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/xa}const Oa=Rp(),xp=(()=>{const{performance:t}=q;if(!t||!t.now)return;const e=3600*1e3,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=s<e,o=t.timing&&t.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):e,u=c<e;return i||u?s<=c?t.timeOrigin:o:r})();function Op(t,e=[]){return[t,e]}function Dp(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Mp(t,e,n,r){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:Jf(r)},...s&&{trace:yt({...s})}}}const Np=60*1e3;function Ap(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?Np:r-e}function $p(t,e){return t[e]||t.all||0}function Lp(t,e,n=Date.now()){return $p(t,e)>n}function Pp(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,l]=a.split(":",5),d=parseInt(c,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+Ap(o,r):e===429&&(s.all=r+60*1e3);return s}function Fp(t,e){return t??e()}function vr(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}const vn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xs="production";function Da(){return Ra("globalEventProcessors",()=>[])}function Dn(t,e,n,r=0){return new Cp((s,i)=>{const o=t[r];if(e===null||typeof o!="function")s(e);else{const a=o({...e},n);vn&&o.id&&a===null&&k.log(`Event processor "${o.id}" dropped event`),vs(a)?a.then(c=>Dn(t,c,n,r+1).then(s)).then(null,i):Dn(t,a,n,r+1).then(s).then(null,i)}})}function Bp(t){const e=Oa(),n={sid:it(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Hp(n)};return t&&rr(n,t),n}function rr(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||Oa(),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:it()),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{const 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 Up(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),rr(t,n)}function Hp(t){return yt({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}})}const jp=1;function Wp(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=re(t);return yt({data:r,op:s,parent_span_id:i,span_id:e,status:o,tags:a,trace_id:n,origin:c})}function re(t){return zp(t)?t.getSpanJSON():typeof t.toJSON=="function"?t.toJSON():{}}function zp(t){return typeof t.getSpanJSON=="function"}function qp(t){const{traceFlags:e}=t.spanContext();return!!(e&jp)}function Gp(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||it(),timestamp:e.timestamp||nr()},u=n.integrations||t.integrations.map(m=>m.name);Yp(c,t),Jp(c,u),e.type===void 0&&Vp(c,t.stackParser);const l=Qp(r,n.captureContext);n.mechanism&&ep(c,n.mechanism);const d=s&&s.getEventProcessors?s.getEventProcessors():[],f=ph().getScopeData();if(i){const m=i.getScopeData();Hi(f,m)}if(l){const m=l.getScopeData();Hi(f,m)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Aa(c,f);const h=[...d,...Da(),...f.eventProcessors];return Dn(h,c,n).then(m=>(m&&Kp(m),typeof o=="number"&&o>0?Xp(m,o,a):m))}function Yp(t,e){const{environment:n,release:r,dist:s,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?n:xs),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&s!==void 0&&(t.dist=s),t.message&&(t.message=wr(t.message,i));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=wr(o.value,i));const a=t.request;a&&a.url&&(a.url=wr(a.url,i))}const Ui=new WeakMap;function Vp(t,e){const n=q._sentryDebugIds;if(!n)return;let r;const s=Ui.get(e);s?r=s:(r=new Map,Ui.set(e,r));const i=Object.keys(n).reduce((o,a)=>{let c;const u=r.get(a);u?c=u:(c=e(a),r.set(a,c));for(let l=c.length-1;l>=0;l--){const d=c[l];if(d.filename){o[d.filename]=n[a];break}}return o},{});try{t.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Kp(t){const e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?e[s.abs_path]=s.debug_id:s.filename&&(e[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:e[r]})})}function Jp(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Xp(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:Mt(s.data,e,n)}}))},...t.user&&{user:Mt(t.user,e,n)},...t.contexts&&{contexts:Mt(t.contexts,e,n)},...t.extra&&{extra:Mt(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Mt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(s=>{const i=re(s).data;return i&&(s.data=Mt(i,e,n)),s})),r}function Qp(t,e){if(!e)return t;const n=t?t.clone():new Ve;return n.update(e),n}function Zp(t){if(t)return th(t)?{captureContext:t}:nh(t)?{captureContext:t}:t}function th(t){return t instanceof Ve||typeof t=="function"}const eh=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function nh(t){return Object.keys(t).some(e=>eh.includes(e))}function Ma(t,e){return xe().captureException(t,Zp(e))}function rh(t,e){xe().addBreadcrumb(t,e)}function sh(t,e){xe().setContext(t,e)}function ht(){return xe().getClient()}function sr(){return xe().getScope()}function Na(t){return t.transaction}function ih(t,e,n){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=yt({environment:r.environment||xs,release:r.release,user_segment:i,public_key:s,trace_id:t});return e.emit&&e.emit("createDsc",o),o}function oh(t){const e=ht();if(!e)return{};const n=ih(re(t).trace_id||"",e,sr()),r=Na(t);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;i!=null&&(n.sample_rate=`${i}`);const a=re(r);return o&&o!=="url"&&(n.transaction=a.description),n.sampled=String(qp(r)),e.emit&&e.emit("createDsc",n),n}function Aa(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;ah(t,e),r&&lh(t,r),dh(t,n),ch(t,s),uh(t,i)}function Hi(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:f,transactionName:p,span:h}=e;Ae(t,"extra",n),Ae(t,"tags",r),Ae(t,"user",s),Ae(t,"contexts",i),Ae(t,"sdkProcessingMetadata",a),o&&(t.level=o),p&&(t.transactionName=p),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={...t.propagationContext,...f}}function Ae(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function ah(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e,c=yt(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const u=yt(r);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const l=yt(s);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=yt(i);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts}),o&&(t.level=o),a&&(t.transaction=a)}function ch(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function uh(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function lh(t,e){t.contexts={trace:Wp(e),...t.contexts};const n=Na(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:oh(e),...t.sdkProcessingMetadata};const r=re(n).description;r&&(t.tags={transaction:r,...t.tags})}}function dh(t,e){t.fingerprint=t.fingerprint?np(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}const fh=100;let kr,Ve=class kn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ji()}static clone(e){return e?e.clone():new kn}clone(){const e=new kn;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&rr(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...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}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e;if(n instanceof kn){const r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Is(n)){const r=e;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=ji(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:fh;if(r<=0)return this;const s={timestamp:nr(),...e},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,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}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:n,_contexts:r,_tags:s,_extra:i,_user:o,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:f,_span:p}=this;return{breadcrumbs:e,attachments:n,contexts:r,tags:s,extra:i,user:o,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:d,transactionName:f,span:p}}applyToEvent(e,n={},r=[]){Aa(e,this.getScopeData());const s=[...r,...Da(),...this._eventProcessors];return Dn(s,e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n&&n.event_id?n.event_id:it();if(!this._client)return k.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){const s=r&&r.event_id?r.event_id:it();if(!this._client)return k.warn("No client configured on scope - will not capture message!"),s;const i=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s},this),s}captureEvent(e,n){const r=n&&n.event_id?n.event_id:it();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(k.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 ph(){return kr||(kr=new Ve),kr}function ji(){return{traceId:it(),spanId:it().substring(16)}}const hh="7.119.2",$a=parseFloat(hh),mh=100;let La=class{constructor(e,n,r,s=$a){this._version=s;let i;n?i=n:(i=new Ve,i.setClient(e));let o;r?o=r:(o=new Ve,o.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version<e}bindClient(e){const n=this.getStackTop();n.client=e,n.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){const n=this.pushScope();let r;try{r=e(n)}catch(s){throw this.popScope(),s}return vs(r)?r.then(s=>(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:it(),s=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:s,...n,event_id:r}),r}captureMessage(e,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:it(),i=new Error(e);return this.getScope().captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s}),s}captureEvent(e,n){const r=n&&n.event_id?n.event_id:it();return e.type||(this._lastEventId=r),this.getScope().captureEvent(e,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=mh}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const c={timestamp:nr(),...e},u=i?Ye(()=>i(c,n)):c;u!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,n){this.getScope().setTag(e,n),this.getIsolationScope().setTag(e,n)}setExtra(e,n){this.getScope().setExtra(e,n),this.getIsolationScope().setExtra(e,n)}setContext(e,n){this.getScope().setContext(e,n),this.getIsolationScope().setContext(e,n)}configureScope(e){const{scope:n,client:r}=this.getStackTop();r&&e(n)}run(e){const n=Wi(this);try{e(this)}finally{Wi(n)}}getIntegration(e){const n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return vn&&k.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){const r=this._callExtensionMethod("startTransaction",e,n);return vn&&!r&&(this.getClient()?k.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):k.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&Up(r),this._sendSessionUpdate(),n.setSession()}startSession(e){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=xs}=r&&r.getOptions()||{},{userAgent:o}=q.navigator||{},a=Bp({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&rr(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:n}=this.getStackTop(),r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(e,...n){const s=ir().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[e]=="function")return s.extensions[e].apply(this,n);vn&&k.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function ir(){return q.__SENTRY__=q.__SENTRY__||{extensions:{},hub:void 0},q}function Wi(t){const e=ir(),n=Zr(e);return Pa(e,t),n}function xe(){const t=ir();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return _h(t)}function gh(){return xe().getIsolationScope()}function _h(t=ir()){return(!yh(t)||Zr(t).isOlderThan($a))&&Pa(t,new La),Zr(t)}function yh(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Zr(t){return Ra("hub",()=>new La,t)}function Pa(t,e){if(!t)return!1;const n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}const Sh="sentry.source";function Eh(t){const e=ht();!e||!e.addEventProcessor||e.addEventProcessor(t)}function bh(t,e){const n=e&&Ih(e)?e.getClient():e,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return wh(t,r)||Th(t,s)}function Th(t,e){return e?zi(t)===zi(e):!1}function wh(t,e){return e?t.includes(e.host):!1}function zi(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function Ih(t){return t.getClient!==void 0}const vh=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rt=q,kh=(t,e,n)=>{let r,s;return i=>{e.value>=0&&(i||n)&&(s=e.value-(r||0),(s||r===void 0)&&(r=e.value,e.delta=s,t(e)))}},Ch=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Rh=()=>{const t=rt.performance.timing,e=rt.performance.navigation.type,n={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(const r in t)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(t[r]-t.navigationStart,0));return n},Fa=()=>rt.__WEB_VITALS_POLYFILL__?rt.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Rh()):rt.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Ba=()=>{const t=Fa();return t&&t.activationStart||0},xh=(t,e)=>{const n=Fa();let r="navigate";return n&&(rt.document&&rt.document.prerendering||Ba()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:Ch(),navigationType:r}},Ua=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{e(s.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},Ha=(t,e)=>{const n=r=>{(r.type==="pagehide"||rt.document.visibilityState==="hidden")&&(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};rt.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};let Mn=-1;const Oh=()=>{rt.document&&rt.document.visibilityState&&(Mn=rt.document.visibilityState==="hidden"&&!rt.document.prerendering?0:1/0)},Dh=()=>{Ha(({timeStamp:t})=>{Mn=t},!0)},Mh=()=>(Mn<0&&(Oh(),Dh()),{get firstHiddenTime(){return Mn}}),qi={},Nh=t=>{const e=Mh(),n=xh("LCP");let r;const s=o=>{const a=o[o.length-1];if(a){const c=Math.max(a.startTime-Ba(),0);c<e.firstHiddenTime&&(n.value=c,n.entries=[a],r())}},i=Ua("largest-contentful-paint",s);if(i){r=kh(t,n);const o=()=>{qi[n.id]||(s(i.takeRecords()),i.disconnect(),qi[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{rt.document&&addEventListener(a,o,{once:!0,capture:!0})}),Ha(o,!0),o}},Fe={},Nn={};let ja;function Ah(t,e=!1){return Ph("lcp",t,Lh,ja,e)}function $h(t,e){return za(t,e),Nn[t]||(Fh(t),Nn[t]=!0),qa(t,e)}function Wa(t,e){const n=Fe[t];if(!(!n||!n.length))for(const r of n)try{r(e)}catch(s){vh&&k.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${Rs(r)}
Error:`,s)}}function Lh(){return Nh(t=>{Wa("lcp",{metric:t}),ja=t})}function Ph(t,e,n,r,s=!1){za(t,e);let i;return Nn[t]||(i=n(),Nn[t]=!0),r&&e({metric:r}),qa(t,e,s?i:void 0)}function Fh(t){const e={};t==="event"&&(e.durationThreshold=0),Ua(t,n=>{Wa(t,{entries:n})},e)}function za(t,e){Fe[t]=Fe[t]||[],Fe[t].push(e)}function qa(t,e,n){return()=>{n&&n();const r=Fe[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}const B=q,Os="sentryReplaySession",Bh="replay_event",Ds="Unable to send Replay",Uh=3e5,Hh=9e5,jh=5e3,Wh=5500,zh=6e4,qh=5e3,Gh=3,Gi=15e4,yn=5e3,Yh=3e3,Vh=300,Ms=2e7,Kh=4999,Jh=15e3,Yi=36e5;function Xh(t,e){return t??e()}function An(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}var J;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(J||(J={}));function Qh(t){return t.nodeType===t.ELEMENT_NODE}function Be(t){const e=An([t,"optionalAccess",n=>n.host]);return An([e,"optionalAccess",n=>n.shadowRoot])===t}function Ue(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Zh(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t}function tm(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const 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 $n(t){try{const e=t.rules||t.cssRules;return e?Zh(Array.from(e,Ga).join("")):null}catch{return null}}function Ga(t){let e;if(nm(t))try{e=$n(t.styleSheet)||tm(t)}catch{}else if(rm(t)&&t.selectorText.includes(":"))return em(t.cssText);return e||t.cssText}function em(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function nm(t){return"styleSheet"in t}function rm(t){return"selectorText"in t}class Ya{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;const n=An([this,"access",r=>r.getMeta,"call",r=>r(e),"optionalAccess",r=>r.id]);return Xh(n,()=>-1)}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const 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){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function sm(){return new Ya}function or({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 Ke({isMasked:t,element:e,value:n,maskInputFn:r}){let s=n||"";return t?(r&&(s=r(s,e)),"*".repeat(s.length)):s}function we(t){return t.toLowerCase()}function ts(t){return t.toUpperCase()}const Vi="__rrweb_original__";function im(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let r=0;r<t.width;r+=n)for(let s=0;s<t.height;s+=n){const i=e.getImageData,o=Vi in i?i[Vi]:i;if(new Uint32Array(o.call(e,r,s,Math.min(n,t.width-r),Math.min(n,t.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Ns(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?we(e):null}function Ln(t,e,n){return e==="INPUT"&&(n==="radio"||n==="checkbox")?t.getAttribute("value")||"":t.value}let om=1;const am=new RegExp("[^a-z0-9-_:]"),Je=-2;function As(){return om++}function cm(t){if(t instanceof HTMLFormElement)return"form";const e=we(t.tagName);return am.test(e)?"div":e}function um(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}let ue,Ki;const lm=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,dm=/^(?:[a-z+]+:)?\/\//i,fm=/^www\..*/i,pm=/^(data:)([^,]*),(.*)/i;function Pn(t,e){return(t||"").replace(lm,(n,r,s,i,o,a)=>{const c=s||o||a,u=r||i||"";if(!c)return n;if(dm.test(c)||fm.test(c))return`url(${u}${c}${u})`;if(pm.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${um(e)+c}${u})`;const l=e.split("/"),d=c.split("/");l.pop();for(const f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${u}${l.join("/")}${u})`})}const hm=/^[^ \t\n\r\u000c]+/,mm=/^[, \t\n\r\u000c]+/;function gm(t,e){if(e.trim()==="")return e;let n=0;function r(i){let o;const a=i.exec(e.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(mm),!(n>=e.length);){let i=r(hm);if(i.slice(-1)===",")i=he(t,i.substring(0,i.length-1)),s.push(i);else{let o="";i=he(t,i);let a=!1;for(;;){const c=e.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function he(t,e){if(!e||e.trim()==="")return e;const n=t.createElement("a");return n.href=e,n.href}function _m(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function $s(){const t=document.createElement("a");return t.href="",t.href}function Va(t,e,n,r,s,i){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?he(t,r):n==="srcset"?gm(t,r):n==="style"?Pn(r,$s()):e==="object"&&n==="data"?he(t,r):typeof i=="function"?i(n,r,s):r)}function Ka(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function ym(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 s=t.classList.length;s--;){const i=t.classList[s];if(e.test(i))return!0}if(n)return t.matches(n)}catch{}return!1}function Sm(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}function Kt(t,e,n=1/0,r=0){return!t||t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Kt(t.parentNode,e,n,r+1)}function me(t,e){return n=>{const r=n;if(r===null)return!1;try{if(t){if(typeof t=="string"){if(r.matches(`.${t}`))return!0}else if(Sm(r,t))return!0}return!!(e&&r.matches(e))}catch{return!1}}}function Ie(t,e,n,r,s,i){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const 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(i){if(c=Kt(o,me(r,s)),c<0)return!0;a=Kt(o,me(e,n),c>=0?c:1/0)}else{if(a=Kt(o,me(e,n)),a<0)return!1;c=Kt(o,me(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function Em(t,e,n){const r=t.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=setTimeout(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{clearTimeout(a),s=!0,e()});return}const o="about:blank";if(r.location.href!==o||t.src===o||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function bm(t,e,n){let r=!1,s;try{s=t.sheet}catch{return}if(s)return;const i=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(i),r=!0,e()})}function Tm(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:g,maskInputFn:m,dataURLOptions:_={},inlineImages:b,recordCanvas:A,keepIframeSrcFn:x,newlyAddedElement:j=!1}=e,T=wm(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:J.Document,childNodes:[],compatMode:t.compatMode}:{type:J.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:J.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:T};case t.ELEMENT_NODE:return vm(t,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:m,dataURLOptions:_,inlineImages:b,recordCanvas:A,keepIframeSrcFn:x,newlyAddedElement:j,rootId:T,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case t.TEXT_NODE:return Im(t,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:h,maskInputFn:m,rootId:T});case t.CDATA_SECTION_NODE:return{type:J.CDATA,textContent:"",rootId:T};case t.COMMENT_NODE:return{type:J.Comment,textContent:t.textContent||"",rootId:T};default:return!1}}function wm(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function Im(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=e,d=t.parentNode&&t.parentNode.tagName;let f=t.textContent;const p=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(p&&f){try{t.nextSibling||t.previousSibling||An([t,"access",_=>_.parentNode,"access",_=>_.sheet,"optionalAccess",_=>_.cssRules])&&(f=$n(t.parentNode.sheet))}catch(_){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${_}`,t)}f=Pn(f,$s())}h&&(f="SCRIPT_PLACEHOLDER");const m=Ie(t,r,i,s,o,n);if(!p&&!h&&!g&&f&&m&&(f=a?a(f,t.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(c.textarea||m)&&(f=u?u(f,t.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const _=or({type:null,tagName:d,maskInputOptions:c});f=Ke({isMasked:Ie(t,r,i,s,o,_),element:t,value:f,maskInputFn:u})}return{type:J.Text,textContent:f||"",isStyle:p,rootId:l}}function vm(t,e){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:g,maskAllText:m,maskTextClass:_,unmaskTextClass:b,maskTextSelector:A,unmaskTextSelector:x}=e,j=ym(t,r,s,i),T=cm(t);let y={};const C=t.attributes.length;for(let S=0;S<C;S++){const w=t.attributes[S];w.name&&!Ka(T,w.name,w.value)&&(y[w.name]=Va(n,T,we(w.name),w.value,t,c))}if(T==="link"&&o){const S=Array.from(n.styleSheets).find(H=>H.href===t.href);let w=null;S&&(w=$n(S)),w&&(delete y.rel,delete y.href,y._cssText=Pn(w,S.href))}if(T==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const S=$n(t.sheet);S&&(y._cssText=Pn(S,$s()))}if(T==="input"||T==="textarea"||T==="select"||T==="option"){const S=t,w=Ns(S),H=Ln(S,ts(T),w),V=S.checked;if(w!=="submit"&&w!=="button"&&H){const K=Ie(S,_,A,b,x,or({type:w,tagName:ts(T),maskInputOptions:a}));y.value=Ke({isMasked:K,element:S,value:H,maskInputFn:u})}V&&(y.checked=V)}if(T==="option"&&(t.selected&&!a.select?y.selected=!0:delete y.selected),T==="canvas"&&f){if(t.__context==="2d")im(t)||(y.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){const S=t.toDataURL(l.type,l.quality),w=document.createElement("canvas");w.width=t.width,w.height=t.height;const H=w.toDataURL(l.type,l.quality);S!==H&&(y.rr_dataURL=S)}}if(T==="img"&&d){ue||(ue=n.createElement("canvas"),Ki=ue.getContext("2d"));const S=t,w=S.crossOrigin;S.crossOrigin="anonymous";const H=()=>{S.removeEventListener("load",H);try{ue.width=S.naturalWidth,ue.height=S.naturalHeight,Ki.drawImage(S,0,0),y.rr_dataURL=ue.toDataURL(l.type,l.quality)}catch(V){console.warn(`Cannot inline img src=${S.currentSrc}! Error: ${V}`)}w?y.crossOrigin=w:S.removeAttribute("crossorigin")};S.complete&&S.naturalWidth!==0?H():S.addEventListener("load",H)}if((T==="audio"||T==="video")&&(y.rr_mediaState=t.paused?"paused":"played",y.rr_mediaCurrentTime=t.currentTime),h||(t.scrollLeft&&(y.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(y.rr_scrollTop=t.scrollTop)),j){const{width:S,height:w}=t.getBoundingClientRect();y={class:y.class,rr_width:`${S}px`,rr_height:`${w}px`}}T==="iframe"&&!p(y.src)&&(t.contentDocument||(y.rr_src=y.src),delete y.src);let G;try{customElements.get(T)&&(G=!0)}catch{}return{type:J.Element,tagName:T,attributes:y,childNodes:[],isSVG:_m(t)||void 0,needBlock:j,rootId:g,isCustom:G}}function F(t){return t==null?"":t.toLowerCase()}function km(t,e){if(e.comment&&t.type===J.Comment)return!0;if(t.type===J.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(F(t.attributes.name).match(/^msapplication-tile(image|color)$/)||F(t.attributes.name)==="application-name"||F(t.attributes.rel)==="icon"||F(t.attributes.rel)==="apple-touch-icon"||F(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&F(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(F(t.attributes.property).match(/^(og|twitter|fb):/)||F(t.attributes.name).match(/^(og|twitter):/)||F(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(F(t.attributes.name)==="robots"||F(t.attributes.name)==="googlebot"||F(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(F(t.attributes.name)==="author"||F(t.attributes.name)==="generator"||F(t.attributes.name)==="framework"||F(t.attributes.name)==="publisher"||F(t.attributes.name)==="progid"||F(t.attributes.property).match(/^article:/)||F(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(F(t.attributes.name)==="google-site-verification"||F(t.attributes.name)==="yandex-verification"||F(t.attributes.name)==="csrf-token"||F(t.attributes.name)==="p:domain_verify"||F(t.attributes.name)==="verify-v1"||F(t.attributes.name)==="verification"||F(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ge(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:m,maskInputFn:_,slimDOMOptions:b,dataURLOptions:A={},inlineImages:x=!1,recordCanvas:j=!1,onSerialize:T,onIframeLoad:y,iframeLoadTimeout:C=5e3,onStylesheetLoad:G,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:H=!1}=e;let{preserveWhiteSpace:V=!0}=e;const K=Tm(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:m,maskInputFn:_,dataURLOptions:A,inlineImages:x,recordCanvas:j,keepIframeSrcFn:w,newlyAddedElement:H});if(!K)return console.warn(t,"not serialized"),null;let st;r.hasNode(t)?st=r.getId(t):km(K,b)||!V&&K.type===J.Text&&!K.isStyle&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?st=Je:st=As();const $=Object.assign(K,{id:st});if(r.add(t,$),st===Je)return null;T&&T(t);let ot=!f;if($.type===J.Element){ot=ot&&!$.needBlock,delete $.needBlock;const Y=t.shadowRoot;Y&&Ue(Y)&&($.isShadowHost=!0)}if(($.type===J.Document||$.type===J.Element)&&ot){b.headWhitespace&&$.type===J.Element&&$.tagName==="head"&&(V=!1);const Y={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:m,maskInputFn:_,slimDOMOptions:b,dataURLOptions:A,inlineImages:x,recordCanvas:j,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:y,iframeLoadTimeout:C,onStylesheetLoad:G,stylesheetLoadTimeout:S,keepIframeSrcFn:w};for(const nt of Array.from(t.childNodes)){const ut=ge(nt,Y);ut&&$.childNodes.push(ut)}if(Qh(t)&&t.shadowRoot)for(const nt of Array.from(t.shadowRoot.childNodes)){const ut=ge(nt,Y);ut&&(Ue(t.shadowRoot)&&(ut.isShadow=!0),$.childNodes.push(ut))}}return t.parentNode&&Be(t.parentNode)&&Ue(t.parentNode)&&($.isShadow=!0),$.type===J.Element&&$.tagName==="iframe"&&Em(t,()=>{const Y=t.contentDocument;if(Y&&y){const nt=ge(Y,{doc:Y,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:m,maskInputFn:_,slimDOMOptions:b,dataURLOptions:A,inlineImages:x,recordCanvas:j,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:y,iframeLoadTimeout:C,onStylesheetLoad:G,stylesheetLoadTimeout:S,keepIframeSrcFn:w});nt&&y(t,nt)}},C),$.type===J.Element&&$.tagName==="link"&&$.attributes.rel==="stylesheet"&&bm(t,()=>{if(G){const Y=ge(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:m,maskInputFn:_,slimDOMOptions:b,dataURLOptions:A,inlineImages:x,recordCanvas:j,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:y,iframeLoadTimeout:C,onStylesheetLoad:G,stylesheetLoadTimeout:S,keepIframeSrcFn:w});Y&&G(t,Y)}},S),$}function Cm(t,e){const{mirror:n=new Ya,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:m,maskInputFn:_,slimDOM:b=!1,dataURLOptions:A,preserveWhiteSpace:x,onSerialize:j,onIframeLoad:T,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:G,keepIframeSrcFn:S=()=>!1}=e||{};return ge(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,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:m,maskInputFn:_,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:A,inlineImages:f,recordCanvas:p,preserveWhiteSpace:x,onSerialize:j,onIframeLoad:T,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:G,keepIframeSrcFn:S,newlyAddedElement:!1})}function Nt(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}function tt(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const fe=`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.`;let Ji={map:{},getId(){return console.error(fe),-1},getNode(){return console.error(fe),null},removeNodeFromMap(){console.error(fe)},has(){return console.error(fe),!1},reset(){console.error(fe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ji=new Proxy(Ji,{get(t,e,n){return e==="map"&&console.error(fe),Reflect.get(t,e,n)}}));function Xe(t,e,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=e-(o-s),c=this;a<=0||a>e?(r&&(Am(r),r=null),s=o,t.apply(c,i)):!r&&n.trailing!==!1&&(r=ar(()=>{s=n.leading===!1?0:Date.now(),r=null,t.apply(c,i)},a))}}function Ja(t,e,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(o){ar(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Ja(t,e,i||{},!0)}function Ls(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}let Fn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Fn=()=>new Date().getTime());function Xa(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:Nt([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Nt([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Nt([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:Nt([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Nt([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Nt([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Qa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Za(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function tc(t){return t?t.nodeType===t.ELEMENT_NODE?t:t.parentElement:null}function ft(t,e,n,r,s){if(!t)return!1;const i=tc(t);if(!i)return!1;const o=me(e,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Kt(i,o);let c=-1;return a<0?!1:(r&&(c=Kt(i,me(null,r))),a>-1&&c<0?!0:a<c)}function Rm(t,e){return e.getId(t)!==-1}function Cr(t,e){return e.getId(t)===Je}function ec(t,e){if(Be(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?ec(t.parentNode,e):!0:!0}function es(t){return!!t.changedTouches}function xm(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 nc(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function rc(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function ns(t){return!!Nt([t,"optionalAccess",e=>e.shadowRoot])}class Om{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Fp(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 sc(t){let e=null;return Nt([t,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function Dm(t){let e=t,n;for(;n=sc(e);)e=n;return e}function Mm(t){const e=t.ownerDocument;if(!e)return!1;const n=Dm(t);return e.contains(n)}function ic(t){const e=t.ownerDocument;return e?e.contains(t)||Mm(t):!1}const Xi={};function Ps(t){const e=Xi[t];if(e)return e;const n=window.document;let r=window[t];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[t]&&(r=i[t]),n.head.removeChild(s)}catch{}return Xi[t]=r.bind(window)}function Nm(...t){return Ps("requestAnimationFrame")(...t)}function ar(...t){return Ps("setTimeout")(...t)}function Am(...t){return Ps("clearTimeout")(...t)}var I=(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))(I||{}),v=(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))(v||{}),Q=(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))(Q||{}),Tt=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Tt||{});function $m(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}function Qi(t){return"__ln"in t}class Lm{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=$m([n,"optionalAccess",s=>s.next])||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Qi(e.previousSibling)){const 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&&Qi(e.nextSibling)&&e.nextSibling.__ln.previous){const 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){const 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--)}}const Zi=(t,e)=>`${t}@${e}`;class Pm{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new Lm,s=c=>{let u=c,l=Je;for(;l===Je;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},i=c=>{if(!c.parentNode||!ic(c))return;const u=Be(c.parentNode)?this.mirror.getId(sc(c)):this.mirror.getId(c.parentNode),l=s(c);if(u===-1||l===-1)return r.addNode(c);const d=ge(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=>{nc(f,this.mirror)&&this.iframeManager.addIframe(f),rc(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ns(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{this.iframeManager.attachIframe(f,p),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});d&&(e.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)to(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!eo(this.droppedSet,c)&&!to(this.removes,c,this.mirror)||eo(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){const u=this.mirror.getId(o.value.parentNode),l=s(o.value);u!==-1&&l!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){const l=u;if(u=u.previous,l){const d=this.mirror.getId(l.value.parentNode);if(s(l.value)===-1)continue;if(d!==-1){c=l;break}else{const p=l.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.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),i(c.value)}const 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=>{const{attributes:u}=c;if(typeof u.style=="string"){const 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(!Cr(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!ft(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:Ie(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,tc(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){const o=Ns(n),a=n.tagName;s=Ln(n,a,o);const c=or({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Ie(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=Ke({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(ft(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===e.oldValue)return;let i=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Ka(n.tagName,r)&&(i.attributes[r]=Va(this.doc,we(n.tagName),we(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(ft(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Be(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);ft(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Cr(n,this.mirror)||!Rm(n,this.mirror)||(this.addedSet.has(n)?(rs(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||ec(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Zi(r,s)]?rs(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Be(e.target)&&Ue(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(Cr(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[Zi(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ft(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(r=>this.genAdds(r)),ns(e)&&e.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function rs(t,e){t.delete(e),e.childNodes.forEach(n=>rs(t,n))}function to(t,e,n){return t.length===0?!1:oc(t,e,n)}function oc(t,e,n){const{parentNode:r}=e;if(!r)return!1;const s=n.getId(r);return t.some(i=>i.id===s)?!0:oc(t,r,n)}function eo(t,e){return t.size===0?!1:ac(t,e)}function ac(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:ac(t,n):!1}let He;function Fm(t){He=t}function Bm(){He=void 0}const R=t=>He?(...n)=>{try{return t(...n)}catch(r){if(He&&He(r)===!0)return()=>{};throw r}}:t;function mt(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}const _e=[];function rn(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function cc(t,e){const n=new Pm;_e.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const s=mt([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(R(o=>{t.onMutation&&t.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Um({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],a;const c=Xe(R(d=>{const f=Date.now()-a;t(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=R(Xe(R(d=>{const f=rn(d),{clientX:p,clientY:h}=es(d)?d.changedTouches[0]:d;a||(a=Fn()),o.push({x:p,y:h,id:r.getId(f),timeOffset:Fn()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?v.Drag:d instanceof MouseEvent?v.MouseMove:v.TouchMove)}),s,{trailing:!1})),l=[tt("mousemove",u,n),tt("touchmove",u,n),tt("drag",u,n)];return R(()=>{l.forEach(d=>d())})}function Hm({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[];let u=null;const l=d=>f=>{const p=rn(f);if(ft(p,r,s,i,!0))return;let h=null,g=d;if("pointerType"in f){switch(f.pointerType){case"mouse":h=Tt.Mouse;break;case"touch":h=Tt.Touch;break;case"pen":h=Tt.Pen;break}h===Tt.Touch?Q[d]===Q.MouseDown?g="TouchStart":Q[d]===Q.MouseUp&&(g="TouchEnd"):Tt.Pen}else es(f)&&(h=Tt.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===Tt.Touch||g.startsWith("Mouse")&&h===Tt.Mouse)&&(h=null)):Q[d]===Q.Click&&(h=u,u=null);const m=es(f)?f.changedTouches[0]:f;if(!m)return;const _=n.getId(p),{clientX:b,clientY:A}=m;R(t)({type:Q[g],id:_,x:b,y:A,...h!==null&&{pointerType:h}})};return Object.keys(Q).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=we(d);const p=l(d);if(window.PointerEvent)switch(Q[d]){case Q.MouseDown:case Q.MouseUp:f=f.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}c.push(tt(f,p,e))}),R(()=>{c.forEach(d=>d())})}function uc({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=R(Xe(R(c=>{const u=rn(c);if(!u||ft(u,r,s,i,!0))return;const l=n.getId(u);if(u===e&&e.defaultView){const d=Xa(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 tt("scroll",a,e)}function jm({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=R(Xe(R(()=>{const i=Qa(),o=Za();(n!==i||r!==o)&&(t({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return tt("resize",s,e)}const Wm=["INPUT","TEXTAREA","SELECT"],no=new WeakMap;function zm({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:g}){function m(y){let C=rn(y);const G=y.isTrusted,S=C&&ts(C.tagName);if(S==="OPTION"&&(C=C.parentElement),!C||!S||Wm.indexOf(S)<0||ft(C,r,s,i,!0))return;const w=C;if(w.classList.contains(o)||a&&w.matches(a))return;const H=Ns(C);let V=Ln(w,S,H),K=!1;const st=or({maskInputOptions:c,tagName:S,type:H}),$=Ie(C,f,h,p,g,st);(H==="radio"||H==="checkbox")&&(K=C.checked),V=Ke({isMasked:$,element:C,value:V,maskInputFn:u}),_(C,d?{text:V,isChecked:K,userTriggered:G}:{text:V,isChecked:K});const ot=C.name;H==="radio"&&ot&&K&&e.querySelectorAll(`input[type="radio"][name="${ot}"]`).forEach(Y=>{if(Y!==C){const nt=Ke({isMasked:$,element:Y,value:Ln(Y,S,H),maskInputFn:u});_(Y,d?{text:nt,isChecked:!K,userTriggered:!1}:{text:nt,isChecked:!K})}})}function _(y,C){const G=no.get(y);if(!G||G.text!==C.text||G.isChecked!==C.isChecked){no.set(y,C);const S=n.getId(y);R(t)({...C,id:S})}}const A=(l.input==="last"?["change"]:["input","change"]).map(y=>tt(y,R(m),e)),x=e.defaultView;if(!x)return()=>{A.forEach(y=>y())};const j=x.Object.getOwnPropertyDescriptor(x.HTMLInputElement.prototype,"value"),T=[[x.HTMLInputElement.prototype,"value"],[x.HTMLInputElement.prototype,"checked"],[x.HTMLSelectElement.prototype,"value"],[x.HTMLTextAreaElement.prototype,"value"],[x.HTMLSelectElement.prototype,"selectedIndex"],[x.HTMLOptionElement.prototype,"selected"]];return j&&j.set&&A.push(...T.map(y=>Ja(y[0],y[1],{set(){R(m)({target:this,isTrusted:!1})}},!1,x))),R(()=>{A.forEach(y=>y())})}function Bn(t){const e=[];function n(r,s){if(Sn("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Sn("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Sn("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Sn("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(t,e)}function At(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function qm({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:R((l,d,f)=>{const[p,h]=f,{id:g,styleId:m}=At(d,e,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&t({id:g,styleId:m,adds:[{rule:p,index:h}]}),l.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:R((l,d,f)=>{const[p]=f,{id:h,styleId:g}=At(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,removes:[{index:p}]}),l.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:R((l,d,f)=>{const[p]=f,{id:h,styleId:g}=At(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,replace:p}),l.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:R((l,d,f)=>{const[p]=f,{id:h,styleId:g}=At(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,replaceSync:p}),l.apply(d,f)})}));const c={};En("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(En("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),En("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),En("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const 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:R((f,p,h)=>{const[g,m]=h,{id:_,styleId:b}=At(p.parentStyleSheet,e,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&t({id:_,styleId:b,adds:[{rule:g,index:[...Bn(p),m||0]}]}),f.apply(p,h)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:R((f,p,h)=>{const[g]=h,{id:m,styleId:_}=At(p.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&t({id:m,styleId:_,removes:[{index:[...Bn(p),g]}]}),f.apply(p,h)})})}),R(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,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 lc({mirror:t,stylesheetManager:e},n){let r=null;n.nodeName==="#document"?r=t.getId(n):r=t.getId(n.host);const s=n.nodeName==="#document"?mt([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):mt([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=mt([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(mt([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return mt([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=mt([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{e.adoptStyleSheets(o,r)}catch{}return a}}),R(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function Gm({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:R((a,c,u)=>{const[l,d,f]=u;if(n.has(l))return i.apply(c,[l,d,f]);const{id:p,styleId:h}=At(mt([c,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),e,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&t({id:p,styleId:h,set:{property:l,value:d,priority:f},index:Bn(c.parentRule)}),a.apply(c,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:R((a,c,u)=>{const[l]=u;if(n.has(l))return o.apply(c,[l]);const{id:d,styleId:f}=At(mt([c,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),e,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&t({id:d,styleId:f,remove:{property:l},index:Bn(c.parentRule)}),a.apply(c,u)})}),R(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Ym({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=R(u=>Xe(R(l=>{const d=rn(l);if(!d||ft(d,e,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:g}=d;t({type:u,id:s.getId(d),currentTime:f,volume:p,muted:h,playbackRate:g})}),i.media||500)),c=[tt("play",a(0),o),tt("pause",a(1),o),tt("seeked",a(2),o),tt("volumechange",a(3),o),tt("ratechange",a(4),o)];return R(()=>{c.forEach(u=>u())})}function Vm({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,l){const d=new i(c,u,l);return s.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=Ls(e.fonts,"add",function(a){return function(c){return ar(R(()=>{const u=s.get(c);u&&(t(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),R(()=>{r.forEach(a=>a())})}function Km(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=t;let a=!0;const c=R(()=>{const u=e.getSelection();if(!u||a&&mt([u,"optionalAccess",f=>f.isCollapsed]))return;a=u.isCollapsed||!1;const l=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:g,endContainer:m,endOffset:_}=p;ft(h,r,s,i,!0)||ft(m,r,s,i,!0)||l.push({start:n.getId(h),startOffset:g,end:n.getId(m),endOffset:_})}o({ranges:l})});return c(),tt("selectionchange",c)}function Jm({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:Ls(n.customElements,"define",function(s){return function(i,o,a){try{e({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function Xm(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};const r=cc(t,t.doc),s=Um(t),i=Hm(t),o=uc(t),a=jm(t,{win:n}),c=zm(t),u=Ym(t),l=qm(t,{win:n}),d=lc(t,t.doc),f=Gm(t,{win:n}),p=t.collectFonts?Vm(t):()=>{},h=Km(t),g=Jm(t),m=[];for(const _ of t.plugins)m.push(_.observer(_.callback,n,_.options));return R(()=>{_e.forEach(_=>_.reset()),r.disconnect(),s(),i(),o(),a(),c(),u(),l(),d(),f(),p(),h(),g(),m.forEach(_=>_())})}function Sn(t){return typeof window[t]<"u"}function En(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ss{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,n,r,s){const i=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(e,n){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return n.map(i=>this.getId(e,i,r,s))}getRemoteId(e,n,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(s=>this.getRemoteId(e,s,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}function ro(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}class Qm{constructor(){this.crossOriginIframeMirror=new ss(As),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Zm{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ss(As),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ss(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}),ro([this,"access",r=>r.loadListener,"optionalCall",r=>r(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(e,n){switch(n.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:I.IncrementalSnapshot,data:{source:v.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return n;case I.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case I.IncrementalSnapshot:switch(n.data.source){case v.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(r.node,s)}),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 v.Drag:case v.TouchMove:case v.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case v.ViewportResize:return!1;case v.MediaInteraction:case v.MouseInteraction:case v.Scroll:case v.CanvasMutation:case v.Input:return this.replaceIds(n.data,e,["id"]),n;case v.StyleSheetRule:case v.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case v.Font:return n;case v.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),n;case v.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),ro([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,e,["styleId"])})]),n}}return!1}replace(e,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=e.getIds(r,n[i]):n[i]=e.getId(r,n[i]));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!==J.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class tg{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class eg{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(!Ue(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=cc({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(uc({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),ar(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(lc({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(Ls(e.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&ic(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class so{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class ng{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Om,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;const r={id:n,styleIds:[]},s=[];for(const i of e){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:Ga(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class rg{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){Nm(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==n)}add(e,n){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let z,Un;const dt=sm();function Ut(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=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:p=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:_,maskAttributeFn:b,maskInputFn:A,maskTextFn:x,maxCanvasSize:j=null,packFn:T,sampling:y={},dataURLOptions:C={},mousemoveWait:G,recordCanvas:S=!1,recordCrossOriginIframes:w=!1,recordAfter:H=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:K=!1,inlineImages:st=!1,plugins:$,keepIframeSrcFn:ot=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:nt,onMutation:ut,getCanvasManager:hr}=t;Fm(nt);const ae=w?window.parent===window:!0;let Ot=!1;if(!ae)try{window.parent.document&&(Ot=!1)}catch{Ot=!0}if(ae&&!e)throw new Error("emit function is required");G!==void 0&&y.mousemove===void 0&&(y.mousemove=G),dt.reset();const ce=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}:m!==void 0?m:{},Oe=_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_==="all",headMetaDescKeywords:_==="all"}:_||{};xm();let mr,gr=0;const Vs=D=>{for(const lt of $||[])lt.eventProcessor&&(D=lt.eventProcessor(D));return T&&!Ot&&(D=T(D)),D};z=(D,lt)=>{const O=D;if(O.timestamp=Fn(),vr([_e,"access",W=>W[0],"optionalAccess",W=>W.isFrozen,"call",W=>W()])&&O.type!==I.FullSnapshot&&!(O.type===I.IncrementalSnapshot&&O.data.source===v.Mutation)&&_e.forEach(W=>W.unfreeze()),ae)vr([e,"optionalCall",W=>W(Vs(O),lt)]);else if(Ot){const W={type:"rrweb",event:Vs(O),origin:window.location.origin,isCheckout:lt};window.parent.postMessage(W,"*")}if(O.type===I.FullSnapshot)mr=O,gr=0;else if(O.type===I.IncrementalSnapshot){if(O.data.source===v.Mutation&&O.data.isAttachIframe)return;gr++;const W=r&&gr>=r,M=n&&mr&&O.timestamp-mr.timestamp>n;(W||M)&&yr(!0)}};const an=D=>{z({type:I.IncrementalSnapshot,data:{source:v.Mutation,...D}})},Ks=D=>z({type:I.IncrementalSnapshot,data:{source:v.Scroll,...D}}),Yc=D=>z({type:I.IncrementalSnapshot,data:{source:v.CanvasMutation,...D}}),Vc=D=>z({type:I.IncrementalSnapshot,data:{source:v.AdoptedStyleSheet,...D}}),zt=new ng({mutationCb:an,adoptedStyleSheetCb:Vc}),qt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Qm:new Zm({mirror:dt,mutationCb:an,stylesheetManager:zt,recordCrossOriginIframes:w,wrappedEmit:z});for(const D of $||[])D.getMirror&&D.getMirror({nodeMirror:dt,crossOriginIframeMirror:qt.crossOriginIframeMirror,crossOriginIframeStyleMirror:qt.crossOriginIframeStyleMirror});const _r=new rg,Js=ig(hr,{mirror:dt,win:window,mutationCb:D=>z({type:I.IncrementalSnapshot,data:{source:v.CanvasMutation,...D}}),recordCanvas:S,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:j,sampling:y.canvas,dataURLOptions:C,errorHandler:nt}),cn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new tg:new eg({mutationCb:an,scrollCb:Ks,bypassOptions:{onMutation:ut,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:ce,dataURLOptions:C,maskAttributeFn:b,maskTextFn:x,maskInputFn:A,recordCanvas:S,inlineImages:st,sampling:y,slimDOMOptions:Oe,iframeManager:qt,stylesheetManager:zt,canvasManager:Js,keepIframeSrcFn:ot,processedNodeManager:_r},mirror:dt}),yr=(D=!1)=>{z({type:I.Meta,data:{href:window.location.href,width:Za(),height:Qa()}},D),zt.reset(),cn.init(),_e.forEach(O=>O.lock());const lt=Cm(document,{mirror:dt,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:ce,maskAttributeFn:b,maskInputFn:A,maskTextFn:x,slimDOM:Oe,dataURLOptions:C,recordCanvas:S,inlineImages:st,onSerialize:O=>{nc(O,dt)&&qt.addIframe(O),rc(O,dt)&&zt.trackLinkElement(O),ns(O)&&cn.addShadowRoot(O.shadowRoot,document)},onIframeLoad:(O,W)=>{qt.attachIframe(O,W),cn.observeAttachShadow(O)},onStylesheetLoad:(O,W)=>{zt.attachLinkElement(O,W)},keepIframeSrcFn:ot});if(!lt)return console.warn("Failed to snapshot the document");z({type:I.FullSnapshot,data:{node:lt,initialOffset:Xa(window)}}),_e.forEach(O=>O.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&zt.adoptStyleSheets(document.adoptedStyleSheets,dt.getId(document))};Un=yr;try{const D=[],lt=W=>R(Xm)({onMutation:ut,mutationCb:an,mousemoveCb:(M,Gt)=>z({type:I.IncrementalSnapshot,data:{source:Gt,positions:M}}),mouseInteractionCb:M=>z({type:I.IncrementalSnapshot,data:{source:v.MouseInteraction,...M}}),scrollCb:Ks,viewportResizeCb:M=>z({type:I.IncrementalSnapshot,data:{source:v.ViewportResize,...M}}),inputCb:M=>z({type:I.IncrementalSnapshot,data:{source:v.Input,...M}}),mediaInteractionCb:M=>z({type:I.IncrementalSnapshot,data:{source:v.MediaInteraction,...M}}),styleSheetRuleCb:M=>z({type:I.IncrementalSnapshot,data:{source:v.StyleSheetRule,...M}}),styleDeclarationCb:M=>z({type:I.IncrementalSnapshot,data:{source:v.StyleDeclaration,...M}}),canvasMutationCb:Yc,fontCb:M=>z({type:I.IncrementalSnapshot,data:{source:v.Font,...M}}),selectionCb:M=>{z({type:I.IncrementalSnapshot,data:{source:v.Selection,...M}})},customElementCb:M=>{z({type:I.IncrementalSnapshot,data:{source:v.CustomElement,...M}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:ce,inlineStylesheet:h,sampling:y,recordCanvas:S,inlineImages:st,userTriggeredOnInput:V,collectFonts:K,doc:W,maskAttributeFn:b,maskInputFn:A,maskTextFn:x,keepIframeSrcFn:ot,blockSelector:i,unblockSelector:o,slimDOMOptions:Oe,dataURLOptions:C,mirror:dt,iframeManager:qt,stylesheetManager:zt,shadowDomManager:cn,processedNodeManager:_r,canvasManager:Js,ignoreCSSAttributes:Y,plugins:vr([$,"optionalAccess",M=>M.filter,"call",M=>M(Gt=>Gt.observer),"optionalAccess",M=>M.map,"call",M=>M(Gt=>({observer:Gt.observer,options:Gt.options,callback:Kc=>z({type:I.Plugin,data:{plugin:Gt.name,payload:Kc}})}))])||[]},{});qt.addLoadListener(W=>{try{D.push(lt(W.contentDocument))}catch(M){console.warn(M)}});const O=()=>{yr(),D.push(lt(document))};return document.readyState==="interactive"||document.readyState==="complete"?O():(D.push(tt("DOMContentLoaded",()=>{z({type:I.DomContentLoaded,data:{}}),H==="DOMContentLoaded"&&O()})),D.push(tt("load",()=>{z({type:I.Load,data:{}}),H==="load"&&O()},window))),()=>{D.forEach(W=>W()),_r.destroy(),Un=void 0,Bm()}}catch(D){console.warn(D)}}function sg(t){if(!Un)throw new Error("please take full snapshot after start recording");Un(t)}Ut.mirror=dt;Ut.takeFullSnapshot=sg;function ig(t,e){try{return t?t(e):new so}catch{return console.warn("Unable to initialize CanvasManager"),new so}}const og=3,ag=5;function Fs(t){return t>9999999999?t:t*1e3}function Rr(t){return t>9999999999?t/1e3:t}function sn(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:I.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Mt(e,10,1e3)}}),e.category==="console")))}const cg="button,a";function dc(t){return t.closest(cg)||t}function fc(t){const e=pc(t);return!e||!(e instanceof Element)?e:dc(e)}function pc(t){return ug(t)?t.target:t}function ug(t){return typeof t=="object"&&!!t&&"target"in t}let $t;function lg(t){return $t||($t=[],dg()),$t.push(t),()=>{const e=$t?$t.indexOf(t):-1;e>-1&&$t.splice(e,1)}}function dg(){_t(B,"open",function(t){return function(...e){if($t)try{$t.forEach(n=>n())}catch{}return t.apply(B,e)}})}function fg(t,e,n){t.handleClick(e,n)}class pg{constructor(e,n,r=sn){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const e=lg(()=>{this._lastMutation=io()});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(mg(n,this._ignoreSelector)||!gg(e))return;const r={timestamp:Rr(e.timestamp),clickBreadcrumb:e,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Rr(e)}registerScroll(e=Date.now()){this._lastScroll=Rr(e)}registerClick(e){const n=dc(e);this._handleMultiClick(n)}_handleMultiClick(e){this._getClicks(e).forEach(n=>{n.clickCount++})}_getClicks(e){return this._clicks.filter(n=>n.node===e)}_checkClicks(){const e=[],n=io();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(const r of e){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const n=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,s=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=e;if(i){const 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:{...a.data,url:B.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,l);return}if(o>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:B.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const hg=["A","BUTTON","INPUT"];function mg(t,e){return!!(!hg.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 gg(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function io(){return Date.now()/1e3}function _g(t,e){try{if(!yg(e))return;const{source:n}=e.data;if(n===v.Mutation&&t.registerMutation(e.timestamp),n===v.Scroll&&t.registerScroll(e.timestamp),Sg(e)){const{type:r,id:s}=e.data,i=Ut.mirror.getNode(s);i instanceof HTMLElement&&r===Q.Click&&t.registerClick(i)}}catch{}}function yg(t){return t.type===og}function Sg(t){return t.data.source===v.MouseInteraction}function St(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Hn;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(Hn||(Hn={}));const Eg=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function bg(t){const e={};for(const n in t)if(Eg.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),e[r]=t[n]}return e}const Tg=t=>e=>{if(!t.isEnabled())return;const n=wg(e);if(!n)return;const r=e.name==="click",s=r?e.event:void 0;r&&t.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&fg(t.clickDetector,n,fc(e.event)),sn(t,n)};function hc(t,e){const n=Ut.mirror.getId(t),r=n&&Ut.mirror.getNode(n),s=r&&Ut.mirror.getMeta(r),i=s&&vg(s)?s:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===Hn.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:bg(i.attributes)}}:{}}}function wg(t){const{target:e,message:n}=Ig(t);return St({category:`ui.${t.name}`,...hc(e,n)})}function Ig(t){const e=t.name==="click";let n,r=null;try{r=e?fc(t.event):pc(t.event),n=Cs(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function vg(t){return t.type===Hn.Element}function kg(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=Cg(e);n&&sn(t,n)}function Cg(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=t;if(!o||Rg(o)||!i)return null;const a=e||r||s,c=i.length===1;if(!a&&c)return null;const u=Cs(o,{maxStringLength:200})||"<unknown>",l=hc(o,u);return St({category:"ui.keyDown",message:u,data:{...l.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Rg(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const oo={resource:Ng,paint:Dg,navigation:Mg};function xg(t){return t.map(Og).filter(Boolean)}function Og(t){return oo[t.entryType]?oo[t.entryType](t):null}function ve(t){return((xp||B.performance.timeOrigin)+t)/1e3}function Dg(t){const{duration:e,entryType:n,name:r,startTime:s}=t,i=ve(s);return{type:n,name:r,start:i,end:i+e,data:void 0}}function Mg(t){const{entryType:e,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:h,type:g}=t;return s===0?null:{type:`${e}.${g}`,start:ve(p),end:ve(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:f}}}function Ng(t){const{entryType:e,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:ve(i),end:ve(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function Ag(t){const e=t.entries,n=e[e.length-1],r=n?n.element:void 0,s=t.value,i=ve(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?Ut.mirror.getId(r):void 0}}}function $g(t){function e(s){t.performanceEntries.includes(s)||t.performanceEntries.push(s)}function n({entries:s}){s.forEach(e)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push($h(s,n))}),r.push(Ah(({metric:s})=>{t.replayPerformanceEntries.push(Ag(s))})),()=>{r.forEach(s=>s())}}const P=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Lg='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Pg(){const t=new Blob([Lg]);return URL.createObjectURL(t)}function Z(t,e){P&&(k.info(t),e&&mc(t))}function Se(t,e){P&&(k.info(t),e&&setTimeout(()=>{mc(t)},0))}function mc(t){rh({category:"console",data:{logger:"replay"},level:"info",message:t},{level:"info"})}class Bs extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Ms}.`)}}class gc{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>Ms)throw new Bs;this.events.push(e)}finish(){return new Promise(e=>{const n=this.events;this.clear(),e(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(n=>n.timestamp).sort()[0];return e?Fs(e):null}}class Fg{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("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const c=a;if(c.method===e&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){P&&k.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:e,arg:n})})}_getAndIncrementId(){return this._id++}}class Bg{constructor(e){this._worker=new Fg(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const n=Fs(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(e);return this._totalSize+=r.length,this._totalSize>Ms?Promise.reject(new Bs):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{P&&k.warn('[Replay] Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class Ug{constructor(e){this._fallback=new gc,this._compression=new Bg(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{Z("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:n}=this._fallback,r=[];for(const s of e)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){P&&k.warn("[Replay] Failed to add events when switching buffers.",s)}}}function Hg({useCompression:t,workerUrl:e}){if(t&&window.Worker){const n=jg(e);if(n)return n}return Z("[Replay] Using simple buffer"),new gc}function jg(t){try{const e=t||Wg();if(!e)return;Z(`[Replay] Using compression worker${t?` from ${t}`:""}`);const n=new Worker(e);return new Ug(n)}catch{Z("[Replay] Failed to create compression worker")}}function Wg(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Pg():""}function Us(){try{return"sessionStorage"in B&&!!B.sessionStorage}catch{return!1}}function zg(t){qg(),t.session=void 0}function qg(){if(Us())try{B.sessionStorage.removeItem(Os)}catch{}}function _c(t){return t===void 0?!1:Math.random()<t}function yc(t){const e=Date.now(),n=t.id||it(),r=t.started||e,s=t.lastActivity||e,i=t.segmentId||0,o=t.sampled,a=t.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function Hs(t){if(Us())try{B.sessionStorage.setItem(Os,JSON.stringify(t))}catch{}}function Gg(t,e){return _c(t)?"session":e?"buffer":!1}function ao({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const s=Gg(t,e),i=yc({sampled:s,previousSessionId:r});return n&&Hs(i),i}function Yg(t){if(!Us())return null;try{const e=B.sessionStorage.getItem(Os);if(!e)return null;const n=JSON.parse(e);return Se("[Replay] Loading existing session",t),yc(n)}catch{return null}}function is(t,e,n=+new Date){return t===null||e===void 0||e<0?!0:e===0?!1:t+e<=n}function Sc(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return is(t.started,e,r)||is(t.lastActivity,n,r)}function Ec(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!(!Sc(t,{sessionIdleExpire:e,maxReplayDuration:n})||t.sampled==="buffer"&&t.segmentId===0)}function xr({traceInternals:t,sessionIdleExpire:e,maxReplayDuration:n,previousSessionId:r},s){const i=s.stickySession&&Yg(t);return i?Ec(i,{sessionIdleExpire:e,maxReplayDuration:n})?(Se("[Replay] Session in sessionStorage is expired, creating new one..."),ao(s,{previousSessionId:i.id})):i:(Se("[Replay] Creating new session",t),ao(s,{previousSessionId:r}))}function Vg(t){return t.type===I.Custom}function js(t,e,n){return Tc(t,e)?(bc(t,e,n),!0):!1}function Kg(t,e,n){return Tc(t,e)?bc(t,e,n):Promise.resolve(null)}async function bc(t,e,n){if(!t.eventBuffer)return null;try{n&&t.recordingMode==="buffer"&&t.eventBuffer.clear(),n&&(t.eventBuffer.hasCheckout=!0);const r=t.getOptions(),s=Jg(e,r.beforeAddRecordingEvent);return s?await t.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof Bs?"addEventSizeExceeded":"addEvent";P&&k.error(r),await t.stop({reason:s});const i=ht();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function Tc(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=Fs(e.timestamp);return n+t.timeouts.sessionIdlePause<Date.now()?!1:n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration?(Z(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,t.getOptions()._experiments.traceInternals),!1):!0}function Jg(t,e){try{if(typeof e=="function"&&Vg(t))return e(t)}catch(n){return P&&k.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return t}function Ws(t){return!t.type}function os(t){return t.type==="transaction"}function Xg(t){return t.type==="replay_event"}function co(t){return t.type==="feedback"}function wc(t){const e=t_();return(n,r)=>{if(!t.isEnabled()||!Ws(n)&&!os(n))return;const s=r&&r.statusCode;if(!(e&&(!s||s<200||s>=300))){if(os(n)){Qg(t,n);return}Zg(t,n)}}}function Qg(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}function Zg(t,e){const 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;const{beforeErrorSampling:r}=t.getOptions();typeof r=="function"&&!r(e)||setTimeout(()=>{t.sendBufferedReplayOrFlush()})}function t_(){const t=ht();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}function e_(t){return e=>{!t.isEnabled()||!Ws(e)||n_(t,e)}}function n_(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=St({category:"replay.hydrate-error"});sn(t,r)}}function r_(t,e){return t.type||!t.exception||!t.exception.values||!t.exception.values.length?!1:!!(e.originalException&&e.originalException.__rrweb__)}function s_(t,e){t.triggerUserActivity(),t.addUpdate(()=>e.timestamp?(t.throttledAddEvent({type:I.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 i_(t,e){return t.recordingMode!=="buffer"||e.message===Ds||!e.exception||e.type?!1:_c(t.getOptions().errorSampleRate)}function o_(t,e=!1){const n=e?wc(t):void 0;return Object.assign((r,s)=>t.isEnabled()?Xg(r)?(delete r.breadcrumbs,r):!Ws(r)&&!os(r)&&!co(r)||!t.checkAndHandleExpiredSession()?r:co(r)?(t.flush(),r.contexts.feedback.replay_id=t.getSessionId(),s_(t,r),r):r_(r,s)&&!t.getOptions()._experiments.captureExceptions?(P&&k.log("[Replay] Ignoring error from rrweb internals",r),null):((i_(t,r)||t.recordingMode==="session")&&(r.tags={...r.tags,replayId:t.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function cr(t,e){return e.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=t.throttledAddEvent({type:I.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function a_(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}function c_(t){return e=>{if(!t.isEnabled())return;const n=a_(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(cr(t,[n]),!1)))}}function u_(t,e){return P&&t.getOptions()._experiments.traceInternals?!1:bh(e,ht())}function ur(t,e){t.isEnabled()&&e!==null&&(u_(t,e.name)||t.addUpdate(()=>(cr(t,[e]),!0)))}function l_(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:s}=t;if(!n)return null;const{method:i,url:o}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}function d_(t){return e=>{if(!t.isEnabled())return;const n=l_(e);ur(t,n)}}function f_(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,s=r[pe];if(!e||!n||!s)return null;const{method:i,url:o,status_code:a}=s;return o===void 0?null:{type:"resource.xhr",name:o,start:e/1e3,end:n/1e3,data:{method:i,statusCode:a}}}function p_(t){return e=>{if(!t.isEnabled())return;const n=f_(e);ur(t,n)}}function lr(t,e){if(t)try{if(typeof t=="string")return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Cc(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function Ic(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function vc(t){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Cc(t)];if(!t)return[void 0]}catch{return P&&k.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return P&&k.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function jn(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function kc(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:s,data:yt({method:i,statusCode:o,request:a,response:c})}}function Qe(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Ht(t,e,n){if(!e&&Object.keys(t).length===0)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:s,warnings:i}=h_(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function as(t,e){return Object.keys(t).reduce((n,r)=>{const s=r.toLowerCase();return e.includes(s)&&t[r]&&(n[s]=t[r]),n},{})}function Cc(t){return new URLSearchParams(t).toString()}function h_(t){if(!t||typeof t!="string")return{body:t};const e=t.length>Gi,n=m_(t);if(e){const r=t.slice(0,Gi);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch{}return{body:t}}function m_(t){const e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function Wn(t,e){const n=g_(t);return zf(n,e)}function g_(t,e=B.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(B.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function __(t,e,n){try{const r=await S_(t,e,n),s=kc("resource.fetch",r);ur(n.replay,s)}catch(r){P&&k.error("[Replay] Failed to capture fetch breadcrumb",r)}}function y_(t,e,n){const{input:r,response:s}=e,i=r?Rc(r):void 0,o=lr(i,n.textEncoder),a=s?Ic(s.headers.get("content-length")):void 0;o!==void 0&&(t.data.request_body_size=o),a!==void 0&&(t.data.response_body_size=a)}async function S_(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=e,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=t.data,d=Wn(o,n.networkDetailAllowUrls)&&!Wn(o,n.networkDetailDenyUrls),f=d?E_(n,e.input,u):Qe(u),p=await b_(d,n,e.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:p}}function E_({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const s=n?I_(n,e):{};if(!t)return Ht(s,r,void 0);const i=Rc(n),[o,a]=vc(i),c=Ht(s,r,o);return a?jn(c,a):c}async function b_(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},s,i){if(!t&&i!==void 0)return Qe(i);const o=s?xc(s.headers,r):{};if(!s||!e&&i!==void 0)return Ht(o,i,void 0);const[a,c]=await w_(s),u=T_(a,{networkCaptureBodies:e,textEncoder:n,responseBodySize:i,captureDetails:t,headers:o});return c?jn(u,c):u}function T_(t,{networkCaptureBodies:e,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{const o=t&&t.length&&r===void 0?lr(t,n):r;return s?e?Ht(i,o,t):Ht(i,o,void 0):Qe(o)}catch(o){return P&&k.warn("[Replay] Failed to serialize response body",o),Ht(i,r,void 0)}}async function w_(t){const e=v_(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{return[await k_(e)]}catch(n){return P&&k.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Rc(t=[]){if(!(t.length!==2||typeof t[1]!="object"))return t[1].body}function xc(t,e){const n={};return e.forEach(r=>{t.get(r)&&(n[r]=t.get(r))}),n}function I_(t,e){return t.length===1&&typeof t[0]!="string"?uo(t[0],e):t.length===2?uo(t[1],e):{}}function uo(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?xc(n,e):Array.isArray(n)?{}:as(n,e):{}}function v_(t){try{return t.clone()}catch(e){P&&k.warn("[Replay] Failed to clone response body",e)}}function k_(t){return new Promise((e,n)=>{const r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);C_(t).then(s=>e(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function C_(t){return await t.text()}async function R_(t,e,n){try{const r=O_(t,e,n),s=kc("resource.xhr",r);ur(n.replay,s)}catch(r){P&&k.error("[Replay] Failed to capture xhr breadcrumb",r)}}function x_(t,e,n){const{xhr:r,input:s}=e;if(!r)return;const i=lr(s,n.textEncoder),o=r.getResponseHeader("content-length")?Ic(r.getResponseHeader("content-length")):A_(r.response,r.responseType,n.textEncoder);i!==void 0&&(t.data.request_body_size=i),o!==void 0&&(t.data.response_body_size=o)}function O_(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=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||!Wn(c,n.networkDetailAllowUrls)||Wn(c,n.networkDetailDenyUrls)){const T=Qe(d),y=Qe(f);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:T,response:y}}const p=a[pe],h=p?as(p.request_headers,n.networkRequestHeaders):{},g=as(D_(a),n.networkResponseHeaders),[m,_]=n.networkCaptureBodies?vc(o):[void 0],[b,A]=n.networkCaptureBodies?M_(a):[void 0],x=Ht(h,d,m),j=Ht(g,f,b);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:_?jn(x,_):x,response:A?jn(j,A):j}}function D_(t){const e=t.getAllResponseHeaders();return e?e.split(`\r
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s.toLowerCase()]=i,n},{}):{}}function M_(t){const e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return N_(t.response,t.responseType)}catch(n){e.push(n)}return P&&k.warn("[Replay] Failed to get xhr response body",...e),[void 0]}function N_(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{return P&&k.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return P&&k.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function A_(t,e,n){try{const r=e==="json"&&t&&typeof t=="object"?JSON.stringify(t):t;return lr(r,n)}catch{return}}function $_(t){const e=ht();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=t.getOptions(),c={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};e&&e.on?e.on("beforeAddBreadcrumb",(u,l)=>L_(c,u,l)):(dp(d_(t)),yp(p_(t)))}catch{}}function L_(t,e,n){if(e.data)try{P_(e)&&B_(n)&&(x_(e,n,t),R_(e,n,t)),F_(e)&&U_(n)&&(y_(e,n,t),__(e,n,t))}catch{P&&k.warn("Error when enriching network breadcrumb")}}function P_(t){return t.category==="xhr"}function F_(t){return t.category==="fetch"}function B_(t){return t&&t.xhr}function U_(t){return t&&t.response}let lo=null;function H_(t){return!!t.category}const j_=t=>e=>{if(!t.isEnabled())return;const n=W_(e);n&&sn(t,n)};function W_(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return lo===e||!e||(lo=e,!H_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))?null:e.category==="console"?z_(e):St(e)}function z_(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||e.length===0)return St(t);let n=!1;const r=e.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>yn?(n=!0,`${s.slice(0,yn)}…`):s;if(typeof s=="object")try{const i=Mt(s,7);return JSON.stringify(i).length>yn?(n=!0,`${JSON.stringify(i,null,2).slice(0,yn)}…`):i}catch{}return s});return St({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function q_(t){const e=sr(),n=ht();e.addScopeListener(j_(t)),sp(Tg(t)),mp(c_(t)),$_(t);const r=o_(t,!fo(n));n&&n.addEventProcessor?n.addEventProcessor(r):Eh(r),fo(n)&&(n.on("beforeSendEvent",e_(t)),n.on("afterSendEvent",wc(t)),n.on("createDsc",s=>{const i=t.getSessionId();i&&t.isEnabled()&&t.recordingMode==="session"&&t.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("startTransaction",s=>{t.lastTransaction=s}),n.on("finishTransaction",s=>{t.lastTransaction=s}),n.on("beforeSendFeedback",(s,i)=>{const o=t.getSessionId();i&&i.includeReplay&&t.isEnabled()&&o&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=o)}))}function fo(t){return!!(t&&t.on)}async function G_(t){try{return Promise.all(cr(t,[Y_(B.performance.memory)]))}catch{return[]}}function Y_(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function V_(t,e,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,e):0;function a(){return c(),r=t(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=setTimeout(a,e),o&&i===void 0&&(i=setTimeout(a,o)),r}return l.cancel=c,l.flush=u,l}function K_(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession()){P&&k.warn("[Replay] Received replay event after session expired.");return}const s=r||!e;e=!0,t.clickDetector&&_g(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&s&&t.setInitialState(),!js(t,n,s))return!0;if(!s)return!1;if(X_(t,s),t.session&&t.session.previousSessionId)return!0;if(t.recordingMode==="buffer"&&t.session&&t.eventBuffer){const i=t.eventBuffer.getEarliestTimestamp();i&&(Z(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,t.getOptions()._experiments.traceInternals),t.session.started=i,t.getOptions().stickySession&&Hs(t.session))}return t.recordingMode==="session"&&t.flush(),!0})}}function J_(t){const e=t.getOptions();return{type:I.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 X_(t,e){!e||!t.session||t.session.segmentId!==0||js(t,J_(t),!1)}function Q_(t,e,n,r){return Op(Mp(t,Dp(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function Z_({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}
`;if(typeof t=="string")n=`${r}${t}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+t.length),n.set(i),n.set(t,i.length)}return n}async function ty({client:t,scope:e,replayId:n,event:r}){const s=typeof t._integrations=="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):void 0,i={event_id:n,integrations:s};t.emit&&t.emit("preprocessEvent",r,i);const o=await Gp(t.getOptions(),r,i,e,t,gh());if(!o)return null;o.platform=o.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function ey({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=Z_({recordingData:t,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=ht(),f=sr(),p=d&&d.getTransport(),h=d&&d.getDsn();if(!d||!p||!h||!i.sampled)return;const g={type:Bh,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:e,segment_id:n,replay_type:i.sampled},m=await ty({scope:f,client:d,replayId:e,event:g});if(!m){d.recordDroppedEvent("event_processor","replay",g),Z("An event processor returned `null`, will not send event.");return}delete m.sdkProcessingMetadata;const _=Q_(m,o,h,d.getOptions().tunnel);let b;try{b=await p.send(_)}catch(x){const j=new Error(Ds);try{j.cause=x}catch{}throw j}if(!b)return b;if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new Oc(b.statusCode);const A=Pp({},b);if(Lp(A,"replay"))throw new Dc(A);return b}class Oc extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Dc extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function Mc(t,e={count:0,interval:qh}){const{recordingData:n,options:r}=t;if(n.length)try{return await ey(t),!0}catch(s){if(s instanceof Oc||s instanceof Dc)throw s;if(sh("Replays",{_retryCount:e.count}),P&&r._experiments&&r._experiments.captureExceptions&&Ma(s),e.count>=Gh){const i=new Error(`${Ds} - max retries exceeded`);try{i.cause=s}catch{}throw i}return e.interval*=++e.count,new Promise((i,o)=>{setTimeout(async()=>{try{await Mc(t,e),i(!0)}catch(a){o(a)}},e.interval)})}}const Nc="__THROTTLED",ny="__SKIPPED";function ry(t,e,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=e){const l=o;return o=!0,l?ny:Nc}o=!1;const u=r.get(c)||0;return r.set(c,u+1),t(...a)}}class Lt{constructor({options:e,recordingOptions:n}){Lt.prototype.__init.call(this),Lt.prototype.__init2.call(this),Lt.prototype.__init3.call(this),Lt.prototype.__init4.call(this),Lt.prototype.__init5.call(this),Lt.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Uh,sessionIdleExpire:Hh},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=e,this._debouncedFlush=V_(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=ry((o,a)=>Kg(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(Yh,r),timeout:r,scrollTimeout:Vh,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new pg(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(e),!this.session){this._handleException(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",Se(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Se("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const e=xr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Se("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=xr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Ut({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:zh},emit:K_(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{Z(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,zg(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Z("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Z("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Z("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const r=this.stopRecording();!e||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const n=e();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&is(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const e=`${B.location.pathname}${B.location.hash}${B.location.search}`,n=`${B.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){const r=this._throttledAddEvent(e,n);if(r===Nc){const s=St({category:"replay.throttled"});this.addUpdate(()=>!js(this,{type:ag,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const e=this.lastTransaction||sr().getTransaction(),r=(e&&re(e).data||{})[Sh];if(!(!e||!r||!["route","custom"].includes(r)))return re(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Hg({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){P&&k.error("[Replay]",e),P&&this._options._experiments&&this._options._experiments.captureExceptions&&Ma(e)}_initializeSessionForSampling(e){const n=this._options.errorSampleRate>0,r=xr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const e=this.session;return Ec(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{B.document.addEventListener("visibilitychange",this._handleVisibilityChange),B.addEventListener("blur",this._handleWindowBlur),B.addEventListener("focus",this._handleWindowFocus),B.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(q_(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=$g(this)}_removeListeners(){try{B.document.removeEventListener("visibilitychange",this._handleVisibilityChange),B.removeEventListener("blur",this._handleWindowBlur),B.removeEventListener("focus",this._handleWindowFocus),B.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{B.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=St({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=St({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{kg(this,e)}}_doChangeToBackgroundTasks(e){!this.session||Sc(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("[Replay] 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:I.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){const e=xg(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(cr(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:n}=this;if(!e||!n||e.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){P&&k.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await G_(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Mc({replayId:e,recordingData:i,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});const r=ht();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){P&&k.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){Z(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}const a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&Z("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){P&&k.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Hs(this.session)}__init6(){this._onMutationHandler=e=>{const n=e.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=St({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function $e(t,e,n,r){const s=typeof r=="string"?r.split(","):[],i=[...t,...s,...e];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),Ye(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function sy({mask:t,unmask:e,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l=['base[href="/"]'],d=$e(t,[".sentry-mask","[data-sentry-mask]"],a,c),f=$e(e,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:d,unmaskTextSelector:f,blockSelector:$e(n,[".sentry-block","[data-sentry-block]",...l],i,o),unblockSelector:$e(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:$e(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(p.blockClass=i),a instanceof RegExp&&(p.maskTextClass=a),p}function iy({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&t.matches(s.unmaskTextSelector)?i:n.includes(e)||e==="value"&&t.tagName==="INPUT"&&["submit","button"].includes(t.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const po='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',oy=["content-length","content-type","accept"];let ho=!1;const aS=t=>new dr(t);class dr{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=jh,flushMaxDelay:n=Wh,minReplayDuration:r=Kh,maxReplayDuration:s=Yi,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},sessionSampleRate:u,errorSampleRate:l,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:h=750,mutationLimit:g=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:_=[],networkDetailAllowUrls:b=[],networkDetailDenyUrls:A=[],networkCaptureBodies:x=!0,networkRequestHeaders:j=[],networkResponseHeaders:T=[],mask:y=[],maskAttributes:C=["title","placeholder"],unmask:G=[],block:S=[],unblock:w=[],ignore:H=[],maskFn:V,beforeAddRecordingEvent:K,beforeErrorSampling:st,blockClass:$,blockSelector:ot,maskInputOptions:Y,maskTextClass:nt,maskTextSelector:ut,ignoreClass:hr}={}){this.name=dr.id;const ae=sy({mask:y,unmask:G,block:S,unblock:w,ignore:H,blockClass:$,blockSelector:ot,maskTextClass:nt,maskTextSelector:ut,ignoreClass:hr});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...Y||{},password:!0},maskTextFn:V,maskInputFn:V,maskAttributeFn:(Ot,ce,Oe)=>iy({maskAttributes:C,maskAllText:d,privacyOptions:ae,key:Ot,value:ce,el:Oe}),...ae,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:Ot=>{try{Ot.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(r,Jh),maxReplayDuration:Math.min(s,Yi),stickySession:i,sessionSampleRate:u,errorSampleRate:l,useCompression:o,workerUrl:a,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:h,mutationLimit:g,slowClickTimeout:m,slowClickIgnoreSelectors:_,networkDetailAllowUrls:b,networkDetailDenyUrls:A,networkCaptureBodies:x,networkRequestHeaders:mo(j),networkResponseHeaders:mo(T),beforeAddRecordingEvent:K,beforeErrorSampling:st,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysSessionSampleRate: ${u} })`),this._initialOptions.sessionSampleRate=u),typeof l=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${po}`:po),this._isInitialized&&Bi())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ho}set _isInitialized(e){ho=e}setupOnce(){Bi()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(e){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(e)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const e=ay(this._initialOptions);this._replay=new Lt({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=ht().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}dr.__initStatic();function ay(t){const e=ht(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...yt(t)};return n?(t.sessionSampleRate==null&&t.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Ye(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Ye(()=>{console.warn("SDK client is not available.")}),r)}function mo(t){return[...oy,...t.map(e=>e.toLowerCase())]}function cS(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const cy=Object.prototype.toString;function uy(t,e){return cy.call(t)===`[object ${e}]`}function Ac(t){return uy(t,"Object")}function zs(t){return!!(t&&t.then&&typeof t.then=="function")}function bn(t){return t&&t.Math==Math?t:void 0}const ct=typeof globalThis=="object"&&bn(globalThis)||typeof window=="object"&&bn(window)||typeof self=="object"&&bn(self)||typeof global=="object"&&bn(global)||function(){return this}()||{};function $c(t,e,n){const r=n||ct,s=r.__SENTRY__=r.__SENTRY__||{};return s[t]||(s[t]=e())}const ly=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,dy="Sentry Logger ",go=["debug","info","warn","error","log","assert","trace"],_o={};function on(t){if(!("console"in ct))return t();const e=ct.console,n={},r=Object.keys(_o);r.forEach(s=>{const i=_o[s];n[s]=e[s],e[s]=i});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function fy(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return ly?go.forEach(n=>{e[n]=(...r)=>{t&&on(()=>{ct.console[n](`${dy}[${n}]:`,...r)})}}):go.forEach(n=>{e[n]=()=>{}}),e}const Rt=fy();function Jt(t){return cs(t,new Map)}function cs(t,e){if(py(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const s of Object.keys(t))typeof t[s]<"u"&&(r[s]=cs(t[s],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(s=>{r.push(cs(s,e))}),r}return t}function py(t){if(!Ac(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}function Et(){const t=ct,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Lc(t){return Array.isArray(t)?t:[t]}var vt;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(vt||(vt={}));class Pt{constructor(e){Pt.prototype.__init.call(this),Pt.prototype.__init2.call(this),Pt.prototype.__init3.call(this),Pt.prototype.__init4.call(this),this._state=vt.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new Pt((r,s)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new Pt((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,e&&e()},o=>{i=!0,s=o,e&&e()}).then(()=>{if(i){r(s);return}n(s)})})}__init(){this._resolve=e=>{this._setResult(vt.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(vt.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===vt.PENDING){if(zs(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===vt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===vt.RESOLVED&&n[1](this._value),this._state===vt.REJECTED&&n[2](this._value),n[0]=!0)})}}}const Pc=1e3;function qs(){return Date.now()/Pc}function hy(){const{performance:t}=ct;if(!t||!t.now)return qs;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/Pc}const Gs=hy();(()=>{const{performance:t}=ct;if(!t||!t.now)return;const e=3600*1e3,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=s<e,o=t.timing&&t.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):e,u=c<e;return i||u?s<=c?t.timeOrigin:o:r})();const Cn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Fc="production";function my(){return $c("globalEventProcessors",()=>[])}function us(t,e,n,r=0){return new Pt((s,i)=>{const o=t[r];if(e===null||typeof o!="function")s(e);else{const a=o({...e},n);Cn&&o.id&&a===null&&Rt.log(`Event processor "${o.id}" dropped event`),zs(a)?a.then(c=>us(t,c,n,r+1).then(s)).then(null,i):us(t,a,n,r+1).then(s).then(null,i)}})}function gy(t){const e=Gs(),n={sid:Et(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>yy(n)};return t&&fr(n,t),n}function fr(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||Gs(),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:Et()),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{const 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 _y(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),fr(t,n)}function yy(t){return Jt({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}})}const Sy=1;function Ey(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=zn(t);return Jt({data:r,op:s,parent_span_id:i,span_id:e,status:o,tags:a,trace_id:n,origin:c})}function zn(t){return by(t)?t.getSpanJSON():typeof t.toJSON=="function"?t.toJSON():{}}function by(t){return typeof t.getSpanJSON=="function"}function Ty(t){const{traceFlags:e}=t.spanContext();return!!(e&Sy)}function wy(t){if(t)return Iy(t)?{captureContext:t}:ky(t)?{captureContext:t}:t}function Iy(t){return t instanceof Qt||typeof t=="function"}const vy=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function ky(t){return Object.keys(t).some(e=>vy.includes(e))}function Cy(t,e){return Ys().captureException(t,wy(e))}function Bc(){return Ys().getClient()}function Ry(){return Ys().getScope()}function Uc(t){return t.transaction}function xy(t,e,n){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=Jt({environment:r.environment||Fc,release:r.release,user_segment:i,public_key:s,trace_id:t});return e.emit&&e.emit("createDsc",o),o}function Oy(t){const e=Bc();if(!e)return{};const n=xy(zn(t).trace_id||"",e,Ry()),r=Uc(t);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;i!=null&&(n.sample_rate=`${i}`);const a=zn(r);return o&&o!=="url"&&(n.transaction=a.description),n.sampled=String(Ty(r)),e.emit&&e.emit("createDsc",n),n}function Dy(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;My(t,e),r&&$y(t,r),Ly(t,n),Ny(t,s),Ay(t,i)}function My(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e,c=Jt(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const u=Jt(r);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const l=Jt(s);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=Jt(i);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts}),o&&(t.level=o),a&&(t.transaction=a)}function Ny(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Ay(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function $y(t,e){t.contexts={trace:Ey(e),...t.contexts};const n=Uc(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:Oy(e),...t.sdkProcessingMetadata};const r=zn(n).description;r&&(t.tags={transaction:r,...t.tags})}}function Ly(t,e){t.fingerprint=t.fingerprint?Lc(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}const Py=100;class Qt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=yo()}static clone(e){return e?e.clone():new Qt}clone(){const e=new Qt;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&fr(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...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}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e;if(n instanceof Qt){const r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Ac(n)){const r=e;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=yo(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:Py;if(r<=0)return this;const s={timestamp:qs(),...e},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,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}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:n,_contexts:r,_tags:s,_extra:i,_user:o,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:f,_span:p}=this;return{breadcrumbs:e,attachments:n,contexts:r,tags:s,extra:i,user:o,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:d,transactionName:f,span:p}}applyToEvent(e,n={},r=[]){Dy(e,this.getScopeData());const s=[...r,...my(),...this._eventProcessors];return us(s,e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n&&n.event_id?n.event_id:Et();if(!this._client)return Rt.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){const s=r&&r.event_id?r.event_id:Et();if(!this._client)return Rt.warn("No client configured on scope - will not capture message!"),s;const i=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s},this),s}captureEvent(e,n){const r=n&&n.event_id?n.event_id:Et();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(Rt.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 yo(){return{traceId:Et(),spanId:Et().substring(16)}}const Fy="7.119.2",Hc=parseFloat(Fy),By=100;class jc{constructor(e,n,r,s=Hc){this._version=s;let i;n?i=n:(i=new Qt,i.setClient(e));let o;r?o=r:(o=new Qt,o.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version<e}bindClient(e){const n=this.getStackTop();n.client=e,n.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){const n=this.pushScope();let r;try{r=e(n)}catch(s){throw this.popScope(),s}return zs(r)?r.then(s=>(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Et(),s=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:s,...n,event_id:r}),r}captureMessage(e,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:Et(),i=new Error(e);return this.getScope().captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s}),s}captureEvent(e,n){const r=n&&n.event_id?n.event_id:Et();return e.type||(this._lastEventId=r),this.getScope().captureEvent(e,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=By}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const c={timestamp:qs(),...e},u=i?on(()=>i(c,n)):c;u!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,n){this.getScope().setTag(e,n),this.getIsolationScope().setTag(e,n)}setExtra(e,n){this.getScope().setExtra(e,n),this.getIsolationScope().setExtra(e,n)}setContext(e,n){this.getScope().setContext(e,n),this.getIsolationScope().setContext(e,n)}configureScope(e){const{scope:n,client:r}=this.getStackTop();r&&e(n)}run(e){const n=So(this);try{e(this)}finally{So(n)}}getIntegration(e){const n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return Cn&&Rt.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){const r=this._callExtensionMethod("startTransaction",e,n);return Cn&&!r&&(this.getClient()?Rt.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):Rt.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&_y(r),this._sendSessionUpdate(),n.setSession()}startSession(e){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=Fc}=r&&r.getOptions()||{},{userAgent:o}=ct.navigator||{},a=gy({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&fr(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:n}=this.getStackTop(),r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(e,...n){const s=pr().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[e]=="function")return s.extensions[e].apply(this,n);Cn&&Rt.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function pr(){return ct.__SENTRY__=ct.__SENTRY__||{extensions:{},hub:void 0},ct}function So(t){const e=pr(),n=ls(e);return Wc(e,t),n}function Ys(){const t=pr();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return Uy(t)}function Uy(t=pr()){return(!Hy(t)||ls(t).isOlderThan(Hc))&&Wc(t,new jc),ls(t)}function Hy(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function ls(t){return $c("hub",()=>new jc,t)}function Wc(t,e){if(!t)return!1;const n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}function jy(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=Bc(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Wy(t,e){return Object.assign(function(...r){return e(...r)},{id:t})}const zc=["activate","mount","update"],zy=/(?:^|[-_])(\w)/g,qy=t=>t.replace(zy,e=>e.toUpperCase()).replace(/[-_]/g,""),Gy="<Root>",Or="<Anonymous>",Yy=(t,e)=>t.repeat?t.repeat(e):t,je=(t,e)=>{if(!t)return Or;if(t.$root===t)return Gy;if(!t.$options)return Or;const n=t.$options;let r=n.name||n._componentTag;const s=n.__file;if(!r&&s){const i=s.match(/([^/\\]+)\.vue$/);i&&(r=i[1])}return(r?`<${qy(r)}>`:Or)+(s&&e!==!1?` at ${s}`:"")},Vy=t=>{if(t&&(t._isVue||t.__isVue)&&t.$parent){const e=[];let n=0;for(;t;){if(e.length>0){const s=e[e.length-1];if(s.constructor===t.constructor){n++,t=t.$parent;continue}else n>0&&(e[e.length-1]=[s,n],n=0)}e.push(t),t=t.$parent}return`

found in

${e.map((s,i)=>`${(i===0?"---> ":Yy(" ",5+i*2))+(Array.isArray(s)?`${je(s[0])}... (${s[1]} recursive calls)`:je(s))}`).join(`
`)}`}return`

(found in ${je(t)})`},Ky=(t,e)=>{const{errorHandler:n,warnHandler:r,silent:s}=t.config;t.config.errorHandler=(i,o,a)=>{const c=je(o,!1),u=o?Vy(o):"",l={componentName:c,lifecycleHook:a,trace:u};if(e.attachProps&&o&&(o.$options&&o.$options.propsData?l.propsData=o.$options.propsData:o.$props&&(l.propsData=o.$props)),setTimeout(()=>{Cy(i,{captureContext:{contexts:{vue:l}},mechanism:{handled:!1}})}),typeof n=="function"&&n.call(t,i,o,a),e.logErrors){const d=typeof console<"u",f=`Error in ${a}: "${i&&i.toString()}"`;r?r.call(null,f,o,u):d&&!s&&on(()=>{console.error(`[Vue warn]: ${f}${u}`)})}}},Jy=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Eo="ui.vue",Xy={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Qy(t,e,n){t.$_sentryRootSpanTimer&&clearTimeout(t.$_sentryRootSpanTimer),t.$_sentryRootSpanTimer=setTimeout(()=>{t.$root&&t.$root.$_sentryRootSpan&&(t.$root.$_sentryRootSpan.end(e),t.$root.$_sentryRootSpan=void 0)},n)}const Zy=t=>{const e=(t.hooks||[]).concat(zc).filter((r,s,i)=>i.indexOf(r)===s),n={};for(const r of e){const s=Xy[r];if(!s){Jy&&Rt.warn(`Unknown hook: ${r}`);continue}for(const i of s)n[i]=function(){const o=this.$root===this;o&&Wr()&&(this.$_sentryRootSpan=this.$_sentryRootSpan||Si({name:"Application Render",op:`${Eo}.render`,origin:"auto.ui.vue"}));const a=je(this,!1),c=Array.isArray(t.trackComponents)?t.trackComponents.indexOf(a)>-1:t.trackComponents;if(!(!o&&!c))if(this.$_sentrySpans=this.$_sentrySpans||{},i==s[0]){if(this.$root&&this.$root.$_sentryRootSpan||Wr()){const l=this.$_sentrySpans[r];l&&l.end(),this.$_sentrySpans[r]=Si({name:`Vue <${a}>`,op:`${Eo}.${r}`,origin:"auto.ui.vue"})}}else{const u=this.$_sentrySpans[r];if(!u)return;u.end(),Qy(this,Gs(),t.timeout)}}}return n},tS=ct,eS={Vue:tS.Vue,attachProps:!0,logErrors:!0,hooks:zc,timeout:2e3,trackComponents:!1},qc="Vue",nS=(t={})=>({name:qc,setupOnce(){},setup(e){rS(e,t)}}),Gc=nS;Wy(qc,Gc);function rS(t,e){const n={...eS,...t.getOptions(),...e};if(!n.Vue&&!n.app){on(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your `Sentry.init` call with an appropriate config option:\n`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?Lc(n.app).forEach(s=>bo(s,n)):n.Vue&&bo(n.Vue,n)}const bo=(t,e)=>{const n=t;(n._instance&&n._instance.isMounted)===!0&&on(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),Ky(t,e),jy(e)&&t.mixin(Zy({...e,...e.tracingOptions}))};function uS(t={}){const e={_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:Ge}],version:Ge}},defaultIntegrations:[...ka(),Gc()],...t};Af(e)}export{cS as c,uS as i,aS as r};
//# sourceMappingURL=monitoring-9d11fc02.js.map
