!function(){"use strict";const e="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,t=globalThis,n="10.8.0";function r(){return o(t),t}function o(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||n,t[n]=t[n]||{}}function s(e,r,o=t){const s=o.__SENTRY__=o.__SENTRY__||{},i=s[n]=s[n]||{};return i[e]||(i[e]=r())}const i=["debug","info","warn","error","log","assert","trace"],a={};function c(e){if(!("console"in t))return e();const n=t.console,r={},o=Object.keys(a);o.forEach(e=>{const t=a[e];r[e]=n[e],n[e]=t});try{return e()}finally{o.forEach(e=>{n[e]=r[e]})}}function u(){return d().enabled}function l(n,...r){e&&u()&&c(()=>{t.console[n](`Sentry Logger [${n}]:`,...r)})}function d(){return e?s("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const p={enable:function(){d().enabled=!0},disable:function(){d().enabled=!1},isEnabled:u,log:function(...e){l("log",...e)},warn:function(...e){l("warn",...e)},error:function(...e){l("error",...e)}},h="?",f=/\(error: (.*)\)/,m=/captureMessage|captureException/;function g(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let e=n;e<s.length;e++){let n=s[e];n.length>1024&&(n=n.slice(0,1024));const i=f.test(n)?n.replace(f,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){o.push(t);break}}if(o.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(_(t).function||"")&&t.pop();t.reverse(),m.test(_(t).function||"")&&(t.pop(),m.test(_(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||_(t).filename,function:e.function||h}))}(o.slice(r))}}function _(e){return e[e.length-1]||{}}const y="<anonymous>";function v(e){try{return e&&"function"==typeof e&&e.name||y}catch{return y}}function b(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}const S={},w={};function k(e,t){S[e]=S[e]||[],S[e].push(t)}function E(t,n){if(!w[t]){w[t]=!0;try{n()}catch(n){e&&p.error(`Error while instrumenting ${t}`,n)}}}function x(t,n){const r=t&&S[t];if(r)for(const o of r)try{o(n)}catch(n){e&&p.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${v(o)}\nError:`,n)}}let C=null;function I(e){const t="error";k(t,e),E(t,T)}function T(){C=t.onerror,t.onerror=function(e,t,n,r,o){return x("error",{column:r,error:o,line:n,msg:e,url:t}),!!C&&C.apply(this,arguments)},t.onerror.__SENTRY_INSTRUMENTED__=!0}let M=null;function R(e){const t="unhandledrejection";k(t,e),E(t,O)}function O(){M=t.onunhandledrejection,t.onunhandledrejection=function(e){return x("unhandledrejection",e),!M||M.apply(this,arguments)},t.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const A=Object.prototype.toString;function L(e){switch(A.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return z(e,Error)}}function D(e,t){return A.call(e)===`[object ${t}]`}function N(e){return D(e,"ErrorEvent")}function P(e){return D(e,"DOMError")}function F(e){return D(e,"String")}function $(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function B(e){return null===e||$(e)||"object"!=typeof e&&"function"!=typeof e}function U(e){return D(e,"Object")}function j(e){return"undefined"!=typeof Event&&z(e,Event)}function H(e){return Boolean(e?.then&&"function"==typeof e.then)}function z(e,t){try{return e instanceof t}catch{return!1}}function W(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function q(e){return"undefined"!=typeof Request&&z(e,Request)}const V=t;function G(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(u=K(n,l),!("html"===u||s>1&&i+o.length*c+u.length>=d));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function K(e,t){const n=e,r=[];if(!n?.tagName)return"";if(V.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(o?.length)o.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&F(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const s=["aria-label","type","name","title","alt"];for(const e of s){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function J(){try{return V.document.location.href}catch{return""}}function Y(e){if(!V.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function X(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Z(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function Q(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{W(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function ee(e,t,n=!1){return!!F(e)&&(D(t,"RegExp")?t.test(e):!!F(t)&&(n?e===t:e.includes(t)))}function te(e,t=[],n=!1){return t.some(t=>ee(e,t,n))}function ne(t,n,r){if(!(n in t))return;const o=t[n];if("function"!=typeof o)return;const s=r(o);"function"==typeof s&&oe(s,o);try{t[n]=s}catch{e&&p.log(`Failed to replace method "${n}" in object`,t)}}function re(t,n,r){try{Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0})}catch{e&&p.log(`Failed to add non-enumerable property "${n}" to object`,t)}}function oe(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,re(e,"__sentry_original__",t)}catch{}}function se(e){return e.__sentry_original__}function ie(e){if(L(e))return{message:e.message,name:e.name,stack:e.stack,...ce(e)};if(j(e)){const t={type:e.type,target:ae(e.target),currentTarget:ae(e.currentTarget),...ce(e)};return"undefined"!=typeof CustomEvent&&z(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ae(e){try{return t=e,"undefined"!=typeof Element&&z(t,Element)?G(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}var t}function ce(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function ue(e=function(){const e=t;return e.crypto||e.msCrypto}()){let n=()=>16*Math.random();try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function le(e){return e.exception?.values?.[0]}function de(e){const{message:t,event_id:n}=e;if(t)return t;const r=le(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function pe(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function he(e,t){const n=le(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function fe(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{re(e,"__sentry_captured__",!0)}catch{}return!1}function me(){return Date.now()/1e3}let ge,_e;function ye(){return(ge??(ge=function(){const{performance:e}=t;if(!e?.now||!e.timeOrigin)return me;const n=e.timeOrigin;return()=>(n+e.now())/1e3}()))()}function ve(){return _e||(_e=function(){const{performance:e}=t;if(!e?.now)return[void 0,"none"];const n=36e5,r=e.now(),o=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+r-o):n,i=s<n,a=e.timing?.navigationStart,c="number"==typeof a?Math.abs(a+r-o):n;return i||c<n?s<=c?[e.timeOrigin,"timeOrigin"]:[a,"navigationStart"]:[o,"dateNow"]}()),_e[0]}function be(e){const t=ye(),n={sid:ue(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(n)};return e&&Se(n,e),n}function Se(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ye(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ue()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function we(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=we(r[e],t[e],n-1));return r}function ke(){return ue()}function Ee(){return ue().substring(16)}const xe="_sentrySpan";function Ce(e,t){t?re(e,xe,t):delete e[xe]}function Ie(e){return e[xe]}class Te{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ke(),sampleRand:Math.random()}}clone(){const e=new Te;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Ce(e,Ie(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Se(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},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,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,n=t instanceof Te?t.getScopeData():U(t)?e:void 0,{tags:r,extra:o,user:s,contexts:i,level:a,fingerprint:c=[],propagationContext:u}=n||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...o},this._contexts={...this._contexts,...i},s&&Object.keys(s).length&&(this._user=s),a&&(this._level=a),c.length&&(this._fingerprint=c),u&&(this._propagationContext=u),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._session=void 0,Ce(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ke(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:me(),...e,message:e.message?X(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ie(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=we(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||ue();if(!this._client)return e&&p.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r?.event_id||ue();if(!this._client)return e&&p.warn("No client configured on scope - will not capture message!"),o;const s=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){const r=n?.event_id||ue();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(e&&p.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)}}class Me{constructor(e,t){let n,r;n=e||new Te,r=t||new Te,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return H(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Re(){const e=o(r());return e.stack=e.stack||new Me(s("defaultCurrentScope",()=>new Te),s("defaultIsolationScope",()=>new Te))}function Oe(e){return Re().withScope(e)}function Ae(e,t){const n=Re();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Le(e){return Re().withScope(()=>e(Re().getIsolationScope()))}function De(e){const t=o(e);return t.acs?t.acs:{withIsolationScope:Le,withScope:Oe,withSetScope:Ae,withSetIsolationScope:(e,t)=>Le(t),getCurrentScope:()=>Re().getScope(),getIsolationScope:()=>Re().getIsolationScope()}}function Ne(){return De(r()).getCurrentScope()}function Pe(){return De(r()).getIsolationScope()}function Fe(){return s("globalScope",()=>new Te)}function $e(...e){const t=De(r());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Be(){return Ne().getClient()}function Ue(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Ee()};return r&&(s.parent_span_id=r),s}const je="sentry.source",He="sentry.sample_rate",ze="sentry.previous_trace_sample_rate",We="sentry.op",qe="sentry.origin",Ve="sentry.idle_span_finish_reason",Ge="sentry.measurement_unit",Ke="sentry.measurement_value",Je="sentry.custom_span_name",Ye="sentry.profile_id",Xe="sentry.exclusive_time",Ze="http.request.method",Qe="url.full",et="sentry.link.type";function tt(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}function nt(e,t){e.setAttribute("http.response.status_code",t);const n=tt(t);"unknown_error"!==n.message&&e.setStatus(n)}const rt="_sentryScope",ot="_sentryIsolationScope";function st(e){return{scope:e[rt],isolationScope:e[ot]}}const it="sentry-",at=/^sentry-/;function ct(e){const t=function(e){if(!e||!F(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=lt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return lt(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(at)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function ut(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=0===o?s:`${t},${s}`;return i.length>8192?(e&&p.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}(Object.entries(t).reduce((e,[t,n])=>(n&&(e[`${it}${t}`]=n),e),{}))}function lt(e){return e.split(",").map(e=>e.split("=").map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const dt=/^o(\d+)\./,pt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ht(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function ft(e){const t=pt.exec(e);if(!t)return void c(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,o="",s="",i="",a=""]=t.slice(1);let u="",l=a;const d=l.split("/");if(d.length>1&&(u=d.slice(0,-1).join("/"),l=d.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return mt({host:s,pass:o,path:u,projectId:l,port:i,protocol:n,publicKey:r})}function mt(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function gt(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(dt);return t?.[1]}(n)),r}function _t(t){const n="string"==typeof t?ft(t):mt(t);if(n&&function(t){if(!e)return!0;const{port:n,projectId:r,protocol:o}=t;return!(["protocol","publicKey","host","projectId"].find(e=>!t[e]&&(p.error(`Invalid Sentry Dsn: ${e} missing`),!0))||(r.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(o)?n&&isNaN(parseInt(n,10))&&(p.error(`Invalid Sentry Dsn: Invalid port ${n}`),1):(p.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),1)))}(n))return n}function yt(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}const vt=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function bt(e,t){const n=function(e){if(!e)return;const t=e.match(vt);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=ct(t);if(!n?.traceId)return{traceId:ke(),sampleRand:Math.random()};const o=function(e,t){const n=yt(t?.sample_rand);if(void 0!==n)return n;const r=yt(t?.sample_rate);return r&&void 0!==e?.parentSampled?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function St(e=ke(),t=Ee(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}let wt=!1;function kt(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=Mt(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Et(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Mt(e).parent_span_id,s=st(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||Ee():t,trace_id:n}}function xt(e){const{traceId:t,spanId:n}=e.spanContext();return St(t,n,Rt(e))}function Ct(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}function It(e){return"number"==typeof e?Tt(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Tt(e.getTime()):ye()}function Tt(e){return e>9999999999?e/1e3:e}function Mt(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0,start_timestamp:It(o),timestamp:It(i)||void 0,status:Ot(a),op:r[We],origin:r[qe],links:Ct(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Rt(e){const{traceFlags:t}=e.spanContext();return 1===t}function Ot(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const At="_sentryChildSpans",Lt="_sentryRootSpan";function Dt(e,t){const n=e[Lt]||e;re(t,Lt,n),e[At]?e[At].add(t):re(e,At,new Set([t]))}function Nt(e){const t=new Set;return function e(n){if(!t.has(n)&&Rt(n)){t.add(n);const r=n[At]?Array.from(n[At]):[];for(const t of r)e(t)}}(e),Array.from(t)}function Pt(e){return e[Lt]||e}function Ft(){const e=De(r());return e.getActiveSpan?e.getActiveSpan():Ie(Ne())}function $t(){wt||(c(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),wt=!0)}let Bt=!1;function Ut(){function t(){const t=Ft(),n=t&&Pt(t);if(n){const t="internal_error";e&&p.log(`[Tracing] Root span: ${t} -> Global error occurred`),n.setStatus({code:2,message:t})}}Bt||(t.tag="sentry_tracingErrorCallback",Bt=!0,I(t),R(t))}function jt(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||Be()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}const Ht="production",zt="_frozenDsc";function Wt(e,t){re(e,zt,t)}function qt(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Ht,release:n.release,public_key:r,trace_id:e,org_id:gt(t)};return t.emit("createDsc",o),o}function Vt(e,t){const n=t.getPropagationContext();return n.dsc||qt(n.traceId,e)}function Gt(e){const t=Be();if(!t)return{};const n=Pt(e),r=Mt(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[He]??o[ze];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n[zt];if(c)return a(c);const u=s?.get("sentry.dsc"),l=u&&ct(u);if(l)return a(l);const d=qt(e.spanContext().traceId,t),p=o[je],h=r.description;return"url"!==p&&h&&(d.transaction=h),jt()&&(d.sampled=String(Rt(n)),d.sample_rand=s?.get("sentry.sample_rand")??st(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}class Kt{constructor(e={}){this._traceId=e.traceId||ke(),this._spanId=e.spanId||Ee()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function Jt(e,t=100,n=1/0){try{return Xt("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Yt(e,t=3,n=102400){const r=Jt(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?Yt(e,t-1,n):r;var o}function Xt(e,t,n=1/0,r=1/0,o=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(W(t))return"[VueViewModel]";if(U(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${v(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(s(t))return"[Circular ~]";const u=t;if(u&&"function"==typeof u.toJSON)try{return Xt("",u.toJSON(),c-1,r,o)}catch{}const l=Array.isArray(t)?[]:{};let d=0;const p=ie(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){l[e]="[MaxProperties ~]";break}const t=p[e];l[e]=Xt(e,t,c-1,r,o),d++}return i(t),l}function Zt(e,t=[]){return[e,t]}function Qt(e,t){const[n,r]=e;return[n,[...r,t]]}function en(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function tn(e,t){return en(e,(e,n)=>t.includes(n))}function nn(e){const n=o(t);return n.encodePolyfill?n.encodePolyfill(e):(new TextEncoder).encode(e)}function rn(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[nn(r),e]:r.push("string"==typeof e?nn(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Jt(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function on(e){let n="string"==typeof e?nn(e):e;function r(e){const t=n.subarray(0,e);return n=n.subarray(e+1),t}function s(){let e=n.indexOf(10);return e<0&&(e=n.length),JSON.parse(function(e){const n=o(t);return n.decodePolyfill?n.decodePolyfill(e):(new TextDecoder).decode(e)}(r(e)))}const i=s(),a=[];for(;n.length;){const e=s(),t="number"==typeof e.length?e.length:void 0;a.push([e,t?r(t):s()])}return[i,a]}function sn(e){return[{type:"span"},e]}function an(e){const t="string"==typeof e.data?nn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const cn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function un(e){return cn[e]}function ln(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function dn(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ht(r)},...o&&{trace:o}}}function pn(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(fn(n)){if(ee(e.description,n))return!0;continue}if(!n.name&&!n.op)continue;const t=!n.name||ee(e.description,n.name),r=!n.op||e.op&&ee(e.op,n.op);if(t&&r)return!0}return!1}function hn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function fn(e){return"string"==typeof e||e instanceof RegExp}function mn(t,n,r,o=Ft()){const s=o&&Pt(o);s&&(e&&p.log(`[Measurement] Setting measurement on root span: ${t} = ${n} ${r}`),s.addEvent(t,{[Ke]:n,[Ge]:r}))}function gn(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[Ge],o=n[Ke];"string"==typeof r&&"number"==typeof o&&(t[e.name]={value:o,unit:r})}),t}class _n{constructor(e={}){this._traceId=e.traceId||ke(),this._spanId=e.spanId||Ee(),this._startTime=e.startTimestamp||ye(),this._links=e.links,this._attributes={},this.setAttributes({[qe]:"manual",[We]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=It(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(je,"custom"),this}end(t){this._endTime||(this._endTime=It(t),function(t){if(!e)return;const{description:n="< unknown name >",op:r="< unknown op >"}=Mt(t),{spanId:o}=t.spanContext(),s=`[Tracing] Finishing "${r}" ${Pt(t)===t?"root ":""}span "${n}" with ID ${o}`;p.log(s)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[We],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ot(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[qe],profile_id:this._attributes[Ye],exclusive_time:this._attributes[Xe],measurements:gn(this._events),is_segment:this._isStandaloneSpan&&Pt(this)===this||void 0,segment_id:this._isStandaloneSpan?Pt(this).spanContext().spanId:void 0,links:Ct(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){e&&p.log("[Tracing] Adding an event to span:",t);const o=yn(n)?n:r||ye(),s=yn(n)?{}:n||{},i={name:t,time:It(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Be();t&&t.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===Pt(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=Be();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(function(e,t){const n=Gt(e[0]),r=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!o&&r&&{dsn:ht(r)}},{beforeSendSpan:i,ignoreSpans:a}=t?.getOptions()||{},c=a?.length?e.filter(e=>!pn(Mt(e),a)):e,u=e.length-c.length;u&&t?.recordDroppedEvent("before_send","span",u);const l=i?e=>{const t=Mt(e);return i(t)||($t(),t)}:Mt,d=[];for(const e of c){const t=l(e);t&&d.push(sn(t))}return Zt(s,d)}([this],t)):(e&&p.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span")));const n=this._convertSpanToTransaction();if(n){(st(this).scope||Ne()).captureEvent(n)}}_convertSpanToTransaction(){if(!vn(Mt(this)))return;this._name||(e&&p.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=st(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;const o=Nt(this).filter(e=>e!==this&&!function(e){return e instanceof _n&&e.isStandaloneSpan()}(e)).map(e=>Mt(e)).filter(vn),s=this._attributes[je];delete this._attributes[Je],o.forEach(e=>{delete e.data[Je]});const i={contexts:{trace:kt(this)},spans:o.length>1e3?o.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Gt(this)},request:r,...s&&{transaction_info:{source:s}}},a=gn(this._events);return a&&Object.keys(a).length&&(e&&p.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),i.measurements=a),i}}function yn(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function vn(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}function bn(e,t,n=()=>{}){let r;try{r=e()}catch(e){throw t(e),n(),e}return function(e,t,n){if(H(e))return e.then(e=>(n(),e),e=>{throw t(e),n(),e});return n(),e}(r,t,n)}const Sn="__SENTRY_SUPPRESS_TRACING__";function wn(e,t){const n=Mn();if(n.startSpan)return n.startSpan(e,t);const r=Tn(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return $e(a,()=>An(s)(()=>{const n=Ne(),i=On(n,s),a=e.onlyIfParent&&!i?new Kt:In({parentSpan:i,spanArguments:r,forceTransaction:o,scope:n});return Ce(n,a),bn(()=>t(a),()=>{const{status:e}=Mt(a);!a.isRecording()||e&&"ok"!==e||a.setStatus({code:2,message:"internal_error"})},()=>{a.end()})}))}function kn(e){const t=Mn();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Tn(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?t=>$e(e.scope,t):void 0!==o?e=>En(o,e):e=>e())(()=>{const t=Ne(),s=On(t,o);return e.onlyIfParent&&!s?new Kt:In({parentSpan:s,spanArguments:n,forceTransaction:r,scope:t})})}function En(e,t){const n=Mn();return n.withActiveSpan?n.withActiveSpan(e,t):$e(n=>(Ce(n,e||void 0),t(n)))}function xn(e){const t=Mn();return t.suppressTracing?t.suppressTracing(e):$e(t=>{t.setSDKProcessingMetadata({[Sn]:!0});const n=e();return t.setSDKProcessingMetadata({[Sn]:void 0}),n})}function Cn(t){return $e(n=>(n.setPropagationContext({traceId:ke(),sampleRand:Math.random()}),e&&p.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),En(null,t)))}function In({parentSpan:t,spanArguments:n,forceTransaction:r,scope:o}){if(!jt()){const e=new Kt;if(r||!t){Wt(e,{sampled:"false",sample_rate:"0",transaction:n.name,...Gt(e)})}return e}const s=Pe();let i;if(t&&!r)i=function(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=!t.getScopeData().sdkProcessingMetadata[Sn]&&Rt(e),i=s?new _n({...n,parentSpanId:r,traceId:o,sampled:s}):new Kt({traceId:o});Dt(e,i);const a=Be();a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i));return i}(t,o,n),Dt(t,i);else if(t){const e=Gt(t),{traceId:r,spanId:s}=t.spanContext(),a=Rt(t);i=Rn({traceId:r,parentSpanId:s,...n},o,a),Wt(i,e)}else{const{traceId:e,dsc:t,parentSpanId:r,sampled:a}={...s.getPropagationContext(),...o.getPropagationContext()};i=Rn({traceId:e,parentSpanId:r,...n},o,a),t&&Wt(i,t)}return function(t){if(!e)return;const{description:n="< unknown name >",op:r="< unknown op >",parent_span_id:o}=Mt(t),{spanId:s}=t.spanContext(),i=Rt(t),a=Pt(t),c=a===t,u=`[Tracing] Starting ${i?"sampled":"unsampled"} ${c?"root ":""}span`,l=[`op: ${r}`,`name: ${n}`,`ID: ${s}`];if(o&&l.push(`parent ID: ${o}`),!c){const{op:e,description:t}=Mt(a);l.push(`root ID: ${a.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}p.log(`${u}\n ${l.join("\n ")}`)}(i),function(e,t,n){e&&(re(e,ot,n),re(e,rt,t))}(i,o,s),i}function Tn(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=It(e.startTime),delete n.startTime,n}return t}function Mn(){return De(r())}function Rn(t,n,r){const o=Be(),s=o?.getOptions()||{},{name:i=""}=t,a={spanAttributes:{...t.attributes},spanName:i,parentSampled:r};o?.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??r,u=a.spanAttributes,l=n.getPropagationContext(),[d,h,f]=n.getScopeData().sdkProcessingMetadata[Sn]?[!1]:function(t,n,r){if(!jt(t))return[!1];let o,s;"function"==typeof t.tracesSampler?(s=t.tracesSampler({...n,inheritOrSampleWith:e=>"number"==typeof n.parentSampleRate?n.parentSampleRate:"boolean"==typeof n.parentSampled?Number(n.parentSampled):e}),o=!0):void 0!==n.parentSampled?s=n.parentSampled:void 0!==t.tracesSampleRate&&(s=t.tracesSampleRate,o=!0);const i=yt(s);if(void 0===i)return e&&p.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return e&&p.log("[Tracing] Discarding transaction because "+("function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,i,o];const a=r<i;return a||e&&p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[a,i,o]}(s,{name:i,parentSampled:c,attributes:u,parentSampleRate:yt(l.dsc?.sample_rate)},l.sampleRand),m=new _n({...t,attributes:{[je]:"custom",[He]:void 0!==h&&f?h:void 0,...u},sampled:d});return!d&&o&&(e&&p.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),o.recordDroppedEvent("sample_rate","transaction")),o&&o.emit("spanStart",m),m}function On(e,t){if(t)return t;if(null===t)return;const n=Ie(e);if(!n)return;const r=Be();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Pt(n):n}function An(e){return void 0!==e?t=>En(e,t):e=>e()}const Ln={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function Dn(t,n={}){const r=new Map;let o,s=!1,i="externalFinish",a=!n.disableAutoFinish;const c=[],{idleTimeout:u=Ln.idleTimeout,finalTimeout:l=Ln.finalTimeout,childSpanTimeout:d=Ln.childSpanTimeout,beforeSpanEnd:h}=n,f=Be();if(!f||!jt()){const e=new Kt;return Wt(e,{sample_rate:"0",sampled:"false",...Gt(e)}),e}const m=Ne(),g=Ft(),_=function(t){const n=kn(t);return Ce(Ne(),n),e&&p.log("[Tracing] Started span is an idle span"),n}(t);function y(){o&&(clearTimeout(o),o=void 0)}function v(e){y(),o=setTimeout(()=>{!s&&0===r.size&&a&&(i="idleTimeout",_.end(e))},u)}function b(e){o=setTimeout(()=>{!s&&a&&(i="heartbeatFailed",_.end(e))},d)}function S(t){s=!0,r.clear(),c.forEach(e=>e()),Ce(m,g);const n=Mt(_),{start_timestamp:o}=n;if(!o)return;n.data[Ve]||_.setAttribute(Ve,i),p.log(`[Tracing] Idle span "${n.op}" finished`);const a=Nt(_).filter(e=>e!==_);let d=0;a.forEach(n=>{n.isRecording()&&(n.setStatus({code:2,message:"cancelled"}),n.end(t),e&&p.log("[Tracing] Cancelling span since span ended early",JSON.stringify(n,void 0,2)));const r=Mt(n),{timestamp:o=0,start_timestamp:s=0}=r,i=s<=t,a=o-s<=(l+u)/1e3;if(e){const e=JSON.stringify(n,void 0,2);i?a||p.log("[Tracing] Discarding span since it finished after idle span final timeout",e):p.log("[Tracing] Discarding span since it happened after idle span was finished",e)}a&&i||(!function(e,t){e[At]&&e[At].delete(t)}(_,n),d++)}),d>0&&_.setAttribute("sentry.idle_span_discarded_spans",d)}return _.end=new Proxy(_.end,{apply(e,t,n){if(h&&h(_),t instanceof Kt)return;const[r,...o]=n,s=It(r||ye()),i=Nt(_).filter(e=>e!==_);if(!i.length)return S(s),Reflect.apply(e,t,[s,...o]);const a=i.map(e=>Mt(e).timestamp).filter(e=>!!e),c=a.length?Math.max(...a):void 0,u=Mt(_).start_timestamp,d=Math.min(u?u+l/1e3:1/0,Math.max(u||-1/0,Math.min(s,c||1/0)));return S(d),Reflect.apply(e,t,[d,...o])}}),c.push(f.on("spanStart",e=>{if(s||e===_||Mt(e).timestamp||e instanceof _n&&e.isStandaloneSpan())return;var t;Nt(_).includes(e)&&(t=e.spanContext().spanId,y(),r.set(t,!0),b(ye()+d/1e3))})),c.push(f.on("spanEnd",e=>{var t;s||(t=e.spanContext().spanId,r.has(t)&&r.delete(t),0===r.size&&v(ye()+u/1e3))})),c.push(f.on("idleSpanEnableAutoFinish",e=>{e===_&&(a=!0,v(),r.size&&b())})),n.disableAutoFinish||v(),setTimeout(()=>{s||(_.setStatus({code:2,message:"deadline_exceeded"}),i="finalTimeout",_.end())},l),_}function Nn(e){return new Fn(t=>{t(e)})}function Pn(e){return new Fn((t,n)=>{n(e)})}class Fn{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new Fn((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new Fn((t,n)=>{let r,o;return this.then(t=>{o=!1,r=t,e&&e()},t=>{o=!0,r=t,e&&e()}).then(()=>{o?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(H(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function $n(t,n,r,o=0){return new Fn((s,i)=>{const a=t[o];if(null===n||"function"!=typeof a)s(n);else{const c=a({...n},r);e&&a.id&&null===c&&p.log(`Event processor "${a.id}" dropped event`),H(c)?c.then(e=>$n(t,e,r,o+1).then(s)).then(null,i):$n(t,c,r,o+1).then(s).then(null,i)}})}function Bn(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(o).length&&(e.user={...o,...e.user});Object.keys(s).length&&(e.contexts={...s,...e.contexts});i&&(e.level=i);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Et(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Gt(t),...e.sdkProcessingMetadata};const n=Pt(t),r=Mt(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}function Un(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:f}=t;jn(e,"extra",n),jn(e,"tags",r),jn(e,"user",o),jn(e,"contexts",s),e.sdkProcessingMetadata=we(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function jn(e,t,n){e[t]=we(e[t],n,1)}let Hn,zn,Wn;function qn(e){const n=t._sentryDebugIds;if(!n)return{};const r=Object.keys(n);return Wn&&r.length===zn||(zn=r.length,Wn=r.reduce((t,r)=>{Hn||(Hn={});const o=Hn[r];if(o)t[o[0]]=o[1];else{const o=e(r);for(let e=o.length-1;e>=0;e--){const s=o[e],i=s?.filename,a=n[r];if(i&&a){t[i]=a,Hn[r]=[i,a];break}}}return t},{})),Wn}function Vn(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ue(),timestamp:t.timestamp||me()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s=250}=t;e.environment=e.environment||n||Ht,!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&(i.url=X(i.url,s))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=qn(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new Te;return n.update(t),n}(r,n.captureContext);n.mechanism&&he(c,n.mechanism);const d=o?o.getEventProcessors():[],p=Fe().getScopeData();if(s){Un(p,s.getScopeData())}if(l){Un(p,l.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),Bn(c,p);return $n([...d,...p.eventProcessors],c,n).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Jt(e.data,t,n)}}))},...e.user&&{user:Jt(e.user,t,n)},...e.contexts&&{contexts:Jt(e.contexts,t,n)},...e.extra&&{extra:Jt(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Jt(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Jt(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=Jt(e.contexts.flags,3,n));return r}(e,i,a):e))}function Gn(e){if(e)return function(e){return e instanceof Te||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>Kn.includes(e))}(e)?{captureContext:e}:e}const Kn=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jn(e,t){return Ne().captureException(e,Gn(t))}function Yn(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return Ne().captureMessage(e,n,r)}function Xn(e,t){return Ne().captureEvent(e,t)}function Zn(e,t){Pe().setContext(e,t)}function Qn(){return Pe().lastEventId()}function er(){const e=Be();return!1!==e?.getOptions().enabled&&!!e?.getTransport()}function tr(e){Pe().addEventProcessor(e)}function nr(e){const n=Pe(),r=Ne(),{userAgent:o}=t.navigator||{},s=be({user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),i=n.getSession();return"ok"===i?.status&&Se(i,{status:"exited"}),rr(),n.setSession(s),s}function rr(){const e=Pe(),t=Ne().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Se(e,t)}(t),or(),e.setSession()}function or(){const e=Pe(),t=Be(),n=e.getSession();n&&t&&t.captureSession(n)}function sr(e=!1){e?rr():or()}function ir(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ar(e,t,n){return t||`${function(e){return`${ir(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const cr=[];function ur(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function lr(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function dr(t,n,r){if(r[n.name])e&&p.log(`Integration skipped because it was already installed: ${n.name}`);else{if(r[n.name]=n,-1===cr.indexOf(n.name)&&"function"==typeof n.setupOnce&&(n.setupOnce(),cr.push(n.name)),n.setup&&"function"==typeof n.setup&&n.setup(t),"function"==typeof n.preprocessEvent){const e=n.preprocessEvent.bind(n);t.on("preprocessEvent",(n,r)=>e(n,r,t))}if("function"==typeof n.processEvent){const e=n.processEvent.bind(n),r=Object.assign((n,r)=>e(n,r,t),{id:n.name});t.addEventProcessor(r)}e&&p.log(`Integration installed: ${n.name}`)}}function pr(t){const n=Be();n?n.addIntegration(t):e&&p.warn(`Cannot add integration "${t.name}" because no SDK Client is available.`)}function hr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const fr="Not capturing exception because it's already been captured.",mr="Discarded session because of missing or non-string release",gr=Symbol.for("SentryInternalError"),_r=Symbol.for("SentryDoNotSendEventError");function yr(e){return{message:e,[gr]:!0}}function vr(e){return{message:e,[_r]:!0}}function br(e){return!!e&&"object"==typeof e&&gr in e}function Sr(e){return!!e&&"object"==typeof e&&_r in e}class wr{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=_t(t.dsn):e&&p.warn("No DSN provided, client will not send events."),this._dsn){const e=ar(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,n,r){const o=ue();if(fe(t))return e&&p.log(fr),o;const s={event_id:o,...n};return this._process(this.eventFromException(t,s).then(e=>this._captureEvent(e,s,r))),s.event_id}captureMessage(e,t,n,r){const o={event_id:ue(),...n},s=$(e)?e:String(e),i=B(e)?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(i.then(e=>this._captureEvent(e,o,r))),o.event_id}captureEvent(t,n,r){const o=ue();if(n?.originalException&&fe(n.originalException))return e&&p.log(fr),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(t,s,a||r,c)),s.event_id}captureSession(e){this.sendSession(e),Se(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Nn(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];dr(this,e,this._integrations),t||lr(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=ln(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const i=dn(e,o,r,t);return delete e.sdkProcessingMetadata,Zt(i,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Qt(n,an(e));const r=this.sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(t){const{release:n,environment:r=Ht}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n)return void(e&&p.warn(mr));o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n)return void(e&&p.warn(mr));t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=function(e,t,n,r){const o=ln(n);return Zt({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:ht(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;e&&p.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,t=>(e&&p.error("Error while sending envelope:",t),t)):(e&&p.error("Transport disabled"),Nn({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&dr(e,t,n)}),n}(this,e),lr(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(!1===t?.handled){n=!0;break}}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Se(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Fn(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s?.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Vn(o,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:Ue(n),...e.contexts};const r=Vt(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(t,n={},r=Ne(),o=Pe()){return e&&kr(t)&&p.log(`Captured error event \`${hr(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(e=>e.event_id,t=>{e&&(Sr(t)?p.log(t.message):br(t)?p.warn(t.message):p.warn(t))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:s}=o,i=Er(e),a=kr(e),c=e.type||"error",u=`before send for type \`${c}\``,l=void 0===s?void 0:yt(s);if(a&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),Pn(vr(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const d="replay_event"===c?"replay":c;return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",d),vr("An event processor returned `null`, will not send event.");if(t.data&&!0===t.data.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(kr(c)&&o)return o(c,r);if(Er(c)){if(i||a){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Ye],exclusive_time:i?.[Xe],measurements:e.measurements,is_segment:!0}}(c);if(a?.length&&pn(t,a))return null;if(i){const e=i(t);e?c=we(n,{type:"transaction",timestamp:(u=e).timestamp,start_timestamp:u.start_timestamp,transaction:u.description,contexts:{trace:{trace_id:u.trace_id,span_id:u.span_id,parent_span_id:u.parent_span_id,op:u.op,status:u.status,origin:u.origin,data:{...u.data,...u.profile_id&&{[Ye]:u.profile_id},...u.exclusive_time&&{[Xe]:u.exclusive_time}}}},measurements:u.measurements}):$t()}if(c.spans){const t=[],n=c.spans;for(const e of n)if(a?.length&&pn(e,a))hn(n,e);else if(i){const n=i(e);n?t.push(n):($t(),t.push(e))}else t.push(e);const r=c.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),c.spans=t}}if(s){if(c.spans){const e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(c,r)}}var u;return c}(this,o,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(H(e))return e.then(e=>{if(!U(e)&&null!==e)throw yr(n);return e},e=>{throw yr(`${t} rejected with ${e}`)});if(!U(e)&&null!==e)throw yr(n);return e}(n,u)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",d),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw vr(`${u} returned \`null\`, will not send event.`)}const s=n.getSession()||r.getSession();if(a&&s&&this._updateSessionFromEvent(s,o),i){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const c=o.transaction_info;if(i&&c&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...c,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(Sr(e)||br(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),yr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){e&&p.log("Flushing outcomes...");const t=this._clearOutcomes();if(0===t.length)return void(e&&p.log("No outcomes to send"));if(!this._dsn)return void(e&&p.log("No dsn provided, will not send outcomes"));e&&p.log("Sending outcomes:",t);const n=(r=t,Zt((o=this._options.tunnel&&ht(this._dsn))?{dsn:o}:{},[[{type:"client_report"},{timestamp:me(),discarded_events:r}]]));var r,o;this.sendEnvelope(n)}}function kr(e){return void 0===e.type}function Er(e){return"transaction"===e.type}const xr={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Cr(e,t,n,r=!0){!n||e[t]&&!r||(e[t]=n)}function Ir(e,t){const n=Or(),r=Rr(e);void 0===r?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=100&&Mr(e,r))}function Tr(t,n=Be(),r=Ne(),o=Ir){if(!n)return void(e&&p.warn("No client available to capture log."));const{release:s,environment:i,enableLogs:a=!1,beforeSendLog:u}=n.getOptions();if(!a)return void(e&&p.warn("logging option not enabled, log will not be captured."));const[,l]=function(e,t){return t?$e(t,()=>{const n=Ft(),r=n?Et(n):Ue(t);return[n?Gt(n):Vt(e,t),r]}):[void 0,void 0]}(n,r),d={...t.attributes},{user:{id:h,email:f,username:m}}=function(e){const t=Fe().getScopeData();return Un(t,Pe().getScopeData()),Un(t,e.getScopeData()),t}(r);Cr(d,"user.id",h,!1),Cr(d,"user.email",f,!1),Cr(d,"user.name",m,!1),Cr(d,"sentry.release",s),Cr(d,"sentry.environment",i);const{name:g,version:_}=n.getSdkMetadata()?.sdk??{};Cr(d,"sentry.sdk.name",g),Cr(d,"sentry.sdk.version",_);const y=t.message;if($(y)){const{__sentry_template_string__:e,__sentry_template_values__:t=[]}=y;d["sentry.message.template"]=e,t.forEach((e,t)=>{d[`sentry.message.parameter.${t}`]=e})}const v=Ie(r);Cr(d,"sentry.trace.parent_span_id",v?.spanContext().spanId);const b={...t,attributes:d};n.emit("beforeCaptureLog",b);const S=u?c(()=>u(b)):b;if(!S)return n.recordDroppedEvent("before_send","log_item",1),void(e&&p.warn("beforeSendLog returned null, log will not be captured."));const{level:w,message:k,attributes:E={},severityNumber:x}=S;o(n,{timestamp:ye(),level:w,body:k,trace_id:l?.trace_id,severity_number:x??xr[w],attributes:Object.keys(E).reduce((e,t)=>(e[t]=function(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}(E[t]),e),{})}),n.emit("afterCaptureLog",S)}function Mr(e,t){const n=t??Rr(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=ht(r)),Zt(o,[(s=e,[{type:"log",item_count:s.length,content_type:"application/vnd.sentry.items.log+json"},{items:s}])]);var s}(n,r._metadata,r.tunnel,e.getDsn());Or().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Rr(e){return Or().get(e)}function Or(){return s("clientToLogBufferMap",()=>new WeakMap)}function Ar(e){Ne().setClient(e)}const Lr=Symbol.for("SentryBufferFullError");function Dr(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return Pn(Lr);const o=r();return-1===t.indexOf(o)&&t.push(o),o.then(()=>n(o)).then(null,()=>n(o).then(null,()=>{})),o},drain:function(e){return new Fn((n,r)=>{let o=t.length;if(!o)return n(!0);const s=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Nn(e).then(()=>{--o||(clearTimeout(s),n(!0))},r)})})}}}function Nr(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function Pr(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function Fr(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n,,,s]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e&&s&&!s.split(";").includes("custom")||(o[e]=r+a);else o.all=r+a}else i?o.all=r+Nr(i,r):429===t&&(o.all=r+6e4);return o}function $r(t,n,r=Dr(t.bufferSize||64)){let o={};return{send:function(s){const i=[];if(en(s,(e,n)=>{const r=un(n);Pr(o,r)?t.recordDroppedEvent("ratelimit_backoff",r):i.push(e)}),0===i.length)return Nn({});const a=Zt(s[0],i),c=e=>{en(a,(n,r)=>{t.recordDroppedEvent(e,un(r))})};return r.add(()=>n({body:rn(a)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&e&&p.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),o=Fr(o,t),t),t=>{throw c("network_error"),e&&p.error("Encountered error running transport request:",t),t})).then(e=>e,t=>{if(t===Lr)return e&&p.error("Skipped sending event because buffer is full."),c("queue_overflow"),Nn({});throw t})},flush:e=>r.drain(e)}}const Br=5e3;function Ur(t){function n(...t){e&&p.log("[Offline]:",...t)}return e=>{const r=t(e);if(!e.createStore)throw new Error("No `createStore` function was provided");const o=e.createStore(e);let s,i=Br;function a(e){s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const e=await o.shift();e&&(n("Attempting to send previously queued event"),e[0].sent_at=(new Date).toISOString(),u(e,!0).catch(e=>{n("Failed to retry sending",e)}))},e),"number"!=typeof s&&s.unref&&s.unref()}function c(){s||(a(i),i=Math.min(2*i,36e5))}async function u(t,s=!1){if(!s&&tn(t,["replay_event","replay_recording"]))return await o.push(t),a(100),{};try{if(e.shouldSend&&!1===await e.shouldSend(t))throw new Error("Envelope not sent because `shouldSend` callback returned false");const n=await r.send(t);let o=100;if(n)if(n.headers?.["retry-after"])o=Nr(n.headers["retry-after"]);else if(n.headers?.["x-sentry-rate-limits"])o=6e4;else if((n.statusCode||0)>=400)return n;return a(o),i=Br,n}catch(r){if(await function(t,n,r){return!tn(t,["client_report"])&&(!e.shouldStore||e.shouldStore(t,n,r))}(t,r,i))return s?await o.unshift(t):await o.push(t),c(),n("Error sending. Event queued.",r),{};throw r}}return e.flushAtStartup&&c(),{send:u,flush:e=>(void 0===e&&(i=Br,a(100)),r.flush(e))}}}function jr(e,t){let n;return en(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function Hr(e){return"isRelative"in e}function zr(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=n?"thismessage:/":void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Wr(e){if(Hr(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function qr(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Vr(e){return e.split(/[?#]/,1)[0]}function Gr(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return function(e,t){const n=zr(e);if(!n||Hr(n))return!1;return!!t&&(n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search))}(e,n)||function(e,t){if(!t)return!1;return Kr(e)===Kr(t)}(e,r)}function Kr(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Jr(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const Yr=Jr;function Xr(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function Zr(e={}){const t=e.client||Be();if(!er()||!t)return{};const n=De(r());if(n.getTraceData)return n.getTraceData(e);const o=e.scope||Ne(),s=e.span||Ft(),i=s?xt(s):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return St(t,r,n)}(o),a=ut(s?Gt(s):Vt(t,o));return vt.test(i)?{"sentry-trace":i,baggage:a}:(p.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const Qr=100;function eo(e,t){const n=Be(),r=Pe();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Qr}=n.getOptions();if(s<=0)return;const i={timestamp:me(),...e},a=o?c(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}let to;const no=new WeakMap,ro=()=>({name:"FunctionToString",setupOnce(){to=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=se(this),n=no.has(Be())&&void 0!==t?t:this;return to.apply(n,e)}}catch{}},setup(e){no.set(e,!0)}}),oo=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],so=(t={})=>{let n;return{name:"EventFilters",setup(e){const r=e.getOptions();n=ao(t,r)},processEvent(r,o,s){if(!n){const e=s.getOptions();n=ao(t,e)}return function(t,n){if(t.type){if("transaction"===t.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&te(n,t)}(t,n.ignoreTransactions))return e&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${de(t)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return hr(e).some(e=>te(e,t))}(t,n.ignoreErrors))return e&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${de(t)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(t))return e&&p.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${de(t)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=co(e);return!!n&&te(n,t)}(t,n.denyUrls))return e&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${de(t)}.\nUrl: ${co(t)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=co(e);return!n||te(n,t)}(t,n.allowUrls))return e&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${de(t)}.\nUrl: ${co(t)}`),!0}return!1}(r,n)?null:r}}},io=(e={})=>({...so(e),name:"InboundFilters"});function ao(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:oo],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function co(t){try{const e=[...t.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=e?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return e&&p.error(`Cannot extract url for event ${de(t)}`),null}}function uo(e,t,n,r,o,s){if(!o.exception?.values||!s||!z(s.originalException,Error))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=lo(e,t,r,s.originalException,n,o.exception.values,i,0))}function lo(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(z(r[o],Error)){po(i,a);const s=e(t,r[o]),u=c.length;ho(s,o,u,a),c=lo(e,t,n,r[o],o,[s,...c],s,u)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(z(r,Error)){po(i,a);const u=e(t,r),l=c.length;ho(u,`errors[${s}]`,l,a),c=lo(e,t,n,r,o,[u,...c],u,l)}}),c}function po(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function ho(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const fo=new Map,mo=new Set;function go(e,n){return function(e){if(t._sentryModuleMetadata)for(const n of Object.keys(t._sentryModuleMetadata)){const r=t._sentryModuleMetadata[n];if(mo.has(n))continue;mo.add(n);const o=e(n);for(const e of o.reverse())if(e.filename){fo.set(e.filename,r);break}}}(e),fo.get(n)}function _o(e,t){try{t.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[]){if(!n.filename||n.module_metadata)continue;const t=go(e,n.filename);t&&(n.module_metadata=t)}})}catch{}}function yo(e){try{e.exception.values.forEach(e=>{if(e.stacktrace)for(const t of e.stacktrace.frames||[])delete t.module_metadata})}catch{}}const vo=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",e=>{en(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;t&&(yo(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;_o(e.getOptions().stackParser,t)})}});function bo(e){const t="console";k(t,e),E(t,So)}function So(){"console"in t&&i.forEach(function(e){e in t.console&&ne(t.console,e,function(n){return a[e]=n,function(...n){x("console",{args:n,level:e});const r=a[e];r?.apply(t.console,n)}})})}function wo(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ko=(e={})=>{const n=e.levels||i,r=e.handled??!0;return{name:"CaptureConsole",setup(e){"console"in t&&bo(({args:t,level:o})=>{Be()===e&&n.includes(o)&&function(e,t,n){const r={level:wo(t),extra:{arguments:e}};$e(o=>{if(o.addEventProcessor(e=>(e.logger="console",he(e,{handled:n,type:"console"}),e)),"assert"===t){if(!e[0]){const t=`Assertion failed: ${Q(e.slice(1)," ")||"console.assert"}`;o.setExtra("arguments",e.slice(1)),Yn(t,r)}return}const s=e.find(e=>e instanceof Error);if(s)return void Jn(s,r);Yn(Q(e," "),r)})}(t,o,r)})}}};const Eo=()=>{let t;return{name:"Dedupe",processEvent(n){if(n.type)return n;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Co(e,t))return!1;if(!xo(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Io(t),r=Io(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Co(e,t))return!1;if(!xo(e,t))return!1;return!0}(e,t))return!0;return!1}(n,t))return e&&p.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=n}}};function xo(e,t){let n=b(e),r=b(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],o=n[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function Co(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function Io(e){return e.exception?.values?.[0]}const To=(e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:"ExtraErrorData",processEvent(e,r,o){const{maxValueLength:s=250}=o.getOptions();return function(e,t={},n,r,o){if(!t.originalException||!L(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=Mo(t.originalException,r,o);if(i){const t={...e.contexts},r=Jt(i,n);return U(r)&&(re(r,"__sentry_skip_normalization__",!0),t[s]=r),{...e,contexts:t}}return e}(e,r,t,n,s)}}};function Mo(t,n,r){try{const e=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const n of Object.keys(t)){if(-1!==e.indexOf(n))continue;const s=t[n];o[n]=L(s)||"string"==typeof s?X(`${s}`,r):s}if(n&&void 0!==t.cause)if(L(t.cause)){const e=t.cause.name||t.cause.constructor.name;o.cause={[e]:Mo(t.cause,!1,r)}}else o.cause=t.cause;if("function"==typeof t.toJSON){const e=t.toJSON();for(const t of Object.keys(e)){const n=e[t];o[t]=L(n)?n.toString():n}}return o}catch(t){e&&p.error("Unable to extract extra data from the Error object:",t)}return null}const Ro=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Oo(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n="/"===o.charAt(0))}return t=function(e,t){let n=0;for(let t=e.length-1;t>=0;t--){const r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."}function Ao(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function Lo(e,t){return function(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Ro.exec(t);return n?n.slice(1):[]}(e)[2]||""}const Do=(e={})=>{const n=e.root,r=e.prefix||"app:///",o="window"in t&&!!t.window,s=e.iteratee||function({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const e=r.filename;0===e.indexOf(t)&&(r.filename=e.replace(t,n))}}else if(o||s){const e=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,s=t?function(e,t){e=Oo(e).slice(1),t=Oo(t).slice(1);const n=Ao(e.split("/")),r=Ao(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let e=0;e<o;e++)if(n[e]!==r[e]){s=e;break}let i=[];for(let e=s;e<n.length;e++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}(t,e):Lo(e);r.filename=`${n}${s}`}return r}}({isBrowser:o,root:n,prefix:r});return{name:"RewriteFrames",processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>{return{...e,...e.stacktrace&&{stacktrace:(t=e.stacktrace,{...t,frames:t?.frames?.map(e=>s(e))})}};var t})}}}catch{return e}}(t)),t}}};const No=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],Po=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],Fo={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},$o=["select","insert","upsert","update","delete"];function Bo(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Uo(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function jo(e,t){if(""===t||"*"===t)return"select(*)";if("select"===e)return`select(${t})`;if("or"===e||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return o=n?.startsWith("fts")?"textSearch":n?.startsWith("plfts")?"textSearch[plain]":n?.startsWith("phfts")?"textSearch[phrase]":n?.startsWith("wfts")?"textSearch[websearch]":n&&Fo[n]||"filter",`${o}(${e}, ${r.join(".")})`}function Ho(e,t=!1){return new Proxy(e,{apply:(n,r,o)=>wn({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[qe]:"auto.db.supabase",[We]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},e=>Reflect.apply(n,r,o).then(t=>(t&&"object"==typeof t&&"error"in t&&t.error?(e.setStatus({code:2}),Jn(t.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),Jn(t,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),t}).then(...o))})}function zo(t){Uo(t.prototype.from)||(t.prototype.from=new Proxy(t.prototype.from,{apply(t,n,r){const o=Reflect.apply(t,n,r);return function(t){for(const n of $o)Uo(t.prototype[n])||(t.prototype[n]=new Proxy(t.prototype[n],{apply(t,r,o){const s=Reflect.apply(t,r,o),i=s.constructor;return e&&p.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),Wo(i),s}}),Bo(t.prototype[n]))}(o.constructor),o}}),Bo(t.prototype.from))}function Wo(e){Uo(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,t,n){const r=$o,o=t,s=function(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}(o.method,o.headers);if(!r.includes(s))return Reflect.apply(e,t,n);if(!o?.url?.pathname||"string"!=typeof o.url.pathname)return Reflect.apply(e,t,n);const i=o.url.pathname.split("/"),a=i.length>0?i[i.length-1]:"",c=[];for(const[e,t]of o.url.searchParams.entries())c.push(jo(e,t));const u=Object.create(null);if(U(o.body))for(const[e,t]of Object.entries(o.body))u[e]=t;const l=`${"select"===s?"":`${s}${u?"(...) ":""}`}${c.join(" ")} from(${a})`,d={"db.table":a,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[qe]:"auto.db.supabase",[We]:"db"};return c.length&&(d["db.query"]=c),Object.keys(u).length&&(d["db.body"]=u),wn({name:l,attributes:d},r=>Reflect.apply(e,t,[]).then(e=>{if(r&&(e&&"object"==typeof e&&"status"in e&&nt(r,e.status||500),r.end()),e.error){const t=new Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);const n={};c.length&&(n.query=c),Object.keys(u).length&&(n.body=u),Jn(t,e=>(e.addEventProcessor(e=>(he(e,{handled:!1,type:"auto.db.supabase.postgres"}),e)),e.setContext("supabase",n),e))}const t={type:"supabase",category:`db.${s}`,message:l},n={};return c.length&&(n.query=c),Object.keys(u).length&&(n.body=u),Object.keys(n).length&&(t.data=n),eo(t),e},e=>{throw r&&(nt(r,500),r.end()),e}).then(...n))}}),Bo(e.prototype.then))}const qo=t=>{if(!t)return void(e&&p.warn("Supabase integration was not installed because no Supabase client was provided."));zo(t.constructor===Function?t:t.constructor),function(e){const t=e.auth;if(t&&!Uo(e.auth)){for(const n of No){const r=t[n];r&&"function"==typeof e.auth[n]&&(e.auth[n]=Ho(r))}for(const n of Po){const r=t.admin[n];r&&"function"==typeof e.auth.admin[n]&&(e.auth.admin[n]=Ho(r,!0))}Bo(e.auth)}}(t)},Vo=e=>{return t=e.supabaseClient,{setupOnce(){qo(t)},name:"Supabase"};var t};function Go(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function Ko(e){return e.map(e=>"number"==typeof e?"<array>":e).join(".")}function Jo(e){const t=new Set;for(const n of e.issues){const e=Ko(n.path);e.length>0&&t.add(e)}const n=Array.from(t);if(0===n.length){let t="variable";if(e.issues.length>0){const n=e.issues[0];void 0!==n&&"expected"in n&&"string"==typeof n.expected&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${X(n.join(", "),100)}`}function Yo(e,t=!1,n,r){if(!(n.exception?.values&&r.originalException&&(o=r.originalException,L(o)&&"ZodError"===o.name&&Array.isArray(o.issues))&&0!==r.originalException.issues.length))return n;var o;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Go);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:Jo(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:"unknown"}}}}}const Xo=(e={})=>{const t=e.limit??10;return{name:"ZodErrors",processEvent:(n,r)=>Yo(t,e.saveZodIssuesAsAttachment,n,r)}},Zo=e=>({name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",e=>{en(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;t&&(yo(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;_o(e.getOptions().stackParser,t)})},processEvent(t){const n=function(e){const t=b(e);if(!t)return;return t.filter(e=>!!e.filename).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(Qo)).map(e=>e.slice(Qo.length)):[])}(t);if(n){const r=n["drop-error-if-contains-third-party-frames"===e.behaviour||"apply-tag-if-contains-third-party-frames"===e.behaviour?"some":"every"](t=>!t.some(t=>e.filterKeys.includes(t)));if(r){if("drop-error-if-contains-third-party-frames"===e.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===e.behaviour)return null;t.tags={...t.tags,third_party_code:!0}}}return t}});const Qo="_sentryBundlerPluginAppKey:",es="flag.evaluation.";function ts(e){const t=Ne().getScopeData().contexts.flags,n=t?t.values:[];return n.length?(void 0===e.contexts&&(e.contexts={}),e.contexts.flags={values:[...n]},e):e}function ns(t,n,r=100){const o=Ne().getScopeData().contexts;o.flags||(o.flags={values:[]});!function(t,n,r,o){if("boolean"!=typeof r)return;if(t.length>o)return void(e&&p.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${o}`));const s=t.findIndex(e=>e.flag===n);-1!==s&&t.splice(s,1);t.length===o&&t.shift();t.push({flag:n,result:r})}(o.flags.values,t,n,r)}function rs(e,t,n=10){if("boolean"!=typeof t)return;const r=Ft();if(!r)return;const o=Mt(r).data;if(`${es}${e}`in o)return void r.setAttribute(`${es}${e}`,t);Object.keys(o).filter(e=>e.startsWith(es)).length<n&&r.setAttribute(`${es}${e}`,t)}const os=()=>({name:"FeatureFlags",processEvent:(e,t,n)=>ts(e),addFeatureFlag(e,t){ns(e,t),rs(e,t)}});function ss(e,t,n,r,o="auto.http.browser"){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=jt()&&t(i);if(e.endTimestamp&&a){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(!function(e,t){if(t.response){nt(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),delete r[t]))}const c=!!Ft(),u=a&&c?kn(function(e,t,n){const r=zr(e);return{name:r?`${t} ${Wr(r)}`:t,attributes:as(e,r,t,n)}}(i,s,o)):new Kt;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const t=e.args[0],n=e.args[1]||{},r=function(e,t,n){const r=Zr({span:n}),o=r["sentry-trace"],s=r.baggage;if(!o)return;const i=t.headers||(q(e)?e.headers:void 0);if(i){if(function(e){return"undefined"!=typeof Headers&&z(e,Headers)}(i)){const e=new Headers(i);if(e.get("sentry-trace")||e.set("sentry-trace",o),s){const t=e.get("baggage");t?is(t)||e.set("baggage",`${t},${s}`):e.set("baggage",s)}return e}if(Array.isArray(i)){const e=[...i];i.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",o]);const t=i.find(e=>"baggage"===e[0]&&is(e[1]));return s&&!t&&e.push(["baggage",s]),e}{const e="sentry-trace"in i?i["sentry-trace"]:void 0,t="baggage"in i?i.baggage:void 0,n=t?Array.isArray(t)?[...t]:[t]:[],r=t&&(Array.isArray(t)?t.find(e=>is(e)):is(t));return s&&!r&&n.push(s),{...i,"sentry-trace":e??o,baggage:n.length>0?n.join(","):void 0}}}return{...r}}(t,n,jt()&&c?u:void 0);r&&(e.args[1]=n,n.headers=r)}const l=Be();if(l){const t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};l.emit("beforeOutgoingRequestSpan",u,t)}return u}function is(e){return e.split(",").some(e=>e.trim().startsWith(it))}function as(e,t,n,r){const o={url:e,type:"fetch","http.method":n,[qe]:r,[We]:"http.client"};return t&&(Hr(t)||(o["http.url"]=t.href,o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function cs(e,t={},n=Ne()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,l={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},d=n?.getClient()||Be();d&&d.emit("beforeSendFeedback",l,t);return n.captureEvent(l,t)}const us={[qe]:"auto.console.logging"},ls=(t={})=>{const n=t.levels||i;return{name:"ConsoleLogs",setup(t){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=t.getOptions();r?bo(({args:e,level:r})=>{if(Be()!==t||!n.includes(r))return;if("assert"===r){if(!e[0]){const t=e.slice(1);Tr({level:"error",message:t.length>0?`Assertion failed: ${ds(t,o,s)}`:"Assertion failed",attributes:us})}return}const i="log"===r;Tr({level:i?"info":r,message:ds(e,o,s),severityNumber:i?10:void 0,attributes:us})}):e&&p.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled")}}};function ds(e,n,r){return"util"in t&&"function"==typeof t.util.format?t.util.format(...e):function(e,t,n){return e.map(e=>B(e)?String(e):JSON.stringify(Jt(e,t,n))).join(" ")}(e,n,r)}function ps(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const hs=t;function fs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ms(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in hs))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(fs(hs.fetch))return!0;let t=!1;const n=hs.document;if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e),e.contentWindow?.fetch&&(t=fs(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){e&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t}function gs(e,t){const n="fetch";k(n,e),E(n,()=>_s(void 0,t))}function _s(e,n=!1){n&&!ms()||ne(t,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:bs(t),method:vs(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:bs(t),method:vs(t,"method")?String(t.method).toUpperCase():"GET"}}(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:1e3*ye(),virtualError:o,headers:Ss(r)};return e||x("fetch",{...a}),n.apply(t,r).then(async t=>(e?e(t):x("fetch",{...a,endTimestamp:1e3*ye(),response:t}),t),e=>{if(x("fetch",{...a,endTimestamp:1e3*ye(),error:e}),L(e)&&void 0===e.stack&&(e.stack=o.stack,re(e,"framesToPop",1)),e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(a.fetchData.url);e.message=`${e.message} (${t.host})`}catch{}throw e})}})}function ys(e){let t;try{t=e.clone()}catch{return}!async function(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(e),o&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(e)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{x("fetch-body-resolved",{endTimestamp:1e3*ye(),response:e})})}function vs(e,t){return!!e&&"object"==typeof e&&!!e[t]}function bs(e){return"string"==typeof e?e:e?vs(e,"url")?e.url:e.toString?e.toString():"":""}function Ss(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(q(t))return new Headers(t.headers)}catch{}}function ws(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function ks(){return"undefined"!=typeof window&&(!ws()||function(){const e=t.process;return"renderer"===e?.type}())}const Es=t,xs=Es.document,Cs=Es.navigator,Is="Report a Bug",Ts=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=Be();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&Ne().setTags(e.tags);const r=cs({source:"api",url:J(),...e},t);return new Promise((e,t)=>{const o=setTimeout(()=>t("Unable to determine if Feedback was correctly sent."),3e4),s=n.on("afterSendEvent",(n,i)=>{if(n.event_id===r)return clearTimeout(o),s(),i?.statusCode&&i.statusCode>=200&&i.statusCode<300?e(r):t(403===i?.statusCode?"Unable to send feedback. This could be because this domain is not in your list of allowed domains.":"Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},Ms="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Rs(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Os(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}function As({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=xs.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Is,o.appendChild(function(){const e=e=>Es.document.createElementNS("http://www.w3.org/2000/svg",e),t=Os(e("svg"),{width:"20",height:"20",viewBox:"0 0 20 20",fill:"var(--actor-color, var(--foreground))"}),n=Os(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Os(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=Os(e("clipPath"),{id:"clip0_57_80"}),i=Os(e("rect"),{width:"20",height:"20",fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}()),e){const t=xs.createElement("span");t.appendChild(xs.createTextNode(e)),o.appendChild(t)}const s=function(e){const t=xs.createElement("style");return t.textContent='\n.widget__actor {\n position: fixed;\n z-index: var(--z-index);\n margin: var(--page-margin);\n inset: var(--actor-inset);\n\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 16px;\n\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n line-height: 1.14em;\n text-decoration: none;\n\n background: var(--actor-background, var(--background));\n border-radius: var(--actor-border-radius, 1.7em/50%);\n border: var(--actor-border, var(--border));\n box-shadow: var(--actor-box-shadow, var(--box-shadow));\n color: var(--actor-color, var(--foreground));\n fill: var(--actor-color, var(--foreground));\n cursor: pointer;\n opacity: 1;\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden="true"] {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n background: var(--actor-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n width: 1.14em;\n height: 1.14em;\n}\n\n@media (max-width: 600px) {\n .widget__actor span {\n display: none;\n }\n}\n',e&&t.setAttribute("nonce",e),t}(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const Ls="rgba(88, 74, 192, 1)",Ds={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Ls,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},Ns={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Ls,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Ps(e){return`\n --foreground: ${e.foreground};\n --background: ${e.background};\n --accent-foreground: ${e.accentForeground};\n --accent-background: ${e.accentBackground};\n --success-color: ${e.successColor};\n --error-color: ${e.errorColor};\n --border: ${e.border};\n --box-shadow: ${e.boxShadow};\n --outline: ${e.outline};\n --interactive-filter: ${e.interactiveFilter};\n `}const Fs=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:r="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:i=!1,isNameRequired:a=!1,showEmail:c=!0,showName:u=!0,enableScreenshot:l=!0,useSentryUser:d={email:"email",name:"username"},tags:h,styleNonce:f,scriptNonce:m,colorScheme:g="system",themeLight:_={},themeDark:y={},addScreenshotButtonLabel:v="Add a screenshot",cancelButtonLabel:b="Cancel",confirmButtonLabel:S="Confirm",emailLabel:w="Email",emailPlaceholder:k="your.email@example.org",formTitle:E="Report a Bug",isRequiredLabel:x="(required)",messageLabel:C="Description",messagePlaceholder:I="What's the bug? What did you expect?",nameLabel:T="Name",namePlaceholder:M="Your Name",removeScreenshotButtonLabel:R="Remove screenshot",submitButtonLabel:O="Send Bug Report",successMessageText:A="Thank you for your report!",triggerLabel:L=Is,triggerAriaLabel:D="",onFormOpen:N,onFormClose:P,onSubmitSuccess:F,onSubmitError:$,onFormSubmitted:B}={})=>{const U={id:r,autoInject:o,showBranding:s,isEmailRequired:i,isNameRequired:a,showEmail:c,showName:u,enableScreenshot:l,useSentryUser:d,tags:h,styleNonce:f,scriptNonce:m,colorScheme:g,themeDark:y,themeLight:_,triggerLabel:L,triggerAriaLabel:D,cancelButtonLabel:b,submitButtonLabel:O,confirmButtonLabel:S,formTitle:E,emailLabel:w,emailPlaceholder:k,messageLabel:C,messagePlaceholder:I,nameLabel:T,namePlaceholder:M,successMessageText:A,isRequiredLabel:x,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:R,onFormClose:P,onFormOpen:N,onSubmitError:$,onSubmitSuccess:F,onFormSubmitted:B};let j=null,H=[];const z=e=>{if(!j){const t=xs.createElement("div");t.id=String(e.id),xs.body.appendChild(t),j=t.attachShadow({mode:"open"}),j.appendChild(function({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=xs.createElement("style");return o.textContent=`\n:host {\n --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n --font-size: 14px;\n --z-index: 100000;\n\n --page-margin: 16px;\n --inset: auto 0 0 auto;\n --actor-inset: var(--inset);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${"system"!==e?"color-scheme: only light;":""}\n\n ${Ps("dark"===e?{...Ns,...t}:{...Ds,...n})}\n}\n\n${"system"===e?`\n@media (prefers-color-scheme: dark) {\n :host {\n ${Ps({...Ns,...t})}\n }\n}`:""}\n}\n`,r&&o.setAttribute("nonce",r),o}(e))}return j},W=async r=>{const o=r.enableScreenshot&&!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Cs.userAgent)||/Macintosh/i.test(Cs.userAgent)&&Cs.maxTouchPoints&&Cs.maxTouchPoints>1||!isSecureContext);let s,i;try{s=(t?t():await e("feedbackModalIntegration",m))(),pr(s)}catch{throw Ms&&p.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const t=o?n?n():await e("feedbackScreenshotIntegration",m):void 0;t&&(i=t(),pr(i))}catch{Ms&&p.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const a=s.createDialog({options:{...r,onFormClose:()=>{a?.close(),r.onFormClose?.()},onFormSubmitted:()=>{a?.close(),r.onFormSubmitted?.()}},screenshotIntegration:i,sendFeedback:Ts,shadow:z(r)});return a},q=(e,t={})=>{const n=Rs(U,t),r="string"==typeof e?xs.querySelector(e):"function"==typeof e.addEventListener?e:null;if(!r)throw Ms&&p.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let o=null;const s=async()=>{o||(o=await W({...n,onFormSubmitted:()=>{o?.removeFromDom(),n.onFormSubmitted?.()}})),o.appendToDom(),o.open()};r.addEventListener("click",s);const i=()=>{H=H.filter(e=>e!==i),o?.removeFromDom(),o=null,r.removeEventListener("click",s)};return H.push(i),i},V=(e={})=>{const t=Rs(U,e),n=z(t),r=As({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:f});return q(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:"Feedback",setupOnce(){ks()&&U.autoInject&&("loading"===xs.readyState?xs.addEventListener("DOMContentLoaded",()=>V().appendToDom()):V().appendToDom())},attachTo:q,createWidget(e={}){const t=V(Rs(U,e));return t.appendToDom(),t},createForm:async(e={})=>W(Rs(U,e)),remove(){j&&(j.parentElement?.remove(),j=null),H.forEach(e=>e()),H=[]}}};var $s,Bs,Us,js,Hs,zs,Ws,qs={},Vs=[],Gs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ks=Array.isArray;function Js(e,t){for(var n in t)e[n]=t[n];return e}function Ys(e){var t=e.parentNode;t&&t.removeChild(e)}function Xs(e,t,n){var r,o,s,i={};for(s in t)"key"==s?r=t[s]:"ref"==s?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?$s.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===i[s]&&(i[s]=e.defaultProps[s]);return Zs(e,i,r,o,null)}function Zs(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++Us:o,__i:-1,__u:0};return null==o&&null!=Bs.vnode&&Bs.vnode(s),s}function Qs(e){return e.children}function ei(e,t){this.props=e,this.context=t}function ti(e,t){if(null==t)return e.__?ti(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?ti(e):null}function ni(e,t,n){var r,o=e.__v,s=o.__e,i=e.__P;if(i)return(r=Js({},o)).__v=o.__v+1,Bs.vnode&&Bs.vnode(r),hi(i,r,o,e.__n,void 0!==i.ownerSVGElement,32&o.__u?[s]:null,t,null==s?ti(o):s,!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&ri(r),r}function ri(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return ri(e)}}function oi(e){(!e.__d&&(e.__d=!0)&&js.push(e)&&!si.__r++||Hs!==Bs.debounceRendering)&&((Hs=Bs.debounceRendering)||zs)(si)}function si(){var e,t,n,r=[],o=[];for(js.sort(Ws);e=js.shift();)e.__d&&(n=js.length,t=ni(e,r,o)||t,0===n||js.length>n?(fi(r,t,o),o.length=r.length=0,t=void 0,js.sort(Ws)):t&&Bs.__c&&Bs.__c(t,Vs));t&&fi(r,t,o),si.__r=0}function ii(e,t,n,r,o,s,i,a,c,u,l){var d,p,h,f,m,g=r&&r.__k||Vs,_=t.length;for(n.__d=c,function(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,l=u,d=0;for(e.__k=[],r=0;r<c;r++)null!=(o=e.__k[r]=null==(o=t[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?Zs(null,o,null,null,o):Ks(o)?Zs(Qs,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Zs(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,a=ci(o,n,i=r+d,l),o.__i=a,s=null,-1!==a&&(l--,(s=n[a])&&(s.__u|=131072)),null==s||null===s.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==i&&(a===i+1?d++:a>i?l>c-i?d+=a-i:d--:d=a<i&&a==i-1?a-i:0,a!==r+d&&(o.__u|=65536))):(s=n[r])&&null==s.key&&s.__e&&(s.__e==e.__d&&(e.__d=ti(s)),gi(s,s,!1),n[r]=null,l--);if(l)for(r=0;r<u;r++)null!=(s=n[r])&&!(131072&s.__u)&&(s.__e==e.__d&&(e.__d=ti(s)),gi(s,s))}(n,t,g),c=n.__d,d=0;d<_;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(p=-1===h.__i?qs:g[h.__i]||qs,h.__i=d,hi(e,h,p,o,s,i,a,c,u,l),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&mi(p.ref,null,h),l.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||p.__k===h.__k?c=ai(h,c,e):"function"==typeof h.type&&void 0!==h.__d?c=h.__d:f&&(c=f.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=c,n.__e=m}function ai(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=ai(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function ci(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,c=t[n];if(null===c||c&&o==c.key&&s===c.type)return n;if(r>(null==c||131072&c.__u?0:1))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&!(131072&c.__u)&&o==c.key&&s===c.type)return i;i--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&o==c.key&&s===c.type)return a;a++}}return-1}function ui(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Gs.test(t)?n:n+"px"}function li(e,t,n,r,o){var s;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ui(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ui(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,s?pi:di,s)):e.removeEventListener(t,s?pi:di,s);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function di(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(Bs.event?Bs.event(e):e)}}function pi(e){if(this.l)return this.l[e.type+!0](Bs.event?Bs.event(e):e)}function hi(e,t,n,r,o,s,i,a,c,u){var l,d,p,h,f,m,g,_,y,v,b,S,w,k,E,x=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(l=Bs.__b)&&l(t);e:if("function"==typeof x)try{if(_=t.props,y=(l=x.contextType)&&r[l.__c],v=l?y?y.props.value:l.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in x&&x.prototype.render?t.__c=d=new x(_,v):(t.__c=d=new ei(_,v),d.constructor=x,d.render=_i),y&&y.sub(d),d.props=_,d.state||(d.state={}),d.context=v,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=x.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Js({},d.__s)),Js(d.__s,x.getDerivedStateFromProps(_,d.__s))),h=d.props,f=d.state,d.__v=t,p)null==x.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==x.getDerivedStateFromProps&&_!==h&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(_,v),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(_,d.__s,v)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&i.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(_,d.__s,v),null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(h,f,m)})}if(d.context=v,d.props=_,d.__P=e,d.__e=!1,S=Bs.__r,w=0,"prototype"in x&&x.prototype.render){for(d.state=d.__s,d.__d=!1,S&&S(t),l=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,S&&S(t),l=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=Js(Js({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),ii(e,Ks(E=null!=l&&l.type===Qs&&null==l.key?l.props.children:l)?E:[E],t,n,r,o,s,i,a,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&i.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,c||null!=s?(t.__e=a,t.__u|=c?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),Bs.__e(e,t,n)}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,o,s,i,a,c){var u,l,d,p,h,f,m,g=n.props,_=t.props,y=t.type;if("svg"===y&&(o=!0),null!=s)for(u=0;u<s.length;u++)if((h=s[u])&&"setAttribute"in h==!!y&&(y?h.localName===y:3===h.nodeType)){e=h,s[u]=null;break}if(null==e){if(null===y)return document.createTextNode(_);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,_.is&&_),s=null,a=!1}if(null===y)g===_||a&&e.data===_||(e.data=_);else{if(s=s&&$s.call(e.childNodes),g=n.props||qs,!a&&null!=s)for(g={},u=0;u<e.attributes.length;u++)g[(h=e.attributes[u]).name]=h.value;for(u in g)h=g[u],"children"==u||("dangerouslySetInnerHTML"==u?d=h:"key"===u||u in _||li(e,u,null,h,o));for(u in _)h=_[u],"children"==u?p=h:"dangerouslySetInnerHTML"==u?l=h:"value"==u?f=h:"checked"==u?m=h:"key"===u||a&&"function"!=typeof h||g[u]===h||li(e,u,h,g[u],o);if(l)a||d&&(l.__html===d.__html||l.__html===e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(d&&(e.innerHTML=""),ii(e,Ks(p)?p:[p],t,n,r,o&&"foreignObject"!==y,s,i,s?s[0]:n.__k&&ti(n,0),a,c),null!=s)for(u=s.length;u--;)null!=s[u]&&Ys(s[u]);a||(u="value",void 0!==f&&(f!==e[u]||"progress"===y&&!f||"option"===y&&f!==g[u])&&li(e,u,f,g[u],!1),u="checked",void 0!==m&&m!==e[u]&&li(e,u,m,g[u],!1))}return e}(n.__e,t,n,r,o,s,i,c,u);(l=Bs.diffed)&&l(t)}function fi(e,t,n){for(var r=0;r<n.length;r++)mi(n[r],n[++r],n[++r]);Bs.__c&&Bs.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Bs.__e(e,t.__v)}})}function mi(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Bs.__e(e,n)}}function gi(e,t,n){var r,o;if(Bs.unmount&&Bs.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||mi(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Bs.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&gi(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Ys(e.__e),e.__=e.__e=e.__d=void 0}function _i(e,t,n){return this.constructor(e,n)}$s=Vs.slice,Bs={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&null!=s.getDerivedStateFromError&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},Us=0,ei.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Js({},this.state),"function"==typeof e&&(e=e(Js({},n),this.props)),e&&Js(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),oi(this))},ei.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),oi(this))},ei.prototype.render=Qs,js=[],zs="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ws=function(e,t){return e.__v.__b-t.__v.__b},si.__r=0;var yi,vi,bi,Si,wi=0,ki=[],Ei=[],xi=Bs,Ci=xi.__b,Ii=xi.__r,Ti=xi.diffed,Mi=xi.__c,Ri=xi.unmount,Oi=xi.__;function Ai(e,t){xi.__h&&xi.__h(vi,e,wi||t),wi=0;var n=vi.__H||(vi.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ei}),n.__[e]}function Li(e){return wi=1,Di(Wi,e)}function Di(e,t,n){var r=Ai(yi++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Wi(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=vi,!vi.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(e){return!!e.__c});if(o.every(function(e){return!e.__N}))return!s||s.call(this,e,t,n);var i=!1;return o.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),!(!i&&r.__c.props===e)&&(!s||s.call(this,e,t,n))};vi.u=!0;var s=vi.shouldComponentUpdate,i=vi.componentWillUpdate;vi.componentWillUpdate=function(e,t,n){if(this.__e){var r=s;s=void 0,o(e,t,n),s=r}i&&i.call(this,e,t,n)},vi.shouldComponentUpdate=o}return r.__N||r.__}function Ni(e,t){var n=Ai(yi++,4);!xi.__s&&zi(n.__H,t)&&(n.__=e,n.i=t,vi.__h.push(n))}function Pi(e,t){var n=Ai(yi++,7);return zi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Fi(e,t){return wi=8,Pi(function(){return e},t)}function $i(){for(var e;e=ki.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ji),e.__H.__h.forEach(Hi),e.__H.__h=[]}catch(t){e.__H.__h=[],xi.__e(t,e.__v)}}xi.__b=function(e){vi=null,Ci&&Ci(e)},xi.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Oi&&Oi(e,t)},xi.__r=function(e){Ii&&Ii(e),yi=0;var t=(vi=e.__c).__H;t&&(bi===vi?(t.__h=[],vi.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=Ei,e.__N=e.i=void 0})):(t.__h.forEach(ji),t.__h.forEach(Hi),t.__h=[],yi=0)),bi=vi},xi.diffed=function(e){Ti&&Ti(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ki.push(t)&&Si===xi.requestAnimationFrame||((Si=xi.requestAnimationFrame)||Ui)($i)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==Ei&&(e.__=e.__V),e.i=void 0,e.__V=Ei})),bi=vi=null},xi.__c=function(e,t){t.some(function(e){try{e.__h.forEach(ji),e.__h=e.__h.filter(function(e){return!e.__||Hi(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],xi.__e(n,e.__v)}}),Mi&&Mi(e,t)},xi.unmount=function(e){Ri&&Ri(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{ji(e)}catch(e){t=e}}),n.__H=void 0,t&&xi.__e(t,n.__v))};var Bi="function"==typeof requestAnimationFrame;function Ui(e){var t,n=function(){clearTimeout(r),Bi&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Bi&&(t=requestAnimationFrame(n))}function ji(e){var t=vi,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),vi=t}function Hi(e){var t=vi;e.__c=e.__(),vi=t}function zi(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Wi(e,t){return"function"==typeof t?t(e):t}const qi=Object.defineProperty({__proto__:null,useCallback:Fi,useContext:function(e){var t=vi.context[e.__c],n=Ai(yi++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(vi)),t.props.value):e.__},useDebugValue:function(e,t){xi.useDebugValue&&xi.useDebugValue(t?t(e):e)},useEffect:function(e,t){var n=Ai(yi++,3);!xi.__s&&zi(n.__H,t)&&(n.__=e,n.i=t,vi.__H.__h.push(n))},useErrorBoundary:function(e){var t=Ai(yi++,10),n=Li();return t.__=e,vi.componentDidCatch||(vi.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:function(){var e=Ai(yi++,11);if(!e.__){for(var t=vi.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useImperativeHandle:function(e,t,n){wi=6,Ni(function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},null==n?n:n.concat(e))},useLayoutEffect:Ni,useMemo:Pi,useReducer:Di,useRef:function(e){return wi=5,Pi(function(){return{current:e}},[])},useState:Li},Symbol.toStringTag,{value:"Module"});function Vi(){const e=e=>xs.createElementNS("http://www.w3.org/2000/svg",e),t=Os(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Os(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function Gi({options:e}){const t=Pi(()=>({__html:Vi().outerHTML}),[]);return Xs("h2",{class:"dialog__header"},Xs("span",{class:"dialog__title"},e.formTitle),e.showBranding?Xs("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function Ki(e,t){const n=e.get(t);return"string"==typeof n?n.trim():""}function Ji({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:l,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:h,cancelButtonLabel:f,emailLabel:m,emailPlaceholder:g,isEmailRequired:_,isNameRequired:y,messageLabel:v,messagePlaceholder:b,nameLabel:S,namePlaceholder:w,submitButtonLabel:k,isRequiredLabel:E}=e,[x,C]=Li(!1),[I,T]=Li(null),[M,R]=Li(!1),O=u?.input,[A,L]=Li(null),D=Fi(e=>{L(e),R(!1)},[]),N=Fi(e=>{const t=function(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}(e,{emailLabel:m,isEmailRequired:_,isNameRequired:y,messageLabel:v,nameLabel:S});return t.length>0?T(`Please enter in the following required fields: ${t.join(", ")}`):T(null),0===t.length},[m,_,y,v,S]),P=Fi(async e=>{C(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;const t=new FormData(e.target),n=await(u&&M?u.value():void 0),r={name:Ki(t,"name"),email:Ki(t,"email"),message:Ki(t,"message"),attachments:n?[n]:void 0};if(!N(r))return;try{const e=await o({name:r.name,email:r.email,message:r.message,source:"widget",tags:l},{attachments:r.attachments});s(r,e)}catch(e){Ms&&p.error(e),T(e),i(e)}}finally{C(!1)}},[u&&M,s,i]);return Xs("form",{class:"form",onSubmit:P},O&&M?Xs(O,{onError:D}):null,Xs("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:x},Xs("div",{class:"form__top"},I?Xs("div",{class:"form__error-container"},I):null,c?Xs("label",{for:"name",class:"form__label"},Xs(Yi,{label:S,isRequiredLabel:E,isRequired:y}),Xs("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:w,required:y,type:"text"})):Xs("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?Xs("label",{for:"email",class:"form__label"},Xs(Yi,{label:m,isRequiredLabel:E,isRequired:_}),Xs("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:g,required:_,type:"email"})):Xs("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Xs("label",{for:"message",class:"form__label"},Xs(Yi,{label:v,isRequiredLabel:E,isRequired:!0}),Xs("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:b,required:!0,rows:5})),O?Xs("label",{for:"screenshot",class:"form__label"},Xs("button",{class:"btn btn--default",disabled:x,type:"button",onClick:()=>{L(null),R(e=>!e)}},M?h:d),A?Xs("div",{class:"form__error-container"},A.message):null):null),Xs("div",{class:"btn-group"},Xs("button",{class:"btn btn--primary",disabled:x,type:"submit"},k),Xs("button",{class:"btn btn--default",disabled:x,type:"button",onClick:r},f))))}function Yi({label:e,isRequired:t,isRequiredLabel:n}){return Xs("span",{class:"form__label__text"},e,t&&Xs("span",{class:"form__label__text--required"},n))}function Xi(){const e=e=>Es.document.createElementNS("http://www.w3.org/2000/svg",e),t=Os(e("svg"),{width:"16",height:"17",viewBox:"0 0 16 17",fill:"inherit"}),n=Os(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Os(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Os(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=Os(e("clipPath"),{id:"clip0_57_156"}),a=Os(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function Zi({open:e,onFormSubmitted:t,...n}){const r=n.options,o=Pi(()=>({__html:Xi().outerHTML}),[]),[s,i]=Li(null),a=Fi(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=Fi((e,r)=>{n.onSubmitSuccess(e,r),i(setTimeout(()=>{t(),i(null)},5e3))},[t]);return Xs(Qs,null,s?Xs("div",{class:"success__position",onClick:a},Xs("div",{class:"success__content"},r.successMessageText,Xs("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):Xs("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Xs("div",{class:"dialog__position"},Xs("div",{class:"dialog__content",onClick:e=>{e.stopPropagation()}},Xs(Gi,{options:r}),Xs(Ji,{...n,onSubmitSuccess:c})))))}const Qi=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=function(){const e=Ne().getUser(),t=Pe().getUser(),n=Fe().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}(),a=xs.createElement("div"),c=function(e){const t=xs.createElement("style");return t.textContent="\n:host {\n --dialog-inset: var(--inset);\n}\n\n\n.dialog {\n position: fixed;\n z-index: var(--z-index);\n margin: 0;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n height: 100vh;\n width: 100vw;\n\n color: var(--dialog-color, var(--foreground));\n fill: var(--dialog-color, var(--foreground));\n line-height: 1.75em;\n\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n inset: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n position: fixed;\n z-index: var(--z-index);\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n display: flex;\n max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n .dialog__position {\n inset: var(--page-margin);\n padding: 0;\n }\n}\n\n.dialog__position:has(.editor) {\n inset: var(--page-margin);\n padding: 0;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: var(--dialog-padding, 24px);\n max-width: 100%;\n width: 100%;\n max-height: 100%;\n overflow: auto;\n\n background: var(--dialog-background, var(--background));\n border-radius: var(--dialog-border-radius, 20px);\n border: var(--dialog-border, var(--border));\n box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n transform: translate(0, 0) scale(1);\n transition: transform 0.2s ease-in-out;\n}\n\n\n\n.dialog__header {\n display: flex;\n gap: 4px;\n justify-content: space-between;\n font-weight: var(--dialog-header-weight, 600);\n margin: 0;\n}\n.dialog__title {\n align-self: center;\n width: var(--form-width, 272px);\n}\n\n@media (max-width: 600px) {\n .dialog__title {\n width: auto;\n }\n}\n\n.dialog__position:has(.editor) .dialog__title {\n width: auto;\n}\n\n\n.brand-link {\n display: inline-flex;\n}\n.brand-link:focus-visible {\n outline: var(--outline);\n}\n\n\n.form {\n display: flex;\n overflow: auto;\n flex-direction: row;\n gap: 16px;\n flex: 1 0;\n}\n\n.form fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n.form__right {\n flex: 0 0 auto;\n display: flex;\n overflow: auto;\n flex-direction: column;\n justify-content: space-between;\n gap: 20px;\n width: var(--form-width, 100%);\n}\n\n.dialog__position:has(.editor) .form__right {\n width: var(--form-width, 272px);\n}\n\n.form__top {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form__error-container {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n font-family: inherit;\n line-height: inherit;\n background: transparent;\n box-sizing: border-box;\n border: var(--input-border, var(--border));\n border-radius: var(--input-border-radius, 6px);\n color: var(--input-color, inherit);\n fill: var(--input-color, inherit);\n font-size: var(--input-font-size, inherit);\n font-weight: var(--input-font-weight, 500);\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n opacity: 0.65;\n color: var(--input-placeholder-color, inherit);\n filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.error {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n\n.btn-group {\n display: grid;\n gap: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--button-font-size, inherit);\n font-weight: var(--button-font-weight, 600);\n padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n color: var(--button-primary-color, var(--accent-foreground));\n fill: var(--button-primary-color, var(--accent-foreground));\n background: var(--button-primary-background, var(--accent-background));\n border: var(--button-primary-border, var(--border));\n border-radius: var(--button-primary-border-radius, 6px);\n font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n color: var(--button-primary-hover-color, var(--accent-foreground));\n fill: var(--button-primary-hover-color, var(--accent-foreground));\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-background, var(--background));\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n outline: var(--button-focus-outline, var(--outline));\n}\n\n\n.success__position {\n position: fixed;\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n z-index: var(--z-index);\n}\n.success__content {\n background: var(--success-background, var(--background));\n border: var(--success-border, var(--border));\n border-radius: var(--success-border-radius, 1.7em/50%);\n box-shadow: var(--success-box-shadow, var(--box-shadow));\n font-weight: var(--success-font-weight, 600);\n color: var(--success-color);\n fill: var(--success-color);\n padding: 12px 24px;\n line-height: 1.75em;\n\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success__icon {\n display: flex;\n}\n\n",e&&t.setAttribute("nonce",e),t}(e.styleNonce);let u="";const l={get el(){return a},appendToDom(){o.contains(c)||o.contains(a)||(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),xs.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),Be()?.emit("openFeedbackWidget"),u=xs.body.style.overflow,xs.body.style.overflow="hidden"},close(){p(!1),xs.body.style.overflow=u}},d=t?.createInput({h:Xs,hooks:qi,dialog:l,options:e}),p=t=>{!function(e,t){var n,r,o;Bs.__&&Bs.__(e,t),n=t.__k,r=[],o=[],hi(t,e=t.__k=Xs(Qs,null,[e]),n||qs,qs,void 0!==t.ownerSVGElement,n?null:t.firstChild?$s.call(t.childNodes):null,r,n?n.__e:t.firstChild,!1,o),e.__d=void 0,fi(r,e,o)}(Xs(Zi,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:s&&i?.[s.name]||"",defaultEmail:s&&i?.[s.email]||"",onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(t,n)=>{p(!1),e.onSubmitSuccess?.(t,n)},onSubmitError:t=>{e.onSubmitError?.(t)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:t}),a)};return l}});function ea(e){const t=xs.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`\n.editor {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.editor__image-container {\n justify-items: center;\n padding: 15px;\n position: relative;\n height: 100%;\n border-radius: var(--menu-border-radius, 6px);\n\n background-color: ${n};\n background-image: repeating-linear-gradient(\n -145deg,\n transparent,\n transparent 8px,\n ${n} 8px,\n ${n} 11px\n ),\n repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 15px,\n ${r} 15px,\n ${r} 16px\n );\n}\n\n.editor__canvas-container {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.editor__canvas-container > * {\n object-fit: contain;\n position: absolute;\n}\n\n.editor__tool-container {\n padding-top: 8px;\n display: flex;\n justify-content: center;\n}\n\n.editor__tool-bar {\n display: flex;\n gap: 8px;\n}\n\n.editor__tool {\n display: flex;\n padding: 8px 12px;\n justify-content: center;\n align-items: center;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n background: var(--button-background, var(--background));\n color: var(--button-color, var(--foreground));\n}\n\n.editor__tool--active {\n background: var(--button-primary-background, var(--accent-background));\n color: var(--button-primary-color, var(--accent-foreground));\n}\n\n.editor__rect {\n position: absolute;\n z-index: 2;\n}\n\n.editor__rect button {\n opacity: 0;\n position: absolute;\n top: -12px;\n right: -12px;\n cursor: pointer;\n padding: 0;\n z-index: 3;\n border: none;\n background: none;\n}\n\n.editor__rect:hover button {\n opacity: 1;\n}\n`,e&&t.setAttribute("nonce",e),t}function ta({hooks:e}){return function({onBeforeScreenshot:t,onScreenshot:n,onAfterScreenshot:r,onError:o}){const s=function(){const[t,n]=e.useState(Es.devicePixelRatio??1);return e.useEffect(()=>{const e=()=>{n(Es.devicePixelRatio)},t=matchMedia(`(resolution: ${Es.devicePixelRatio}dppx)`);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}},[]),t}();e.useEffect(()=>{(async()=>{t();const e=await Cs.mediaDevices.getDisplayMedia({video:{width:Es.innerWidth*s,height:Es.innerHeight*s},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),o=xs.createElement("video");await new Promise((t,r)=>{o.srcObject=e,o.onloadedmetadata=()=>{n(o,s),e.getTracks().forEach(e=>e.stop()),t()},o.play().catch(r)}),r()})().catch(o)},[])}}function na(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function ra(e,t){na(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function oa(e,t,n){na(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle="rgba(0, 0, 0, 0.25)",r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{!function(e,t,n){switch(e.type){case"highlight":t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break;case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h)}}(e,r,t)})})}function sa({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=ta({hooks:t}),i=function({h:e}){return function({action:t,setAction:n}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:"editor__tool "+("highlight"===t?"editor__tool--active":""),onClick:()=>{n("highlight"===t?"":"highlight")}},"Highlight"),e("button",{type:"button",class:"editor__tool "+("hide"===t?"editor__tool--active":""),onClick:()=>{n("hide"===t?"":"hide")}},"Hide")))}}({h:e}),a=function({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}({h:e}),c={__html:ea(o.styleNonce).innerText},u=r.el.style,l=({screenshot:r})=>{const[s,u]=t.useState("highlight"),[l,d]=t.useState([]),p=t.useRef(null),h=t.useRef(null),f=t.useRef(null),m=t.useRef(null),[g,_]=t.useState(1),y=t.useMemo(()=>{const e=xs.getElementById(o.id);if(!e)return"white";const t=getComputedStyle(e);return t.getPropertyValue("--button-primary-background")||t.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const e=()=>{const t=p.current;t&&(na(r.canvas,{alpha:!1},e=>{const n=Math.min(t.clientWidth/e.width,t.clientHeight/e.height);_(n)}),0!==t.clientHeight&&0!==t.clientWidth||setTimeout(e,0))};return e(),Es.addEventListener("resize",e),()=>{Es.removeEventListener("resize",e)}},[r]);const v=t.useCallback((e,t)=>{na(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{v(h.current,r.dpi),ra(h.current,r.canvas)},[r]),t.useEffect(()=>{v(f.current,r.dpi),na(f.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),oa(f.current,y,l)},[l,y]),t.useEffect(()=>{v(n,r.dpi),ra(n,r.canvas),na(xs.createElement("canvas"),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,oa(e,y,l),ra(n,e)})},[l,r,y]);const b=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{const n=[...t];return n.splice(e,1),n})},[]),S={width:r.canvas.width*g+"px",height:r.canvas.height*g+"px"},w=e=>{e.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:p},e("canvas",{ref:h,id:"background",style:S}),e("canvas",{ref:f,id:"foreground",style:S}),e("div",{ref:m,onMouseDown:e=>{if(!s||!m.current)return;const t=m.current.getBoundingClientRect(),n={type:s,x:e.offsetX/g,y:e.offsetY/g},r=(e,n)=>{const r=(n.clientX-t.x)/g,o=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,o),w:Math.abs(r-e.x),h:Math.abs(o-e.y)}},o=e=>{na(f.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),oa(f.current,y,[...l,r(n,e)])},i=e=>{const t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),xs.removeEventListener("mousemove",o),xs.removeEventListener("mouseup",i)};xs.addEventListener("mousemove",o),xs.addEventListener("mouseup",i)},style:S},l.map((t,n)=>e("div",{key:n,class:"editor__rect",style:{top:t.y*g+"px",left:t.x*g+"px",width:t.w*g+"px",height:t.h*g+"px"}},e("button",{"aria-label":"Remove",onClick:b(n),onMouseDown:w,onMouseUp:w,type:"button"},e(a,null))))))),e(i,{action:s,setAction:u}))};return function({onError:r}){const[o,i]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((e,t)=>{na(xs.createElement("canvas"),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),i({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(e=>{u.display="block",r(e)},[])}),o?e(l,{screenshot:o}):e("div",null)}}const ia=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=xs.createElement("canvas");return{input:sa({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const e=await new Promise(e=>{o.toBlob(e,"image/png")});if(e){return{data:new Uint8Array(await e.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}}),aa=t;let ca=0;function ua(){return ca>0}function la(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(se(e))return e}catch{return e}const n=function(...n){try{const r=n.map(e=>la(e,t));return e.apply(this,r)}catch(e){throw ca++,setTimeout(()=>{ca--}),$e(r=>{r.addEventProcessor(e=>(t.mechanism&&(pe(e,void 0),he(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),Jn(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}oe(n,e),re(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function da(){const e=J(),{referrer:t}=aa.document||{},{userAgent:n}=aa.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}const pa={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},ha=aa;async function fa(e,t){const r=pa[e],o=ha.Sentry=ha.Sentry||{};if(!r)throw new Error(`Cannot lazy load integration: ${e}`);const s=o[e];if("function"==typeof s&&!("_isShim"in s))return s;const i=function(e){const t=Be(),r=t?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${n}/${e}.min.js`,r).toString()}(r),a=aa.document.createElement("script");a.src=i,a.crossOrigin="anonymous",a.referrerPolicy="strict-origin",t&&a.setAttribute("nonce",t);const c=new Promise((e,t)=>{a.addEventListener("load",()=>e()),a.addEventListener("error",t)}),u=aa.document.currentScript,l=aa.document.body||aa.document.head||u?.parentElement;if(!l)throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);l.appendChild(a);try{await c}catch{throw new Error(`Error when loading integration: ${e}`)}const d=o[e];if("function"!=typeof d)throw new Error(`Could not load integration: ${e}`);return d}const ma=Fs({lazyLoadIntegration:fa}),ga=Fs({getModalIntegration:()=>Qi,getScreenshotIntegration:()=>ia});function _a(e,t,n,r){Tr({level:e,message:t,attributes:n,severityNumber:r})}var ya=Object.freeze({__proto__:null,debug:function(e,t){_a("debug",e,t)},error:function(e,t){_a("error",e,t)},fatal:function(e,t){_a("fatal",e,t)},fmt:Yr,info:function(e,t){_a("info",e,t)},trace:function(e,t){_a("trace",e,t)},warn:function(e,t){_a("warn",e,t)}});function va(e,t){const n=wa(e,t),r={type:xa(t),value:Ca(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ba(e,t,n,r){const o=Be(),s=o?.getOptions().normalizeDepth,i=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),a={__serialized__:Yt(t,s)};if(i)return{exception:{values:[va(e,i)]},extra:a};const c={exception:{values:[{type:j(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Oa(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=wa(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Sa(e,t){return{exception:{values:[va(e,t)]}}}function wa(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&ka.test(e.message))return 1;return 0}(t),o=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,o)}catch{}return[]}const ka=/Minified React error #\d+;/i;function Ea(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function xa(e){const t=e?.name;if(!t&&Ea(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function Ca(e){const t=e?.message;return Ea(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Ia(e,t,n,r){const o=Ma(e,t,n?.syntheticException||void 0,r);return he(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Nn(o)}function Ta(e,t,n="info",r,o){const s=Ra(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Nn(s)}function Ma(e,t,n,r,o){let s;if(N(t)&&t.error){return Sa(e,t.error)}if(P(t)||D(t,"DOMException")){const o=t;if("stack"in t)s=Sa(e,t);else{const t=o.name||(P(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Ra(e,i,n,r),pe(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}if(L(t))return Sa(e,t);if(U(t)||j(t)){return s=ba(e,t,n,o),he(s,{synthetic:!0}),s}return s=Ra(e,t,n,r),pe(s,`${t}`),he(s,{synthetic:!0}),s}function Ra(e,t,n,r){const o={};if(r&&n){const r=wa(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),he(o,{synthetic:!0})}if($(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Oa(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(ie(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return X(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:X(r,t)}return""}(e),r=t?"promise rejection":"exception";if(N(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(j(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class Aa extends wr{constructor(e){const t=(r=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:aa.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;!function(e,t,r=[t],o="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:r.map(e=>({name:`${o}:@sentry/${e}`,version:n})),version:n}),e._metadata=s}(t,"browser",["browser"],aa.SENTRY_SDK_SOURCE||"npm"),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?"auto":"never",...t._metadata.sdk.settings}),super(t);const{sendDefaultPii:o,sendClientReports:s,enableLogs:i}=this._options;aa.document&&(s||i)&&aa.document.addEventListener("visibilitychange",()=>{"hidden"===aa.document.visibilityState&&(s&&this._flushOutcomes(),i&&Mr(this))}),i&&(this.on("flush",()=>{Mr(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Mr(this)},5e3)})),o&&this.on("beforeSendSession",Xr)}eventFromException(e,t){return Ia(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return Ta(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const La="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Da=t,Na=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Pa=(e=!0)=>{const t=Da.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Fa=()=>{const e=Pa();return e?.activationStart??0},$a=(e,t=-1)=>{const n=Pa();let r="navigate";n&&(Da.document?.prerendering||Fa()>0?r="prerender":Da.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Ba=new WeakMap;function Ua(e,t){return Ba.get(e)||Ba.set(e,new t),Ba.get(e)}class ja{constructor(){ja.prototype.__init.call(this),ja.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const Ha=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},za=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Wa=-1;const qa=e=>{"hidden"===Da.document.visibilityState&&Wa>-1&&(Wa="visibilitychange"===e.type?e.timeStamp:0,Va())},Va=()=>{removeEventListener("visibilitychange",qa,!0),removeEventListener("prerenderingchange",qa,!0)},Ga=()=>{if(Da.document&&Wa<0){const e=Fa(),t=Da.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Wa=t??("hidden"!==Da.document?.visibilityState||Da.document?.prerendering?1/0:0),addEventListener("visibilitychange",qa,!0),addEventListener("prerenderingchange",qa,!0)}return{get firstHiddenTime(){return Wa}}},Ka=e=>{Da.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Ja=[1800,3e3],Ya=[.1,.25],Xa=(e,t={})=>{((e,t={})=>{Ka(()=>{const n=Ga(),r=$a("FCP");let o;const s=Ha("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Fa(),0),r.entries.push(t),o(!0)))});s&&(o=Na(e,r,Ja,t.reportAllChanges))})})(za(()=>{const n=$a("CLS",0);let r;const o=Ua(t,ja),s=e=>{for(const t of e)o._processEntry(t);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},i=Ha("layout-shift",s);i&&(r=Na(e,n,Ya,t.reportAllChanges),Da.document?.addEventListener("visibilitychange",()=>{"hidden"===Da.document?.visibilityState&&(s(i.takeRecords()),r(!0))}),Da?.setTimeout?.(r))}))};let Za=0,Qa=1/0,ec=0;const tc=e=>{e.forEach(e=>{e.interactionId&&(Qa=Math.min(Qa,e.interactionId),ec=Math.max(ec,e.interactionId),Za=ec?(ec-Qa)/7+1:0)})};let nc;const rc=()=>nc?Za:performance.interactionCount||0,oc=()=>{"interactionCount"in performance||nc||(nc=Ha("event",tc,{type:"event",buffered:!0,durationThreshold:0}))};let sc=0;class ic{constructor(){ic.prototype.__init.call(this),ic.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){sc=rc(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((rc()-sc)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<10||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}}const ac=e=>{const t=t=>{"pagehide"!==t.type&&"hidden"!==Da.document?.visibilityState||e(t)};Da.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},cc=e=>{const t=Da.requestIdleCallback||Da.setTimeout;"hidden"===Da.document?.visibilityState?e():(t(e=za(e)),ac(e))},uc=[200,500];class lc{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const dc=[2500,4e3],pc=[800,1800],hc=e=>{Da.document?.prerendering?Ka(()=>hc(e)):"complete"!==Da.document?.readyState?addEventListener("load",()=>hc(e),!0):setTimeout(e)},fc={},mc={};let gc,_c,yc,vc;function bc(e,t=!1){return Mc("cls",e,xc,gc,t)}function Sc(e,t=!1){return Mc("lcp",e,Cc,_c,t)}function wc(e){return Mc("inp",e,Tc,vc)}function kc(e,t){return Rc(e,t),mc[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);Ha(e,t=>{Ec(e,{entries:t})},t)}(e),mc[e]=!0),Oc(e,t)}function Ec(e,t){const n=fc[e];if(n?.length)for(const r of n)try{r(t)}catch(t){La&&p.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${v(r)}\nError:`,t)}}function xc(){return Xa(e=>{Ec("cls",{metric:e}),gc=e},{reportAllChanges:!0})}function Cc(){return((e,t={})=>{Ka(()=>{const n=Ga(),r=$a("LCP");let o;const s=Ua(t,lc),i=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Fa(),0),r.entries=[t],o())},a=Ha("largest-contentful-paint",i);if(a){o=Na(e,r,dc,t.reportAllChanges);const n=za(()=>{i(a.takeRecords()),a.disconnect(),o(!0)});for(const e of["keydown","click","visibilitychange"])Da.document&&addEventListener(e,()=>cc(n),{capture:!0,once:!0})}})})(e=>{Ec("lcp",{metric:e}),_c=e},{reportAllChanges:!0})}function Ic(){return((e,t={})=>{const n=$a("TTFB"),r=Na(e,n,pc,t.reportAllChanges);hc(()=>{const e=Pa();e&&(n.value=Math.max(e.responseStart-Fa(),0),n.entries=[e],r(!0))})})(e=>{Ec("ttfb",{metric:e}),yc=e})}function Tc(){return((e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Ka(()=>{oc();const n=$a("INP");let r;const o=Ua(t,ic),s=e=>{cc(()=>{for(const t of e)o._processEntry(t);const t=o._estimateP98LongestInteraction();t&&t._latency!==n.value&&(n.value=t._latency,n.entries=t.entries,r())})},i=Ha("event",s,{durationThreshold:t.durationThreshold??40});r=Na(e,n,uc,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),ac(()=>{s(i.takeRecords()),r(!0)}))})})(e=>{Ec("inp",{metric:e}),vc=e})}function Mc(e,t,n,r,o=!1){let s;return Rc(e,t),mc[e]||(s=n(),mc[e]=!0),r&&t({metric:r}),Oc(e,t,o?s:void 0)}function Rc(e,t){fc[e]=fc[e]||[],fc[e].push(t)}function Oc(e,t,n){return()=>{n&&n();const r=fc[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function Ac(e){return"number"==typeof e&&isFinite(e)}function Lc(e,t,n,{...r}){const o=Mt(e).start_timestamp;return o&&o>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),En(e,()=>{const e=kn({startTime:t,...r});return e&&e.end(n),e})}function Dc(e){const t=Be();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),u=t.getIntegrationByName("Replay"),l=u?.getReplayId(),d=Ne(),p=d.getUser(),h=void 0!==p?p.email||p.id||p.ip_address:void 0;let f;try{f=d.getScopeData().contexts.profile.profile_id}catch{}return kn({name:n,attributes:{release:i,environment:a,user:h||void 0,profile_id:f||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":Da.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o},startTime:s,experimental:{standalone:!0}})}function Nc(){return Da.addEventListener&&Da.performance}function Pc(e){return e/1e3}function Fc(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function $c(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Bc(e,t){let n,r=!1;function o(e){!r&&n&&t(e,n),r=!0}ac(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(e,t)=>{t?.isRedirect||(o("navigation"),Uc(s,i))}),i=e.on("afterStartPageLoadSpan",e=>{n=e.spanContext().spanId,Uc(i)})}function Uc(...e){e.forEach(e=>e&&setTimeout(e,0))}function jc(e){let t,n=0;if(!$c("layout-shift"))return;const r=bc(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Bc(e,(e,o)=>{!function(e,t,n,r){La&&p.log(`Sending CLS span (${e})`);const o=Pc((ve()||0)+(t?.startTime||0)),s=Ne().getScopeData().transactionName,i=t?G(t.sources[0]?.node):"Layout shift",a={[qe]:"auto.http.browser.cls",[We]:"ui.webvital.cls",[Xe]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{a[`cls.source.${t+1}`]=G(e.node)});const c=Dc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[Ge]:"",[Ke]:e}),c.end(o))}(n,t,o,e),r()})}function Hc(e){let t,n=0;if(!$c("largest-contentful-paint"))return;const r=Sc(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Bc(e,(e,o)=>{!function(e,t,n,r){La&&p.log(`Sending LCP span (${e})`);const o=Pc((ve()||0)+(t?.startTime||0)),s=Ne().getScopeData().transactionName,i=t?G(t.element):"Largest contentful paint",a={[qe]:"auto.http.browser.lcp",[We]:"ui.webvital.lcp",[Xe]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=G(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),null!=t.loadTime&&(a["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(a["lcp.renderTime"]=t.renderTime),null!=t.size&&(a["lcp.size"]=t.size));const c=Dc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Ge]:"millisecond",[Ke]:e}),c.end(o))}(n,t,o,e),r()})}let zc,Wc,qc=0,Vc={};function Gc({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Nc();if(r&&ve()){r.mark&&Da.performance.mark("sentry-tracing-init");const o=t?Hc(n):Sc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Vc.lcp={value:e.value,unit:"millisecond"},zc=t)},!0),s=Mc("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(Vc.ttfb={value:e.value,unit:"millisecond"})},Ic,yc),i=e?jc(n):bc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Vc.cls={value:e.value,unit:""},Wc=t)},!0);return()=>{o?.(),s(),i?.()}}return()=>{}}function Kc(e,t){const n=Nc(),r=ve();if(!n?.getEntries||!r)return;const o=Pc(r),s=n.getEntries(),{op:i,start_timestamp:a}=Mt(e);s.slice(qc).forEach(n=>{const r=Pc(n.startTime),s=Pc(Math.max(0,n.duration));if(!("navigation"===i&&a&&o+r<a))switch(n.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Jc(e,t,r,n)}),Jc(e,t,"secureConnection",n,"TLS/SSL"),Jc(e,t,"fetch",n,"cache"),Jc(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+Pc(t.requestStart),o=n+Pc(t.responseEnd),s=n+Pc(t.responseStart);t.responseEnd&&(Lc(e,r,o,{op:"browser.request",name:t.name,attributes:{[qe]:"auto.ui.browser.metrics"}}),Lc(e,s,o,{op:"browser.response",name:t.name,attributes:{[qe]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,n,o);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o,s){if(["mark","measure"].includes(t.entryType)&&te(t.name,s))return;const i=Pa(!1),a=Pc(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,l=u+r,d={[qe]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c);(function(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&B(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(B(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}})(d,t),c<=l&&Lc(e,c,l,{name:t.name,op:t.entryType,attributes:d})}(e,n,r,s,o,t.ignorePerformanceApiSpans);const i=Ga(),a=n.startTime<i.firstHiddenTime;"first-paint"===n.name&&a&&(Vc.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&a&&(Vc.fcp={value:n.startTime,unit:"millisecond"});break}case"resource":!function(e,t,n,r,o,s,i){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c=qr(n),u={[qe]:"auto.resource.browser.metrics"};Yc(u,t,"transferSize","http.response_transfer_size"),Yc(u,t,"encodedBodySize","http.response_content_length"),Yc(u,t,"decodedBodySize","http.decoded_response_content_length");const l=t.deliveryType;null!=l&&(u["http.response_delivery_type"]=l);const d=t.renderBlockingStatus;d&&(u["resource.render_blocking_status"]=d);c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop());c.host&&(u["server.address"]=c.host);if(u["url.same_origin"]=n.includes(Da.location.origin),null!=t.nextHopProtocol){const{name:e,version:n}=Fc(t.nextHopProtocol);u["network.protocol.name"]=e,u["network.protocol.version"]=n}const p=s+r,h=p+o;Lc(e,p,h,{name:n.replace(Da.location.origin,""),op:a,attributes:u})}(e,n,n.name,r,s,o,t.ignoreResourceSpans)}}),qc=Math.max(s.length-1,0),function(e){const t=Da.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Ac(n.rtt)&&(Vc["connection.rtt"]={value:n.rtt,unit:"millisecond"}));Ac(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`);Ac(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===i&&(function(e){const t=Pa(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(Vc),t.recordClsOnPageloadSpan||delete Vc.cls,t.recordLcpOnPageloadSpan||delete Vc.lcp,Object.entries(Vc).forEach(([e,t])=>{mn(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Fa()),function(e,t){zc&&t.recordLcpOnPageloadSpan&&(zc.element&&e.setAttribute("lcp.element",G(zc.element)),zc.id&&e.setAttribute("lcp.id",zc.id),zc.url&&e.setAttribute("lcp.url",zc.url.trim().slice(0,200)),null!=zc.loadTime&&e.setAttribute("lcp.loadTime",zc.loadTime),null!=zc.renderTime&&e.setAttribute("lcp.renderTime",zc.renderTime),e.setAttribute("lcp.size",zc.size));Wc?.sources&&t.recordClsOnPageloadSpan&&Wc.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,G(t.node)))}(e,t)),zc=void 0,Wc=void 0,Vc={}}function Jc(e,t,n,r,o=n){const s=function(e){if("secureConnection"===e)return"connectEnd";if("fetch"===e)return"domainLookupStart";return`${e}End`}(n),i=t[s],a=t[`${n}Start`];a&&i&&Lc(e,r+Pc(a),r+Pc(i),{op:`browser.${o}`,name:t.name,attributes:{[qe]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}function Yc(e,t,n,r){const o=t[n];null!=o&&o<2147483647&&(e[r]=o)}const Xc=({entries:e})=>{const t=Ft(),n=t?Pt(t):void 0,r=n?Mt(n).description:Ne().getScopeData().transactionName;e.forEach(e=>{const t=e;if(!t.identifier)return;const n=t.name,o=t.renderTime,s=t.loadTime,[i,a]=s?[Pc(s),"load-time"]:o?[Pc(o),"render-time"]:[ye(),"entry-emission"],c="image-paint"===n?Pc(Math.max(0,(o??0)-(s??0))):0,u={[qe]:"auto.ui.browser.elementtiming",[We]:"ui.elementtiming",[je]:"component","sentry.span_start_time_source":a,"sentry.transaction_name":r,"element.id":t.id,"element.type":t.element?.tagName?.toLowerCase()||"unknown","element.size":t.naturalWidth&&t.naturalHeight?`${t.naturalWidth}x${t.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":s,"element.url":t.url||void 0,"element.identifier":t.identifier,"element.paint_type":n};wn({name:`element[${t.identifier}]`,attributes:u,startTime:i,onlyIfParent:!0},e=>{e.end(i+c)})})};let Zc,Qc,eu,tu;function nu(e){k("dom",e),E("dom",ru)}function ru(){if(!Da.document)return;const e=x.bind(null,"dom"),t=ou(e,!0);Da.document.addEventListener("click",t,!1),Da.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Da,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ne(r,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=ou(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch{}return t.call(this,n,r,o)}}),ne(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function ou(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;re(n,"_sentryCaptured",!0),r&&!r._sentryId&&re(r,"_sentryId",ue());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==Qc)return!1;try{if(!e.target||e.target._sentryId!==eu)return!1}catch{}return!0}(n)){e({event:n,name:o,global:t}),Qc=n.type,eu=r?r._sentryId:void 0}clearTimeout(Zc),Zc=Da.setTimeout(()=>{eu=void 0,Qc=void 0},1e3)}}function su(e){const t="history";k(t,e),E(t,iu)}function iu(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=tu,o=function(e){try{return new URL(e,Da.location.origin).toString()}catch{return e}}(String(n));if(tu=o,r===o)return e.apply(this,t);x("history",{from:r,to:o})}return e.apply(this,t)}}Da.addEventListener("popstate",()=>{const e=Da.location.href,t=tu;if(tu=e,t===e)return;x("history",{from:t,to:e})}),"history"in hs&&hs.history&&(ne(Da.history,"pushState",e),ne(Da.history,"replaceState",e))}const au={};function cu(e){const t=au[e];if(t)return t;let n=Da[e];if(fs(n))return au[e]=n.bind(Da);const r=Da.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){La&&p.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?au[e]=n.bind(Da):n}function uu(e){au[e]=void 0}function lu(...e){return cu("setTimeout")(...e)}const du="__sentry_xhr_v3__";function pu(e){k("xhr",e),E("xhr",hu)}function hu(){if(!Da.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*ye(),s=F(n[0])?n[0].toUpperCase():void 0,i=function(e){if(F(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!s||!i)return e.apply(t,n);t[du]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[du];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}x("xhr",{endTimestamp:1e3*ye(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,s=t[du];return s&&F(r)&&F(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[du];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return x("xhr",{startTimestamp:1e3*ye(),xhr:t}),e.apply(t,n)}})}function fu(e){return new URLSearchParams(e).toString()}function mu(e,t=p){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[fu(e)];if(!e)return[void 0]}catch(n){return La&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return La&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function gu(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}const _u=[],yu=new Map;function vu(){if(Nc()&&ve()){const e=wc(Su);return()=>{e()}}return()=>{}}const bu={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};const Su=({metric:e})=>{if(null==e.value)return;const t=Pc(e.value);if(t>60)return;const n=e.entries.find(t=>t.duration===e.value&&bu[t.name]);if(!n)return;const{interactionId:r}=n,o=bu[n.name],s=Pc(ve()+n.startTime),i=Ft(),a=i?Pt(i):void 0,c=(null!=r?yu.get(r):void 0)||a,u=c?Mt(c).description:Ne().getScopeData().transactionName,l=Dc({name:G(n.target),transaction:u,attributes:{[qe]:"auto.http.browser.inp",[We]:`ui.interaction.${o}`,[Xe]:n.duration},startTime:s});l&&(l.addEvent("inp",{[Ge]:"millisecond",[Ke]:e.value}),l.end(s+t))};function wu(e,t=cu("fetch")){let n=0,r=0;return $r(e,function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return uu("fetch"),Pn("No fetch implementation available");try{return t(e.url,i).then(e=>(n-=s,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return uu("fetch"),n-=s,r--,Pn(e)}})}function ku(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?h:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Eu=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,xu=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Cu=/\((\S*)(?::(\d+))(?::(\d+))\)/,Iu=/at (.+?) ?\(data:(.+?),/,Tu=[30,e=>{const t=e.match(Iu);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Eu.exec(e);if(n){const[,e,t,r]=n;return ku(e,h,+t,+r)}const r=xu.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){const e=Cu.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Uu(r[1]||h,r[2]);return ku(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Mu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ru=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ou=[50,e=>{const t=Mu.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ru.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||h;return[n,e]=Uu(n,e),ku(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Au=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Lu=[40,e=>{const t=Au.exec(e);return t?ku(t[2],t[1]||h,+t[3],t[4]?+t[4]:void 0):void 0}],Du=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Nu=[10,e=>{const t=Du.exec(e);return t?ku(t[2],t[3]||h,+t[1]):void 0}],Pu=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Fu=[20,e=>{const t=Pu.exec(e);return t?ku(t[5],t[3]||t[4]||h,+t[1],+t[2]):void 0}],$u=[Tu,Ou],Bu=g(...$u),Uu=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:h,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};const ju="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Hu=1024,zu=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&bo(function(e){return function(t){if(Be()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:wo(t.level),message:Q(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Q(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}eo(n,{input:t.args,level:t.level})}}(e)),t.dom&&nu(function(e,t){return function(n){if(Be()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>Hu&&(ju&&p.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Hu),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=G(t,{keyAttrs:s,maxStringLength:i}),o=Y(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),eo(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&pu(function(e){return function(t){if(Be()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[du];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,u={method:s,url:i,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:ps(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),eo(d,l)}}(e)),t.fetch&&gs(function(e){return function(t){if(Be()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){const o=t.fetchData,s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},i={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,s),eo(i,s)}else{const o=t.response,s={...t.fetchData,status_code:o?.status};t.fetchData.request_body_size,t.fetchData.response_body_size;const i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:ps(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),eo(a,i)}}}(e)),t.history&&su(function(e){return function(t){if(Be()!==e)return;let n=t.from,r=t.to;const o=qr(aa.location.href);let s=n?qr(n):void 0;const i=qr(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),eo({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Be()===e&&eo({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:de(t)},{event:t})}}(e))}}};const Wu=["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"],qu=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&ne(aa,"setTimeout",Vu),t.setInterval&&ne(aa,"setInterval",Vu),t.requestAnimationFrame&&ne(aa,"requestAnimationFrame",Gu),t.XMLHttpRequest&&"XMLHttpRequest"in aa&&ne(XMLHttpRequest.prototype,"send",Ku);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Wu).forEach(e=>function(e,t){const n=aa,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;ne(r,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=la(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:v(o),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,la(o,{mechanism:{data:{function:"addEventListener",handler:v(o),target:e},handled:!1,type:"instrument"}}),s])}}),ne(r,"removeEventListener",function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function Vu(e){return function(...t){const n=t[0];return t[0]=la(n,{mechanism:{data:{function:v(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Gu(e){return function(t){return e.apply(this,[la(t,{mechanism:{data:{function:"requestAnimationFrame",handler:v(e)},handled:!1,type:"instrument"}})])}}function Ku(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&ne(n,e,function(t){const n={mechanism:{data:{function:e,handler:v(t)},handled:!1,type:"instrument"}},r=se(t);return r&&(n.mechanism.data.handler=v(r)),la(t,n)})}),e.apply(this,t)}}const Ju=()=>({name:"BrowserSession",setupOnce(){void 0!==aa.document?(nr({ignoreDuration:!0}),sr(),su(({from:e,to:t})=>{void 0!==e&&e!==t&&(nr({ignoreDuration:!0}),sr())})):ju&&p.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),Yu=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){I(t=>{const{stackParser:n,attachStacktrace:r}=Zu();if(Be()!==e||ua())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=function(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,l=n,d=function(e){if(!F(e)||0===e.length)return;if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/);return`<data:${t?t[1]:"text/javascript"}${e.includes("base64,")?",base64":""}>`}return e.slice(0,1024)}(t)??J();0===c.length&&c.push({colno:u,filename:d,function:h,in_app:!0,lineno:l});return e}(Ma(n,c||o,void 0,r,!1),s,i,a);u.level="error",Xn(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Xu("onerror")),t.onunhandledrejection&&(!function(e){R(t=>{const{stackParser:n,attachStacktrace:r}=Zu();if(Be()!==e||ua())return;const o=function(e){if(B(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),s=B(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Ma(n,o,void 0,r,!0);s.level="error",Xn(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Xu("onunhandledrejection"))}}};function Xu(e){ju&&p.log(`Global Handler attached: ${e}`)}function Zu(){const e=Be();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Qu=()=>({name:"HttpContext",preprocessEvent(e){if(!aa.navigator&&!aa.location&&!aa.document)return;const t=da(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),el=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){uo(va,o.getOptions().stackParser,n,t,e,r)}}};function tl(){return!!function(){if(void 0===aa.window)return!1;const e=aa;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=J(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(aa===aa.top&&r.some(e=>n.startsWith(`${e}://`)))}()&&(ju&&c(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function nl(e){return[io(),ro(),qu(),zu(),Yu(),el(),Eo(),Qu(),Ju()]}function rl(t={}){const n=!t.skipBrowserExtensionCheck&&tl(),r={...t,enabled:!n&&t.enabled,stackParser:(o=t.stackParser||Bu,Array.isArray(o)?g(...o):o),integrations:ur({integrations:t.integrations,defaultIntegrations:null==t.defaultIntegrations?nl():t.defaultIntegrations}),transport:t.transport||wu};var o;return function(t,n){!0===n.debug&&(e?p.enable():c(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ne().update(n.initialScope);const r=new t(n);return Ar(r),r.init(),r}(Aa,r)}const ol=t,sl=new WeakMap,il=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(e){if(sl.has(Be()))for(const t of e)$e(e=>{e.setExtra("url",t.url);const n=`ReportingObserver [${t.type}]`;let r="No details available";if(t.body){const n={};for(const e in t.body)n[e]=t.body[e];if(e.setExtra("body",n),"crash"===t.type){const e=t.body;r=[e.crashId||"",e.reason||""].join(" ").trim()||r}else{r=t.body.message||r}}Yn(`${n}: ${r}`)})}return{name:"ReportingObserver",setupOnce(){if(!("ReportingObserver"in hs))return;new ol.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){sl.set(e,!0)}}},al=(e={})=>{const n={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:"HttpClient",setup(e){!function(e,t){if(!ms())return;gs(n=>{if(Be()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&function(e,t,n,r,o){if(dl(e,n.status,n.url)){const e=function(e,t){if(!t&&e instanceof Request)return e;if(e instanceof Request&&e.bodyUsed)return e;return new Request(e,t)}(t,r);let s,i,a,c;hl()&&([s,a]=cl("Cookie",e),[i,c]=cl("Set-Cookie",n));Xn(pl({url:e.url,method:e.method,status:n.status,requestHeaders:s,responseHeaders:i,requestCookies:a,responseCookies:c,error:o}))}}(t,a,r,c,s||i)},!1)}(e,n),function(e,n){if(!("XMLHttpRequest"in t))return;pu(t=>{if(Be()!==e)return;const{error:r,virtualError:o}=t,s=t.xhr,i=s[du];if(!i)return;const{method:a,request_headers:c}=i;try{!function(e,t,n,r,o){if(dl(e,t.status,t.responseURL)){let e,s,i;if(hl()){try{const e=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;e&&(s=ll(e))}catch{}try{i=function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return n&&r&&(e[n]=r),e},{})}(t)}catch{}e=r}Xn(pl({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:i,responseCookies:s,error:o}))}}(n,s,a,c,r||o)}catch(e){ju&&p.warn("Error while extracting response event form XHR response",e)}})}(e,n)}}};function cl(e,t){const n=function(e){const t={};return e.forEach((e,n)=>{t[n]=e}),t}(t.headers);let r;try{const t=n[e]||n[e.toLowerCase()]||void 0;t&&(r=ll(t))}catch{}return[n,r]}function ul(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function ll(e){return e.split("; ").reduce((e,t)=>{const[n,r]=t.split("=");return n&&r&&(e[n]=r),e},{})}function dl(e,t,n){return function(e,t){return e.some(e=>"number"==typeof e?e===t:t>=e[0]&&t<=e[1])}(e.failedRequestStatusCodes,t)&&(r=e.failedRequestTargets,o=n,r.some(e=>"string"==typeof e?o.includes(e):e.test(o)))&&!Gr(n,Be());var r,o}function pl(e){const t=Be(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:ul(e.responseHeaders)}}};return he(s,{type:"http.client",handled:!1}),s}function hl(){const e=Be();return!!e&&Boolean(e.getOptions().sendDefaultPii)}const fl=t,ml=(e={})=>{const t=null!=e.frameContextLines?e.frameContextLines:7;return{name:"ContextLines",processEvent:e=>function(e,t){const n=fl.document,r=fl.location&&Vr(fl.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["<!DOCTYPE html>","<html>",...s.split("\n"),"</html>"];return o.forEach(e=>{const n=e.stacktrace;n?.frames&&(n.frames=n.frames.map(e=>function(e,t,n,r){if(e.filename!==n||!e.lineno||!t.length)return e;return function(e,t,n=5){if(void 0===t.lineno)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(e=>Z(e,0));const s=Math.min(r-1,o);t.context_line=Z(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(e=>Z(e,0))}(t,e,r),e}(e,i,r,t)))}),e}(e,t)}};function gl(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=function(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);if(o)return{operationType:o[1],operationName:void 0};return{operationType:void 0,operationName:void 0}}(t);return r?`${o} ${r}`:`${o}`}function _l(e){let t;if("xhr"in e){const n=e.xhr[du];t=n&&mu(n.body)[0]}else{t=mu(gu(e.input))[0]}return t}function yl(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const vl=e=>({name:"GraphQLClient",setup(t){!function(e,t){e.on("beforeOutgoingRequestSpan",(e,n)=>{const r=Mt(e).data||{};if(!("http.client"===r[We]))return;const o=r[Qe]||r["http.url"],s=r[Ze]||r["http.method"];if(!F(o)||!F(s))return;const{endpoints:i}=t,a=te(o,i),c=_l(n);if(a&&c){const t=yl(c);if(t){const n=gl(t);e.updateName(`${s} ${o} (${n})`),e.setAttribute("graphql.document",c)}}})}(t,e),function(e,t){e.on("beforeOutgoingRequestBreadcrumb",(e,n)=>{const{category:r,type:o,data:s}=e;if("http"===o&&("fetch"===r||"xhr"===r)){const e=s?.url,{endpoints:r}=t,o=te(e,r),i=_l(n);if(o&&s&&i){const e=yl(i);if(!s.graphql&&e){const t=gl(e);s["graphql.document"]=e.query,s["graphql.operation"]=t}}}})}(t,e)}}),bl=t,Sl="sentryReplaySession",wl="Unable to send Replay",kl=15e4,El=5e3,xl=2e7,Cl=36e5;var Il=Object.defineProperty,Tl=(e,t,n)=>((e,t,n)=>t in e?Il(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Ml=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ml||{});function Rl(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}function Ol(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Al(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,Ll).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function Ll(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=Al(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),n&&(t=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(t)),n||r)return t}return t||e.cssText}let Dl=class{constructor(){Tl(this,"idNodeMap",new Map),Tl(this,"nodeMetaMap",new WeakMap)}getId(e){if(!e)return-1;const t=this.getMeta(e)?.id;return t??-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 t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Nl({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function Pl({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Fl(e){return e.toLowerCase()}function $l(e){return e.toUpperCase()}const Bl="__rrweb_original__";function Ul(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Fl(t):null}function jl(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Hl(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(e){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return r?.[1]??null}const zl={};function Wl(e){const t=zl[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return zl[e]=r.bind(window)}function ql(...e){return Wl("setTimeout")(...e)}function Vl(...e){return Wl("clearTimeout")(...e)}function Gl(e){try{return e.contentDocument}catch(e){}}let Kl=1;const Jl=new RegExp("[^a-z0-9-_:]");function Yl(){return Kl++}let Xl,Zl;const Ql=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ed=/^(?:[a-z+]+:)?\/\//i,td=/^www\..*/i,nd=/^(data:)([^,]*),(.*)/i;function rd(e,t){return(e||"").replace(Ql,(e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(ed.test(a)||td.test(a))return`url(${c}${a}${c})`;if(nd.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const u=t.split("/"),l=a.split("/");u.pop();for(const e of l)"."!==e&&(".."===e?u.pop():u.push(e));return`url(${c}${u.join("/")}${c})`})}const od=/^[^ \t\n\r\u000c]+/,sd=/^[, \t\n\r\u000c]+/;const id=new WeakMap;function ad(e,t){return t&&""!==t.trim()?ud(e,t):t}function cd(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function ud(e,t){let n=id.get(e);if(n||(n=e.createElement("a"),id.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function ld(e,t,n,r,o,s){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?ad(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(sd),!(n>=t.length);){let s=r(od);if(","===s.slice(-1))s=ad(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=ad(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?rd(r,ud(e)):"object"===t&&"data"===n?ad(e,r):"function"==typeof s?s(n,r,o):r:ad(e,r):r}function dd(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function pd(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:pd(e.parentNode,t,n,r+1):-1}function hd(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function fd(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(s){if(c=pd(i,hd(r,o)),c<0)return!0;a=pd(i,hd(t,n),c>=0?c:1/0)}else{if(a=pd(i,hd(t,n)),a<0)return!1;c=pd(i,hd(r,o),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!s}catch(e){}return!!s}function md(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:g,dataURLOptions:_={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,w=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Ml.Document,childNodes:[],compatMode:e.compatMode}:{type:Ml.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ml.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m,maskTextClass:g,unmaskTextClass:_,maskTextSelector:y,unmaskTextSelector:v}=t,b=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,s),S=function(e){if(e instanceof HTMLFormElement)return"form";const t=Fl(e.tagName);return Jl.test(t)?"div":t}(e);let w={};const k=e.attributes.length;for(let t=0;t<k;t++){const r=e.attributes[t];r.name&&!dd(S,r.name,r.value)&&(w[r.name]=ld(n,S,Fl(r.name),r.value,e,c))}if("link"===S&&i){const t=Array.from(n.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=Al(t)),r&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=rd(r,t.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=Al(e.sheet);t&&(w._cssText=rd(t,ud(n)))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const t=e,n=Ul(t),r=jl(t,$l(S),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=fd(t,g,y,_,v,Nl({type:n,tagName:$l(S),maskInputOptions:a}));w.value=Pl({isMasked:e,element:t,value:r,maskInputFn:u})}o&&(w.checked=o)}"option"===S&&(e.selected&&!a.select?w.selected=!0:delete w.selected);if("canvas"===S&&p)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const o=t.getImageData,s=Bl in o?o[Bl]:o;if(new Uint32Array(s.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(w.rr_dataURL=t)}if("img"===S&&d){Xl||(Xl=n.createElement("canvas"),Zl=Xl.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{Xl.width=t.naturalWidth,Xl.height=t.naturalHeight,Zl.drawImage(t,0,0),w.rr_dataURL=Xl.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?w.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}"audio"!==S&&"video"!==S||(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime);f||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop));if(b){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==S||h(w.src)||(b||Gl(e)||(w.rr_src=w.src),delete w.src);let E;try{customElements.get(S)&&(E=!0)}catch(e){}return{type:Ml.Element,tagName:S,attributes:w,childNodes:[],isSVG:cd(e)||void 0,needBlock:b,rootId:m,isCustom:E}}(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:f,maskInputFn:g,dataURLOptions:_,inlineImages:y,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:w,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,f="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=Al(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=rd(p,ud(t.doc))}f&&(p="SCRIPT_PLACEHOLDER");const g=fd(e,r,s,o,i,n);h||f||m||!p||!g||(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*"));m&&p&&(c.textarea||g)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*"));if("OPTION"===d&&p){p=Pl({isMasked:fd(e,r,s,o,i,Nl({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:u})}return{type:Ml.Text,textContent:p||"",isStyle:h,rootId:l}}(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:f,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:Ml.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:Ml.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function gd(e){return null==e?"":e.toLowerCase()}function _d(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E=5e3,onBlockedImageLoad:x,onStylesheetLoad:C,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:M=!1}=t;let{preserveWhiteSpace:R=!0}=t;const O=md(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:T,newlyAddedElement:M});if(!O)return console.warn(e,"not serialized"),null;let A;A=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===Ml.Comment)return!0;if(e.type===Ml.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Hl(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(gd(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===gd(e.attributes.name)||"icon"===gd(e.attributes.rel)||"apple-touch-icon"===gd(e.attributes.rel)||"shortcut icon"===gd(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&gd(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(gd(e.attributes.property).match(/^(og|twitter|fb):/)||gd(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===gd(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===gd(e.attributes.name)||"googlebot"===gd(e.attributes.name)||"bingbot"===gd(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===gd(e.attributes.name)||"generator"===gd(e.attributes.name)||"framework"===gd(e.attributes.name)||"publisher"===gd(e.attributes.name)||"progid"===gd(e.attributes.name)||gd(e.attributes.property).match(/^article:/)||gd(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===gd(e.attributes.name)||"yandex-verification"===gd(e.attributes.name)||"csrf-token"===gd(e.attributes.name)||"p:domain_verify"===gd(e.attributes.name)||"verify-v1"===gd(e.attributes.name)||"verification"===gd(e.attributes.name)||"shopify-checkout-api-token"===gd(e.attributes.name)))return!0}}return!1}(O,y)&&(R||O.type!==Ml.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?Yl():-2;const L=Object.assign(O,{id:A});if(r.add(e,L),-2===A)return null;w&&w(e);let D=!p;if(L.type===Ml.Element){D=D&&!L.needBlock;const t=e.shadowRoot;t&&Ol(t)&&(L.isShadowHost=!0)}if((L.type===Ml.Document||L.type===Ml.Element)&&D){y.headWhitespace&&L.type===Ml.Element&&"head"===L.tagName&&(R=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onBlockedImageLoad:x,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:T},M=e.childNodes?Array.from(e.childNodes):[];for(const e of M){const n=_d(e,t);n&&L.childNodes.push(n)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=_d(n,t);r&&(Ol(e.shadowRoot)&&(r.isShadow=!0),L.childNodes.push(r))}}if(e.parentNode&&Rl(e.parentNode)&&Ol(e.parentNode)&&(L.isShadow=!0),L.type!==Ml.Element||"iframe"!==L.tagName||L.needBlock||function(e,t,n){const r=e.contentWindow;if(!r)return;let o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=ql(()=>{s||(t(),s=!0)},n);return void e.addEventListener("load",()=>{Vl(r),s=!0,t()})}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return ql(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=Gl(e);if(t&&k){const n=_d(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:T});n&&k(e,n)}},E),L.type===Ml.Element&&"img"===L.tagName&&!e.complete&&L.needBlock){const t=e,n=()=>{if(t.isConnected&&!t.complete&&x)try{const e=t.getBoundingClientRect();e.width>0&&e.height>0&&x(t,L,e)}catch(e){}t.removeEventListener("load",n)};t.isConnected&&t.addEventListener("load",n)}return L.type===Ml.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===Hl(L.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const s=ql(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Vl(s),o=!0,t()})}(e,()=>{if(C){const t=_d(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:T});t&&C(e,t)}},I),L.type===Ml.Element&&delete L.needBlock,L}function yd(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const vd="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let bd={map:{},getId:()=>(console.error(vd),-1),getNode:()=>(console.error(vd),null),removeNodeFromMap(){console.error(vd)},has:()=>(console.error(vd),!1),reset(){console.error(vd)}};function Sd(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(!function(...e){jd("clearTimeout")(...e)}(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=Hd(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},a))}}function wd(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){Hd(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>wd(e,t,s||{},!0)}function kd(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(bd=new Proxy(bd,{get:(e,t,n)=>("map"===t&&console.error(vd),Reflect.get(e,t,n))}));let Ed=Date.now;function xd(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Cd(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Id(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Td(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function Md(e,t,n,r,o){if(!e)return!1;const s=Td(e);if(!s)return!1;const i=hd(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=pd(s,i);let c=-1;return!(a<0)&&(r&&(c=pd(s,hd(null,r))),a>-1&&c<0||a<c)}function Rd(e,t){return-2===t.getId(e)}function Od(e,t){if(Rl(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Od(e.parentNode,t))}function Ad(e){return Boolean(e.changedTouches)}function Ld(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Dd(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Nd(e){return Boolean(e?.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ed=()=>(new Date).getTime());class Pd{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}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 Fd(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function $d(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=Fd(n);)n=t;return n}(e);return t.contains(n)}function Bd(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||$d(e))}const Ud={};function jd(e){const t=Ud[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return Ud[e]=r.bind(window)}function Hd(...e){return jd("setTimeout")(...e)}var zd=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(zd||{}),Wd=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Wd||{}),qd=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(qd||{}),Vd=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Vd||{}),Gd=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Gd||{});function Kd(e){try{return e.contentDocument}catch(e){}}function Jd(e){return"__ln"in e}class Yd{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 t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Jd(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Jd(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Xd=(e,t)=>`${e}@${t}`;class Zd{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=[],t=new Set,n=new Yd,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!Bd(o))return;const s=Rl(o.parentNode)?this.mirror.getId(Fd(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=_d(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Ld(e,this.mirror)&&!Md(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),Dd(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Nd(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{Md(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})}});a&&(e.push({parentId:s,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)ep(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)tp(this.droppedSet,e)||ep(this.removes,e,this.mirror)?tp(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}s=e.previous,n.removeNode(e.value),o(e.value)}const i={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.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(i))},this.processMutation=e=>{if(!Rd(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Md(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:fd(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Td(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Ul(t),o=t.tagName;r=jl(t,o,n);const s=Nl({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=Pl({isMasked:fd(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(Md(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(Kd(t))return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!dd(t.tagName,n)&&(o.attributes[n]=ld(this.doc,Fl(t.tagName),Fl(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(Md(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=Rl(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Md(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Rd(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Qd(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Od(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xd(n,r)]?Qd(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Rl(e.target)||!Ol(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Rd(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Xd(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Md(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),Nd(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,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(t=>{this[t]=e[t]})}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 Qd(e,t){e.delete(t),t.childNodes?.forEach(t=>Qd(e,t))}function ep(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function tp(e,t){return 0!==e.size&&np(e,t)}function np(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||np(e,n))}let rp;const op=e=>{if(!rp)return e;return(...t)=>{try{return e(...t)}catch(e){if(rp&&!0===rp(e))return()=>{};throw e}}},sp=[];function ip(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function ap(e,t){const n=new Zd;sp.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(op(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function cp({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let u=null;return Object.keys(qd).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=Fl(i);const l=(t=>i=>{const a=ip(i);if(Md(a,r,o,s,!0))return;let c=null,l=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Vd.Mouse;break;case"touch":c=Vd.Touch;break;case"pen":c=Vd.Pen}c===Vd.Touch?qd[t]===qd.MouseDown?l="TouchStart":qd[t]===qd.MouseUp&&(l="TouchEnd"):Vd.Pen}else Ad(i)&&(c=Vd.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===Vd.Touch||l.startsWith("Mouse")&&c===Vd.Mouse)&&(c=null)):qd[t]===qd.Click&&(c=u,u=null);const d=Ad(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:f}=d;op(e)({type:qd[l],id:p,x:h,y:f,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(qd[i]){case qd.MouseDown:case qd.MouseUp:a=a.replace("mouse","pointer");break;case qd.TouchStart:case qd.TouchEnd:return}c.push(yd(a,l,t))}),op(()=>{c.forEach(e=>e())})}function up({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return yd("scroll",op(Sd(op(i=>{const a=ip(i);if(!a||Md(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=xd(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const lp=["INPUT","TEXTAREA","SELECT"],dp=new WeakMap;function pp({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:m}){function g(e){let n=ip(e);const l=e.isTrusted,g=n&&$l(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||lp.indexOf(g)<0||Md(n,r,o,s,!0))return;const y=n;if(y.classList.contains(i)||a&&y.matches(a))return;const v=Ul(n);let b=jl(y,g,v),S=!1;const w=Nl({maskInputOptions:c,tagName:g,type:v}),k=fd(n,p,f,h,m,w);"radio"!==v&&"checkbox"!==v||(S=n.checked),b=Pl({isMasked:k,element:n,value:b,maskInputFn:u}),_(n,d?{text:b,isChecked:S,userTriggered:l}:{text:b,isChecked:S});const E=n.name;"radio"===v&&E&&S&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach(e=>{if(e!==n){const t=Pl({isMasked:k,element:e,value:jl(e,g,v),maskInputFn:u});_(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function _(t,r){const o=dp.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){dp.set(t,r);const o=n.getId(t);op(e)({...r,id:o})}}const y=("last"===l.input?["change"]:["input","change"]).map(e=>yd(e,op(g),t)),v=t.defaultView;if(!v)return()=>{y.forEach(e=>e())};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&y.push(...S.map(e=>wd(e[0],e[1],{set(){op(g)({target:this,isTrusted:!1})}},!1,v))),op(()=>{y.forEach(e=>e())})}function hp(e){return function(e,t){if(_p("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||_p("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||_p("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||_p("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function fp(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function mp({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const o="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(e){const n=s.set?.call(this,e);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),op(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function gp(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=ap(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Sd(op(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),s),u=op(Sd(op(e=>{const t=ip(e),{clientX:n,clientY:o}=Ad(e)?e.changedTouches[0]:e;i||(i=Ed()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Ed()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Wd.Drag:e instanceof MouseEvent?Wd.MouseMove:Wd.TouchMove)}),o,{trailing:!1})),l=[yd("mousemove",u,n),yd("touchmove",u,n),yd("drag",u,n)];return op(()=>{l.forEach(e=>e())})}(e),s=cp(e),i=up(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return yd("resize",op(Sd(op(()=>{const t=Cd(),o=Id();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)}),200)),t)}(e,{win:n}),c=pp(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=op(i=>Sd(op(s=>{const a=ip(s);if(!a||Md(a,t,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})}),s.media||500)),c=[yd("play",a(Gd.Play),i),yd("pause",a(Gd.Pause),i),yd("seeked",a(Gd.Seeked),i),yd("volumechange",a(Gd.VolumeChange),i),yd("ratechange",a(Gd.RateChange),i)];return op(()=>{c.forEach(e=>e())})}(e);let l=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(l=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:op((r,o,s)=>{const[i,a]=s,{id:c,styleId:u}=fp(o,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:a}]}),r.apply(o,s)})});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:op((r,o,s)=>{const[i]=s,{id:a,styleId:c}=fp(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(o,s)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:op((r,o,s)=>{const[i]=s,{id:a,styleId:c}=fp(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(o,s)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:op((r,o,s)=>{const[i]=s,{id:a,styleId:c}=fp(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)})}));const c={};yp("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(yp("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),yp("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),yp("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([r,o])=>{u[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(u[r].insertRule,{apply:op((r,o,s)=>{const[i,a]=s,{id:c,styleId:u}=fp(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:[...hp(o),a||0]}]}),r.apply(o,s)})}),o.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:op((r,o,s)=>{const[i]=s,{id:a,styleId:c}=fp(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...hp(o),i]}]}),r.apply(o,s)})})}),op(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:n}),d=mp(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:op((o,i,a)=>{const[c,u,l]=a;if(n.has(c))return s.apply(i,[c,u,l]);const{id:d,styleId:p}=fp(i.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:l},index:hp(i.parentRule)}),o.apply(i,a)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:op((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:u,styleId:l}=fp(s.parentRule?.parentStyleSheet,t,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&e({id:u,styleId:l,remove:{property:c},index:hp(s.parentRule)}),o.apply(s,a)})}),op(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=kd(t.fonts,"add",function(t){return function(n){return Hd(op(()=>{const t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(i),op(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=op(()=>{const e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;const c=[],u=e.rangeCount||0;for(let t=0;t<u;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:u,endContainer:l,endOffset:d}=i;Md(a,r,o,s,!0)||Md(l,r,o,s,!0)||c.push({start:n.getId(a),startOffset:u,end:n.getId(l),endOffset:d})}i({ranges:c})});return c(),yd("selectionchange",c)}(e),m=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?kd(n.customElements,"define",function(e){return function(n,r,o){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,o])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return op(()=>{sp.forEach(e=>e.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),l(),d(),p(),h(),f(),m(),g.forEach(e=>e())})}function _p(e){return void 0!==window[e]}function yp(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class vp{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),s.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class bp{constructor(){this.crossOriginIframeMirror=new vp(Yl),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Sp{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new vp(Yl),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new vp(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,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=Kd(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case zd.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:zd.IncrementalSnapshot,data:{source:Wd.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case zd.Meta:case zd.Load:case zd.DomContentLoaded:return!1;case zd.Plugin:return t;case zd.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case zd.IncrementalSnapshot:switch(t.data.source){case Wd.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Wd.Drag:case Wd.TouchMove:case Wd.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Wd.ViewportResize:return!1;case Wd.MediaInteraction:case Wd.MouseInteraction:case Wd.Scroll:case Wd.CanvasMutation:case Wd.Input:return this.replaceIds(t.data,e,["id"]),t;case Wd.StyleSheetRule:case Wd.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Wd.Font:return t;case Wd.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Wd.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===Ml.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class wp{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class kp{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,t){if(!Ol(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=ap({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(up({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Hd(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(mp({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=Kd(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(kd(e.prototype,"attachShadow",function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&Bd(this)&&n.addShadowRoot(this.shadowRoot,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var Ep="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xp="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Cp=0;Cp<64;Cp++)xp[Ep.charCodeAt(Cp)]=Cp;class Ip{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Tp{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Pd,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:Ll(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Mp{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){jd("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Rp,Op;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ap=new Dl;function Lp(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:w,sampling:k={},dataURLOptions:E={},mousemoveWait:x,recordDOM:C=!0,recordCanvas:I=!1,recordCrossOriginIframes:T=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:L,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:N=new Set([]),errorHandler:P,onMutation:F,getCanvasManager:$}=e;rp=P;const B=!T||window.parent===window;let U=!1;if(!B)try{window.parent.document&&(U=!1)}catch(e){U=!0}if(B&&!t)throw new Error("emit function is required");if(!B&&!U)return()=>{};void 0!==x&&void 0===k.mousemove&&(k.mousemove=x),Ap.reset();const j=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},H=!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===_,headMetaDescKeywords:"all"===_}:_||{};let z;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let W=0;const q=e=>{for(const t of L||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!U&&(e=w(e)),e};Rp=(e,o)=>{const s=e;if(s.timestamp=Ed(),!sp[0]?.isFrozen()||s.type===zd.FullSnapshot||s.type===zd.IncrementalSnapshot&&s.data.source===Wd.Mutation||sp.forEach(e=>e.unfreeze()),B)t?.(q(s),o);else if(U){const e={type:"rrweb",event:q(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===zd.FullSnapshot)z=s,W=0;else if(s.type===zd.IncrementalSnapshot){if(s.data.source===Wd.Mutation&&s.data.isAttachIframe)return;W++;const e=r&&W>=r,t=n&&z&&s.timestamp-z.timestamp>n;(e||t)&&ee(!0)}};const V=e=>{Rp({type:zd.IncrementalSnapshot,data:{source:Wd.Mutation,...e}})},G=e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.Scroll,...e}}),K=e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.CanvasMutation,...e}}),J=new Tp({mutationCb:V,adoptedStyleSheetCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new bp:new Sp({mirror:Ap,mutationCb:V,stylesheetManager:J,recordCrossOriginIframes:T,wrappedEmit:Rp});for(const e of L||[])e.getMirror&&e.getMirror({nodeMirror:Ap,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const X=new Mp,Z=function(e,t){try{return e?e(t):new Ip}catch{return console.warn("Unable to initialize CanvasManager"),new Ip}}($,{mirror:Ap,win:window,mutationCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.CanvasMutation,...e}}),recordCanvas:I,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:k.canvas,dataURLOptions:E,errorHandler:P}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new wp:new kp({mutationCb:V,scrollCb:G,bypassOptions:{onMutation:F,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:j,dataURLOptions:E,maskAttributeFn:y,maskTextFn:b,maskInputFn:v,recordCanvas:I,inlineImages:A,sampling:k,slimDOMOptions:H,iframeManager:Y,stylesheetManager:J,canvasManager:Z,keepIframeSrcFn:D,processedNodeManager:X},mirror:Ap}),ee=(e=!1)=>{if(!C)return;Rp({type:zd.Meta,data:{href:window.location.href,width:Id(),height:Cd()}},e),J.reset(),Q.init(),sp.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new Dl,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOM:y=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:x,stylesheetLoadTimeout:C,keepIframeSrcFn:I=()=>!1}=t||{};return _d(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:x,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:Ap,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskAllInputs:j,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,slimDOM:H,dataURLOptions:E,recordCanvas:I,inlineImages:A,onSerialize:e=>{Ld(e,Ap)&&Y.addIframe(e),Dd(e,Ap)&&J.trackLinkElement(e),Nd(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),e.contentWindow&&Z.addWindow(e.contentWindow),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{J.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{V({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:D});if(!t)return console.warn("Failed to snapshot the document");Rp({type:zd.FullSnapshot,data:{node:t,initialOffset:xd(window)}}),sp.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&J.adoptStyleSheets(document.adoptedStyleSheets,Ap.getId(document))};Op=ee;try{const e=[],t=e=>op(gp)({onMutation:F,mutationCb:V,mousemoveCb:(e,t)=>Rp({type:zd.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.MouseInteraction,...e}}),scrollCb:G,viewportResizeCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.ViewportResize,...e}}),inputCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.Input,...e}}),mediaInteractionCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.MediaInteraction,...e}}),styleSheetRuleCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.StyleSheetRule,...e}}),styleDeclarationCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.StyleDeclaration,...e}}),canvasMutationCb:K,fontCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:Wd.Font,...e}}),selectionCb:e=>{Rp({type:zd.IncrementalSnapshot,data:{source:Wd.Selection,...e}})},customElementCb:e=>{Rp({type:zd.IncrementalSnapshot,data:{source:Wd.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:j,inlineStylesheet:f,sampling:k,recordDOM:C,recordCanvas:I,inlineImages:A,userTriggeredOnInput:R,collectFonts:O,doc:e,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:D,blockSelector:s,unblockSelector:i,slimDOMOptions:H,dataURLOptions:E,mirror:Ap,iframeManager:Y,stylesheetManager:J,shadowDomManager:Q,processedNodeManager:X,canvasManager:Z,ignoreCSSAttributes:N,plugins:L?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>Rp({type:zd.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});Y.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(yd("DOMContentLoaded",()=>{Rp({type:zd.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()})),e.push(yd("load",()=>{Rp({type:zd.Load,data:{}}),"load"===M&&n()},window))),()=>{e.forEach(e=>e()),X.destroy(),Op=void 0,rp=void 0}}catch(e){console.warn(e)}}var Dp,Np;Lp.mirror=Ap,Lp.takeFullSnapshot=function(e){if(!Op)throw new Error("please take full snapshot after start recording");Op(e)},(Np=Dp||(Dp={}))[Np.NotStarted=0]="NotStarted",Np[Np.Running=1]="Running",Np[Np.Stopped=2]="Stopped";function Pp(e){return e>9999999999?e:1e3*e}function Fp(e){return e>9999999999?e/1e3:e}function $p(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:zd.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:Jt(t,10,1e3)}}),"console"===t.category)))}function Bp(e){return e.closest("button,a")||e}function Up(e){const t=jp(e);return t&&t instanceof Element?Bp(t):t}function jp(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let Hp;function zp(e){return Hp||(Hp=[],ne(bl,"open",function(e){return function(...t){if(Hp)try{Hp.forEach(e=>e())}catch{}return e.apply(bl,t)}})),Hp.push(e),()=>{const t=Hp?Hp.indexOf(e):-1;t>-1&&Hp.splice(t,1)}}const Wp=new Set([Wd.Mutation,Wd.StyleSheetRule,Wd.StyleDeclaration,Wd.AdoptedStyleSheet,Wd.CanvasMutation,Wd.Selection,Wd.MediaInteraction]);class qp{constructor(e,t,n=$p){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=zp(()=>{this._lastMutation=Gp()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!Vp.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:Fp(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Fp(e)}registerScroll(e=Date.now()){this._lastScroll=Fp(e)}registerClick(e){const t=Bp(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=Gp();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:s,clickBreadcrumb:i}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:bl.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:s||1}};return void this._addBreadcrumbEvent(t,o)}if(s>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:bl.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=lu(()=>this._checkClicks(),1e3)}}const Vp=["A","BUTTON","INPUT"];function Gp(){return Date.now()/1e3}function Kp(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(Wp.has(n)&&e.registerMutation(t.timestamp),n===Wd.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===Wd.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=Lp.mirror.getNode(r);o instanceof HTMLElement&&n===qd.Click&&e.registerClick(o)}}catch{}}function Jp(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Yp=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Yp||{});const Xp=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Zp(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Xp.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}const Qp=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?Up(e.event):jp(e.event),n=G(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}(e);return Jp({category:`ui.${e.name}`,...eh(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var s,i,a;!(r&&e.clickDetector&&o?.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=e.clickDetector,i=n,a=Up(t.event),s.handleClick(i,a)),$p(e,n)};function eh(e,t){const n=Lp.mirror.getId(e),r=n&&Lp.mirror.getNode(n),o=r&&Lp.mirror.getMeta(r),s=o&&function(e){return e.type===Yp.Element}(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>e.type===Yp.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:Zp(s.attributes)}}:{}}}function th(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(i)||!s)return null;const a=t||r||o,c=1===s.length;if(!a&&c)return null;const u=G(i,{maxStringLength:200})||"<unknown>",l=eh(i,u);return Jp({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}(t);n&&$p(e,n)}const nh={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:sh(s),end:sh(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=sh(o);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=e;if(0===o)return null;return{type:`${t}.${m}`,start:sh(h),end:sh(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:s,redirectCount:p}}}};function rh(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function oh(e){const t=nh[e.entryType];return t?t(e):null}function sh(e){return((ve()||bl.performance.timeOrigin)+e)/1e3}function ih(e){const t=e.entries[e.entries.length-1];return lh(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function ah(e){return void 0!==e.sources}function ch(e){const t=[],n=[];for(const r of e.entries)if(ah(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=Lp.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return lh(e,"cumulative-layout-shift",n,t)}function uh(e){const t=e.entries[e.entries.length-1];return lh(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function lh(e,t,n,r){const o=e.value,s=e.rating,i=sh(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(e=>Lp.mirror.getId(e)):void 0,attributions:r}}}const dh="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;const ph=["log","warn","error"],hh="[Replay] ";function fh(e,t="info"){eo({category:"console",data:{logger:"replay"},level:t,message:`${hh}${e}`},{level:t})}const mh=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return dh?(ph.forEach(e=>{n[e]=(...n)=>{p[e](hh,...n),t&&fh(n.join(""),wo(e))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),p.error(hh,r),e?Jn(r):t&&fh(r,"error")},n.infoTick=(...e)=>{p.log(hh,...e),t&&setTimeout(()=>fh(e[0]),0)}):ph.forEach(e=>{n[e]=()=>{}}),n}();class gh extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class _h{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>xl)throw new gh;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(e=>e.timestamp).sort()[0];return e?Pp(e):null}}class yh{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():t()},{once:!0}),this._worker.addEventListener("error",e=>{t(e)},{once:!0})})),this._ensureReadyPromise}destroy(){dh&&mh.log("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise((r,o)=>{const s=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",s),!i.success)return dh&&mh.error("Error in compression worker: ",i.response),void o(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class vh{constructor(e){this._worker=new yh(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Pp(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>xl?Promise.reject(new gh):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{dh&&mh.exception(e,'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 bh{constructor(e){this._fallback=new _h,this._compression=new vh(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(dh&&mh.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){dh&&mh.exception(e,"Failed to add events when switching buffers.")}}}function Sh({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}();return""}();if(!t)return;dh&&mh.log("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new bh(n)}catch(e){dh&&mh.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return dh&&mh.log("Using simple buffer"),new _h}function wh(){try{return"sessionStorage"in bl&&!!bl.sessionStorage}catch{return!1}}function kh(e){!function(){if(!wh())return;try{bl.sessionStorage.removeItem(Sl)}catch{}}(),e.session=void 0}function Eh(e){return void 0!==e&&Math.random()<e}function xh(e){if(wh())try{bl.sessionStorage.setItem(Sl,JSON.stringify(e))}catch{}}function Ch(e){const t=Date.now();return{id:e.id||ue(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function Ih({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=function(e,t){return Eh(e)?"session":!!t&&"buffer"}(e,t),s=Ch({sampled:o,previousSessionId:r});return n&&xh(s),s}function Th(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function Mh(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Th(e.started,t,r)||Th(e.lastActivity,n,r)}function Rh(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!Mh(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function Oh({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&function(){if(!wh())return null;try{const e=bl.sessionStorage.getItem(Sl);if(!e)return null;const t=JSON.parse(e);return dh&&mh.infoTick("Loading existing session"),Ch(t)}catch{return null}}();return o?Rh(o,{sessionIdleExpire:e,maxReplayDuration:t})?(dh&&mh.infoTick("Session in sessionStorage is expired, creating new one..."),Ih(r,{previousSessionId:o.id})):o:(dh&&mh.infoTick("Creating new session"),Ih(r,{previousSessionId:n}))}function Ah(e,t,n){return!!Dh(e,t)&&(Lh(e,t,n),!0)}async function Lh(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o="buffer"===e.recordingMode;try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=function(e,t){try{if("function"==typeof t&&function(e){return e.type===zd.Custom}(e))return t(e)}catch(e){return dh&&mh.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!s)return;return await r.addEvent(s)}catch(t){const n=t&&t instanceof gh,s=n?"addEventSizeExceeded":"addEvent";if(n&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:s});const i=Be();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function Dh(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Pp(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(dh&&mh.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function Nh(e){return!e.type}function Ph(e){return"transaction"===e.type}function Fh(e){return"feedback"===e.type}function $h(e){return(t,n)=>{if(!e.isEnabled()||!Nh(t)&&!Ph(t))return;const r=n?.statusCode;!r||r<200||r>=300||(Ph(t)?function(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,t):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"==typeof r&&!r(t))return;lu(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}function Bh(e){return t=>{e.isEnabled()&&Nh(t)&&function(e,t){const n=t.exception?.values?.[0]?.value;if("string"!=typeof n)return;if(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){$p(e,Jp({category:"replay.hydrate-error",data:{url:J()}}))}}(e,t)}}function Uh(e){const t=Be();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!jh(t))return;const n=function(e){if(!jh(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(e){const t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return Jp(e);let n=!1;const r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>El?(n=!0,`${e.slice(0,El)}…`):e;if("object"==typeof e)try{const t=Jt(e,7);return JSON.stringify(t).length>El?(n=!0,`${JSON.stringify(t,null,2).slice(0,El)}…`):t}catch{}return e});return Jp({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return Jp(e)}(t);n&&$p(e,n)}(e,t))}function jh(e){return!!e.category}function Hh(){const e=Ne().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ft();if(t){delete Gt(t).replay_id}}function zh(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!Nh(t)&&!Ph(t)&&!Fh(t))return t;if(!e.checkAndHandleExpiredSession())return Hh(),t;if(Fh(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:zd.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception?.values?.length||!t.originalException?.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return dh&&mh.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==wl&&!(!t.exception||t.type)&&Eh(e.getOptions().errorSampleRate)}(e,t);return(r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t},{id:"Replay"})}function Wh(e,t){return t.map(({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:zd.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof i?Promise.resolve(null):i})}function qh(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Wh(e,[n]),!1)))}}function Vh(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!dh||!e.getOptions()._experiments.traceInternals)&&Gr(t,Be())}(e,t.name)||e.addUpdate(()=>(Wh(e,[t]),!0)))}function Gh(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=fu(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Kh(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Jh(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Yh(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function Xh(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Zh(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>kl,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,kl);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Qh(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function ef(e,t){const n=function(e,t=bl.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(bl.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return te(n,t)}async function tf(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=ef(i,n.networkDetailAllowUrls)&&!ef(i,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?function(e,t){if(1===e.length&&"string"!=typeof e[0])return rf(e[0],t);if(2===e.length)return rf(e[1],t);return{}}(n,t):{};if(!e)return Zh(o,r,void 0);const s=gu(n),[i,a]=mu(s,mh),c=Zh(o,r,i);if(a)return Jh(c,a);return c}(n,t.input,u):Xh(u),h=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return Xh(o);const s=r?nf(r.headers,n):{};if(!r||!t&&void 0!==o)return Zh(s,o,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){dh&&mh.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const r=lu(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(dh&&mh.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(dh&&mh.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(r),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&void 0===n?Gh(e):n;return r?Zh(o,s,t?e:void 0):Xh(s)}catch(e){return dh&&mh.exception(e,"Failed to serialize response body"),Zh(o,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});if(a)return Jh(c,a);return c}(d,n,t.response,l);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:h}}(e,t,n),o=Yh("resource.fetch",r);Vh(n.replay,o)}catch(e){dh&&mh.exception(e,"Failed to capture fetch breadcrumb")}}function nf(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function rf(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?nf(n,t):Array.isArray(n)?{}:Qh(n,t):{}}async function of(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!ef(c,n.networkDetailAllowUrls)||ef(c,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:Xh(d),response:Xh(p)}}const h=a[du],f=h?Qh(h.request_headers,n.networkRequestHeaders):{},m=Qh(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{})}(a),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?mu(i,mh):[void 0],[y,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return dh&&mh.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return dh&&mh.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return dh&&mh.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],b=Zh(f,d,g),S=Zh(m,p,y);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:_?Jh(b,_):b,response:v?Jh(S,v):S}}(e,t,n),o=Yh("resource.xhr",r);Vh(n.replay,o)}catch(e){dh&&mh.exception(e,"Failed to capture xhr breadcrumb")}}function sf(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Gh(r),s=n.getResponseHeader("content-length")?Kh(n.getResponseHeader("content-length")):function(e,t){try{return Gh("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}function af(e){const t=Be();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e?.xhr}(n)&&(sf(t,n),of(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e?.response}(n)&&(!function(e,t){const{input:n,response:r}=t,o=Gh(n?gu(n):void 0),s=r?Kh(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),tf(t,n,e))}catch(e){dh&&mh.exception(e,"Error when enriching network breadcrumb")}}(a,e,t))}catch{}}function cf(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function uf(e,t,n){return function(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){void 0!==o&&clearTimeout(o),void 0!==s&&clearTimeout(s),o=s=void 0}function l(){return o&&clearTimeout(o),o=a(c,t),i&&void 0===s&&(s=a(c,i)),r}return l.cancel=u,l.flush=function(){return void 0!==o||void 0!==s?c():r},l}(e,t,{...n,setTimeoutImpl:lu})}const lf=t.navigator;function df(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(dh&&mh.warn("Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&Kp(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Ah(e,n,o))return!0;if(!o)return!1;const t=e.session;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;Ah(e,function(e){const t=e.getOptions();return{type:zd.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(dh&&mh.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&xh(t))}return t?.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}}async function pf({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=Be(),p=Ne(),h=d?.getTransport(),f=d?.getDsn();if(!(d&&h&&f&&s.sampled))return Nn({});const m={type:"replay_event",replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},g=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await Vn(e.getOptions(),r,o,t,e,Pe());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c,settings:u}=i?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}({scope:p,client:d,replayId:t,event:m});if(!g)return d.recordDroppedEvent("event_processor","replay"),dh&&mh.log("An event processor returned `null`, will not send event."),Nn({});delete g.sdkProcessingMetadata;const _=function(e,t,n,r){return Zt(dn(e,ln(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,i,f,d.getOptions().tunnel);let y;try{y=await h.send(_)}catch(e){const t=new Error(wl);try{t.cause=e}catch{}throw t}if("number"==typeof y.statusCode&&(y.statusCode<200||y.statusCode>=300))throw new hf(y.statusCode);const v=Fr({},y);if(Pr(v,"replay"))throw new ff(v);return y}class hf extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class ff extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function mf(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return await pf(e),!0}catch(n){if(n instanceof hf||n instanceof ff)throw n;if(Zn("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${wl} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{lu(async()=>{try{await mf(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}const gf="__THROTTLED";function _f(e,t,n){const r=new Map;let o=!1;return(...s)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})})(i),[...r.values()].reduce((e,t)=>e+t,0)>=t){const e=o;return o=!0,e?"__SKIPPED":gf}o=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...s)}}class yf{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=uf(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=_f((e,t)=>function(e,t,n){return Dh(e,t)?Lh(e,t,n):Promise.resolve(null)}(this,e,t),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new qp(this,o)),dh){const t=e._experiments;mh.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===bl.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const e=Jp({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{const e=Jp({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{th(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){dh&&mh.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",dh&&mh.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):dh&&mh.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(dh&&mh.log("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(dh&&mh.log("Buffering is in progress, call `flush()` to save the replay"));dh&&mh.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Oh({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(dh&&mh.log("Buffering is in progress, call `flush()` to save the replay"));dh&&mh.infoTick("Starting replay in buffer mode");const e=Oh({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Lp({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:df(this),.../iPhone|iPad|iPod/i.test(lf?.userAgent??"")||/Macintosh/i.test(lf?.userAgent??"")&&lf?.maxTouchPoints&&lf?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{dh&&mh.log("Stopping Replay"+(t?` triggered by ${t}`:"")),Hh(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,kh(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),dh&&mh.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),dh&&mh.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();dh&&mh.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session?.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Th(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${bl.location.pathname}${bl.location.hash}${bl.location.search}`,t=`${bl.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===gf){const e=Jp({category:"replay.throttled"});this.addUpdate(()=>!Ah(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Ft(),t=e&&Pt(e),n=(t&&Mt(t).data||{})[je];if(t&&n&&["route","custom"].includes(n))return Mt(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Sh({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Oh({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!Rh(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{bl.document.addEventListener("visibilitychange",this._handleVisibilityChange),bl.addEventListener("blur",this._handleWindowBlur),bl.addEventListener("focus",this._handleWindowFocus),bl.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(e){const t=Be();nu(Qp(e)),su(qh(e)),Uh(e),af(e),tr(zh(e)),t&&(t.on("beforeSendEvent",Bh(e)),t.on("afterSendEvent",$h(e)),t.on("createDsc",t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",async(t,n)=>{const r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&("api"===t.contexts.feedback.source&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(e=>{r.push(kc(e,n))}),r.push(Sc(rh(ih,e)),bc(rh(ch,e)),wc(rh(uh,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{bl.document.removeEventListener("visibilitychange",this._handleVisibilityChange),bl.removeEventListener("blur",this._handleWindowBlur),bl.removeEventListener("focus",this._handleWindowFocus),bl.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;Mh(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):dh&&mh.log("Document has become active, but session has expired")}_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:zd.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(oh).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(Wh(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_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){if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await async function(e){try{return Promise.all(Wh(e,[cf(bl.performance.memory)]))}catch{return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await mf({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=Be();if(t){const n=e instanceof ff?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else dh&&mh.error("No session or eventBuffer found to flush.")}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(dh&&mh.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,o=n>this._options.maxReplayDuration+5e3;if(r||o)return dh&&mh.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const s=this.eventBuffer;s&&0===this.session.segmentId&&!s.hasCheckout&&dh&&mh.log("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&xh(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{const n=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),r=t.join(",");return n?.matches(r)}))return!1;const n=e.length,r=this._options.mutationLimit,o=r&&n>r;if(n>this._options.mutationBreadcrumbLimit||o){const e=Jp({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(e)}return!o||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function vf(e,t){return[...e,...t].join(",")}const bf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Sf=["content-length","content-type","accept"];let wf=!1;class kf{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:y=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder","aria-label"],unmask:w=[],block:k=[],unblock:E=[],ignore:x=[],maskFn:C,beforeAddRecordingEvent:I,beforeErrorSampling:T,onError:M}={}){this.name="Replay";const R=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:vf(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:vf(t,[]),blockSelector:vf(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:vf(r,[]),ignoreSelector:vf(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:w,block:k,unblock:E,ignore:x});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:C,maskInputFn:C,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:S,maskAllText:c,privacyOptions:R,key:e,value:t,el:n}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,Cl),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:l,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:f,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:Ef(y),networkResponseHeaders:Ef(v),beforeAddRecordingEvent:I,beforeErrorSampling:T,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${bf}`:bf),this._isInitialized&&ks())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return wf}set _isInitialized(e){wf=e}afterAllSetup(e){ks()&&!this._replay&&(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=yt(n.replaysSessionSampleRate),s=yt(n.replaysOnErrorSampleRate);null==o&&null==s&&c(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")});null!=o&&(r.sessionSampleRate=o);null!=s&&(r.errorSampleRate=s);return r}(this._initialOptions,e);this._replay=new yf({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function Ef(e){return[...Sf,...e.map(e=>e.toLowerCase())]}var xf=Object.defineProperty,Cf=(e,t,n)=>((e,t,n)=>t in e?xf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class If{constructor(){Cf(this,"idNodeMap",new Map),Cf(this,"nodeMetaMap",new WeakMap)}getId(e){if(!e)return-1;const t=this.getMeta(e)?.id;return t??-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 t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Tf(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Tf(e.parentNode,t,n,r+1):-1}function Mf(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}const Rf="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Of={map:{},getId:()=>(console.error(Rf),-1),getNode:()=>(console.error(Rf),null),removeNodeFromMap(){console.error(Rf)},has:()=>(console.error(Rf),!1),reset(){console.error(Rf)}};function Af(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){$f(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>Af(e,t,s||{},!0)}function Lf(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function Df(e,t,n,r,o){if(!e)return!1;const s=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}(e);if(!s)return!1;const i=Tf(s,Mf(t,n));let a=-1;return!(i<0)&&(r&&(a=Tf(s,Mf(null,r))),i>-1&&a<0||i<a)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Of=new Proxy(Of,{get:(e,t,n)=>("map"===t&&console.error(Rf),Reflect.get(e,t,n))})),Date.now().toString();const Nf={};function Pf(e){const t=Nf[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return Nf[e]=r.bind(window)}function Ff(...e){return Pf("requestAnimationFrame")(...e)}function $f(...e){return Pf("setTimeout")(...e)}var Bf=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Bf||{});let Uf;const jf=e=>{if(!Uf)return e;return(...t)=>{try{return e(...t)}catch(e){if(Uf&&!0===Uf(e))return()=>{};throw e}}};for(var Hf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zf="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Wf=0;Wf<64;Wf++)zf[Hf.charCodeAt(Wf)]=Wf;const qf=new Map;const Vf=(e,t,n)=>{if(!e||!Jf(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=qf.get(e);return n||(n=new Map,qf.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function Gf(e,t,n){if(e instanceof Array)return e.map(e=>Gf(e,t,n));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=Hf[n[t]>>2],o+=Hf[(3&n[t])<<4|n[t+1]>>4],o+=Hf[(15&n[t+1])<<2|n[t+2]>>6],o+=Hf[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Gf(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Gf(e.data,t,n),e.width,e.height]}}if(Jf(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Vf(e,t,n)}}return e}const Kf=(e,t,n)=>e.map(e=>Gf(e,t,n)),Jf=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(n.find(n=>e instanceof t[n]))};function Yf(e,t,n,r,o){const s=[];try{const i=Lf(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(s,...i){if(!Df(this,t,n,r)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(s);if("__context"in this||(this.__context=e),o&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[s,...i])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(e=>e())}}function Xf(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const i of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])continue;const u=Lf(e,i,function(e){return function(...c){const u=e.apply(this,c);if(Vf(u,a,this),"tagName"in this.canvas&&!Df(this.canvas,r,o,s)){const e=Kf(c,a,this),r={type:t,property:i,args:e};n(this.canvas,r)}return u}});c.push(u)}catch{const r=Af(e,i,{set(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});c.push(r)}return c}class Zf{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{enableManualSnapshot:t,sampling:n="all",win:r,recordCanvas:o,errorHandler:s}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,s&&(Uf=s),(o&&"number"==typeof n||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),t||jf(()=>{o&&"all"===n&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&"number"==typeof n&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){const{sampling:t="all",blockClass:n,blockSelector:r,unblockSelector:o,recordCanvas:s,enableManualSnapshot:i}=this.options;if(!this.windowsSet.has(e)){if(i)return this.windowsSet.add(e),void this.windows.push(new WeakRef(e));jf(()=>{if(s&&"all"===t&&this.initCanvasMutationObserver(e,n,r,o),s&&"number"==typeof t){const t=Yf(e,n,r,o,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){t?.skipRequestAnimationFrame?this.takeSnapshot(performance.now(),!0,e):Ff(t=>this.takeSnapshot(t,!0,e))}initFPSWorker(){const e=new Worker(function(){const e=new Blob(['for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};']);return URL.createObjectURL(e)}());return e.onmessage=e=>{const t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!("base64"in t))return;const{base64:r,type:o,width:s,height:i}=t;this.mutationCb({id:n,type:Bf["2D"],commands:[{property:"clearRect",args:[0,0,s,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:o}]},0,0,s,i]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;const t=n=>{this.takeSnapshot(n,!1),e=Ff(t)};e=Ff(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){const o=Yf(e,t,n,r,!1),s=function(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])continue;const i=Lf(t.CanvasRenderingContext2D.prototype,a,function(s){return function(...i){return Df(this.canvas,n,r,o)||$f(()=>{const n=Kf(i,t,this);e(this.canvas,{type:Bf["2D"],property:a,args:n})},0),s.apply(this,i)}});s.push(i)}catch{const n=Af(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:Bf["2D"],property:a,args:[t],setter:!0})}});s.push(n)}return()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r),i=function(e,t,n,r,o){const s=[];return s.push(...Xf(t.WebGLRenderingContext.prototype,Bf.WebGL,e,n,r,o,0,t)),void 0!==t.WebGL2RenderingContext&&s.push(...Xf(t.WebGL2RenderingContext.prototype,Bf.WebGL2,e,n,r,o,0,t)),()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{o(),s(),i()})}getCanvasElements(e,t,n){const r=[],o=o=>{o.querySelectorAll("canvas").forEach(o=>{Df(o,e,t,n)||r.push(o)})};for(const e of this.windows){const t=e.deref();let n;try{n=t&&t.document}catch{}n&&o(n)}for(const e of this.shadowDoms){const t=e.deref();t&&o(t)}return r}takeSnapshot(e,t,n){const{sampling:r,blockClass:o,blockSelector:s,unblockSelector:i,dataURLOptions:a,maxCanvasSize:c}=this.options,u=1e3/("all"===r?2:r||2);if(this.lastSnapshotTime&&e-this.lastSnapshotTime<u)return!1;this.lastSnapshotTime=e;return(n?[n]:this.getCanvasElements(o,s,i)).forEach(e=>{const n=this.mirror.getId(e);if(this.mirror.hasNode(e)&&e.width&&e.height&&!this.snapshotInProgressMap.get(n)){if(this.snapshotInProgressMap.set(n,!0),!t&&["webgl","webgl2"].includes(e.__context)){const t=e.getContext(e.__context);!1===t?.getContextAttributes()?.preserveDrawingBuffer&&t.clear(t.COLOR_BUFFER_BIT)}createImageBitmap(e).then(t=>{this.worker?.postMessage({id:n,bitmap:t,width:e.width,height:e.height,dataURLOptions:a,maxCanvasSize:c},[t])}).catch(e=>{jf(()=>{throw this.snapshotInProgressMap.delete(n),e})()})}}),!0}startPendingCanvasMutationFlusher(){Ff(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,Ff(e)};Ff(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),Ff(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map(e=>{const{type:t,...n}=e;return n}),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Qf;new If,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Qf||(Qf={}));const em={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},tm=1280,nm=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,tm):tm,n?Math.min(n,tm):tm]};let o;const s=new Promise(e=>o=e);return{name:"ReplayCanvas",getOptions(){const{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{const r=new Zf({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{"object"==typeof e&&(e.__rrweb__=!0)}catch{}}});return o(r),r},...em[e]||em.medium}},async snapshot(e,t){(await s).snapshot(e,t)}}};function rm(e=0){return((ve()||performance.timeOrigin)+e)/1e3}const om=new WeakMap,sm=new Map,im={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function am(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c}={...im,...t},u="function"==typeof s?s:e=>!0,l=e=>function(e,t){const n=J();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?te(r.toString(),t)||s&&te(r.pathname,t):s}{const n=!!e.match(/^\/(?!\/)/);return t?te(e,t):n}}(e,a),d={};n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){const t=sm.get(e.span_id);t&&(e.timestamp=t/1e3,sm.delete(e.span_id))}}),e)),o&&function(e){const t="fetch-body-resolved";k(t,e),E(t,()=>_s(ys))}(e=>{if(e.response){const t=om.get(e.response);t&&e.endTimestamp&&sm.set(t,e.endTimestamp)}}),gs(e=>{const t=ss(e,u,l,d);if(e.response&&e.fetchData.__span&&om.set(e.response,e.fetchData.__span),t){const n=um(e.fetchData.url),r=n?qr(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r}),i&&cm(t),c?.(t,{headers:e.headers})}})),r&&pu(e=>{const t=function(e,t,n,r){const o=e.xhr,s=o?.[du];if(!o||o.__sentry_own_request__||!s)return;const{url:i,method:a}=s,c=jt()&&t(i);if(e.endTimestamp&&c){const e=o.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==s.status_code&&(nt(t,s.status_code),t.end(),delete r[e]))}const u=um(i),l=qr(u||i),d=Vr(i),p=!!Ft(),h=c&&p?kn({name:`${a} ${d}`,attributes:{url:i,type:"xhr","http.method":a,"http.url":u,"server.address":l?.host,[qe]:"auto.http.browser",[We]:"http.client",...l?.search&&{"http.query":l?.search},...l?.hash&&{"http.fragment":l?.hash}}}):new Kt;o.__sentry_xhr_span_id__=h.spanContext().spanId,r[o.__sentry_xhr_span_id__]=h,n(i)&&function(e,t){const{"sentry-trace":n,baggage:r}=Zr({span:t});n&&function(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(r?.["sentry-trace"])return;try{if(e.setRequestHeader("sentry-trace",t),n){const t=r?.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch{}}(e,n,r)}(o,jt()&&p?h:void 0);const f=Be();f&&f.emit("beforeOutgoingRequestSpan",h,e);return h}(e,u,l,d);if(t){let n;i&&cm(t);try{n=new Headers(e.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(t,{headers:n})}})}function cm(e){const{url:t}=Mt(e).data;if(!t||"string"!=typeof t)return;const n=kc("resource",({entries:r})=>{r.forEach(r=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(r)&&r.name.endsWith(t)){(function(e){const t=[];if(null!=e.nextHopProtocol){const{name:n,version:r}=Fc(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return ve()?[...t,["http.request.redirect_start",rm(e.redirectStart)],["http.request.fetch_start",rm(e.fetchStart)],["http.request.domain_lookup_start",rm(e.domainLookupStart)],["http.request.domain_lookup_end",rm(e.domainLookupEnd)],["http.request.connect_start",rm(e.connectStart)],["http.request.secure_connection_start",rm(e.secureConnectionStart)],["http.request.connection_end",rm(e.connectEnd)],["http.request.request_start",rm(e.requestStart)],["http.request.response_start",rm(e.responseStart)],["http.request.response_end",rm(e.responseEnd)]]:t})(r).forEach(t=>e.setAttribute(...t)),setTimeout(n)}})})}function um(e){try{return new URL(e,aa.location.origin).href}catch{return}}const lm="sentry_previous_trace",dm="sentry.previous_trace";function pm(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r="session-storage"===t;let o=r?function(){try{const e=aa.sessionStorage?.getItem(lm);return JSON.parse(e)}catch{return}}():void 0;e.on("spanStart",e=>{if(Pt(e)!==e)return;const t=Ne().getPropagationContext();o=function(e,t,n){const r=Mt(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[He])}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;if(i.traceId===r.trace_id)return e;Date.now()/1e3-e.startTimestamp<=3600&&(ju&&p.log(`Adding previous_trace ${i} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:i,attributes:{[et]:"previous_trace"}}),t.setAttribute(dm,`${i.traceId}-${i.spanId}-${hm(i)?1:0}`));return s}(o,e,t),r&&function(e){try{aa.sessionStorage.setItem(lm,JSON.stringify(e))}catch(e){ju&&p.warn("Could not store previous trace in sessionStorage",e)}}(o)});let s=!0;n&&e.on("beforeSampling",e=>{if(!o)return;const t=Ne(),n=t.getPropagationContext();s&&n.parentSpanId?s=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(o.sampleRate),sampled:String(hm(o.spanContext))},sampleRand:o.sampleRand}),e.parentSampled=hm(o.spanContext),e.parentSampleRate=o.sampleRate,e.spanAttributes={...e.spanAttributes,[ze]:o.sampleRate})})}function hm(e){return 1===e.traceFlags}const fm={...Ln,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...im};function mm(e,t,n){e.emit("startPageLoadSpan",t,n),Ne().setTransactionName(t.name);const r=vm(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function gm(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const s=Ne();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...da(),url:r}}),vm(e)}function _m(e){const t=aa.document,n=t?.querySelector(`meta[name=${e}]`);return n?.getAttribute("content")||void 0}const ym="_sentry_idleSpan";function vm(e){return e[ym]}function bm(e,t){re(e,ym,t)}const Sm=1.5;function wm(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function km(e){return wm(e.getAllKeys())}function Em(e){let t;function n(){return null==t&&(t=function(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=wm(n);return e=>r.then(n=>e(n.transaction(t,"readwrite").objectStore(t)))}(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async t=>{try{const r=await rn(t);await function(e,t,n){return e(e=>km(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),wm(e.transaction)}))}(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{const r=await rn(t);await function(e,t,n){return e(e=>km(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),wm(e.transaction)}))}(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const e=await function(e){return e(e=>km(e).then(t=>{const n=t[0];if(null!=n)return wm(e.get(n)).then(t=>(e.delete(n),wm(e.transaction).then(()=>t)))}))}(n());if(e)return on(e)}catch{}}}}const xm=1e6,Cm=String(0),Im="main",Tm=aa.navigator;let Mm="",Rm="",Om="",Am=Tm?.userAgent||"",Lm="";const Dm=Tm?.language||Tm?.languages?.[0]||"";const Nm=Tm?.userAgentData;var Pm;function Fm(e){return function(e){return!("thread_metadata"in e)}(e)?function(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Cm]:{name:Im}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=ve(),a="number"==typeof performance.timeOrigin?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((o,i)=>{if(void 0===o.stackId)return void 0===t&&(t=n,r.stacks[t]=[],n++),void(r.samples[i]={elapsed_since_start_ns:((o.timestamp+c-s)*xm).toFixed(0),stack_id:t,thread_id:Cm});let a=e.stacks[o.stackId];const u=[];for(;a;){u.push(a.frameId);const t=e.frames[a.frameId];t&&void 0===r.frames[a.frameId]&&(r.frames[a.frameId]={function:t.name,abs_path:"number"==typeof t.resourceId?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),a=void 0===a.parentId?void 0:e.stacks[a.parentId]}const l={elapsed_since_start_ns:((o.timestamp+c-s)*xm).toFixed(0),stack_id:n,thread_id:Cm};r.stacks[n]=u,r.samples[i]=l,n++}),r}(e):e}function $m(e,t,n,r){if("transaction"!==r.type)throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(null==n)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const o=function(e){const t=e.contexts?.trace?.trace_id;return"string"==typeof t&&32!==t.length&&ju&&p.log(`[Profiling] Invalid traceId: ${t} on profiled event`),"string"!=typeof t?"":t}(r),s=Fm(n),i=t||("number"==typeof r.start_timestamp?1e3*r.start_timestamp:1e3*ye()),a="number"==typeof r.timestamp?1e3*r.timestamp:1e3*ye();return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Ht,runtime:{name:"javascript",version:aa.navigator.userAgent},os:{name:Mm,version:Rm,build_number:Am},device:{locale:Dm,model:Lm,manufacturer:Am,architecture:Om,is_emulator:!1},debug_meta:{images:Um(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||ue(),trace_id:o,active_thread_id:Cm,relative_start_ns:"0",relative_end_ns:(1e6*(a-i)).toFixed(0)}]}}function Bm(e){return"pageload"===Mt(e).op}function Um(e){const t=Be(),n=t?.getOptions(),r=n?.stackParser;return r?function(e,t){const n=qn(e);if(!n)return[];const r=[];for(const e of t)e&&n[e]&&r.push({type:"sourcemap",code_file:e,debug_id:n[e]});return r}(r,e):[]}"object"==typeof(Pm=Nm)&&null!==Pm&&"getHighEntropyValues"in Pm&&Nm.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Mm=e.platform||"",Om=e.architecture||"",Lm=e.model||"",Rm=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Am=`${t.brand} ${t.version}`}}).catch(e=>{});let jm=!1;function Hm(e){if(jm)return ju&&p.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return ju&&p.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=Be(),n=t?.getOptions();if(!n)return ju&&p.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;if(!("number"!=typeof(o=r)&&"boolean"!=typeof o||"number"==typeof o&&isNaN(o)?(ju&&p.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),0):!0===o||!1===o||!(o<0||o>1)||(ju&&p.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${o}.`),0)))return ju&&p.warn("[Profiling] Discarding profile because of invalid sample rate."),!1;var o;if(!r)return ju&&p.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1;return!!(!0===r||Math.random()<r)||(ju&&p.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1)}function zm(e,t,n,r){return function(e){return e.samples.length<2?(ju&&p.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):!!e.frames.length||(ju&&p.log("[Profiling] Discarding profile because it contains no frames"),!1)}(n)?$m(e,t,n,r):null}const Wm=new Map;function qm(e){const t=Wm.get(e);return t&&Wm.delete(e),t}function Vm(e){let t;Bm(e)&&(t=1e3*ye());const n=function(){const e=aa.Profiler;if("function"!=typeof e)return void(ju&&p.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."));const t=Math.floor(3e3);try{return new e({sampleInterval:10,maxBufferSize:t})}catch(e){ju&&(p.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),p.log("[Profiling] Disabling profiling for current user session.")),jm=!0}}();if(!n)return;ju&&p.log(`[Profiling] started profiling span: ${Mt(e).description}`);const r=ue();async function o(){if(e&&n)return n.stop().then(t=>{s&&(aa.clearTimeout(s),s=void 0),ju&&p.log(`[Profiling] stopped profiling of span: ${Mt(e).description}`),t?function(e,t){if(Wm.set(e,t),Wm.size>30){const e=Wm.keys().next().value;Wm.delete(e)}}(r,t):ju&&p.log(`[Profiling] profiler returned null profile for: ${Mt(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started")}).catch(e=>{ju&&p.log("[Profiling] error while stopping profiler:",e)})}Ne().setContext("profile",{profile_id:r,start_timestamp:t});let s=aa.setTimeout(()=>{ju&&p.log("[Profiling] max profile duration elapsed, stopping profiling for:",Mt(e).description),o()},3e4);const i=e.end.bind(e);e.end=function(){return e?(o().then(()=>{i()},()=>{i()}),e):i()}}const Gm=()=>({name:"BrowserProfiling",setup(e){const t=Ft(),n=t&&Pt(t);n&&Bm(n)&&Hm(n)&&Vm(n),e.on("spanStart",e=>{e===Pt(e)&&Hm(e)&&Vm(e)}),e.on("beforeEnvelope",e=>{if(!Wm.size)return;const t=function(e){const t=[];return en(e,(e,n)=>{if("transaction"===n)for(let n=1;n<e.length;n++){const r=e[n];r?.contexts?.profile?.profile_id&&t.push(e[n])}}),t}(e);if(!t.length)return;const n=[];for(const e of t){const t=e?.contexts,r=t?.profile?.profile_id,o=t?.profile?.start_timestamp;if("string"!=typeof r){ju&&p.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!r){ju&&p.log("[Profiling] cannot find profile for a span without a profile context");continue}t?.profile&&delete t.profile;const s=qm(r);if(!s){ju&&p.log(`[Profiling] Could not retrieve profile for span: ${r}`);continue}const i=zm(r,o,s,e);i&&n.push(i)}!function(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n])}(e,n)})}});const Km=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:"SpotlightBrowser",setup:()=>{ju&&p.log("Using Sidecar URL",t)},processEvent:e=>function(e){return Boolean("transaction"===e.type&&e.spans&&e.contexts?.trace&&"ui.action.click"===e.contexts.trace.op&&e.spans.some(({description:e})=>e?.includes("#sentry-spotlight")))}(e)?null:e,afterAllSetup:e=>{!function(e,t){const n=cu("fetch");let r=0;e.on("beforeEnvelope",e=>{r>3?p.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r):n(t,{method:"POST",body:rn(e),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,p.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",e)})})}(e,t)}}};const Jm=()=>({name:"LaunchDarkly",processEvent:(e,t,n)=>ts(e)});const Ym=()=>({name:"OpenFeature",processEvent:(e,t,n)=>ts(e)});const Xm=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){ne(e.prototype,"isEnabled",Zm)},processEvent:(e,t,n)=>ts(e)});function Zm(e){return function(...t){const n=t[0],r=e.apply(this,t);return"string"==typeof n&&"boolean"==typeof r?(ns(n,r),rs(n,r)):ju&&p.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const Qm=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",e=>{ns(e.gate.name,e.gate.value),rs(e.gate.name,e.gate.value)})},processEvent:(e,t,n)=>ts(e)});const eg=({worker:e})=>({name:"WebWorker",setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>tg(e))},addWorker:e=>tg(e)});function tg(e){e.addEventListener("message",e=>{var t;U(t=e.data)&&!0===t._sentryMessage&&"_sentryDebugIds"in t&&(U(t._sentryDebugIds)||void 0===t._sentryDebugIds)&&(e.stopImmediatePropagation(),ju&&p.log("Sentry debugId web worker message received",e.data),aa._sentryDebugIds={...e.data._sentryDebugIds,...aa._sentryDebugIds})})}var ng=Object.freeze({__proto__:null,BrowserClient:Aa,OpenFeatureIntegrationHook:class{after(e,t){ns(t.flagKey,t.value),rs(t.flagKey,t.value)}error(e,t,n){ns(e.flagKey,e.defaultValue),rs(e.flagKey,e.defaultValue)}},SDK_VERSION:n,SEMANTIC_ATTRIBUTE_SENTRY_OP:We,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:qe,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:He,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:je,Scope:Te,WINDOW:aa,addBreadcrumb:eo,addEventProcessor:tr,addIntegration:pr,breadcrumbsIntegration:zu,browserApiErrorsIntegration:qu,browserProfilingIntegration:Gm,browserSessionIntegration:Ju,browserTracingIntegration:(e={})=>{const n={name:void 0,source:void 0},r=aa.document,{enableInp:o,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:a,_experiments:{enableInteractions:c,enableStandaloneClsSpans:u,enableStandaloneLcpSpans:l},beforeStartSpan:d,idleTimeout:h,finalTimeout:f,childSpanTimeout:m,markBackgroundSpan:g,traceFetch:_,traceXHR:y,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:b,enableHTTPTimings:S,ignoreResourceSpans:w,ignorePerformanceApiSpans:k,instrumentPageLoad:E,instrumentNavigation:x,detectRedirects:C,linkPreviousTrace:I,consistentTraceSampling:T,onRequestSpanStart:M}={...fm,...e};let R,O;function A(e,t,o=!0){const s="pageload"===t.op,i=d?d(t):t,a=i.attributes||{};if(t.name!==i.name&&(a[je]="custom",i.attributes=a),!o){const e=me();return void kn({...i,startTime:e}).end(e)}n.name=i.name,n.source=a[je];const c=Dn(i,{idleTimeout:h,finalTimeout:f,childSpanTimeout:m,disableAutoFinish:s,beforeSpanEnd:t=>{R?.(),Kc(t,{recordClsOnPageloadSpan:!u,recordLcpOnPageloadSpan:!l,ignoreResourceSpans:w,ignorePerformanceApiSpans:k}),bm(e,void 0);const n=Ne(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:c.spanContext().traceId,sampled:Rt(c),dsc:Gt(t)})}});function p(){r&&["interactive","complete"].includes(r.readyState)&&e.emit("idleSpanEnableAutoFinish",c)}bm(e,c),s&&r&&(r.addEventListener("readystatechange",()=>{p()}),p())}return{name:"BrowserTracing",setup(e){if(Ut(),R=Gc({recordClsStandaloneSpans:u||!1,recordLcpStandaloneSpans:l||!1,client:e}),o&&vu(),s&&Nc()&&ve()&&kc("element",Xc),a&&t.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{const t=Ft();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=Pc(ve()+n.startTime),{start_timestamp:r,op:o}=Mt(t);if("navigation"===o&&r&&e<r)continue;const s=Pc(n.duration),i={[qe]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:c,invokerType:u,sourceURL:l,sourceFunctionName:d,sourceCharPosition:p}=a;i["browser.script.invoker"]=c,i["browser.script.invoker_type"]=u,l&&(i["code.filepath"]=l),d&&(i["code.function"]=d),-1!==p&&(i["browser.script.source_char_position"]=p),Lc(t,e,e+s,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:i})}}).observe({type:"long-animation-frame",buffered:!0}):i&&kc("longtask",({entries:e})=>{const t=Ft();if(!t)return;const{op:n,start_timestamp:r}=Mt(t);for(const o of e){const e=Pc(ve()+o.startTime),s=Pc(o.duration);"navigation"===n&&r&&e<r||Lc(t,e,e+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[qe]:"auto.ui.browser.metrics"}})}}),c&&kc("event",({entries:e})=>{const t=Ft();if(t)for(const n of e)if("click"===n.name){const e=Pc(ve()+n.startTime),r=Pc(n.duration),o={name:G(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[qe]:"auto.ui.browser.metrics"}},s=Y(n.target);s&&(o.attributes["ui.component_name"]=s),Lc(t,e,e+r,o)}}),C&&r){const e=()=>{O=ye()};addEventListener("click",e,{capture:!0}),addEventListener("keydown",e,{capture:!0,passive:!0})}function n(){const t=vm(e);t&&!Mt(t).timestamp&&(ju&&p.log(`[Tracing] Finishing current active span with op: ${Mt(t).op}`),t.setAttribute(Ve,"cancelled"),t.end())}e.on("startNavigationSpan",(t,r)=>{if(Be()!==e)return;if(r?.isRedirect)return ju&&p.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void A(e,{op:"navigation.redirect",...t},!1);O=void 0,n(),Pe().setPropagationContext({traceId:ke(),sampleRand:Math.random()});const o=Ne();o.setPropagationContext({traceId:ke(),sampleRand:Math.random()}),o.setSDKProcessingMetadata({normalizedRequest:void 0}),A(e,{op:"navigation",...t})}),e.on("startPageLoadSpan",(t,r={})=>{if(Be()!==e)return;n();const o=bt(r.sentryTrace||_m("sentry-trace"),r.baggage||_m("baggage")),s=Ne();s.setPropagationContext(o),s.setSDKProcessingMetadata({normalizedRequest:da()}),A(e,{op:"pageload",...t})})},afterAllSetup(e){let t=J();if("off"!==I&&pm(e,{linkPreviousTrace:I,consistentTraceSampling:T}),aa.location){if(E){const t=ve();mm(e,{name:aa.location.pathname,startTime:t?t/1e3:void 0,attributes:{[je]:"url",[qe]:"auto.pageload.browser"}})}x&&su(({to:n,from:r})=>{if(void 0===r&&-1!==t?.indexOf(n))return void(t=void 0);t=void 0;const o=zr(n),s=vm(e),i=s&&C&&function(e,t){const n=Mt(e),r=me(),o=n.start_timestamp;if(r-o>Sm)return!1;if(t&&r-t<=Sm)return!1;return!0}(s,O);gm(e,{name:o?.pathname||aa.location.pathname,attributes:{[je]:"url",[qe]:"auto.navigation.browser"}},{url:n,isRedirect:i})})}g&&(aa.document?aa.document.addEventListener("visibilitychange",()=>{const e=Ft();if(!e)return;const t=Pt(e);if(aa.document.hidden&&t){const e="cancelled",{op:n,status:r}=Mt(t);ju&&p.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):ju&&p.warn("[Tracing] Could not set up background tab detection due to lack of global document")),c&&function(e,t,n,r,o){const s=aa.document;let i;const a=()=>{const s="ui.action.click",a=vm(e);if(a){const e=Mt(a).op;if(["navigation","pageload"].includes(e))return void(ju&&p.warn(`[Tracing] Did not create ${s} span because a pageload or navigation span is in progress.`))}i&&(i.setAttribute(Ve,"interactionInterrupted"),i.end(),i=void 0),o.name?i=Dn({name:o.name,op:s,attributes:{[je]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r}):ju&&p.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`)};s&&addEventListener("click",a,{capture:!0})}(e,h,f,m,n),o&&function(){const e=({entries:e})=>{const t=Ft(),n=t&&Pt(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e)||!n)return;const t=e.interactionId;if(null!=t&&!yu.has(t)){if(_u.length>10){const e=_u.shift();yu.delete(e)}_u.push(t),yu.set(t,n)}})};kc("event",e),kc("first-input",e)}(),am(e,{traceFetch:_,traceXHR:y,trackFetchStreamPerformance:v,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:S,onRequestSpanStart:M})}}},buildLaunchDarklyFlagUsedHandler:function(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{ns(e,t.value),rs(e,t.value)}}},captureConsoleIntegration:ko,captureEvent:Xn,captureException:Jn,captureFeedback:cs,captureMessage:Yn,captureSession:sr,chromeStackLineParser:Tu,close:async function(t){const n=Be();return n?n.close(t):(e&&p.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))},consoleLoggingIntegration:ls,contextLinesIntegration:ml,continueTrace:(e,t)=>{const n=De(r());if(n.continueTrace)return n.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=Be(),a=ct(s);return i&&!function(e,t){const n=gt(e);return t&&n&&t!==n?(p.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):!e.getOptions().strictTraceContinuation||!(t&&!n||!t&&n)||(p.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1)}(i,a?.org_id)?Cn(t):$e(e=>{const n=bt(o,s);return e.setPropagationContext(n),t()})},createTransport:$r,createUserFeedbackEnvelope:function(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ht(r)}},s=function(e){return[{type:"user_report"},e]}(e);return Zt(o,[s])},dedupeIntegration:Eo,defaultRequestInstrumentationOptions:im,defaultStackLineParsers:$u,defaultStackParser:Bu,diagnoseSdkConnectivity:async function(){const e=Be();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await xn(()=>fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}},endSession:rr,eventFiltersIntegration:so,eventFromException:Ia,eventFromMessage:Ta,exceptionFromError:va,extraErrorDataIntegration:To,featureFlagsIntegration:os,feedbackAsyncIntegration:ma,feedbackIntegration:ga,feedbackSyncIntegration:ga,flush:async function(t){const n=Be();return n?n.flush(t):(e&&p.warn("Cannot flush events. No client defined."),Promise.resolve(!1))},forceLoad:function(){},functionToStringIntegration:ro,geckoStackLineParser:Ou,getActiveSpan:Ft,getClient:Be,getCurrentScope:Ne,getDefaultIntegrations:nl,getFeedback:function(){const e=Be();return e?.getIntegrationByName("Feedback")},getGlobalScope:Fe,getIsolationScope:Pe,getReplay:function(){const e=Be();return e?.getIntegrationByName("Replay")},getRootSpan:Pt,getSpanDescendants:Nt,getSpanStatusFromHttpCode:tt,getTraceData:Zr,globalHandlersIntegration:Yu,graphqlClientIntegration:vl,httpClientIntegration:al,httpContextIntegration:Qu,inboundFiltersIntegration:io,init:rl,instrumentOutgoingRequests:am,instrumentSupabaseClient:qo,isEnabled:er,isInitialized:function(){return!!Be()},lastEventId:Qn,launchDarklyIntegration:Jm,lazyLoadIntegration:fa,linkedErrorsIntegration:el,logger:ya,makeBrowserOfflineTransport:function(e=wu){return function(e){return t=>{const n=e({...t,createStore:Em});return aa.addEventListener("online",async e=>{await n.flush()}),n}}(Ur(e))},makeFetchTransport:wu,makeMultiplexedTransport:function(e,t){return n=>{const r=e(n),o=new Map;function s(t,r){const s=r?`${t}:${r}`:t;let i=o.get(s);if(!i){const a=ft(t);if(!a)return;const c=ar(a,n.tunnel);i=r?function(e,t){return n=>{const r=e(n);return{...r,send:async e=>{const n=jr(e,["event","transaction","profile","replay_event"]);return n&&(n.release=t),r.send(e)}}}}(e,r)({...n,url:c}):e({...n,url:c}),o.set(s,i)}return[t,i]}return{send:async function(e){const n=t({envelope:e,getEvent:function(t){return jr(e,t?.length?t:["event"])}}).map(e=>"string"==typeof e?s(e,void 0):s(e.dsn,e.release)).filter(e=>!!e),o=n.length?n:[["",r]];return(await Promise.all(o.map(([t,n])=>n.send(function(e,t){return Zt(t?{...e[0],dsn:t}:e[0],e[1])}(e,t)))))[0]},flush:async function(e){const t=[...o.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}}}},moduleMetadataIntegration:vo,onLoad:function(e){e()},openFeatureIntegration:Ym,opera10StackLineParser:Nu,opera11StackLineParser:Fu,parameterize:Jr,registerSpanErrorInstrumentation:Ut,registerWebWorker:function({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})},replayCanvasIntegration:nm,replayIntegration:e=>new kf(e),reportingObserverIntegration:il,rewriteFramesIntegration:Do,sendFeedback:Ts,setContext:Zn,setCurrentClient:Ar,setExtra:function(e,t){Pe().setExtra(e,t)},setExtras:function(e){Pe().setExtras(e)},setHttpStatus:nt,setMeasurement:mn,setTag:function(e,t){Pe().setTag(e,t)},setTags:function(e){Pe().setTags(e)},setUser:function(e){Pe().setUser(e)},showReportDialog:function(e={}){const t=aa.document,n=t?.head||t?.body;if(!n)return void(ju&&p.error("[showReportDialog] Global document not defined"));const r=Ne(),o=Be(),s=o?.getDsn();if(!s)return void(ju&&p.error("[showReportDialog] DSN not configured"));const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Qn()},a=aa.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=function(e,t){const n=_t(e);if(!n)return"";const r=`${ir(n)}embed/error-page/`;let o=`dsn=${ht(n)}`;for(const e in t)if("dsn"!==e&&"onClose"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${o}`}(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{u()}finally{aa.removeEventListener("message",e)}};aa.addEventListener("message",e)}n.appendChild(a)},spanToBaggageHeader:function(e){return ut(Gt(e))},spanToJSON:Mt,spanToTraceHeader:xt,spotlightBrowserIntegration:Km,startBrowserTracingNavigationSpan:gm,startBrowserTracingPageLoadSpan:mm,startInactiveSpan:kn,startNewTrace:Cn,startSession:nr,startSpan:wn,startSpanManual:function(e,t){const n=Mn();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Tn(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return $e(a,()=>An(s)(()=>{const n=Ne(),i=On(n,s),a=e.onlyIfParent&&!i?new Kt:In({parentSpan:i,spanArguments:r,forceTransaction:o,scope:n});return Ce(n,a),bn(()=>t(a,()=>a.end()),()=>{const{status:e}=Mt(a);!a.isRecording()||e&&"ok"!==e||a.setStatus({code:2,message:"internal_error"})})}))},statsigIntegration:Qm,supabaseIntegration:Vo,suppressTracing:xn,thirdPartyErrorFilterIntegration:Zo,unleashIntegration:Xm,updateSpanName:function(e,t){e.updateName(t),e.setAttributes({[je]:"custom",[Je]:t})},webWorkerIntegration:eg,winjsStackLineParser:Lu,withActiveSpan:En,withIsolationScope:function(...e){const t=De(r());if(2===e.length){const[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])},withScope:$e,zodErrorsIntegration:Xo});async function rg(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}"function"==typeof SuppressedError&&SuppressedError;let og=!1;const sg={dsn:"https://123456@dummy.dsn/0",integrations:e=>e.filter(e=>"BrowserSession"!==e.name),transport:function(e){return $r(e,async e=>{if(og)return{statusCode:200};try{await rg("plugin:sentry|envelope",{envelope:e.body})}catch(e){console.error("Failed to send envelope to Rust:",e),og=!0}return{statusCode:200}})},beforeBreadcrumb:function(e){return og||"string"==typeof e.data?.url&&(e.data.url.startsWith("ipc://")||e.data.url.match(/^https?:\/\/ipc\.localhost/))||rg("plugin:sentry|breadcrumb",{breadcrumb:e}).catch(e=>{console.error("Failed to send breadcrumb to Rust:",e),og=!0}),null}};window.Sentry=ng,rl({...sg,debug:__DEBUG__})}();