1import{r as Ae}from"./main-BkWOrGJc.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"1d8a2ea2e6d5b99e39cc8082172a378f7562139a"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1a751335-0e07-4280-a4d6-67072dcf2906",e._sentryDebugIdIdentifier="sentry-dbid-1a751335-0e07-4280-a4d6-67072dcf2906")}catch{}})();const k=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$=globalThis,Gt="10.38.0";function Lt(){return Yr($),$}function Yr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Gt,t[Gt]=t[Gt]||{}}function _r(e,t,n=$){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Gt]=r[Gt]||{};return o[e]||(o[e]=t())}const Va=["debug","info","warn","error","log","assert","trace"],ag="Sentry Logger ",ds={};function sn(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(ds);r.forEach(o=>{const s=ds[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function cg(){Ya().enabled=!0}function ug(){Ya().enabled=!1}function nf(){return Ya().enabled}function lg(...e){Ja("log",...e)}function dg(...e){Ja("warn",...e)}function fg(...e){Ja("error",...e)}function Ja(e,...t){k&&nf()&&sn(()=>{$.console[e](`${ag}[${e}]:`,...t)})}function Ya(){return k?_r("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const g={enable:cg,disable:ug,isEnabled:nf,log:lg,warn:dg,error:fg},rf=50,_t="?",gu=/\(error: (.*)\)/,_u=/captureMessage|captureException/;function of(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const s=[],i=n.split(` 2`);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));const u=gu.test(c)?c.replace(gu,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){s.push(l);break}}if(s.length>=rf+o)break}}return hg(s.slice(o))}}function pg(e){return Array.isArray(e)?of(...e):e}function hg(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(wo(t).function||"")&&t.pop(),t.reverse(),_u.test(wo(t).function||"")&&(t.pop(),_u.test(wo(t).function||"")&&t.pop()),t.slice(0,rf).map(n=>({...n,filename:n.filename||wo(t).filename,function:n.function||_t}))}function wo(e){return e[e.length-1]||{}}const Ri="<anonymous>";function xt(e){try{return!e||typeof e!="function"?Ri:e.name||Ri}catch{return Ri}}function sa(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function sf(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function mg(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const jo={},yu={};function an(e,t){jo[e]=jo[e]||[],jo[e].push(t)}function cn(e,t){if(!yu[e]){yu[e]=!0;try{t()}catch(n){k&&g.error(`Error while instrumenting ${e}`,n)}}}function et(e,t){const n=e&&jo[e];if(n)for(const r of n)try{r(t)}catch(o){k&&g.error(`Error while triggering instrumentation handler. 3Type: ${e} 4Name: ${xt(r)} 5Error:`,o)}}let Ai=null;function af(e){const t="error";an(t,e),cn(t,gg)}function gg(){Ai=$.onerror,$.onerror=function(e,t,n,r,o){return et("error",{column:r,error:o,line:n,msg:e,url:t}),Ai?Ai.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}let Ci=null;function cf(e){const t="unhandledrejection";an(t,e),cn(t,_g)}function _g(){Ci=$.onunhandledrejection,$.onunhandledrejection=function(e){return et("unhandledrejection",e),Ci?Ci.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const uf=Object.prototype.toString;function gt(e){switch(uf.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Mt(e,Error)}}function yr(e,t){return uf.call(e)===`[object ${t}]`}function lf(e){return yr(e,"ErrorEvent")}function Su(e){return yr(e,"DOMError")}function yg(e){return yr(e,"DOMException")}function at(e){return yr(e,"String")}function zs(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}
5function tn(e){return e===null||zs(e)||typeof e!="object"&&typeof e!="function"}function Ye(e){return yr(e,"Object")}function qs(e){return typeof Event<"u"&&Mt(e,Event)}function Sg(e){return typeof Element<"u"&&Mt(e,Element)}function bg(e){return yr(e,"RegExp")}function Ln(e){return!!(e?.then&&typeof e.then=="function")}function Eg(e){return Ye(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Mt(e,t){try{return e instanceof t}catch{return!1}}function df(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function Ka(e){return typeof Request<"u"&&Mt(e,Request)}const Xa=$,Tg=80;function je(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 d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||Tg;for(;n&&s++<r&&(u=vg(n,d),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function vg(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Xa.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(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&at(i)){const a=i.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const s=["aria-label","type","name","title","alt"];for(const i of s){const a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function Dn(){try{return Xa.document.location.href}catch{return""}}function ff(e){if(!Xa.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){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 Me(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&pf(o,r);try{e[t]=o}catch{k&&g.log(`Failed to replace method "${t}" in object`,e)}}function Ee(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{k&&g.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function pf(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Ee(e,"__sentry_original__",t)}catch{}}function Qa(e){return e.__sentry_original__}function hf(e){if(gt(e))return{message:e.message,name:e.name,stack:e.stack,...Eu(e)};if(qs(e)){const t={type:e.type,target:bu(e.target),currentTarget:bu(e.currentTarget),...Eu(e)};return typeof CustomEvent<"u"&&Mt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function bu(e){try{return Sg(e)?je(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Eu(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Ig(e){const t=Object.keys(hf(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Bn;function Kr(e){if(Bn!==void 0)return Bn?Bn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=$;return t in n&&typeof n[t]=="function"?(Bn=n[t],Bn(e)):(Bn=null,e())}function Rt(){return Kr(()=>Math.random())}function Xr(){return Kr(()=>Date.now())}function Br(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function xi(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 fs(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];try{df(o)?n.push(sf(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function zo(e,t,n=!1){return at(e)?bg(t)?t.test(e):at(t)?n?e===t:e.includes(t):!1:!1}function ct(e,t=[],n=!1){return t.some(r=>zo(e,r,n))}function wg(){const e=$;return e.crypto||e.msCrypto}let Mi;function kg(){return Rt()*16}function ke(e=wg()){try{if(e?.randomUUID)return Kr(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Mi||(Mi="10000000100040008000"+1e11),Mi.replace(/[018]/g,t=>(t^(kg()&15)>>t/4).toString(16))}function mf(e){return e.exception?.values?.[0]}function mn(e){const{message:t,event_id:n}=e;if(t)return t;const r=mf(e);return r?r.type&&r.value?`${r.type}: ${r.value}
5`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ia(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 Nt(e,t){const n=mf(e);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){const s={...o?.data,...t.data};n.mechanism.data=s}}function Rg(e,t,n=5){if(t.lineno===void 0)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(i=>xi(i,0));const s=Math.min(r-1,o);t.context_line=xi(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>xi(i,0))}function Tu(e){if(Ag(e))return!0;try{Ee(e,"__sentry_captured__",!0)}catch{}return!1}function Ag(e){try{return e.__sentry_captured__}catch{}}const gf=1e3;function Fn(){return Xr()/gf}function Cg(){const{performance:e}=$;if(!e?.now||!e.timeOrigin)return Fn;const t=e.timeOrigin;return()=>(t+Kr(()=>e.now()))/gf}let vu;function he(){return(vu??(vu=Cg()))()}let Ni=null;function xg(){const{performance:e}=$;if(!e?.now)return;const t=3e5,n=Kr(()=>e.now()),r=Xr(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+n-r)<t)return o;const s=e.timing?.navigationStart;return typeof s=="number"&&Math.abs(s+n-r)<t?s:r-n}function Pe(){return Ni===null&&(Ni=xg()),Ni}function Mg(e){const t=he(),n={sid:ke(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Og(n)};return e&&rr(n,e),n}function rr(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||he(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ke()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n: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),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Ng(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),rr(e,n)}function Og(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${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}}}function Qr(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Qr(r[o],t[o],n-1));return r}function yt(){return ke()}function At(){return ke().substring(16)}const aa="_sentrySpan";function St(e,t){t?Ee(e,aa,t):delete e[aa]}function or(e){return e[aa]}const Pg=100;class bt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:yt(),sampleRand:Rt()}}clone(){const t=new bt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,St(t,or(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&rr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof bt?n.getScopeData():Ye(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:l,conversationId:f}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),f&&(this._conversationId=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,St(this,void 0),this._attachments=[],this.setPropagationContext({traceId:yt(),sampleRand:Rt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Pg;if(r<=0)return this;const o={timestamp:Fn(),...t,message:t.message?Br(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:or(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Qr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||ke();if(!this._client)return k&&g.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||ke();if(!this._client)return k&&g.warn("No client configured on scope - will not capture message!"),o;const s=r?.syntheticException??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||ke();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(k&&g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
5h(t=>{t(this)}),this._notifyingListeners=!1)}}function Lg(){return _r("defaultCurrentScope",()=>new bt)}function Dg(){return _r("defaultIsolationScope",()=>new bt)}class Fg{constructor(t,n){let r;t?r=t:r=new bt;let o;n?o=n:o=new bt,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return Ln(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function sr(){const e=Lt(),t=Yr(e);return t.stack=t.stack||new Fg(Lg(),Dg())}function $g(e){return sr().withScope(e)}function Ug(e,t){const n=sr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Iu(e){return sr().withScope(()=>e(sr().getIsolationScope()))}function Bg(){return{withIsolationScope:Iu,withScope:$g,withSetScope:Ug,withSetIsolationScope:(e,t)=>Iu(t),getCurrentScope:()=>sr().getScope(),getIsolationScope:()=>sr().getIsolationScope()}}function un(e){const t=Yr(e);return t.acs?t.acs:Bg()}function j(){const e=Lt();return un(e).getCurrentScope()}function we(){const e=Lt();return un(e).getIsolationScope()}function Qn(){return _r("globalScope",()=>new bt)}function Ke(...e){const t=Lt(),n=un(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function mM(...e){const t=Lt(),n=un(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function A(){return j().getClient()}function _f(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||At()};return r&&(s.parent_span_id=r),s}const ae="sentry.source",Za="sentry.sample_rate",yf="sentry.previous_trace_sample_rate",pe="sentry.op",G="sentry.origin",Hr="sentry.idle_span_finish_reason",Zr="sentry.measurement_unit",eo="sentry.measurement_value",ca="sentry.custom_span_name",ec="sentry.profile_id",Sr="sentry.exclusive_time",Hg="http.request.method",Wg="url.full",jg="sentry.link.type",zg="gen_ai.conversation.id",qg=0,Gs=1,Z=2;function Gg(e){if(e<400&&e>=100)return{code:Gs};if(e>=400&&e<500)switch(e){case 401:return{code:Z,message:"unauthenticated"};case 403:return{code:Z,message:"permission_denied"};case 404:return{code:Z,message:"not_found"};case 409:return{code:Z,message:"already_exists"};case 413:return{code:Z,message:"failed_precondition"};case 429:return{code:Z,message:"resource_exhausted"};case 499:return{code:Z,message:"cancelled"};default:return{code:Z,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Z,message:"unimplemented"};case 503:return{code:Z,message:"unavailable"};case 504:return{code:Z,message:"deadline_exceeded"};default:return{code:Z,message:"internal_error"}}return{code:Z,message:"internal_error"}}function ps(e,t){e.setAttribute("http.response.status_code",t);const n=Gg(t);n.message!=="unknown_error"&&e.setStatus(n)}const Sf="_sentryScope",bf="_sentryIsolationScope";function Vg(e){try{const t=$.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Jg(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function Yg(e,t,n){e&&(Ee(e,bf,Vg(n)),Ee(e,Sf,t))}function hs(e){const t=e;return{scope:t[Sf],isolationScope:Jg(t[bf])}}const tc="sentry-",Kg=/^sentry-/,Xg=8192;function nc(e){const t=Qg(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.match(Kg)){const i=o.slice(tc.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Ef(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${tc}${r}`]=o),n),{});return Zg(t)}function Qg(e){if(!(!e||!at(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=wu(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):wu(e)}function wu(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Zg(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=o===0?s:`${t},${s}`;return i.length>Xg?(k&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const e_=/^o(\d+)\./,t_=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function n_(e){return e==="http"||e==="https"}function Dt(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}/`}${i}`}function Tf(e){const t=t_.exec(e);if(!t){sn(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return vf({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function vf(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function r_(e){if(!k)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(g.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?n_(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function o_(e){return e.match(e_)?.[1]}function If(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=o_(n)),r}function wf(e){const t=typeof e=="string"?Tf(e):vf(e);if(!(!t||!r_(t)))return t}function wn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const kf=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function s_(e){if(!e)return;const t=e.match(kf);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Rf(e,t){const n=s_(e),r=nc(t);
5if(!n?.traceId)return{traceId:yt(),sampleRand:Rt()};const o=i_(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 Af(e=yt(),t=At(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Cf(e=yt(),t=At(),n){return`00-${e}-${t}-${n?"01":"00"}`}function i_(e,t){const n=wn(t?.sample_rand);if(n!==void 0)return n;const r=wn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Rt()*r:r+Rt()*(1-r):Rt()}function a_(e,t){const n=If(e);return t&&n&&t!==n?(g.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(g.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}const xf=0,rc=1;let ku=!1;function c_(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=F(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Mf(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:F(e).parent_span_id,s=hs(e).scope,i=r?s?.getPropagationContext().propagationSpanId||At():t;return{parent_span_id:o,span_id:i,trace_id:n}}function u_(e){const{traceId:t,spanId:n}=e.spanContext(),r=ln(e);return Af(t,n,r)}function l_(e){const{traceId:t,spanId:n}=e.spanContext(),r=ln(e);return Cf(t,n,r)}function Nf(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===rc,attributes:s,...o}))}function Tn(e){return typeof e=="number"?Ru(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ru(e.getTime()):he()}function Ru(e){return e>9999999999?e/1e3:e}function F(e){if(f_(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(d_(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:u,start_timestamp:Tn(o),timestamp:Tn(i)||void 0,status:Of(a),op:r[pe],origin:r[G],links:Nf(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function d_(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function f_(e){return typeof e.getSpanJSON=="function"}function ln(e){const{traceFlags:t}=e.spanContext();return t===rc}function Of(e){if(!(!e||e.code===qg))return e.code===Gs?"ok":e.message||"internal_error"}const vn="_sentryChildSpans",ua="_sentryRootSpan";function Pf(e,t){const n=e[ua]||e;Ee(t,ua,n),e[vn]?e[vn].add(t):Ee(e,vn,new Set([t]))}function p_(e,t){e[vn]&&e[vn].delete(t)}function qo(e){const t=new Set;function n(r){if(!t.has(r)&&ln(r)){t.add(r);const o=r[vn]?Array.from(r[vn]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}function Se(e){return e[ua]||e}function Te(){const e=Lt(),t=un(e);return t.getActiveSpan?t.getActiveSpan():or(j())}function la(){ku||(sn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),ku=!0)}function gM(e,t){e.updateName(t),e.setAttributes({[ae]:"custom",[ca]:t})}let Au=!1;function h_(){if(Au)return;function e(){const t=Te(),n=t&&Se(t);if(n){const r="internal_error";k&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Z,message:r})}}e.tag="sentry_tracingErrorCallback",Au=!0,af(e),cf(e)}function tt(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||A()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Cu(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ms(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(g_(n)){if(zo(e.description,n))return k&&Cu(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?zo(e.description,n.name):!0,o=n.op?e.op&&zo(e.op,n.op):!0;if(r&&o)return k&&Cu(e),!0}return!1}function m_(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function g_(e){return typeof e=="string"||e instanceof RegExp}const Vs="production",Lf="_frozenDsc";function Go(e,t){Ee(e,Lf,t)}function Df(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Vs,release:n.release,public_key:r,trace_id:e,org_id:If(t)};return t.emit("createDsc",o),o}function oc(e,t){const n=t.getPropagationContext();return n.dsc||Df(n.traceId,e)}function lt(e){const t=A();if(!t)return{};const n=Se(e),r=F(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[Za]??o[yf];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}const c=n[Lf];if(c)return a(c);const u=s?.get("sentry.dsc"),d=u&&nc(u);if(d)return a(d);const l=Df(e.spanContext().traceId,t),f=o[ae],p=r.description;return f!=="url"&&p&&(l.transaction=p),tt()&&(l.sampled=String(ln(n)),l.sample_rand=s?.get("sentry.sample_rand")??hs(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function _M(e){const t=lt(e);return Ef(t)}class Ot{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||At()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:xf}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}
5addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Ge(e,t=100,n=1/0){try{return da("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ff(e,t=3,n=100*1024){const r=Ge(e,t);return b_(r)>n?Ff(e,t-1,n):r}function da(e,t,n=1/0,r=1/0,o=E_()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=__(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return da("",p,c-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const f=hf(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(l>=r){d[p]="[MaxProperties ~]";break}const h=f[p];d[p]=da(p,h,c-1,r,o),l++}return i(t),d}function __(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(df(t))return sf(t);if(Eg(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${xt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=y_(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function y_(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function S_(e){return~-encodeURI(e).split(/%..|./).length}function b_(e){return S_(JSON.stringify(e))}function E_(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function dt(e,t=[]){return[e,t]}function T_(e,t){const[n,r]=e;return[n,[...r,t]]}function kn(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function fa(e,t){return kn(e,(n,r)=>t.includes(r))}function gs(e){const t=Yr($);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function v_(e){const t=Yr($);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function _s(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[gs(r),s]:r.push(typeof s=="string"?gs(s):s)}for(const s of n){const[i,a]=s;if(o(` 6${JSON.stringify(i)} 7`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ge(a))}o(c)}}return typeof r=="string"?r:I_(r)}function I_(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function w_(e){let t=typeof e=="string"?gs(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(v_(n(i)))}const o=r(),s=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;s.push([i,a?n(a):r()])}return[o,s]}function k_(e){return[{type:"span"},e]}function R_(e){const t=typeof e.data=="string"?gs(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const A_={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function xu(e){return A_[e]}function Js(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function $f(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:Dt(r)},...o&&{trace:o}}}function C_(e,t){if(!t)return e;const n=e.sdk||{};return 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}function x_(e,t,n,r){const o=Js(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Dt(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return dt(s,[i])}function M_(e,t,n,r){const o=Js(n),s=e.type&&e.type!=="replay_event"?e.type:"event";C_(e,n?.sdk);const i=$f(e,o,r,t);return delete e.sdkProcessingMetadata,dt(i,[[{type:s},e]])}function N_(e,t){function n(p){return!!p.trace_id&&!!p.public_key}const r=lt(e[0]),o=t?.getDsn(),s=t?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!s&&o&&{dsn:Dt(o)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(p=>!ms(F(p),c)):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);const l=a?p=>{const h=F(p),m=a(h);return m||(la(),h)}:F,f=[];for(const p of u){const h=l(p);
7h&&f.push(k_(h))}return dt(i,f)}function O_(e){if(!k)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=F(e),{spanId:o}=e.spanContext(),s=ln(e),i=Se(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:l}=F(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}g.log(`${c} 8 ${u.join(` 9 `)}`)}function P_(e){if(!k)return;const{description:t="< unknown name >",op:n="< unknown op >"}=F(e),{spanId:r}=e.spanContext(),s=Se(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;g.log(i)}function L_(e,t,n,r=Te()){const o=r&&Se(r);o&&(k&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[eo]:t,[Zr]:n}))}function Mu(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Zr],s=r[eo];typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}const Nu=1e3;class Ys{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||At(),this._startTime=t.startTimestamp||he(),this._links=t.links,this._attributes={},this.setAttributes({[G]:"manual",[pe]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?rc:xf}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Tn(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(ae,"custom"),this}end(t){this._endTime||(this._endTime=Tn(t),P_(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[pe],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Of(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[G],profile_id:this._attributes[ec],exclusive_time:this._attributes[Sr],measurements:Mu(this._events),is_segment:this._isStandaloneSpan&&Se(this)===this||void 0,segment_id:this._isStandaloneSpan?Se(this).spanContext().spanId:void 0,links:Nf(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){k&&g.log("[Tracing] Adding an event to span:",t);const o=Ou(n)?n:r||he(),s=Ou(n)?{}:n||{},i={name:t,time:Tn(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=A();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Se(this)))return;if(this._isStandaloneSpan){this._sampled?F_(N_([this],t)):(k&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(hs(this).scope||j()).captureEvent(r)}_convertSpanToTransaction(){if(!Pu(F(this)))return;this._name||(k&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=hs(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const s=qo(this).filter(d=>d!==this&&!D_(d)).map(d=>F(d)).filter(Pu),i=this._attributes[ae];delete this._attributes[ca],s.forEach(d=>{delete d.data[ca]});const a={contexts:{trace:c_(this)},spans:s.length>Nu?s.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,Nu):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:lt(this)},request:r,...i&&{transaction_info:{source:i}}},c=Mu(this._events);return c&&Object.keys(c).length&&(k&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function Ou(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Pu(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function D_(e){return e instanceof Ys&&e.isStandaloneSpan()}function F_(e){const t=A();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Ks(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return $_(o,t,n,r)}function $_(e,t,n,r){return Ln(e)?e.then(o=>(n(),r(o),o),o=>{throw t(o),n(),o}):(n(),r(e),e)}function U_(e,t,n){if(!tt(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);const s=wn(o);if(s===void 0)return k&&g.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(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!s)return k&&g.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,s,r];const i=n<s;return i||k&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}const ys="__SENTRY_SUPPRESS_TRACING__";function dn(e,t){const n=to();if(n.startSpan)return n.startSpan(e,t);const r=ic(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return Ke(a,()=>Uf(s)(()=>
9{const u=j(),d=ac(u,s),f=e.onlyIfParent&&!d?new Ot:sc({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return St(u,f),Ks(()=>t(f),()=>{const{status:p}=F(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:Z,message:"internal_error"})},()=>{f.end()})}))}function zt(e,t){const n=to();if(n.startSpanManual)return n.startSpanManual(e,t);const r=ic(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return Ke(a,()=>Uf(s)(()=>{const u=j(),d=ac(u,s),f=e.onlyIfParent&&!d?new Ot:sc({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return St(u,f),Ks(()=>t(f,()=>f.end()),()=>{const{status:p}=F(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:Z,message:"internal_error"})})}))}function ut(e){const t=to();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=ic(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?i=>Ke(e.scope,i):o!==void 0?i=>ir(o,i):i=>i())(()=>{const i=j(),a=ac(i,o);return e.onlyIfParent&&!a?new Ot:sc({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}const yM=(e,t)=>{const n=Lt(),r=un(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=A(),a=nc(s);return i&&!a_(i,a?.org_id)?H_(t):Ke(c=>{const u=Rf(o,s);return c.setPropagationContext(u),St(c,void 0),t()})};function ir(e,t){const n=to();return n.withActiveSpan?n.withActiveSpan(e,t):Ke(r=>(St(r,e||void 0),t(r)))}function B_(e){const t=to();return t.suppressTracing?t.suppressTracing(e):Ke(n=>{n.setSDKProcessingMetadata({[ys]:!0});const r=e();return n.setSDKProcessingMetadata({[ys]:void 0}),r})}function H_(e){return Ke(t=>(t.setPropagationContext({traceId:yt(),sampleRand:Rt()}),k&&g.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),ir(null,e)))}function sc({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!tt()){const i=new Ot;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...lt(i)};Go(i,a)}return i}const o=we();let s;if(e&&!n)s=W_(e,r,t),Pf(e,s);else if(e){const i=lt(e),{traceId:a,spanId:c}=e.spanContext(),u=ln(e);s=Lu({traceId:a,parentSpanId:c,...t},r,u),Go(s,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};s=Lu({traceId:i,parentSpanId:c,...t},r,u),a&&Go(s,a)}return O_(s),Yg(s,r,o),s}function ic(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Tn(e.startTime),delete r.startTime,r}return n}function to(){const e=Lt();return un(e)}function Lu(e,t,n){const r=A(),o=r?.getOptions()||{},{name:s=""}=e,i={spanAttributes:{...e.attributes},spanName:s,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const a=i.parentSampled??n,c=i.spanAttributes,u=t.getPropagationContext(),[d,l,f]=t.getScopeData().sdkProcessingMetadata[ys]?[!1]:U_(o,{name:s,parentSampled:a,attributes:c,parentSampleRate:wn(u.dsc?.sample_rate)},u.sampleRand),p=new Ys({...e,attributes:{[ae]:"custom",[Za]:l!==void 0&&f?l:void 0,...c},sampled:d});return!d&&r&&(k&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function W_(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[ys]?!1:ln(e),i=s?new Ys({...n,parentSpanId:r,traceId:o,sampled:s}):new Ot({traceId:o});Pf(e,i);const a=A();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function ac(e,t){if(t)return t;if(t===null)return;const n=or(e);if(!n)return;const r=A();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Se(n):n}function Uf(e){return e!==void 0?t=>ir(e,t):t=>t()}const Vo={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},j_="heartbeatFailed",z_="idleTimeout",q_="finalTimeout",G_="externalFinish";function Bf(e,t={}){const n=new Map;let r=!1,o,s=G_,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=Vo.idleTimeout,finalTimeout:u=Vo.finalTimeout,childSpanTimeout:d=Vo.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:f=!0}=t,p=A();if(!p||!tt()){const b=new Ot,x={sample_rate:"0",sampled:"false",...lt(b)};return Go(b,x),b}const h=j(),m=Te(),_=V_(e);_.end=new Proxy(_.end,{apply(b,x,U){if(l&&l(_),x instanceof Ot)return;const[E,...O]=U,R=E||he(),P=Tn(R),D=qo(_).filter(w=>w!==_),ee=F(_);if(!D.length||!f)return N(P),Reflect.apply(b,x,[P,...O]);const K=p.getOptions().ignoreSpans,ne=D?.reduce((w,V)=>{const se=F(V);return!se.timestamp||K&&ms(se,K)?w:w?Math.max(w,se.timestamp):se.timestamp},void 0),T=ee.start_timestamp,z=Math.min(T?T+u/1e3:1/0,Math.max(T||-1/0,Math.min(P,ne||1/0)));return N(z),Reflect.apply(b,x,[z,...O])}});function y(){o&&(clearTimeout(o),o=void 0)}function S(b){y(),o=setTimeout(()=>{!r&&n.size===0&&i&&(s=z_,_.end(b))},c)}function M(b){o=setTimeout(()=>{!r&&i&&(s=j_,_.end(b))},d)}function v(b){y(),n.set(b,!0);const x=he();M(x+d/1e3)}function L(b){if(n.has(b)&&n.delete(b),n.size===0){const x=he();S(x+c/1e3)}}function N(b){r=!0,n.clear(),a.forEach(D=>D()),St(h,m);const x=F(_),{start_timestamp:U}=x;if(!U)return;x.data[Hr]||_.setAttribute(Hr,s);const O=x.status;(!O||O==="unknown")&&_.setStatus({code:Gs}),g.log(`[Tracing] Idle span "${x.op}" finished`);const R=qo(_).filter(D=>D!==_);let P=0;R.forEach(D=>{D.isRecording()&&(D.setStatus({code:Z,message:"cancelled"}),D.end(b),k&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(D,void 0,2)));const ee=F(D),{timestamp:K=0,start_timestamp:ne=0}=ee,T=ne<=b,z=(u+c)/1e3,w=K-ne<=z;if(k){const V=JSON.stringify(D,void 0,2);T?w||g.log("[Tracing] Discarding span since it finished after idle span final timeout",V):g.log("[Tracing] Discarding span since it happened after idle span was finished",V)}(!w||!T)&&(p_(_,D),P++)}),P>0&&_.setAttribute("sentry.idle_span_discarded_spans",P)}return a.push(p.on("spanStart",b=>{if(r||b===_||F(b).timestamp||b instanceof Ys&&b.isStandaloneSpan())return;qo(_).includes(b)&&v(b.spanContext().spanId)})),a.push(p.on("spanEnd",b=>{r||L(b.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",b=>{b===_&&(i=!0,S(),n.size&&M())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(_.setStatus({code:Z,message:"deadline_exceeded"}),s=q_,_.end())},u),_}function V_(e){const t=ut(e);
9return St(j(),t),k&&g.log("[Tracing] Started span is an idle span"),t}const Oi=0,Du=1,Fu=2;function Xs(e){return new Wr(t=>{t(e)})}function cc(e){return new Wr((t,n)=>{n(e)})}class Wr{constructor(t){this._state=Oi,this._handlers=[],this._runExecutor(t)}then(t,n){return new Wr((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Wr((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Oi)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Du&&n[1](this._value),this._state===Fu&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===Oi){if(Ln(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Du,s)},o=s=>{n(Fu,s)};try{t(r,o)}catch(s){o(s)}}}function J_(e,t,n,r=0){try{const o=pa(t,n,e,r);return Ln(o)?o:Xs(o)}catch(o){return cc(o)}}function pa(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return k&&s===null&&g.log(`Event processor "${o.id||"?"}" dropped event`),Ln(s)?s.then(i=>pa(i,t,n,r+1)):pa(s,t,n,r+1)}let pn,$u,Uu,Bt;function Hf(e){const t=$._sentryDebugIds,n=$._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Bt&&r.length===$u&&o.length===Uu)return Bt;$u=r.length,Uu=o.length,Bt={},pn||(pn={});const s=(i,a)=>{for(const c of i){const u=a[c],d=pn?.[c];if(d&&Bt&&u)Bt[d[0]]=u,pn&&(pn[c]=[d[0],u]);else if(u){const l=e(c);for(let f=l.length-1;f>=0;f--){const h=l[f]?.filename;if(h&&Bt&&pn){Bt[h]=u,pn[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),Bt}function Y_(e,t){const n=Hf(e);if(!n)return[];const r=[];for(const o of t){const s=mg(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function K_(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;X_(e,t),r&&ey(e,r),ty(e,n),Q_(e,o),Z_(e,s)}function Bu(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:l,attachments:f,propagationContext:p,transactionName:h,span:m}=t;Ar(e,"extra",n),Ar(e,"tags",r),Ar(e,"attributes",o),Ar(e,"user",s),Ar(e,"contexts",i),e.sdkProcessingMetadata=Qr(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Ar(e,t,n){e[t]=Qr(e[t],n,1)}function uc(e,t){const n=Qn().getScopeData();return e&&Bu(n,e.getScopeData()),t&&Bu(n,t.getScopeData()),n}function X_(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&&e.type!=="transaction"&&(e.transaction=a)}function Q_(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Z_(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ey(e,t){e.contexts={trace:Mf(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:lt(t),...e.sdkProcessingMetadata};const n=Se(t),r=F(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function ty(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}function Wf(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ke(),timestamp:t.timestamp||Fn()},u=n.integrations||e.integrations.map(_=>_.name);ny(c,e),sy(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&ry(c,e.stackParser);
9const d=ay(r,n.captureContext);n.mechanism&&Nt(c,n.mechanism);const l=o?o.getEventProcessors():[],f=uc(s,d),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),K_(c,f);const h=[...l,...f.eventProcessors];return J_(h,c,n).then(_=>(_&&oy(_),typeof i=="number"&&i>0?iy(_,i,a):_))}function ny(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Vs,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=Br(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Br(a.value,s))})}function ry(e,t){const n=Hf(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function oy(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)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(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function sy(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function iy(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:Ge(o.data,t,n)}}))},...e.user&&{user:Ge(e.user,t,n)},...e.contexts&&{contexts:Ge(e.contexts,t,n)},...e.extra&&{extra:Ge(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ge(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:Ge(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ge(e.contexts.flags,3,n)),r}function ay(e,t){if(!t)return e;const n=e?e.clone():new bt;return n.update(t),n}function cy(e){if(e)return uy(e)?{captureContext:e}:dy(e)?{captureContext:e}:e}function uy(e){return e instanceof bt||typeof e=="function"}const ly=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function dy(e){return Object.keys(e).some(t=>ly.includes(t))}function _e(e,t){return j().captureException(e,cy(t))}function fy(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return j().captureMessage(e,n,r)}function no(e,t){return j().captureEvent(e,t)}function jf(e,t){we().setContext(e,t)}function SM(e){we().setExtras(e)}function bM(e,t){we().setExtra(e,t)}function EM(e){we().setTags(e)}function TM(e,t){we().setTag(e,t)}function vM(e){we().setUser(e)}function py(){return we().lastEventId()}async function IM(e){const t=A();return t?t.flush(e):(k&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function wM(e){const t=A();return t?t.close(e):(k&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function kM(){return!!A()}function hy(){const e=A();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function my(e){we().addEventProcessor(e)}function Hu(e){const t=we(),n=j(),{userAgent:r}=$.navigator||{},o=Mg({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&rr(s,{status:"exited"}),zf(),t.setSession(o),o}function zf(){const e=we(),n=j().getSession()||e.getSession();n&&Ng(n),qf(),e.setSession()}function qf(){const e=we(),t=A(),n=e.getSession();n&&t&&t.captureSession(n)}function Wu(e=!1){if(e){zf();return}qf()}const gy="7";function Gf(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function _y(e){return`${Gf(e)}${e.projectId}/envelope/`}function yy(e,t){const n={sentry_version:gy};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Vf(e,t,n){return t||`${_y(e)}?${yy(e,n)}`}function Sy(e,t){const n=wf(e);if(!n)return"";const r=`${Gf(n)}embed/error-page/`;let o=`dsn=${Dt(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const i=t.user;if(!i)continue;i.name&&(o+=`&name=${encodeURIComponent(i.name)}`),i.email&&(o+=`&email=${encodeURIComponent(i.email)}`)}else o+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${o}`}const ju=[];function by(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Ey(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return by(r)}function Ty(e,t){const n={};return t.forEach(r=>{r&&Jf(e,r,n)}),n}function zu(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Jf(e,t,n){if(n[t.name]){k&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!ju.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),ju.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}k&&g.log(`Integration installed: ${t.name}`)}function qu(e){const t=A();if(!t){k&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function vy(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function Iy(e,t){const{value:n,unit:r}=vy(e)?e:{value:e,unit:void 0},o=wy(n),s=r&&typeof r=="string"?{unit:r}:{};if(o)return{...o,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...s}}function Ss(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const s=Iy(o,t);s&&(n[r]=s)}return n}function wy(e){const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}function Yf(e,t){return t?Ke(t,()=>{const n=Te(),r=n?Mf(n):_f(t);return[n?lt(n):oc(e,t),r]}):[void 0,void 0]}const ky={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Ry(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function Ay(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}
9),n&&r&&(o.dsn=Dt(r)),dt(o,[Ry(e)])}const Cy=100;function ht(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function xy(e,t){const n=dc(),r=Kf(e);r===void 0?n.set(e,[t]):r.length>=Cy?(lc(e,r),n.set(e,[t])):n.set(e,[...r,t])}function bs(e,t=j(),n=xy){const r=t?.getClient()??A();if(!r){k&&g.warn("No client available to capture log.");return}const{release:o,environment:s,enableLogs:i=!1,beforeSendLog:a}=r.getOptions();if(!i){k&&g.warn("logging option not enabled, log will not be captured.");return}const[,c]=Yf(r,t),u={...e.attributes},{user:{id:d,email:l,username:f},attributes:p={}}=uc(we(),t);ht(u,"user.id",d,!1),ht(u,"user.email",l,!1),ht(u,"user.name",f,!1),ht(u,"sentry.release",o),ht(u,"sentry.environment",s);const{name:h,version:m}=r.getSdkMetadata()?.sdk??{};ht(u,"sentry.sdk.name",h),ht(u,"sentry.sdk.version",m);const _=r.getIntegrationByName("Replay"),y=_?.getReplayId(!0);ht(u,"sentry.replay_id",y),y&&_?.getRecordingMode()==="buffer"&&ht(u,"sentry._internal.replay_is_buffering",!0);const S=e.message;if(zs(S)){const{__sentry_template_string__:O,__sentry_template_values__:R=[]}=S;R?.length&&(u["sentry.message.template"]=O),R.forEach((P,D)=>{u[`sentry.message.parameter.${D}`]=P})}const M=or(t);ht(u,"sentry.trace.parent_span_id",M?.spanContext().spanId);const v={...e,attributes:u};r.emit("beforeCaptureLog",v);const L=a?sn(()=>a(v)):v;if(!L){r.recordDroppedEvent("before_send","log_item",1),k&&g.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:b,attributes:x={},severityNumber:U}=L,E={timestamp:he(),level:N,body:b,trace_id:c?.trace_id,severity_number:U??ky[N],attributes:{...Ss(p),...Ss(x,!0)}};n(r,E),r.emit("afterCaptureLog",L)}function lc(e,t){const n=t??Kf(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Ay(n,r._metadata,r.tunnel,e.getDsn());dc().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Kf(e){return dc().get(e)}function dc(){return _r("clientToLogBufferMap",()=>new WeakMap)}function My(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function Ny(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Dt(r)),dt(o,[My(e)])}const Oy=1e3;function It(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function Py(e,t){const n=pc(),r=Xf(e);r===void 0?n.set(e,[t]):r.length>=Oy?(fc(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Ly(e,t,n){const{release:r,environment:o}=t.getOptions(),s={...e.attributes};It(s,"user.id",n.id,!1),It(s,"user.email",n.email,!1),It(s,"user.name",n.username,!1),It(s,"sentry.release",r),It(s,"sentry.environment",o);const{name:i,version:a}=t.getSdkMetadata()?.sdk??{};It(s,"sentry.sdk.name",i),It(s,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return It(s,"sentry.replay_id",u),u&&c?.getRecordingMode()==="buffer"&&It(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}function Dy(e,t,n,r){const[,o]=Yf(t,n),s=or(n),i=s?s.spanContext().traceId:o?.trace_id,a=s?s.spanContext().spanId:void 0;return{timestamp:he(),trace_id:i??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...Ss(r),...Ss(e.attributes,"skip-undefined")}}}function Fy(e,t){const n=t?.scope??j(),r=t?.captureSerializedMetric??Py,o=n?.getClient()??A();if(!o){k&&g.warn("No client available to capture metric.");return}const{_experiments:s,enableMetrics:i,beforeSendMetric:a}=o.getOptions();if(!(i??s?.enableMetrics??!0)){k&&g.warn("metrics option not enabled, metric will not be captured.");return}const{user:u,attributes:d}=uc(we(),n),l=Ly(e,o,u);
9o.emit("processMetric",l);const f=a||s?.beforeSendMetric,p=f?f(l):l;if(!p){k&&g.log("`beforeSendMetric` returned `null`, will not send metric.");return}const h=Dy(p,o,n,d);k&&g.log("[Metric]",h),r(o,h),o.emit("afterCaptureMetric",p)}function fc(e,t){const n=t??Xf(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Ny(n,r._metadata,r.tunnel,e.getDsn());pc().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Xf(e){return pc().get(e)}function pc(){return _r("clientToMetricBufferMap",()=>new WeakMap)}const hc=Symbol.for("SentryBufferFullError");function mc(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return cc(hc);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Xs(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>setTimeout(()=>u(!1),i))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const $y=60*1e3;function Qf(e,t=Xr()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?$y:r-t}function Uy(e,t){return e[t]||e.all||0}function Zf(e,t,n=Xr()){return Uy(e,t)>n}function ep(e,{statusCode:t,headers:n},r=Xr()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),f=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[p]=r+f):o[p]=r+f}else i?o.all=r+Qf(i,r):t===429&&(o.all=r+60*1e3);return o}const tp=64;function By(e,t,n=mc(e.bufferSize||tp)){let r={};const o=i=>n.drain(i);function s(i){const a=[];if(kn(i,(l,f)=>{const p=xu(f);Zf(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(l)}),a.length===0)return Promise.resolve({});const c=dt(i[0],a),u=l=>{if(fa(c,["client_report"])){k&&g.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}kn(c,(f,p)=>{e.recordDroppedEvent(l,xu(p))})},d=()=>t({body:_s(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&k&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=ep(r,l),l),l=>{throw u("network_error"),k&&g.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===hc)return k&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function Hy(e,t,n){const r=[{type:"client_report"},{timestamp:Fn(),discarded_events:e}];return dt(t?{dsn:t}:{},[r])}function np(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}function Wy(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?.[ec],exclusive_time:i?.[Sr],measurements:e.measurements,is_segment:!0}}function jy(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[ec]:e.profile_id},...e.exclusive_time&&{[Sr]:e.exclusive_time}}}},measurements:e.measurements}}const Gu="Not capturing exception because it's already been captured.",Vu="Discarded session because of missing or non-string release",rp=Symbol.for("SentryInternalError"),op=Symbol.for("SentryDoNotSendEventError"),zy=5e3;function Jo(e){return{message:e,[rp]:!0}}function Pi(e){return{message:e,[op]:!0}}function Ju(e){return!!e&&typeof e=="object"&&rp in e}function Yu(e){return!!e&&typeof e=="object"&&op in e}function Ku(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{s+=r(c),s>=8e5?o(e):a||(a=!0,i=setTimeout(()=>{o(e)},zy))}),e.on("flush",()=>{o(e)})}class qy{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=mc(t.transportOptions?.bufferSize??tp),t.dsn?this._dsn=wf(t.dsn):k&&g.warn("No DSN provided, client will not send events."),this._dsn){const r=Vf(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:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Ku(this,"afterCaptureLog","flushLogs",Yy,lc),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Ku(this,"afterCaptureMetric","flushMetrics",Jy,fc)}captureException(t,n,r){const o=ke();if(Tu(t))return k&&g.log(Gu),o;const s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){const s={event_id:ke(),...r}
9,i=zs(t)?t:String(t),a=tn(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){const o=ke();if(n?.originalException&&Tu(n.originalException))return k&&g.log(Gu),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Xu(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),rr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Jf(this,t,this._integrations),n||zu(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=M_(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=T_(r,R_(o));this.sendEnvelope(r).then(o=>
9this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=Vs}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){k&&g.warn(Vu);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){k&&g.warn(Vu);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=x_(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}`;k&&g.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return k&&g.error("Error while sending envelope:",n),{}}return k&&g.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Ty(this,t),zu(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const s=n.exception?.values;if(s){o=!0,r=!1;for(const c of s)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(rr(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),Wf(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:_f(r),...a.contexts};const c=oc(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=j(),o=we()){return k&&ha(t)&&g.log(`Captured error event \`${np(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{k&&(Yu(s)?g.log(s.message):Ju(s)?g.warn(s.message):g.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=sp(t),c=ha(t),d=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:wn(i);if(c&&typeof l=="number"&&Rt()>l)return this.recordDroppedEvent("sample_rate","error"),cc(Pi(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const f=Xu(t.type);return this._prepareEvent(t,n,r,o).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Pi("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const m=Vy(this,s,p,n);return Gy(m,d)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),a){const y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw Pi(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,p),a){const _=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=p.spans?p.spans.length:0,S=_-y;S>0&&this.recordDroppedEvent("before_send","span",S)}const m=p.transaction_info;if(a&&m&&p.transaction!==t.transaction){const _="custom";p.transaction_info={...m,source:_}}return this.sendEvent(p,n),p}).then(null,p=>{throw Yu(p)||Ju(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),Jo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${p}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===hc&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){k&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){k&&g.log("No outcomes to send");return}if(!this._dsn){k&&g.log("No dsn provided, will not send outcomes");return}k&&g.log("Sending outcomes:",t);const n=Hy(t,this._options.tunnel&&Dt(this._dsn));this.sendEnvelope(n)}}function Xu(e){return e==="replay_event"?"replay":e||"error"}function Gy(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Ln(e))return e.then(r=>{if(!Ye(r)&&r!==null)throw Jo(n);return r},r=>{throw Jo(`${t} rejected with ${r}`)});if(!Ye(e)&&e!==null)throw Jo(n);return e}function Vy(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(ha(c)&&o)return o(c,r);if(sp(c)){if(i||a){const u=Wy(c);if(a?.length&&ms(u,a))return null;if(i){const d=i(u);d?c=Qr(n,jy(d)):la()}if(c.spans){const d=[],l=c.spans;for(const p of l){if(a?.length&&ms(p,a)){m_(l,p);continue}if(i){const h=i(p);h?d.push(h):(la(),d.push(p))}else d.push(p)}const f=c.spans.length-d.length;f&&e.recordDroppedEvent("before_send","span",f),c.spans=d}}if(s){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function ha(e){return e.type===void 0}function sp(e){return e.type==="transaction"}function Jy(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+ip(e.attributes)}function Yy(e){let t=0;return e.message&&(t+=e.message.length*2),t+ip(e.attributes)}function ip(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Qu(n[0]):tn(n)?t+=Qu(n):t+=100}),t}function Qu(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Ky(e){return gt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function Zu(e){return Ky(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Xy(e,t){t.debug===!0&&(k?g.enable():sn(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),j().update(t.initialScope);const r=new e(t);return Qy(r),r.init(),r}function Qy(e){j().setClient(e)}const Li=100,Di=5e3,Zy=36e5;function eS(e){function t(...n){k&&g.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s=Di,i;function a(l,f,p){return fa(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,f,p):!0}function c(l){i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const f=await o.shift();f&&(t("Attempting to send previously queued event"),f[0].sent_at=new Date().toISOString(),d(f,!0).catch(p=>{t("Failed to retry sending",p)}))},l),typeof i!="number"&&i.unref&&i.unref()}function u(){i||(c(s),s=Math.min(s*2,Zy))}async function d(l,f=!1){if(!f&&fa(l,["replay_event","replay_recording"]))return await o.push(l),c(Li),{};
10try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const p=await r.send(l);let h=Li;if(p){if(p.headers?.["retry-after"])h=Qf(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])h=6e4;else if((p.statusCode||0)>=400)return p}return c(h),s=Di,p}catch(p){if(await a(l,p,s))return f?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(s=Di,c(Li)),r.flush(l))}}}const Fi="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function ap(e,t){let n;return kn(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function tS(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=ap(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function nS(e,t){return dt(t?{...e[0],dsn:t}:e[0],e[1])}function RM(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{const d=u.getEvent();return d?.extra?.[Fi]&&Array.isArray(d.extra[Fi])?d.extra[Fi]:[]});function i(u,d){const l=d?`${u}:${d}`:u;let f=o.get(l);if(!f){const p=Tf(u);if(!p)return;const h=Vf(p,n.tunnel);f=d?tS(e,d)({...n,url:h}):e({...n,url:h}),o.set(l,f)}return[u,f]}async function a(u){function d(h){const m=h?.length?h:["event"];return ap(u,m)}const l=s({envelope:u,getEvent:d}).map(h=>typeof h=="string"?i(h,void 0):i(h.dsn,h.release)).filter(h=>!!h),f=l.length?l:[["",r]];return(await Promise.all(f.map(([h,m])=>m.send(nS(u,h)))))[0]}async function c(u){const d=[...o.values(),r];return(await Promise.all(d.map(f=>f.flush(u)))).every(f=>f)}return{send:a,flush:c}}}const rS="thismessage:/";function gc(e){return"isRelative"in e}function _c(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?rS:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function oS(e){if(gc(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 In(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 cp(e){return e.split(/[?#]/,1)[0]}function Vt(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&s!==-1){const a=e.slice(s+1);i=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}function up(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return iS(e,n)||sS(e,r)}function sS(e,t){return t?el(e)===el(t):!1}function iS(e,t){const n=_c(e);return!n||gc(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function el(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function aS(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 cS=aS;function uS(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function lp(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:Gt})),version:Gt}),e._metadata=o}function dp(e={}){const t=e.client||A();if(!hy()||!t)return{};const n=Lt(),r=un(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||j(),s=e.span||Te(),i=s?u_(s):lS(o),a=s?lt(s):oc(t,o),c=Ef(a);if(!kf.test(i))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":i,baggage:c};return e.propagateTraceparent&&(d.traceparent=s?l_(s):dS(o)),d}function lS(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Af(t,r,n)}function dS(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Cf(t,r,n)}function fS(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(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function d(){return o!==void 0||s!==void 0?c():r}function l(){return o&&clearTimeout(o),o=a(c,t),i&&s===void 0&&(s=a(c,i)),r}return l.cancel=u,l.flush=d,l}const pS=100;function Et(e,t){const n=A(),r=we();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=pS}=n.getOptions();if(s<=0)return;const a={timestamp:Fn(),...e},c=o?sn(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}let tl;const hS="FunctionToString",nl=new WeakMap,mS=(()=>({name:hS,setupOnce(){tl=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Qa(this),n=nl.has(A())&&t!==void 0?t:this;return tl.apply(n,e)}}catch{}},setup(e){nl.set(e,!0)}})),gS=mS,_S=[/^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$/],yS="EventFilters",SS=(e={})=>{let t;return{name:yS,setup(n){const r=n.getOptions();t=rl(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=rl(e,s)}return ES(n,t)?null:n}}}
10,bS=((e={})=>({...SS(e),name:"InboundFilters"}));function rl(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:_S],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ES(e,t){if(e.type){if(e.type==="transaction"&&vS(e,t.ignoreTransactions))return k&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 11Event: ${mn(e)}`),!0}else{if(TS(e,t.ignoreErrors))return k&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${mn(e)}`),!0;if(RS(e))return k&&g.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${mn(e)}`),!0;if(IS(e,t.denyUrls))return k&&g.warn(`Event dropped due to being matched by \`denyUrls\` option. 14Event: ${mn(e)}. 15Url: ${Es(e)}`),!0;if(!wS(e,t.allowUrls))return k&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option. 16Event: ${mn(e)}. 17Url: ${Es(e)}`),!0}return!1}function TS(e,t){return t?.length?np(e).some(n=>ct(n,t)):!1}function vS(e,t){if(!t?.length)return!1;const n=e.transaction;return n?ct(n,t):!1}function IS(e,t){if(!t?.length)return!1;const n=Es(e);return n?ct(n,t):!1}function wS(e,t){if(!t?.length)return!0;const n=Es(e);return n?ct(n,t):!0}function kS(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Es(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?kS(n):null}catch{return k&&g.error(`Cannot extract url for event ${mn(e)}`),null}}function RS(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function AS(e,t,n,r,o,s){if(!o.exception?.values||!s||!Mt(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=ma(e,t,r,s.originalException,n,o.exception.values,i,0))}function ma(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Mt(r[o],Error)){ol(i,a,r);const u=e(t,r[o]),d=c.length;sl(u,o,d,a),c=ma(e,t,n,r[o],o,[u,...c],u,d)}return fp(r)&&r.errors.forEach((u,d)=>{if(Mt(u,Error)){ol(i,a,r);const l=e(t,u),f=c.length;sl(l,`errors[${d}]`,f,a),c=ma(e,t,n,u,o,[l,...c],l,f)}}),c}function fp(e){return Array.isArray(e.errors)}function ol(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...fp(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function sl(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const pp=new Map,il=new Set;function CS(e){if($._sentryModuleMetadata)for(const t of Object.keys($._sentryModuleMetadata)){const n=$._sentryModuleMetadata[t];if(il.has(t))continue;il.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){pp.set(o.filename,n);break}}}function xS(e,t){return CS(e),pp.get(t)}function hp(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=xS(e,r.filename);o&&(r.module_metadata=o)})})}function mp(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const AM=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{kn(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(mp(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;hp(n,t)})}});function yc(e){const t="console";an(t,e),cn(t,MS)}function MS(){"console"in $&&Va.forEach(function(e){e in $.console&&Me($.console,e,function(t){return ds[e]=t,function(...n){et("console",{args:n,level:e}),ds[e]?.apply($.console,n)}})})}function Ts(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const NS="CaptureConsole",OS=((e={})=>{const t=e.levels||Va,n=e.handled??!0;return{name:NS,setup(r){"console"in $&&yc(({args:o,level:s})=>{A()!==r||!t.includes(s)||PS(o,s,n)})}}}),CM=OS;function PS(e,t,n){const r=Ts(t),o=new Error,s={level:Ts(t),extra:{arguments:e}};Ke(i=>{if(i.addEventProcessor(u=>(u.logger="console",Nt(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){const u=`Assertion failed: ${fs(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),i.captureMessage(u,r,{captureContext:s,syntheticException:o})}return}const a=e.find(u=>u instanceof Error);if(a){_e(a,s);return}const c=fs(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}const LS="Dedupe",DS=(()=>{let e;return{name:LS,processEvent(t){if(t.type)return t;try{if($S(t,e))return k&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),FS=DS;function $S(e,t){return t?!!(US(e,t)||BS(e,t)):!1}function US(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!_p(e,t)||!gp(e,t))}function BS(e,t){const n=al(t),r=al(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!_p(e,t)||!gp(e,t))}function gp(e,t){let n=sa(e),r=sa(t);if(!n&&!r)return!0;
17if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function _p(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function al(e){return e.exception?.values?.[0]}const HS="ExtraErrorData",WS=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:HS,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return jS(r,o,t,n,i)}}}),xM=WS;function jS(e,t={},n,r,o){if(!t.originalException||!gt(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=yp(t.originalException,r,o);if(i){const a={...e.contexts},c=Ge(i,n);return Ye(c)&&(Ee(c,"__sentry_skip_normalization__",!0),a[s]=c),{...e,contexts:a}}return e}function yp(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const i=e[s];o[s]=gt(i)||typeof i=="string"?n?Br(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if(gt(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:yp(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const a=s[i];o[i]=gt(a)?a.toString():a}}return o}catch(r){k&&g.error("Unable to extract extra data from the Error object:",r)}return null}function zS(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const qS=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function GS(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=qS.exec(t);return n?n.slice(1):[]}function cl(...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=zS(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function ul(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 VS(e,t){e=cl(e).slice(1),t=cl(t).slice(1);const n=ul(e.split("/")),r=ul(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){s=a;break}let i=[];for(let a=s;a<n.length;a++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}function JS(e,t){return GS(e)[2]||""}const YS="RewriteFrames",MM=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $&&!!$.window,o=e.iteratee||KS({isBrowser:r,root:t,prefix:n});function s(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>o(c))}}return{name:YS,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function KS({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 i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(o||s){const i=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?VS(t,i):JS(i);r.filename=`${n}${a}`}return r}}const XS=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],QS=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],ZS={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"},Sp=["select","insert","upsert","update","delete"];function Qs(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Zs(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function eb(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>"}}function tb(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&ZS[n]||"filter",`${o}(${e}, ${r.join(".")})`}function ll(e,t=!1){return new Proxy(e,{apply(n,r,o){return dn({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[G]:"auto.db.supabase",[pe]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},s=>Reflect.apply(n,r,o).then(i=>(i&&typeof i=="object"&&"error"in i&&i.error?(s.setStatus({code:Z}),_e(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:Gs}),s.end(),i)).catch(i=>{throw s.setStatus({code:Z}),s.end(),_e(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...o))}})}function nb(e){const t=e.auth;if(!(!t||Zs(e.auth))){for(const n of XS){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=ll(r))}for(const n of QS){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=ll(r,!0))}Qs(e.auth)}}function rb(e){Zs(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const o=Reflect.apply(t,n,r),s=o.constructor;return sb(s),o}}),Qs(e.prototype.from))}function ob(e){Zs(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const o=Sp,s=n,i=eb(s.method,s.headers);if(!o.includes(i)||!s?.url?.pathname||typeof s.url.pathname!="string")return Reflect.apply(t,n,r);const a=s.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];
17for(const[p,h]of s.url.searchParams.entries())u.push(tb(p,h));const d=Object.create(null);if(Ye(s.body))for(const[p,h]of Object.entries(s.body))d[p]=h;const l=`${i==="select"?"":`${i}${d?"(...) ":""}`}${u.join(" ")} from(${c})`,f={"db.table":c,"db.schema":s.schema,"db.url":s.url.origin,"db.sdk":s.headers["X-Client-Info"],"db.system":"postgresql","db.operation":i,[G]:"auto.db.supabase",[pe]:"db"};return u.length&&(f["db.query"]=u),Object.keys(d).length&&(f["db.body"]=d),dn({name:l,attributes:f},p=>Reflect.apply(t,n,[]).then(h=>{if(p&&(h&&typeof h=="object"&&"status"in h&&ps(p,h.status||500),p.end()),h.error){const y=new Error(h.error.message);h.error.code&&(y.code=h.error.code),h.error.details&&(y.details=h.error.details);const S={};u.length&&(S.query=u),Object.keys(d).length&&(S.body=d),_e(y,M=>(M.addEventProcessor(v=>(Nt(v,{handled:!1,type:"auto.db.supabase.postgres"}),v)),M.setContext("supabase",S),M))}const m={type:"supabase",category:`db.${i}`,message:l},_={};return u.length&&(_.query=u),Object.keys(d).length&&(_.body=d),Object.keys(_).length&&(m.data=_),Et(m),h},h=>{throw p&&(ps(p,500),p.end()),h}).then(...r))}}),Qs(e.prototype.then))}function sb(e){for(const t of Sp)Zs(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,o){const s=Reflect.apply(n,r,o),i=s.constructor;return k&&g.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),ob(i),s}}),Qs(e.prototype[t]))}const ib=e=>{if(!e){k&&g.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;rb(t),nb(e)},ab="Supabase",cb=(e=>({setupOnce(){ib(e)},name:ab})),NM=e=>cb(e.supabaseClient),ub=10,lb="ZodErrors";function db(e){return gt(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function fb(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 pb(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function hb(e){const t=new Set;for(const r of e.issues){const o=pb(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Br(n.join(", "),100)}`}function mb(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!db(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(fb);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:s})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:hb(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":s.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message} 18${o.stack}`:"unknown"}}}}}const gb=((e={})=>{const t=e.limit??ub;return{name:lb,processEvent(n,r){return mb(t,e.saveZodIssuesAsAttachment,n,r)}}}),OM=gb,PM=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{kn(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(mp(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;hp(r,n)})},processEvent(t){const n=yb(t,e.ignoreSentryInternalFrames);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](s=>!s.some(i=>e.filterKeys.includes(i)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function _b(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(bb))return!1;if(e.pre_context){const n=e.pre_context.length;for(let r=0;r<n;r++)if(e.pre_context[r]?.includes(Sb))return!0}return!1}function yb(e,t){const n=sa(e);if(n)return n.filter((r,o)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!_b(r,o)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(o=>o.startsWith(dl)).map(o=>o.slice(dl.length)):[])}const dl="_sentryBundlerPluginAppKey:",Sb="Attempt to invoke user-land function",bb="fn.apply(this, wrappedArguments)",Eb=100,Tb=10,ko="flag.evaluation.";function br(e){const n=j().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Rn(e,t,n=Eb){const r=j().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;vb(o,e,t,n)}function vb(e,t,n,r){if(typeof n!="boolean")return;if(e.length>
18r){k&&g.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const o=e.findIndex(s=>s.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function An(e,t,n=Tb){if(typeof t!="boolean")return;const r=Te();if(!r)return;const o=F(r).data;if(`${ko}${e}`in o){r.setAttribute(`${ko}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(ko)).length<n&&r.setAttribute(`${ko}${e}`,t)}const LM=()=>({name:"FeatureFlags",processEvent(e,t,n){return br(e)},addFeatureFlag(e,t){Rn(e,t),An(e,t)}}),Ib=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Me(t,"isOn",fl),typeof t.getFeatureValue=="function"&&Me(t,"getFeatureValue",fl)},processEvent(t,n,r){return br(t)}});function fl(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(Rn(n,r),An(n,r)),r}}const wb="ConversationId",kb=(()=>({name:wb,setup(e){e.on("spanStart",t=>{const n=j().getScopeData(),r=we().getScopeData(),o=n.conversationId||r.conversationId;o&&t.setAttribute(zg,o)})}})),Rb=kb;function Ab(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=tt()&&t(i);if(e.endTimestamp&&a){const p=e.fetchData.__span;if(!p)return;const h=r[p];h&&(Mb(h,e),Cb(h,e,o),delete r[p]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof o=="object"?o:{spanOrigin:o},d=!!Te(),l=a&&d?ut(Ob(i,s,c)):new Ot;if(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(e.fetchData.url)){const p=e.args[0],h={...e.args[1]||{}},m=xb(p,h,tt()&&d?l:void 0,u);m&&(e.args[1]=h,h.headers=m)}const f=A();if(f){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",l,p)}return l}function Cb(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function xb(e,t,n,r){const o=dp({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(Ka(e)?e.headers:void 0);if(c)if(Nb(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",s),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const d=u.get("baggage");d?Ro(d)||u.set("baggage",`${d},${i}`):u.set("baggage",i)}return u}else if(Array.isArray(c)){const u=[...c];c.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",s]),r&&a&&!c.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);const d=c.find(l=>l[0]==="baggage"&&Ro(l[1]));return i&&!d&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,d="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,f=l?Array.isArray(l)?[...l]:[l]:[],p=l&&(Array.isArray(l)?l.find(m=>Ro(m)):Ro(l));i&&!p&&f.push(i);const h={...c,"sentry-trace":u??s,baggage:f.length>0?f.join(","):void 0};return r&&a&&!d&&(h.traceparent=a),h}else return{...o}}function Mb(e,t){if(t.response){ps(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:Z,message:"internal_error"});e.end()}function Ro(e){return e.split(",").some(t=>t.trim().startsWith(tc))}function Nb(e){return typeof Headers<"u"&&Mt(e,Headers)}function Ob(e,t,n){if(e.startsWith("data:")){const s=Vt(e);return{name:`${t} ${s}`,attributes:pl(e,void 0,t,n)}}const r=_c(e),o=r?oS(r):e;return{name:`${t} ${o}`,attributes:pl(e,r,t,n)}}function pl(e,t,n,r){const o={url:Vt(e),type:"fetch","http.method":n,[G]:r,[pe]:"http.client"};return t&&(gc(t)||(o["http.url"]=Vt(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function Pb(e,t={},n=j()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||A();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}function Er(e,t,n,r,o){bs({level:e,message:t,attributes:n,severityNumber:o},r)}
18function Lb(e,t,{scope:n}={}){Er("trace",e,t,n)}function Db(e,t,{scope:n}={}){Er("debug",e,t,n)}function Fb(e,t,{scope:n}={}){Er("info",e,t,n)}function $b(e,t,{scope:n}={}){Er("warn",e,t,n)}function Ub(e,t,{scope:n}={}){Er("error",e,t,n)}function Bb(e,t,{scope:n}={}){Er("fatal",e,t,n)}const DM=Object.freeze(Object.defineProperty({__proto__:null,debug:Db,error:Ub,fatal:Bb,fmt:cS,info:Fb,trace:Lb,warn:$b},Symbol.toStringTag,{value:"Module"}));function ga(e,t,n){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):Hb(e,t,n)}function Hb(e,t,n){return e.map(r=>tn(r)?String(r):JSON.stringify(Ge(r,t,n))).join(" ")}function Wb(e){return/%[sdifocO]/.test(e)}function jb(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,s)=>{n[`sentry.message.parameter.${s}`]=o}),n}const zb="ConsoleLogs",hl={[G]:"auto.log.console"},qb=((e={})=>{const t=e.levels||Va;return{name:zb,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){k&&g.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}yc(({args:i,level:a})=>{if(A()!==n||!t.includes(a))return;const c=i[0],u=i.slice(1);if(a==="assert"){if(!c){const p=u.length>0?`Assertion failed: ${ga(u,o,s)}`:"Assertion failed";bs({level:"error",message:p,attributes:hl})}return}const d=a==="log",l=i.length>1&&typeof i[0]=="string"&&!Wb(i[0]),f={...hl,...l?jb(c,u):{}};bs({level:d?"info":a,message:ga(i,o,s),severityNumber:d?10:void 0,attributes:f})})}}}),FM=qb;function Sc(e,t,n,r){Fy({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function Gb(e,t=1,n){Sc("counter",e,t,n)}function Vb(e,t,n){Sc("gauge",e,t,n)}function Jb(e,t,n){Sc("distribution",e,t,n)}const $M=Object.freeze(Object.defineProperty({__proto__:null,count:Gb,distribution:Jb,gauge:Vb},Symbol.toStringTag,{value:"Module"})),Yb=["trace","debug","info","warn","error","fatal"];function UM(e={}){const t=new Set(e.levels??Yb),n=e.client;return{log(r){const{type:o,level:s,message:i,args:a,tag:c,date:u,...d}=r,l=n||A();if(!l)return;const f=Qb(o,s);if(!t.has(f))return;const{normalizeDepth:p=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),m=[];i&&m.push(i),a&&a.length>0&&m.push(ga(a,p,h));const _=m.join(" ");d["sentry.origin"]="auto.log.consola",c&&(d["consola.tag"]=c),o&&(d["consola.type"]=o),s!=null&&typeof s=="number"&&(d["consola.level"]=s),bs({level:f,message:_,attributes:d})}}}const Kb={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},Xb={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function Qb(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=Kb[e];if(n)return n}if(typeof t=="number"){const n=Xb[t];if(n)return n}return"info"}const Zb="gen_ai.prompt",ei="gen_ai.system",We="gen_ai.request.model",bc="gen_ai.request.stream",ti="gen_ai.request.temperature",Ec="gen_ai.request.max_tokens",ni="gen_ai.request.frequency_penalty",Tc="gen_ai.request.presence_penalty",ri="gen_ai.request.top_p",bp="gen_ai.request.top_k",eE="gen_ai.request.encoding_format",tE="gen_ai.request.dimensions",fn="gen_ai.response.finish_reasons",Ft="gen_ai.response.model",$n="gen_ai.response.id",nE="gen_ai.response.stop_reason",Cn="gen_ai.usage.input_tokens",xn="gen_ai.usage.output_tokens",Mn="gen_ai.usage.total_tokens",nn="gen_ai.operation.name",Nn="sentry.sdk_meta.gen_ai.input.messages.original_length",Tr="gen_ai.input.messages",ro="gen_ai.system_instructions",nt="gen_ai.response.text",oi="gen_ai.request.available_tools",si="gen_ai.response.streaming",vt="gen_ai.response.tool_calls",Ep="gen_ai.agent.name",rE="gen_ai.pipeline.name",vc="gen_ai.conversation.id",oE="gen_ai.usage.cache_creation_input_tokens",sE="gen_ai.usage.cache_read_input_tokens",iE="gen_ai.invoke_agent",aE="gen_ai.embeddings.input",cE="gen_ai.tool.name",uE="gen_ai.tool.input",lE="gen_ai.tool.output",Tp="openai.response.id",vp="openai.response.model",Ip="openai.response.timestamp",dE="openai.usage.completion_tokens",fE="openai.usage.prompt_tokens",Mr={CHAT:"chat",EMBEDDINGS:"embeddings"},ml="anthropic.response.timestamp",wp=2e4,vs=e=>new TextEncoder().encode(e).length,Ic=e=>vs(JSON.stringify(e));function ii(e,t){if(vs(e)<=t)return e;let n=0,r=e.length,o="";for(;n<=r;){const s=Math.floor((n+r)/2),i=e.slice(0,s);vs(i)<=t?(o=i,n=s+1):r=s-1}return o}function pE(e){return typeof e=="string"?e:"text"in e?e.text:""}function gl(e,t){return typeof e=="string"?t:{...e,text:t}}function hE(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function mE(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function Lr(e){return!e||typeof e!="object"?!1:gE(e)||kp(e)||"media_type"in e&&typeof e.media_type=="string"&&"data"in e||"image_url"in e&&typeof e.image_url=="string"&&e.image_url.startsWith("data:")||"type"in e&&(e.type==="blob"||e.type==="base64")||"b64_json"in e||"type"in e&&"result"in e&&e.type==="image_generation"||"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}function gE(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&Lr(e.source)}function kp(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="str
18ing"}function Rp(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function _E(e,t){const n={...e,content:""},r=Ic(n),o=t-r;if(o<=0)return[];const s=ii(e.content,o);return[{...e,content:s}]}function yE(e,t){const{parts:n}=e,r=n.map(a=>gl(a,"")),o=Ic({...e,parts:r});let s=t-o;if(s<=0)return[];const i=[];for(const a of n){const c=pE(a),u=vs(c);if(u<=s)i.push(a),s-=u;else if(i.length===0){const d=ii(c,s);d&&i.push(gl(a,d));break}else break}return i.length<=0?[]:[{...e,parts:i}]}function SE(e,t){if(!e)return[];if(typeof e=="string"){const n=ii(e,t);return n?[n]:[]}return typeof e!="object"?[]:hE(e)?_E(e,t):Rp(e)?yE(e,t):[]}const _l="[Filtered]",bE=["image_url","data","content","b64_json","result","uri"];function Yo(e){const t={...e};Lr(t.source)&&(t.source=Yo(t.source)),kp(e)&&(t.inlineData={...e.inlineData,data:_l});for(const n of bE)typeof t[n]=="string"&&(t[n]=_l);return t}function _a(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(mE(n)?r={...n,content:_a(n.content)}:"content"in n&&Lr(n.content)&&(r={...n,content:Yo(n.content)}),Rp(n)&&(r={...r??n,parts:_a(n.parts)}),Lr(r)?r=Yo(r):Lr(n)&&(r=Yo(n))),r??n})}function EE(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=e[e.length-1],r=_a([n]),o=r[0];return Ic(o)<=t?r:SE(o,t)}function ai(e){return EE(e,wp)}function TE(e){return ii(e,wp)}function oo(e){return e.includes("messages")?"chat":e.includes("completions")?"text_completion":e.includes("generateContent")?"generate_content":e.includes("models")?"models":e.includes("chat")?"chat":e.split(".").pop()||"unknown"}function Is(e){return`gen_ai.${oo(e)}`}function Ap(e,t){return e?`${e}.${t}`:t}function wc(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[Cn]:t}),n!==void 0&&e.setAttributes({[xn]:n}),t!==void 0||n!==void 0||r!==void 0||o!==void 0){const s=(t??0)+(n??0)+(r??0)+(o??0);e.setAttributes({[Mn]:s})}}function Cp(e){if(typeof e=="string")return TE(e);if(Array.isArray(e)){const t=ai(e);return JSON.stringify(t)}return JSON.stringify(e)}function so(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(i=>i&&typeof i=="object"&&"role"in i&&i.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;if(!r)return{systemInstructions:void 0,filteredMessages:e};const o=JSON.stringify([{type:"text",content:r}]),s=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:o,filteredMessages:s}}const vE=["responses.create","chat.completions.create","embeddings.create","conversations.create"],IE=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],wE=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...IE];function kc(e){return e.includes("chat.completions")||e.includes("responses")?Mr.CHAT:e.includes("embeddings")?Mr.EMBEDDINGS:e.includes("conversations")?Mr.CHAT:e.split(".").pop()||"unknown"}function yl(e){return`gen_ai.${kc(e)}`}function kE(e){return vE.includes(e)}function RE(e,t){return e?`${e}.${t}`:t}function AE(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion"}function CE(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="response"}function xE(e){if(e===null||typeof e!="object"||!("object"in e))return!1;const t=e;return t.object==="list"&&typeof t.model=="string"&&t.model.toLowerCase().includes("embedding")}function ME(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="conversation"}function NE(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function OE(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function PE(e,t,n){if(Rc(e,t.id,t.model,t.created),t.usage&&ci(e,t.usage.prompt_tokens,t.usage.completion_tokens,t.usage.total_tokens),Array.isArray(t.choices)){const r=t.choices.map(o=>o.finish_reason).filter(o=>o!==null);if(r.length>0&&e.setAttributes({[fn]:JSON.stringify(r)}),n){const o=t.choices.map(s=>s.message?.tool_calls).filter(s=>Array.isArray(s)&&s.length>0).flat();o.length>0&&e.setAttributes({[vt]:JSON.stringify(o)})}}}function LE(e,t,n){if(Rc(e,t.id,t.model,t.created_at),t.status&&e.setAttributes({[fn]:JSON.stringify([t.status])}),t.usage&&ci(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.total_tokens),n){const r=t;if(Array.isArray(r.output)&&r.output.length>
180){const o=r.output.filter(s=>typeof s=="object"&&s!==null&&s.type==="function_call");o.length>0&&e.setAttributes({[vt]:JSON.stringify(o)})}}}function DE(e,t){e.setAttributes({[vp]:t.model,[Ft]:t.model}),t.usage&&ci(e,t.usage.prompt_tokens,void 0,t.usage.total_tokens)}function FE(e,t){const{id:n,created_at:r}=t;e.setAttributes({[Tp]:n,[$n]:n,[vc]:n}),r&&e.setAttributes({[Ip]:new Date(r*1e3).toISOString()})}function ci(e,t,n,r){t!==void 0&&e.setAttributes({[fE]:t,[Cn]:t}),n!==void 0&&e.setAttributes({[dE]:n,[xn]:n}),r!==void 0&&e.setAttributes({[Mn]:r})}function Rc(e,t,n,r){e.setAttributes({[Tp]:t,[$n]:t}),e.setAttributes({[vp]:n,[Ft]:n}),e.setAttributes({[Ip]:new Date(r*1e3).toISOString()})}function $E(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function UE(e){const t={[We]:e.model??"unknown"};"temperature"in e&&(t[ti]=e.temperature),"top_p"in e&&(t[ri]=e.top_p),"frequency_penalty"in e&&(t[ni]=e.frequency_penalty),"presence_penalty"in e&&(t[Tc]=e.presence_penalty),"stream"in e&&(t[bc]=e.stream),"encoding_format"in e&&(t[eE]=e.encoding_format),"dimensions"in e&&(t[tE]=e.dimensions);const n=$E(e);return n&&(t[vc]=n),t}function BE(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const o=t.chatCompletionToolCalls[r];n.function.arguments&&o?.function&&(o.function.arguments+=n.function.arguments)}}}function HE(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,t.responseTimestamp=e.created??t.responseTimestamp,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&BE(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function WE(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:Z,message:"internal_error"}),_e(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!wE.includes(o.type)){t.eventTypes.push(o.type);return}if(n&&(o.type==="response.output_item.done"&&"item"in o&&t.responsesApiToolCalls.push(o.item),o.type==="response.output_text.delta"&&"delta"in o&&o.delta)){t.responseTexts.push(o.delta);return}if("response"in o){const{response:s}=o;t.responseId=s.id??t.responseId,t.responseModel=s.model??t.responseModel,t.responseTimestamp=s.created_at??t.responseTimestamp,s.usage&&(t.promptTokens=s.usage.input_tokens,t.completionTokens=s.usage.output_tokens,t.totalTokens=s.usage.total_tokens),s.status&&t.finishReasons.push(s.status),n&&s.output_text&&t.responseTexts.push(s.output_text)}}async function*jE(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",responseTimestamp:0,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const o of e)OE(o)?HE(o,r,n):NE(o)&&WE(o,r,n,t),yield o}finally{Rc(t,r.responseId,r.responseModel,r.responseTimestamp),ci(t,r.promptTokens,r.completionTokens,r.totalTokens),t.setAttributes({[si]:!0}),r.finishReasons.length&&t.setAttributes({[fn]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length&&t.setAttributes({[nt]:r.responseTexts.join("")});const s=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];s.length>0&&t.setAttributes({[vt]:JSON.stringify(s)}),t.end()}}function zE(e){const t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],o=[...t,...r];return o.length>0?JSON.stringify(o):void 0}function qE(e,t){const n={[ei]:"openai",[nn]:kc(t),[G]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=zE(r);o&&(n[oi]=o),Object.assign(n,UE(r))}else n[We]="unknown";return n}function GE(e,t,n){if(!t||typeof t!="object")return;const r=t;if(AE(r)){if(PE(e,r,n),n&&r.choices?.length){const o=r.choices.map(s=>s.message?.content||"");e.setAttributes({[nt]:JSON.stringify(o)})}}else CE(r)?(LE(e,r,n),n&&r.output_text&&e.setAttributes({[nt]:r.output_text})):xE(r)?DE(e,r):ME(r)&&FE(e,r)}function Sl(e,t,n){if(n===Mr.EMBEDDINGS&&"input"in t){const a=t.input;
18if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(aE,typeof a=="string"?a:JSON.stringify(a));return}const r="input"in t?t.input:"messages"in t?t.messages:void 0;if(!r||Array.isArray(r)&&r.length===0)return;const{systemInstructions:o,filteredMessages:s}=so(r);o&&e.setAttribute(ro,o);const i=Cp(s);e.setAttribute(Tr,i),Array.isArray(s)?e.setAttribute(Nn,s.length):e.setAttribute(Nn,1)}function VE(e,t,n,r){return async function(...s){const i=qE(s,t),a=i[We]||"unknown",c=kc(t),u=s[0];return u&&typeof u=="object"&&u.stream===!0?zt({name:`${c} ${a} stream-response`,op:yl(t),attributes:i},async l=>{try{r.recordInputs&&u&&Sl(l,u,c);const f=await e.apply(n,s);return jE(f,l,r.recordOutputs??!1)}catch(f){throw l.setStatus({code:Z,message:"internal_error"}),_e(f,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),l.end(),f}}):dn({name:`${c} ${a}`,op:yl(t),attributes:i},async l=>{try{r.recordInputs&&u&&Sl(l,u,c);const f=await e.apply(n,s);return GE(l,f,r.recordOutputs),f}catch(f){throw _e(f,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),f}})}}function xp(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=RE(t,String(o));return typeof s=="function"&&kE(i)?VE(s,i,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?xp(s,i,n):s}})}function BM(e,t){const n=!!A()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return xp(e,"",r)}function JE(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:Z,message:e.error?.type??"internal_error"}),_e(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function YE(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens=="number"&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function KE(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function XE(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&typeof e.delta.partial_json=="string"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function QE(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let o;try{o=r?JSON.parse(r):{}}catch{o={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete t.activeToolBlocks[e.index]}function Mp(e,t,n,r){!(e&&typeof e=="object")||JE(e,r)||(YE(e,t),KE(e,t),XE(e,t,n),QE(e,t))}function ZE(e,t,n){t.isRecording()&&(e.responseId&&t.setAttributes({[$n]:e.responseId}),e.responseModel&&t.setAttributes({[Ft]:e.responseModel}),wc(t,e.promptTokens,e.completionTokens,e.cacheCreationInputTokens,e.cacheReadInputTokens),t.setAttributes({[si]:!0}),e.finishReasons.length>0&&t.setAttributes({[fn]:JSON.stringify(e.finishReasons)}),n&&e.responseTexts.length>0&&t.setAttributes({[nt]:e.responseTexts.join("")}),n&&e.toolCalls.length>0&&t.setAttributes({[vt]:JSON.stringify(e.toolCalls)}),t.end())}async function*eT(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const o of e)Mp(o,r,n,t),yield o}finally{r.responseId&&t.setAttributes({[$n]:r.responseId}),r.responseModel&&t.setAttributes({[Ft]:r.responseModel}),wc(t,r.promptTokens,r.completionTokens,r.cacheCreationInputTokens,r.cacheReadInputTokens),t.setAttributes({[si]:!0}),r.finishReasons.length>0&&t.setAttributes({[fn]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length>0&&t.setAttributes({[nt]:r.responseTexts.join("")}),n&&r.toolCalls.length>0&&t.setAttributes({[vt]:JSON.stringify(r.toolCalls)}),t.end()}}function tT(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",o=>{Mp(o,r,n,t)}),e.on("message",()=>{ZE(r,t,n)}),e.on("error",o=>{_e(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:Z,message:"stream_error"}),t.end())}),e}const nT=["messages.create","messages.stream","messages.countTokens","models.get","completions.
18create","models.retrieve","beta.messages.create"];function rT(e){return nT.includes(e)}function oT(e,t){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:n,filteredMessages:r}=so(t);n&&e.setAttributes({[ro]:n});const o=Array.isArray(r)?r.length:1;e.setAttributes({[Tr]:Cp(r),[Nn]:o})}function sT(e,t){t.error&&(e.setStatus({code:Z,message:t.error.type||"internal_error"}),_e(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function iT(e){const{system:t,messages:n,input:r}=e,o=typeof t=="string"?[{role:"system",content:e.system}]:[],s=Array.isArray(r)?r:r!=null?[r]:void 0,i=Array.isArray(n)?n:n!=null?[n]:[],a=s??i;return[...o,...a]}function aT(e,t){const n={[ei]:"anthropic",[nn]:oo(t),[G]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0];r.tools&&Array.isArray(r.tools)&&(n[oi]=JSON.stringify(r.tools)),n[We]=r.model??"unknown","temperature"in r&&(n[ti]=r.temperature),"top_p"in r&&(n[ri]=r.top_p),"stream"in r&&(n[bc]=r.stream),"top_k"in r&&(n[bp]=r.top_k),"frequency_penalty"in r&&(n[ni]=r.frequency_penalty),"max_tokens"in r&&(n[Ec]=r.max_tokens)}else t==="models.retrieve"||t==="models.get"?n[We]=e[0]:n[We]="unknown";return n}function ya(e,t){const n=iT(t);oT(e,n),"prompt"in t&&e.setAttributes({[Zb]:JSON.stringify(t.prompt)})}function cT(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[nt]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[vt]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[nt]:t.completion}),"input_tokens"in t&&e.setAttributes({[nt]:JSON.stringify(t.input_tokens)})}function uT(e,t){"id"in t&&"model"in t&&(e.setAttributes({[$n]:t.id,[Ft]:t.model}),"created"in t&&typeof t.created=="number"&&e.setAttributes({[ml]:new Date(t.created*1e3).toISOString()}),"created_at"in t&&typeof t.created_at=="number"&&e.setAttributes({[ml]:new Date(t.created_at*1e3).toISOString()}),"usage"in t&&t.usage&&wc(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function lT(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){sT(e,t);return}n&&cT(e,t),uT(e,t)}}function bl(e,t,n){throw _e(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:Z,message:"internal_error"}),t.end()),e}function dT(e,t,n,r,o,s,i,a,c,u,d){const l=o[We]??"unknown",f={name:`${s} ${l} stream-response`,op:Is(i),attributes:o};return u&&!d?zt(f,async p=>{try{c.recordInputs&&a&&ya(p,a);const h=await e.apply(n,r);return eT(h,p,c.recordOutputs??!1)}catch(h){return bl(h,p,i)}}):zt(f,p=>{try{c.recordInputs&&a&&ya(p,a);const h=t.apply(n,r);return tT(h,p,c.recordOutputs??!1)}catch(h){return bl(h,p,i)}})}function fT(e,t,n,r){return new Proxy(e,{apply(o,s,i){const a=aT(i,t),c=a[We]??"unknown",u=oo(t),d=typeof i[0]=="object"?i[0]:void 0,l=!!d?.stream,f=t==="messages.stream";return l||f?dT(e,o,n,i,a,u,t,d,r,l,f):dn({name:`${u} ${c}`,op:Is(t),attributes:a},p=>(r.recordInputs&&d&&ya(p,d),Ks(()=>o.apply(n,i),h=>{_e(h,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}})},()=>{},h=>lT(p,h,r.recordOutputs))))}})}function Np(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=Ap(t,String(o));return typeof s=="function"&&rT(i)?fT(s,i,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?Np(s,i,n):s}})}function HM(e,t){const n=!!A()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return Np(e,"",r)}const El=["models.generateContent","models.generateContentStream","chats.create","sendMessage","sendMessageStream"],pT="google_genai",Op="chats.create",hT="chat";function mT(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:Z,message:`Content blocked: ${r}`}),_e(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function gT(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="str
18ing"&&(t.responseModel=e.modelVersion);const n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function _T(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const o of r?.content?.parts??[])n&&o.text&&t.responseTexts.push(o.text),o.functionCall&&t.toolCalls.push({type:"function",id:o.functionCall.id,name:o.functionCall.name,arguments:o.functionCall.args})}}function yT(e,t,n,r){!e||mT(e,r)||(gT(e,t),_T(e,t,n))}async function*ST(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)yT(o,r,n,t),yield o}finally{const o={[si]:!0};r.responseId&&(o[$n]=r.responseId),r.responseModel&&(o[Ft]=r.responseModel),r.promptTokens!==void 0&&(o[Cn]=r.promptTokens),r.completionTokens!==void 0&&(o[xn]=r.completionTokens),r.totalTokens!==void 0&&(o[Mn]=r.totalTokens),r.finishReasons.length&&(o[fn]=JSON.stringify(r.finishReasons)),n&&r.responseTexts.length&&(o[nt]=r.responseTexts.join("")),n&&r.toolCalls.length&&(o[vt]=JSON.stringify(r.toolCalls)),t.setAttributes(o),t.end()}}function bT(e){if(El.includes(e))return!0;const t=e.split(".").pop();return El.includes(t)}function ET(e){return e.includes("Stream")}function Nr(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>Nr(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function Tl(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function TT(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[ti]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[ri]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[bp]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[Ec]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[ni]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[Tc]=e.presencePenalty),t}function vT(e,t,n){const r={[ei]:pT,[nn]:oo(e),[G]:"auto.ai.google_genai"};if(t){if(r[We]=Tl(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,TT(o)),"tools"in o&&Array.isArray(o.tools)){const s=o.tools.flatMap(i=>i.functionDeclarations);r[oi]=JSON.stringify(s)}}}else r[We]=Tl({},n);return r}function vl(e,t){const n=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&n.push(...Nr(t.config.systemInstruction,"system")),"history"in t&&n.push(...Nr(t.history,"user")),"contents"in t&&n.push(...Nr(t.contents,"user")),"message"in t&&n.push(...Nr(t.message,"user")),Array.isArray(n)&&n.length){const{systemInstructions:r,filteredMessages:o}=so(n);r&&e.setAttribute(ro,r);const s=Array.isArray(o)?o.length:0;e.setAttributes({[Nn]:s,[Tr]:JSON.stringify(ai(o))})}}function IT(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(Ft,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[Cn]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[xn]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Mn]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(o=>o.content?.parts&&Array.isArray(o.content.parts)?o.content.parts.map(s=>typeof s.text=="string"?s.text:"").filter(s=>s.length>0).join(""):"").filter(o=>o.length>0);r.length>0&&e.setAttributes({[nt]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[vt]:JSON.stringify(r)})}}}function Il(e,t,n,r){const o=t===Op;return new Proxy(e,{apply(s,i,a){const c=a[0],u=vT(t,c,n),d=u[We]??"unknown",l=oo(t);return ET(t)?zt({name:`${l} ${d}
18 stream-response`,op:Is(t),attributes:u},async f=>{try{r.recordInputs&&c&&vl(f,c);const p=await s.apply(n,a);return ST(p,f,!!r.recordOutputs)}catch(p){throw f.setStatus({code:Z,message:"internal_error"}),_e(p,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),f.end(),p}}):dn({name:o?`${l} ${d} create`:`${l} ${d}`,op:Is(t),attributes:u},f=>(r.recordInputs&&c&&vl(f,c),Ks(()=>s.apply(n,a),p=>{_e(p,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},p=>{o||IT(f,p,r.recordOutputs)})))}})}function Sa(e,t="",n){return new Proxy(e,{get:(r,o,s)=>{const i=Reflect.get(r,o,s),a=Ap(t,String(o));if(typeof i=="function"&&bT(a)){if(a===Op){const c=Il(i,a,r,n);return function(...d){const l=c(...d);return l&&typeof l=="object"?Sa(l,hT,n):l}}return Il(i,a,r,n)}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?Sa(i,a,n):i}})}function WM(e,t){const n=!!A()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return Sa(e,"",r)}const Or="auto.ai.langchain",wT={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},Ze=(e,t,n)=>{n!=null&&(e[t]=n)},qe=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function He(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Cr(e){const t=e.toLowerCase();return wT[t]??t}function wl(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function kl(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function Ac(e){return e.map(t=>{const n=t._getType;if(typeof n=="function"){const o=n.call(t);return{role:Cr(o),content:He(t.content)}}if(t.lc===1&&t.kwargs){const o=t.id,s=Array.isArray(o)&&o.length>0?o[o.length-1]:"",i=typeof s=="string"?wl(s):"user";return{role:Cr(i),content:He(t.kwargs?.content)}}if(t.type){const o=String(t.type).toLowerCase();return{role:Cr(o),content:He(t.content)}}if(t.role)return{role:Cr(String(t.role)),content:He(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:Cr(wl(r)),content:He(t.content)}:{role:"user",content:He(t.content)}})}function kT(e,t,n){const r={},o="kwargs"in e?e.kwargs:void 0,s=t?.temperature??n?.ls_temperature??o?.temperature;qe(r,ti,s);const i=t?.max_tokens??n?.ls_max_tokens??o?.max_tokens;qe(r,Ec,i);const a=t?.top_p??o?.top_p;qe(r,ri,a);const c=t?.frequency_penalty;qe(r,ni,c);const u=t?.presence_penalty;return qe(r,Tc,u),t&&"stream"in t&&Ze(r,bc,!!t.stream),r}function Pp(e,t,n,r,o){return{[ei]:He(e??"langchain"),[nn]:"chat",[We]:He(t),[G]:Or,...kT(n,r,o)}}function RT(e,t,n,r,o){const s=o?.ls_provider,i=r?.model??o?.ls_model_name??"unknown",a=Pp(s,i,e,r,o);if(n&&Array.isArray(t)&&t.length>0){Ze(a,Nn,t.length);const c=t.map(u=>({role:"user",content:u}));Ze(a,Tr,He(c))}return a}function AT(e,t,n,r,o){const s=o?.ls_provider??e.id?.[2],i=r?.model??o?.ls_model_name??"unknown",a=Pp(s,i,e,r,o);if(n&&Array.isArray(t)&&t.length>0){const c=Ac(t.flat()),{systemInstructions:u,filteredMessages:d}=so(c);u&&Ze(a,ro,u);const l=Array.isArray(d)?d.length:0;Ze(a,Nn,l);const f=ai(d);Ze(a,Tr,He(f))}return a}function CT(e,t){const n=[],r=e.flat();for(const o of r){const s=o.message?.content;if(Array.isArray(s))for(const i of s){const a=i;a.type==="tool_use"&&n.push(a)}}n.length>0&&Ze(t,vt,He(n))}function xT(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)qe(t,Cn,n.promptTokens),qe(t,xn,n.completionTokens),qe(t,Mn,n.totalTokens);else if(r){qe(t,Cn,r.input_tokens),qe(t,xn,r.output_tokens);const o=Number(r.input_tokens),s=Number(r.output_tokens),i=(Number.isNaN(o)?0:o)+(Number.isNaN(s)?0:s);i>0&&qe(t,Mn,i),r.cache_creation_input_tokens!==void 0&&qe(t,oE,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&qe(t,sE,r.cache_read_input_tokens)}}function MT(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const u=e.generations.flat().map(d=>d.generationInfo?.finish_reason?d.generationInfo.finish_reason:d.generation_info?.finish_reason?d.generation_info.finish_reason:null).filter(d=>
18typeof d=="string");if(u.length>0&&Ze(n,fn,He(u)),CT(e.generations,n),t){const d=e.generations.flat().map(l=>l.text??l.message?.content).filter(l=>typeof l=="string");d.length>0&&Ze(n,nt,He(d))}}xT(e.llmOutput,n);const r=e.llmOutput,s=e.generations?.[0]?.[0]?.message,i=r?.model_name??r?.model??s?.response_metadata?.model_name;i&&Ze(n,Ft,i);const a=r?.id??s?.id;a&&Ze(n,$n,a);const c=r?.stop_reason??s?.response_metadata?.finish_reason;return c&&Ze(n,nE,He(c)),n}function jM(e={}){const t=e.recordInputs??!1,n=e.recordOutputs??!1,r=new Map,o=i=>{const a=r.get(i);a?.isRecording()&&(a.end(),r.delete(i))},s={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(i,a,c,u,d,l,f,p){const h=kl(l),m=RT(i,a,t,h,f),_=m[We],y=m[nn];zt({name:`${y} ${_}`,op:"gen_ai.chat",attributes:{...m,[pe]:"gen_ai.chat"}},S=>(r.set(c,S),S))},handleChatModelStart(i,a,c,u,d,l,f,p){const h=kl(l),m=AT(i,a,t,h,f),_=m[We],y=m[nn];zt({name:`${y} ${_}`,op:"gen_ai.chat",attributes:{...m,[pe]:"gen_ai.chat"}},S=>(r.set(c,S),S))},handleLLMEnd(i,a,c,u,d){const l=r.get(a);if(l?.isRecording()){const f=MT(i,n);f&&l.setAttributes(f),o(a)}},handleLLMError(i,a){const c=r.get(a);c?.isRecording()&&(c.setStatus({code:Z,message:"llm_error"}),o(a)),_e(i,{mechanism:{handled:!1,type:`${Or}.llm_error_handler`}})},handleChainStart(i,a,c,u){const d=i.name||"unknown_chain",l={[G]:"auto.ai.langchain","langchain.chain.name":d};t&&(l["langchain.chain.inputs"]=JSON.stringify(a)),zt({name:`chain ${d}`,op:"gen_ai.invoke_agent",attributes:{...l,[pe]:"gen_ai.invoke_agent"}},f=>(r.set(c,f),f))},handleChainEnd(i,a){const c=r.get(a);c?.isRecording()&&(n&&c.setAttributes({"langchain.chain.outputs":JSON.stringify(i)}),o(a))},handleChainError(i,a){const c=r.get(a);c?.isRecording()&&(c.setStatus({code:Z,message:"chain_error"}),o(a)),_e(i,{mechanism:{handled:!1,type:`${Or}.chain_error_handler`}})},handleToolStart(i,a,c,u){const d=i.name||"unknown_tool",l={[G]:Or,[cE]:d};t&&(l[uE]=a),zt({name:`execute_tool ${d}`,op:"gen_ai.execute_tool",attributes:{...l,[pe]:"gen_ai.execute_tool"}},f=>(r.set(c,f),f))},handleToolEnd(i,a){const c=r.get(a);c?.isRecording()&&(n&&c.setAttributes({[lE]:JSON.stringify(i)}),o(a))},handleToolError(i,a){const c=r.get(a);c?.isRecording()&&(c.setStatus({code:Z,message:"tool_error"}),o(a)),_e(i,{mechanism:{handled:!1,type:`${Or}.tool_error_handler`}})},copy(){return s},toJSON(){return{lc:1,type:"not_implemented",id:s.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:s.lc_id}}};return s}const Lp="auto.ai.langgraph";function NT(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function OT(e){const t=e;let n=0,r=0,o=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const s=t.usage_metadata;return typeof s.input_tokens=="number"&&(n=s.input_tokens),typeof s.output_tokens=="number"&&(r=s.output_tokens),typeof s.total_tokens=="number"&&(o=s.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:o}}if(t.response_metadata&&typeof t.response_metadata=="object"){const s=t.response_metadata;if(s.tokenUsage&&typeof s.tokenUsage=="object"){const i=s.tokenUsage;typeof i.promptTokens=="number"&&(n=i.promptTokens),typeof i.completionTokens=="number"&&(r=i.completionTokens),typeof i.totalTokens=="number"&&(o=i.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:o}}function PT(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(Ft,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(fn,[r.finish_reason])}}function LT(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;const t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}function DT(e,t,n){const o=n?.messages;if(!o||!Array.isArray(o))return;const s=t?.length??0,i=o.length>s?o.slice(s):[];if(i.length===0)return;const a=NT(i);a&&e.setAttribute(vt,JSON.stringify(a));const c=Ac(i);e.setAttribute(nt,JSON.stringify(c));let u=0,d=0,l=0;for(const f of i){const p=OT(f);u+=p.inputTokens,d+=p.outputTokens,l+=p.totalTokens,PT(e,f)}u>0&&e.setAttribute(Cn,u),d>0&&e.setAttribute(xn,d),l>0&&e.setAttribute(Mn,l)}function FT(e,t){return new Proxy(e,{apply(n,r,o){return dn({op:"gen_ai.create_agent",name:"create_agent",attributes:{[G]:Lp,[pe]:"gen_ai.create_agent",[nn]:"create_agent"}},s=>{try{const i=Reflect.apply(n,r,o),a=o.length>0?o[0]:{};a?.name&&typeof a.name=="string"&&(s.setAttribute(Ep,a.name),s.updateName(`create_agent ${a.name}`));const c=i.invoke;return c&&typeof c=="function"&&(i.invoke=$T(c.bind(i),i,a,t)),i}catch(i){throw s.setStatus({code:Z,message:"internal_error"}),_e(i,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),i}})}})}function $T(e,t,n,r){return new Proxy(e,{apply(o,s,i){return dn({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[G]:Lp,[pe]:iE,[nn]:"invoke_agent"}},async a=>{try{const c=n?.name;c&&typeof c=="string"&&(a.setAttribute(rE,c),a.setAttribute(Ep,c),a.updateName(`invoke_agent ${c}`));const l=(i.length>1?i[1]:void 0)?.configurable?.thread_id;l&&typeof l=="string"&&a.setAttribute(vc,l);const f=LT(t);f&&a.setAttribute(oi,JSON.stringify(f));const p=r.recordInputs,h=r.recordOutputs,m=i.length>0?i[0].messages??[]:[];if(m&&p){const y=Ac(m),{systemInstructions:S,filteredMessages:M}=so(y);S&&a.setAttribute(ro,S);const v=ai(M),L=Array.isArray(M)?M.length:0;a.setAttributes({[Tr]:JSON.stringify(v),[Nn]:L})}const _=await Reflect.apply(o,s,i);return h&&DT(a,m??null,_),_}catch(c){throw a.setStatus({code:Z,message:"internal_error"}),_e(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}})}function zM(e,t){const n=t||{};return e.compile=FT(e.compile.bind(e),n),e}function Dp(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ar=$;function UT(){return"history"in ar&&!!ar.history}function BT(){if(!("fetch"in ar))return!1;
18try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function ba(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Fp(){if(typeof EdgeRuntime=="string")return!0;if(!BT())return!1;if(ba(ar.fetch))return!0;let e=!1;const t=ar.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=ba(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){k&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function HT(){return"ReportingObserver"in ar}function Cc(e,t){const n="fetch";an(n,e),cn(n,()=>$p(void 0,t))}function WT(e){const t="fetch-body-resolved";an(t,e),cn(t,()=>$p(zT))}function $p(e,t=!1){t&&!Fp()||Me($,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=qT(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:he()*1e3,virtualError:o,headers:GT(r)};return e||et("fetch",{...a}),n.apply($,r).then(async c=>(e?e(c):et("fetch",{...a,endTimestamp:he()*1e3,response:c}),c),c=>{et("fetch",{...a,endTimestamp:he()*1e3,error:c}),gt(c)&&c.stack===void 0&&(c.stack=o.stack,Ee(c,"framesToPop",1));const d=A()?.getOptions().enhanceFetchErrorMessages??"always";if(d!==!1&&c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const p=new URL(a.fetchData.url).host;d==="always"?c.message=`${c.message} (${p})`:Ee(c,"__sentry_fetch_url_host__",p)}catch{}throw c})}})}async function jT(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(i)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function zT(e){let t;try{t=e.clone()}catch{return}jT(t,()=>{et("fetch-body-resolved",{endTimestamp:he()*1e3,response:e})})}function Ko(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Rl(e){return typeof e=="string"?e:e?Ko(e,"url")?e.url:e.toString?e.toString():"":""}function qT(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Rl(n),method:Ko(r,"method")?String(r.method).toUpperCase():Ka(n)&&Ko(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Rl(t),method:Ko(t,"method")?String(t.method).toUpperCase():"GET"}}function GT(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Ka(t))return new Headers(t.headers)}catch{}}function VT(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function JT(){return"npm"}function YT(){return!VT()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ws(){return typeof window<"u"&&(!YT()||KT())}function KT(){return $.process?.type==="renderer"}const it=$,ce=it.document,Pr=it.navigator,Up="Report a Bug",XT="Cancel",QT="Send Bug Report",ZT="Confirm",ev="Report a Bug",tv="[email protected]",nv="Email",rv="What's the bug? What did you expect?",ov="Description",sv="Your Name",iv="Name",av="Thank you for your report!",cv="(required)",uv="Add a screenshot",lv="Remove screenshot",dv="Highlight",fv="Hide",pv="Remove",hv="widget",mv="api",gv=5e3,_v=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=A();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&j().setTags(e.tags);const r=Pb({source:mv,url:Dn(),...e},t);return new Promise((o,s)=>{const i=setTimeout(()=>s("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(i),a(),u?.statusCode&&u.statusCode>
18=200&&u.statusCode<300?o(r):u?.statusCode===403?s("Unable to send feedback. This could be because this domain is not in your list of allowed domains."):s("Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},Xo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function yv(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Pr.userAgent)||/Macintosh/i.test(Pr.userAgent)&&Pr.maxTouchPoints&&Pr.maxTouchPoints>1||!isSecureContext)}function Ao(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 Sv(e){const t=ce.createElement("style");return t.textContent=` 19.widget__actor { 20 position: fixed; 21 z-index: var(--z-index); 22 margin: var(--page-margin); 23 inset: var(--actor-inset); 24 25 display: flex; 26 align-items: center; 27 gap: 8px; 28 padding: 16px; 29 30 font-family: inherit; 31 font-size: var(--font-size); 32 font-weight: 600; 33 line-height: 1.14em; 34 text-decoration: none; 35 36 background: var(--actor-background, var(--background)); 37 border-radius: var(--actor-border-radius, 1.7em/50%); 38 border: var(--actor-border, var(--border));
39 box-shadow: var(--actor-box-shadow, var(--box-shadow)); 40 color: var(--actor-color, var(--foreground)); 41 fill: var(--actor-color, var(--foreground)); 42 cursor: pointer; 43 opacity: 1; 44 transition: transform 0.2s ease-in-out; 45 transform: translate(0, 0) scale(1); 46} 47.widget__actor[aria-hidden="true"] { 48 opacity: 0; 49 pointer-events: none; 50 visibility: hidden; 51 transform: translate(0, 16px) scale(0.98); 52} 53 54.widget__actor:hover { 55 background: var(--actor-hover-background, var(--background)); 56 filter: var(--interactive-filter); 57} 58 59.widget__actor svg { 60 width: 1.14em; 61 height: 1.14em; 62} 63 64@media (max-width: 600px) { 65 .widget__actor span { 66 display: none; 67 } 68} 69`,e&&t.setAttribute("nonce",e),t}function Je(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const Hn=20,bv="http://www.w3.org/2000/svg";function Ev(){const e=a=>it.document.createElementNS(bv,a),t=Je(e("svg"),{width:`${Hn}`,height:`${Hn}`,viewBox:`0 0 ${Hn} ${Hn}`,fill:"var(--actor-color, var(--foreground))"}),n=Je(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Je(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=Je(e("clipPath"),{id:"clip0_57_80"}),i=Je(e("rect"),{width:`${Hn}`,height:`${Hn}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function Tv({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=ce.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Up,o.appendChild(Ev()),e){const i=ce.createElement("span");i.appendChild(ce.createTextNode(e)),o.appendChild(i)}const s=Sv(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 Bp="rgba(88, 74, 192, 1)",vv={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Bp,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%)"},Al={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackgroun
69d:Bp,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 Cl(e){return` 70 --foreground: ${e.foreground}; 71 --background: ${e.background}; 72 --accent-foreground: ${e.accentForeground}; 73 --accent-background: ${e.accentBackground}; 74 --success-color: ${e.successColor}; 75 --error-color: ${e.errorColor}; 76 --border: ${e.border}; 77 --box-shadow: ${e.boxShadow}; 78 --outline: ${e.outline}; 79 --interactive-filter: ${e.interactiveFilter}; 80 `}function Iv({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=ce.createElement("style");return o.textContent=` 81:host { 82 --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif; 83 --font-size: 14px; 84 --z-index: 100000; 85 86 --page-margin: 16px; 87 --inset: auto 0 0 auto; 88 --actor-inset: var(--inset); 89 90 font-family: var(--font-family); 91 font-size: var(--font-size); 92 93 ${e!=="system"?`color-scheme: only ${e};`:""} 94 95 ${Cl(e==="dark"?{...Al,...t}:{...vv,...n})} 96} 97 98${e==="system"?` 99@media (prefers-color-scheme: dark) { 100 :host { 101 color-scheme: only dark; 102 103 ${Cl({...Al,...t})} 104 } 105}`:""} 106`,r&&o.setAttribute("nonce",r),o}const Hp=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:o="sentry-feedback",autoInject:s=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:f={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:m,colorScheme:_="system",themeLight:y={},themeDark:S={},addScreenshotButtonLabel:M=uv,cancelButtonLabel:v=XT,confirmButtonLabel:L=ZT,emailLabel:N=nv,emailPlaceholder:b=tv,formTitle:x=ev,isRequiredLabel:U=cv,messageLabel:E=ov,messagePlaceholder:O=rv,nameLabel:R=iv,namePlaceholder:P=sv,removeScreenshotButtonLabel:D=lv,submitButtonLabel:ee=QT,successMessageText:K=av,triggerLabel:ne=Up,triggerAriaLabel:T="",highlightToolText:z=dv,hideToolText:w=fv,removeHighlightText:V=pv,onFormOpen:se,onFormClose:re,onSubmitSuccess:ve,onSubmitError:Le,onFormSubmitted:$t}={})=>{const De={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:f,tags:p,styleNonce:h,scriptNonce:m,colorScheme:_,themeDark:S,themeLight:y,triggerLabel:ne,triggerAriaLabel:T,cancelButtonLabel:v,submitButtonLabel:ee,confirmButtonLabel:L,formTitle:x,emailLabel:N,emailPlaceholder:b,messageLabel:E,messagePlaceholder:O,nameLabel:R,namePlaceholder:P,successMessageText:K,isRequiredLabel:U,addScreenshotButtonLabel:M,removeScreenshotButtonLabel:D,highlightToolText:z,hideToolText:w,removeHighlightText:V,onFormClose:re,onFormOpen:se,onSubmitError:Le,onSubmitSuccess:ve,onFormSubmitted:$t};let Ue=null,ft=[];const Ut=ie=>{if(!Ue){const me=ce.createElement("div");me.id=String(ie.id),ce.body.appendChild(me),Ue=me.attachShadow({mode:"open"}),Ue.appendChild(Iv(ie))}return Ue},wr=async ie=>{const me=ie.enableScreenshot&&yv();let Xe,Ce;try{Xe=(t?t():await e("feedbackModalIntegration",m))(),qu(Xe)}catch{throw Xo&&g.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 pt=me?n?n():await e("feedbackScreenshotIntegration",m):void 0;pt&&(Ce=pt(),qu(Ce))}catch{Xo&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const Ne=Xe.createDialog({options:{...ie,onFormClose:()=>{Ne?.close(),ie.onFormClose?.()},onFormSubmitted:()=>{Ne?.close(),ie.onFormSubmitted?.()}},screenshotIntegration:Ce,sendFeedback:_v,shadow:Ut(ie)});return Ne},Io=(ie,me={})=>{const Xe=Ao(De,me),Ce=typeof ie=="string"?ce.querySelector(ie):typeof ie.addEventListener=="function"?ie:null;if(!Ce)throw Xo&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Ne=null;const pt=async()=>{Ne||(Ne=await wr({...Xe,onFormSubmitted:()=>{Ne?.removeFromDom(),Xe.onFormSubmitted?.()}})),Ne.appendToDom(),Ne.open()};Ce.addEventListener("click",pt);const X=()=>{ft=ft.filter(ze=>ze!==X),Ne?.removeFromDom(),Ne=null,Ce.removeEventListener("click",pt)};return ft.push(X),X},kr=(ie={})=>{const me=Ao(De,ie),Xe=Ut(me),Ce=Tv({triggerLabel:me.triggerLabel,triggerAriaLabel:me.triggerAriaLabel,shadow:Xe,styleNonce:h});return Io(Ce.el,{...me,onFormOpen(){Ce.hide()},onFormClose(){Ce.show()},onFormSubmitted(){Ce.show()}}),Ce};return{name:"Feedback",setupOnce(){!ws()||!De.autoInject||(ce.readyState==="loading"?ce.addEventListener("DOMContentLoaded",()=>kr().appendToDom()):kr().appendToDom())},attachTo:Io,createWidget(ie={}){const me=kr(Ao(De,ie));return me.appendToDom(),me},async createForm(ie={}){return wr(Ao(De,ie))},remove(){Ue&&(Ue.parentElement?.remove(),Ue=null),ft.forEach(ie=>ie()),ft=[]}}});function qM(){return A()?.getIntegrationByName("Feedback")}var ui,le,Wp,gn,xl,jp,Ea,jr={},xc=[],wv=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mc=Array.isArray;function qt(e,t){for(var n in t)e[n]=t[n];return e}function zp(e){var t=e.parentNode;t&&t.removeChild(e)}function Y(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?ui.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return Qo(e,i,r,o,null)}function Qo(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:o??++Wp,__i:-1,__u:0};return o==null&&le.vnode!=null&&le.vnode(s),s}function io(e){return e.children}function Zo(e,t){this.props=e,this.context=t}function cr(e,t){if(t==null)return e.__?cr(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?cr(e):null}function kv(e,t,n){var r,o=e.__v,s=o.__e,i=e.__P;if(i)return(r=qt({},o)).__v=o.__v+1,le.vnode&&le.vnode(r),Nc(i,r,o,e.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,t,s??cr(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&qp(r),r}function qp(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return qp(e)}}function Ml(e){(!e.__d&&(e.__d=!0)&&gn.push(e)&&!ks.__r++||xl!==le.debounceRendering)&&((xl=le.debounceRendering)||jp)(ks)}function ks(){var e,t,n,r=[],o=[];for(gn.sort(Ea);e=gn.shift();)e.__d&&(n=gn.length,t=kv(e,r,o)||t,n===0||gn.length>n?(Ta(r,t,o),o.length=r.length=0,t=void 0,gn.sort(Ea)):t&&le.__c&&le.__c(t,xc));t&&Ta(r,t,o),ks.__r=0}function Gp(e,t,n,r,o,s,i,a,c,u,d){var l,f,p,h,m,_=r&&r.__k||xc,y=t.length;for(n.__d=c,Rv(n,t,_),c=n.__d,l=0;l<y;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?jr:_[p.__i]||jr,p.__i=l,Nc(e,p,f,o,s,i,a,c,u,d),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Oc(f.ref,null,p),d.push(p.ref,p.__c||h,p)),m==null&&h!=null&&(m=h),65536&p.__u||f.__k===p.__k?c=Vp(p,c,e):typeof p.t
vendor: 5,211 bytes, line 106
106ype=="function"&&p.__d!==void 0?c=p.__d:h&&(c=h.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=m}function Rv(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Qo(null,o,null,null,o):Mc(o)?Qo(io,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Qo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Av(o,n,i=r+l,d),o.__i=a,s=null,a!==-1&&(d--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a===i+1?l++:a>i?d>c-i?l+=a-i:l--:l=a<i&&a==i-1?a-i:0,a!==r+l&&(o.__u|=65536))):(s=n[r])&&s.key==null&&s.__e&&(s.__e==e.__d&&(e.__d=cr(s)),va(s,s,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(s=n[r])!=null&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=cr(s)),va(s,s))}function Vp(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Vp(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Av(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&s===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return i;i--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return a;a++}}return-1}function Nl(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||wv.test(t)?n:n+"px"}function Co(e,t,n,r,o){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Nl(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Nl(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")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?Pl:Ol,s)):e.removeEventListener(t,s?Pl:Ol,s);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Ol(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(le.event?le.event(e):e)}}function Pl(e){if(this.l)return this.l[e.type+!0](le.event?le.event(e):e)}function Nc(e,t,n,r,o,s,i,a,c,u){var d,l,f,p,h,m,_,y,S,M,v,L,N,b,x,U=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=le.__b)&&d(t);e:if(typeof U=="function")try{if(y=t.props,S=(d=U.contextType)&&r[d.__c],M=d?S?S.props.value:d.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in U&&U.prototype.render?t.__c=l=new U(y,M):(t.__c=l=new Zo(y,M),l.constructor=U,l.render=xv),S&&S.sub(l),l.props=y,l.state||(l.state={}),l.context=M,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),U.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=qt({},l.__s)),qt(l.__s,U.getDerivedStateFromProps(y,l.__s))),p=l.props,h=l.state,l.__v=t,f)U.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(U.getDerivedStateFromProps==null&&y!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,M),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,M)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(E){E&&(E.__=t)}),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,M),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,h,m)})}if(l.context=M,l.props=y,l.__P=e,l.__e=!1,L=le.__r,N=0,"prototype"in U&&U.prototype.render){for(l.state=l.__s,l.__d=!1,L&&L(t),d=l.render(l.props,l.state,l.context),b=0;b<l._sb.length;b++)l.__h.push(l._sb[b]);l._sb=[]}else do l.__d=!1,L&&L(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(r=qt(qt({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(p,h)),Gp(e,Mc(x=d!=null&&d.type===io&&d.key==null?d.props.children:d)?x:[x],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),_&&(l.__E=l.__=null)}catch(E){t.__v=null,c||s!=null?(t.__e=a,t.__u|=c?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),le.__e(E,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Cv(n.__e,t,n,r,o,s,i,c,u);(d=le.diffed)&&d(t)}function Ta(e,t,n){for(var r=0;r<n.length;r++)Oc(n[r],n[++r],n[++r]);le.__c&&le.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){le.__e(s,o.__v)}})}function Cv(e,t,n,r,o,s,i,a,c){var u,d,l,f,p,h,m,_=n.props,y=t.props,S=t.type;if(S==="svg"&&(o=!0),s!=null){for(u=0;
vendor: 2,582 bytes, line 106
106u<s.length;u++)if((p=s[u])&&"setAttribute"in p==!!S&&(S?p.localName===S:p.nodeType===3)){e=p,s[u]=null;break}}if(e==null){if(S===null)return document.createTextNode(y);e=o?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,y.is&&y),s=null,a=!1}if(S===null)_===y||a&&e.data===y||(e.data=y);else{if(s=s&&ui.call(e.childNodes),_=n.props||jr,!a&&s!=null)for(_={},u=0;u<e.attributes.length;u++)_[(p=e.attributes[u]).name]=p.value;for(u in _)p=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=p:u==="key"||u in y||Co(e,u,null,p,o));for(u in y)p=y[u],u=="children"?f=p:u=="dangerouslySetInnerHTML"?d=p:u=="value"?h=p:u=="checked"?m=p:u==="key"||a&&typeof p!="function"||_[u]===p||Co(e,u,p,_[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),Gp(e,Mc(f)?f:[f],t,n,r,o&&S!=="foreignObject",s,i,s?s[0]:n.__k&&cr(n,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&zp(s[u]);a||(u="value",h!==void 0&&(h!==e[u]||S==="progress"&&!h||S==="option"&&h!==_[u])&&Co(e,u,h,_[u],!1),u="checked",m!==void 0&&m!==e[u]&&Co(e,u,m,_[u],!1))}return e}function Oc(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){le.__e(r,n)}}function va(e,t,n){var r,o;if(le.unmount&&le.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Oc(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){le.__e(s,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&va(r[o],t,n||typeof e.type!="function");n||e.__e==null||zp(e.__e),e.__=e.__e=e.__d=void 0}function xv(e,t,n){return this.constructor(e,n)}function Mv(e,t,n){var r,o,s,i;le.__&&le.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],Nc(t,e=t.__k=Y(io,null,[e]),o||jr,jr,t.ownerSVGElement!==void 0,o?null:t.firstChild?ui.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),e.__d=void 0,Ta(s,e,i)}ui=xc.slice,le={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},Wp=0,Zo.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=qt({},this.state),typeof e=="function"&&(e=e(qt({},n),this.props)),e&&qt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ml(this))},Zo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ml(this))},Zo.prototype.render=io,gn=[],jp=typeof Promise=="function"?Promise.prototype.then.bind(Prom
106ise.resolve()):setTimeout,Ea=function(e,t){return e.__v.__b-t.__v.__b},ks.__r=0;var Pt,ue,$i,Ll,ur=0,Jp=[],es=[],ge=le,Dl=ge.__b,Fl=ge.__r,$l=ge.diffed,Ul=ge.__c,Bl=ge.unmount,Hl=ge.__;function Un(e,t){ge.__h&&ge.__h(ue,e,ur||t),ur=0;var n=ue.__H||(ue.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:es}),n.__[e]}function yn(e){return ur=1,Yp(Xp,e)}function Yp(e,t,n){var r=Un(Pt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Xp(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=ue,!ue.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!s||s.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!s||s.call(this,a,c,u))};ue.u=!0;var s=ue.shouldComponentUpdate,i=ue.componentWillUpdate;ue.componentWillUpdate=function(a,c,u){if(this.__e){var d=s;s=void 0,o(a,c,u),s=d}i&&i.call(this,a,c,u)},ue.shouldComponentUpdate=o}return r.__N||r.__}function Nv(e,t){var n=Un(Pt++,3);!ge.__s&&Pc(n.__H,t)&&(n.__=e,n.i=t,ue.__H.__h.push(n))}function Kp(e,t){var n=Un(Pt++,4);!ge.__s&&Pc(n.__H,t)&&(n.__=e,n.i=t,ue.__h.push(n))}function Ov(e){return ur=5,ao(function(){return{current:e}},[])}function Pv(e,t,n){ur=6,Kp(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function ao(e,t){var n=Un(Pt++,7);return Pc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Zn(e,t){return ur=8,ao(function(){return e},t)}function Lv(e){var t=ue.context[e.__c],n=Un(Pt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ue)),t.props.value):e.__}function Dv(e,t){ge.useDebugValue&&ge.useDebugValue(t?t(e):e)}function Fv(e){var t=Un(Pt++,10),n=yn();return t.__=e,ue.componentDidCatch||(ue.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function $v(){var e=Un(Pt++,11);if(!e.__){for(var t=ue.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Uv(){for(var e;e=Jp.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ts),e.__H.__h.forEach(Ia),e.__H.__h=[]}catch(t){e.__H.__h=[],ge.__e(t,e.__v)}}ge.__b=function(e){ue=null,Dl&&Dl(e)},ge.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Hl&&Hl(e,t)},ge.__r=function(e){Fl&&Fl(e),Pt=0;var t=(ue=e.__c).__H;t&&($i===ue?(t.__h=[],ue.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=es,n.__N=n.i=void 0})):(t.__h.forEach(ts),t.__h.forEach(Ia),t.__h=[],Pt=0)),$i=ue},ge.diffed=function(e){$l&&$l(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Jp.push(t)!==1&&Ll===ge.requestAnimationFrame||((Ll=ge.requestAnimationFrame)||Bv)(Uv)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==es&&(n.__=n.__V),n.i=void 0,n.__V=es})),$i=ue=null},ge.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ts),n.__h=n.__h.filter(function(r){return!r.__||Ia(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ge.__e(r,n.__v)}}),Ul&&Ul(e,t)},ge.unmount=function(e){Bl&&Bl(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ts(r)}catch(o){t=o}}),n.__H=void 0,t&&ge.__e(t,n.__v))};var Wl=typeof requestAnimationFrame=="function";function Bv(e){var t,n=function(){clearTimeout(r),Wl&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Wl&&(t=requestAnimationFrame(n))}function ts(e){var t=ue,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ue=t}function Ia(e){var t=ue;e.__c=e.__(),ue=t}function Pc(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Xp(e,t){return typeof t=="function"?t(e):t}const Hv=Object.defineProperty({__proto__:null,useCallback:Zn,useContext:Lv,useDebugValue:Dv,useEffect:Nv,useErrorBoundary:Fv,useId:$v,useImperativeHandle:Pv,useLayoutEffect:Kp,useMemo:ao,useReducer:Yp,useRef:Ov,useState:yn},Symbol.toStringTag,{value:"Module"}),Wv="http://www.w3.org/2000/svg";function jv(){const e=r=>ce.createElementNS(Wv,r),t=Je(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Je(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 zv({options:e}){const t=ao(()=>({__html:jv().outerHTML}),[]);return Y("h2",{class:"dialog__header"},Y("span",{class:"dialog__title"},e.formTitle),e.showBranding?Y("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function qv(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}function Ui(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Gv({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail
106:a,showName:c,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:h,emailPlaceholder:m,isEmailRequired:_,isNameRequired:y,messageLabel:S,messagePlaceholder:M,nameLabel:v,namePlaceholder:L,submitButtonLabel:N,isRequiredLabel:b}=e,[x,U]=yn(!1),[E,O]=yn(null),[R,P]=yn(!1),D=u?.input,[ee,K]=yn(null),ne=Zn(w=>{K(w),P(!1)},[]),T=Zn(w=>{const V=qv(w,{emailLabel:h,isEmailRequired:_,isNameRequired:y,messageLabel:S,nameLabel:v});return V.length>0?O(`Please enter in the following required fields: ${V.join(", ")}`):O(null),V.length===0},[h,_,y,S,v]),z=Zn(async w=>{U(!0);try{if(w.preventDefault(),!(w.target instanceof HTMLFormElement))return;const V=new FormData(w.target),se=await(u&&R?u.value():void 0),re={name:Ui(V,"name"),email:Ui(V,"email"),message:Ui(V,"message"),attachments:se?[se]:void 0};if(!T(re))return;try{const ve=await o({name:re.name,email:re.email,message:re.message,source:hv,tags:d},{attachments:re.attachments});s(re,ve)}catch(ve){Xo&&g.error(ve),O(ve),i(ve)}}finally{U(!1)}},[u&&R,s,i]);return Y("form",{class:"form",onSubmit:z},D&&R?Y(D,{onError:ne}):null,Y("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:x},Y("div",{class:"form__top"},E?Y("div",{class:"form__error-container"},E):null,c?Y("label",{for:"name",class:"form__label"},Y(Bi,{label:v,isRequiredLabel:b,isRequired:y}),Y("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:L,required:y,type:"text"})):Y("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?Y("label",{for:"email",class:"form__label"},Y(Bi,{label:h,isRequiredLabel:b,isRequired:_}),Y("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:_,type:"email"})):Y("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Y("label",{for:"message",class:"form__label"},Y(Bi,{label:S,isRequiredLabel:b,isRequired:!0}),Y("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:M,required:!0,rows:5})),D?Y("label",{for:"screenshot",class:"form__label"},Y("button",{class:"btn btn--default",disabled:x,type:"button",onClick:()=>{K(null),P(w=>!w)}},R?f:l),ee?Y("div",{class:"form__error-container"},ee.message):null):null),Y("div",{class:"btn-group"},Y("button",{class:"btn btn--primary",disabled:x,type:"submit"},N),Y("button",{class:"btn btn--default",disabled:x,type:"button",onClick:r},p))))}function Bi({label:e,isRequired:t,isRequiredLabel:n}){return Y("span",{class:"form__label__text"},e,t&&Y("span",{class:"form__label__text--required"},n))}const xo=16,jl=17,Vv="http://www.w3.org/2000/svg";function Jv(){const e=c=>it.document.createElementNS(Vv,c),t=Je(e("svg"),{width:`${xo}`,height:`${jl}`,viewBox:`0 0 ${xo} ${jl}`,fill:"inherit"}),n=Je(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Je(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=Je(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
10610.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=Je(e("clipPath"),{id:"clip0_57_156"}),a=Je(e("rect"),{width:`${xo}`,height:`${xo}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function Yv({open:e,onFormSubmitted:t,...n}){const r=n.options,o=ao(()=>({__html:Jv().outerHTML}),[]),[s,i]=yn(null),a=Zn(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=Zn((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{t(),i(null)},gv))},[t]);return Y(io,null,s?Y("div",{class:"success__position",onClick:a},Y("div",{class:"success__content"},r.successMessageText,Y("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):Y("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Y("div",{class:"dialog__position"},Y("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},Y(zv,{options:r}),Y(Gv,{...n,onSubmitSuccess:c})))))}const Kv=` 107.dialog { 108 position: fixed; 109 z-index: var(--z-index); 110 margin: 0; 111 inset: 0; 112 113 display: flex; 114 align-items: center; 115 justify-content: center; 116 padding: 0; 117 height: 100vh; 118 width: 100vw; 119 120 color: var(--dialog-color, var(--foreground)); 121 fill: var(--dialog-color, var(--foreground)); 122 line-height: 1.75em; 123 124 background-color: rgba(0, 0, 0, 0.05); 125 border: none; 126 inset: 0; 127 opacity: 1; 128 transition: opacity 0.2s ease-in-out; 129} 130 131.dialog__position { 132 position: fixed; 133 z-index: var(--z-index); 134 inset: var(--dialog-inset); 135 padding: var(--page-margin); 136 display: flex; 137 max-height: calc(100vh - (2 * var(--page-margin))); 138} 139@media (max-width: 600px) { 140 .dialog__position { 141 inset: var(--page-margin); 142 padding: 0; 143 } 144} 145 146.dialog__position:has(.editor) { 147 inset: var(--page-margin); 148 padding: 0; 149} 150 151.dialog:not([open]) { 152 opacity: 0; 153 pointer-events: none; 154 visibility: hidden; 155} 156.dialog:not([open]) .dialog__content { 157 transform: translate(0, -16px) scale(0.98); 158} 159 160.dialog__content { 161 display: flex; 162 flex-direction: column; 163 gap: 16px; 164 padding: var(--dialog-padding, 24px); 165 max-width: 100%; 166 width: 100%; 167 max-height: 100%; 168 overflow: auto; 169 170 background: var(--dialog-background, var(--background)); 171 border-radius: var(--dialog-border-radius, 20px); 172 border: var(--dialog-border, var(--border));
173 box-shadow: var(--dialog-box-shadow, var(--box-shadow)); 174 transform: translate(0, 0) scale(1); 175 transition: transform 0.2s ease-in-out; 176} 177 178`,Xv=` 179.dialog__header { 180 display: flex; 181 gap: 4px; 182 justify-content: space-between; 183 font-weight: var(--dialog-header-weight, 600); 184 margin: 0; 185} 186.dialog__title { 187 align-self: center; 188 width: var(--form-width, 272px); 189} 190 191@media (max-width: 600px) { 192 .dialog__title { 193 width: auto; 194 } 195} 196 197.dialog__position:has(.editor) .dialog__title { 198 width: auto; 199} 200 201 202.brand-link { 203 display: inline-flex; 204} 205.brand-link:focus-visible { 206 outline: var(--outline); 207} 208`,Qv=` 209.form { 210 display: flex; 211 overflow: auto; 212 flex-direction: row; 213 gap: 16px; 214 flex: 1 0; 215} 216 217.form fieldset { 218 border: none; 219 margin: 0; 220 padding: 0; 221} 222 223.form__right { 224 flex: 0 0 auto; 225 display: flex; 226 overflow: auto; 227 flex-direction: column; 228 justify-content: space-between; 229 gap: 20px; 230 width: var(--form-width, 100%); 231} 232 233.dialog__position:has(.editor) .form__right { 234 width: var(--form-width, 272px); 235} 236 237.form__top { 238 display: flex; 239 flex-direction: column; 240 gap: 8px; 241} 242 243.form__error-container { 244 color: var(--error-color); 245 fill: var(--error-color); 246} 247 248.form__label { 249 display: flex; 250 flex-direction: column; 251 gap: 4px; 252 margin: 0px; 253} 254 255.form__label__text { 256 display: flex; 257 gap: 4px; 258 align-items: center; 259} 260 261.form__label__text--required { 262 font-size: 0.85em; 263} 264 265.form__input { 266 font-family: inherit; 267 line-height: inherit; 268 background: transparent; 269 box-sizing: border-box; 270 border: var(--input-border, var(--border)); 271 border-radius: var(--input-border-radius, 6px); 272 color: var(--input-color, inherit); 273 fill: var(--input-color, inherit); 274 font-size: var(--input-font-size, inherit); 275 font-weight: var(--input-font-weight, 500); 276 padding: 6px 12px; 277} 278 279.form__input::placeholder { 280 opacity: 0.65; 281 color: var(--input-placeholder-color, inherit); 282 filter: var(--interactive-filter); 283} 284 285.form__input:focus-visible { 286 outline: var(--input-focus-outline, var(--outline)); 287} 288 289.form__input--textarea { 290 font-family: inherit; 291 resize: vertical; 292} 293 294.error { 295 color: var(--error-color); 296 fill: var(--error-color); 297} 298`,Zv=` 299.btn-group { 300 display: grid; 301 gap: 8px; 302} 303 304.btn { 305 line-height: inherit; 306 border: var(--button-border, var(--border)); 307 border-radius: var(--button-border-radius, 6px); 308 cursor: pointer; 309 font-family: inherit; 310 font-size: var(--button-font-size, inherit); 311 font-weight: var(--button-font-weight, 600); 312 padding: var(--button-padding, 6px 16px); 313} 314.btn[disabled] { 315 opacity: 0.6; 316 pointer-events: none; 317} 318 319.btn--primary { 320 color: var(--button-primary-color, var(--accent-foreground)); 321 fill: var(--button-primary-color, var(--accent-foreground)); 322 background: var(--button-primary-background, var(--accent-background)); 323 border: var(--button-primary-border, var(--border)); 324 border-radius: var(--button-primary-border-radius, 6px); 325 font-weight: var(--button-primary-font-weight, 500); 326} 327.btn--primary:hover { 328 color: var(--button-primary-hover-color, var(--accent-foreground)); 329 fill: var(--button-primary-hover-color, var(--accent-foreground)); 330 background: var(--button-primary-hover-background, var(--accent-background)); 331 filter: var(--interactive-filter); 332} 333.btn--primary:focus-visible { 334 background: var(--button-primary-hover-background, var(--accent-background)); 335 filter: var(--interactive-filter); 336 outline: var(--button-primary-focus-outline, var(--outline)); 337} 338 339.btn--default { 340 color: var(--button-color, var(--foreground)); 341 fill: var(--button-color, var(--foreground)); 342 background: var(--button-background, var(--background)); 343 border: var(--button-border, var(--border)); 344 border-radius: var(--button-border-radius, 6px); 345 font-weight: var(--button-font-weight, 500); 346} 347.btn--default:hover { 348 color: var(--button-color, var(--foreground)); 349 fill: var(--button-color, var(--foreground)); 350 background: var(--button-hover-background, var(--background)); 351 filter: var(--interactive-filter); 352} 353.btn--default:focus-visible { 354 background: var(--button-hover-background, var(--background)); 355 filter: var(--interactive-filter); 356 outline: var(--button-focus-outline, var(--outline)); 357} 358`,eI=` 359.success__position { 360 position: fixed; 361 inset: var(--dialog-inset); 362 padding: var(--page-margin); 363 z-index: var(--z-index); 364} 365.success__content { 366 background: var(--success-background, var(--background)); 367 border: var(--success-border, var(--border)); 368 border-radius: var(--success-border-radius, 1.7em/50%);
369 box-shadow: var(--success-box-shadow, var(--box-shadow)); 370 font-weight: var(--success-font-weight, 600); 371 color: var(--success-color); 372 fill: var(--success-color); 373 padding: 12px 24px; 374 line-height: 1.75em; 375 376 display: grid; 377 align-items: center; 378 grid-auto-flow: column; 379 gap: 6px; 380 cursor: default; 381} 382 383.success__icon { 384 display: flex; 385} 386`;function tI(e){const t=ce.createElement("style");return t.textContent=` 387:host { 388 --dialog-inset: var(--inset); 389} 390 391${Kv} 392${Xv} 393${Qv} 394${Zv} 395${eI} 396`,e&&t.setAttribute("nonce",e),t}function nI(){const e=j().getUser(),t=we().getUser(),n=Qn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const rI=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=nI(),a=ce.createElement("div"),c=tI(e.styleNonce);let u="";const d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),ce.body.style.overflow=u},open(){f(!0),e.onFormOpen?.(),A()?.emit("openFeedbackWidget"),u=ce.body.style.overflow,ce.body.style.overflow="hidden"},close(){f(!1),ce.body.style.overflow=u}},l=t?.createInput({h:Y,hooks:Hv,dialog:d,options:e}),f=p=>{Mv(Y(Yv,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&i?.[s.name]||""),defaultEmail:String(s&&i?.[s.email]||""),onFormClose:()=>{f(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,m)=>{f(!1),e.onSubmitSuccess?.(h,m)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:p}),a)};return d}}));function oI({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"}))}}function sI(e){const t=ce.createElement("style"),n="#1A141F",r="#302735";return t.textContent=` 397.editor { 398 display: flex; 399 flex-grow: 1; 400 flex-direction: column; 401} 402 403.editor__image-container { 404 justify-items: center; 405 padding: 15px; 406 position: relative; 407 height: 100%; 408 border-radius: var(--menu-border-radius, 6px); 409 410 background-color: ${n}; 411 background-image: repeating-linear-gradient( 412 -145deg, 413 transparent, 414 transparent 8px, 415 ${n} 8px, 416 ${n} 11px 417 ), 418 repeating-linear-gradient( 419 -45deg, 420 transparent, 421 transparent 15px, 422 ${r} 15px, 423 ${r} 16px 424 ); 425} 426 427.editor__canvas-container { 428 width: 100%; 429 height: 100%; 430 position: relative; 431 display: flex; 432 align-items: center; 433 justify-content: center; 434} 435 436.editor__canvas-container > * { 437 object-fit: contain; 438 position: absolute; 439} 440 441.editor__tool-container { 442 padding-top: 8px; 443 display: flex; 444 justify-content: center; 445} 446 447.editor__tool-bar { 448 display: flex; 449 gap: 8px; 450} 451 452.editor__tool { 453 display: flex; 454 padding: 8px 12px; 455 justify-content: center; 456 align-items: center; 457 border: var(--button-border, var(--border)); 458 border-radius: var(--button-border-radius, 6px); 459 background: var(--button-background, var(--background)); 460 color: var(--button-color, var(--foreground)); 461} 462 463.editor__tool--active { 464 background: var(--button-primary-background, var(--accent-background)); 465 color: var(--button-primary-color, var(--accent-foreground)); 466} 467 468.editor__rect { 469 position: absolute; 470 z-index: 2; 471} 472 473.editor__rect button { 474 opacity: 0; 475 position: absolute; 476 top: -12px; 477 right: -12px; 478 cursor: pointer; 479 padding: 0; 480 z-index: 3; 481 border: none; 482 background: none; 483} 484 485.editor__rect:hover button { 486 opacity: 1; 487} 488`,e&&t.setAttribute("nonce",e),t}function iI({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function aI({hooks:e}){function t(){const[n,r]=e.useState(it.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(it.devicePixelRatio)},s=matchMedia(`(resolution: ${it.devicePixelRatio}dppx)`);return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:s,onError:i}
488){const a=t();e.useEffect(()=>{(async()=>{r();const u=await Pr.mediaDevices.getDisplayMedia({video:{width:it.innerWidth*a,height:it.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=ce.createElement("video");await new Promise((l,f)=>{d.srcObject=u,d.onloadedmetadata=()=>{o(d,a),u.getTracks().forEach(p=>p.stop()),l()},d.play().catch(f)}),s()})().catch(i)},[])}}function cI(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);break}}function Ht(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Hi(e,t){Ht(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Wi(e,t,n){Ht(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{cI(s,o,t)})})}function uI({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=aI({hooks:t}),i=iI({h:e}),a=oI({h:e}),c={__html:sI(o.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{const[f,p]=t.useState("highlight"),[h,m]=t.useState([]),_=t.useRef(null),y=t.useRef(null),S=t.useRef(null),M=t.useRef(null),[v,L]=t.useState(1),N=t.useMemo(()=>{const R=ce.getElementById(o.id);if(!R)return"white";const P=getComputedStyle(R);return P.getPropertyValue("--button-primary-background")||P.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const R=()=>{const P=_.current;P&&(Ht(l.canvas,{alpha:!1},D=>{const ee=Math.min(P.clientWidth/D.width,P.clientHeight/D.height);L(ee)}),(P.clientHeight===0||P.clientWidth===0)&&setTimeout(R,0))};return R(),it.addEventListener("resize",R),()=>{it.removeEventListener("resize",R)}},[l]);const b=t.useCallback((R,P)=>{Ht(R,{alpha:!0},(D,ee)=>{ee.scale(P,P),D.width=l.canvas.width,D.height=l.canvas.height})},[l]);t.useEffect(()=>{b(y.current,l.dpi),Hi(y.current,l.canvas)},[l]),t.useEffect(()=>{b(S.current,l.dpi),Ht(S.current,{alpha:!0},(R,P)=>{P.clearRect(0,0,R.width,R.height)}),Wi(S.current,N,h)},[h,N]),t.useEffect(()=>{b(n,l.dpi),Hi(n,l.canvas),Ht(ce.createElement("canvas"),{alpha:!0},(R,P)=>{P.scale(l.dpi,l.dpi),R.width=l.canvas.width,R.height=l.canvas.height,Wi(R,N,h),Hi(n,R)})},[h,l,N]);const x=R=>{if(!f||!M.current)return;const P=M.current.getBoundingClientRect(),D={type:f,x:R.offsetX/v,y:R.offsetY/v},ee=(T,z)=>{const w=(z.clientX-P.x)/v,V=(z.clientY-P.y)/v;return{type:T.type,x:Math.min(T.x,w),y:Math.min(T.y,V),w:Math.abs(w-T.x),h:Math.abs(V-T.y)}},K=T=>{Ht(S.current,{alpha:!0},(z,w)=>{w.clearRect(0,0,z.width,z.height)}),Wi(S.current,N,[...h,ee(D,T)])},ne=T=>{const z=ee(D,T);z.w*v>=1&&z.h*v>=1&&m(w=>[...w,z]),ce.removeEventListener("mousemove",K),ce.removeEventListener("mouseup",ne)};ce.addEventListener("mousemove",K),ce.addEventListener("mouseup",ne)},U=t.useCallback(R=>P=>{P.preventDefault(),P.stopPropagation(),m(D=>{const ee=[...D];return ee.splice(R,1),ee})},[]),E={width:`${l.canvas.width*v}px`,height:`${l.canvas.height*v}px`},O=R=>{R.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:_},e("canvas",{ref:y,id:"background",style:E}),e("canvas",{ref:S,id:"foreground",style:E}),e("div",{ref:M,onMouseDown:x,style:E},h.map((R,P)=>e("div",{key:P,class:"editor__rect",style:{top:`${R.y*v}px`,left:`${R.x*v}px`,width:`${R.w*v}px`,height:`${R.h*v}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:U(P),onMouseDown:O,onMouseUp:O,type:"button"},e(a,null))))))),e(i,{options:o,action:f,setAction:p}))};return function({onError:f}){const[p,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,_)=>{Ht(ce.createElement("canvas"),{alpha:!1},(y,S)=>{S.scale(_,_),y.width=m.videoWidth,y.height=m.videoHeight,S.drawImage(m,0,0,y.width,y.height),h({canvas:y,dpi:_})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",f(m)},[])}),p?e(d,{screenshot:p}):e("div",null)}}const lI=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ce.createElement("canvas");return{input:uI({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),C=$;let wa=0;function Qp(){return wa>0}function dI(){wa++,setTimeout(()=>{wa--})}function lr(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Qa(e))return e}catch{return e}const r=function(...o){try{const s=o.map(i=>lr(i,t));return e.apply(this,s)}catch(s){throw dI(),Ke(i=>{i.addEventProcessor(a=>(t.mechanism&&(ia(a,void 0),Nt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),_e(s)}),s}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}pf(r,e),Ee(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Lc(){const e=Dn(),{referrer:t}=C.document||{},{userAgent:n}=C.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const fI={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",instrumentAnthropicAiClient:"instrumentanthropicaiclient",instrumentOpenAiClient:"instrumentopenaiclient",instrumentGoogleGenAIClient:"instrumentgooglegenaiclient",instrumentLangGraph:"instrumentlanggraph",createLangChainCallbackHandler:"createlangchaincallbackhandler"},zl=C;async function pI(e,t){const n=fI[e],r=zl.Sentry=zl.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const s=hI(n),i=C.document.createElement("script");
488i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,f)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",f)}),c=C.document.currentScript,u=C.document.body||C.document.head||c?.parentElement;if(u)u.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function hI(e){const n=A()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Gt}/${e}.min.js`,n).toString()}const GM=Hp({lazyLoadIntegration:pI}),VM=Hp({getModalIntegration:()=>rI,getScreenshotIntegration:()=>lI});function Dc(e,t){const n=Fc(e,t),r={type:SI(t),value:bI(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function mI(e,t,n,r){const s=A()?.getOptions().normalizeDepth,i=wI(t),a={__serialized__:Ff(t,s)};if(i)return{exception:{values:[Dc(e,i)]},extra:a};const c={exception:{values:[{type:qs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:vI(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Fc(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function ji(e,t){return{exception:{values:[Dc(e,t)]}}}function Fc(e,t){const n=t.stacktrace||t.stack||"",r=_I(t),o=yI(t);try{return e(n,r,o)}catch{}return[]}const gI=/Minified React error #\d+;/i;function _I(e){return e&&gI.test(e.message)?1:0}function yI(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Zp(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function SI(e){const t=e?.name;return!t&&Zp(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function bI(e){const t=e?.message;return Zp(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?Zu(t.error):Zu(e):"No error message"}function EI(e,t,n,r){const o=n?.syntheticException||void 0,s=li(e,t,o,r);return Nt(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),Xs(s)}function TI(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=ka(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),Xs(i)}function li(e,t,n,r,o){let s;if(lf(t)&&t.error)return ji(e,t.error);if(Su(t)||yg(t)){const i=t;if("stack"in t)s=ji(e,t);else{const a=i.name||(Su(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;s=ka(e,c,n,r),ia(s,c)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return gt(t)?ji(e,t):Ye(t)||qs(t)?(s=mI(e,t,n,o),Nt(s,{synthetic:!0}),s):(s=ka(e,t,n,r),ia(s,`${t}`),Nt(s,{synthetic:!0}),s)}function ka(e,t,n,r){const o={};if(r&&n){const s=Fc(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),Nt(o,{synthetic:!0})}if(zs(t)){const{__sentry_template_string__:s,__sentry_template_values__:i}=t;return o.logentry={message:s,params:i},o}return o.message=t,o}function vI(e,{isUnhandledRejection:t}){const n=Ig(e),r=t?"promise rejection":"exception";return lf(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:qs(e)?`Event \`${II(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function II(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function wI(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class kI extends qy{constructor(t){const n=RI(t),r=C.SENTRY_SDK_SOURCE||JT();lp(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:o,sendClientReports:s,enableLogs:i,_experiments:a,enableMetrics:c}=this._options,u=c??a?.enableMetrics??!0;C.document&&(s||i||u)&&C.document.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),i&&lc(this),u&&fc(this))}),o&&this.on("beforeSendSession",uS)}eventFromException(t,n){return EI(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return TI(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function RI(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:C.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}
488const On=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,q=$,AI=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",co=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=AI(t.value,n),e(t)))}},uo=(e=!0)=>{const t=q.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},vr=()=>uo()?.activationStart??0;function Jt(e,t,n){q.document&&q.addEventListener(e,t,n)}function Rs(e,t,n){q.document&&q.removeEventListener(e,t,n)}let er=-1;const eh=new Set,CI=()=>q.document?.visibilityState==="hidden"&&!q.document?.prerendering?0:1/0,ns=e=>{if(xI(e)&&er>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of eh)t();isFinite(er)||(er=e.type==="visibilitychange"?e.timeStamp:0,Rs("prerenderingchange",ns,!0))}},lo=()=>{if(q.document&&er<0){const e=vr();er=(q.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??CI(),Jt("visibilitychange",ns,!0),Jt("pagehide",ns,!0),Jt("prerenderingchange",ns,!0)}return{get firstHiddenTime(){return er},onHidden(e){eh.add(e)}}};function xI(e){return e.type==="pagehide"||q.document?.visibilityState==="hidden"}const MI=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,fo=(e,t=-1)=>{const n=uo();let r="navigate";return n&&(q.document?.prerendering||vr()>0?r="prerender":q.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:MI(),navigationType:r}},zi=new WeakMap;function $c(e,t){try{return zi.get(e)||zi.set(e,new t),zi.get(e)}catch{return new t}}class As{constructor(){As.prototype.__init.call(this),As.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Ir=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Uc=e=>{let t=!1;return()=>{t||(e(),t=!0)}},di=e=>{q.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},NI=[1800,3e3],OI=(e,t={})=>{di(()=>{const n=lo(),r=fo("FCP");let o;const i=Ir("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-vr(),0),r.entries.push(c),o(!0)))});i&&(o=co(e,r,NI,t.reportAllChanges))})},PI=[.1,.25],LI=(e,t={})=>{OI(Uc(()=>{const n=fo("CLS",0);let r;const o=lo(),s=$c(t,As),i=c=>{for(const u of c)s._processEntry(u);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=Ir("layout-shift",i);a&&(r=co(e,n,PI,t.reportAllChanges),o.onHidden(()=>{i(a.takeRecords()),r(!0)}),q?.setTimeout?.(r))}))};let th=0,qi=1/0,Mo=0;const DI=e=>{e.forEach(t=>{t.interactionId&&(qi=Math.min(qi,t.interactionId),Mo=Math.max(Mo,t.interactionId),th=Mo?(Mo-qi)/7+1:0)})};let Ra;const nh=()=>Ra?th:performance.interactionCount||0,FI=()=>{"interactionCount"in performance||Ra||(Ra=Ir("event",DI,{type:"event",buffered:!0,durationThreshold:0}))},Gi=10;let rh=0;const $I=()=>nh()-rh;class Cs{constructor(){Cs.prototype.__init.call(this),Cs.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){rh=nh(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor($I()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Gi||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.
488interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,s)=>s._latency-o._latency),this._longestInteractionList.length>Gi){const o=this._longestInteractionList.splice(Gi);for(const s of o)this._longestInteractionMap.delete(s.id)}this._onAfterProcessingINPCandidate?.(r)}}}const oh=e=>{const t=q.requestIdleCallback||q.setTimeout;q.document?.visibilityState==="hidden"?e():(e=Uc(e),Jt("visibilitychange",e,{once:!0,capture:!0}),Jt("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Rs("visibilitychange",e,{capture:!0}),Rs("pagehide",e,{capture:!0})}))},UI=[200,500],BI=40,HI=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=lo();di(()=>{FI();const r=fo("INP");let o;const s=$c(t,Cs),i=c=>{oh(()=>{for(const d of c)s._processEntry(d);const u=s._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,o())})},a=Ir("event",i,{durationThreshold:t.durationThreshold??BI});o=co(e,r,UI,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),o(!0)}))})};class WI{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const jI=[2500,4e3],zI=(e,t={})=>{di(()=>{const n=lo(),r=fo("LCP");let o;const s=$c(t,WI),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-vr(),0),r.entries=[u],o())},a=Ir("largest-contentful-paint",i);if(a){o=co(e,r,jI,t.reportAllChanges);const c=Uc(()=>{i(a.takeRecords()),a.disconnect(),o(!0)}),u=d=>{d.isTrusted&&(oh(c),Rs(d.type,u,{capture:!0}))};for(const d of["keydown","click","visibilitychange"])Jt(d,u,{capture:!0})}})},qI=[800,1800],Aa=e=>{q.document?.prerendering?di(()=>Aa(e)):q.document?.readyState!=="complete"?addEventListener("load",()=>Aa(e),!0):setTimeout(e)},GI=(e,t={})=>{const n=fo("TTFB"),r=co(e,n,qI,t.reportAllChanges);Aa(()=>{const o=uo();o&&(n.value=Math.max(o.responseStart-vr(),0),n.entries=[o],r(!0))})},Dr={},xs={};let sh,ih,ah,ch;function Bc(e,t=!1){return fi("cls",e,JI,sh,t)}function Hc(e,t=!1){return fi("lcp",e,YI,ih,t)}function VI(e){return fi("ttfb",e,KI,ah)}function uh(e){return fi("inp",e,XI,ch)}function Pn(e,t){return lh(e,t),xs[e]||(QI(e),xs[e]=!0),dh(e,t)}function po(e,t){const n=Dr[e];if(n?.length)for(const r of n)try{r(t)}catch(o){On&&g.error(`Error while triggering instrumentation handler. 489Type: ${e} 490Name: ${xt(r)} 491Error:`,o)}}function JI(){return LI(e=>{po("cls",{metric:e}),sh=e},{reportAllChanges:!0})}function YI(){return zI(e=>{po("lcp",{metric:e}),ih=e},{reportAllChanges:!0})}function KI(){return GI(e=>{po("ttfb",{metric:e}),ah=e})}function XI(){return HI(e=>{po("inp",{metric:e}),ch=e})}function fi(e,t,n,r,o=!1){lh(e,t);let s;return xs[e]||(s=n(),xs[e]=!0),r&&t({metric:r}),dh(e,t,o?s:void 0)}function QI(e){const t={};e==="event"&&(t.durationThreshold=0),Ir(e,n=>{po(e,{entries:n})},t)}function lh(e,t){Dr[e]=Dr[e]||[],Dr[e].push(t)}function dh(e,t,n){return()=>{n&&n();const r=Dr[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function ZI(e){return"duration"in e}const e0=e=>{const t=n=>{(n.type==="pagehide"||q.document?.visibilityState==="hidden")&&e(n)};Jt("visibilitychange",t,{capture:!0,once:!0}),Jt("pagehide",t,{capture:!0,once:!0})};function Vi(e){return typeof e=="number"&&isFinite(e)}function rn(e,t,n,{...r}){const o=F(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),ir(e,()=>{const s=ut({startTime:t,...r});return s&&s.end(n),s})}function Wc(e){const t=A();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=j(),f=l.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:i,environment:a,user:p||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":q.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o};return ut({name:n,attributes:m,startTime:s,experimental:{standalone:!0}})}function ho(){return q.addEventListener&&q.performance}function be(e){return e/1e3}function t0(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}
491return r===e&&(t=r),{name:t,version:n}}function fh(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function ph(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n),r=!0}e0(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,i()})}function n0(e){let t=0,n;if(!fh("layout-shift"))return;const r=Bc(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);ph(e,(o,s)=>{r0(t,n,s,o),r()})}function r0(e,t,n,r){On&&g.log(`Sending CLS span (${e})`);const o=t?be((Pe()||0)+t.startTime):he(),s=j().getScopeData().transactionName,i=t?je(t.sources[0]?.node):"Layout shift",a={[G]:"auto.http.browser.cls",[pe]:"ui.webvital.cls",[Sr]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=je(u.node)});const c=Wc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[Zr]:"",[eo]:e}),c.end(o))}function o0(e){let t=0,n;if(!fh("largest-contentful-paint"))return;const r=Hc(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);ph(e,(o,s)=>{s0(t,n,s,o),r()})}function s0(e,t,n,r){On&&g.log(`Sending LCP span (${e})`);const o=be((Pe()||0)+(t?.startTime||0)),s=j().getScopeData().transactionName,i=t?je(t.element):"Largest contentful paint",a={[G]:"auto.http.browser.lcp",[pe]:"ui.webvital.lcp",[Sr]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=je(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=Wc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Zr]:"millisecond",[eo]:e}),c.end(o))}function Qe(e){return e&&((Pe()||performance.timeOrigin)+e)/1e3}function hh(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=t0(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Pe()||ho()?.timeOrigin?i0({...t,"http.request.redirect_start":Qe(e.redirectStart),"http.request.redirect_end":Qe(e.redirectEnd),"http.request.worker_start":Qe(e.workerStart),"http.request.fetch_start":Qe(e.fetchStart),"http.request.domain_lookup_start":Qe(e.domainLookupStart),"http.request.domain_lookup_end":Qe(e.domainLookupEnd),"http.request.connect_start":Qe(e.connectStart),"http.request.secure_connection_start":Qe(e.secureConnectionStart),"http.request.connection_end":Qe(e.connectEnd),"http.request.request_start":Qe(e.requestStart),"http.request.response_start":Qe(e.responseStart),"http.request.response_end":Qe(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function i0(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const a0=2147483647;let ql=0,st={},Be,Ms;function c0({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=ho();if(r&&Pe()){r.mark&&q.performance.mark("sentry-tracing-init");const o=t?o0(n):p0(),s=h0(),i=e?n0(n):f0();return()=>{o?.(),s(),i?.()}}return()=>{}}function u0(){Pn("longtask",({entries:e})=>{const t=Te();if(!t)return;const{op:n,start_timestamp:r}=F(t);for(const o of e){const s=be(Pe()+o.startTime),i=be(o.duration);n==="navigation"&&r&&s<r||rn(t,s,s+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[G]:"auto.ui.browser.metrics"}})}})}function l0(){new PerformanceObserver(t=>{const n=Te();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=be(Pe()+r.startTime),{start_timestamp:s,op:i}=F(n);if(i==="navigation"&&s&&o<s)continue;const a=be(r.duration),c={[G]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:f,sourceFunctionName:p,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,f&&(c["code.filepath"]=f),p&&(c["code.function"]=p),h!==-1&&(c["browser.script.source_char_position"]=h),rn(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function d0(){Pn("event",({entries:e})=>{const t=Te();if(t){for(const n of e)if(n.name==="click"){const r=be(Pe()+n.startTime),o=be(n.duration),s={name:je(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[G]:"auto.ui.browser.metrics"}},i=ff(n.target);i&&(s.attributes["ui.component_name"]=i),rn(t,r,r+o,s)}}})}function f0(){return Bc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(st.cls={value:e.value,unit:""},Ms=t)},!0)}function p0(){return Hc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(st.lcp={value:e.value,unit:"millisecond"},Be=t)},!0)}function h0(){return VI(({metric:e})=>{e.entries[e.entries.length-1]&&(st.ttfb={value:e.value,unit:"millisecond"})})}function m0(e,t){const n=ho(),r=Pe();if(!n?.getEntries||!r)return;const o=be(r),s=n.getEntries(),{op:i,start_timestamp:a}=F(e);s.slice(ql).forEach(c=>{const u=be(c.startTime),d=be(Math.max(0,c.duration));if(!(i==="navigation"&&a&&o+u<a))switch(c.entryType){case"navigation":{S0(e,c,o);break}case"mark":case"paint":case"measure":{_0(e,c,u,d,o,t.ignorePerformanceApiSpans);const l=lo(),f=c.startTime<l.firstHiddenTime;c.name==="first-paint"&&f&&(st.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&f&&(st.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{T0(e,c,c.name,u,d,o,t.ignoreResourceSpans);break}}}),ql=Math.max(s.length-1,0),v0(e),i==="pageload"&&(k0(st),t.recordClsOnPageloadSpan||delete st.cls,t.recordLcpOnPageloadSpan||delete st.lcp,Object.entries(st).forEach(([c,u])=>{L_(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",vr()),I0(e,t)),Be=void 0,Ms=void 0,st={}}function g0(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function _0(e,t,n,r,o,s){if(g0(t)||["mark","measure"].includes(t.entryType)&&ct(t.name,s))return;const i=uo(!1),a=be(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,d=u+r,l={[G]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),y0(l,t),c<=d&&rn(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function y0(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&tn(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(tn(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function S0(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{No(e,t,r,n)}),No(e,t,"secureConnection",n,"TLS/SSL"),No(e,t,"fetch",n,"cache"),No(e,t,"domainLookup",n,"DNS"),E0(e,t,n)}function No(e,t,n,r,o=n){const s=b0(n),i=t[s],a=t[`${n}Start`];!a||!i||rn(e,r+be(a),r+be(i),{op:`browser.${o}`,name:t.name,attributes:{[G]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function b0(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function E0(e,t,n){const r=n+be(t.requestStart),o=n+be(t.responseEnd),s=n+be(t.responseStart);t.responseEnd&&(rn(e,r,o,{op:"browser.request",name:t.name,attributes:{[G]:"auto.ui.browser.metrics"}}),rn(e,s,o,{op:"browser.response",name:t.name,attributes:{[G]:"auto.ui.browser.metrics"}}))}function T0(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[G]:"auto.resource.browser.metrics"},u=In(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(q.location.origin),w0(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const d={...c,...hh(t)},l=s+r,f=l+o;rn(e,l,f,{name:n.replace(q.location.origin,""),op:a,attributes:d})}function v0(e){const t=q.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Vi(n.rtt)&&(st["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Vi(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Vi(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function I0(e,t){Be&&t.recordLcpOnPageloadSpan&&(Be.element&&e.setAttribute("lcp.element",je(Be.element)),Be.id&&e.setAttribute("lcp.id",Be.id),Be.url&&e.setAttribute("lcp.url",Be.url.trim().slice(0,200)),Be.loadTime!=null&&e.setAttribute("lcp.loadTime",Be.loadTime),Be.renderTime!=null&&e.setAttribute("lcp.renderTime",Be.renderTime),e.setAttribute("lcp.size",Be.size)),Ms?.sources&&t.recordClsOnPageloadSpan&&Ms.sources.forEac
491h((n,r)=>e.setAttribute(`cls.source.${r+1}`,je(n.node)))}function w0(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<a0||typeof s=="string")&&(t[o]=s)})}function k0(e){const t=uo(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function R0(){return ho()&&Pe()?Pn("element",A0):()=>{}}const A0=({entries:e})=>{const t=Te(),n=t?Se(t):void 0,r=n?F(n).description:j().getScopeData().transactionName;e.forEach(o=>{const s=o;if(!s.identifier)return;const i=s.name,a=s.renderTime,c=s.loadTime,[u,d]=c?[be(c),"load-time"]:a?[be(a),"render-time"]:[he(),"entry-emission"],l=i==="image-paint"?be(Math.max(0,(a??0)-(c??0))):0,f={[G]:"auto.ui.browser.elementtiming",[pe]:"ui.elementtiming",[ae]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":s.id,"element.type":s.element?.tagName?.toLowerCase()||"unknown","element.size":s.naturalWidth&&s.naturalHeight?`${s.naturalWidth}x${s.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":s.url||void 0,"element.identifier":s.identifier,"element.paint_type":i};dn({name:`element[${s.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},p=>{p.end(u+l)})})},C0=1e3;let Gl,Ca,xa;function mh(e){an("dom",e),cn("dom",x0)}function x0(){if(!q.document)return;const e=et.bind(null,"dom"),t=Vl(e,!0);q.document.addEventListener("click",t,!1),q.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=q[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Me(o,"addEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=Vl(e);d.handler=l,s.call(this,i,l,c)}d.refCount++}catch{}return s.call(this,i,a,c)}}),Me(o,"removeEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,c),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,a,c)}}))})}function M0(e){if(e.type!==Ca)return!1;try{if(!e.target||e.target._sentryId!==xa)return!1}catch{}return!0}function N0(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Vl(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=O0(n);if(N0(n.type,r))return;Ee(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ee(r,"_sentryId",ke());const o=n.type==="keypress"?"input":n.type;M0(n)||(e({event:n,name:o,global:t}),Ca=n.type,xa=r?r._sentryId:void 0),clearTimeout(Gl),Gl=q.setTimeout(()=>{xa=void 0,Ca=void 0},C0)}}function O0(e){try{return e.target}catch{return null}}let Oo;function pi(e){const t="history";an(t,e),cn(t,P0)}function P0(){if(q.addEventListener("popstate",()=>{const t=q.location.href,n=Oo;if(Oo=t,n===t)return;et("history",{from:n,to:t})}),!UT())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=Oo,s=L0(String(r));if(Oo=s,o===s)return t.apply(this,n);et("history",{from:o,to:s})}return t.apply(this,n)}}Me(q.history,"pushState",e),Me(q.history,"replaceState",e)}function L0(e){try{return new URL(e,q.location.origin).toString()}catch{return e}}const rs={};function jc(e){const t=rs[e];if(t)return t;let n=q[e];if(ba(n))return rs[e]=n.bind(q);const r=q.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){On&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(rs[e]=n.bind(q))}function D0(e){rs[e]=void 0}function mo(...e){return jc("setTimeout")(...e)}const kt="__sentry_xhr_v3__";function zc(e){an("xhr",e),cn("xhr",F0)}function F0(){if(!q.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=new Error,s=he()*1e3,i=at(r[0])?r[0].toUpperCase():void 0,a=$0(r[1]);if(!i||!a)return t.apply(n,r);
491n[kt]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[kt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:he()*1e3,startTimestamp:s,xhr:n,virtualError:o};et("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[f,p]=l,h=d[kt];return h&&at(f)&&at(p)&&(h.request_headers[f.toLowerCase()]=p),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[kt];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:he()*1e3,xhr:n};return et("xhr",s),t.apply(n,r)}})}function $0(e){if(at(e))return e;try{return e.toString()}catch{}}const U0=Symbol.for("sentry__originalRequestBody");function gh(e){return new URLSearchParams(e).toString()}function Ns(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[gh(e)];if(!e)return[void 0]}catch(n){return On&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return On&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function qc(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][U0];return n!==void 0?n:void 0}}function _h(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return On&&g.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r 492`).reduce((n,r)=>{const[o,s]=r.split(": ");return s&&(n[o.toLowerCase()]=s),n},{}):{}}const Ji=[],os=new Map,Wn=new Map,B0=60;function H0(){if(ho()&&Pe()){const t=W0();return()=>{t()}}return()=>{}}const Ma={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function W0(){return uh(j0)}const j0=({metric:e})=>{if(e.value==null)return;const t=be(e.value);if(t>B0)return;const n=e.entries.find(h=>h.duration===e.value&&Ma[h.name]);if(!n)return;const{interactionId:r}=n,o=Ma[n.name],s=be(Pe()+n.startTime),i=Te(),a=i?Se(i):void 0,c=r!=null?os.get(r):void 0,u=c?.span||a,d=u?F(u).description:j().getScopeData().transactionName,l=c?.elementName||je(n.target),f={[G]:"auto.http.browser.inp",[pe]:`ui.interaction.${o}`,[Sr]:n.duration},p=Wc({name:l,transaction:d,attributes:f,startTime:s});p&&(p.addEvent("inp",{[Zr]:"millisecond",[eo]:e.value}),p.end(s+t))};function z0(){const e=Object.keys(Ma);ws()&&e.forEach(o=>{q.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const s=o.target;if(!s)return;const i=je(s),a=Math.round(o.timeStamp);if(Wn.set(a,i),Wn.size>50){const c=Wn.keys().next().value;c!==void 0&&Wn.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=Wn.get(s);if(!i)for(let a=-5;a<=5;a++){const c=Wn.get(s+a);if(c){i=c;break}}return i||"<unknown>"}const r=({entries:o})=>{const s=Te(),i=s&&Se(s);o.forEach(a=>{if(!ZI(a))return;const c=a.interactionId;if(c==null||os.has(c))return;const u=a.target?je(a.target):n(a);if(Ji.length>10){const d=Ji.shift();os.delete(d)}Ji.push(c),os.set(c,{span:i,elementName:u})})};Pn("event",r),Pn("first-input",r)}const q0=40;function yh(e,t=jc("fetch")){let n=0,r=0;async function o(s){const i=s.body.length;n+=i,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw D0("fetch"),c}finally{n-=i,r--}}return By(e,o,mc(e.bufferSize||q0))}const I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function G0(){const e=A();if(!e){I&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){I&&g.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function V0(){const e=A();if(!e){I&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){I&&g.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const JM={startProfiler:G0,stopProfiler:V0},J0=10,Y0=20,K0=30,X0=40,Q0=50;function dr(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?_t:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}
492const Z0=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ew=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tw=/\((\S*)(?::(\d+))(?::(\d+))\)/,nw=/at (.+?) ?\(data:(.+?),/,rw=e=>{const t=e.match(nw);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Z0.exec(e);if(n){const[,o,s,i]=n;return dr(o,_t,+s,+i)}const r=ew.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=tw.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,i]=Sh(r[1]||_t,r[2]);return dr(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},ow=[K0,rw],sw=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,iw=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,aw=e=>{const t=sw.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=iw.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],o=t[1]||_t;return[o,r]=Sh(o,r),dr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},cw=[Q0,aw],uw=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,lw=e=>{const t=uw.exec(e);return t?dr(t[2],t[1]||_t,+t[3],t[4]?+t[4]:void 0):void 0},YM=[X0,lw],dw=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,fw=e=>{const t=dw.exec(e);return t?dr(t[2],t[3]||_t,+t[1]):void 0},KM=[J0,fw],pw=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,hw=e=>{const t=pw.exec(e);return t?dr(t[5],t[3]||t[4]||_t,+t[1],+t[2]):void 0},XM=[Y0,hw],mw=[ow,cw],gw=of(...mw),Sh=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:_t,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function QM(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:Dt(r)}},s=_w(e);return dt(o,[s])}function _w(e){return[{type:"user_report"},e]}const Po=1024,yw="Breadcrumbs",Sw=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:yw,setup(n){t.console&&yc(vw(n)),t.dom&&mh(Tw(n,t.dom)),t.xhr&&zc(Iw(n)),t.fetch&&Cc(ww(n)),t.history&&pi(kw(n)),t.sentry&&n.on("beforeSendEvent",Ew(n))}}}),bw=Sw;function Ew(e){return function(n){A()===e&&Et({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:mn(n)},{event:n})}}function Tw(e,t){return function(r){if(A()!==e)return;let o,s,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Po&&(I&&g.warn(`\`dom.maxStringLength\` cannot exceed ${Po}, but a value of ${a} was configured. Sentry will use ${Po} instead.`),a=Po),typeof i=="string"&&(i=[i]);try{const u=r.event,d=Rw(u)?u.target:u;o=je(d,{keyAttrs:i,maxStringLength:a}),s=ff(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};s&&(c.data={"ui.component_name":s}
492),Et(c,{event:r.event,name:r.name,global:r.global})}}function vw(e){return function(n){if(A()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Ts(n.level),message:fs(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${fs(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Et(r,{input:n.args,level:n.level})}}function Iw(e){return function(n){if(A()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[kt];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,d={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},f={category:"xhr",data:d,type:"http",level:Dp(c)};e.emit("beforeOutgoingRequestBreadcrumb",f,l),Et(f,l)}}function ww(e){return function(n){if(A()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const s=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},a={category:"fetch",data:s,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Et(a,i)}else{const s=n.response,i={...n.fetchData,status_code:s?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,s?.status;const a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:Dp(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Et(c,a)}}}function kw(e){return function(n){if(A()!==e)return;let r=n.from,o=n.to;const s=In(C.location.href);let i=r?In(r):void 0;const a=In(o);i?.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(o=a.relative),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),Et({category:"navigation",data:{from:r,to:o}})}}function Rw(e){return!!e&&!!e.target}const Aw=["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"],Cw="BrowserApiErrors",xw=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Cw,setupOnce(){t.setTimeout&&Me(C,"setTimeout",Jl),t.setInterval&&Me(C,"setInterval",Jl),t.requestAnimationFrame&&Me(C,"requestAnimationFrame",Nw),t.XMLHttpRequest&&"XMLHttpRequest"in C&&Me(XMLHttpRequest.prototype,"send",Ow);const n=t.eventTarget;n&&(Array.isArray(n)?n:Aw).forEach(o=>Pw(o,t))}}}),Mw=xw;function Jl(e){return function(...t){const n=t[0];return t[0]=lr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${xt(e)}`}}),e.apply(this,t)}}function Nw(e){return function(t){return e.apply(this,[lr(t,{mechanism:{data:{handler:xt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Ow(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Me(n,o,function(s){const i={mechanism:{data:{handler:xt(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Qa(s);return a&&(i.mechanism.data.handler=xt(a)),lr(s,i)})}),e.apply(this,t)}}function Pw(e,t){const r=C[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Me(r,"addEventListener",function(o){return function(s,i,a){try{Lw(i)&&(i.handleEvent=lr(i.handleEvent,{mechanism:{data:{handler:xt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&Dw(this,s,i),o.apply(this,[s,lr(i,{mechanism:{data:{handler:xt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Me(r,"removeEventListener",function(o){return function(s,i,a){try{const c=i.__sentry_wrapped__;c&&o.call(this,s,c,a)}catch{}return o.call(this,s,i,a)}}))}function Lw(e){return typeof e.handleEvent=="function"}function Dw(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const Fw=()=>({name:"BrowserSession",setupOnce(){if(typeof C.document>"u"){I&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Hu({ignoreDuration:!0}),Wu(),pi(({from:e,to:t})=>{e!==void 0&&e!==t&&(Hu({ignoreDuration:!0}),Wu())})}}),$w="GlobalHandlers",Uw=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:$w,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Hw(n),Yl("onerror")),t.onunhandledrejection&&(Ww(n),Yl("onunhandledrejection"))}}}),Bw=Uw;function Hw(e){af(t=>{const{stackParser:n,attachStacktrace:r}=Th();if(A()!==e||Qp())return;const{msg:o,url:s,line:i,column:a,error:c}
492=t,u=jw(li(n,c||o,void 0,r,!1),s,i,a);u.level="error",no(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Ww(e){cf(t=>{const{stackParser:n,attachStacktrace:r}=Th();if(A()!==e||Qp())return;const o=bh(t),s=tn(o)?Eh(o):li(n,o,void 0,r,!0);s.level="error",no(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function bh(e){if(tn(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}function Eh(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function jw(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,d=n,l=zw(t)??Dn();return c.length===0&&c.push({colno:u,filename:l,function:_t,in_app:!0,lineno:d}),e}function Yl(e){I&&g.log(`Global Handler attached: ${e}`)}function Th(){return A()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function zw(e){if(!(!at(e)||e.length===0))return e.startsWith("data:")?`<${Vt(e,!1)}>`:e}const qw=()=>({name:"HttpContext",preprocessEvent(e){if(!C.navigator&&!C.location&&!C.document)return;const t=Lc(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),Gw="cause",Vw=5,Jw="LinkedErrors",Yw=((e={})=>{const t=e.limit||Vw,n=e.key||Gw;return{name:Jw,preprocessEvent(r,o,s){const i=s.getOptions();AS(Dc,i.stackParser,n,t,r,o)}}}),Kw=Yw,Xw="SpotlightBrowser",Qw=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:Xw,setup:()=>{I&&g.log("Using Sidecar URL",t)},processEvent:n=>ek(n)?null:n,afterAllSetup:n=>{Zw(n,t)}}});function Zw(e,t){const n=jc("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){g.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:_s(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,g.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const ZM=Qw;function ek(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}function tk(){return nk()?(I&&sn(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function nk(){if(typeof C.window>"u")return!1;const e=C;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Dn(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(C===C.top&&r.some(s=>n.startsWith(`${s}://`)))}function rk(e){return[bS(),gS(),Rb(),Mw(),bw(),Bw(),Kw(),FS(),qw(),Fw()]}function ok(e={}){const t=!e.skipBrowserExtensionCheck&&tk();let n=e.defaultIntegrations==null?rk():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:pg(e.stackParser||gw),integrations:Ey({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||yh};return Xy(kI,r)}function eN(){}function tN(e){e()}function Kl(e={}){const t=C.document,n=t?.head||t?.body;if(!n){I&&g.error("[showReportDialog] Global document not defined");return}const r=j(),s=A()?.getDsn();if(!s){I&&g.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||py()},a=C.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Sy(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{C.removeEventListener("message",d)}};C.addEventListener("message",d)}n.appendChild(a)}const sk=$,ik="ReportingObserver",Xl=new WeakMap,ak=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Xl.has(A()))for(const o of r)Ke(s=>{s.setExtra("url",o.url);const i=`ReportingObserver [${o.type}]`;let a="No details available";if(o.body){const c={};for(const u in o.body)c[u]=o.body[u];if(s.setExtra("body",c),o.type==="crash"){const u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}fy(`${i}: ${a}`)})}return{name:ik,setupOnce(){if(!HT())return;new sk.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Xl.set(r,!0)}}}),nN=ak,ck="HttpClient",uk=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:ck,setup(n){_k(n,t),yk(n,t)}}}),rN=uk;function lk(e,t,n,r,o){if(Ih(e,n.status,n.url)){const s=Sk(t,r);let i,a,c,u;kh()&&([i,c]=Ql("Cookie",s),[a,u]=Ql("Set-Cookie",n));const d=wh({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});no(d)}}function Ql(e,t){const n=pk(t.headers);let r;try{const o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=vh(o))}catch{}return[n,r]}function dk(e,t,n,r,o){if(Ih(e,t.status,t.responseURL)){let s,i,a;
492if(kh()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(i=vh(u))}catch{}try{a=hk(t)}catch{}s=r}const c=wh({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});no(c)}}function fk(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function vh(e){return e.split("; ").reduce((t,n)=>{const[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function pk(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function hk(e){const t=e.getAllResponseHeaders();return t?t.split(`\r 493`).reduce((n,r)=>{const[o,s]=r.split(": ");return o&&s&&(n[o]=s),n},{}):{}}function mk(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function gk(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function _k(e,t){Fp()&&Cc(n=>{if(A()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&lk(t,a,r,c,s||i)},!1)}function yk(e,t){"XMLHttpRequest"in $&&zc(n=>{if(A()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[kt];if(!i)return;const{method:a,request_headers:c}=i;try{dk(t,s,a,c,r||o)}catch(u){I&&g.warn("Error while extracting response event form XHR response",u)}})}function Ih(e,t,n){return gk(e.failedRequestStatusCodes,t)&&mk(e.failedRequestTargets,n)&&!up(n,A())}function wh(e){const t=A(),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:fk(e.responseHeaders)}}};return Nt(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function Sk(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function kh(){const e=A();return e?!!e.getOptions().sendDefaultPii:!1}const Yi=$,bk=7,Ek="ContextLines",Tk=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:bk;return{name:Ek,processEvent(n){return vk(n,t)}}}),oN=Tk;function vk(e,t){const n=Yi.document,r=Yi.location&&cp(Yi.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(` 494`),"</html>"];return o.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>Ik(u,i,r,t)))}),e}function Ik(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Rg(t,e,r),e}const wk="GraphQLClient",kk=(e=>({name:wk,setup(t){Rk(t,e),Ak(t,e)}}));function Rk(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=F(n).data||{};if(!(s[pe]==="http.client"))return;const c=s[Wg]||s["http.url"],u=s[Hg]||s["http.method"];if(!at(c)||!at(u))return;const{endpoints:d}=t,l=ct(c,d),f=Ah(r);if(l&&f){const p=Ch(f);if(p){const h=Rh(p);n.updateName(`${u} ${c} (${h})`),hi(p)&&n.setAttribute("graphql.document",p.query),mi(p)&&(n.setAttribute("graphql.persisted_query.hash.sha256",p.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",p.extensions.persistedQuery.version))}}})}function Ak(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const d=i?.url,{endpoints:l}=t,f=ct(d,l),p=Ah(r);if(f&&i&&p){const h=Ch(p);if(!i.graphql&&h){const m=Rh(h);i["graphql.operation"]=m,hi(h)&&(i["graphql.document"]=h.query),mi(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function Rh(e){if(mi(e))return`persisted ${e.operationName}`;if(hi(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=Ck(t);return r?`${o} ${r}`:`${o}`}return"unknown"}function Ah(e){const t="xhr"in e;let n;if(t){const r=e.xhr[kt];n=r&&Ns(r.body)[0]}else{const r=qc(e.input);n=Ns(r)[0]}return n}function Ck(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);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function ss(e){return typeof e=="object"&&e!==null}function hi(e){return ss(e)&&typeof e.query=="string"}
494function mi(e){return ss(e)&&typeof e.operationName=="string"&&ss(e.extensions)&&ss(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Ch(e){try{const t=JSON.parse(e);return hi(t)||mi(t)?t:void 0}catch{return}}const sN=kk,fe=$,Gc="sentryReplaySession",xk="replay_event",Vc="Unable to send Replay",Mk=3e5,Nk=9e5,Ok=5e3,Pk=5500,Lk=6e4,Dk=5e3,Fk=3,Zl=15e4,Lo=5e3,$k=3e3,Uk=300,Jc=2e7,Bk=4999,Hk=5e4,ed=36e5;var Wk=Object.defineProperty,jk=(e,t,n)=>t in e?Wk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,td=(e,t,n)=>jk(e,typeof t!="symbol"?t+"":t,n),Ie=(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))(Ie||{});function zk(e){return e.nodeType===e.ELEMENT_NODE}function Fr(e){return e?.host?.shadowRoot===e}function $r(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function qk(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Gk(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(" ")+";"}function Os(e){try{const t=e.rules||e.cssRules;return t?qk(Array.from(t,xh).join("")):null}catch{return null}}function Vk(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} }`}function xh(e){let t;if(Yk(e))try{t=Os(e.styleSheet)||Gk(e)}catch{}else if(Kk(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=Vk(e)),r&&(n=Jk(n)),r||o)return n}return t||e.cssText}function Jk(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Yk(e){return"styleSheet"in e}function Kk(e){return"selectorText"in e}let Mh=class{constructor(){td(this,"idNodeMap",new Map),td(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Xk(){return new Mh}function gi({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function zr({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function fr(e){return e.toLowerCase()}function Na(e){return e.toUpperCase()}const nd="__rrweb_original__";function Qk(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,i=nd in s?s[nd]:s;if(new Uint32Array(i.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function Yc(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?fr(t):null}function Ps(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Nh(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const rd={};function Oh(e){const t=rd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return rd[e]=r.bind(window)}function Oa(...e){return Oh("setTimeout")(...e)}
494function Ph(...e){return Oh("clearTimeout")(...e)}function Lh(e){try{return e.contentDocument}catch{}}let Zk=1;const eR=new RegExp("[^a-z0-9-_:]"),qr=-2;function Kc(){return Zk++}function tR(e){if(e instanceof HTMLFormElement)return"form";const t=fr(e.tagName);return eR.test(t)?"div":t}function nR(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let jn,od;const rR=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,oR=/^(?:[a-z+]+:)?\/\//i,sR=/^www\..*/i,iR=/^(data:)([^,]*),(.*)/i;function aR(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;const s=o.indexOf(":");if(s===-1){r.push(o);continue}const i=o.slice(0,s).trim();t.has(i)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function Ls(e,t){return(e||"").replace(rR,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(oR.test(c)||sR.test(c))return`url(${u}${c}${u})`;if(iR.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${nR(t)+c}${u})`;const d=t.split("/"),l=c.split("/");d.pop();for(const f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}const cR=/^[^ \t\n\r\u000c]+/,uR=/^[, \t\n\r\u000c]+/;function lR(e,t){if(t.trim()==="")return t;let n=0;function r(s){let i;const a=s.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const o=[];for(;r(uR),!(n>=t.length);){let s=r(cR);if(s.slice(-1)===",")s=Vn(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=Vn(e,s);let a=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((s+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return o.join(", ")}const sd=new WeakMap;function Vn(e,t){return!t||t.trim()===""?t:_i(e,t)}function dR(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function _i(e,t){let n=sd.get(e);if(n||(n=e.createElement("a"),sd.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Dh(e,t,n,r,o,s,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Vn(e,r);if(n==="xlink:href"&&r[0]!=="#")return Vn(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Vn(e,r);if(n==="srcset")return lR(e,r);if(n==="style"){let a=Ls(r,_i(e));return i&&i.size>0&&(a=aR(a,i)),a}else if(t==="object"&&n==="data")return Vn(e,r);return typeof s=="function"?s(n,r,o):r}function Fh(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function fR(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const s=e.classList[o];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function pR(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Sn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Sn(e.parentNode,t,n,r+1)}function Jn(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(pR(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function pr(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(s){if(c=Sn(i,Jn(r,o)),c<0)return!0;a=Sn(i,Jn(t,n),c>=0?c:1/0)}else{if(a=Sn(i,Jn(t,n)),a<0)return!1;c=Sn(i,Jn(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function hR(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=Oa(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Ph(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Oa(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function mR(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const s=Oa(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Ph(s),r=!0,t()})}function gR(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:_,dataURLOptions:y={}
494,inlineImages:S,recordCanvas:M,keepIframeSrcFn:v,newlyAddedElement:L=!1,ignoreCSSAttributes:N}=t,b=_R(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Ie.Document,childNodes:[],compatMode:e.compatMode}:{type:Ie.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ie.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return SR(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:_,dataURLOptions:y,inlineImages:S,recordCanvas:M,keepIframeSrcFn:v,newlyAddedElement:L,rootId:b,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,ignoreCSSAttributes:N});case e.TEXT_NODE:return yR(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:h,maskInputFn:_,rootId:b});case e.CDATA_SECTION_NODE:return{type:Ie.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:Ie.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function _R(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function yR(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=Os(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}f=Ls(f,_i(t.doc))}h&&(f="SCRIPT_PLACEHOLDER");const _=pr(e,r,s,o,i,n);if(!p&&!h&&!m&&f&&_&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(c.textarea||_)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){const y=gi({type:null,tagName:l,maskInputOptions:c});f=zr({isMasked:pr(e,r,s,o,i,y),element:e,value:f,maskInputFn:u})}return{type:Ie.Text,textContent:f||"",isStyle:p,rootId:d}}function SR(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:_,unmaskTextClass:y,maskTextSelector:S,unmaskTextSelector:M,ignoreCSSAttributes:v}=t,L=fR(e,r,o,s),N=tR(e);let b={};const x=e.attributes.length;for(let E=0;E<x;E++){const O=e.attributes[E];O.name&&!Fh(N,O.name,O.value)&&(b[O.name]=Dh(n,N,fr(O.name),O.value,e,c,v))}if(N==="link"&&i){const E=Array.from(n.styleSheets).find(R=>R.href===e.href);let O=null;E&&(O=Os(E)),O&&(b.rel=null,b.href=null,b.crossorigin=null,b._cssText=Ls(O,E.href))}if(N==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Os(e.sheet);E&&(b._cssText=Ls(E,_i(n)))}if(N==="input"||N==="textarea"||N==="select"||N==="option"){const E=e,O=Yc(E),R=Ps(E,Na(N),O),P=E.checked;if(O!=="submit"&&O!=="button"&&R){const D=pr(E,_,S,y,M,gi({type:O,tagName:Na(N),maskInputOptions:a}));b.value=zr({isMasked:D,element:E,value:R,maskInputFn:u})}P&&(b.checked=P)}if(N==="option"&&(e.selected&&!a.select?b.selected=!0:delete b.selected),N==="canvas"&&f){if(e.__context==="2d")Qk(e)||(b.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const E=e.toDataURL(d.type,d.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height;const R=O.toDataURL(d.type,d.quality);E!==R&&(b.rr_dataURL=E)}}if(N==="img"&&l){jn||(jn=n.createElement("canvas"),od=jn.getContext("2d"));const E=e,O=E.currentSrc||E.getAttribute("src")||"<unknown-src>",R=E.crossOrigin,P=()=>{E.removeEventListener("load",P);try{jn.width=E.naturalWidth,jn.height=E.naturalHeight,od.drawImage(E,0,0),b.rr_dataURL=jn.toDataURL(d.type,d.quality)}catch(D){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?P():E.addEventListener("load",P);return}else console.warn(`Cannot inline img src=${O}! Error: ${D}`)}E.crossOrigin==="anonymous"&&(R?b.crossOrigin=R:E.removeAttribute("crossorigin"))};
494E.complete&&E.naturalWidth!==0?P():E.addEventListener("load",P)}if((N==="audio"||N==="video")&&(b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),L){const{width:E,height:O}=e.getBoundingClientRect();b={class:b.class,rr_width:`${E}px`,rr_height:`${O}px`}}N==="iframe"&&!p(b.src)&&(!L&&!Lh(e)&&(b.rr_src=b.src),delete b.src);let U;try{customElements.get(N)&&(U=!0)}catch{}return{type:Ie.Element,tagName:N,attributes:b,childNodes:[],isSVG:dR(e)||void 0,needBlock:L,rootId:m,isCustom:U}}function de(e){return e==null?"":e.toLowerCase()}function bR(e,t){if(t.comment&&e.type===Ie.Comment)return!0;if(e.type===Ie.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Nh(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(de(e.attributes.name).match(/^msapplication-tile(image|color)$/)||de(e.attributes.name)==="application-name"||de(e.attributes.rel)==="icon"||de(e.attributes.rel)==="apple-touch-icon"||de(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&de(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(de(e.attributes.property).match(/^(og|twitter|fb):/)||de(e.attributes.name).match(/^(og|twitter):/)||de(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(de(e.attributes.name)==="robots"||de(e.attributes.name)==="googlebot"||de(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(de(e.attributes.name)==="author"||de(e.attributes.name)==="generator"||de(e.attributes.name)==="framework"||de(e.attributes.name)==="publisher"||de(e.attributes.name)==="progid"||de(e.attributes.property).match(/^article:/)||de(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(de(e.attributes.name)==="google-site-verification"||de(e.attributes.name)==="yandex-verification"||de(e.attributes.name)==="csrf-token"||de(e.attributes.name)==="p:domain_verify"||de(e.attributes.name)==="verify-v1"||de(e.attributes.name)==="verification"||de(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Yn(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:M={},inlineImages:v=!1,recordCanvas:L=!1,onSerialize:N,onIframeLoad:b,iframeLoadTimeout:x=5e3,onBlockedImageLoad:U,onStylesheetLoad:E,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:P=!1,ignoreCSSAttributes:D}=t;let{preserveWhiteSpace:ee=!0}=t;const K=gR(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,dataURLOptions:M,inlineImages:v,recordCanvas:L,keepIframeSrcFn:R,newlyAddedElement:P,ignoreCSSAttributes:D});if(!K)return console.warn(e,"not serialized"),null;let ne;r.hasNode(e)?ne=r.getId(e):bR(K,S)||!ee&&K.type===Ie.Text&&!K.isStyle&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?ne=qr:ne=Kc();const T=Object.assign(K,{id:ne});if(r.add(e,T),ne===qr)return null;N&&N(e);let z=!f;if(T.type===Ie.Element){z=z&&!T.needBlock;const w=e.shadowRoot;w&&$r(w)&&(T.isShadowHost=!0)}if((T.type===Ie.Document||T.type===Ie.Element)&&z){S.headWhitespace&&T.type===Ie.Element&&T.tagName==="head"&&(ee=!1);const w={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:M,inlineImages:v,recordCanvas:L,preserveWhiteSpace:ee,onSerialize:N,onIframeLoad:b,iframeLoadTimeout:x,onBlockedImageLoad:U,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:R,ignoreCSSAttributes:D},V=e.childNodes?Array.from(e.childNodes):[];for(const se of V){const re=Yn(se,w);re&&T.childNodes.push(re)}if(zk(e)&&e.shadowRoot)for(const se of Array.from(e.shadowRoot.childNodes)){const re=Yn(se,w);re&&($r(e.shadowRoot)&&(re.isShadow=!0),T.childNodes.push(re))}}if(e.parentNode&&Fr(e.parentNode)&&$r(e.parentNode)&&(T.isShadow=!0),T.type===Ie.Element&&T.tagName==="iframe"&&!T.needBlock&&hR(e,()=>{const w=Lh(e);if(w&&b){const V=Yn(w,{doc:w,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:M,inlineImages:v,recordCanvas:L,preserveWhiteSpace:ee,onSerialize:N,onIframeLoad:b,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:R,ignoreCSSAttributes:D});V&&b(e,V)}},x),T.type===Ie.Element&&T.tagName==="img"&&!e.complete&&T.needBlock){const w=e,V=()=>
494{if(w.isConnected&&!w.complete&&U)try{const se=w.getBoundingClientRect();se.width>0&&se.height>0&&U(w,T,se)}catch{}w.removeEventListener("load",V)};w.isConnected&&w.addEventListener("load",V)}return T.type===Ie.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&Nh(T.attributes.href)==="css")&&mR(e,()=>{if(E){const w=Yn(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:M,inlineImages:v,recordCanvas:L,preserveWhiteSpace:ee,onSerialize:N,onIframeLoad:b,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:R,ignoreCSSAttributes:D});w&&E(e,w)}},O),T.type===Ie.Element&&delete T.needBlock,T}function ER(e,t){const{mirror:n=new Mh,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOM:S=!1,dataURLOptions:M,preserveWhiteSpace:v,onSerialize:L,onIframeLoad:N,iframeLoadTimeout:b,onBlockedImageLoad:x,onStylesheetLoad:U,stylesheetLoadTimeout:E,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:R=new Set([])}=t||{};return Yn(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:M,inlineImages:f,recordCanvas:p,preserveWhiteSpace:v,onSerialize:L,onIframeLoad:N,iframeLoadTimeout:b,onBlockedImageLoad:x,onStylesheetLoad:U,stylesheetLoadTimeout:E,keepIframeSrcFn:O,newlyAddedElement:!1,ignoreCSSAttributes:R})}function $e(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const zn=`Please stop import mirror directly. Instead of that,\r 495now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 496or you can use record.mirror to access the mirror instance during recording.`;let id={map:{},getId(){return console.error(zn),-1},getNode(){return console.error(zn),null},removeNodeFromMap(){console.error(zn)},has(){return console.error(zn),!1},reset(){console.error(zn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(id=new Proxy(id,{get(e,t,n){return t==="map"&&console.error(zn),Reflect.get(e,t,n)}}));function Gr(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&n.leading===!1&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(AR(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=yi(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function $h(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){yi(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>$h(e,t,s||{},!0)}function Xc(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let Ds=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ds=()=>new Date().getTime());function Uh(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Bh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Hh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Wh(e){if(!e)return null;
496try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ve(e,t,n,r,o){if(!e)return!1;const s=Wh(e);if(!s)return!1;const i=Jn(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=Sn(s,i);let c=-1;return a<0?!1:(r&&(c=Sn(s,Jn(null,r))),a>-1&&c<0?!0:a<c)}function TR(e,t){return t.getId(e)!==-1}function Ki(e,t){return t.getId(e)===qr}function jh(e,t){if(Fr(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?jh(e.parentNode,t):!0:!0}function Pa(e){return!!e.changedTouches}function vR(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function zh(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function qh(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function La(e){return!!e?.shadowRoot}class IR{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Gh(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function wR(e){let t=e,n;for(;n=Gh(t);)t=n;return t}function kR(e){const t=e.ownerDocument;if(!t)return!1;const n=wR(e);return t.contains(n)}function Vh(e){const t=e.ownerDocument;return t?t.contains(e)||kR(e):!1}const ad={};function Qc(e){const t=ad[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return ad[e]=r.bind(window)}function RR(...e){return Qc("requestAnimationFrame")(...e)}function yi(...e){return Qc("setTimeout")(...e)}function AR(...e){return Qc("clearTimeout")(...e)}var J=(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))(J||{}),W=(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))(W||{}),Fe=(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))(Fe||{}),wt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(wt||{}),qn=(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))(qn||{});function Zc(e){try{return e.contentDocument}catch{}}function CR(e){try{return e.contentWindow}catch{}}function cd(e){return"__ln"in e}class xR{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&cd(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&cd(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;
496n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const ud=(e,t)=>`${e}@${t}`;class MR{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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new xR,o=c=>{let u=c,d=qr;for(;d===qr;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},s=c=>{if(!c.parentNode||!Vh(c))return;const u=Fr(c.parentNode)?this.mirror.getId(Gh(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);const l=Yn(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{zh(f,this.mirror)&&!Ve(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),qh(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),La(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{Ve(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},onBlockedImageLoad:(f,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)ld(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!dd(this.droppedSet,c)&&!ld(this.removes,c,this.mirror)||dd(this.movedSet,c)?s(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=o(i.value);u!==-1&&d!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(l!==-1){c=d;break}else{const p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),s(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Ki(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:pr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Wh(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const i=Yc(n),a=n.tagName;o=Ps(n,a,i);const c=gi({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=pr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=zr({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!Zc(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Fh(n.tagName,r)&&(s.attributes[r]=Dh(this.doc,fr(n.tagName),fr(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==i.style.getPropertyValue(a)||u!==i.style.getPropertyPriority(a)?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}for(const a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}
496case"childList":{if(Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Fr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Ki(n,this.mirror)||!TR(n,this.mirror)||(this.addedSet.has(n)?(Da(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||jh(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[ud(r,o)]?Da(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Fr(t.target)&&$r(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ki(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[ud(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ve(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),La(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Da(e,t){e.delete(t),t.childNodes?.forEach(n=>Da(e,n))}function ld(e,t,n){return e.length===0?!1:NR(e,t,n)}function NR(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(s=>s.id===o))return!0;r=r.parentNode}return!1}function dd(e,t){return e.size===0?!1:Jh(e,t)}function Jh(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Jh(e,n):!1}let Ur;function OR(e){Ur=e}function PR(){Ur=void 0}const te=e=>Ur?(...n)=>{try{return e(...n)}catch(r){if(Ur&&Ur(r)===!0)return()=>{};throw r}}:e,Kn=[];function go(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 Yh(e,t){const n=new MR;Kn.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(te(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function LR({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=Gr(te(l=>{const f=Date.now()-a;e(i.map(p=>(p.timeOffset-=f,p)),l),i=[],a=null}),s),u=te(Gr(te(l=>{const f=go(l),{clientX:p,clientY:h}=Pa(l)?l.changedTouches[0]:l;a||(a=Ds()),i.push({x:p,y:h,id:r.getId(f),timeOffset:Ds()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?W.Drag:l instanceof MouseEvent?W.MouseMove:W.TouchMove)}),o,{trailing:!1})),d=[$e("mousemove",u,n),$e("touchmove",u,n),$e("drag",u,n)];return te(()=>{d.forEach(l=>l())})}function DR({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const d=l=>f=>{const p=go(f);if(Ve(p,r,o,s,!0))return;let h=null,m=l;if("pointerType"in f){switch(f.pointerType){case"mouse":h=wt.Mouse;break;case"touch":h=wt.Touch;break;case"pen":h=wt.Pen;break}h===wt.Touch?Fe[l]===Fe.MouseDown?m="TouchStart":Fe[l]===Fe.MouseUp&&(m="TouchEnd"):wt.Pen}else Pa(f)&&(h=wt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===wt.Touch||m.startsWith("Mouse")&&h===wt.Mouse)&&(h=null)):Fe[l]===Fe.Click&&(h=u,u=null);const _=Pa(f)?f.changedTouches[0]:f;if(!_)return;const y=n.getId(p),{clientX:S,clientY:M}=_;te(e)({type:Fe[m],id:y,x:S,y:M,...h!==null&&{pointerType:h}})};return Object.keys(Fe).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEac
496h(l=>{let f=fr(l);const p=d(l);if(window.PointerEvent)switch(Fe[l]){case Fe.MouseDown:case Fe.MouseUp:f=f.replace("mouse","pointer");break;case Fe.TouchStart:case Fe.TouchEnd:return}c.push($e(f,p,t))}),te(()=>{c.forEach(l=>l())})}function Kh({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=te(Gr(te(c=>{const u=go(c);if(!u||Ve(u,r,o,s,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=Uh(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return $e("scroll",a,t)}function FR({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=te(Gr(te(()=>{const s=Bh(),i=Hh();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return $e("resize",o,t)}const $R=["INPUT","TEXTAREA","SELECT"],fd=new WeakMap;function UR({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function _(b){let x=go(b);const U=b.isTrusted,E=x&&Na(x.tagName);if(E==="OPTION"&&(x=x.parentElement),!x||!E||$R.indexOf(E)<0||Ve(x,r,o,s,!0))return;const O=x;if(O.classList.contains(i)||a&&O.matches(a))return;const R=Yc(x);let P=Ps(O,E,R),D=!1;const ee=gi({maskInputOptions:c,tagName:E,type:R}),K=pr(x,f,h,p,m,ee);(R==="radio"||R==="checkbox")&&(D=x.checked),P=zr({isMasked:K,element:x,value:P,maskInputFn:u}),y(x,l?{text:P,isChecked:D,userTriggered:U}:{text:P,isChecked:D});const ne=x.name;R==="radio"&&ne&&D&&t.querySelectorAll(`input[type="radio"][name="${ne}"]`).forEach(T=>{if(T!==x){const z=zr({isMasked:K,element:T,value:Ps(T,E,R),maskInputFn:u});y(T,l?{text:z,isChecked:!D,userTriggered:!1}:{text:z,isChecked:!D})}})}function y(b,x){const U=fd.get(b);if(!U||U.text!==x.text||U.isChecked!==x.isChecked){fd.set(b,x);const E=n.getId(b);te(e)({...x,id:E})}}const M=(d.input==="last"?["change"]:["input","change"]).map(b=>$e(b,te(_),t)),v=t.defaultView;if(!v)return()=>{M.forEach(b=>b())};const L=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),N=[[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 L&&L.set&&M.push(...N.map(b=>$h(b[0],b[1],{set(){te(_)({target:this,isTrusted:!1})}},!1,v))),te(()=>{M.forEach(b=>b())})}function Fs(e){const t=[];function n(r,o){if(Do("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Do("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Do("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Do("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Wt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function BR({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:te((d,l,f)=>{const[p,h]=f,{id:m,styleId:_}=Wt(l,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,adds:[{rule:p,index:h}]}),d.apply(l,f)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:te((d,l,f)=>{const[p]=f,{id:h,styleId:m}=Wt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),d.apply(l,f)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:te((d,l,f)=>{const[p]=f,{id:h,styleId:m}=Wt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),d.apply(l,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:te((d,l,f)=>{const[p]=f,{id:h,styleId:m}=Wt(l,t,n.styleMirror);
496return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),d.apply(l,f)})}));const c={};Fo("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Fo("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Fo("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Fo("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:te((f,p,h)=>{const[m,_]=h,{id:y,styleId:S}=Wt(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,adds:[{rule:m,index:[...Fs(p),_||0]}]}),f.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:te((f,p,h)=>{const[m]=h,{id:_,styleId:y}=Wt(p.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,removes:[{index:[...Fs(p),m]}]}),f.apply(p,h)})})}),te(()=>{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(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function Xh({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(i){const a=s.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),te(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function HR({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:te((a,c,u)=>{const[d,l,f]=u;if(n.has(d))return s.apply(c,[d,l,f]);const{id:p,styleId:h}=Wt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:d,value:l,priority:f},index:Fs(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:te((a,c,u)=>{const[d]=u;if(n.has(d))return i.apply(c,[d]);const{id:l,styleId:f}=Wt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,remove:{property:d},index:Fs(c.parentRule)}),a.apply(c,u)})}),te(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function WR({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=te(u=>Gr(te(d=>{const l=go(d);if(!l||Ve(l,t,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:m}=l;e({type:u,id:o.getId(l),currentTime:f,volume:p,muted:h,playbackRate:m})}),s.media||500)),c=[$e("play",a(qn.Play),i),$e("pause",a(qn.Pause),i),$e("seeked",a(qn.Seeked),i),$e("volumechange",a(qn.VolumeChange),i),$e("ratechange",a(qn.RateChange),i)];return te(()=>{c.forEach(u=>u())})}function jR({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,d){const l=new s(c,u,d);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=Xc(t.fonts,"add",function(a){return function(c){return yi(te(()=>{const u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(i),te(()=>{r.forEach(a=>a())})}function zR(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=te(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:m,endContainer:_,endOffset:y}=p;Ve(h,r,o,s,!0)||Ve(_,r,o,s,!0)||d.push({start:n.getId(h),startOffset:m,end:n.getId(_),endOffset:y})}i({ranges:d})});return c(),$e("selectionchange",c)}function qR({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Xc(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function GR(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Yh(e,e.doc));const o=LR(e),s=DR(e),i=Kh(e),a=FR(e,{win:n}),c=UR(e),u=WR(e);let d=()=>{},l=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(d=BR(e,{win:n}),l=Xh(e,e.doc),f=HR(e,{win:n}),e.collectFonts&&(p=jR(e)));const h=zR(e),m=qR(e),_=[];for(const y of e.plugins)_.push(y.observer(y.callback,n,y.options));return te(()=>{Kn.forEach(y=>y.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),d(),l(),f(),p(),h(),m(),_.forEach(y=>y())})}function Do(e){return typeof window[e]<"u"}function Fo(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Fa{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),i=o||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}
496class VR{constructor(){this.crossOriginIframeMirror=new Fa(Kc),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class JR{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Fa(Kc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Fa(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Zc(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case J.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:J.IncrementalSnapshot,data:{source:W.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case J.Meta:case J.Load:case J.DomContentLoaded:return!1;case J.Plugin:return n;case J.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case J.IncrementalSnapshot:switch(n.data.source){case W.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case W.Drag:case W.TouchMove:case W.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case W.ViewportResize:return!1;case W.MediaInteraction:case W.MouseInteraction:case W.Scroll:case W.CanvasMutation:case W.Input:return this.replaceIds(n.data,t,["id"]),n;case W.StyleSheetRule:case W.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case W.Font:return n;case W.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case W.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Ie.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class YR{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class KR{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!$r(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Yh({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Kh({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),yi(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Xh({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Zc(t),r=CR(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Xc(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&Vh(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}
496reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var pd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",XR=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var $o=0;$o<pd.length;$o++)XR[pd.charCodeAt($o)]=$o;class hd{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class QR{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new IR,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of t){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:xh(a),index:c}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class ZR{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,RR(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let ye,$s;try{if(Array.from([1],e=>e*2)[0]!==2){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 ot=Xk();function Ct(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:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:_,slimDOMOptions:y,maskAttributeFn:S,maskInputFn:M,maskTextFn:v,maxCanvasSize:L=null,packFn:N,sampling:b={},dataURLOptions:x={},mousemoveWait:U,recordDOM:E=!0,recordCanvas:O=!1,recordCrossOriginIframes:R=!1,recordAfter:P=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:D=!1,collectFonts:ee=!1,inlineImages:K=!1,plugins:ne,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:z=new Set([]),errorHandler:w,onMutation:V,getCanvasManager:se}=e;OR(w);const re=R?window.parent===window:!0;let ve=!1;if(!re)try{window.parent.document&&(ve=!1)}catch{ve=!0}if(re&&!t)throw new Error("emit function is required");if(!re&&!ve)return()=>{};U!==void 0&&b.mousemove===void 0&&(b.mousemove=U),ot.reset();const Le=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:_!==void 0?_:{},$t=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};vR();let De,Ue=0;const ft=X=>{for(const ze of ne||[])ze.eventProcessor&&(X=ze.eventProcessor(X));return N&&!ve&&(X=N(X)),X};ye=(X,ze)=>{const Q=X;if(Q.timestamp=Ds(),Kn[0]?.isFrozen()&&Q.type!==J.FullSnapshot&&!(Q.type===J.IncrementalSnapshot&&Q.data.source===W.Mutation)&&Kn.forEach(xe=>xe.unfreeze()),re)t?.(ft(Q),ze);else if(ve){const xe={type:"rrweb",event:ft(Q),origin:window.location.origin,isCheckout:ze};window.parent.postMessage(xe,"*")}if(Q.type===J.FullSnapshot)De=Q,Ue=0;else if(Q.type===J.IncrementalSnapshot){if(Q.data.source===W.Mutation&&Q.data.isAttachIframe)return;Ue++;const xe=r&&Ue>=r,oe=n&&De&&Q.timestamp-De.timestamp>n;(xe||oe)&&pt(!0)}};const Ut=X=>{ye({type:J.IncrementalSnapshot,data:{source:W.Mutation,...X}})},wr=X=>ye({type:J.IncrementalSnapshot,data:{source:W.Scroll,...X}}),Io=X=>ye({type:J.IncrementalSnapshot,data:{source:W.CanvasMutation,...X}}),kr=X=>ye({type:J.IncrementalSnapshot,data:{source:W.AdoptedStyleSheet,...X}}),ie=new QR({mutationCb:Ut,adoptedStyleSheetCb:kr}),me=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new VR:new JR({mirror:ot,mutationCb:Ut,stylesheetManager:ie,recordCrossOriginIframes:R,wrappedEmit:ye});for(const X of ne||[])X.getMirror&&X.getMirror({nodeMirror:ot,crossOriginIframeMirror:me.crossOriginIframeMirror,crossOriginIframeStyleMirror:me.crossOriginIframeStyleMirror});const Xe=new ZR,Ce=tA(se,{mirror:ot,win:window,mutationCb:X=>ye({type:J.IncrementalSnapshot,data:{source:W.CanvasMutation,...X}}),recordCanvas:O,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:L,sampling:b.canvas,dataURLOptions:x,errorHandler:w}),Ne=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new YR:new KR({mutationCb:Ut,scrollCb:wr,bypassOptions:{onMutation:V,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:Le,dataURLOptions:x,maskAttributeFn:S,maskTextFn:v,maskInputFn:M,recordCanvas:O,inlineImages:K,sampling:b,slimDOMOptions:$t,iframeManager:me,stylesheetManager:ie,canvasManager:Ce,keepIframeSrcFn:T,processedNodeManager:Xe,ignoreCSSAttributes:z},mirror:ot}),pt=(X=!1)=>
496{if(!E)return;ye({type:J.Meta,data:{href:window.location.href,width:Hh(),height:Bh()}},X),ie.reset(),Ne.init(),Kn.forEach(Q=>Q.lock());const ze=ER(document,{mirror:ot,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:Le,maskAttributeFn:S,maskInputFn:M,maskTextFn:v,slimDOM:$t,dataURLOptions:x,recordCanvas:O,inlineImages:K,onSerialize:Q=>{zh(Q,ot)&&me.addIframe(Q),qh(Q,ot)&&ie.trackLinkElement(Q),La(Q)&&Ne.addShadowRoot(Q.shadowRoot,document)},onIframeLoad:(Q,xe)=>{me.attachIframe(Q,xe),Q.contentWindow&&Ce.addWindow(Q.contentWindow),Ne.observeAttachShadow(Q)},onStylesheetLoad:(Q,xe)=>{ie.attachLinkElement(Q,xe)},onBlockedImageLoad:(Q,xe,{width:oe,height:Rr})=>{Ut({adds:[],removes:[],texts:[],attributes:[{id:xe.id,attributes:{style:{width:`${oe}px`,height:`${Rr}px`}}}]})},keepIframeSrcFn:T,ignoreCSSAttributes:z});if(!ze)return console.warn("Failed to snapshot the document");ye({type:J.FullSnapshot,data:{node:ze,initialOffset:Uh(window)}}),Kn.forEach(Q=>Q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,ot.getId(document))};$s=pt;try{const X=[],ze=xe=>te(GR)({onMutation:V,mutationCb:Ut,mousemoveCb:(oe,Rr)=>ye({type:J.IncrementalSnapshot,data:{source:Rr,positions:oe}}),mouseInteractionCb:oe=>ye({type:J.IncrementalSnapshot,data:{source:W.MouseInteraction,...oe}}),scrollCb:wr,viewportResizeCb:oe=>ye({type:J.IncrementalSnapshot,data:{source:W.ViewportResize,...oe}}),inputCb:oe=>ye({type:J.IncrementalSnapshot,data:{source:W.Input,...oe}}),mediaInteractionCb:oe=>ye({type:J.IncrementalSnapshot,data:{source:W.MediaInteraction,...oe}}),styleSheetRuleCb:oe=>ye({type:J.IncrementalSnapshot,data:{source:W.StyleSheetRule,...oe}}),styleDeclarationCb:oe=>ye({type:J.IncrementalSnapshot,data:{source:W.StyleDeclaration,...oe}}),canvasMutationCb:Io,fontCb:oe=>ye({type:J.IncrementalSnapshot,data:{source:W.Font,...oe}}),selectionCb:oe=>{ye({type:J.IncrementalSnapshot,data:{source:W.Selection,...oe}})},customElementCb:oe=>{ye({type:J.IncrementalSnapshot,data:{source:W.CustomElement,...oe}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:Le,inlineStylesheet:h,sampling:b,recordDOM:E,recordCanvas:O,inlineImages:K,userTriggeredOnInput:D,collectFonts:ee,doc:xe,maskAttributeFn:S,maskInputFn:M,maskTextFn:v,keepIframeSrcFn:T,blockSelector:s,unblockSelector:i,slimDOMOptions:$t,dataURLOptions:x,mirror:ot,iframeManager:me,stylesheetManager:ie,shadowDomManager:Ne,processedNodeManager:Xe,canvasManager:Ce,ignoreCSSAttributes:z,plugins:ne?.filter(oe=>oe.observer)?.map(oe=>({observer:oe.observer,options:oe.options,callback:Rr=>ye({type:J.Plugin,data:{plugin:oe.name,payload:Rr}})}))||[]},{});me.addLoadListener(xe=>{try{X.push(ze(xe.contentDocument))}catch(oe){console.warn(oe)}});const Q=()=>{pt(),X.push(ze(document))};return document.readyState==="interactive"||document.readyState==="complete"?Q():(X.push($e("DOMContentLoaded",()=>{ye({type:J.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&Q()})),X.push($e("load",()=>{ye({type:J.Load,data:{}}),P==="load"&&Q()},window))),()=>{X.forEach(xe=>xe()),Xe.destroy(),$s=void 0,PR()}}catch(X){console.warn(X)}}function eA(e){if(!$s)throw new Error("please take full snapshot after start recording");$s(e)}Ct.mirror=ot;Ct.takeFullSnapshot=eA;function tA(e,t){try{return e?e(t):new hd}catch{return console.warn("Unable to initialize CanvasManager"),new hd}}var md;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(md||(md={}));const nA=3,rA=5;function eu(e){return e>9999999999?e:e*1e3}function Xi(e){return e>9999999999?e/1e3:e}function _o(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:J.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ge(t,10,1e3)}}),t.category==="console")))}const oA="button,a";function Qh(e){return e.closest(oA)||e}function Zh(e){const t=em(e);return!t||!(t instanceof Element)?t:Qh(t)}function em(e){return sA(e)?e.target:e}function sA(e){return typeof e=="object"&&!!e&&"target"in e}let jt;function iA(e){return jt||(jt=[],aA()),jt.push(e),()=>{const t=jt?jt.indexOf(e):-1;t>-1&&jt.splice(t,1)}}function aA(){Me(fe,"open",function(e){return function(...t){if(jt)try{jt.forEach(n=>n())}catch{}return e.apply(fe,t)}})}
496const cA=new Set([W.Mutation,W.StyleSheetRule,W.StyleDeclaration,W.AdoptedStyleSheet,W.CanvasMutation,W.Selection,W.MediaInteraction]);function uA(e,t,n){e.handleClick(t,n)}class lA{constructor(t,n,r=_o){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=iA(()=>{this._lastMutation=gd()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(fA(n,this._ignoreSelector)||!pA(t))return;const r={timestamp:Xi(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Xi(t)}registerScroll(t=Date.now()){this._lastScroll=Xi(t)}registerClick(t){const n=Qh(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=gd();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:a}=t;if(s){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:fe.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:fe.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=mo(()=>this._checkClicks(),1e3)}}const dA=["A","BUTTON","INPUT"];function fA(e,t){return!!(!dA.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function pA(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function gd(){return Date.now()/1e3}function hA(e,t){try{if(!mA(t))return;const{source:n}=t.data;if(cA.has(n)&&e.registerMutation(t.timestamp),n===W.Scroll&&e.registerScroll(t.timestamp),gA(t)){const{type:r,id:o}=t.data,s=Ct.mirror.getNode(o);s instanceof HTMLElement&&r===Fe.Click&&e.registerClick(s)}}catch{}}function mA(e){return e.type===nA}function gA(e){return e.data.source===W.MouseInteraction}function mt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var tu=(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))(tu||{});const _A=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function yA(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(_A.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const SA=e=>t=>{if(!e.isEnabled())return;const n=bA(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;
496r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&uA(e.clickDetector,n,Zh(t.event)),_o(e,n)};function tm(e,t){const n=Ct.mirror.getId(e),r=n&&Ct.mirror.getNode(n),o=r&&Ct.mirror.getMeta(r),s=o&&TA(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===tu.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:yA(s.attributes)}}:{}}}function bA(e){const{target:t,message:n}=EA(e);return mt({category:`ui.${e.name}`,...tm(t,n)})}function EA(e){const t=e.name==="click";let n,r=null;try{r=t?Zh(e.event):em(e.event),n=je(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function TA(e){return e.type===tu.Element}function vA(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=IA(t);n&&_o(e,n)}function IA(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||wA(i)||!s)return null;const a=t||r||o,c=s.length===1;if(!a&&c)return null;const u=je(i,{maxStringLength:200})||"<unknown>",d=tm(i,u);return mt({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function wA(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const kA={resource:MA,paint:CA,navigation:xA};function Qi(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function RA(e){return e.map(AA).filter(Boolean)}function AA(e){const t=kA[e.entryType];return t?t(e):null}function hr(e){return((Pe()||fe.performance.timeOrigin)+e)/1e3}function CA(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=hr(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function xA(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:f,startTime:p,transferSize:h,type:m}=e;return o===0?null:{type:`${t}.${m}`,start:hr(p),end:hr(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:s,redirectCount:f}}}function MA(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:hr(s),end:hr(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function NA(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return nu(e,"largest-contentful-paint",n)}function OA(e){return e.sources!==void 0}function PA(e){const t=[],n=[];for(const r of e.entries)if(OA(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=Ct.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return nu(e,"cumulative-layout-shift",n,t)}function LA(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return nu(e,"interaction-to-next-paint",n)}function nu(e,t,n,r){const o=e.value,s=e.rating,i=hr(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(a=>Ct.mirror.getId(a)):void 0,attributions:r}}}function DA(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push(Pn(o,n))}),r.push(Hc(Qi(NA,e)),Bc(Qi(PA,e)),uh(Qi(LA,e))),()=>{r.forEach(o=>o())}}const B=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,FA='
vendor: 10,329 bytes, line 496
496var 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});
496';function $A(){const e=new Blob([FA]);return URL.createObjectURL(e)}const _d=["log","warn","error"],is="[Replay] ";function Zi(e,t="info"){Et({category:"console",data:{logger:"replay"},level:t,message:`${is}${e}`},{level:t})}function UA(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return B?(_d.forEach(r=>{n[r]=(...o)=>{g[r](is,...o),t&&Zi(o.join(""),Ts(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),g.error(is,r),e?_e(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Zi(r,"error")},n.infoTick=(...r)=>{g.log(is,...r),t&&setTimeout(()=>Zi(r[0]),0)}):_d.forEach(r=>{n[r]=()=>{}}),n}const H=UA();class ru extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Jc}.`)}}class nm{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(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Jc)throw new ru;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?eu(t):null}}class BA{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){B&&H.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,s)=>{const i=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",i),!c.success){B&&H.error("Error in compression worker: ",c.response),s(new Error("Error in compression worker"));return}o(c.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class HA{constructor(t){this._worker=new BA(t),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(t){const n=eu(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Jc?Promise.reject(new ru):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{B&&H.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class WA{constructor(t){this._fallback=new nm,this._compression=new HA(t),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(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){B&&H.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const s of t)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){B&&H.exception(s,"Failed to add events when switching buffers.")}}}function jA({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=zA(t);if(n)return n}return B&&H.log("Using simple buffer"),new nm}function zA(e){try{const t=e||qA();if(!t)return;B&&H.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new WA(n)}catch(t){B&&H.exception(t,"Failed to create compression worker")}}function qA(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?$A():""}function ou(){try{return"sessionStorage"in fe&&!!fe.sessionStorage}catch{return!1}}function GA(e){VA(),e.session=void 0}function VA(){if(ou())try{fe.sessionStorage.removeItem(Gc)}catch{}}function rm(e){return e===void 0?!1:Math.random()<e}function Si(e){if(ou())try{fe.sessionStorage.setItem(Gc,JSON.stringify(e))}catch{}}function om(e){const t=Date.now(),n=e.id||ke(),r=e.started||t,o=e.lastActivity||t,s=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:s,sampled:i,previousSessionId:a,dirty:c}}function JA(e,t){return rm(e)?"session":t?"buffer":!1}function yd({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=JA(e,t),s=om({sampled:o,previousSessionId:r});return n&&Si(s),s}
496function YA(){if(!ou())return null;try{const e=fe.sessionStorage.getItem(Gc);if(!e)return null;const t=JSON.parse(e);return B&&H.infoTick("Loading existing session"),om(t)}catch{return null}}function $a(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function sm(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return $a(e.started,t,r)||$a(e.lastActivity,n,r)}function im(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!sm(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ea({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&YA();return o?im(o,{sessionIdleExpire:e,maxReplayDuration:t})?(B&&H.infoTick("Session in sessionStorage is expired, creating new one..."),yd(r,{previousSessionId:o.id})):o:(B&&H.infoTick("Creating new session"),yd(r,{previousSessionId:n}))}function KA(e){return e.type===J.Custom}function su(e,t,n){return cm(e,t)?(am(e,t,n),!0):!1}function XA(e,t,n){return cm(e,t)?am(e,t,n):Promise.resolve(null)}async function am(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),i=QA(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){const i=s&&s instanceof ru,a=i?"addEventSizeExceeded":"addEvent",c=A();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a})}}function cm(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=eu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(B&&H.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function QA(e,t){try{if(typeof t=="function"&&KA(e))return t(e)}catch(n){return B&&H.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function iu(e){return!e.type}function Ua(e){return e.type==="transaction"}function ZA(e){return e.type==="replay_event"}function Sd(e){return e.type==="feedback"}function eC(e){return(t,n)=>{if(!e.isEnabled()||!iu(t)&&!Ua(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Ua(t)){tC(e,t);return}nC(e,t)}}}function tC(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function nC(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||mo(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function rC(e){return t=>{!e.isEnabled()||!iu(t)||oC(e,t)}}function oC(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=mt({category:"replay.hydrate-error",data:{url:Dn()}});_o(e,r)}}function sC(e){const t=A();t&&t.on("beforeAddBreadcrumb",n=>iC(e,n))}function iC(e,t){if(!e.isEnabled()||!um(t))return;const n=aC(t);n&&_o(e,n)}function aC(e){return!um(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?cC(e):mt(e)}function cC(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return mt(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Lo?(n=!0,`${o.slice(0,Lo)}…`):o;if(typeof o=="object")try{const s=Ge(o,7);return JSON.stringify(s).length>Lo?(n=!0,`${JSON.stringify(s,null,2).slice(0,Lo)}…`):s}catch{}return o});return mt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function um(e){return!!e.category}function uC(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function lm(){const e=j().getPropagationContext().dsc;e&&delete e.replay_id;const t=Te();if(t){const n=lt(t);delete n.replay_id}}function lC(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:J.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function dC(e,t){return e.recordingMode!=="buffer"||t.message===Vc||!t.exception||t.type?!1:rm(e.getOptions().errorSampleRate)}function fC(e){return Object.assign((t,n)=>
496{if(!e.isEnabled()||e.isPaused())return t;if(ZA(t))return delete t.breadcrumbs,t;if(!iu(t)&&!Ua(t)&&!Sd(t))return t;if(!e.checkAndHandleExpiredSession())return lm(),t;if(Sd(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),lC(e,t),t;if(uC(t,n)&&!e.getOptions()._experiments.captureExceptions)return B&&H.log("Ignoring error from rrweb internals",t),null;const o=dC(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&Si(i)}return t},{id:"Replay"})}function bi(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:J.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function pC(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function hC(e){return t=>{if(!e.isEnabled())return;const n=pC(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(bi(e,[n]),!1)))}}function mC(e,t){return B&&e.getOptions()._experiments.traceInternals?!1:up(t,A())}function dm(e,t){e.isEnabled()&&t!==null&&(mC(e,t.name)||e.addUpdate(()=>(bi(e,[t]),!0)))}function Ei(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=gh(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function fm(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Us(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 pm(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 Vr(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Yt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=gC(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Ba(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 gC(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Zl,n=_C(e);if(t){const r=e.slice(0,Zl);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function _C(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Bs(e,t){const n=yC(e);return ct(n,t)}function yC(e,t=fe.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(fe.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function SC(e,t,n){try{const r=await EC(e,t,n),o=pm("resource.fetch",r);dm(n.replay,o)}catch(r){B&&H.exception(r,"Failed to capture fetch breadcrumb")}}function bC(e,t){const{input:n,response:r}=t,o=n?qc(n):void 0,s=Ei(o),i=r?fm(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}async function EC(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:d}=e.data,l=Bs(i,n.networkDetailAllowUrls)&&!Bs(i,n.networkDetailDenyUrls),f=l?TC(n,t.input,u):Vr(u),p=await vC(l,n,t.response,d);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:f,response:p}}function TC({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?kC(n,t):{};if(!e)return Yt(o,r,void 0);const s=qc(n),[i,a]=Ns(s,H),c=Yt(o,r,i);return a?Us(c,a):c}async function vC(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return Vr(o);const s=r?hm(r.headers,n):{};if(!r||!t&&o!==void 0)return Yt(s,o,void 0);const[i,a]=await wC(r),c=IC(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?Us(c,a):c}function IC(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?Ei(e):n;return r?t?Yt(o,s,e):Yt(o,s,void 0):Vr(s)}catch(s){return B&&H.exception(s,"Failed to serialize response body"),Yt(o,n,void 0)}}async function wC(e){const t=RC(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await AC(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(B&&H.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(B&&H.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function hm(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}
496function kC(e,t){return e.length===1&&typeof e[0]!="string"?bd(e[0],t):e.length===2?bd(e[1],t):{}}function bd(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?hm(n,t):Array.isArray(n)?{}:Ba(n,t):{}}function RC(e){try{return e.clone()}catch(t){B&&H.exception(t,"Failed to clone response body")}}function AC(e){return new Promise((t,n)=>{const r=mo(()=>n(new Error("Timeout while trying to read response body")),500);CC(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function CC(e){return await e.text()}async function xC(e,t,n){try{const r=NC(e,t,n),o=pm("resource.xhr",r);dm(n.replay,o)}catch(r){B&&H.exception(r,"Failed to capture xhr breadcrumb")}}function MC(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Ei(r),s=n.getResponseHeader("content-length")?fm(n.getResponseHeader("content-length")):LC(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function NC(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:f}=e.data;if(!c)return null;if(!a||!Bs(c,n.networkDetailAllowUrls)||Bs(c,n.networkDetailDenyUrls)){const N=Vr(l),b=Vr(f);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:N,response:b}}const p=a[kt],h=p?Ba(p.request_headers,n.networkRequestHeaders):{},m=Ba(_h(a),n.networkResponseHeaders),[_,y]=n.networkCaptureBodies?Ns(i,H):[void 0],[S,M]=n.networkCaptureBodies?OC(a):[void 0],v=Yt(h,l,_),L=Yt(m,f,S);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:y?Us(v,y):v,response:M?Us(L,M):L}}function OC(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return PC(e.response,e.responseType)}catch(n){t.push(n)}return B&&H.warn("Failed to get xhr response body",...t),[void 0]}function PC(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return B&&H.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return B&&H.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function LC(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Ei(n)}catch{return}}function DC(e){const t=A();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",(c,u)=>FC(a,c,u))}catch{}}function FC(e,t,n){if(t.data)try{$C(t)&&BC(n)&&(MC(t,n),xC(t,n,e)),UC(t)&&HC(n)&&(bC(t,n),SC(t,n,e))}catch(r){B&&H.exception(r,"Error when enriching network breadcrumb")}}function $C(e){return e.category==="xhr"}function UC(e){return e.category==="fetch"}function BC(e){return e?.xhr}function HC(e){return e?.response}function WC(e){const t=A();mh(SA(e)),pi(hC(e)),sC(e),DC(e);const n=fC(e);my(n),t&&(t.on("beforeSendEvent",rC(e)),t.on("afterSendEvent",eC(e)),t.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{const s=e.getSessionId();o?.includeReplay&&e.isEnabled()&&s&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=s)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function jC(e){try{return Promise.all(bi(e,[zC(fe.performance.memory)]))}catch{return[]}}function zC(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 qC(e,t,n){return fS(e,t,{...n,setTimeoutImpl:mo})}const Uo=$.navigator;function GC(){return/iPhone|iPad|iPod/i.test(Uo?.userAgent??"")||/Macintosh/i.test(Uo?.userAgent??"")&&Uo?.maxTouchPoints&&Uo?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function VC(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){B&&H.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,e.clickDetector&&hA(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!su(e,n,o))return!0;
496if(!o)return!1;const s=e.session;if(YC(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(B&&H.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&Si(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function JC(e){const t=e.getOptions();return{type:J.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?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function YC(e,t){!t||!e.session||e.session.segmentId!==0||su(e,JC(e),!1)}function KC(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function XC(e,t,n,r){return dt($f(e,Js(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function QC({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)} 497`;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function ZC({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:o};e.emit("preprocessEvent",r,s);const i=await Wf(e.getOptions(),r,s,t,e,we());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:d}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:d},i}async function e1({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=QC({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=A(),f=j(),p=l?.getTransport(),h=l?.getDsn();if(!l||!p||!h||!s.sampled)return Promise.resolve({});const m={type:xk,replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},_=await ZC({scope:f,client:l,replayId:t,event:m});if(!_)return l.recordDroppedEvent("event_processor","replay"),B&&H.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete _.sdkProcessingMetadata;const y=XC(_,i,h,l.getOptions().tunnel);let S;try{S=await p.send(y)}catch(v){const L=new Error(Vc);try{L.cause=v}catch{}throw L}const M=ep({},S);if(Zf(M,"replay"))throw new au(M);if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new mm(S.statusCode);return S}class mm extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class au extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class Ed extends Error{constructor(){super("Session is too long, not sending replay")}}async function gm(e,t={count:0,interval:Dk}){const{recordingData:n,onError:r}=e;if(n.length)try{return await e1(e),!0}catch(o){if(o instanceof mm||o instanceof au)throw o;if(jf("Replays",{_retryCount:t.count}),r&&r(o),t.count>=Fk){const s=new Error(`${Vc} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{mo(async()=>{try{await gm(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const _m="__THROTTLED",t1="__SKIPPED";function n1(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(o(c),s()>=t){const d=i;return i=!0,d?t1:_m}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class r1{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Mk,sessionIdleExpire:Nk},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=qC(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=n1((i,a)=>XA(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min($k,r),timeout:r,scrollTimeout:Uk,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new lA(this,s)),B){const i=t._experiments;H.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{fe.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
497dTasks()},this._handleWindowBlur=()=>{const i=mt({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=mt({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{vA(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){B&&H.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){B&&H.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",B&&H.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){B&&H.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){B&&H.log("Buffering is in progress, call `flush()` to save the replay");return}B&&H.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ea({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){B&&H.log("Buffering is in progress, call `flush()` to save the replay");return}B&&H.infoTick("Starting replay in buffer mode");const t=ea({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Ct({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:Lk}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:VC(this),...GC(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{B&&H.log(`Stopping Replay${n?` triggered by ${n}`:""}`),lm(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,GA(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),B&&H.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),B&&H.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();B&&H.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}
497checkAndHandleExpiredSession(){if(this._lastActivity&&$a(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${fe.location.pathname}${fe.location.hash}${fe.location.search}`,n=`${fe.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===_m){const o=mt({category:"replay.throttled"});this.addUpdate(()=>!su(this,{type:rA,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Te(),n=t&&Se(t),o=(n&&F(n).data||{})[ae];if(!(!n||!o||!["route","custom"].includes(o)))return F(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=jA({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=ea({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return im(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{fe.document.addEventListener("visibilitychange",this._handleVisibilityChange),fe.addEventListener("blur",this._handleWindowBlur),fe.addEventListener("focus",this._handleWindowFocus),fe.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(WC(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=DA(this)}_removeListeners(){try{fe.document.removeEventListener("visibilitychange",this._handleVisibilityChange),fe.removeEventListener("blur",this._handleWindowBlur),fe.removeEventListener("focus",this._handleWindowFocus),fe.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||sm(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){B&&H.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:J.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=RA(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(bi(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}
497_popEventContext(){const t={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(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){B&&H.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await jC(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Ed;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await gm({replayId:t,recordingData:s,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=A();if(r){let o;n instanceof au?o="ratelimit_backoff":n instanceof Ed?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){B&&H.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const s=o<this._options.minReplayDuration,i=o>this._options.maxReplayDuration+5e3;if(s||i){B&&H.log(`Session duration (${Math.floor(o/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&B&&H.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Si(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=KC(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,o=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=o&&r>o;if(r>s||i){const a=mt({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function xr(e,t){return[...e,...t].join(",")}function o1({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=xr(e,[".sentry-mask","[data-sentry-mask]"]),a=xr(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:xr(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:xr(r,[]),ignoreSelector:xr(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function s1({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return!r||o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const Td='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',i1=["content-length","content-type","accept"],a1=Symbol.for("sentry__originalRequestBody");let vd=!1,Id=!1;function c1(){if(typeof Request>"u"||Id)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[a1]=r.body),o};t.prototype=e.prototype,$.Request=t,Id=!0}catch{}}const aN=(e=>new u1(e));class u1{constructor({flushMinDelay:t=Ok,flushMaxDelay:n=Pk,minReplayDuration:r=Bk,maxReplayDuration:o=ed,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:y=[],networkCaptureBodies:S=!0,networkRequestHeaders:M=[],networkResponseHeaders:v=[],mask:L=[],maskAttributes:N=["title","placeholder","aria-label"],unmask:b=[],block:x=[],unblock:U=[],ignore:E=[],maskFn:O,beforeAddRecordingEvent:R,beforeErrorSampling:P,onError:D,attachRawBodyFromRequest:ee=!1}={}){this.name="Replay";const K=o1({mask:L,unmask:b,block:x,unblock:U,ignore:E});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:O,maskInputFn:O,maskAttributeFn:(ne,T,z)=>s1({maskAttributes:N,maskAllText:u,privacyOptions:K,key:ne,value:T,el:z}),...K,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ne=>{try{ne.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Hk),maxReplayDuration:Math.min(o,ed),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:_,networkDetailDenyUrls:y,networkCaptureBodies:S,networkRequestHeaders:wd(M),networkResponseHeaders:wd(v),beforeAddRecordingEvent:R,beforeErrorSampling:P,onError:D,attachRawBodyFromRequest:ee,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Td}`:Td,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&ws())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return vd}set _isInitialized(t){vd=t}afterAllSetup(t){!ws()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&c1(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
497startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=l1(this._initialOptions,t);this._replay=new r1({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function l1(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=wn(n.replaysSessionSampleRate),s=wn(n.replaysOnErrorSampleRate);return o==null&&s==null&&sn(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function wd(e){return[...i1,...e.map(t=>t.toLowerCase())]}function cN(){return A()?.getIntegrationByName("Replay")}var d1=Object.defineProperty,f1=(e,t,n)=>t in e?d1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kd=(e,t,n)=>f1(e,typeof t!="symbol"?t+"":t,n);class p1{constructor(){kd(this,"idNodeMap",new Map),kd(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function h1(){return new p1}function m1(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ha(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ha(e.parentNode,t,n,r+1)}function Rd(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(m1(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Gn=`Please stop import mirror directly. Instead of that,\r 498now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 499or you can use record.mirror to access the mirror instance during recording.`;let Ad={map:{},getId(){return console.error(Gn),-1},getNode(){return console.error(Gn),null},removeNodeFromMap(){console.error(Gn)},has(){return console.error(Gn),!1},reset(){console.error(Gn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ad=new Proxy(Ad,{get(e,t,n){return t==="map"&&console.error(Gn),Reflect.get(e,t,n)}}));function cu(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Sm(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>cu(e,t,s||{},!0)}function uu(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function g1(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ti(e,t,n,r,o){if(!e)return!1;const s=g1(e);if(!s)return!1;const i=Rd(t,n),a=Ha(s,i);let c=-1;return a<0?!1:(r&&(c=Ha(s,Rd(null,r))),a>-1&&c<0?!0:a<c)}const Cd={};function ym(e){const t=Cd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return Cd[e]=r.bind(window)}function hn(...e){return ym("requestAnimationFrame")(...e)}
vendor: 4,086 bytes, line 499
499function Sm(...e){return ym("setTimeout")(...e)}var mr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(mr||{});let as;function _1(e){as=e}const ta=e=>as?(...n)=>{try{return e(...n)}catch(r){if(as&&as(r)===!0)return()=>{};throw r}}:e;var Xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bo=0;Bo<Xn.length;Bo++)y1[Xn.charCodeAt(Bo)]=Bo;var S1=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Xn[t[n]>>2],o+=Xn[(t[n]&3)<<4|t[n+1]>>4],o+=Xn[(t[n+1]&15)<<2|t[n+2]>>6],o+=Xn[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const xd=new Map;function b1(e,t){let n=xd.get(e);return n||(n=new Map,xd.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const bm=(e,t,n)=>{if(!e||!(Tm(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=b1(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function cs(e,t,n){if(e instanceof Array)return e.map(r=>cs(r,t,n));if(e===null)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){const r=e.constructor.name,o=S1(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[cs(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[cs(e.data,t,n),e.width,e.height]};if(Tm(e,t)||typeof e=="object"){const r=e.constructor.name,o=bm(e,t,n);return{rr_type:r,index:o}}}}return e}const Em=(e,t,n)=>e.map(r=>cs(r,t,n)),Tm=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function E1(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=uu(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return Ti(this.canvas,n,r,o,!0)||Sm(()=>{const l=Em(d,t,this);e(this.canvas,{type:mr["2D"],property:a,args:l})},0),u.apply(this,d)}});s.push(c)}catch{const c=cu(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:mr["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function T1(e){return e==="experimental-webgl"?"webgl":e}function Md(e,t,n,r,o){const s=[];try{const i=uu(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Ti(this,t,n,r,!0)){const d=T1(c);if("__context"in this||(this.__context=d),o&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(i=>i())}}function Nd(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const l=uu(e,d,function(f){return function(...p){const h=f.apply(this,p);if(bm(h,a,this),"tagName"in this.canvas&&!Ti(this.canvas,r,o,s,!0)){const m=Em(p,a,this),_={type:t,property:d,args:m};n(this.canvas,_)}return h}});c.push(l)}catch{const l=cu(e,d,{set(f){n(this.canvas,{type:t,property:d,args:[f],setter:!0})}});c.push(l)}return c}function v1(e,t,n,r,o,s){const i=[];
499return i.push(...Nd(t.WebGLRenderingContext.prototype,mr.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Nd(t.WebGL2RenderingContext.prototype,mr.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const I1='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)}};';function w1(){const e=new Blob([I1]);return URL.createObjectURL(e)}class k1{constructor(t){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=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:s,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&_1(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&ta(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),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(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}ta(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=Md(t,r,o,s,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}hn(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(w1());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:a,height:c}=r;this.mutationCb({id:o,type:mr["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=hn(n)};t=hn(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=Md(t,n,r,o,!1),i=E1(this.processMutation.bind(this),t,n,r,o),a=v1(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),a()})}getCanvasElements(t,n,r){const o=[],s=i=>{i.querySelectorAll("canvas").forEach(a=>{Ti(a,t,n,r)||o.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch{}c&&s(c)}for(const i of this.shadowDoms){const a=i.deref();a&&s(a)}return o}takeSnapshot(t,n,r){const{sampling:o,blockClass:s,blockSelector:i,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(o==="all"?2:o||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(s,i,a)).forEac
499h(h=>{const m=this.mirror.getId(h);if(!(!this.mirror.hasNode(h)||!h.width||!h.height||this.snapshotInProgressMap.get(m))){if(this.snapshotInProgressMap.set(m,!0),!n&&["webgl","webgl2"].includes(h.__context)){const _=h.getContext(h.__context);_?.getContextAttributes()?.preserveDrawingBuffer===!1&&_.clear(_.COLOR_BUFFER_BIT)}createImageBitmap(h).then(_=>{this.worker?.postMessage({id:m,bitmap:_,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:u},[_])}).catch(_=>{ta(()=>{throw this.snapshotInProgressMap.delete(m),_})()})}}),!0)}startPendingCanvasMutationFlusher(){hn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,hn(t)};hn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),hn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(i=>{const{type:a,...c}=i;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){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)}h1();var Od;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Od||(Od={}));const Pd={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}}},R1="ReplayCanvas",Ho=1280,A1=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Ho):Ho,n?Math.min(n,Ho):Ho]};let o,s;const i=new Promise(a=>s=a);return{name:R1,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:d=>{const l=new k1({...d,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:f=>{try{typeof f=="object"&&(f.__rrweb__=!0)}catch{}}});return o=l,s(l),l},...Pd[a]||Pd.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}}),uN=A1;function C1(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function vm(e){try{return new URL(e,C.location.origin).href}catch{return}}function x1(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Im(e){try{return new Headers(e)}catch{return}}const Ld=new WeakMap,na=new Map,wm={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function M1(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...wm,...t},d=typeof s=="function"?s:h=>!0,l=h=>N1(h,a),f={},p=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(m=>{if(m.op==="http.client"){const _=na.get(m.span_id);_&&(m.timestamp=_/1e3,na.delete(m.span_id))}}),h)),o&&WT(h=>{if(h.response){const m=Ld.get(h.response);m&&h.endTimestamp&&na.set(m,h.endTimestamp)}}),Cc(h=>{const m=Ab(h,d,l,f,{propagateTraceparent:p,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&Ld.set(h.response,h.fetchData.__span),m){const _=vm(h.fetchData.url),y=_?In(_).host:void 0;m.setAttributes({"http.url":_?Vt(_):void 0,"server.address":y}),i&&Dd(m),c?.(m,{headers:h.headers})}})),r&&zc(h=>{const m=O1(h,d,l,f,p,u);m&&(i&&Dd(m),c?.(m,{headers:Im(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}function Dd(e){const{url:t}=F(e).data;if(!t||typeof t!="string")return;const n=Pn("resource",({entries:r})=>{r.forEach(o=>{x1(o)&&o.name.endsWith(t)&&(e.setAttributes(hh(o)),setTimeout(n))})})}function N1(e,t){const n=Dn();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?ct(r.toString(),t)||s&&ct(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?ct(e,t):r}}function O1(e,t,n,r,o,s){const i=e.xhr,a=i?.[kt];
499if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,d=tt()&&t(c);if(e.endTimestamp&&d){const y=i.__sentry_xhr_span_id__;if(!y)return;const S=r[y];S&&a.status_code!==void 0&&(ps(S,a.status_code),S.end(),s?.(S,{headers:Im(_h(i)),error:e.error}),delete r[y]);return}const l=vm(c),f=In(l||c),p=Vt(cp(c)),h=!!Te(),m=d&&h?ut({name:`${u} ${p}`,attributes:{url:Vt(c),type:"xhr","http.method":u,"http.url":l?Vt(l):void 0,"server.address":f?.host,[G]:"auto.http.browser",[pe]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Ot;i.__sentry_xhr_span_id__=m.spanContext().spanId,r[i.__sentry_xhr_span_id__]=m,n(c)&&P1(i,tt()&&h?m:void 0,o);const _=A();return _&&_.emit("beforeOutgoingRequestSpan",m,e),m}function P1(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=dp({span:t,propagateTraceparent:n});r&&L1(e,r,o,s)}function L1(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const s=o?.baggage;(!s||!C1(s))&&e.setRequestHeader("baggage",n)}}catch{}}function D1(){C.document?C.document.addEventListener("visibilitychange",()=>{const e=Te();if(!e)return;const t=Se(e);if(C.document.hidden&&t){const n="cancelled",{op:r,status:o}=F(t);I&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:Z,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):I&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const F1=3600,km="sentry_previous_trace",$1="sentry.previous_trace";function U1(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?W1():void 0;e.on("spanStart",i=>{if(Se(i)!==i)return;const a=j().getPropagationContext();o=B1(o,i,a),r&&H1(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=j(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(Wa(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=Wa(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[yf]:o.sampleRate}})}function B1(e,t,n){const r=F(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Za])}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;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=F1&&(I&&g.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:i,attributes:{[jg]:"previous_trace"}}),t.setAttribute($1,`${i.traceId}-${i.spanId}-${Wa(i)?1:0}`)),s)}function H1(e){try{C.sessionStorage.setItem(km,JSON.stringify(e))}catch(t){I&&g.warn("Could not store previous trace in sessionStorage",t)}}function W1(){try{const e=C.sessionStorage?.getItem(km);return JSON.parse(e)}catch{return}}function Wa(e){return e.traceFlags===1}const j1="BrowserTracing",z1={...Vo,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...wm},yo=((e={})=>{const t={name:void 0,source:void 0},n=C.document,{enableInp:r,enableElementTiming:o,enableLongTask:s,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:h,traceFetch:m,traceXHR:_,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:S,enableHTTPTimings:M,ignoreResourceSpans:v,ignorePerformanceApiSpans:L,instrumentPageLoad:N,instrumentNavigation:b,detectRedirects:x,linkPreviousTrace:U,consistentTraceSampling:E,enableReportPageLoaded:O,onRequestSpanStart:R,onRequestSpanEnd:P}={...z1,...e};let D,ee,K;function ne(T,z,w=!0){const V=z.op==="pageload",se=z.name,re=d?d(z):z,ve=re.attributes||{};if(se!==re.name&&(ve[ae]="custom",re.attributes=ve),!w){const De=Fn();ut({...re,startTime:De}).end(De);return}t.name=re.name,t.source=ve[ae];const Le=Bf(re,{idleTimeout:l,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:V,beforeSpanEnd:De=>{D?.(),m0(De,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:v,ignorePerformanceApiSpans:L}),$d(T,void 0);const Ue=j(),ft=Ue.getPropagationContext();Ue.setPropagationContext({...ft,traceId:Le.spanContext().traceId,sampled:ln(Le),dsc:lt(De)}),V&&(K=void 0)},trimIdleSpanEndTimestamp:!O});V&&O&&(K=Le),$d(T,Le);function $t(){n&&["interactive","complete"].includes(n.readyState)&&T.emit("idleSpanEnableAutoFinish",Le)}V&&!O&&n&&(n.addEventListener("readystatechange",()=>{$t()}
499),$t())}return{name:j1,setup(T){if(h_(),D=c0({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:T}),r&&H0(),o&&R0(),i&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?l0():s&&u0(),a&&d0(),x&&n){const w=()=>{ee=he()};addEventListener("click",w,{capture:!0}),addEventListener("keydown",w,{capture:!0,passive:!0})}function z(){const w=Jr(T);w&&!F(w).timestamp&&(I&&g.log(`[Tracing] Finishing current active span with op: ${F(w).op}`),w.setAttribute(Hr,"cancelled"),w.end())}T.on("startNavigationSpan",(w,V)=>{if(A()!==T)return;if(V?.isRedirect){I&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),ne(T,{op:"navigation.redirect",...w},!1);return}ee=void 0,z(),we().setPropagationContext({traceId:yt(),sampleRand:Math.random(),propagationSpanId:tt()?void 0:At()});const se=j();se.setPropagationContext({traceId:yt(),sampleRand:Math.random(),propagationSpanId:tt()?void 0:At()}),se.setSDKProcessingMetadata({normalizedRequest:void 0}),ne(T,{op:"navigation",...w,parentSpan:null,forceTransaction:!0})}),T.on("startPageLoadSpan",(w,V={})=>{if(A()!==T)return;z();const se=V.sentryTrace||Fd("sentry-trace"),re=V.baggage||Fd("baggage"),ve=Rf(se,re),Le=j();Le.setPropagationContext(ve),tt()||(Le.getPropagationContext().propagationSpanId=At()),Le.setSDKProcessingMetadata({normalizedRequest:Lc()}),ne(T,{op:"pageload",...w})}),T.on("endPageloadSpan",()=>{O&&K&&(K.setAttribute(Hr,"reportPageLoaded"),K.end())})},afterAllSetup(T){let z=Dn();if(U!=="off"&&U1(T,{linkPreviousTrace:U,consistentTraceSampling:E}),C.location){if(N){const w=Pe();So(T,{name:C.location.pathname,startTime:w?w/1e3:void 0,attributes:{[ae]:"url",[G]:"auto.pageload.browser"}})}b&&pi(({to:w,from:V})=>{if(V===void 0&&z?.indexOf(w)!==-1){z=void 0;return}z=void 0;const se=_c(w),re=Jr(T),ve=re&&x&&G1(re,ee);bo(T,{name:se?.pathname||C.location.pathname,attributes:{[ae]:"url",[G]:"auto.navigation.browser"}},{url:w,isRedirect:ve})})}h&&D1(),a&&q1(T,l,f,p,t),r&&z0(),M1(T,{traceFetch:m,traceXHR:_,trackFetchStreamPerformance:y,tracePropagationTargets:T.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:S,enableHTTPTimings:M,onRequestSpanStart:R,onRequestSpanEnd:P})}}});function So(e,t,n){e.emit("startPageLoadSpan",t,n),j().setTransactionName(t.name);const r=Jr(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function bo(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const s=j();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Lc(),url:r}}),Jr(e)}function Fd(e){return C.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function q1(e,t,n,r,o){const s=C.document;let i;const a=()=>{const c="ui.action.click",u=Jr(e);if(u){const d=F(u).op;if(["navigation","pageload"].includes(d)){I&&g.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(Hr,"interactionInterrupted"),i.end(),i=void 0),!o.name){I&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=Bf({name:o.name,op:c,attributes:{[ae]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}const Rm="_sentry_idleSpan";function Jr(e){return e[Rm]}function $d(e,t){Ee(e,Rm,t)}const Ud=1.5;function G1(e,t){const n=F(e),r=Fn(),o=n.start_timestamp;return!(r-o>Ud||t&&r-t<=Ud)}function lN(e=A()){e?.emit("endPageloadSpan")}function dN(e){const t=Te();if(t===e)return;const n=j();e.end=new Proxy(e.end,{apply(r,o,s){return St(n,t),Reflect.apply(r,o,s)}}),St(n,e)}function gr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function V1(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=gr(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function lu(e){return gr(e.getAllKeys())}function J1(e,t,n){return e(r=>lu(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),gr(r.transaction)}))}function Y1(e,t,n){return e(r=>lu(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),gr(r.transaction)}))}function K1(e){return e(t=>lu(t).then(n=>{const r=n[0];if(r!=null)return gr(t.get(r)).then(o=>(t.delete(r),gr(t.transaction).then(()=>o)))}))}function X1(e){let t;function n(){return t==null&&(t=V1(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=await _s(r);await J1(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=await _s(r);await Y1(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await K1(n());if(r)return w_(r)}catch{}}}}function Q1(e){return t=>{const n=e({...t,createStore:X1});return C.addEventListener("online",async r=>{await n.flush()}),n}}function fN(e=yh){return Q1(eS(e))}const Bd=1e6,Z1="window"in $&&$.window===$&&typeof importScripts>"u",Kt=String(0),Hs=Z1?"main":"worker",Ws=C.navigator;let Am="",Cm="",xm="",ja=Ws?.userAgent||"",Mm="";const ex=Ws?.language||Ws?.languages?.[0]||"";function tx(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const Hd=Ws?.userAgentData;tx(Hd)&&Hd.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Am=e.platform||"",xm=e.architecture||"",Mm=e.model||"",Cm=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];ja=`${t.brand} ${t.version}`}}).catch(e=>{});function nx(e){return!("thread_metadata"in e)}function rx(e){return nx(e)?ux(e):e}function ox(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&I&&g.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function sx(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const o=ox(r),s=rx(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:he()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:he()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Vs,runtime:{name:"javascript",version:C.navigator.userAgent},os:{name:Am,version:Cm,build_number:ja},device:{locale:ex,model:Mm,manufacturer:ja,architecture:xm,is_emulator:!1},debug_meta:{images:Om(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||ke(),trace_id:o,active_thread_id:Kt,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function ix(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=cx(e),o=t.getOptions(),s=t.getSdkMetadata?.()?.sdk;return{chunk_id:ke(),client_sdk:{name:s?.name??"sentry.javascript.browser",version:s?.version??"0.0.0"},profiler_id:n||ke(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:Om(e.resources)},profile:r}}function ax(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}
499:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function cx(e){const t=[];for(let a=0;a<e.frames.length;a++){const c=e.frames[a];c&&(t[a]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}const n=[];for(let a=0;a<e.stacks.length;a++){const c=e.stacks[a];if(!c)continue;const u=[];let d=c;for(;d;)u.push(d.frameId),d=d.parentId===void 0?void 0:e.stacks[d.parentId];n[a]=u}const r=Pe(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,s=o-(r||o),i=[];for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(!c)continue;const u=(o+(c.timestamp-s))/1e3;i[a]={stack_id:c.stackId??0,thread_id:Kt,timestamp:u}}return{frames:t,stacks:n,samples:i,thread_metadata:{[Kt]:{name:Hs}}}}function Nm(e){return F(e).op==="pageload"}function ux(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Kt]:{name:Hs}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=Pe(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-s)*Bd).toFixed(0),stack_id:t,thread_id:Kt};return}let l=e.stacks[u.stackId];const f=[];for(;l;){f.push(l.frameId);const h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const p={elapsed_since_start_ns:((u.timestamp+c-s)*Bd).toFixed(0),stack_id:n,thread_id:Kt};r.stacks[n]=f,r.samples[d]=p,n++}),r}function lx(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function dx(e){const t=[];return kn(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function Om(e){const r=A()?.getOptions()?.stackParser;return r?Y_(r,e):[]}function Pm(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(I&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(I&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function fx(e){return e.samples.length<2?(I&&g.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(I&&g.log("[Profiling] Discarding profile because it contains no frames"),!1)}let du=!1;const Lm=3e4;function px(e){return typeof e=="function"}function Dm(){const e=C.Profiler;if(!px(e)){I&&g.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(Lm/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{I&&(g.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),g.log("[Profiling] Disabling profiling for current user session.")),du=!0}}function Wd(e){if(du)return I&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return I&&g.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=A()?.getOptions();if(!n)return I&&g.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return Pm(r)?r?(r===!0?!0:Math.random()<r)?!0:(I&&g.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(I&&g.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(I&&g.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function hx(e){if(du)return I&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return I&&g.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return Pm(t)?t?Math.random()<=t:(I&&g.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(I&&g.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Wo(e){return typeof e.profilesSampleRate<"u"}function mx(e,t,n,r){return fx(n)?sx(e,t,n,r):null}const bn=new Map;function gx(){return bn.size}function _x(e){const t=bn.get(e);return t&&bn.delete(e),t}function yx(e,t){if(bn.set(e,t),bn.size>30){const n=bn.keys().next().value;n!==void 0&&bn.delete(n)}}function Sx(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace={...e.contexts?.trace??{},data:{...e.contexts?.trace?.data??{},"thread.id":Kt,"thread.name":Hs}},e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Kt,"thread.name":Hs}})),e}
499function jd(e){let t;Nm(e)&&(t=he()*1e3);const n=Dm();if(!n)return;I&&g.log(`[Profiling] started profiling span: ${F(e).description}`);const r=ke();let o=null;j().setContext("profile",{profile_id:r,start_timestamp:t});async function s(){if(e&&n){if(o){I&&g.log("[Profiling] profile for:",F(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(i&&(C.clearTimeout(i),i=void 0),I&&g.log(`[Profiling] stopped profiling of span: ${F(e).description}`),!u){I&&g.log(`[Profiling] profiler returned null profile for: ${F(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=u,yx(r,u)}).catch(u=>{I&&g.log("[Profiling] error while stopping profiler:",u)})}}let i=C.setTimeout(()=>{I&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",F(e).description),s()},Lm);const a=e.end.bind(e);function c(){return e?(s().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const bx=6e4,Ex=3e5;class Tx{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){const n=t.getOptions().profileLifecycle,r=hx(t.getOptions());I&&g.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||I&&g.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=ke(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t)}start(){if(this._lifecycleMode==="trace"){I&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){I&&g.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){I&&g.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){I&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){I&&g.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(I&&g.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,I&&g.log("[Profiling] Started profiling with profiler ID:",this._profilerId),Qn().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){I&&g.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{I&&g.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&Qn().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){I&&g.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==Se(n))return;if(!n.isRecording()){I&&g.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const o=this._activeRootSpanIds.size;o===1&&(I&&g.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const o=this._activeRootSpanIds.size;I&&g.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(s=>{I&&g.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",s)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,Qn().setContext("profile",{})}
499_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),Ex);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=Dm();if(!t){I&&g.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{I&&g.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},bx))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(I&&g.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=ix(n,this._client,this._profilerId),o=ax(r);if("reason"in o){I&&g.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),I&&g.log("[Profiling] Collected browser profile chunk.")}catch(n){I&&g.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=Js(n.getSdkMetadata?.()),o=n.getDsn(),s=n.getOptions().tunnel,i=dt({event_id:ke(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!s&&o&&{dsn:Dt(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(i).then(null,a=>{I&&g.error("Error while sending profile chunk envelope:",a)})}}const vx="BrowserProfiling",Ix=(()=>({name:vx,setup(e){const t=e.getOptions(),n=new Tx;if(!Wo(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Wo(t)&&!t.profilesSampleRate){I&&g.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=Te(),o=r&&Se(r);if(Wo(t)&&t.profileSessionSampleRate!==void 0&&I&&g.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Wo(t))o&&Nm(o)&&Wd(o)&&jd(o),e.on("spanStart",s=>{s===Se(s)&&Wd(s)&&jd(s)}),e.on("beforeEnvelope",s=>{if(!gx())return;const i=dx(s);if(!i.length)return;const a=[];for(const c of i){const u=c?.contexts,d=u?.profile?.profile_id,l=u?.profile?.start_timestamp;if(typeof d!="string"){I&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!d){I&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}u?.profile&&delete u.profile;const f=_x(d);if(!f){I&&g.log(`[Profiling] Could not retrieve profile for span: ${d}`);continue}const p=mx(d,l,f,c);p&&a.push(p)}lx(s,a)});else{const s=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),s==="manual")n.initialize(e);else if(s==="trace"){if(!tt(t)){I&&g.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),C.setTimeout(()=>{const i=Te(),a=i&&Se(i);a&&n.notifyRootSpanActive(a)},0)}}},processEvent(e){return Sx(e)}})),pN=Ix,hN=()=>({name:"LaunchDarkly",processEvent(e,t,n){return br(e)}});function mN(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Rn(e,t.value),An(e,t.value)}}}const gN=()=>({name:"OpenFeature",processEvent(e,t,n){return br(e)}});class _N{after(t,n){Rn(n.flagKey,n.value),An(n.flagKey,n.value)}error(t,n,r){Rn(t.flagKey,t.defaultValue),An(t.flagKey,t.defaultValue)}}const yN=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Me(t,"isEnabled",wx)},processEvent(t,n,r){return br(t)}});function wx(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Rn(n,r),An(n,r)):I&&g.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const SN=(({growthbookClass:e})=>Ib({growthbookClass:e})),bN=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Rn(n.gate.name,n.gate.value),An(n.gate.name,n.gate.value)})},processEvent(t,n,r){return br(t)}});async function EN(){const e=A();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await B_(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const kx="WebWorker",TN=({worker:e})=>({name:kx,setupOnce:()=>
499{(Array.isArray(e)?e:[e]).forEach(t=>zd(t))},addWorker:t=>zd(t)});function zd(e){e.addEventListener("message",t=>{if(Ax(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(I&&g.log("Sentry debugId web worker message received",t.data),C._sentryDebugIds={...t.data._sentryDebugIds,...C._sentryDebugIds}),t.data._sentryModuleMetadata&&(I&&g.log("Sentry module metadata web worker message received",t.data),C._sentryModuleMetadata={...t.data._sentryModuleMetadata,...C._sentryModuleMetadata}),t.data._sentryWasmImages){I&&g.log("Sentry WASM images web worker message received",t.data);const n=C._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>Ye(o)&&typeof o.code_file=="string"&&!n.some(s=>s.code_file===o.code_file));C._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(I&&g.log("Sentry worker rejection message received",t.data._sentryWorkerError),Rx(t.data._sentryWorkerError))}})}function Rx(e){const t=A();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,s=tn(o)?Eh(o):li(n,o,void 0,r,!0);s.level="error",e.filename&&(s.contexts={...s.contexts,worker:{filename:e.filename}}),no(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),I&&g.log("Captured worker unhandled rejection",o)}function vN({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:bh(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),I&&g.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),I&&g.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function Ax(e){if(!Ye(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(Ye(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Ye(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Ye(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(s=>Ye(s)&&typeof s.code_file=="string")))}function IN(e){const t={...e};return lp(t,"react"),jf("react",{version:Ae.version}),ok(t)}function Cx(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function xx(e,t){const n=new WeakSet;function r(o,s){if(!n.has(o)){if(o.cause)return n.add(o),r(o.cause,s);o.cause=s}}r(e,t)}function Fm(e,{componentStack:t},n){if(Cx(Ae.version)&>(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,xx(e,r)}return Ke(r=>(r.setContext("react",{componentStack:t}),_e(e,n)))}function wN(e){return(t,n)=>{const r=!!e,o=Fm(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const $m="ui.react.render",Mx="ui.react.update",Um="ui.react.mount",Nx={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ox={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Px={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Bm={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Lx=Symbol.for("react.forward_ref"),Hm=Symbol.for("react.memo");function Dx(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hm}const fu={};fu[Lx]=Px;fu[Hm]=Bm;function qd(e){if(Dx(e))return Bm;const t=e.$$typeof;return t&&fu[t]||Nx}const Fx=Object.defineProperty.bind(Object),$x=Object.getOwnPropertyNames.bind(Object),Gd=Object.getOwnPropertySymbols?.bind(Object),Vd=Object.getOwnPropertyDescriptor.bind(Object),Ux=Object.getPrototypeOf.bind(Object),Jd=Object.prototype;function Eo(e,t,n){if(typeof t!="string"){if(Jd){const i=Ux(t);i&&i!==Jd&&Eo(e,i)}let r=$x(t);Gd&&(r=r.concat(Gd(t)));const o=qd(e),s=qd(t);for(const i of r)if(!Ox[i]&&!s?.[i]&&!o?.[i]&&!Vd(e,i)){const a=Vd(t,i);if(a)try{Fx(e,i,a)}catch{}}}return e}const Bx="unknown";class Wm extends Ae.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=ut({name:`<${n}>`,onlyIfParent:!0,op:Um,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(o=>t[o]!==this.props.updateProps[o]);if(r.length>0){const o=he();this._updateSpan=ir(this._mountSpan,()=>ut({name:`<${this.props.name}>`,onlyIfParent:!0,op:Mx,startTime:o,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=he(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=F(this._mountSpan).timestamp;ir(this._mountSpan,()=>{const s=ut({onlyIfParent:!0,name:`<${n}>`,op:$m,startTime:o,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(t)})}}render(){return this.props.children}}Object.assign(Wm,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function kN(e,t){const n=t?.name||e.displayName||e.name||Bx,r=o=>Ae.createElement(Wm,{...t,name:n,updateProps:o},Ae.createElement(e,{...o}));return r.displayName=`profiler(${n})`,Eo(r,e),r}function RN(e,t={disabled:!1,hasRenderSpan:!0}
499){const[n]=Ae.useState(()=>{if(!t?.disabled)return ut({name:`<${e}>`,onlyIfParent:!0,op:Um,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":e}})});Ae.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=F(n).timestamp,o=he(),s=ut({name:`<${e}>`,onlyIfParent:!0,op:$m,startTime:r,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":e}});s&&s.end(o)}}),[])}const Oe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Hx="unknown",ra={componentStack:null,error:null,eventId:null};class Wx extends Ae.Component{constructor(t){super(t),this.state=ra,this._openFallbackReportDialog=!0;const n=A();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Kl({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;Ke(c=>{o&&o(c,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,d=Fm(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,d),i&&(this._lastEventId=d,this._openFallbackReportDialog&&Kl({...a,eventId:d})),this.setState({error:t,componentStack:r,eventId:d})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&(this.state===ra?o(null,null,null):o(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(ra)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const o=typeof t=="function"?Ae.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return Ae.isValidElement(o)?o:(t&&Oe&&g.warn("fallback did not produce a valid ReactElement"),null)}}function AN(e,t){const n=e.displayName||e.name||Hx,r=Ae.memo(o=>Ae.createElement(Wx,{...t},Ae.createElement(e,{...o})));return r.displayName=`errorBoundary(${n})`,Eo(r,e),r}const jx="redux.action",zx="info",qx={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function CN(e){const t={...qx,...e};return n=>(r,o)=>{t.attachReduxState&&Qn().addEventProcessor((a,c)=>{try{a.type===void 0&&a.contexts.state.state.type==="redux"&&(c.attachments=[...c.attachments||[],{filename:"redux_state.json",data:JSON.stringify(a.contexts.state.state.value)}])}catch{}return a});function s(a){return(c,u)=>{const d=a(c,u),l=j(),f=t.actionTransformer(u);typeof f<"u"&&f!==null&&Et({category:jx,data:f,type:zx});const p=t.stateTransformer(d);if(typeof p<"u"&&p!==null){const y=A()?.getOptions()?.normalizeDepth||3,S={state:{type:"redux",value:p}};Ee(S,"__sentry_override_normalization_depth__",3+y),l.setContext("state",S)}else l.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(l,d),d}}const i=n(s(r),o);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(a,c,u){a.apply(c,[s(u[0])])}}),i}}function xN(e){const t=yo({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),s&&C.location&&Yd(r,C.location,o,(c,u="url")=>{So(a,{name:c,attributes:{[pe]:"pageload",[G]:"auto.pageload.react.reactrouter_v3",[ae]:u}})}),i&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&Yd(r,c,o,(u,d="url")=>{bo(a,{name:u,attributes:{[pe]:"navigation",[G]:"auto.navigation.react.reactrouter_v3",[ae]:d}})})})}}}function Yd(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>{if(s||!a)return r(o);const c=Gx(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function Gx(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--)if(t[r].path?.startsWith("/")){n=r;break}return t.slice(n).reduce((r,{path:o})=>{const s=r==="/"||r===""?o:`/${o}`;return`${r}${s}`},"")}function MN(e,t={}){const n=e,r=yo({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){r.afterAllSetup(i);const a=C.location;if(o&&a){const c=n.matchRoutes(a.pathname,n.options.parseSearch(a.search),{preload:!1,throwOnError:!1}),u=c[c.length-1],d=u?.routeId!=="__root__"?u:void 0;So(i,{name:d?d.routeId:a.pathname,attributes:{[pe]:"pageload",[G]:"auto.pageload.react.tanstack_router",[ae]:d?"route":"url",...Kd(d)}})}s&&n.subscribe("onBeforeNavigate",c=>
499{if(!c.fromLocation||c.toLocation.state===c.fromLocation.state)return;const u=n.matchRoutes(c.toLocation.pathname,c.toLocation.search,{preload:!1,throwOnError:!1}),d=u[u.length-1],l=d?.routeId!=="__root__"?d:void 0,f=C.location,p=bo(i,{name:l?l.routeId:f.pathname,attributes:{[pe]:"navigation",[G]:"auto.navigation.react.tanstack_router",[ae]:l?"route":"url"}}),h=n.subscribe("onResolved",m=>{if(h(),p){const _=n.matchRoutes(m.toLocation.pathname,m.toLocation.search,{preload:!1,throwOnError:!1}),y=_[_.length-1],S=y?.routeId!=="__root__"?y:void 0;S&&(p.updateName(S.routeId),p.setAttribute(ae,"route"),p.setAttributes(Kd(S)))}})})}}}function Kd(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t[`url.path.params.${n}`]=r,t[`url.path.parameter.${n}`]=r,t[`params.${n}`]=r}),t}function NN(e){const t=yo({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),jm(a,s,i,n,"reactrouter_v4",r,o)}}}function ON(e){const t=yo({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),jm(a,s,i,n,"reactrouter_v5",r,o)}}}function jm(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if(C.location)return C.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const d=zm(s,u,i);for(const l of d)if(l.match.isExact)return[l.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[d,l]=c(u);So(e,{name:d,attributes:{[pe]:"pageload",[G]:`auto.pageload.react.${o}`,[ae]:l}})}}n&&r.listen&&r.listen((u,d)=>{if(d&&(d==="PUSH"||d==="POP")){const[l,f]=c(u.pathname);bo(e,{name:l,attributes:{[pe]:"navigation",[G]:`auto.navigation.react.${o}`,[ae]:f}})}})}function zm(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:Vx(t);return s&&(r.push({route:o,match:s}),o.routes&&zm(o.routes,t,n,r)),!!s}),r}function Vx(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function PN(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=Jx();j().setTransactionName(o),s&&(s.updateName(o),s.setAttribute(ae,"route"))}return Ae.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,Eo(n,e),n}function Jx(){const e=Te(),t=e&&Se(e);if(!t)return;const n=F(t).op;return n==="navigation"||n==="pageload"?t:void 0}let pu,tr=!1;const Xt=[],Yx=10;function Kx(e,t){const n={};return Xt.length>=Yx&&(Oe&&g.warn("[React Router] Navigation context stack overflow - removing oldest context"),Xt.shift()),Xt.push({token:n,targetPath:e,span:t}),n}function Xx(e){Xt[Xt.length-1]?.token===e&&Xt.pop()}function qm(){const e=Xt.length;return e>0?Xt[e-1]??null:null}function Qx(e,t=!1){pu=e,tr=t}function Zx(e){return tM(e.route.path||"")}function eM(e){return e.params["*"]||""}function tM(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function nr(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Gm(e){return e.endsWith("*")}function on(e){return e.includes("/*")||e.endsWith("*")}function Xd(e,t){return Gm(e)&&!!t.route.children?.length||!1}function nM(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}function rM(e,t,n){const r=e&&e.length>0?e:tr?vi(t,n):t;let o=r.slice(-2)==="/*"?r.slice(0,-2):r;return o.length>1&&o[o.length-1]==="/"&&(o=o.slice(0,-1)),[o,"route"]}function Qd(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function vi(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}function js(e){return e[0]==="/"?e:`/${e}`}function Vm(e,t){const n=pu(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const o=Zx(r),s=vi(t.pathname,js(r.pathnameBase));return t.pathname===s?nr(s):nr(nr(o||"")+js(Vm(e.filter(i=>i!==r.route),{pathname:s})))}return""}function oM(e,t){const n=pu(t,e);if(n){for(const r of n)if(nM(r.route)&&eM(r))return!0}return!1}function Zd(e,t){return tr?vi(e.pathname,t):e.pathname||""}function sM(e,t,n,r=""){if(!e||e.length===0)return[tr?vi(t.pathname,r):t.pathname,"url"];if(!n)return[Zd(t,r),"url"];let o="";for(const s of n){const i=s.route;if(!i)continue;if(i.index)return rM(o,s.pathname,r);const a=i.path;if(!a||Xd(a,s))continue;const c=a[0]==="/"||o[o.length-1]==="/"?a:`/${a}`;if(o=nr(o)+js(c),nr(t.pathname)===nr(r+s.pathname))return Qd(o)!==Qd(s.pathname)&&!Gm(o)?[(tr?"":r)+c,"route"]:(Xd(o,s)&&(o=o.slice(0,-1)),[(tr?"":r)+o,"route"])}return[Zd(t,r),"url"]}function Ii(e,t,n,r,o=""){let s,i="url";const a=oM(e,n);return a&&(s=js(Vm(n,e)),i="route"),(!a||!s)&&([s,i]=sM(t,e,r,o)),[s||e.pathname,i]}function Tt(){const e=Te(),t=e?Se(e):void 0;if(!t)return;const n=F(t).op;return n==="navigation"||n==="pageload"?t:void 0}function iM(){const e=qm();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof C<"u")try{const t=C.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch{Oe&&g.warn("[React Router] Could not access window.location")}return null}function aM(){const e=qm();return e?e.span:Tt()}function cM(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=iM(),u=aM(),d=s.apply(i,a);return uM(d,t,n,r,c,u),d}});return Ee(o,"__sentry_proxied__",!0),o}function uM(e,t,n,r,o,s){Ln(e)?e.then(i=>{Array.isArray(i)&&r(i,t,o??void 0,s)}).catch(i=>{Oe&&g.warn(`Error resolving async handler '${n}' for route`,t,i)}):Array.isArray(e)&&r(e,t,o??void 0,s)}function wi(e,t){if(e.handle&&typeof e.handle=="object")for(const n of Object.keys(e.handle)){const r=e.handle[n];typeof r=="function"&&!r.__sentry_proxied__&&(e.handle[n]=cM(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)wi(n,t)}let Qt,Zt,en,us,rt,ki=!1,En=3e3;const Jm=new WeakSet,_n=new WeakMap,Re=new Set,ls=new WeakMap,za=new WeakMap;function lM(e){return C?.requestAnimationFrame?C.requestAnimationFrame(e):setTimeout(e,0)}function ef(e){C?.cancelAnimationFrame?C.cancelAnimationFrame(e):clearTimeout(e)}function Ym(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function tf(e){return e.includes(":")||e.includes("*")}function dM(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const s=!!e.routeName&&on(e.routeName),i=on(n),a=!!e.routeName&&tf(e.routeName),c=tf(n),u=s&&!i,d=!a&&c,l=n!==e.routeName&&n.length>(e.routeName?.length||0)&&!i;return{skip:!0,shouldUpdate:!!(e.routeName&&(u||d||l))}}return{skip:!1,shouldUpdate:!1}}function Km(e,t){const n=t.children||[],r=e.filter(o=>!n.some(s=>s===o||o.path&&s.path===o.path||o.id&&s.id===o.id));r.length>0&&(t.children=[...n,...r])}function Xm(e,t){let n=ls.get(e);n||(n=new Set,ls.set(e,n)),n.add(t),t.finally(()=>{const r=ls.get(e);r&&r.delete(t)})}function Qm(e){const t=new Promise(n=>{za.set(e,n)});Xm(e,t)}function fM(e){const t=za.get(e);t&&(t(),za.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function hu(e,t,n=null,r){e.forEach(s=>{Re.add(s),ki&&wi(s,hu)}),t&&Km(e,t);const o=r??Tt();if(o){const s=F(o);if(s.timestamp){Oe&&g.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const i=s.op;let a=n;if(!a&&!r&&typeof C<"u"){const c=C.location;c?.pathname&&(a={pathname:c.pathname})}a&&(i==="pageload"?vo({activeRootSpan:o,location:{pathname:a.pathname},routes:Array.from(Re),allRoutes:Array.from(Re)}):i==="navigation"&&qa(o,a,Array.from(Re),!1,rt))}}function qa(e,t,n,r=!1,o){const s=F(e),i=s.description,a=e?.__sentry_navigation_name_set__,c=i&&on(i);if((!a||r||c)&&!s.timestamp){const d=o(n,t),[l,f]=Ii(t,n,n,d||[],""),p=s.data?.[ae];l&&(!i||!a&&(p!=="route"||f==="route")||p!=="route"&&f==="route"||p==="route"&&f==="route"&&c)&&(e.updateName(l),e.setAttribute(ae,f),!on(l)&&f==="route"&&Ee(e,"__sentry_navigation_name_set__",!0))}}function Zm(e,t,n,r,o){let s=!1,i=!!o&&F(o).op==="pageload",a=!1,c=null,u=null;e.subscribe(d=>{if(!s){const f=Tt();f&&F(f).op==="pageload"?i=!0:i&&(d.historyAction==="POP"&&!a?a=!0:s=!0)}if(d.historyAction==="PUSH"||d.historyAction==="POP"&&s){const f=Ym(d.location),p=()=>{u!==f&&(u=f,c=null,mu({location:d.location,routes:t,navigationType:d.historyAction,version:n,base
499name:r,allRoutes:Array.from(Re)}))};d.navigation.state!=="idle"?(u!==f&&(u=null),c!==null&&ef(c),c=lM(p)):(c!==null&&(ef(c),c=null),p())}})}function eg(e,t){return!Qt||!Zt||!en||!rt?(Oe&&g.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(To(n),ki)for(const u of n)wi(u,hu);const o=Tt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(Ee(o,"__sentry_may_have_lazy_routes__",!0),Qm(o));const i=og(r,!1,o),a=e(n,i),c=r?.basename;return a.state.historyAction==="POP"&&o&&vo({activeRootSpan:o,location:a.state.location,routes:n,basename:c,allRoutes:Array.from(Re)}),Zm(a,n,t,c,o),a}}function tg(e,t){return!Qt||!Zt||!en||!rt?(Oe&&g.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(To(n),ki)for(const _ of n)wi(_,hu);const o=Tt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(Ee(o,"__sentry_may_have_lazy_routes__",!0),Qm(o));const i=og(r,!0,o),a=e(n,i),c=r?.basename;let u;const d=r?.initialEntries,l=r?.initialIndex,f=d&&d.length===1,p=l!==void 0&&d&&d[l];u=f?d[0]:p?d[l]:void 0;const h=u?typeof u=="string"?{pathname:u}:u:a.state.location,m=Tt();return a.state.historyAction==="POP"&&m&&vo({activeRootSpan:m,location:h,routes:n,basename:c,allRoutes:Array.from(Re)}),Zm(a,n,t,c,m),a}}function ng(e,t){const n=yo({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:a,stripBasename:c,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:d=!0,instrumentNavigation:l=!0,lazyRouteTimeout:f}=e;return{...n,setup(p){n.setup(p);const h=e.finalTimeout??3e4,m=(e.idleTimeout??1e3)*3,_=f??m;_===1/0?(En=h,Oe&&g.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",h,"ms to prevent indefinite hangs")):Number.isNaN(_)?(Oe&&g.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",m),En=m):_<0?(Oe&&g.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",_,"falling back to:",m),En=m):En=_,Qt=r,Zt=o,en=s,rt=a,us=i,ki=u,Qx(a,c||!1)},afterAllSetup(p){n.afterAllSetup(p);const h=C.location?.pathname;d&&h&&So(p,{name:h,attributes:{[ae]:"url",[pe]:"pageload",[G]:`auto.pageload.react.reactrouter_v${t}`}}),l&&Jm.add(p)}}}function rg(e,t){if(!Qt||!Zt||!en||!rt)return Oe&&g.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;const n=r=>{const o=Ae.useRef(!0),{routes:s,locationArg:i}=r,a=e(s,i),c=Zt(),u=en(),d=typeof i=="string"||i?.pathname?i:c;return Qt(()=>{const l=typeof d=="string"?{pathname:d}:d;o.current?(To(s),vo({activeRootSpan:Tt(),location:l,routes:s,allRoutes:Array.from(Re)}),o.current=!1):mu({location:l,routes:s,navigationType:u,version:t,allRoutes:Array.from(Re)})},[u,d]),a};return(r,o)=>Ae.createElement(n,{routes:r,locationArg:o})}function og(e,t=!1,n){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const r=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async o=>{const s=o?.path,i=Tt()??n;if(!t){const c=o?.patch,u=o?.matches;c&&(o.patch=(d,l)=>{if(To(l),u&&u.length>0){const h=u[u.length-1]?.route;if(h){const m=Array.from(Re).find(_=>{const y=_.id!==void 0&&_.id===d,S=_===h,M=_.path!==void 0&&h.path!==void 0&&_.path===h.path;return y||S||M});m&&Km(l,m)}}const f=i?F(i):void 0;return s&&i&&f&&!f.timestamp&&f.op==="navigation"&&qa(i,{pathname:s,search:"",hash:"",state:null,key:"default"},Array.from(Re),!0,rt),c(d,l)})}const a=(async()=>{const c=Kx(s,i);let u;try{u=await r(o)}finally{Xx(c),i&&fM(i)}const d=i?F(i):void 0;if(i&&d&&!d.timestamp&&d.op==="navigation"){const l=s;l&&qa(i,{pathname:l,search:"",hash:"",state:null,key:"default"},Array.from(Re),!1,rt)}return u})();return i&&Xm(i,a),a}}}function mu(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:rt(a||n,t,i),u=A();if(!u||!Jm.has(u))return;const d=Tt();
499if(!(d&&F(d).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[l,f]=Ii(t,a||n,a||n,c,i),p=Ym(t),h=_n.get(u),m=h&&!h.isPlaceholder?!!F(h.span).timestamp:!1,{skip:_,shouldUpdate:y}=dM(h,p,l,m);if(_){if(y&&h){const L=h.routeName;h.isPlaceholder?(h.routeName=l,Oe&&g.log(`[Tracing] Updated placeholder navigation name from "${L}" to "${l}" (will apply to real span)`)):(h.span.updateName(l),h.span.setAttribute(ae,f),Ee(h.span,"__sentry_navigation_name_set__",!0),h.routeName=l,Oe&&g.log(`[Tracing] Updated navigation span name from "${L}" to "${l}"`))}else Oe&&g.log(`[Tracing] Skipping duplicate navigation for location: ${p}`);return}const M={span:{end:()=>{}},routeName:l,pathname:t.pathname,locationKey:p,isPlaceholder:!0};_n.set(u,M);let v;try{v=bo(u,{name:M.routeName,attributes:{[ae]:f,[pe]:"navigation",[G]:`auto.navigation.react.reactrouter_v${o}`}})}catch(L){throw _n.delete(u),L}v?(_n.set(u,{span:v,routeName:M.routeName,pathname:t.pathname,locationKey:p}),Ga(v,t,n,i,"navigation")):_n.delete(u)}}function To(e){e.forEach(t=>{sg(t).forEach(r=>{Re.add(r)})})}function sg(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{sg(n,t).forEach(o=>{t.add(o)})})),t}function vo({activeRootSpan:e,location:t,routes:n,matches:r,basename:o,allRoutes:s}){const i=Array.isArray(r)?r:rt(s||n,t,o);if(i){const[a,c]=Ii(t,s||n,s||n,i,o);j().setTransactionName(a||"/"),e&&(e.updateName(a),e.setAttribute(ae,c),Ga(e,t,n,o,"pageload"))}else e&&Ga(e,t,n,o,"pageload")}function pM(e,t,n,r,o=!1){return n?!!(!e&&o||e&&on(e)&&r==="route"&&!on(n)||t!=="route"&&r==="route"):!1}function oa(e,t,n,r,o,s,i,a){try{const c=t.data?.[ae];if(c==="route"&&n&&!on(n))return;const u=Array.from(a),d=u.length>0?u:o,l=rt(d,r,s);if(!l)return;const[f,p]=Ii(r,d,d,l,s),h=pM(n,c,f,p,!0),m=i==="pageload"||!t.timestamp;h&&m&&(e.updateName(f),e.setAttribute(ae,p))}catch(c){Oe&&g.warn(`Error updating span details before ending: ${c}`)}}function Ga(e,t,n,r,o){const s=`__sentry_${o}_end_patched__`;if(e?.[s]||!e.end)return;const a=e.end.bind(e);let c=!1;e.end=function(...d){if(c)return;c=!0;const l=d.length>0?d[0]:Date.now()/1e3,f=F(e),p=f.description,h=f.data?.[ae],m=()=>{const v=A();if(v&&o==="navigation"){const L=_n.get(v);L&&L.span===e&&_n.delete(v)}},_=ls.get(e),y=e.__sentry_may_have_lazy_routes__;if((_&&_.size>0||y)&&p&&(on(p)||h!=="route")){if(En===0){oa(e,f,p,t,n,r,o,Re),m(),a(l);return}const v=new Promise(N=>setTimeout(N,En));let L;if(_&&_.size>0){const N=Promise.allSettled(_).then(()=>{});L=En===1/0?N:Promise.race([N,v])}else L=v;L.then(()=>{const N=F(e);oa(e,N,N.description,t,n,r,o,Re),m(),a(l)}).catch(()=>{m(),a(l)});return}oa(e,f,p,t,n,r,o,Re),m(),a(l)},Ee(e,s,!0)}function ig(e,t){if(!Qt||!Zt||!en||!us||!rt)return Oe&&g.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters. 500 useEffect: ${Qt}. useLocation: ${Zt}. useNavigationType: ${en}. 501 createRoutesFromChildren: ${us}. matchRoutes: ${rt}.`),e;const n=r=>{const o=Ae.useRef(!0),s=Zt(),i=en();return Qt(()=>{const a=us(r.children);o.current?(To(a),vo({activeRootSpan:Tt(),location:s,routes:a,allRoutes:Array.from(Re)}),o.current=!1):mu({location:s,routes:a,navigationType:i,version:t,allRoutes:Array.from(Re)})},[s,i]),Ae.createElement(e,{...r})};return Eo(n,e),n}function LN(e){return ng(e,"6")}function DN(e){return rg(e,"6")}function FN(e){return eg(e,"6")}function $N(e){return tg(e,"6")}function UN(e){return ig(e,"6")}function BN(e){return ng(e,"7")}function HN(e){return ig(e,"7")}function WN(e){return eg(e,"7")}function jN(e){return tg(e,"7")}function zN(e){return rg(e,"7")}export{kI as BrowserClient,Wx as ErrorBoundary,Fi as MULTIPLEXED_TRANSPORT_EXTRA_KEY,_N as OpenFeatureIntegrationHook,Wm as Profiler,Gt as SDK_VERSION,pe as SEMANTIC_ATTRIBUTE_SENTRY_OP,G as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,Za as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,ae as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,bt as Scope,C as WINDOW,Et as addBreadcrumb,my as addEventProcessor,qu as addIntegration,bw as breadcrumbsIntegration,Mw as browserApiErrorsIntegration,pN as browserProfilingIntegration,Fw as browserSessionIntegration,yo as browserTracingIntegration,mN as buildLaunchDarklyFlagUsedHandler,CM as captureConsoleIntegration,no as captureEvent,_e as captureException,Pb as captureFeedback,fy as captureMessage,Fm as captureReactException,Wu as captureSession,ow as chromeStackLineParser,wM as close,FM as consoleLoggingIntegration,oN as contextLinesIntegration,yM as continueTrace,UM as createConsolaReporter,jM as createLangChainCallbackHandler,CN as createReduxEnhancer,By as createTransport,QM as createUserFeedbackEnvelope,FS as dedupeIntegration,wm as defaultRequestInstrumentationOptions,mw as defaultStackLineParsers,gw as defaultStackParser,EN as diagnoseSdkConnectivity,zf as endSession,SS as eventFiltersIntegration,EI as eventFromException,TI as eventFromMessage,Dc as exceptionFromError,xM as extraErrorDataIntegration,LM as featureFlagsIntegration,GM as feedbackAsyncIntegration,VM as feedbackIntegration,VM as feedbackSyncIntegration,IM as flush,eN as forceLoad,gS as functionToStringIntegration,cw as geckoStackLineParser,Te as getActiveSpan,A as getClient,j as getCurrentScope,rk as getDefaultIntegrations,qM as getFeedback,Qn as getGlobalScope,we as getIsolationScope,cN as getReplay,Se as getRootSpan,qo as getSpanDescendants,Gg as getSpanStatusFromHttpCode,dp as getTraceData,Bw as globalHandlersIntegration,sN as graphqlClientIntegration,SN as growthbookIntegration,rN as httpClientIntegration,qw as httpContextIntegration,bS as inbou
501ndFiltersIntegration,IN as init,HM as instrumentAnthropicAiClient,WM as instrumentGoogleGenAIClient,zM as instrumentLangGraph,BM as instrumentOpenAiClient,M1 as instrumentOutgoingRequests,ib as instrumentSupabaseClient,hy as isEnabled,kM as isInitialized,py as lastEventId,hN as launchDarklyIntegration,pI as lazyLoadIntegration,Kw as linkedErrorsIntegration,DM as logger,fN as makeBrowserOfflineTransport,yh as makeFetchTransport,RM as makeMultiplexedTransport,$M as metrics,AM as moduleMetadataIntegration,tN as onLoad,gN as openFeatureIntegration,KM as opera10StackLineParser,XM as opera11StackLineParser,aS as parameterize,wN as reactErrorHandler,xN as reactRouterV3BrowserTracingIntegration,NN as reactRouterV4BrowserTracingIntegration,ON as reactRouterV5BrowserTracingIntegration,LN as reactRouterV6BrowserTracingIntegration,BN as reactRouterV7BrowserTracingIntegration,h_ as registerSpanErrorInstrumentation,vN as registerWebWorker,uN as replayCanvasIntegration,aN as replayIntegration,lN as reportPageLoaded,nN as reportingObserverIntegration,MM as rewriteFramesIntegration,_v as sendFeedback,dN as setActiveSpanInBrowser,jf as setContext,Qy as setCurrentClient,bM as setExtra,SM as setExtras,ps as setHttpStatus,L_ as setMeasurement,TM as setTag,EM as setTags,vM as setUser,Kl as showReportDialog,_M as spanToBaggageHeader,F as spanToJSON,u_ as spanToTraceHeader,ZM as spotlightBrowserIntegration,bo as startBrowserTracingNavigationSpan,So as startBrowserTracingPageLoadSpan,ut as startInactiveSpan,H_ as startNewTrace,Hu as startSession,dn as startSpan,zt as startSpanManual,bN as statsigIntegration,NM as supabaseIntegration,B_ as suppressTracing,MN as tanstackRouterBrowserTracingIntegration,PM as thirdPartyErrorFilterIntegration,JM as uiProfiler,yN as unleashIntegration,gM as updateSpanName,RN as useProfiler,TN as webWorkerIntegration,YM as winjsStackLineParser,ir as withActiveSpan,AN as withErrorBoundary,mM as withIsolationScope,kN as withProfiler,Ke as withScope,UN as withSentryReactRouterV6Routing,HN as withSentryReactRouterV7Routing,PN as withSentryRouting,FN as wrapCreateBrowserRouterV6,WN as wrapCreateBrowserRouterV7,$N as wrapCreateMemoryRouterV6,jN as wrapCreateMemoryRouterV7,DN as wrapUseRoutesV6,zN as wrapUseRoutesV7,OM as zodErrorsIntegration};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.