PageSourceSearch

https://garfieldproduce.com/assets/index-D3HB6KEf.js

js garfieldproduce.com collected 2026-10-03 20:05:51 UTC 445,445 bytes, 501 lines download raw bytes

1import{a as Ae}from"./data-Bf5MWwWq.js";const w=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$=globalThis,Gt="10.39.0";function Lt(){return Kr($),$}function Kr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Gt,t[Gt]=t[Gt]||{}}function yr(e,t,n=$){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Gt]=r[Gt]||{};return o[e]||(o[e]=t())}const Ja=["debug","info","warn","error","log","assert","trace"],gg="Sentry Logger ",ms={};function sn(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(ms);r.forEach(o=>{const s=ms[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function _g(){Ka().enabled=!0}function yg(){Ka().enabled=!1}function df(){return Ka().enabled}function Sg(...e){Ya("log",...e)}function bg(...e){Ya("warn",...e)}function Eg(...e){Ya("error",...e)}function Ya(e,...t){w&&df()&&sn(()=>{$.console[e](`${gg}[${e}]:`,...t)})}function Ka(){return w?yr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const g={enable:_g,disable:yg,isEnabled:df,log:Sg,warn:bg,error:Eg},ff=50,_t="?",Su=/\(error: (.*)\)/,bu=/captureMessage|captureException/;function pf(...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=Su.test(c)?c.replace(Su,"$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>=ff+o)break}}return vg(s.slice(o))}}function Tg(e){return Array.isArray(e)?pf(...e):e}function vg(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Ao(t).function||"")&&t.pop(),t.reverse(),bu.test(Ao(t).function||"")&&(t.pop(),bu.test(Ao(t).function||"")&&t.pop()),t.slice(0,ff).map(n=>({...n,filename:n.filename||Ao(t).filename,function:n.function||_t}))}function Ao(e){return e[e.length-1]||{}}const Ci="<anonymous>";function xt(e){try{return!e||typeof e!="function"?Ci:e.name||Ci}catch{return Ci}}function ia(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 hf(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function Ig(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const Vo={},Eu={};function an(e,t){Vo[e]=Vo[e]||[],Vo[e].push(t)}function cn(e,t){if(!Eu[e]){Eu[e]=!0;try{t()}catch(n){w&&g.error(`Error while instrumenting ${e}`,n)}}}function et(e,t){const n=e&&Vo[e];if(n)for(const r of n)try{r(t)}catch(o){w&&g.error(`Error while triggering instrumentation handler.
3Type: ${e}
4Name: ${xt(r)}
5Error:`,o)}}let Ai=null;function mf(e){const t="error";an(t,e),cn(t,wg)}function wg(){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 xi=null;function gf(e){const t="unhandledrejection";an(t,e),cn(t,kg)}function kg(){xi=$.onunhandledrejection,$.onunhandledrejection=function(e){return et("unhandledrejection",e),xi?xi.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const _f=Object.prototype.toString;function gt(e){switch(_f.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Mt(e,Error)}}function Sr(e,t){return _f.call(e)===`[object ${t}]`}function yf(e){return Sr(e,"ErrorEvent")}function Tu(e){return Sr(e,"DOMError")}function Rg(e){return Sr(e,"DOMException")}function at(e){return Sr(e,"String")}function Js(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function tn(e){return e===null||Js(e)||typeof e!="object"&&typeof e!="function"}function Ye(e){return Sr(e,"Object")}function Ys(e){return typeof Event<"u"&&Mt(e,Event)}function Cg(e){return typeof Element<"u"&&Mt(e,Element)}function Ag(e){return Sr(e,"RegExp")}function un(e){return!!(e?.then&&typeof e.then=="function")}function xg(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 Sf(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function Xa(e){return typeof Request<"u"&&Mt(e,Request)}const Qa=$,Mg=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||Mg;for(;n&&s++<r&&(u=Ng(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 Ng(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Qa.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;
5if(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 $n(){try{return Qa.document.location.href}catch{return""}}function bf(e){if(!Qa.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 Ne(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&Ef(o,r);try{e[t]=o}catch{w&&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{w&&g.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ef(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Ee(e,"__sentry_original__",t)}catch{}}function Za(e){return e.__sentry_original__}function Tf(e){if(gt(e))return{message:e.message,name:e.name,stack:e.stack,...Iu(e)};if(Ys(e)){const t={type:e.type,target:vu(e.target),currentTarget:vu(e.currentTarget),...Iu(e)};return typeof CustomEvent<"u"&&Mt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function vu(e){try{return Cg(e)?je(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Iu(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 Og(e){const t=Object.keys(Tf(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Wn;function Xr(e){if(Wn!==void 0)return Wn?Wn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=$;return t in n&&typeof n[t]=="function"?(Wn=n[t],Wn(e)):(Wn=null,e())}function Rt(){return Xr(()=>Math.random())}function Qr(){return Xr(()=>Date.now())}function Hr(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Mi(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 gs(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];try{Sf(o)?n.push(hf(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Jo(e,t,n=!1){return at(e)?Ag(t)?t.test(e):at(t)?n?e===t:e.includes(t):!1:!1}function ct(e,t=[],n=!1){return t.some(r=>Jo(e,r,n))}function Pg(){const e=$;return e.crypto||e.msCrypto}let Ni;function Lg(){return Rt()*16}function ke(e=Pg()){try{if(e?.randomUUID)return Xr(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Ni||(Ni="10000000100040008000"+1e11),Ni.replace(/[018]/g,t=>(t^(Lg()&15)>>t/4).toString(16))}function vf(e){return e.exception?.values?.[0]}function _n(e){const{message:t,event_id:n}=e;if(t)return t;const r=vf(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function aa(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=vf(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 Dg(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=>Mi(i,0));const s=Math.min(r-1,o);t.context_line=Mi(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>Mi(i,0))}function wu(e){if(Fg(e))return!0;try{Ee(e,"__sentry_captured__",!0)}catch{}return!1}function Fg(e){try{return e.__sentry_captured__}catch{}}const If=1e3;function Un(){return Qr()/If}function $g(){const{performance:e}=$;if(!e?.now||!e.timeOrigin)return Un;const t=e.timeOrigin;return()=>(t+Xr(()=>e.now()))/If}let ku;function he(){return(ku??(ku=$g()))()}let Oi=null;function Ug(){const{performance:e}=$;if(!e?.now)return;const t=3e5,n=Xr(()=>e.now()),r=Qr(),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 Oi===null&&(Oi=Ug()),Oi}function Bg(e){const t=he(),n={sid:ke(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Wg(n)};return e&&or(n,e),n}function or(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),t
5ypeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Hg(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),or(e,n)}function Wg(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 Zr(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]=Zr(r[o],t[o],n-1));return r}function yt(){return ke()}function Ct(){return ke().substring(16)}const ca="_sentrySpan";function St(e,t){t?Ee(e,ca,t):delete e[ca]}function sr(e){return e[ca]}const jg=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,sr(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&&or(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:jg;if(r<=0)return this;const o={timestamp:Un(),...t,message:t.message?Hr(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:sr(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Zr(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 w&&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 w&&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=t.event_id||n?.event_id||ke();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(w&&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 zg(){return yr("defaultCurrentScope",()=>new bt)}function qg(){return yr("defaultIsolationScope",()=>new bt)}class Gg{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 un(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 ir(){const e=Lt(),t=Kr(e);return t.stack=t.stack||new Gg(zg(),qg())}function Vg(e){return ir().withScope(e)}function Jg(e,t){const n=ir();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ru(e){return ir().withScope(()=>e(ir().getIsolationScope()))}function Yg(){return{withIsolationScope:Ru,withScope:Vg,withSetScope:Jg,withSetIsolationScope:(e,t)=>Ru(t),getCurrentScope:()=>ir().getScope(),getIsolationScope:()=>ir().getIsolationScope()}}function ln(e){const t=Kr(e);return t.acs?t.acs:Yg()}function j(){const e=Lt();return ln(e).getCurrentScope()}function we(){const e=Lt();return ln(e).getIsolationScope()}function er(){return yr("globalScope",()=>new bt)}function Ke(...e){const t=Lt(),n=ln(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function FM(...e){const t=Lt(),n=ln(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function C(){return j().getClient()}function wf(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Ct()};return r&&(s.parent_span_id=r),s}const ae="sentry.source",ec="sentry.sample_rate",kf="sentry.previous_trace_sample_rate",pe="sentry.op",G="sentry.origin",Wr="sentry.idle_span_finish_reason",eo="sentry.measurement_unit",to="sentry.measurement_value",ua="sentry.custom_span_name",tc="sentry.profile_id",br="sentry.exclusive_time",Kg="http.request.method",Xg="url.full",Qg="sentry.link.type",Zg="gen_ai.conversation.id",e_=0,Ks=1,Z=2;function t_(e){if(e<400&&e>=100)return{code:Ks};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 _s(e,t){e.setAttribute("http.response.status_code",t);const n=t_(t);n.message!=="unknown_error"&&e.setStatus(n)}const Rf="_sentryScope",Cf="_sentryIsolationScope";function n_(e){try{const t=$.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function r_(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function o_(e,t,n){e&&(Ee(e,Cf,n_(n)),Ee(e,Rf,t))}function ys(e){const t=e;return{scope:t[Rf],isolationScope:r_(t[Cf])}}
5const nc="sentry-",s_=/^sentry-/,i_=8192;function rc(e){const t=a_(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.match(s_)){const i=o.slice(nc.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Af(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${nc}${r}`]=o),n),{});return c_(t)}function a_(e){if(!(!e||!at(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Cu(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):Cu(e)}function Cu(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 c_(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>i_?(w&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const u_=/^o(\d+)\./,l_=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function d_(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 xf(e){const t=l_.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 Mf({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Mf(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function f_(e){if(!w)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+$/)?d_(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 p_(e){return e.match(u_)?.[1]}function Nf(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=p_(n)),r}function Of(e){const t=typeof e=="string"?xf(e):Mf(e);if(!(!t||!f_(t)))return t}function Cn(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 Pf=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function h_(e){if(!e)return;const t=e.match(Pf);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 Lf(e,t){const n=h_(e),r=rc(t);if(!n?.traceId)return{traceId:yt(),sampleRand:Rt()};const o=m_(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 Df(e=yt(),t=Ct(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Ff(e=yt(),t=Ct(),n){return`00-${e}-${t}-${n?"01":"00"}`}function m_(e,t){const n=Cn(t?.sample_rand);if(n!==void 0)return n;const r=Cn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Rt()*r:r+Rt()*(1-r):Rt()}function g_(e,t){const n=Nf(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 $f=0,oc=1;let Au=!1;function __(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 Uf(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:F(e).parent_span_id,s=ys(e).scope,i=r?s?.getPropagationContext().propagationSpanId||Ct():t;return{parent_span_id:o,span_id:i,trace_id:n}}function y_(e){const{traceId:t,spanId:n}=e.spanContext(),r=dn(e);return Df(t,n,r)}function S_(e){const{traceId:t,spanId:n}=e.spanContext(),r=dn(e);return Ff(t,n,r)}function Bf(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===oc,attributes:s,...o}))}function In(e){return typeof e=="number"?xu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?xu(e.getTime()):he()}function xu(e){return e>9999999999?e/1e3:e}function F(e){if(E_(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(b_(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:In(o),timestamp:In(i)||void 0,status:Hf(a),op:r[pe],origin:r[G],links:Bf(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function b_(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function E_(e){return typeof e.getSpanJSON=="function"}function dn(e){const{traceFlags:t}=e.spanContext();return t===oc}function Hf(e){if(!(!e||e.code===e_))return e.code===Ks?"ok":e.message||"internal_error"}const wn="_sentryChildSpans",la="_sentryRootSpan";function Wf(e,t){const n=e[la]||e;Ee(t,la,n),e[wn]?e[wn].add(t):Ee(e,wn,new Set([t]))}function T_(e,t){e[wn]&&e[wn].delete(t)}function Yo(e){const t=new Set;function n(r){if(!t.has(r)&&dn(r)){t.add(r);const o=r[wn]?Array.from(r[wn]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}function Se(e){return e[la]||e}function Te(){const e=Lt(),t=ln(e);return t.getActiveSpan?t.getActiveSpan():sr(j())}function da(){Au||(sn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Au=!0)}function $M(e,t){e.updateName(t),e.setAttributes({[ae]:"custom",[ua]:t})}let Mu=!1;function v_(){if(Mu)return;function e(){const t=Te(),n=t&&Se(t);if(n){const r="internal_error";w&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Z,message:r})}}e.tag="sentry_tracingErrorCallback",Mu=!0,mf(e),gf(e)}function tt(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||C()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Nu(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Ss(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(w_(n)){if(Jo(e.description,n))return w&&Nu(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?Jo(e.description,n.name):!0,o=n.op?e.op&&Jo(e.op,n.op):!0;if(r&&o)return w&&Nu(e),!0}return!1}function I_(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 w_(e){return typeof e=="string"||e instanceof RegExp}const Xs="production",jf="_frozenDsc";function Ko(e,t){Ee(e,jf,t)}function zf(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Xs,release:n.release,public_key:r,trace_id:e,org_id:Nf(t)};return t.emit("createDsc",o),o}function sc(e,t){const n=t.getPropagationContext();return n.dsc||zf(n.traceId,e)}function lt(e){const t=C();if(!t)return{};const n=Se(e),r=F(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[ec]??o[kf];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}const c=n[jf];if(c)return a(c);const u=s?.get("sentry.dsc"),d=u&&rc(u);if(d)return a(d);const l=zf(e.spanContext().traceId,t),f=o[ae],p=r.description;return f!=="url"&&p&&(l.transaction=p),tt()&&(l.sampled=String(dn(n)),l.sample_rand=s?.get("sentry.sample_rand")??ys(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function UM(e){const t=lt(e);return Af(t)}class Ot{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||Ct()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:$f}}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 fa("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function qf(e,t=3,n=100*1024){const r=Ge(e,t);return A_(r)>n?qf(e,t-1,n):r}function fa(e,t,n=1/0,r=1/0,o=x_()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=k_(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 fa("",p,c-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const f=Tf(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]=fa(p,h,c-1,r,o),l++}return i(t),d}function k_(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(Sf(t))return hf(t);if(xg(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=R_(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function R_(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function C_(e){return~-encodeURI(e).split(/%..|./).length}function A_(e){return C_(JSON.stringify(e))}function x_(){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 M_(e,t){const[n,r]=e;return[n,[...r,t]]}function An(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 pa(e,t){return An(e,(n,r)=>t.includes(r))}function bs(e){const t=Kr($);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function N_(e){const t=Kr($);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Es(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[bs(r),s]:r.push(typeof s=="string"?bs(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:O_(r)}function O_(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 P_(e){let t=typeof e=="string"?bs(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(N_(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 L_(e){return[{type:"span"},e]}function D_(e){const t=typeof e.data=="string"?bs(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const F_={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 Ou(e){return F_[e]}function Qs(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Gf(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 $_(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 U_(e,t,n,r){const o=Qs(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 B_(e,t,n,r){const o=Qs(n),s=e.type&&e.type!=="replay_event"?e.type:"event";$_(e,n?.sdk);const i=Gf(e,o,r,t);return delete e.sdkProcessingMetadata,dt(i,[[{type:s},e]])}function H_(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=>!Ss(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||(da(),h)}:F,f=[];for(const p of u){const h=l(p);h&&f.push(L_(h))}return dt(i,f)}function W_(e){if(!w)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=F(e),{spanId:o}=e.spanContext(),s=dn(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 j_(e){if(!w)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 z_(e,t,n,r=Te()){const o=r&&Se(r);o&&(w&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[to]:t,[eo]:n}))}function Pu(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[eo],s=r[to];
9typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}const Lu=1e3;class Zs{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||Ct(),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?oc:$f}}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=In(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=In(t),j_(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:Hf(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[G],profile_id:this._attributes[tc],exclusive_time:this._attributes[br],measurements:Pu(this._events),is_segment:this._isStandaloneSpan&&Se(this)===this||void 0,segment_id:this._isStandaloneSpan?Se(this).spanContext().spanId:void 0,links:Bf(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){w&&g.log("[Tracing] Adding an event to span:",t);const o=Du(n)?n:r||he(),s=Du(n)?{}:n||{},i={name:t,time:In(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=C();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Se(this)))return;if(this._isStandaloneSpan){this._sampled?G_(H_([this],t)):(w&&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&&(ys(this).scope||j()).captureEvent(r)}_convertSpanToTransaction(){if(!Fu(F(this)))return;this._name||(w&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=ys(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const s=Yo(this).filter(d=>d!==this&&!q_(d)).map(d=>F(d)).filter(Fu),i=this._attributes[ae];delete this._attributes[ua],s.forEach(d=>{delete d.data[ua]});const a={contexts:{trace:__(this)},spans:s.length>Lu?s.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,Lu):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=Pu(this._events);return c&&Object.keys(c).length&&(w&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function Du(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Fu(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function q_(e){return e instanceof Zs&&e.isStandaloneSpan()}function G_(e){const t=C();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function ei(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return V_(o,t,n,r)}function V_(e,t,n,r){return un(e)?e.then(o=>(n(),r(o),o),o=>{throw t(o),n(),o}):(n(),r(e),e)}function J_(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=Cn(o);if(s===void 0)return w&&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 w&&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||w&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}const Ts="__SENTRY_SUPPRESS_TRACING__";function fn(e,t){const n=no();if(n.startSpan)return n.startSpan(e,t);const r=ac(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return Ke(a,()=>Vf(s)(()=>{const u=j(),d=cc(u,s),f=e.onlyIfParent&&!d?new Ot:ic({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return St(u,f),ei(()=>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=no();if(n.startSpanManual)return n.startSpanManual(e,t);const r=ac(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return Ke(a,()=>Vf(s)(()=>{const u=j(),d=cc(u,s),f=e.onlyIfParent&&!d?new Ot:ic({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return St(u,f),ei(()=>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=no();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=ac(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?i=>Ke(e.scope,i):o!==void 0?i=>ar(o,i):i=>i())(()=>{const i=j(),a=cc(i,o);return e.onlyIfParent&&!a?new Ot:ic({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}const BM=(e,t)=>{const n=Lt(),r=ln(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=C(),a=rc(s);return i&&!g_(i,a?.org_id)?K_(t):Ke(c=>{const u=Lf(o,s);return c.setPropagationContext(u),St(c,void 0),t()})};function ar(e,t){const n=no();return n.withActiveSpan?n.withActiveSpan(e,t):Ke(r=>(St(r,e||void 0),t(r)))}function Y_(e){const t=no();return t.suppressTracing?t.suppressTracing(e):Ke(n=>{n.setSDKProcessingMetadata({[Ts]:!0});const r=e();return n.setSDKProcessingMetadata({[Ts]:void 0}),r})}function K_(e){return Ke(t=>(t.setPropagationContext({traceId:yt(),sampleRand:Rt()}
9),w&&g.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),ar(null,e)))}function ic({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)};Ko(i,a)}return i}const o=we();let s;if(e&&!n)s=X_(e,r,t),Wf(e,s);else if(e){const i=lt(e),{traceId:a,spanId:c}=e.spanContext(),u=dn(e);s=$u({traceId:a,parentSpanId:c,...t},r,u),Ko(s,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};s=$u({traceId:i,parentSpanId:c,...t},r,u),a&&Ko(s,a)}return W_(s),o_(s,r,o),s}function ac(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=In(e.startTime),delete r.startTime,r}return n}function no(){const e=Lt();return ln(e)}function $u(e,t,n){const r=C(),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[Ts]?[!1]:J_(o,{name:s,parentSampled:a,attributes:c,parentSampleRate:Cn(u.dsc?.sample_rate)},u.sampleRand),p=new Zs({...e,attributes:{[ae]:"custom",[ec]:l!==void 0&&f?l:void 0,...c},sampled:d});return!d&&r&&(w&&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 X_(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[Ts]?!1:dn(e),i=s?new Zs({...n,parentSpanId:r,traceId:o,sampled:s}):new Ot({traceId:o});Wf(e,i);const a=C();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function cc(e,t){if(t)return t;if(t===null)return;const n=sr(e);if(!n)return;const r=C();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Se(n):n}function Vf(e){return e!==void 0?t=>ar(e,t):t=>t()}const Xo={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Q_="heartbeatFailed",Z_="idleTimeout",ey="finalTimeout",ty="externalFinish";function Jf(e,t={}){const n=new Map;let r=!1,o,s=ty,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=Xo.idleTimeout,finalTimeout:u=Xo.finalTimeout,childSpanTimeout:d=Xo.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:f=!0}=t,p=C();if(!p||!tt()){const b=new Ot,x={sample_rate:"0",sampled:"false",...lt(b)};return Ko(b,x),b}const h=j(),m=Te(),_=ny(e);_.end=new Proxy(_.end,{apply(b,x,H){if(l&&l(_),x instanceof Ot)return;const[E,...O]=H,R=E||he(),P=In(R),D=Yo(_).filter(k=>k!==_),ee=F(_);if(!D.length||!f)return N(P),Reflect.apply(b,x,[P,...O]);const K=p.getOptions().ignoreSpans,ne=D?.reduce((k,V)=>{const se=F(V);return!se.timestamp||K&&Ss(se,K)?k:k?Math.max(k,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=Q_,_.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:H}=x;if(!H)return;x.data[Wr]||_.setAttribute(Wr,s);const O=x.status;(!O||O==="unknown")&&_.setStatus({code:Ks}),g.log(`[Tracing] Idle span "${x.op}" finished`);const R=Yo(_).filter(D=>D!==_);let P=0;R.forEach(D=>{D.isRecording()&&(D.setStatus({code:Z,message:"cancelled"}),D.end(b),w&&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,k=K-ne<=z;if(w){const V=JSON.stringify(D,void 0,2);T?k||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)}(!k||!T)&&(T_(_,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 Zs&&b.isStandaloneSpan())return;Yo(_).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=ey,_.end())},u),_}function ny(e){const t=ut(e);
9return St(j(),t),w&&g.log("[Tracing] Started span is an idle span"),t}const Pi=0,Uu=1,Bu=2;function ro(e){return new jr(t=>{t(e)})}function uc(e){return new jr((t,n)=>{n(e)})}class jr{constructor(t){this._state=Pi,this._handlers=[],this._runExecutor(t)}then(t,n){return new jr((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 jr((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===Pi)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Uu&&n[1](this._value),this._state===Bu&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===Pi){if(un(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Uu,s)},o=s=>{n(Bu,s)};try{t(r,o)}catch(s){o(s)}}}function ry(e,t,n,r=0){try{const o=ha(t,n,e,r);return un(o)?o:ro(o)}catch(o){return uc(o)}}function ha(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return w&&s===null&&g.log(`Event processor "${o.id||"?"}" dropped event`),un(s)?s.then(i=>ha(i,t,n,r+1)):ha(s,t,n,r+1)}let mn,Hu,Wu,Bt;function Yf(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===Hu&&o.length===Wu)return Bt;Hu=r.length,Wu=o.length,Bt={},mn||(mn={});const s=(i,a)=>{for(const c of i){const u=a[c],d=mn?.[c];if(d&&Bt&&u)Bt[d[0]]=u,mn&&(mn[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&&mn){Bt[h]=u,mn[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),Bt}function oy(e,t){const n=Yf(e);if(!n)return[];const r=[];for(const o of t){const s=Ig(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function sy(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;iy(e,t),r&&uy(e,r),ly(e,n),ay(e,o),cy(e,s)}function ju(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=Zr(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]=Zr(e[t],n,1)}function lc(e,t){const n=er().getScopeData();return e&&ju(n,e.getScopeData()),t&&ju(n,t.getScopeData()),n}function iy(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 ay(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function cy(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function uy(e,t){e.contexts={trace:Uf(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 ly(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 Kf(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||Un()},u=n.integrations||e.integrations.map(y=>y.name);dy(c,e),hy(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&fy(c,e.stackParser);const d=gy(r,n.captureContext);n.mechanism&&Nt(c,n.mechanism);const l=o?o.getEventProcessors():[],f=lc(s,d),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),sy(c,f);const h=[...l,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?ro(c):ry(h,c,n)).then(y=>(y&&py(y),typeof i=="number"&&i>0?my(y,i,a):y))}function dy(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Xs,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=Hr(i.url,s)),s&&e.exception?.values?.forEach(a=>
9{a.value&&(a.value=Hr(a.value,s))})}function fy(e,t){const n=Yf(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function py(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 hy(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function my(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 gy(e,t){if(!t)return e;const n=e?e.clone():new bt;return n.update(t),n}function _y(e){if(e)return yy(e)?{captureContext:e}:by(e)?{captureContext:e}:e}function yy(e){return e instanceof bt||typeof e=="function"}const Sy=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function by(e){return Object.keys(e).some(t=>Sy.includes(t))}function me(e,t){return j().captureException(e,_y(t))}function Ey(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 oo(e,t){return j().captureEvent(e,t)}function Xf(e,t){we().setContext(e,t)}function HM(e){we().setExtras(e)}function WM(e,t){we().setExtra(e,t)}function jM(e){we().setTags(e)}function zM(e,t){we().setTag(e,t)}function qM(e){we().setUser(e)}function Ty(){return we().lastEventId()}async function GM(e){const t=C();return t?t.flush(e):(w&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function VM(e){const t=C();return t?t.close(e):(w&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function JM(){return!!C()}function vy(){const e=C();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Iy(e){we().addEventProcessor(e)}function zu(e){const t=we(),n=j(),{userAgent:r}=$.navigator||{},o=Bg({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&or(s,{status:"exited"}),Qf(),t.setSession(o),o}function Qf(){const e=we(),n=j().getSession()||e.getSession();n&&Hg(n),Zf(),e.setSession()}function Zf(){const e=we(),t=C(),n=e.getSession();n&&t&&t.captureSession(n)}function qu(e=!1){if(e){Qf();return}Zf()}const wy="7";function ep(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ky(e){return`${ep(e)}${e.projectId}/envelope/`}function Ry(e,t){const n={sentry_version:wy};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function tp(e,t,n){return t||`${ky(e)}?${Ry(e,n)}`}function Cy(e,t){const n=Of(e);if(!n)return"";const r=`${ep(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 Gu=[];function Ay(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 xy(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 Ay(r)}function My(e,t){const n={};return t.forEach(r=>{r&&np(e,r,n)}),n}function Vu(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}
9function np(e,t,n){if(n[t.name]){w&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Gu.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Gu.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)}w&&g.log(`Integration installed: ${t.name}`)}function Ju(e){const t=C();if(!t){w&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Ny(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function Oy(e,t){const{value:n,unit:r}=Ny(e)?e:{value:e,unit:void 0},o=Py(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 vs(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const s=Oy(o,t);s&&(n[r]=s)}return n}function Py(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 rp(e,t){return t?Ke(t,()=>{const n=Te(),r=n?Uf(n):wf(t);return[n?lt(n):sc(e,t),r]}):[void 0,void 0]}const Ly={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Dy(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function Fy(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,[Dy(e)])}const $y=100;function ht(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Uy(e,t){const n=fc(),r=op(e);r===void 0?n.set(e,[t]):r.length>=$y?(dc(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Is(e,t=j(),n=Uy){const r=t?.getClient()??C();if(!r){w&&g.warn("No client available to capture log.");return}const{release:o,environment:s,enableLogs:i=!1,beforeSendLog:a}=r.getOptions();if(!i){w&&g.warn("logging option not enabled, log will not be captured.");return}const[,c]=rp(r,t),u={...e.attributes},{user:{id:d,email:l,username:f},attributes:p={}}=lc(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(Js(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=sr(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),w&&g.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:b,attributes:x={},severityNumber:H}=L,E={timestamp:he(),level:N,body:b,trace_id:c?.trace_id,severity_number:H??Ly[N],attributes:{...vs(p),...vs(x,!0)}};n(r,E),r.emit("afterCaptureLog",L)}function dc(e,t){const n=t??op(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Fy(n,r._metadata,r.tunnel,e.getDsn());fc().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function op(e){return fc().get(e)}function fc(){return yr("clientToLogBufferMap",()=>new WeakMap)}function By(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function Hy(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,[By(e)])}const Wy=1e3;function It(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function jy(e,t){const n=hc(),r=sp(e);r===void 0?n.set(e,[t]):r.length>=Wy?(pc(e,r),n.set(e,[t])):n.set(e,[...r,t])}function zy(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 qy(e,t,n,r){const[,o]=rp(t,n),s=sr(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:{...vs(r),...vs(e.attributes,"skip-undefined")}}}function Gy(e,t){const n=t?.scope??j(),r=t?.captureSerializedMetric??jy,o=n?.getClient()??C();if(!o){w&&g.warn("No client available to capture metric.");return}const{_experiments:s,enableMetrics:i,beforeSendMetric:a}=o.getOptions();if(!(i??s?.enableMetrics??!0)){w&&g.warn("metrics option not enabled, metric will not be captured.");return}const{user:u,attributes:d}=lc(we(),n),l=zy(e,o,u);
9o.emit("processMetric",l);const f=a||s?.beforeSendMetric,p=f?f(l):l;if(!p){w&&g.log("`beforeSendMetric` returned `null`, will not send metric.");return}const h=qy(p,o,n,d);w&&g.log("[Metric]",h),r(o,h),o.emit("afterCaptureMetric",p)}function pc(e,t){const n=t??sp(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Hy(n,r._metadata,r.tunnel,e.getDsn());hc().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function sp(e){return hc().get(e)}function hc(){return yr("clientToMetricBufferMap",()=>new WeakMap)}function mc(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const gc=Symbol.for("SentryBufferFullError");function _c(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return uc(gc);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return ro(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>mc(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const Vy=60*1e3;function ip(e,t=Qr()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Vy:r-t}function Jy(e,t){return e[t]||e.all||0}function ap(e,t,n=Qr()){return Jy(e,t)>n}function cp(e,{statusCode:t,headers:n},r=Qr()){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+ip(i,r):t===429&&(o.all=r+60*1e3);return o}const up=64;function Yy(e,t,n=_c(e.bufferSize||up)){let r={};const o=i=>n.drain(i);function s(i){const a=[];if(An(i,(l,f)=>{const p=Ou(f);ap(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(pa(c,["client_report"])){w&&g.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}An(c,(f,p)=>{e.recordDroppedEvent(l,Ou(p))})},d=()=>t({body:Es(c)}).then(l=>l.statusCode===413?(w&&g.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(w&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=cp(r,l),l),l=>{throw u("network_error"),w&&g.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===gc)return w&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function Ky(e,t,n){const r=[{type:"client_report"},{timestamp:Un(),discarded_events:e}];return dt(t?{dsn:t}:{},[r])}function lp(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 Xy(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?.[tc],exclusive_time:i?.[br],measurements:e.measurements,is_segment:!0}}function Qy(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&&{[tc]:e.profile_id},...e.exclusive_time&&{[br]:e.exclusive_time}}}},measurements:e.measurements}}const Yu="Not capturing exception because it's already been captured.",Ku="Discarded session because of missing or non-string release",dp=Symbol.for("SentryInternalError"),fp=Symbol.for("SentryDoNotSendEventError"),Zy=5e3;function Qo(e){return{message:e,[dp]:!0}}function Li(e){return{message:e,[fp]:!0}}function Xu(e){return!!e&&typeof e=="object"&&dp in e}function Qu(e){return!!e&&typeof e=="object"&&fp in e}function Zu(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=mc(setTimeout(()=>{o(e)},Zy)))}),e.on("flush",()=>{o(e)})}class eS{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=_c(t.transportOptions?.bufferSize??up),t.dsn?this._dsn=Of(t.dsn):w&&g.warn("No DSN provided, client will not send events."),this._dsn){const r=tp(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&&Zu(this,"afterCaptureLog","flushLogs",oS,dc),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Zu(this,"afterCaptureMetric","flushMetrics",rS,pc)}captureException(t,n,r){const o=ke();if(wu(t))return w&&g.log(Yu),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=Js(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&&wu(n.originalException))return w&&g.log(Yu),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=el(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),or(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];np(this,t,this._integrations),n||Vu(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=B_(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=M_(r,D_(o));this.sendEnvelope(r).then(o=>
9this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=Xs}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){w&&g.warn(Ku);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){w&&g.warn(Ku);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=U_(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}`;w&&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 w&&g.error("Error while sending envelope:",n),{}}return w&&g.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=My(this,t),Vu(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)&&(or(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),Kf(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:wf(r),...a.contexts};const c=sc(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=j(),o=we()){return w&&ma(t)&&g.log(`Captured error event \`${lp(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{w&&(Qu(s)?g.log(s.message):Xu(s)?g.warn(s.message):g.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=pp(t),c=ma(t),d=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:Cn(i);if(c&&typeof l=="number"&&Rt()>l)return this.recordDroppedEvent("sample_rate","error"),uc(Li(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const f=el(t.type);return this._prepareEvent(t,n,r,o).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Li("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const m=nS(this,s,p,n);return tS(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 Li(`${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 Qu(p)||Xu(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),Qo(`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===gc&&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(){w&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){w&&g.log("No outcomes to send");return}if(!this._dsn){w&&g.log("No dsn provided, will not send outcomes");return}w&&g.log("Sending outcomes:",t);const n=Ky(t,this._options.tunnel&&Dt(this._dsn));this.sendEnvelope(n)}}function el(e){return e==="replay_event"?"replay":e||"error"}function tS(e,t){const n=`${t} must return \`null\` or a valid event.`;if(un(e))return e.then(r=>{if(!Ye(r)&&r!==null)throw Qo(n);return r},r=>{throw Qo(`${t} rejected with ${r}`)});if(!Ye(e)&&e!==null)throw Qo(n);return e}function nS(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(ma(c)&&o)return o(c,r);if(pp(c)){if(i||a){const u=Xy(c);if(a?.length&&Ss(u,a))return null;if(i){const d=i(u);d?c=Zr(n,Qy(d)):da()}if(c.spans){const d=[],l=c.spans;for(const p of l){if(a?.length&&Ss(p,a)){I_(l,p);continue}if(i){const h=i(p);h?d.push(h):(da(),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 ma(e){return e.type===void 0}function pp(e){return e.type==="transaction"}function rS(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+hp(e.attributes)}function oS(e){let t=0;return e.message&&(t+=e.message.length*2),t+hp(e.attributes)}function hp(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*tl(n[0]):tn(n)?t+=tl(n):t+=100}),t}function tl(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function sS(e){return gt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function nl(e){return sS(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function iS(e,t){t.debug===!0&&(w?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 aS(r),r.init(),r}function aS(e){j().setClient(e)}const Di=100,Fi=5e3,cS=36e5;function uS(e){function t(...n){w&&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=Fi,i;function a(l,f,p){return pa(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,f,p):!0}function c(l){i&&clearTimeout(i),i=mc(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))}function u(){i||(c(s),s=Math.min(s*2,cS))}async function d(l,f=!1){if(!f&&pa(l,["replay_event","replay_recording"]))return await o.push(l),c(Di),{};
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=Di;if(p){if(p.headers?.["retry-after"])h=ip(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=Fi,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=Fi,c(Di)),r.flush(l))}}}const $i="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function mp(e,t){let n;return An(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function lS(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=mp(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function dS(e,t){return dt(t?{...e[0],dsn:t}:e[0],e[1])}function YM(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{const d=u.getEvent();return d?.extra?.[$i]&&Array.isArray(d.extra[$i])?d.extra[$i]:[]});function i(u,d){const l=d?`${u}:${d}`:u;let f=o.get(l);if(!f){const p=xf(u);if(!p)return;const h=tp(p,n.tunnel);f=d?lS(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 mp(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(dS(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 fS="thismessage:/";function yc(e){return"isRelative"in e}function Sc(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?fS: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 pS(e){if(yc(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 kn(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 gp(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 _p(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;
10return mS(e,n)||hS(e,r)}function hS(e,t){return t?rl(e)===rl(t):!1}function mS(e,t){const n=Sc(e);return!n||yc(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function rl(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function gS(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 _S=gS;function yS(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 yp(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(s=>({name:`${r}:@sentry/${s}`,version:Gt})),o.version=Gt)}function Sp(e={}){const t=e.client||C();if(!vy()||!t)return{};const n=Lt(),r=ln(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||j(),s=e.span||Te(),i=s?y_(s):SS(o),a=s?lt(s):sc(t,o),c=Af(a);if(!Pf.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?S_(s):bS(o)),d}function SS(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Df(t,r,n)}function bS(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Ff(t,r,n)}function ES(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 TS=100;function Et(e,t){const n=C(),r=we();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=TS}=n.getOptions();if(s<=0)return;const a={timestamp:Un(),...e},c=o?sn(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}let ol;const vS="FunctionToString",sl=new WeakMap,IS=(()=>({name:vS,setupOnce(){ol=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Za(this),n=sl.has(C())&&t!==void 0?t:this;return ol.apply(n,e)}}catch{}},setup(e){sl.set(e,!0)}})),wS=IS,kS=[/^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$/],RS="EventFilters",CS=(e={})=>{let t;return{name:RS,setup(n){const r=n.getOptions();t=il(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=il(e,s)}return xS(n,t)?null:n}}},AS=((e={})=>({...CS(e),name:"InboundFilters"}));function il(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:kS],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function xS(e,t){if(e.type){if(e.type==="transaction"&&NS(e,t.ignoreTransactions))return w&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
11Event: ${_n(e)}`),!0}else{if(MS(e,t.ignoreErrors))return w&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12Event: ${_n(e)}`),!0;if(DS(e))return w&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
13Event: ${_n(e)}`),!0;if(OS(e,t.denyUrls))return w&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
14Event: ${_n(e)}.
15Url: ${ws(e)}`),!0;if(!PS(e,t.allowUrls))return w&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16Event: ${_n(e)}.
17Url: ${ws(e)}`),!0}return!1}function MS(e,t){return t?.length?lp(e).some(n=>ct(n,t)):!1}function NS(e,t){if(!t?.length)return!1;const n=e.transaction;return n?ct(n,t):!1}function OS(e,t){if(!t?.length)return!1;const n=ws(e);return n?ct(n,t):!1}function PS(e,t){if(!t?.length)return!0;const n=ws(e);return n?ct(n,t):!0}function LS(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 ws(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?LS(n):null}catch{return w&&g.error(`Cannot extract url for event ${_n(e)}`),null}}function DS(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function FS(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=ga(e,t,r,s.originalException,n,o.exception.values,i,0
17))}function ga(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Mt(r[o],Error)){al(i,a,r);const u=e(t,r[o]),d=c.length;cl(u,o,d,a),c=ga(e,t,n,r[o],o,[u,...c],u,d)}return bp(r)&&r.errors.forEach((u,d)=>{if(Mt(u,Error)){al(i,a,r);const l=e(t,u),f=c.length;cl(l,`errors[${d}]`,f,a),c=ga(e,t,n,u,o,[l,...c],l,f)}}),c}function bp(e){return Array.isArray(e.errors)}function al(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...bp(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function cl(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const Ep=new Map,ul=new Set;function $S(e){if($._sentryModuleMetadata)for(const t of Object.keys($._sentryModuleMetadata)){const n=$._sentryModuleMetadata[t];if(ul.has(t))continue;ul.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){Ep.set(o.filename,n);break}}}function US(e,t){return $S(e),Ep.get(t)}function Tp(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=US(e,r.filename);o&&(r.module_metadata=o)})})}function vp(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const KM=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{An(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(vp(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;Tp(n,t)})}});function bc(e){const t="console";an(t,e),cn(t,BS)}function BS(){"console"in $&&Ja.forEach(function(e){e in $.console&&Ne($.console,e,function(t){return ms[e]=t,function(...n){et("console",{args:n,level:e}),ms[e]?.apply($.console,n)}})})}function ks(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const HS="CaptureConsole",WS=((e={})=>{const t=e.levels||Ja,n=e.handled??!0;return{name:HS,setup(r){"console"in $&&bc(({args:o,level:s})=>{C()!==r||!t.includes(s)||jS(o,s,n)})}}}),XM=WS;function jS(e,t,n){const r=ks(t),o=new Error,s={level:ks(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: ${gs(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){me(a,s);return}const c=gs(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}const zS="Dedupe",qS=(()=>{let e;return{name:zS,processEvent(t){if(t.type)return t;try{if(VS(t,e))return w&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),GS=qS;function VS(e,t){return t?!!(JS(e,t)||YS(e,t)):!1}function JS(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!wp(e,t)||!Ip(e,t))}function YS(e,t){const n=ll(t),r=ll(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!wp(e,t)||!Ip(e,t))}function Ip(e,t){let n=ia(e),r=ia(t);if(!n&&!r)return!0;if(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 wp(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 ll(e){return e.exception?.values?.[0]}const KS="ExtraErrorData",XS=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:KS,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return QS(r,o,t,n,i)}}}),QM=XS;function QS(e,t={},n,r,o){if(!t.originalException||!gt(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=kp(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 kp(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?Hr(`${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]:kp(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){w&&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 eb=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function tb(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=eb.exec(t);return n?n.slice(1):[]}function dl(...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 fl(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 nb(e,t){e=dl(e).slice(1),t=dl(t).slice(1);const n=fl(e.split("/")),r=fl(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 rb(e,t){return tb(e)[2]||""}const ob="RewriteFrames",ZM=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $&&!!$.window,o=e.iteratee||sb({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:ob,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};
17function sb({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?nb(t,i):rb(i);r.filename=`${n}${a}`}return r}}const ib=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],ab=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],cb={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"},Rp=["select","insert","upsert","update","delete"];function ti(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function ni(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function ub(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 lb(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&&cb[n]||"filter",`${o}(${e}, ${r.join(".")})`}function pl(e,t=!1){return new Proxy(e,{apply(n,r,o){return fn({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}),me(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:Ks}),s.end(),i)).catch(i=>{throw s.setStatus({code:Z}),s.end(),me(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...o))}})}function db(e){const t=e.auth;if(!(!t||ni(e.auth))){for(const n of ib){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=pl(r))}for(const n of ab){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=pl(r,!0))}ti(e.auth)}}function fb(e){ni(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 hb(s),o}}),ti(e.prototype.from))}function pb(e){ni(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const o=Rp,s=n,i=ub(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=[];for(const[p,h]of s.url.searchParams.entries())u.push(lb(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),fn({name:l,attributes:f},p=>Reflect.apply(t,n,[]).then(h=>{if(p&&(h&&typeof h=="object"&&"status"in h&&_s(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),me(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&&(_s(p,500),p.end()),h}).then(...r))}}),ti(e.prototype.then))}function hb(e){for(const t of Rp)ni(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 w&&g.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),pb(i),s}}),ti(e.prototype[t]))}const mb=e=>{if(!e){w&&g.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;fb(t),db(e)},gb="Supabase",_b=(e=>({setupOnce(){mb(e)},name:gb})),eN=e=>_b(e.supabaseClient),yb=10,Sb="ZodErrors";function bb(e){return gt(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function Eb(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 Tb(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function vb(e){const t=new Set;for(const r of e.issues){const o=Tb(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];
17o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Hr(n.join(", "),100)}`}function Ib(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!bb(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Eb);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:vb(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 wb=((e={})=>{const t=e.limit??yb;return{name:Sb,processEvent(n,r){return Ib(t,e.saveZodIssuesAsAttachment,n,r)}}}),tN=wb,nN=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{An(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(vp(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;Tp(r,n)})},processEvent(t){const n=Rb(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 kb(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(Ab))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(Cb))return!0}return!1}function Rb(e,t){const n=ia(e);if(n)return n.filter((r,o)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!kb(r,o)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(o=>o.startsWith(hl)).map(o=>o.slice(hl.length)):[])}const hl="_sentryBundlerPluginAppKey:",Cb="Attempt to invoke user-land function",Ab="fn.apply(this, wrappedArguments)",xb=100,Mb=10,xo="flag.evaluation.";function Er(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 xn(e,t,n=xb){const r=j().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;Nb(o,e,t,n)}function Nb(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){w&&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 Mn(e,t,n=Mb){if(typeof t!="boolean")return;const r=Te();if(!r)return;const o=F(r).data;if(`${xo}${e}`in o){r.setAttribute(`${xo}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(xo)).length<n&&r.setAttribute(`${xo}${e}`,t)}const rN=()=>({name:"FeatureFlags",processEvent(e,t,n){return Er(e)},addFeatureFlag(e,t){xn(e,t),Mn(e,t)}}),Ob=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Ne(t,"isOn",ml),typeof t.getFeatureValue=="function"&&Ne(t,"getFeatureValue",ml)},processEvent(t,n,r){return Er(t)}});function ml(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(xn(n,r),Mn(n,r)),r}}const Pb="ConversationId",Lb=(()=>({name:Pb,setup(e){e.on("spanStart",t=>{const n=j().getScopeData(),r=we().getScopeData(),o=n.conversationId||r.conversationId;o&&t.setAttribute(Zg,o)})}})),Db=Lb;function Fb(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&&(Bb(h,e),$b(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(Wb(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=Ub(p,h,tt()&&d?l:void 0,u);m&&(e.args[1]=h,h.headers=m)}const f=C();if(f){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",l,p)}return l}function $b(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Ub(e,t,n,r){const o=Sp({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(Xa(e)?e.headers:void 0);if(c)if(Hb(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?Mo(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"&&Mo(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=>Mo(m)):Mo(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 Bb(e,t){if(t.response){_s(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 Mo(e){return e.split(",").some(t=>t.trim().startsWith(nc))}function Hb(e){return typeof Headers<"u"&&Mt(e,Headers)}function Wb(e,t,n){if(e.startsWith("data:")){const s=Vt(e);return{name:`${t} ${s}`,attributes:gl(e,void 0,t,n)}}const r=Sc(e),o=r?pS(r):e;return{name:`${t} ${o}`,attributes:gl(e,r,t,n)}}function gl(e,t,n,r){const o={url:Vt(e),type:"fetch","http.method":n,[G]:r,[pe]:"http.client"};return t&&(yc(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}
18function jb(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()||C();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}function Tr(e,t,n,r,o){Is({level:e,message:t,attributes:n,severityNumber:o},r)}function zb(e,t,{scope:n}={}){Tr("trace",e,t,n)}function qb(e,t,{scope:n}={}){Tr("debug",e,t,n)}function Gb(e,t,{scope:n}={}){Tr("info",e,t,n)}function Vb(e,t,{scope:n}={}){Tr("warn",e,t,n)}function Jb(e,t,{scope:n}={}){Tr("error",e,t,n)}function Yb(e,t,{scope:n}={}){Tr("fatal",e,t,n)}const oN=Object.freeze(Object.defineProperty({__proto__:null,debug:qb,error:Jb,fatal:Yb,fmt:_S,info:Gb,trace:zb,warn:Vb},Symbol.toStringTag,{value:"Module"}));function _a(e,t,n){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):Kb(e,t,n)}function Kb(e,t,n){return e.map(r=>tn(r)?String(r):JSON.stringify(Ge(r,t,n))).join(" ")}function Xb(e){return/%[sdifocO]/.test(e)}function Qb(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",_l={[G]:"auto.log.console"},eE=((e={})=>{const t=e.levels||Ja;return{name:Zb,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){w&&g.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}bc(({args:i,level:a})=>{if(C()!==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: ${_a(u,o,s)}`:"Assertion failed";Is({level:"error",message:p,attributes:_l})}return}const d=a==="log",l=i.length>1&&typeof i[0]=="string"&&!Xb(i[0]),f={..._l,...l?Qb(c,u):{}};Is({level:d?"info":a,message:_a(i,o,s),severityNumber:d?10:void 0,attributes:f})})}}}),sN=eE;function Ec(e,t,n,r){Gy({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function tE(e,t=1,n){Ec("counter",e,t,n)}function nE(e,t,n){Ec("gauge",e,t,n)}function rE(e,t,n){Ec("distribution",e,t,n)}const iN=Object.freeze(Object.defineProperty({__proto__:null,count:tE,distribution:rE,gauge:nE},Symbol.toStringTag,{value:"Module"})),oE=["trace","debug","info","warn","error","fatal"];function aN(e={}){const t=new Set(e.levels??oE),n=e.client;return{log(r){const{type:o,level:s,message:i,args:a,tag:c,date:u,...d}=r,l=n||C();if(!l)return;const f=aE(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(_a(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),Is({level:f,message:_,attributes:d})}}}const sE={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"},iE={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function aE(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=sE[e];if(n)return n}if(typeof t=="number"){const n=iE[t];if(n)return n}return"info"}const cE="gen_ai.prompt",ri="gen_ai.system",We="gen_ai.request.model",Tc="gen_ai.request.stream",oi="gen_ai.request.temperature",vc="gen_ai.request.max_tokens",si="gen_ai.request.frequency_penalty",Ic="gen_ai.request.presence_penalty",ii="gen_ai.request.top_p",Cp="gen_ai.request.top_k",uE="gen_ai.request.encoding_format",lE="gen_ai.request.dimensions",pn="gen_ai.response.finish_reasons",Ft="gen_ai.response.model",Bn="gen_ai.response.id",dE="gen_ai.response.stop_reason",Nn="gen_ai.usage.input_tokens",On="gen_ai.usage.output_tokens",Pn="gen_ai.usage.total_tokens",nn="gen_ai.operation.name",Ln="sentry.sdk_meta.gen_ai.input.messages.original_length",vr="gen_ai.input.messages",so="gen_ai.system_instructions",nt="gen_ai.response.text",ai="gen_ai.request.available_tools",ci="gen_ai.response.streaming",vt="gen_ai.response.tool_calls",Ap="gen_ai.agent.name",fE="gen_ai.pipeline.name",wc="gen_ai.conversation.id",pE="gen_ai.usage.cache_creation_input_tokens",hE="gen_ai.usage.cache_read_input_tokens",mE="gen_ai.invoke_agent",gE="gen_ai.embeddings.input",_E="gen_ai.tool.name",yE="gen_ai.tool.input",SE="gen_ai.tool.output",xp="openai.response.id",Mp="openai.response.model",Np="open
18ai.response.timestamp",bE="openai.usage.completion_tokens",EE="openai.usage.prompt_tokens",Nr={CHAT:"chat",EMBEDDINGS:"embeddings"},yl="anthropic.response.timestamp",Op=2e4,Rs=e=>new TextEncoder().encode(e).length,kc=e=>Rs(JSON.stringify(e));function ui(e,t){if(Rs(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);Rs(i)<=t?(o=i,n=s+1):r=s-1}return o}function TE(e){return typeof e=="string"?e:"text"in e?e.text:""}function Sl(e,t){return typeof e=="string"?t:{...e,text:t}}function vE(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function IE(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function Dr(e){return!e||typeof e!="object"?!1:wE(e)||Pp(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 wE(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&Dr(e.source)}function Pp(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function Lp(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function kE(e,t){const n={...e,content:""},r=kc(n),o=t-r;if(o<=0)return[];const s=ui(e.content,o);return[{...e,content:s}]}function RE(e,t){const{parts:n}=e,r=n.map(a=>Sl(a,"")),o=kc({...e,parts:r});let s=t-o;if(s<=0)return[];const i=[];for(const a of n){const c=TE(a),u=Rs(c);if(u<=s)i.push(a),s-=u;else if(i.length===0){const d=ui(c,s);d&&i.push(Sl(a,d));break}else break}return i.length<=0?[]:[{...e,parts:i}]}function CE(e,t){if(!e)return[];if(typeof e=="string"){const n=ui(e,t);return n?[n]:[]}return typeof e!="object"?[]:vE(e)?kE(e,t):Lp(e)?RE(e,t):[]}const bl="[Filtered]",AE=["image_url","data","content","b64_json","result","uri"];function Zo(e){const t={...e};Dr(t.source)&&(t.source=Zo(t.source)),Pp(e)&&(t.inlineData={...e.inlineData,data:bl});for(const n of AE)typeof t[n]=="string"&&(t[n]=bl);return t}function ya(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(IE(n)?r={...n,content:ya(n.content)}:"content"in n&&Dr(n.content)&&(r={...n,content:Zo(n.content)}),Lp(n)&&(r={...r??n,parts:ya(n.parts)}),Dr(r)?r=Zo(r):Dr(n)&&(r=Zo(n))),r??n})}function xE(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=e[e.length-1],r=ya([n]),o=r[0];return kc(o)<=t?r:CE(o,t)}function li(e){return xE(e,Op)}function ME(e){return ui(e,Op)}function io(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 Cs(e){return`gen_ai.${io(e)}`}function Dp(e,t){return e?`${e}.${t}`:t}function Rc(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[Nn]:t}),n!==void 0&&e.setAttributes({[On]: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({[Pn]:s})}}function Fp(e){if(typeof e=="string")return ME(e);if(Array.isArray(e)){const t=li(e);return JSON.stringify(t)}return JSON.stringify(e)}function ao(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 NE=["responses.create","chat.completions.create","embeddings.create","conversations.create"],OE=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],PE=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...OE];function Cc(e){return e.includes("chat.completions")||e.includes("responses")?Nr.CHAT:e.includes("embeddings")?Nr.EMBEDDINGS:e.includes("conversations")?Nr.CHAT:e.split(".").pop()||"unknown"}function LE(e){return`gen_ai.${Cc(e)}`}function DE(e){return NE.includes(e)}function FE(e,t){return e?`${e}.${t}`:t}function $E(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion"}function UE(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="response"}function BE(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 HE(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="conversation"}function WE(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function jE(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function zE(e,t,n){if(Ac(e,t.id,t.model,t.created),t.usage&&di(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({[pn]: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)})}}}
18function qE(e,t,n){if(Ac(e,t.id,t.model,t.created_at),t.status&&e.setAttributes({[pn]:JSON.stringify([t.status])}),t.usage&&di(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>0){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 GE(e,t){e.setAttributes({[Mp]:t.model,[Ft]:t.model}),t.usage&&di(e,t.usage.prompt_tokens,void 0,t.usage.total_tokens)}function VE(e,t){const{id:n,created_at:r}=t;e.setAttributes({[xp]:n,[Bn]:n,[wc]:n}),r&&e.setAttributes({[Np]:new Date(r*1e3).toISOString()})}function di(e,t,n,r){t!==void 0&&e.setAttributes({[EE]:t,[Nn]:t}),n!==void 0&&e.setAttributes({[bE]:n,[On]:n}),r!==void 0&&e.setAttributes({[Pn]:r})}function Ac(e,t,n,r){e.setAttributes({[xp]:t,[Bn]:t}),e.setAttributes({[Mp]:n,[Ft]:n}),e.setAttributes({[Np]:new Date(r*1e3).toISOString()})}function JE(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 YE(e){const t={[We]:e.model??"unknown"};"temperature"in e&&(t[oi]=e.temperature),"top_p"in e&&(t[ii]=e.top_p),"frequency_penalty"in e&&(t[si]=e.frequency_penalty),"presence_penalty"in e&&(t[Ic]=e.presence_penalty),"stream"in e&&(t[Tc]=e.stream),"encoding_format"in e&&(t[uE]=e.encoding_format),"dimensions"in e&&(t[lE]=e.dimensions);const n=JE(e);return n&&(t[wc]=n),t}function KE(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 XE(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&&KE(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function QE(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"}),me(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!PE.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*ZE(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)jE(o)?XE(o,r,n):WE(o)&&QE(o,r,n,t),yield o}finally{Ac(t,r.responseId,r.responseModel,r.responseTimestamp),di(t,r.promptTokens,r.completionTokens,r.totalTokens),t.setAttributes({[ci]:!0}),r.finishReasons.length&&t.setAttributes({[pn]: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 eT(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];if(o.length!==0)try{return JSON.stringify(o)}catch(s){w&&g.error("Failed to serialize OpenAI tools:",s);return}}
18function tT(e,t){const n={[ri]:"openai",[nn]:Cc(t),[G]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=eT(r);o&&(n[ai]=o),Object.assign(n,YE(r))}else n[We]="unknown";return n}function nT(e,t,n){if(!t||typeof t!="object")return;const r=t;if($E(r)){if(zE(e,r,n),n&&r.choices?.length){const o=r.choices.map(s=>s.message?.content||"");e.setAttributes({[nt]:JSON.stringify(o)})}}else UE(r)?(qE(e,r,n),n&&r.output_text&&e.setAttributes({[nt]:r.output_text})):BE(r)?GE(e,r):HE(r)&&VE(e,r)}function El(e,t,n){if(n===Nr.EMBEDDINGS&&"input"in t){const a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(gE,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}=ao(r);o&&e.setAttribute(so,o);const i=Fp(s);e.setAttribute(vr,i),Array.isArray(s)?e.setAttribute(Ln,s.length):e.setAttribute(Ln,1)}async function rT(e,t){const n=e.catch(s=>{throw me(s,{mechanism:{handled:!1,type:"auto.ai.openai"}}),s}),r=await t,o=await n;return o&&typeof o=="object"&&"data"in o?{...o,data:r}:r}function Tl(e,t){return un(e)?new Proxy(e,{get(n,r){const s=r in Promise.prototype||r===Symbol.toStringTag?t:n,i=Reflect.get(s,r);return r==="withResponse"&&typeof i=="function"?function(){const c=i.call(n);return rT(c,t)}:typeof i=="function"?i.bind(s):i}}):t}function oT(e,t,n,r){return function(...s){const i=tT(s,t),a=i[We]||"unknown",c=Cc(t),u=s[0],d=u&&typeof u=="object"&&u.stream===!0,l={name:`${c} ${a}${d?" stream-response":""}`,op:LE(t),attributes:i};if(d){let h;const m=zt(l,_=>(h=e.apply(n,s),r.recordInputs&&u&&El(_,u,c),(async()=>{try{const y=await h;return ZE(y,_,r.recordOutputs??!1)}catch(y){throw _.setStatus({code:Z,message:"internal_error"}),me(y,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),_.end(),y}})()));return Tl(h,m)}let f;const p=fn(l,h=>(f=e.apply(n,s),r.recordInputs&&u&&El(h,u,c),f.then(m=>(nT(h,m,r.recordOutputs),m),m=>{throw me(m,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),m})));return Tl(f,p)}}function $p(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=FE(t,String(o));return typeof s=="function"&&DE(i)?oT(s,i,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?$p(s,i,n):s}})}function cN(e,t){const n=!!C()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return $p(e,"",r)}function sT(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:Z,message:e.error?.type??"internal_error"}),me(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function iT(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 aT(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 cT(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 uT(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 Up(e,t,n,r){!(e&&typeof e=="object")||sT(e,r)||(iT(e,t),aT(e,t),cT(e,t,n),uT(e,t))}function lT(e,t,n){t.isRecording()&&(e.responseId&&t.setAttributes({[Bn]:e.responseId}),e.responseModel&&t.setAttributes({[Ft]:e.responseModel}),Rc(t,e.promptTokens,e.completionTokens,e.cacheCreationInputTokens,e.cacheReadInputTokens),t.setAttributes({[ci]:!0}),e.finishReasons.length>0&&t.setAttributes({[pn]: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*dT(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)Up(o,r,n,t),yield o}finally{r.responseId&&t.setAttributes({[Bn]:r.responseId}),r.responseModel&&t.setAttributes({[Ft]:r.responseModel}),Rc(t,r.promptTokens,r.completionTokens,r.cacheCreationInputTokens,r.cacheReadInputTokens),t.setAttributes({[ci]:!0}),r.finishReasons.length>0&&t.setAttributes({[pn]: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 fT(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=>{Up(o,r,n,t)}),e.on("message",()=>{lT(r,t,n)}),e.on("error",o=>{me(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:Z,message:"stream_error"}),t.end())}),e}const pT=["messages.create","messages.stream","messages.countTokens","models.get","completions.
18create","models.retrieve","beta.messages.create"];function hT(e){return pT.includes(e)}function mT(e,t){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:n,filteredMessages:r}=ao(t);n&&e.setAttributes({[so]:n});const o=Array.isArray(r)?r.length:1;e.setAttributes({[vr]:Fp(r),[Ln]:o})}function gT(e,t){t.error&&(e.setStatus({code:Z,message:t.error.type||"internal_error"}),me(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function _T(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 yT(e,t){const n={[ri]:"anthropic",[nn]:io(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[ai]=JSON.stringify(r.tools)),n[We]=r.model??"unknown","temperature"in r&&(n[oi]=r.temperature),"top_p"in r&&(n[ii]=r.top_p),"stream"in r&&(n[Tc]=r.stream),"top_k"in r&&(n[Cp]=r.top_k),"frequency_penalty"in r&&(n[si]=r.frequency_penalty),"max_tokens"in r&&(n[vc]=r.max_tokens)}else t==="models.retrieve"||t==="models.get"?n[We]=e[0]:n[We]="unknown";return n}function Sa(e,t){const n=_T(t);mT(e,n),"prompt"in t&&e.setAttributes({[cE]:JSON.stringify(t.prompt)})}function ST(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 bT(e,t){"id"in t&&"model"in t&&(e.setAttributes({[Bn]:t.id,[Ft]:t.model}),"created"in t&&typeof t.created=="number"&&e.setAttributes({[yl]:new Date(t.created*1e3).toISOString()}),"created_at"in t&&typeof t.created_at=="number"&&e.setAttributes({[yl]:new Date(t.created_at*1e3).toISOString()}),"usage"in t&&t.usage&&Rc(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function ET(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){gT(e,t);return}n&&ST(e,t),bT(e,t)}}function vl(e,t,n){throw me(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:Z,message:"internal_error"}),t.end()),e}function TT(e,t,n,r,o,s,i,a,c,u,d){const l=o[We]??"unknown",f={name:`${s} ${l} stream-response`,op:Cs(i),attributes:o};return u&&!d?zt(f,async p=>{try{c.recordInputs&&a&&Sa(p,a);const h=await e.apply(n,r);return dT(h,p,c.recordOutputs??!1)}catch(h){return vl(h,p,i)}}):zt(f,p=>{try{c.recordInputs&&a&&Sa(p,a);const h=t.apply(n,r);return fT(h,p,c.recordOutputs??!1)}catch(h){return vl(h,p,i)}})}function vT(e,t,n,r){return new Proxy(e,{apply(o,s,i){const a=yT(i,t),c=a[We]??"unknown",u=io(t),d=typeof i[0]=="object"?i[0]:void 0,l=!!d?.stream,f=t==="messages.stream";return l||f?TT(e,o,n,i,a,u,t,d,r,l,f):fn({name:`${u} ${c}`,op:Cs(t),attributes:a},p=>(r.recordInputs&&d&&Sa(p,d),ei(()=>o.apply(n,i),h=>{me(h,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}})},()=>{},h=>ET(p,h,r.recordOutputs))))}})}function Bp(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=Dp(t,String(o));return typeof s=="function"&&hT(i)?vT(s,i,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?Bp(s,i,n):s}})}function uN(e,t){const n=!!C()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return Bp(e,"",r)}const Il=["models.generateContent","models.generateContentStream","chats.create","sendMessage","sendMessageStream"],IT="google_genai",Hp="chats.create",wT="chat";function kT(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:Z,message:`Content blocked: ${r}`}),me(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function RT(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 CT(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 AT(e,t,n,r){!e||kT(e,r)||(RT(e,t),CT(e,t,n))}async function*xT(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)AT(o,r,n,t),yield o}finally{const o={[ci]:!0};r.responseId&&(o[Bn]=r.responseId),r.responseModel&&(o[Ft]=r.responseModel),r.promptTokens!==void 0&&(o[Nn]=r.promptTokens),r.completionTokens!==void 0&&(o[On]=r.completionTokens),r.totalTokens!==void 0&&(o[Pn]=r.totalTokens),r.finishReasons.length&&(o[pn]=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 MT(e){if(Il.includes(e))return!0;const t=e.split(".").pop();return Il.includes(t)}function NT(e){return e.includes("Stream")}function Or(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>Or(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 wl(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 OT(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[oi]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[ii]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[Cp]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[vc]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[si]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[Ic]=e.presencePenalty),t}function PT(e,t,n){const r={[ri]:IT,[nn]:io(e),[G]:"auto.ai.google_genai"};if(t){if(r[We]=wl(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,OT(o)),"tools"in o&&Array.isArray(o.tools)){const s=o.tools.flatMap(i=>i.functionDeclarations);r[ai]=JSON.stringify(s)}}}else r[We]=wl({},n);return r}function kl(e,t){const n=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&n.push(...Or(t.config.systemInstruction,"system")),"history"in t&&n.push(...Or(t.history,"user")),"contents"in t&&n.push(...Or(t.contents,"user")),"message"in t&&n.push(...Or(t.message,"user")),Array.isArray(n)&&n.length){const{systemInstructions:r,filteredMessages:o}=ao(n);r&&e.setAttribute(so,r);const s=Array.isArray(o)?o.length:0;e.setAttributes({[Ln]:s,[vr]:JSON.stringify(li(o))})}}function LT(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({[Nn]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[On]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Pn]: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 Rl(e,t,n,r){const o=t===Hp;return new Proxy(e,{apply(s,i,a){const c=a[0],u=PT(t,c,n),d=u[We]??"unknown",l=io(t);return NT(t)?zt({name:`${l} ${d}
18 stream-response`,op:Cs(t),attributes:u},async f=>{try{r.recordInputs&&c&&kl(f,c);const p=await s.apply(n,a);return xT(p,f,!!r.recordOutputs)}catch(p){throw f.setStatus({code:Z,message:"internal_error"}),me(p,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),f.end(),p}}):fn({name:o?`${l} ${d} create`:`${l} ${d}`,op:Cs(t),attributes:u},f=>(r.recordInputs&&c&&kl(f,c),ei(()=>s.apply(n,a),p=>{me(p,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},p=>{o||LT(f,p,r.recordOutputs)})))}})}function ba(e,t="",n){return new Proxy(e,{get:(r,o,s)=>{const i=Reflect.get(r,o,s),a=Dp(t,String(o));if(typeof i=="function"&&MT(a)){if(a===Hp){const c=Rl(i,a,r,n);return function(...d){const l=c(...d);return l&&typeof l=="object"?ba(l,wT,n):l}}return Rl(i,a,r,n)}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?ba(i,a,n):i}})}function lN(e,t){const n=!!C()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return ba(e,"",r)}const Pr="auto.ai.langchain",DT={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 xr(e){const t=e.toLowerCase();return DT[t]??t}function Cl(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 Al(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function xc(e){return e.map(t=>{const n=t._getType;if(typeof n=="function"){const o=n.call(t);return{role:xr(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"?Cl(s):"user";return{role:xr(i),content:He(t.kwargs?.content)}}if(t.type){const o=String(t.type).toLowerCase();return{role:xr(o),content:He(t.content)}}if(t.role)return{role:xr(String(t.role)),content:He(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:xr(Cl(r)),content:He(t.content)}:{role:"user",content:He(t.content)}})}function FT(e,t,n){const r={},o="kwargs"in e?e.kwargs:void 0,s=t?.temperature??n?.ls_temperature??o?.temperature;qe(r,oi,s);const i=t?.max_tokens??n?.ls_max_tokens??o?.max_tokens;qe(r,vc,i);const a=t?.top_p??o?.top_p;qe(r,ii,a);const c=t?.frequency_penalty;qe(r,si,c);const u=t?.presence_penalty;return qe(r,Ic,u),t&&"stream"in t&&Ze(r,Tc,!!t.stream),r}function Wp(e,t,n,r,o){return{[ri]:He(e??"langchain"),[nn]:"chat",[We]:He(t),[G]:Pr,...FT(n,r,o)}}function $T(e,t,n,r,o){const s=o?.ls_provider,i=r?.model??o?.ls_model_name??"unknown",a=Wp(s,i,e,r,o);if(n&&Array.isArray(t)&&t.length>0){Ze(a,Ln,t.length);const c=t.map(u=>({role:"user",content:u}));Ze(a,vr,He(c))}return a}function UT(e,t,n,r,o){const s=o?.ls_provider??e.id?.[2],i=r?.model??o?.ls_model_name??"unknown",a=Wp(s,i,e,r,o);if(n&&Array.isArray(t)&&t.length>0){const c=xc(t.flat()),{systemInstructions:u,filteredMessages:d}=ao(c);u&&Ze(a,so,u);const l=Array.isArray(d)?d.length:0;Ze(a,Ln,l);const f=li(d);Ze(a,vr,He(f))}return a}function BT(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 HT(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)qe(t,Nn,n.promptTokens),qe(t,On,n.completionTokens),qe(t,Pn,n.totalTokens);else if(r){qe(t,Nn,r.input_tokens),qe(t,On,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,Pn,i),r.cache_creation_input_tokens!==void 0&&qe(t,pE,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&qe(t,hE,r.cache_read_input_tokens)}}function WT(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,pn,He(u)),BT(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))}}HT(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,Bn,a);const c=r?.stop_reason??s?.response_metadata?.finish_reason;return c&&Ze(n,dE,He(c)),n}function dN(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=Al(l),m=$T(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=Al(l),m=UT(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=WT(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)),me(i,{mechanism:{handled:!1,type:`${Pr}.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)),me(i,{mechanism:{handled:!1,type:`${Pr}.chain_error_handler`}})},handleToolStart(i,a,c,u){const d=i.name||"unknown_tool",l={[G]:Pr,[_E]:d};t&&(l[yE]=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({[SE]:JSON.stringify(i)}),o(a))},handleToolError(i,a){const c=r.get(a);c?.isRecording()&&(c.setStatus({code:Z,message:"tool_error"}),o(a)),me(i,{mechanism:{handled:!1,type:`${Pr}.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 jp="auto.ai.langgraph";function jT(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 zT(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 qT(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(pn,[r.finish_reason])}}function GT(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 VT(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=jT(i);a&&e.setAttribute(vt,JSON.stringify(a));const c=xc(i);e.setAttribute(nt,JSON.stringify(c));let u=0,d=0,l=0;for(const f of i){const p=zT(f);u+=p.inputTokens,d+=p.outputTokens,l+=p.totalTokens,qT(e,f)}u>0&&e.setAttribute(Nn,u),d>0&&e.setAttribute(On,d),l>0&&e.setAttribute(Pn,l)}function JT(e,t){return new Proxy(e,{apply(n,r,o){return fn({op:"gen_ai.create_agent",name:"create_agent",attributes:{[G]:jp,[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(Ap,a.name),s.updateName(`create_agent ${a.name}`));const c=i.invoke;return c&&typeof c=="function"&&(i.invoke=YT(c.bind(i),i,a,t)),i}catch(i){throw s.setStatus({code:Z,message:"internal_error"}),me(i,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),i}})}})}function YT(e,t,n,r){return new Proxy(e,{apply(o,s,i){return fn({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[G]:jp,[pe]:mE,[nn]:"invoke_agent"}},async a=>{try{const c=n?.name;c&&typeof c=="string"&&(a.setAttribute(fE,c),a.setAttribute(Ap,c),a.updateName(`invoke_agent ${c}`));const l=(i.length>1?i[1]:void 0)?.configurable?.thread_id;l&&typeof l=="string"&&a.setAttribute(wc,l);const f=GT(t);f&&a.setAttribute(ai,JSON.stringify(f));const p=r.recordInputs,h=r.recordOutputs,m=i.length>0?i[0].messages??[]:[];if(m&&p){const y=xc(m),{systemInstructions:S,filteredMessages:M}=ao(y);S&&a.setAttribute(so,S);const v=li(M),L=Array.isArray(M)?M.length:0;a.setAttributes({[vr]:JSON.stringify(v),[Ln]:L})}const _=await Reflect.apply(o,s,i);return h&&VT(a,m??null,_),_}catch(c){throw a.setStatus({code:Z,message:"internal_error"}),me(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}})}function fN(e,t){const n=t||{};return e.compile=JT(e.compile.bind(e),n),e}function zp(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const cr=$;function KT(){return"history"in cr&&!!cr.history}function XT(){if(!("fetch"in cr))return!1;
18try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Ea(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qp(){if(typeof EdgeRuntime=="string")return!0;if(!XT())return!1;if(Ea(cr.fetch))return!0;let e=!1;const t=cr.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Ea(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){w&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function QT(){return"ReportingObserver"in cr}function Mc(e,t){const n="fetch";an(n,e),cn(n,()=>Gp(void 0,t))}function ZT(e){const t="fetch-body-resolved";an(t,e),cn(t,()=>Gp(tv))}function Gp(e,t=!1){t&&!qp()||Ne($,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=nv(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:he()*1e3,virtualError:o,headers:rv(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=C()?.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 ev(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 tv(e){let t;try{t=e.clone()}catch{return}ev(t,()=>{et("fetch-body-resolved",{endTimestamp:he()*1e3,response:e})})}function es(e,t){return!!e&&typeof e=="object"&&!!e[t]}function xl(e){return typeof e=="string"?e:e?es(e,"url")?e.url:e.toString?e.toString():"":""}function nv(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:xl(n),method:es(r,"method")?String(r.method).toUpperCase():Xa(n)&&es(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:xl(t),method:es(t,"method")?String(t.method).toUpperCase():"GET"}}function rv(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Xa(t))return new Headers(t.headers)}catch{}}function ov(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function sv(){return"npm"}function iv(){return!ov()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function As(){return typeof window<"u"&&(!iv()||av())}function av(){return $.process?.type==="renderer"}const it=$,ce=it.document,Lr=it.navigator,Vp="Report a Bug",cv="Cancel",uv="Send Bug Report",lv="Confirm",dv="Report a Bug",fv="[email protected]",pv="Email",hv="What's the bug? What did you expect?",mv="Description",gv="Your Name",_v="Name",yv="Thank you for your report!",Sv="(required)",bv="Add a screenshot",Ev="Remove screenshot",Tv="Highlight",vv="Hide",Iv="Remove",wv="widget",kv="api",Rv=5e3,Cv=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=C();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&j().setTags(e.tags);const r=jb({source:kv,url:$n(),...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.")})})},ts=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Av(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Lr.userAgent)||/Macintosh/i.test(Lr.userAgent)&&Lr.maxTouchPoints&&Lr.maxTouchPoints>1||!isSecureContext)}function No(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 xv(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 jn=20,Mv="http://www.w3.org/2000/svg";function Nv(){const e=a=>it.document.createElementNS(Mv,a),t=Je(e("svg"),{width:`${jn}`,height:`${jn}`,viewBox:`0 0 ${jn} ${jn}`,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:`${jn}`,height:`${jn}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function Ov({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||Vp,o.appendChild(Nv()),e){const i=ce.createElement("span");i.appendChild(ce.createTextNode(e)),o.appendChild(i)}const s=xv(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 Jp="rgba(88, 74, 192, 1)",Pv={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Jp,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%)"},Ml={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackgroun
69d:Jp,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 Nl(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 Lv({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  ${Nl(e==="dark"?{...Ml,...t}:{...Pv,...n})}
96}
97
98${e==="system"?`
99@media (prefers-color-scheme: dark) {
100  :host {
101    color-scheme: only dark;
102
103    ${Nl({...Ml,...t})}
104  }
105}`:""}
106`,r&&o.setAttribute("nonce",r),o}const Yp=({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=bv,cancelButtonLabel:v=cv,confirmButtonLabel:L=lv,emailLabel:N=pv,emailPlaceholder:b=fv,formTitle:x=dv,isRequiredLabel:H=Sv,messageLabel:E=mv,messagePlaceholder:O=hv,nameLabel:R=_v,namePlaceholder:P=gv,removeScreenshotButtonLabel:D=Ev,submitButtonLabel:ee=uv,successMessageText:K=yv,triggerLabel:ne=Vp,triggerAriaLabel:T="",highlightToolText:z=Tv,hideToolText:k=vv,removeHighlightText:V=Iv,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:H,addScreenshotButtonLabel:M,removeScreenshotButtonLabel:D,highlightToolText:z,hideToolText:k,removeHighlightText:V,onFormClose:re,onFormOpen:se,onSubmitError:Le,onSubmitSuccess:ve,onFormSubmitted:$t};let Ue=null,ft=[];const Ut=ie=>{if(!Ue){const ge=ce.createElement("div");ge.id=String(ie.id),ce.body.appendChild(ge),Ue=ge.attachShadow({mode:"open"}),Ue.appendChild(Lv(ie))}return Ue},kr=async ie=>{const ge=ie.enableScreenshot&&Av();let Xe,xe;try{Xe=(t?t():await e("feedbackModalIntegration",m))(),Ju(Xe)}catch{throw ts&&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=ge?n?n():await e("feedbackScreenshotIntegration",m):void 0;pt&&(xe=pt(),Ju(xe))}catch{ts&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const Oe=Xe.createDialog({options:{...ie,onFormClose:()=>{Oe?.close(),ie.onFormClose?.()},onFormSubmitted:()=>{Oe?.close(),ie.onFormSubmitted?.()}},screenshotIntegration:xe,sendFeedback:Cv,shadow:Ut(ie)});return Oe},Co=(ie,ge={})=>{const Xe=No(De,ge),xe=typeof ie=="string"?ce.querySelector(ie):typeof ie.addEventListener=="function"?ie:null;if(!xe)throw ts&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Oe=null;const pt=async()=>{Oe||(Oe=await kr({...Xe,onFormSubmitted:()=>{Oe?.removeFromDom(),Xe.onFormSubmitted?.()}})),Oe.appendToDom(),Oe.open()};xe.addEventListener("click",pt);const X=()=>{ft=ft.filter(ze=>ze!==X),Oe?.removeFromDom(),Oe=null,xe.removeEventListener("click",pt)};return ft.push(X),X},Rr=(ie={})=>{const ge=No(De,ie),Xe=Ut(ge),xe=Ov({triggerLabel:ge.triggerLabel,triggerAriaLabel:ge.triggerAriaLabel,shadow:Xe,styleNonce:h});return Co(xe.el,{...ge,onFormOpen(){xe.hide()},onFormClose(){xe.show()},onFormSubmitted(){xe.show()}}),xe};return{name:"Feedback",setupOnce(){!As()||!De.autoInject||(ce.readyState==="loading"?ce.addEventListener("DOMContentLoaded",()=>Rr().appendToDom()):Rr().appendToDom())},attachTo:Co,createWidget(ie={}){const ge=Rr(No(De,ie));return ge.appendToDom(),ge},async createForm(ie={}){return kr(No(De,ie))},remove(){Ue&&(Ue.parentElement?.remove(),Ue=null),ft.forEach(ie=>ie()),ft=[]}}});function pN(){return C()?.getIntegrationByName("Feedback")}var fi,le,Kp,yn,Ol,Xp,Ta,zr={},Nc=[],Dv=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Oc=Array.isArray;function qt(e,t){for(var n in t)e[n]=t[n];return e}function Qp(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?fi.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 ns(e,i,r,o,null)}function ns(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??++Kp,__i:-1,__u:0};return o==null&&le.vnode!=null&&le.vnode(s),s}function co(e){return e.children}function rs(e,t){this.props=e,this.context=t}function ur(e,t){if(t==null)return e.__?ur(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"?ur(e):null}function Fv(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),Pc(i,r,o,e.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,t,s??ur(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&Zp(r),r}function Zp(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 Zp(e)}}function Pl(e){(!e.__d&&(e.__d=!0)&&yn.push(e)&&!xs.__r++||Ol!==le.debounceRendering)&&((Ol=le.debounceRendering)||Xp)(xs)}function xs(){var e,t,n,r=[],o=[];for(yn.sort(Ta);e=yn.shift();)e.__d&&(n=yn.length,t=Fv(e,r,o)||t,n===0||yn.length>n?(va(r,t,o),o.length=r.length=0,t=void 0,yn.sort(Ta)):t&&le.__c&&le.__c(t,Nc));t&&va(r,t,o),xs.__r=0}function eh(e,t,n,r,o,s,i,a,c,u,d){var l,f,p,h,m,_=r&&r.__k||Nc,y=t.length;for(n.__d=c,$v(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?zr:_[p.__i]||zr,p.__i=l,Pc(e,p,f,o,s,i,a,c,u,d),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Lc(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=th(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 $v(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?ns(null,o,null,null,o):Oc(o)?ns(co,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?ns(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Uv(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=ur(s)),Ia(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=ur(s)),Ia(s,s))}function th(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=th(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 Uv(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 Ll(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Dv.test(t)?n:n+"px"}function Oo(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||Ll(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ll(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?Fl:Dl,s)):e.removeEventListener(t,s?Fl:Dl,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 Dl(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 Fl(e){if(this.l)return this.l[e.type+!0](le.event?le.event(e):e)}function Pc(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,H=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 H=="function")try{if(y=t.props,S=(d=H.contextType)&&r[d.__c],M=d?S?S.props.value:d.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in H&&H.prototype.render?t.__c=l=new H(y,M):(t.__c=l=new rs(y,M),l.constructor=H,l.render=Hv),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),H.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=qt({},l.__s)),qt(l.__s,H.getDerivedStateFromProps(y,l.__s))),p=l.props,h=l.state,l.__v=t,f)H.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(H.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 H&&H.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)),eh(e,Oc(x=d!=null&&d.type===co&&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=Bv(n.__e,t,n,r,o,s,i,c,u);(d=le.diffed)&&d(t)}function va(e,t,n){for(var r=0;r<n.length;r++)Lc(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 Bv(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&&fi.call(e.childNodes),_=n.props||zr,!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||Oo(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||Oo(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=""),eh(e,Oc(f)?f:[f],t,n,r,o&&S!=="foreignObject",s,i,s?s[0]:n.__k&&ur(n,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&Qp(s[u]);a||(u="value",h!==void 0&&(h!==e[u]||S==="progress"&&!h||S==="option"&&h!==_[u])&&Oo(e,u,h,_[u],!1),u="checked",m!==void 0&&m!==e[u]&&Oo(e,u,m,_[u],!1))}return e}function Lc(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){le.__e(r,n)}}function Ia(e,t,n){var r,o;if(le.unmount&&le.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Lc(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]&&Ia(r[o],t,n||typeof e.type!="function");n||e.__e==null||Qp(e.__e),e.__=e.__e=e.__d=void 0}function Hv(e,t,n){return this.constructor(e,n)}function Wv(e,t,n){var r,o,s,i;le.__&&le.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],Pc(t,e=t.__k=Y(co,null,[e]),o||zr,zr,t.ownerSVGElement!==void 0,o?null:t.firstChild?fi.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),e.__d=void 0,va(s,e,i)}fi=Nc.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}},Kp=0,rs.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),Pl(this))},rs.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Pl(this))},rs.prototype.render=co,yn=[],Xp=typeof Promise=="function"?Promise.prototype.then.bind(Prom
106ise.resolve()):setTimeout,Ta=function(e,t){return e.__v.__b-t.__v.__b},xs.__r=0;var Pt,ue,Ui,$l,lr=0,nh=[],os=[],_e=le,Ul=_e.__b,Bl=_e.__r,Hl=_e.diffed,Wl=_e.__c,jl=_e.unmount,zl=_e.__;function Hn(e,t){_e.__h&&_e.__h(ue,e,lr||t),lr=0;var n=ue.__H||(ue.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:os}),n.__[e]}function bn(e){return lr=1,rh(sh,e)}function rh(e,t,n){var r=Hn(Pt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):sh(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 jv(e,t){var n=Hn(Pt++,3);!_e.__s&&Dc(n.__H,t)&&(n.__=e,n.i=t,ue.__H.__h.push(n))}function oh(e,t){var n=Hn(Pt++,4);!_e.__s&&Dc(n.__H,t)&&(n.__=e,n.i=t,ue.__h.push(n))}function zv(e){return lr=5,uo(function(){return{current:e}},[])}function qv(e,t,n){lr=6,oh(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 uo(e,t){var n=Hn(Pt++,7);return Dc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function tr(e,t){return lr=8,uo(function(){return e},t)}function Gv(e){var t=ue.context[e.__c],n=Hn(Pt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ue)),t.props.value):e.__}function Vv(e,t){_e.useDebugValue&&_e.useDebugValue(t?t(e):e)}function Jv(e){var t=Hn(Pt++,10),n=bn();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 Yv(){var e=Hn(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 Kv(){for(var e;e=nh.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ss),e.__H.__h.forEach(wa),e.__H.__h=[]}catch(t){e.__H.__h=[],_e.__e(t,e.__v)}}_e.__b=function(e){ue=null,Ul&&Ul(e)},_e.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zl&&zl(e,t)},_e.__r=function(e){Bl&&Bl(e),Pt=0;var t=(ue=e.__c).__H;t&&(Ui===ue?(t.__h=[],ue.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=os,n.__N=n.i=void 0})):(t.__h.forEach(ss),t.__h.forEach(wa),t.__h=[],Pt=0)),Ui=ue},_e.diffed=function(e){Hl&&Hl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(nh.push(t)!==1&&$l===_e.requestAnimationFrame||(($l=_e.requestAnimationFrame)||Xv)(Kv)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==os&&(n.__=n.__V),n.i=void 0,n.__V=os})),Ui=ue=null},_e.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ss),n.__h=n.__h.filter(function(r){return!r.__||wa(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],_e.__e(r,n.__v)}}),Wl&&Wl(e,t)},_e.unmount=function(e){jl&&jl(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ss(r)}catch(o){t=o}}),n.__H=void 0,t&&_e.__e(t,n.__v))};var ql=typeof requestAnimationFrame=="function";function Xv(e){var t,n=function(){clearTimeout(r),ql&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ql&&(t=requestAnimationFrame(n))}function ss(e){var t=ue,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ue=t}function wa(e){var t=ue;e.__c=e.__(),ue=t}function Dc(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function sh(e,t){return typeof t=="function"?t(e):t}const Qv=Object.defineProperty({__proto__:null,useCallback:tr,useContext:Gv,useDebugValue:Vv,useEffect:jv,useErrorBoundary:Jv,useId:Yv,useImperativeHandle:qv,useLayoutEffect:oh,useMemo:uo,useReducer:rh,useRef:zv,useState:bn},Symbol.toStringTag,{value:"Module"}),Zv="http://www.w3.org/2000/svg";function eI(){const e=r=>ce.createElementNS(Zv,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 tI({options:e}){const t=uo(()=>({__html:eI().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 nI(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 Bi(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function rI({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,H]=bn(!1),[E,O]=bn(null),[R,P]=bn(!1),D=u?.input,[ee,K]=bn(null),ne=tr(k=>{K(k),P(!1)},[]),T=tr(k=>{const V=nI(k,{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=tr(async k=>{H(!0);try{if(k.preventDefault(),!(k.target instanceof HTMLFormElement))return;const V=new FormData(k.target),se=await(u&&R?u.value():void 0),re={name:Bi(V,"name"),email:Bi(V,"email"),message:Bi(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:wv,tags:d},{attachments:re.attachments});s(re,ve)}catch(ve){ts&&g.error(ve),O(ve),i(ve)}}finally{H(!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(Hi,{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(Hi,{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(Hi,{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(k=>!k)}},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 Hi({label:e,isRequired:t,isRequiredLabel:n}){return Y("span",{class:"form__label__text"},e,t&&Y("span",{class:"form__label__text--required"},n))}const Po=16,Gl=17,oI="http://www.w3.org/2000/svg";function sI(){const e=c=>it.document.createElementNS(oI,c),t=Je(e("svg"),{width:`${Po}`,height:`${Gl}`,viewBox:`0 0 ${Po} ${Gl}`,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:`${Po}`,height:`${Po}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function iI({open:e,onFormSubmitted:t,...n}){const r=n.options,o=uo(()=>({__html:sI().outerHTML}),[]),[s,i]=bn(null),a=tr(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=tr((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{t(),i(null)},Rv))},[t]);return Y(co,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(tI,{options:r}),Y(rI,{...n,onSubmitSuccess:c})))))}const aI=`
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`,cI=`
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`,uI=`
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`,lI=`
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`,dI=`
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 fI(e){const t=ce.createElement("style");return t.textContent=`
387:host {
388  --dialog-inset: var(--inset);
389}
390
391${aI}
392${cI}
393${uI}
394${lI}
395${dI}
396`,e&&t.setAttribute("nonce",e),t}function pI(){const e=j().getUser(),t=we().getUser(),n=er().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const hI=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=pI(),a=ce.createElement("div"),c=fI(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?.(),C()?.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:Qv,dialog:d,options:e}),f=p=>{Wv(Y(iI,{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 mI({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 gI(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 _I({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 yI({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 Lr.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 SI(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 Wi(e,t){Ht(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function ji(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=>{SI(s,o,t)})})}function bI({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=yI({hooks:t}),i=_I({h:e}),a=mI({h:e}),c={__html:gI(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),Wi(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)}),ji(S.current,N,h)},[h,N]),t.useEffect(()=>{b(n,l.dpi),Wi(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,ji(R,N,h),Wi(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 k=(z.clientX-P.x)/v,V=(z.clientY-P.y)/v;return{type:T.type,x:Math.min(T.x,k),y:Math.min(T.y,V),w:Math.abs(k-T.x),h:Math.abs(V-T.y)}},K=T=>{Ht(S.current,{alpha:!0},(z,k)=>{k.clearRect(0,0,z.width,z.height)}),ji(S.current,N,[...h,ee(D,T)])},ne=T=>{const z=ee(D,T);z.w*v>=1&&z.h*v>=1&&m(k=>[...k,z]),ce.removeEventListener("mousemove",K),ce.removeEventListener("mouseup",ne)};ce.addEventListener("mousemove",K),ce.addEventListener("mouseup",ne)},H=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:H(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 EI=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ce.createElement("canvas");return{input:bI({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"}}}}})),A=$;let ka=0;function ih(){return ka>0}function TI(){ka++,setTimeout(()=>{ka--})}function dr(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(Za(e))return e}catch{return e}const r=function(...o){try{const s=o.map(i=>dr(i,t));return e.apply(this,s)}catch(s){throw TI(),Ke(i=>{i.addEventProcessor(a=>(t.mechanism&&(aa(a,void 0),Nt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),me(s)}),s}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Ef(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 Fc(){const e=$n(),{referrer:t}=A.document||{},{userAgent:n}=A.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const vI={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"},Vl=A;async function II(e,t){const n=vI[e],r=Vl.Sentry=Vl.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=wI(n),i=A.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=A.document.currentScript,u=A.document.body||A.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 wI(e){const n=C()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Gt}/${e}.min.js`,n).toString()}const hN=Yp({lazyLoadIntegration:II}),mN=Yp({getModalIntegration:()=>hI,getScreenshotIntegration:()=>EI});function $c(e,t){const n=Uc(e,t),r={type:xI(t),value:MI(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function kI(e,t,n,r){const s=C()?.getOptions().normalizeDepth,i=DI(t),a={__serialized__:qf(t,s)};if(i)return{exception:{values:[$c(e,i)]},extra:a};const c={exception:{values:[{type:Ys(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:PI(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Uc(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function zi(e,t){return{exception:{values:[$c(e,t)]}}}function Uc(e,t){const n=t.stacktrace||t.stack||"",r=CI(t),o=AI(t);try{return e(n,r,o)}catch{}return[]}const RI=/Minified React error #\d+;/i;function CI(e){return e&&RI.test(e.message)?1:0}function AI(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function ah(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function xI(e){const t=e?.name;return!t&&ah(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function MI(e){const t=e?.message;return ah(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?nl(t.error):nl(e):"No error message"}function NI(e,t,n,r){const o=n?.syntheticException||void 0,s=pi(e,t,o,r);return Nt(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),ro(s)}function OI(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=Ra(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),ro(i)}function pi(e,t,n,r,o){let s;if(yf(t)&&t.error)return zi(e,t.error);if(Tu(t)||Rg(t)){const i=t;if("stack"in t)s=zi(e,t);else{const a=i.name||(Tu(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;s=Ra(e,c,n,r),aa(s,c)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return gt(t)?zi(e,t):Ye(t)||Ys(t)?(s=kI(e,t,n,o),Nt(s,{synthetic:!0}),s):(s=Ra(e,t,n,r),aa(s,`${t}`),Nt(s,{synthetic:!0}),s)}function Ra(e,t,n,r){const o={};if(r&&n){const s=Uc(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),Nt(o,{synthetic:!0})}if(Js(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 PI(e,{isUnhandledRejection:t}){const n=Og(e),r=t?"promise rejection":"exception";return yf(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ys(e)?`Event \`${LI(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function LI(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function DI(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class FI extends eS{constructor(t){const n=$I(t),r=A.SENTRY_SDK_SOURCE||sv();yp(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;A.document&&(s||i||u)&&A.document.addEventListener("visibilitychange",()=>{A.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),i&&dc(this),u&&pc(this))}),o&&this.on("beforeSendSession",yS)}eventFromException(t,n){return NI(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return OI(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 $I(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:A.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Dn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,q=$,UI=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",lo=(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=UI(t.value,n),e(t)))}},fo=(e=!0)=>{const t=q.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ir=()=>fo()?.activationStart??0;function Jt(e,t,n){q.document&&q.addEventListener(e,t,n)}function Ms(e,t,n){q.document&&q.removeEventListener(e,t,n)}let nr=-1;const ch=new Set,BI=()=>q.document?.visibilityState==="hidden"&&!q.document?.prerendering?0:1/0,is=e=>{if(HI(e)&&nr>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of ch)t();isFinite(nr)||(nr=e.type==="visibilitychange"?e.timeStamp:0,Ms("prerenderingchange",is,!0))}},po=()=>
488{if(q.document&&nr<0){const e=Ir();nr=(q.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??BI(),Jt("visibilitychange",is,!0),Jt("pagehide",is,!0),Jt("prerenderingchange",is,!0)}return{get firstHiddenTime(){return nr},onHidden(e){ch.add(e)}}};function HI(e){return e.type==="pagehide"||q.document?.visibilityState==="hidden"}const WI=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ho=(e,t=-1)=>{const n=fo();let r="navigate";return n&&(q.document?.prerendering||Ir()>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:WI(),navigationType:r}},qi=new WeakMap;function Bc(e,t){try{return qi.get(e)||qi.set(e,new t),qi.get(e)}catch{return new t}}class Ns{constructor(){Ns.prototype.__init.call(this),Ns.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 wr=(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{}},Hc=e=>{let t=!1;return()=>{t||(e(),t=!0)}},hi=e=>{q.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},jI=[1800,3e3],zI=(e,t={})=>{hi(()=>{const n=po(),r=ho("FCP");let o;const i=wr("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Ir(),0),r.entries.push(c),o(!0)))});i&&(o=lo(e,r,jI,t.reportAllChanges))})},qI=[.1,.25],GI=(e,t={})=>{zI(Hc(()=>{const n=ho("CLS",0);let r;const o=po(),s=Bc(t,Ns),i=c=>{for(const u of c)s._processEntry(u);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=wr("layout-shift",i);a&&(r=lo(e,n,qI,t.reportAllChanges),o.onHidden(()=>{i(a.takeRecords()),r(!0)}),q?.setTimeout?.(r))}))};let uh=0,Gi=1/0,Lo=0;const VI=e=>{e.forEach(t=>{t.interactionId&&(Gi=Math.min(Gi,t.interactionId),Lo=Math.max(Lo,t.interactionId),uh=Lo?(Lo-Gi)/7+1:0)})};let Ca;const lh=()=>Ca?uh:performance.interactionCount||0,JI=()=>{"interactionCount"in performance||Ca||(Ca=wr("event",VI,{type:"event",buffered:!0,durationThreshold:0}))},Vi=10;let dh=0;const YI=()=>lh()-dh;class Os{constructor(){Os.prototype.__init.call(this),Os.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){dh=lh(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(YI()/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<Vi||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.interactionId,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>Vi){const o=this._longestInteractionList.splice(Vi);for(const s of o)this._longestInteractionMap.delete(s.id)}this._onAfterProcessingINPCandidate?.(r)}}}const fh=e=>{const t=q.requestIdleCallback||q.setTimeout;q.document?.visibilityState==="hidden"?e():(e=Hc(e),Jt("visibilitychange",e,{once:!0,capture:!0}),Jt("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Ms("visibilitychange",e,{capture:!0}),Ms("pagehide",e,{capture:!0})}
488))},KI=[200,500],XI=40,QI=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=po();hi(()=>{JI();const r=ho("INP");let o;const s=Bc(t,Os),i=c=>{fh(()=>{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=wr("event",i,{durationThreshold:t.durationThreshold??XI});o=lo(e,r,KI,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),o(!0)}))})};class ZI{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const e0=[2500,4e3],t0=(e,t={})=>{hi(()=>{const n=po(),r=ho("LCP");let o;const s=Bc(t,ZI),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-Ir(),0),r.entries=[u],o())},a=wr("largest-contentful-paint",i);if(a){o=lo(e,r,e0,t.reportAllChanges);const c=Hc(()=>{i(a.takeRecords()),a.disconnect(),o(!0)}),u=d=>{d.isTrusted&&(fh(c),Ms(d.type,u,{capture:!0}))};for(const d of["keydown","click","visibilitychange"])Jt(d,u,{capture:!0})}})},n0=[800,1800],Aa=e=>{q.document?.prerendering?hi(()=>Aa(e)):q.document?.readyState!=="complete"?addEventListener("load",()=>Aa(e),!0):setTimeout(e)},r0=(e,t={})=>{const n=ho("TTFB"),r=lo(e,n,n0,t.reportAllChanges);Aa(()=>{const o=fo();o&&(n.value=Math.max(o.responseStart-Ir(),0),n.entries=[o],r(!0))})},Fr={},Ps={};let ph,hh,mh,gh;function Wc(e,t=!1){return mi("cls",e,s0,ph,t)}function jc(e,t=!1){return mi("lcp",e,i0,hh,t)}function o0(e){return mi("ttfb",e,a0,mh)}function _h(e){return mi("inp",e,c0,gh)}function Fn(e,t){return yh(e,t),Ps[e]||(u0(e),Ps[e]=!0),Sh(e,t)}function mo(e,t){const n=Fr[e];if(n?.length)for(const r of n)try{r(t)}catch(o){Dn&&g.error(`Error while triggering instrumentation handler.
489Type: ${e}
490Name: ${xt(r)}
491Error:`,o)}}function s0(){return GI(e=>{mo("cls",{metric:e}),ph=e},{reportAllChanges:!0})}function i0(){return t0(e=>{mo("lcp",{metric:e}),hh=e},{reportAllChanges:!0})}function a0(){return r0(e=>{mo("ttfb",{metric:e}),mh=e})}function c0(){return QI(e=>{mo("inp",{metric:e}),gh=e})}function mi(e,t,n,r,o=!1){yh(e,t);let s;return Ps[e]||(s=n(),Ps[e]=!0),r&&t({metric:r}),Sh(e,t,o?s:void 0)}function u0(e){const t={};e==="event"&&(t.durationThreshold=0),wr(e,n=>{mo(e,{entries:n})},t)}function yh(e,t){Fr[e]=Fr[e]||[],Fr[e].push(t)}function Sh(e,t,n){return()=>{n&&n();const r=Fr[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function l0(e){return"duration"in e}const d0=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 Ji(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),ar(e,()=>{const s=ut({startTime:t,...r});return s&&s.end(n),s})}function zc(e){const t=C();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 go(){return q.addEventListener&&q.performance}function be(e){return e/1e3}function f0(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}return r===e&&(t=r),{name:t,version:n}}function bh(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Eh(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n),r=!0}d0(()=>{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 p0(e){let t=0,n;if(!bh("layout-shift"))return;const r=Wc(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);Eh(e,(o,s)=>{h0(t,n,s,o),r()})}function h0(e,t,n,r){Dn&&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",[br]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};
491t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=je(u.node)});const c=zc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[eo]:"",[to]:e}),c.end(o))}function m0(e){let t=0,n;if(!bh("largest-contentful-paint"))return;const r=jc(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);Eh(e,(o,s)=>{g0(t,n,s,o),r()})}function g0(e,t,n,r){Dn&&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",[br]: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=zc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[eo]:"millisecond",[to]:e}),c.end(o))}function Qe(e){return e&&((Pe()||performance.timeOrigin)+e)/1e3}function Th(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=f0(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Pe()||go()?.timeOrigin?_0({...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 _0(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const y0=2147483647;let Jl=0,st={},Be,Ls;function S0({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=go();if(r&&Pe()){r.mark&&q.performance.mark("sentry-tracing-init");const o=t?m0(n):I0(),s=w0(),i=e?p0(n):v0();return()=>{o?.(),s(),i?.()}}return()=>{}}function b0(){Fn("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 E0(){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 T0(){Fn("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=bf(n.target);i&&(s.attributes["ui.component_name"]=i),rn(t,r,r+o,s)}}})}function v0(){return Wc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(st.cls={value:e.value,unit:""},Ls=t)},!0)}function I0(){return jc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(st.lcp={value:e.value,unit:"millisecond"},Be=t)},!0)}function w0(){return o0(({metric:e})=>{e.entries[e.entries.length-1]&&(st.ttfb={value:e.value,unit:"millisecond"})})}function k0(e,t){const n=go(),r=Pe();if(!n?.getEntries||!r)return;const o=be(r),s=n.getEntries(),{op:i,start_timestamp:a}=F(e);s.slice(Jl).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":{x0(e,c,o);break}case"mark":case"paint":case"measure":{C0(e,c,u,d,o,t.ignorePerformanceApiSpans);const l=po(),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":{O0(e,c,c.name,u,d,o,t.ignoreResourceSpans);break}}}),Jl=Math.max(s.length-1,0),P0(e),i==="pageload"&&(F0(st),t.recordClsOnPageloadSpan||delete st.cls,t.recordLcpOnPageloadSpan||delete st.lcp,Object.entries(st).forEach(([c,u])=>{z_(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Ir()),L0(e,t)),Be=void 0,Ls=void 0,st={}}function R0(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function C0(e,t,n,r,o,s){if(R0(t)||["mark","measure"].includes(t.entryType)&&ct(t.name,s))return;const i=fo(!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),A0(l,t),c<=d&&rn(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function A0(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 x0(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Do(e,t,r,n)}),Do(e,t,"secureConnection",n,"TLS/SSL"),Do(e,t,"fetch",n,"cache"),Do(e,t,"domainLookup",n,"DNS"),N0(e,t,n)}function Do(e,t,n,r,o=n){const s=M0(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 M0(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function N0(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 O0(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=kn(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),D0(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,...Th(t)},l=s+r,f=l+o;rn(e,l,f,{name:n.replace(q.location.origin,""),op:a,attributes:d})}function P0(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),Ji(n.rtt)&&(st["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Ji(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Ji(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function L0(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)),Ls?.sources&&t.recordClsOnPageloadSpan&&Ls.sources.forEac
491h((n,r)=>e.setAttribute(`cls.source.${r+1}`,je(n.node)))}function D0(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<y0||typeof s=="string")&&(t[o]=s)})}function F0(e){const t=fo(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function $0(){return go()&&Pe()?Fn("element",U0):()=>{}}const U0=({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};fn({name:`element[${s.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},p=>{p.end(u+l)})})},B0=1e3;let Yl,xa,Ma;function vh(e){an("dom",e),cn("dom",H0)}function H0(){if(!q.document)return;const e=et.bind(null,"dom"),t=Kl(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")&&(Ne(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=Kl(e);d.handler=l,s.call(this,i,l,c)}d.refCount++}catch{}return s.call(this,i,a,c)}}),Ne(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 W0(e){if(e.type!==xa)return!1;try{if(!e.target||e.target._sentryId!==Ma)return!1}catch{}return!0}function j0(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Kl(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=z0(n);if(j0(n.type,r))return;Ee(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ee(r,"_sentryId",ke());const o=n.type==="keypress"?"input":n.type;W0(n)||(e({event:n,name:o,global:t}),xa=n.type,Ma=r?r._sentryId:void 0),clearTimeout(Yl),Yl=q.setTimeout(()=>{Ma=void 0,xa=void 0},B0)}}function z0(e){try{return e.target}catch{return null}}let Fo;function gi(e){const t="history";an(t,e),cn(t,q0)}function q0(){if(q.addEventListener("popstate",()=>{const t=q.location.href,n=Fo;if(Fo=t,n===t)return;et("history",{from:n,to:t})}),!KT())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=Fo,s=G0(String(r));if(Fo=s,o===s)return t.apply(this,n);et("history",{from:o,to:s})}return t.apply(this,n)}}Ne(q.history,"pushState",e),Ne(q.history,"replaceState",e)}function G0(e){try{return new URL(e,q.location.origin).toString()}catch{return e}}const as={};function qc(e){const t=as[e];if(t)return t;let n=q[e];if(Ea(n))return as[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){Dn&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(as[e]=n.bind(q))}function V0(e){as[e]=void 0}function _o(...e){return qc("setTimeout")(...e)}const kt="__sentry_xhr_v3__";function Gc(e){an("xhr",e),cn("xhr",J0)}function J0(){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=Y0(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 Y0(e){if(at(e))return e;try{return e.toString()}catch{}}const K0=Symbol.for("sentry__originalRequestBody");function Ih(e){return new URLSearchParams(e).toString()}function Ds(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ih(e)];if(!e)return[void 0]}catch(n){return Dn&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Dn&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Vc(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][K0];return n!==void 0?n:void 0}}function wh(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Dn&&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 Yi=[],cs=new Map,zn=new Map,X0=60;function Q0(){if(go()&&Pe()){const t=Z0();return()=>{t()}}return()=>{}}const Na={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 Z0(){return _h(ew)}const ew=({metric:e})=>{if(e.value==null)return;const t=be(e.value);if(t>X0)return;const n=e.entries.find(h=>h.duration===e.value&&Na[h.name]);if(!n)return;const{interactionId:r}=n,o=Na[n.name],s=be(Pe()+n.startTime),i=Te(),a=i?Se(i):void 0,c=r!=null?cs.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}`,[br]:n.duration},p=zc({name:l,transaction:d,attributes:f,startTime:s});p&&(p.addEvent("inp",{[eo]:"millisecond",[to]:e.value}),p.end(s+t))};function tw(){const e=Object.keys(Na);As()&&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(zn.set(a,i),zn.size>50){const c=zn.keys().next().value;c!==void 0&&zn.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=zn.get(s);if(!i)for(let a=-5;a<=5;a++){const c=zn.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(!l0(a))return;const c=a.interactionId;if(c==null||cs.has(c))return;const u=a.target?je(a.target):n(a);if(Yi.length>10){const d=Yi.shift();cs.delete(d)}Yi.push(c),cs.set(c,{span:i,elementName:u})})};Fn("event",r),Fn("first-input",r)}const nw=40;function kh(e,t=qc("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 V0("fetch"),c}finally{n-=i,r--}}return Yy(e,o,_c(e.bufferSize||nw))}const I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function rw(){const e=C();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 ow(){const e=C();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 gN={startProfiler:rw,stopProfiler:ow}
492,sw=10,iw=20,aw=30,cw=40,uw=50;function fr(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}const lw=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,dw=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,fw=/\((\S*)(?::(\d+))(?::(\d+))\)/,pw=/at (.+?) ?\(data:(.+?),/,hw=e=>{const t=e.match(pw);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=lw.exec(e);if(n){const[,o,s,i]=n;return fr(o,_t,+s,+i)}const r=dw.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=fw.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,i]=Rh(r[1]||_t,r[2]);return fr(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},mw=[aw,hw],gw=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,_w=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,yw=e=>{const t=gw.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=_w.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]=Rh(o,r),fr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Sw=[uw,yw],bw=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Ew=e=>{const t=bw.exec(e);return t?fr(t[2],t[1]||_t,+t[3],t[4]?+t[4]:void 0):void 0},_N=[cw,Ew],Tw=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,vw=e=>{const t=Tw.exec(e);return t?fr(t[2],t[3]||_t,+t[1]):void 0},yN=[sw,vw],Iw=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,ww=e=>{const t=Iw.exec(e);return t?fr(t[5],t[3]||t[4]||_t,+t[1],+t[2]):void 0},SN=[iw,ww],kw=[mw,Sw],Rw=pf(...kw),Rh=(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 bN(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=Cw(e);return dt(o,[s])}function Cw(e){return[{type:"user_report"},e]}const $o=1024,Aw="Breadcrumbs",xw=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Aw,setup(n){t.console&&bc(Pw(n)),t.dom&&vh(Ow(n,t.dom)),t.xhr&&Gc(Lw(n)),t.fetch&&Mc(Dw(n)),t.history&&gi(Fw(n)),t.sentry&&n.on("beforeSendEvent",Nw(n))}}}),Mw=xw;function Nw(e){return function(n){C()===e&&Et({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:_n(n)},{event:n})}}function Ow(e,t){return function(r){if(C()!==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>$o&&(I&&g.warn(`\`dom.maxStringLength\` cannot exceed ${$o}, but a value of ${a} was configured. Sentry will use ${$o} instead.`),a=$o),typeof i=="string"&&(i=[i]);try{const u=r.event,d=$w(u)?u.target:u;o=je(d,{keyAttrs:i,maxStringLength:a}),s=bf(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 Pw(e){return function(n){if(C()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ks(n.level),message:gs(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${gs(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Et(r,{input:n.args,level:n.level})}}function Lw(e){return function(n){if(C()!==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:zp(c)};e.emit("beforeOutgoingRequestBreadcrumb",f,l),Et(f,l)}}function Dw(e){return function(n){if(C()!==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:zp(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Et(c,a)}}}function Fw(e){return function(n){if(C()!==e)return;let r=n.from,o=n.to;const s=kn(A.location.href);let i=r?kn(r):void 0;const a=kn(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 $w(e){return!!e&&!!e.target}const Uw=["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"],Bw="BrowserApiErrors",Hw=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Bw,setupOnce(){t.setTimeout&&Ne(A,"setTimeout",Xl),t.setInterval&&Ne(A,"setInterval",Xl),t.requestAnimationFrame&&Ne(A,"requestAnimationFrame",jw),t.XMLHttpRequest&&"XMLHttpRequest"in A&&Ne(XMLHttpRequest.prototype,"send",zw);const n=t.eventTarget;n&&(Array.isArray(n)?n:Uw).forEach(o=>qw(o,t))}}}),Ww=Hw;function Xl(e){return function(...t){const n=t[0];return t[0]=dr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${xt(e)}`}}),e.apply(this,t)}}function jw(e){return function(t){return e.apply(this,[dr(t,{mechanism:{data:{handler:xt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function zw(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Ne(n,o,function(s){const i={mechanism:{data:{handler:xt(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Za(s);return a&&(i.mechanism.data.handler=xt(a)),dr(s,i)})}),e.apply(this,t)}}function qw(e,t){const r=A[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Ne(r,"addEventListener",function(o){return function(s,i,a){try{Gw(i)&&(i.handleEvent=dr(i.handleEvent,{mechanism:{data:{handler:xt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&Vw(this,s,i),o.apply(this,[s,dr(i,{mechanism:{data:{handler:xt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ne(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 Gw(e){return typeof e.handleEvent=="function"}function Vw(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const Jw=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof A.document>"u"){I&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}zu({ignoreDuration:!0}),qu(),t==="route"&&gi(({from:n,to:r})=>{n!==void 0&&n!==r&&(zu({ignoreDuration:!0}),qu())})}}},Yw="CultureContext",Kw=(()=>({name:Yw,preprocessEvent(e){const t=Qw();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})}})),Xw=Kw;function Qw(){try{const e=A.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const Zw="GlobalHandlers",ek=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Zw,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(nk(n),Ql("onerror")),t.onunhandledrejection&&(rk(n),Ql("onunhandledrejection"))}}}),tk=ek;function nk(e){mf(t=>{const{stackParser:n,attachStacktrace:r}=xh();if(C()!==e||ih())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=ok(pi(n,c||o,void 0,r,!1),s,i,a);u.level="error",oo(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function rk(e){gf(t=>{const{stackParser:n,attachStacktrace:r}=xh();if(C()!==e||ih())return;const o=Ch(t),s=tn(o)?Ah(o):pi(n,o,void 0,r,!0);s.level="error",oo(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Ch(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 Ah(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function ok(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=sk(t)??$n();
492return c.length===0&&c.push({colno:u,filename:l,function:_t,in_app:!0,lineno:d}),e}function Ql(e){I&&g.log(`Global Handler attached: ${e}`)}function xh(){return C()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function sk(e){if(!(!at(e)||e.length===0))return e.startsWith("data:")?`<${Vt(e,!1)}>`:e}const ik=()=>({name:"HttpContext",preprocessEvent(e){if(!A.navigator&&!A.location&&!A.document)return;const t=Fc(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),ak="cause",ck=5,uk="LinkedErrors",lk=((e={})=>{const t=e.limit||ck,n=e.key||ak;return{name:uk,preprocessEvent(r,o,s){const i=s.getOptions();FS($c,i.stackParser,n,t,r,o)}}}),dk=lk,fk="SpotlightBrowser",pk=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:fk,setup:()=>{I&&g.log("Using Sidecar URL",t)},processEvent:n=>mk(n)?null:n,afterAllSetup:n=>{hk(n,t)}}});function hk(e,t){const n=qc("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:Es(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 EN=pk;function mk(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 gk(){return _k()?(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 _k(){if(typeof A.window>"u")return!1;const e=A;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=$n(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(A===A.top&&r.some(s=>n.startsWith(`${s}://`)))}function yk(e){return[AS(),wS(),Db(),Ww(),Mw(),tk(),dk(),GS(),ik(),Xw(),Jw()]}function Sk(e={}){const t=!e.skipBrowserExtensionCheck&&gk();let n=e.defaultIntegrations==null?yk():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:Tg(e.stackParser||Rw),integrations:xy({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||kh};return iS(FI,r)}function TN(){}function vN(e){e()}function Zl(e={}){const t=A.document,n=t?.head||t?.body;if(!n){I&&g.error("[showReportDialog] Global document not defined");return}const r=j(),s=C()?.getDsn();if(!s){I&&g.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Ty()},a=A.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Cy(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{A.removeEventListener("message",d)}};A.addEventListener("message",d)}n.appendChild(a)}const bk=$,Ek="ReportingObserver",ed=new WeakMap,Tk=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(ed.has(C()))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}Ey(`${i}: ${a}`)})}return{name:Ek,setupOnce(){if(!QT())return;new bk.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){ed.set(r,!0)}}}),IN=Tk,vk="HttpClient",Ik=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:vk,setup(n){Nk(n,t),Ok(n,t)}}}),wN=Ik;function wk(e,t,n,r,o){if(Nh(e,n.status,n.url)){const s=Pk(t,r);let i,a,c,u;Ph()&&([i,c]=td("Cookie",s),[a,u]=td("Set-Cookie",n));const d=Oh({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});oo(d)}}function td(e,t){const n=Ck(t.headers);let r;try{const o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=Mh(o))}catch{}return[n,r]}function kk(e,t,n,r,o){if(Nh(e,t.status,t.responseURL)){let s,i,a;
492if(Ph()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(i=Mh(u))}catch{}try{a=Ak(t)}catch{}s=r}const c=Oh({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});oo(c)}}function Rk(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Mh(e){return e.split("; ").reduce((t,n)=>{const[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function Ck(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function Ak(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 xk(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function Mk(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function Nk(e,t){qp()&&Mc(n=>{if(C()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&wk(t,a,r,c,s||i)},!1)}function Ok(e,t){"XMLHttpRequest"in $&&Gc(n=>{if(C()!==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{kk(t,s,a,c,r||o)}catch(u){I&&g.warn("Error while extracting response event form XHR response",u)}})}function Nh(e,t,n){return Mk(e.failedRequestStatusCodes,t)&&xk(e.failedRequestTargets,n)&&!_p(n,C())}function Oh(e){const t=C(),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:Rk(e.responseHeaders)}}};return Nt(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function Pk(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Ph(){const e=C();return e?!!e.getOptions().sendDefaultPii:!1}const Ki=$,Lk=7,Dk="ContextLines",Fk=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:Lk;return{name:Dk,processEvent(n){return $k(n,t)}}}),kN=Fk;function $k(e,t){const n=Ki.document,r=Ki.location&&gp(Ki.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=>Uk(u,i,r,t)))}),e}function Uk(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Dg(t,e,r),e}const Bk="GraphQLClient",Hk=(e=>({name:Bk,setup(t){Wk(t,e),jk(t,e)}}));function Wk(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=F(n).data||{};if(!(s[pe]==="http.client"))return;const c=s[Xg]||s["http.url"],u=s[Kg]||s["http.method"];if(!at(c)||!at(u))return;const{endpoints:d}=t,l=ct(c,d),f=Dh(r);if(l&&f){const p=Fh(f);if(p){const h=Lh(p);n.updateName(`${u} ${c} (${h})`),_i(p)&&n.setAttribute("graphql.document",p.query),yi(p)&&(n.setAttribute("graphql.persisted_query.hash.sha256",p.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",p.extensions.persistedQuery.version))}}})}function jk(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=Dh(r);if(f&&i&&p){const h=Fh(p);if(!i.graphql&&h){const m=Lh(h);i["graphql.operation"]=m,_i(h)&&(i["graphql.document"]=h.query),yi(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function Lh(e){if(yi(e))return`persisted ${e.operationName}`;if(_i(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=zk(t);return r?`${o} ${r}`:`${o}`}return"unknown"}function Dh(e){const t="xhr"in e;let n;if(t){const r=e.xhr[kt];n=r&&Ds(r.body)[0]}else{const r=Vc(e.input);n=Ds(r)[0]}return n}function zk(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 us(e){return typeof e=="object"&&e!==null}function _i(e){return us(e)&&typeof e.query=="string"}
494function yi(e){return us(e)&&typeof e.operationName=="string"&&us(e.extensions)&&us(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Fh(e){try{const t=JSON.parse(e);return _i(t)||yi(t)?t:void 0}catch{return}}const RN=Hk,fe=$,Jc="sentryReplaySession",qk="replay_event",Yc="Unable to send Replay",Gk=3e5,Vk=9e5,Jk=5e3,Yk=5500,Kk=6e4,Xk=5e3,Qk=3,nd=15e4,Uo=5e3,Zk=3e3,eR=300,Kc=2e7,tR=4999,nR=5e4,rd=36e5;var rR=Object.defineProperty,oR=(e,t,n)=>t in e?rR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,od=(e,t,n)=>oR(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 sR(e){return e.nodeType===e.ELEMENT_NODE}function $r(e){return e?.host?.shadowRoot===e}function Ur(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function iR(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 aR(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 Fs(e){try{const t=e.rules||e.cssRules;return t?iR(Array.from(t,$h).join("")):null}catch{return null}}function cR(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 $h(e){let t;if(lR(e))try{t=Fs(e.styleSheet)||aR(e)}catch{}else if(dR(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=cR(e)),r&&(n=uR(n)),r||o)return n}return t||e.cssText}function uR(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function lR(e){return"styleSheet"in e}function dR(e){return"selectorText"in e}let Uh=class{constructor(){od(this,"idNodeMap",new Map),od(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 fR(){return new Uh}function Si({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 qr({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function pr(e){return e.toLowerCase()}function Oa(e){return e.toUpperCase()}const sd="__rrweb_original__";function pR(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=sd in s?s[sd]: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 Xc(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?pr(t):null}function $s(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Bh(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 id={};function Hh(e){const t=id[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 id[e]=r.bind(window)}function Pa(...e){return Hh("setTimeout")(...e)}
494function Wh(...e){return Hh("clearTimeout")(...e)}function jh(e){try{return e.contentDocument}catch{}}let hR=1;const mR=new RegExp("[^a-z0-9-_:]"),Gr=-2;function Qc(){return hR++}function gR(e){if(e instanceof HTMLFormElement)return"form";const t=pr(e.tagName);return mR.test(t)?"div":t}function _R(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let qn,ad;const yR=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,SR=/^(?:[a-z+]+:)?\/\//i,bR=/^www\..*/i,ER=/^(data:)([^,]*),(.*)/i;function TR(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 Us(e,t){return(e||"").replace(yR,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(SR.test(c)||bR.test(c))return`url(${u}${c}${u})`;if(ER.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${_R(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 vR=/^[^ \t\n\r\u000c]+/,IR=/^[, \t\n\r\u000c]+/;function wR(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(;
494r(IR),!(n>=t.length);){let s=r(vR);if(s.slice(-1)===",")s=Yn(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=Yn(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 cd=new WeakMap;function Yn(e,t){return!t||t.trim()===""?t:bi(e,t)}function kR(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function bi(e,t){let n=cd.get(e);if(n||(n=e.createElement("a"),cd.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function zh(e,t,n,r,o,s,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Yn(e,r);if(n==="xlink:href"&&r[0]!=="#")return Yn(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Yn(e,r);if(n==="srcset")return wR(e,r);if(n==="style"){let a=Us(r,bi(e));return i&&i.size>0&&(a=TR(a,i)),a}else if(t==="object"&&n==="data")return Yn(e,r);return typeof s=="function"?s(n,r,o):r}function qh(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function RR(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 CR(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function En(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:En(e.parentNode,t,n,r+1)}function Kn(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(CR(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function hr(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=En(i,Kn(r,o)),c<0)return!0;a=En(i,Kn(t,n),c>=0?c:1/0)}else{if(a=En(i,Kn(t,n)),a<0)return!1;c=En(i,Kn(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function AR(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=Pa(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Wh(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Pa(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function xR(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const s=Pa(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Wh(s),r=!0,t()})}function MR(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={},inlineImages:S,recordCanvas:M,keepIframeSrcFn:v,newlyAddedElement:L=!1,ignoreCSSAttributes:N}=t,b=NR(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 PR(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 OR(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 NR(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function OR(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=Fs(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}f=Us(f,bi(t.doc))}h&&(f="SCRIPT_PLACEHOLDER");const _=hr(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=Si({type:null,tagName:l,maskInputOptions:c});f=qr({isMasked:hr(e,r,s,o,i,y),element:e,value:f,maskInputFn:u})}return{type:Ie.Text,textContent:f||"",isStyle:p,rootId:d}}function PR(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=RR(e,r,o,s),N=gR(e);let b={};const x=e.attributes.length;for(let E=0;E<x;E++){const O=e.attributes[E];O.name&&!qh(N,O.name,O.value)&&(b[O.name]=zh(n,N,pr(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=Fs(E)),O&&(b.rel=null,b.href=null,b.crossorigin=null,b._cssText=Us(O,E.href))}if(N==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Fs(e.sheet);E&&(b._cssText=Us(E,bi(n)))}if(N==="input"||N==="textarea"||N==="select"||N==="option"){const E=e,O=Xc(E),R=$s(E,Oa(N),O),P=E.checked;if(O!=="submit"&&O!=="button"&&R){const D=hr(E,_,S,y,M,Si({type:O,tagName:Oa(N),maskInputOptions:a}));b.value=qr({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")pR(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){qn||(qn=n.createElement("canvas"),ad=qn.getContext("2d"));const E=e,O=E.currentSrc||E.getAttribute("src")||"<unknown-src>",R=E.crossOrigin,P=()=>{E.removeEventListener("load",P);
494try{qn.width=E.naturalWidth,qn.height=E.naturalHeight,ad.drawImage(E,0,0),b.rr_dataURL=qn.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"))};E.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&&!jh(e)&&(b.rr_src=b.src),delete b.src);let H;try{customElements.get(N)&&(H=!0)}catch{}return{type:Ie.Element,tagName:N,attributes:b,childNodes:[],isSVG:kR(e)||void 0,needBlock:L,rootId:m,isCustom:H}}function de(e){return e==null?"":e.toLowerCase()}function LR(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"&&Bh(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 Xn(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:H,onStylesheetLoad:E,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:P=!1,ignoreCSSAttributes:D}=t;let{preserveWhiteSpace:ee=!0}=t;const K=MR(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):LR(K,S)||!ee&&K.type===Ie.Text&&!K.isStyle&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?ne=Gr:ne=Qc();const T=Object.assign(K,{id:ne});if(r.add(e,T),ne===Gr)return null;N&&N(e);let z=!f;if(T.type===Ie.Element){z=z&&!T.needBlock;const k=e.shadowRoot;k&&Ur(k)&&(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 k={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:H,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:R,ignoreCSSAttributes:D},V=e.childNodes?Array.from(e.childNodes):[];for(const se of V){const re=Xn(se,k);re&&T.childNodes.push(re)}if(sR(e)&&e.shadowRoot)for(const se of Array.from(e.shadowRoot.childNodes)){const re=Xn(se,k);re&&(Ur(e.shadowRoot)&&(re.isShadow=!0),T.childNodes.push(re))}}if(e.parentNode&&$r(e.parentNode)&&Ur(e.parentNode)&&(T.isShadow=!0),T.type===Ie.Element&&T.tagName==="iframe"&&!T.needBlock&&AR(e,()=>{const k=jh(e);if(k&&b){const V=Xn(k,{doc:k,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 k=e,V=()=>
494{if(k.isConnected&&!k.complete&&H)try{const se=k.getBoundingClientRect();se.width>0&&se.height>0&&H(k,T,se)}catch{}k.removeEventListener("load",V)};k.isConnected&&k.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"&&Bh(T.attributes.href)==="css")&&xR(e,()=>{if(E){const k=Xn(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});k&&E(e,k)}},O),T.type===Ie.Element&&delete T.needBlock,T}function DR(e,t){const{mirror:n=new Uh,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:H,stylesheetLoadTimeout:E,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:R=new Set([])}=t||{};return Xn(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:H,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 Gn=`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 ud={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&&(ud=new Proxy(ud,{get(e,t,n){return t==="map"&&console.error(Gn),Reflect.get(e,t,n)}}));function Vr(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&&(jR(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=Ei(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function Gh(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Ei(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>Gh(e,t,s||{},!0)}function Zc(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 Bs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Bs=()=>new Date().getTime());function Vh(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 Jh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Yh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Kh(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=Kh(e);if(!s)return!1;const i=Kn(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=En(s,i);let c=-1;return a<0?!1:(r&&(c=En(s,Kn(null,r))),a>-1&&c<0?!0:a<c)}function FR(e,t){return t.getId(e)!==-1}function Xi(e,t){return t.getId(e)===Gr}function Xh(e,t){if($r(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Xh(e.parentNode,t):!0:!0}function La(e){return!!e.changedTouches}function $R(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 Qh(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Zh(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Da(e){return!!e?.shadowRoot}class UR{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 em(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function BR(e){let t=e,n;for(;n=em(t);)t=n;return t}function HR(e){const t=e.ownerDocument;if(!t)return!1;const n=BR(e);return t.contains(n)}function tm(e){const t=e.ownerDocument;return t?t.contains(e)||HR(e):!1}const ld={};function eu(e){const t=ld[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 ld[e]=r.bind(window)}function WR(...e){return eu("requestAnimationFrame")(...e)}function Ei(...e){return eu("setTimeout")(...e)}function jR(...e){return eu("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||{}),Vn=(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))(Vn||{});function tu(e){try{return e.contentDocument}catch{}}function zR(e){try{return e.contentWindow}catch{}}function dd(e){return"__ln"in e}class qR{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&&dd(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&&dd(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 fd=(e,t)=>`${e}@${t}`;class GR{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 qR,o=c=>{let u=c,d=Gr;for(;d===Gr;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},s=c=>{if(!c.parentNode||!tm(c))return;const u=$r(c.parentNode)?this.mirror.getId(em(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);const l=Xn(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=>{Qh(f,this.mirror)&&!Ve(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),Zh(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Da(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());
vendor: 4,729 bytes, line 496
496for(const c of this.movedSet)pd(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!hd(this.droppedSet,c)&&!pd(this.removes,c,this.mirror)||hd(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(!Xi(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:hr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Kh(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=Xc(n),a=n.tagName;o=$s(n,a,i);const c=Si({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=hr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=qr({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(!tu(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"),!qh(n.tagName,r)&&(s.attributes[r]=zh(this.doc,pr(n.tagName),pr(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}case"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=$r(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Xi(n,this.mirror)||!FR(n,this.mirror)||(this.addedSet.has(n)?(Fa(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Xh(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[fd(r,o)]?Fa(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:$r(t.target)&&Ur(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(Xi(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[fd(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.forEac
496h(r=>this.genAdds(r)),Da(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 Fa(e,t){e.delete(t),t.childNodes?.forEach(n=>Fa(e,n))}function pd(e,t,n){return e.length===0?!1:VR(e,t,n)}function VR(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 hd(e,t){return e.size===0?!1:nm(e,t)}function nm(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:nm(e,n):!1}let Br;function JR(e){Br=e}function YR(){Br=void 0}const te=e=>Br?(...n)=>{try{return e(...n)}catch(r){if(Br&&Br(r)===!0)return()=>{};throw r}}:e,Qn=[];function yo(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 rm(e,t){const n=new GR;Qn.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 KR({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=Vr(te(l=>{const f=Date.now()-a;e(i.map(p=>(p.timeOffset-=f,p)),l),i=[],a=null}),s),u=te(Vr(te(l=>{const f=yo(l),{clientX:p,clientY:h}=La(l)?l.changedTouches[0]:l;a||(a=Bs()),i.push({x:p,y:h,id:r.getId(f),timeOffset:Bs()-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 XR({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=yo(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 La(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 _=La(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).forEach(l=>{let f=pr(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 om({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=te(Vr(te(c=>{const u=yo(c);if(!u||Ve(u,r,o,s,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=Vh(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 QR({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=te(Vr(te(()=>{const s=Jh(),i=Yh();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return $e("resize",o,t)}const ZR=["INPUT","TEXTAREA","SELECT"],md=new WeakMap;function eC({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTr
496iggeredOnInput:l,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function _(b){let x=yo(b);const H=b.isTrusted,E=x&&Oa(x.tagName);if(E==="OPTION"&&(x=x.parentElement),!x||!E||ZR.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=Xc(x);let P=$s(O,E,R),D=!1;const ee=Si({maskInputOptions:c,tagName:E,type:R}),K=hr(x,f,h,p,m,ee);(R==="radio"||R==="checkbox")&&(D=x.checked),P=qr({isMasked:K,element:x,value:P,maskInputFn:u}),y(x,l?{text:P,isChecked:D,userTriggered:H}:{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=qr({isMasked:K,element:T,value:$s(T,E,R),maskInputFn:u});y(T,l?{text:z,isChecked:!D,userTriggered:!1}:{text:z,isChecked:!D})}})}function y(b,x){const H=md.get(b);if(!H||H.text!==x.text||H.isChecked!==x.isChecked){md.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=>Gh(b[0],b[1],{set(){te(_)({target:this,isTrusted:!1})}},!1,v))),te(()=>{M.forEach(b=>b())})}function Hs(e){const t=[];function n(r,o){if(Bo("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Bo("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Bo("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Bo("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 tC({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);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),d.apply(l,f)})}));const c={};Ho("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Ho("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Ho("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Ho("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:[...Hs(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:[...Hs(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).forEac
496h(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function sm({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 nC({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:Hs(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:Hs(c.parentRule)}),a.apply(c,u)})}),te(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function rC({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=te(u=>Vr(te(d=>{const l=yo(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(Vn.Play),i),$e("pause",a(Vn.Pause),i),$e("seeked",a(Vn.Seeked),i),$e("volumechange",a(Vn.VolumeChange),i),$e("ratechange",a(Vn.RateChange),i)];return te(()=>{c.forEach(u=>u())})}function oC({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=Zc(t.fonts,"add",function(a){return function(c){return Ei(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 sC(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 iC({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Zc(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function aC(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=rm(e,e.doc));const o=KR(e),s=XR(e),i=om(e),a=QR(e,{win:n}),c=eC(e),u=rC(e);let d=()=>{},l=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(d=tC(e,{win:n}),l=sm(e,e.doc),f=nC(e,{win:n}),e.collectFonts&&(p=oC(e)));const h=sC(e),m=iC(e),_=[];for(const y of e.plugins)_.push(y.observer(y.callback,n,y.options));return te(()=>{Qn.forEach(y=>y.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),d(),l(),f(),p(),h(),m(),_.forEach(y=>y())})}function Bo(e){return typeof window[e]<"u"}function Ho(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class $a{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 cC{constructor(){this.crossOriginIframeMirror=new $a(Qc),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class uC{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new $a(Qc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new $a(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=tu(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 lC{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class dC{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(!Ur(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=rm({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(om({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Ei(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(sm({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=tu(t),r=zR(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Zc(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);
496return this.shadowRoot&&tm(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var gd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Wo=0;Wo<gd.length;Wo++)fC[gd.charCodeAt(Wo)]=Wo;class _d{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class pC{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new UR,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:$h(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 hC{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,WR(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let ye,Ws;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=fR();function At(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:H,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:k,onMutation:V,getCanvasManager:se}=e;JR(k);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()=>{};H!==void 0&&b.mousemove===void 0&&(b.mousemove=H),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||{};$R();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=Bs(),Qn[0]?.isFrozen()&&Q.type!==J.FullSnapshot&&!(Q.type===J.IncrementalSnapshot&&Q.data.source===W.Mutation)&&Qn.forEach(Me=>Me.unfreeze()),re)t?.(ft(Q),ze);else if(ve){const Me={type:"rrweb",event:ft(Q),origin:window.location.origin,isCheckout:ze};window.parent.postMessage(Me,"*")}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 Me=r&&Ue>=r,oe=n&&De&&Q.timestamp-De.timestamp>n;(Me||oe)&&pt(!0)}};const Ut=X=>{ye({type:J.IncrementalSnapshot,data:{source:W.Mutation,...X}})},kr=X=>ye({type:J.IncrementalSnapshot,data:{source:W.Scroll,...X}}),Co=X=>ye({type:J.IncrementalSnapshot,data:{source:W.CanvasMutation,...X}}),Rr=X=>ye({type:J.IncrementalSnapshot,data:{source:W.AdoptedStyleSheet,...X}}),ie=new pC({mutationCb:Ut,adoptedStyleSheetCb:Rr}),ge=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new cC:new uC({mirror:ot,mutationCb:Ut,stylesheetManager:ie,recordCrossOriginIframes:R,wrappedEmit:ye});for(const X of ne||[])X.getMirror&&X.getMirror({nodeMirror:ot,crossOriginIframeMirror:ge.crossOriginIframeMirror,crossOriginIframeStyleMirror:ge.crossOriginIframeStyleMirror});const Xe=new hC,xe=gC(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:k}),Oe=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new lC:new dC({mutationCb:Ut,scrollCb:kr,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:ge,stylesheetManager:ie,canvasManager:xe,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:Yh(),height:Jh()}},X),ie.reset(),Oe.init(),Qn.forEach(Q=>Q.lock());const ze=DR(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=>{Qh(Q,ot)&&ge.addIframe(Q),Zh(Q,ot)&&ie.trackLinkElement(Q),Da(Q)&&Oe.addShadowRoot(Q.shadowRoot,document)},onIframeLoad:(Q,Me)=>{ge.attachIframe(Q,Me),Q.contentWindow&&xe.addWindow(Q.contentWindow),Oe.observeAttachShadow(Q)},onStylesheetLoad:(Q,Me)=>{ie.attachLinkElement(Q,Me)},onBlockedImageLoad:(Q,Me,{width:oe,height:Cr})=>{Ut({adds:[],removes:[],texts:[],attributes:[{id:Me.id,attributes:{style:{width:`${oe}px`,height:`${Cr}px`}}}]})},keepIframeSrcFn:T,ignoreCSSAttributes:z});if(!ze)return console.warn("Failed to snapshot the document");ye({type:J.FullSnapshot,data:{node:ze,initialOffset:Vh(window)}}),Qn.forEach(Q=>Q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,ot.getId(document))};Ws=pt;try{const X=[],ze=Me=>te(aC)({onMutation:V,mutationCb:Ut,mousemoveCb:(oe,Cr)=>ye({type:J.IncrementalSnapshot,data:{source:Cr,positions:oe}}),mouseInteractionCb:oe=>ye({type:J.IncrementalSnapshot,data:{source:W.MouseInteraction,...oe}}),scrollCb:kr,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:Co,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:Me,maskAttributeFn:S,maskInputFn:M,maskTextFn:v,keepIframeSrcFn:T,blockSelector:s,unblockSelector:i,slimDOMOptions:$t,dataURLOptions:x,mirror:ot,iframeManager:ge,stylesheetManager:ie,shadowDomManager:Oe,processedNodeManager:Xe,canvasManager:xe,ignoreCSSAttributes:z,plugins:ne?.filter(oe=>oe.observer)?.map(oe=>({observer:oe.observer,options:oe.options,callback:Cr=>ye({type:J.Plugin,data:{plugin:oe.name,payload:Cr}})}))||[]},{});ge.addLoadListener(Me=>{try{X.push(ze(Me.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(Me=>Me()),Xe.destroy(),Ws=void 0,YR()}}catch(X){console.warn(X)}}function mC(e){if(!Ws)throw new Error("please take full snapshot after start recording");Ws(e)}At.mirror=ot;At.takeFullSnapshot=mC;function gC(e,t){try{return e?e(t):new _d}catch{return console.warn("Unable to initialize CanvasManager"),new _d}}var yd;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(yd||(yd={}));const _C=3,yC=5;function nu(e){return e>9999999999?e:e*1e3}function Qi(e){return e>9999999999?e/1e3:e}function So(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 SC="button,a";function im(e){return e.closest(SC)||e}function am(e){const t=cm(e);return!t||!(t instanceof Element)?t:im(t)}function cm(e){return bC(e)?e.target:e}function bC(e){return typeof e=="object"&&!!e&&"target"in e}let jt;function EC(e){return jt||(jt=[],TC()),jt.push(e),()=>{const t=jt?jt.indexOf(e):-1;t>-1&&jt.splice(t,1)}}function TC(){Ne(fe,"open",function(e){return function(...t){if(jt)try{jt.forEach(n=>n())}catch{}return e.apply(fe,t)}})}
496const vC=new Set([W.Mutation,W.StyleSheetRule,W.StyleDeclaration,W.AdoptedStyleSheet,W.CanvasMutation,W.Selection,W.MediaInteraction]);function IC(e,t,n){e.handleClick(t,n)}class wC{constructor(t,n,r=So){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=EC(()=>{this._lastMutation=Sd()});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(RC(n,this._ignoreSelector)||!CC(t))return;const r={timestamp:Qi(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=Qi(t)}registerScroll(t=Date.now()){this._lastScroll=Qi(t)}registerClick(t){const n=im(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=Sd();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=_o(()=>this._checkClicks(),1e3)}}const kC=["A","BUTTON","INPUT"];function RC(e,t){return!!(!kC.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 CC(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Sd(){return Date.now()/1e3}function AC(e,t){try{if(!xC(t))return;const{source:n}=t.data;if(vC.has(n)&&e.registerMutation(t.timestamp),n===W.Scroll&&e.registerScroll(t.timestamp),MC(t)){const{type:r,id:o}=t.data,s=At.mirror.getNode(o);s instanceof HTMLElement&&r===Fe.Click&&e.registerClick(s)}}catch{}}function xC(e){return e.type===_C}function MC(e){return e.data.source===W.MouseInteraction}function mt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ru=(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))(ru||{});const NC=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function OC(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(NC.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const PC=e=>t=>{if(!e.isEnabled())return;const n=LC(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&&IC(e.clickDetector,n,am(t.event)),So(e,n)};function um(e,t){const n=At.mirror.getId(e),r=n&&At.mirror.getNode(n),o=r&&At.mirror.getMeta(r),s=o&&FC(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===ru.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:OC(s.attributes)}}:{}}}function LC(e){const{target:t,message:n}=DC(e);return mt({category:`ui.${e.name}`,...um(t,n)})}function DC(e){const t=e.name==="click";let n,r=null;try{r=t?am(e.event):cm(e.event),n=je(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function FC(e){return e.type===ru.Element}function $C(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=UC(t);n&&So(e,n)}function UC(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||BC(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=um(i,u);return mt({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function BC(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const HC={resource:GC,paint:zC,navigation:qC};function Zi(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function WC(e){return e.map(jC).filter(Boolean)}function jC(e){const t=HC[e.entryType];return t?t(e):null}function mr(e){return((Pe()||fe.performance.timeOrigin)+e)/1e3}function zC(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=mr(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function qC(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:mr(p),end:mr(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 GC(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:mr(s),end:mr(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function VC(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return ou(e,"largest-contentful-paint",n)}function JC(e){return e.sources!==void 0}function YC(e){const t=[],n=[];for(const r of e.entries)if(JC(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=At.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return ou(e,"cumulative-layout-shift",n,t)}function KC(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return ou(e,"interaction-to-next-paint",n)}function ou(e,t,n,r){const o=e.value,s=e.rating,i=mr(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(a=>At.mirror.getId(a)):void 0,attributions:r}}}function XC(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(Fn(o,n))}),r.push(jc(Zi(VC,e)),Wc(Zi(YC,e)),_h(Zi(KC,e))),()=>{r.forEach(o=>o())}}const U=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,QC='
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 ZC(){const e=new Blob([QC]);return URL.createObjectURL(e)}const bd=["log","warn","error"],ls="[Replay] ";function ea(e,t="info"){Et({category:"console",data:{logger:"replay"},level:t,message:`${ls}${e}`},{level:t})}function eA(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return U?(bd.forEach(r=>{n[r]=(...o)=>{g[r](ls,...o),t&&ea(o.join(""),ks(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),g.error(ls,r),e?me(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&ea(r,"error")},n.infoTick=(...r)=>{g.log(ls,...r),t&&setTimeout(()=>ea(r[0]),0)}):bd.forEach(r=>{n[r]=()=>{}}),n}const B=eA();class su extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Kc}.`)}}class lm{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>Kc)throw new su;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?nu(t):null}}class tA{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():(U&&B.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{U&&B.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){U&&B.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){U&&B.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 nA{constructor(t){this._worker=new tA(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=nu(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Kc?Promise.reject(new su):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{U&&B.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 rA{constructor(t){this._fallback=new lm,this._compression=new nA(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()}
496ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){U&&B.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){U&&B.exception(s,"Failed to add events when switching buffers.")}}}function oA({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=sA(t);if(n)return n}return U&&B.log("Using simple buffer"),new lm}function sA(e){try{const t=e||iA();if(!t)return;U&&B.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new rA(n)}catch(t){U&&B.exception(t,"Failed to create compression worker")}}function iA(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?ZC():""}function iu(){try{return"sessionStorage"in fe&&!!fe.sessionStorage}catch{return!1}}function aA(e){cA(),e.session=void 0}function cA(){if(iu())try{fe.sessionStorage.removeItem(Jc)}catch{}}function dm(e){return e===void 0?!1:Math.random()<e}function Ti(e){if(iu())try{fe.sessionStorage.setItem(Jc,JSON.stringify(e))}catch{}}function fm(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 uA(e,t){return dm(e)?"session":t?"buffer":!1}function Ed({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=uA(e,t),s=fm({sampled:o,previousSessionId:r});return n&&Ti(s),s}function lA(){if(!iu())return null;try{const e=fe.sessionStorage.getItem(Jc);if(!e)return null;const t=JSON.parse(e);return U&&B.infoTick("Loading existing session"),fm(t)}catch{return null}}function Ua(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function pm(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ua(e.started,t,r)||Ua(e.lastActivity,n,r)}function hm(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!pm(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ta({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&lA();return o?hm(o,{sessionIdleExpire:e,maxReplayDuration:t})?(U&&B.infoTick("Session in sessionStorage is expired, creating new one..."),Ed(r,{previousSessionId:o.id})):o:(U&&B.infoTick("Creating new session"),Ed(r,{previousSessionId:n}))}function dA(e){return e.type===J.Custom}function au(e,t,n){return gm(e,t)?(mm(e,t,n),!0):!1}function fA(e,t,n){return gm(e,t)?mm(e,t,n):Promise.resolve(null)}async function mm(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=pA(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){const i=s&&s instanceof su,a=i?"addEventSizeExceeded":"addEvent",c=C();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 gm(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=nu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(U&&B.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function pA(e,t){try{if(typeof t=="function"&&dA(e))return t(e)}catch(n){return U&&B.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function cu(e){return!e.type}function Ba(e){return e.type==="transaction"}function hA(e){return e.type==="replay_event"}function Td(e){return e.type==="feedback"}function mA(e){return(t,n)=>{if(!e.isEnabled()||!cu(t)&&!Ba(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Ba(t)){gA(e,t);return}_A(e,t)}}}function gA(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function _A(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)||_o(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function yA(e){return t=>{!e.isEnabled()||!cu(t)||SA(e,t)}}function SA(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:$n()}});So(e,r)}}function bA(e){const t=C();t&&t.on("beforeAddBreadcrumb",n=>EA(e,n))}function EA(e,t){if(!e.isEnabled()||!_m(t))return;const n=TA(t);n&&So(e,n)}function TA(e){return!_m(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?vA(e):mt(e)}function vA(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;
496if(typeof o=="string")return o.length>Uo?(n=!0,`${o.slice(0,Uo)}…`):o;if(typeof o=="object")try{const s=Ge(o,7);return JSON.stringify(s).length>Uo?(n=!0,`${JSON.stringify(s,null,2).slice(0,Uo)}…`):s}catch{}return o});return mt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function _m(e){return!!e.category}function IA(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function ym(){const e=j().getPropagationContext().dsc;e&&delete e.replay_id;const t=Te();if(t){const n=lt(t);delete n.replay_id}}function wA(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 kA(e,t){return e.recordingMode!=="buffer"||t.message===Yc||!t.exception||t.type?!1:dm(e.getOptions().errorSampleRate)}function RA(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(hA(t))return delete t.breadcrumbs,t;if(!cu(t)&&!Ba(t)&&!Td(t))return t;if(!e.checkAndHandleExpiredSession())return ym(),t;if(Td(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),wA(e,t),t;if(IA(t,n)&&!e.getOptions()._experiments.captureExceptions)return U&&B.log("Ignoring error from rrweb internals",t),null;const o=kA(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&&Ti(i)}return t},{id:"Replay"})}function vi(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 CA(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 AA(e){return t=>{if(!e.isEnabled())return;const n=CA(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(vi(e,[n]),!1)))}}function xA(e,t){return U&&e.getOptions()._experiments.traceInternals?!1:_p(t,C())}function Sm(e,t){e.isEnabled()&&t!==null&&(xA(e,t.name)||e.addUpdate(()=>(vi(e,[t]),!0)))}function Ii(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=Ih(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function bm(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function js(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 Em(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 Jr(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}=MA(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Ha(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 MA(e){if(!e||typeof e!="string")return{body:e};const t=e.length>nd,n=NA(e);if(t){const r=e.slice(0,nd);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 NA(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function zs(e,t){const n=OA(e);return ct(n,t)}function OA(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 PA(e,t,n){try{const r=await DA(e,t,n),o=Em("resource.fetch",r);Sm(n.replay,o)}catch(r){U&&B.exception(r,"Failed to capture fetch breadcrumb")}}function LA(e,t){const{input:n,response:r}=t,o=n?Vc(n):void 0,s=Ii(o),i=r?bm(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 DA(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=zs(i,n.networkDetailAllowUrls)&&!zs(i,n.networkDetailDenyUrls),f=l?FA(n,t.input,u):Jr(u),p=await $A(l,n,t.response,d);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:f,response:p}}function FA({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?HA(n,t):{};if(!e)return Yt(o,r,void 0);const s=Vc(n),[i,a]=Ds(s,B),c=Yt(o,r,i);return a?js(c,a):c}async function $A(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return Jr(o);const s=r?Tm(r.headers,n):{};if(!r||!t&&o!==void 0)return Yt(s,o,void 0);const[i,a]=await BA(r),c=UA(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?js(c,a):c}function UA(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?Ii(e):n;return r?t?Yt(o,s,e):Yt(o,s,void 0):Jr(s)}catch(s){return U&&B.exception(s,"Failed to serialize response body"),Yt(o,n,void 0)}}async function BA(e){const t=WA(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await jA(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(U&&B.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(U&&B.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function Tm(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}
496function HA(e,t){return e.length===1&&typeof e[0]!="string"?vd(e[0],t):e.length===2?vd(e[1],t):{}}function vd(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Tm(n,t):Array.isArray(n)?{}:Ha(n,t):{}}function WA(e){try{return e.clone()}catch(t){U&&B.exception(t,"Failed to clone response body")}}function jA(e){return new Promise((t,n)=>{const r=_o(()=>n(new Error("Timeout while trying to read response body")),500);zA(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function zA(e){return await e.text()}async function qA(e,t,n){try{const r=VA(e,t,n),o=Em("resource.xhr",r);Sm(n.replay,o)}catch(r){U&&B.exception(r,"Failed to capture xhr breadcrumb")}}function GA(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Ii(r),s=n.getResponseHeader("content-length")?bm(n.getResponseHeader("content-length")):KA(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function VA(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||!zs(c,n.networkDetailAllowUrls)||zs(c,n.networkDetailDenyUrls)){const N=Jr(l),b=Jr(f);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:N,response:b}}const p=a[kt],h=p?Ha(p.request_headers,n.networkRequestHeaders):{},m=Ha(wh(a),n.networkResponseHeaders),[_,y]=n.networkCaptureBodies?Ds(i,B):[void 0],[S,M]=n.networkCaptureBodies?JA(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?js(v,y):v,response:M?js(L,M):L}}function JA(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return YA(e.response,e.responseType)}catch(n){t.push(n)}return U&&B.warn("Failed to get xhr response body",...t),[void 0]}function YA(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 U&&B.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return U&&B.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function KA(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Ii(n)}catch{return}}function XA(e){const t=C();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)=>QA(a,c,u))}catch{}}function QA(e,t,n){if(t.data)try{ZA(t)&&t1(n)&&(GA(t,n),qA(t,n,e)),e1(t)&&n1(n)&&(LA(t,n),PA(t,n,e))}catch(r){U&&B.exception(r,"Error when enriching network breadcrumb")}}function ZA(e){return e.category==="xhr"}function e1(e){return e.category==="fetch"}function t1(e){return e?.xhr}function n1(e){return e?.response}function r1(e){const t=C();vh(PC(e)),gi(AA(e)),bA(e),XA(e);const n=RA(e);Iy(n),t&&(t.on("beforeSendEvent",yA(e)),t.on("afterSendEvent",mA(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 o1(e){try{return Promise.all(vi(e,[s1(fe.performance.memory)]))}catch{return[]}}function s1(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 i1(e,t,n){return ES(e,t,{...n,setTimeoutImpl:_o})}const jo=$.navigator;function a1(){return/iPhone|iPad|iPod/i.test(jo?.userAgent??"")||/Macintosh/i.test(jo?.userAgent??"")&&jo?.maxTouchPoints&&jo?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function c1(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){U&&B.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,e.clickDetector&&AC(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!au(e,n,o))return!0;
496if(!o)return!1;const s=e.session;if(l1(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(U&&B.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&Ti(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function u1(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 l1(e,t){!t||!e.session||e.session.segmentId!==0||au(e,u1(e),!1)}function d1(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function f1(e,t,n,r){return dt(Gf(e,Qs(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function p1({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 h1({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 Kf(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 m1({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=p1({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=C(),f=j(),p=l?.getTransport(),h=l?.getDsn();if(!l||!p||!h||!s.sampled)return Promise.resolve({});const m={type:qk,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 h1({scope:f,client:l,replayId:t,event:m});if(!_)return l.recordDroppedEvent("event_processor","replay"),U&&B.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete _.sdkProcessingMetadata;const y=f1(_,i,h,l.getOptions().tunnel);let S;try{S=await p.send(y)}catch(v){const L=new Error(Yc);try{L.cause=v}catch{}throw L}const M=cp({},S);if(ap(M,"replay"))throw new uu(M);if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new vm(S.statusCode);return S}class vm extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class uu extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class Id extends Error{constructor(){super("Session is too long, not sending replay")}}async function Im(e,t={count:0,interval:Xk}){const{recordingData:n,onError:r}=e;if(n.length)try{return await m1(e),!0}catch(o){if(o instanceof vm||o instanceof uu)throw o;if(Xf("Replays",{_retryCount:t.count}),r&&r(o),t.count>=Qk){const s=new Error(`${Yc} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{_o(async()=>{try{await Im(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const wm="__THROTTLED",g1="__SKIPPED";function _1(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?g1:wm}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class y1{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Gk,sessionIdleExpire:Vk},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=i1(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=_1((i,a)=>fA(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(Zk,r),timeout:r,scrollTimeout:eR,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new wC(this,s)),U){const i=t._experiments;B.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=>{$C(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){U&&B.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){U&&B.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",U&&B.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){U&&B.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){U&&B.log("Buffering is in progress, call `flush()` to save the replay");return}U&&B.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ta({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){U&&B.log("Buffering is in progress, call `flush()` to save the replay");return}U&&B.infoTick("Starting replay in buffer mode");const t=ta({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=At({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:Kk}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:c1(this),...a1(),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{U&&B.log(`Stopping Replay${n?` triggered by ${n}`:""}`),ym(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,aA(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),U&&B.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),U&&B.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();U&&B.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&&Ua(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===wm){const o=mt({category:"replay.throttled"});this.addUpdate(()=>!au(this,{type:yC,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=oA({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=ta({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 hm(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||(r1(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=XC(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||pm(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()){U&&B.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=WC(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(vi(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){U&&B.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await o1(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Id;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await Im({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=C();if(r){let o;n instanceof uu?o="ratelimit_backoff":n instanceof Id?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){U&&B.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){U&&B.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&&U&&B.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&&Ti(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=d1(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 Mr(e,t){return[...e,...t].join(",")}function S1({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=Mr(e,[".sentry-mask","[data-sentry-mask]"]),a=Mr(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:Mr(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:Mr(r,[]),ignoreSelector:Mr(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function b1({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 wd='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',E1=["content-length","content-type","accept"],T1=Symbol.for("sentry__originalRequestBody");let kd=!1,Rd=!1;function v1(){if(typeof Request>"u"||Rd)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[T1]=r.body),o};t.prototype=e.prototype,$.Request=t,Rd=!0}catch{}}const AN=(e=>new I1(e));class I1{constructor({flushMinDelay:t=Jk,flushMaxDelay:n=Yk,minReplayDuration:r=tR,maxReplayDuration:o=rd,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:H=[],ignore:E=[],maskFn:O,beforeAddRecordingEvent:R,beforeErrorSampling:P,onError:D,attachRawBodyFromRequest:ee=!1}={}){this.name="Replay";const K=S1({mask:L,unmask:b,block:x,unblock:H,ignore:E});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:O,maskInputFn:O,maskAttributeFn:(ne,T,z)=>b1({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,nR),maxReplayDuration:Math.min(o,rd),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:Cd(M),networkResponseHeaders:Cd(v),beforeAddRecordingEvent:R,beforeErrorSampling:P,onError:D,attachRawBodyFromRequest:ee,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${wd}`:wd,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&As())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return kd}set _isInitialized(t){kd=t}afterAllSetup(t){!As()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&v1(),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=w1(this._initialOptions,t);this._replay=new y1({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function w1(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=Cn(n.replaysSessionSampleRate),s=Cn(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 Cd(e){return[...E1,...e.map(t=>t.toLowerCase())]}function xN(){return C()?.getIntegrationByName("Replay")}var k1=Object.defineProperty,R1=(e,t,n)=>t in e?k1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ad=(e,t,n)=>R1(e,typeof t!="symbol"?t+"":t,n);class C1{constructor(){Ad(this,"idNodeMap",new Map),Ad(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 A1(){return new C1}function x1(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Wa(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Wa(e.parentNode,t,n,r+1)}function xd(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(x1(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Jn=`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 Md={map:{},getId(){return console.error(Jn),-1},getNode(){return console.error(Jn),null},removeNodeFromMap(){console.error(Jn)},has(){return console.error(Jn),!1},reset(){console.error(Jn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Md=new Proxy(Md,{get(e,t,n){return t==="map"&&console.error(Jn),Reflect.get(e,t,n)}}));function lu(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Rm(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>lu(e,t,s||{},!0)}function du(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 M1(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function wi(e,t,n,r,o){if(!e)return!1;const s=M1(e);if(!s)return!1;const i=xd(t,n),a=Wa(s,i);let c=-1;return a<0?!1:(r&&(c=Wa(s,xd(null,r))),a>-1&&c<0?!0:a<c)}const Nd={};function km(e){const t=Nd[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 Nd[e]=r.bind(window)}function gn(...e){return km("requestAnimationFrame")(...e)}
vendor: 4,276 bytes, line 499
499function Rm(...e){return km("setTimeout")(...e)}var gr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(gr||{});let ds;function N1(e){ds=e}const na=e=>ds?(...n)=>{try{return e(...n)}catch(r){if(ds&&ds(r)===!0)return()=>{};throw r}}:e;var Zn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var zo=0;zo<Zn.length;zo++)O1[Zn.charCodeAt(zo)]=zo;var P1=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Zn[t[n]>>2],o+=Zn[(t[n]&3)<<4|t[n+1]>>4],o+=Zn[(t[n+1]&15)<<2|t[n+2]>>6],o+=Zn[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 Od=new Map;function L1(e,t){let n=Od.get(e);return n||(n=new Map,Od.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const Cm=(e,t,n)=>{if(!e||!(xm(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=L1(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function fs(e,t,n){if(e instanceof Array)return e.map(r=>fs(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=P1(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[fs(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:[fs(e.data,t,n),e.width,e.height]};if(xm(e,t)||typeof e=="object"){const r=e.constructor.name,o=Cm(e,t,n);return{rr_type:r,index:o}}}}return e}const Am=(e,t,n)=>e.map(r=>fs(r,t,n)),xm=(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 D1(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=du(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return wi(this.canvas,n,r,o,!0)||Rm(()=>{const l=Am(d,t,this);e(this.canvas,{type:gr["2D"],property:a,args:l})},0),u.apply(this,d)}});s.push(c)}catch{const c=lu(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:gr["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function F1(e){return e==="experimental-webgl"?"webgl":e}function Pd(e,t,n,r,o){const s=[];try{const i=du(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!wi(this,t,n,r,!0)){const d=F1(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 Ld(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=du(e,d,function(f){return function(...p){const h=f.apply(this,p);if(Cm(h,a,this),"tagName"in this.canvas&&!wi(this.canvas,r,o,s,!0)){const m=Am(p,a,this),_={type:t,property:d,args:m};n(this.canvas,_)}return h}});c.push(l)}catch{const l=lu(e,d,{set(f){n(this.canvas,{type:t,property:d,args:[f],setter:!0})}});c.push(l)}return c}function $1(e,t,n,r,o,s){const i=[];return i.push(...Ld(t.WebGLRenderingContext.prototype,gr.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Ld(t.WebGL2RenderingContext.prototype,gr.WebGL2,e,n,r,o,s,t)),()=>
499{i.forEach(a=>a())}}const U1='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 B1(){const e=new Blob([U1]);return URL.createObjectURL(e)}class H1{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&&N1(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&na(()=>{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}na(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=Pd(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}gn(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(B1());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:gr["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=gn(n)};t=gn(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=Pd(t,n,r,o,!1),i=D1(this.processMutation.bind(this),t,n,r,o),a=$1(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=>{wi(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(_=>{na(()=>{throw this.snapshotInProgressMap.delete(m),_})()})}}),!0)}startPendingCanvasMutationFlusher(){gn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,gn(t)};gn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),gn(()=>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)}A1();var Dd;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Dd||(Dd={}));const Fd={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}}},W1="ReplayCanvas",qo=1280,j1=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,qo):qo,n?Math.min(n,qo):qo]};let o,s;const i=new Promise(a=>s=a);return{name:W1,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:d=>{const l=new H1({...d,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:f=>{try{typeof f=="object"&&(f.__rrweb__=!0)}catch{}}});return o=l,s(l),l},...Fd[a]||Fd.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}}),MN=j1;function z1(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function Mm(e){try{return new URL(e,A.location.origin).href}catch{return}}function q1(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Nm(e){try{return new Headers(e)}catch{return}}const $d=new WeakMap,ra=new Map,Om={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function G1(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...Om,...t},d=typeof s=="function"?s:h=>!0,l=h=>V1(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 _=ra.get(m.span_id);_&&(m.timestamp=_/1e3,ra.delete(m.span_id))}}),h)),o&&ZT(h=>{if(h.response){const m=$d.get(h.response);m&&h.endTimestamp&&ra.set(m,h.endTimestamp)}}),Mc(h=>{const m=Fb(h,d,l,f,{propagateTraceparent:p,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&$d.set(h.response,h.fetchData.__span),m){const _=Mm(h.fetchData.url),y=_?kn(_).host:void 0;m.setAttributes({"http.url":_?Vt(_):void 0,"server.address":y}),i&&Ud(m),c?.(m,{headers:h.headers})}})),r&&Gc(h=>{const m=J1(h,d,l,f,p,u);m&&(i&&Ud(m),c?.(m,{headers:Nm(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}function Ud(e){const{url:t}=F(e).data;if(!t||typeof t!="string")return;const n=Fn("resource",({entries:r})=>{r.forEach(o=>{q1(o)&&o.name.endsWith(t)&&(e.setAttributes(Th(o)),setTimeout(n))})})}function V1(e,t){const n=$n();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 J1(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&&(_s(S,a.status_code),S.end(),s?.(S,{headers:Nm(wh(i)),error:e.error}),delete r[y]);return}const l=Mm(c),f=kn(l||c),p=Vt(gp(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)&&Y1(i,tt()&&h?m:void 0,o);const _=C();return _&&_.emit("beforeOutgoingRequestSpan",m,e),m}function Y1(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=Sp({span:t,propagateTraceparent:n});r&&K1(e,r,o,s)}function K1(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||!z1(s))&&e.setRequestHeader("baggage",n)}}catch{}}function X1(){A.document?A.document.addEventListener("visibilitychange",()=>{const e=Te();if(!e)return;const t=Se(e);if(A.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 Q1=3600,Pm="sentry_previous_trace",Z1="sentry.previous_trace";function ex(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?rx():void 0;e.on("spanStart",i=>{if(Se(i)!==i)return;const a=j().getPropagationContext();o=tx(o,i,a),r&&nx(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(ja(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=ja(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[kf]:o.sampleRate}})}function tx(e,t,n){const r=F(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[ec])}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<=Q1&&(I&&g.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:i,attributes:{[Qg]:"previous_trace"}}),t.setAttribute(Z1,`${i.traceId}-${i.spanId}-${ja(i)?1:0}`)),s)}function nx(e){try{A.sessionStorage.setItem(Pm,JSON.stringify(e))}catch(t){I&&g.warn("Could not store previous trace in sessionStorage",t)}}function rx(){try{const e=A.sessionStorage?.getItem(Pm);return JSON.parse(e)}catch{return}}function ja(e){return e.traceFlags===1}const ox="BrowserTracing",sx={...Xo,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:{},...Om},bo=((e={})=>{const t={name:void 0,source:void 0},n=A.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:H,consistentTraceSampling:E,enableReportPageLoaded:O,onRequestSpanStart:R,onRequestSpanEnd:P}={...sx,...e};let D,ee,K;function ne(T,z,k=!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),!k){const De=Un();ut({...re,startTime:De}).end(De);return}t.name=re.name,t.source=ve[ae];const Le=Jf(re,{idleTimeout:l,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:V,beforeSpanEnd:De=>{D?.(),k0(De,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:v,ignorePerformanceApiSpans:L}),Wd(T,void 0);const Ue=j(),ft=Ue.getPropagationContext();Ue.setPropagationContext({...ft,traceId:Le.spanContext().traceId,sampled:dn(Le),dsc:lt(De)}),V&&(K=void 0)},trimIdleSpanEndTimestamp:!O});V&&O&&(K=Le),Wd(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:ox,setup(T){if(v_(),D=S0({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:T}),r&&Q0(),o&&$0(),i&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?E0():s&&b0(),a&&T0(),x&&n){const k=()=>{ee=he()};addEventListener("click",k,{capture:!0}),addEventListener("keydown",k,{capture:!0,passive:!0})}function z(){const k=Yr(T);k&&!F(k).timestamp&&(I&&g.log(`[Tracing] Finishing current active span with op: ${F(k).op}`),k.setAttribute(Wr,"cancelled"),k.end())}T.on("startNavigationSpan",(k,V)=>{if(C()!==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",...k},!1);return}ee=void 0,z(),we().setPropagationContext({traceId:yt(),sampleRand:Math.random(),propagationSpanId:tt()?void 0:Ct()});const se=j();se.setPropagationContext({traceId:yt(),sampleRand:Math.random(),propagationSpanId:tt()?void 0:Ct()}),se.setSDKProcessingMetadata({normalizedRequest:void 0}),ne(T,{op:"navigation",...k,parentSpan:null,forceTransaction:!0})}),T.on("startPageLoadSpan",(k,V={})=>{if(C()!==T)return;z();const se=V.sentryTrace||Bd("sentry-trace")||Hd("sentry-trace"),re=V.baggage||Bd("baggage")||Hd("baggage"),ve=Lf(se,re),Le=j();Le.setPropagationContext(ve),tt()||(Le.getPropagationContext().propagationSpanId=Ct()),Le.setSDKProcessingMetadata({normalizedRequest:Fc()}),ne(T,{op:"pageload",...k})}),T.on("endPageloadSpan",()=>{O&&K&&(K.setAttribute(Wr,"reportPageLoaded"),K.end())})},afterAllSetup(T){let z=$n();if(H!=="off"&&ex(T,{linkPreviousTrace:H,consistentTraceSampling:E}),A.location){if(N){const k=Pe();Eo(T,{name:A.location.pathname,startTime:k?k/1e3:void 0,attributes:{[ae]:"url",[G]:"auto.pageload.browser"}})}b&&gi(({to:k,from:V})=>{if(V===void 0&&z?.indexOf(k)!==-1){z=void 0;return}z=void 0;const se=Sc(k),re=Yr(T),ve=re&&x&&ax(re,ee);To(T,{name:se?.pathname||A.location.pathname,attributes:{[ae]:"url",[G]:"auto.navigation.browser"}},{url:k,isRedirect:ve})})}h&&X1(),a&&ix(T,l,f,p,t),r&&tw(),G1(T,{traceFetch:m,traceXHR:_,trackFetchStreamPerformance:y,tracePropagationTargets:T.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:S,enableHTTPTimings:M,onRequestSpanStart:R,onRequestSpanEnd:P})}}});function Eo(e,t,n){e.emit("startPageLoadSpan",t,n),j().setTransactionName(t.name);const r=Yr(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function To(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:{...Fc(),url:r}}),Yr(e)}function Bd(e){return A.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Hd(e){return A.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function ix(e,t,n,r,o){const s=A.document;let i;const a=()=>{const c="ui.action.click",u=Yr(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(Wr,"interactionInterrupted"),i.end(),i=void 0),!o.name){I&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=Jf({name:o.name,op:c,attributes:{[ae]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}const Lm="_sentry_idleSpan";function Yr(e){return e[Lm]}function Wd(e,t){Ee(e,Lm,t)}const jd=1.5;function ax(e,t){const n=F(e),r=Un(),o=n.start_timestamp;return!(r-o>jd||t&&r-t<=jd)}function NN(e=C()){e?.emit("endPageloadSpan")}function ON(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 _r(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function cx(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=_r(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function fu(e){return _r(e.getAllKeys())}function ux(e,t,n){return e(r=>fu(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),_r(r.transaction)}))}function lx(e,t,n){return e(r=>fu(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),_r(r.transaction)}))}function dx(e){return e(t=>fu(t).then(n=>{const r=n[0];if(r!=null)return _r(t.get(r)).then(o=>(t.delete(r),_r(t.transaction).then(()=>o)))}))}function fx(e){let t;function n(){return t==null&&(t=cx(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=await Es(r);await ux(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=await Es(r);await lx(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await dx(n());if(r)return P_(r)}catch{}}}}function px(e){return t=>{const n=e({...t,createStore:fx});return A.addEventListener("online",async r=>{await n.flush()}),n}}function PN(e=kh){return px(uS(e))}const zd=1e6,hx="window"in $&&$.window===$&&typeof importScripts>"u",Kt=String(0),qs=hx?"main":"worker",Gs=A.navigator;let Dm="",Fm="",$m="",za=Gs?.userAgent||"",Um="";const mx=Gs?.language||Gs?.languages?.[0]||"";function gx(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const qd=Gs?.userAgentData;gx(qd)&&qd.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Dm=e.platform||"",$m=e.architecture||"",Um=e.model||"",Fm=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];za=`${t.brand} ${t.version}`}}).catch(e=>{});function _x(e){return!("thread_metadata"in e)}function yx(e){return _x(e)?Ix(e):e}function Sx(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 bx(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=Sx(r),s=yx(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||Xs,runtime:{name:"javascript",version:A.navigator.userAgent},os:{name:Dm,version:Fm,build_number:za},device:{locale:mx,model:Um,manufacturer:za,architecture:$m,is_emulator:!1},debug_meta:{images:Hm(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 Ex(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=vx(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:Hm(e.resources)},profile:r}}function Tx(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 vx(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:qs}}}}function Bm(e){return F(e).op==="pageload"}function Ix(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Kt]:{name:qs}}},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)*zd).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)*zd).toFixed(0),stack_id:n,thread_id:Kt};r.stacks[n]=f,r.samples[d]=p,n++}),r}function wx(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function kx(e){const t=[];return An(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 Hm(e){const r=C()?.getOptions()?.stackParser;return r?oy(r,e):[]}function Wm(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 Rx(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 pu=!1;const jm=3e4;function Cx(e){return typeof e=="function"}function zm(){const e=A.Profiler;if(!Cx(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(jm/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.")),pu=!0}}function Gd(e){if(pu)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=C()?.getOptions();if(!n)return I&&g.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return Wm(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 Ax(e){if(pu)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 Wm(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 Go(e){return typeof e.profilesSampleRate<"u"}function xx(e,t,n,r){return Rx(n)?bx(e,t,n,r):null}const Tn=new Map;function Mx(){return Tn.size}function Nx(e){const t=Tn.get(e);return t&&Tn.delete(e),t}function Ox(e,t){if(Tn.set(e,t),Tn.size>30){const n=Tn.keys().next().value;n!==void 0&&Tn.delete(n)}}function Px(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace={...e.contexts?.trace??{},data:{...e.contexts?.trace?.data??{},"thread.id":Kt,"thread.name":qs}},e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Kt,"thread.name":qs}})),e}function Vd(e){let t;Bm(e)&&(t=he()*1e3);const n=zm();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&&(A.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,Ox(r,u)}).catch(u=>{I&&g.log("[Profiling] error while stopping profiler:",u)})}}let i=A.setTimeout(()=>{I&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",F(e).description),s()},jm);const a=e.end.bind(e);function c(){return e?(s().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const Lx=6e4,Dx=3e5;class Fx{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=Ax(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)}
499start(){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),er().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"&&er().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,er().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),Dx);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=zm();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()}},Lx))}_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=Ex(n,this._client,this._profilerId),o=Tx(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=Qs(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 $x="BrowserProfiling",Ux=(()=>({name:$x,setup(e){const t=e.getOptions(),n=new Fx;if(!Go(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Go(t)&&!t.profilesSampleRate){I&&g.log("[Profiling] Profiling disabled, no profiling options foun
499d.");return}const r=Te(),o=r&&Se(r);if(Go(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."),Go(t))o&&Bm(o)&&Gd(o)&&Vd(o),e.on("spanStart",s=>{s===Se(s)&&Gd(s)&&Vd(s)}),e.on("beforeEnvelope",s=>{if(!Mx())return;const i=kx(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=Nx(d);if(!f){I&&g.log(`[Profiling] Could not retrieve profile for span: ${d}`);continue}const p=xx(d,l,f,c);p&&a.push(p)}wx(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),A.setTimeout(()=>{const i=Te(),a=i&&Se(i);a&&n.notifyRootSpanActive(a)},0)}}},processEvent(e){return Px(e)}})),LN=Ux,DN=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Er(e)}});function FN(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{xn(e,t.value),Mn(e,t.value)}}}const $N=()=>({name:"OpenFeature",processEvent(e,t,n){return Er(e)}});class UN{after(t,n){xn(n.flagKey,n.value),Mn(n.flagKey,n.value)}error(t,n,r){xn(t.flagKey,t.defaultValue),Mn(t.flagKey,t.defaultValue)}}const BN=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Ne(t,"isEnabled",Bx)},processEvent(t,n,r){return Er(t)}});function Bx(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(xn(n,r),Mn(n,r)):I&&g.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const HN=(({growthbookClass:e})=>Ob({growthbookClass:e})),WN=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{xn(n.gate.name,n.gate.value),Mn(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Er(t)}});async function jN(){const e=C();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 Y_(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const Hx="WebWorker",zN=({worker:e})=>({name:Hx,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>Jd(t))},addWorker:t=>Jd(t)});function Jd(e){e.addEventListener("message",t=>{if(jx(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(I&&g.log("Sentry debugId web worker message received",t.data),A._sentryDebugIds={...t.data._sentryDebugIds,...A._sentryDebugIds}),t.data._sentryModuleMetadata&&(I&&g.log("Sentry module metadata web worker message received",t.data),A._sentryModuleMetadata={...t.data._sentryModuleMetadata,...A._sentryModuleMetadata}),t.data._sentryWasmImages){I&&g.log("Sentry WASM images web worker message received",t.data);const n=A._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>Ye(o)&&typeof o.code_file=="string"&&!n.some(s=>s.code_file===o.code_file));A._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(I&&g.log("Sentry worker rejection message received",t.data._sentryWorkerError),Wx(t.data._sentryWorkerError))}})}function Wx(e){const t=C();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,s=tn(o)?Ah(o):pi(n,o,void 0,r,!0);s.level="error",e.filename&&(s.contexts={...s.contexts,worker:{filename:e.filename}}),oo(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),I&&g.log("Captured worker unhandled rejection",o)}function qN({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:Ch(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 jx(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 GN(e){const t={...e};return yp(t,"react"),Xf("react",{version:Ae.version}),Sk(t)}function zx(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function qx(e,t){const n=new WeakSet;
499function 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 qm(e,{componentStack:t},n){if(zx(Ae.version)&&gt(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,qx(e,r)}return Ke(r=>(r.setContext("react",{componentStack:t}),me(e,n)))}function VN(e){return(t,n)=>{const r=!!e,o=qm(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const Gm="ui.react.render",Gx="ui.react.update",Vm="ui.react.mount",Vx={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Jx={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Yx={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Jm={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Kx=Symbol.for("react.forward_ref"),Ym=Symbol.for("react.memo");function Xx(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ym}const hu={};hu[Kx]=Yx;hu[Ym]=Jm;function Yd(e){if(Xx(e))return Jm;const t=e.$$typeof;return t&&hu[t]||Vx}const Qx=Object.defineProperty.bind(Object),Zx=Object.getOwnPropertyNames.bind(Object),Kd=Object.getOwnPropertySymbols?.bind(Object),Xd=Object.getOwnPropertyDescriptor.bind(Object),eM=Object.getPrototypeOf.bind(Object),Qd=Object.prototype;function vo(e,t,n){if(typeof t!="string"){if(Qd){const i=eM(t);i&&i!==Qd&&vo(e,i)}let r=Zx(t);Kd&&(r=r.concat(Kd(t)));const o=Yd(e),s=Yd(t);for(const i of r)if(!Jx[i]&&!s?.[i]&&!o?.[i]&&!Xd(e,i)){const a=Xd(t,i);if(a)try{Qx(e,i,a)}catch{}}}return e}const tM="unknown";class Km extends Ae.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=ut({name:`<${n}>`,onlyIfParent:!0,op:Vm,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=ar(this._mountSpan,()=>ut({name:`<${this.props.name}>`,onlyIfParent:!0,op:Gx,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;ar(this._mountSpan,()=>{const s=ut({onlyIfParent:!0,name:`<${n}>`,op:Gm,startTime:o,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(t)})}}render(){return this.props.children}}Object.assign(Km,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function JN(e,t){const n=t?.name||e.displayName||e.name||tM,r=o=>Ae.createElement(Km,{...t,name:n,updateProps:o},Ae.createElement(e,{...o}));return r.displayName=`profiler(${n})`,vo(r,e),r}function YN(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=Ae.useState(()=>{if(!t?.disabled)return ut({name:`<${e}>`,onlyIfParent:!0,op:Vm,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:Gm,startTime:r,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":e}});s&&s.end(o)}}),[])}const Re=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nM="unknown",oa={componentStack:null,error:null,eventId:null};class rM extends Ae.Component{constructor(t){super(t),this.state=oa,this._openFallbackReportDialog=!0;const n=C();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Zl({...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=qm(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,d),i&&(this._lastEventId=d,this._openFallbackReportDialog&&Zl({...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===oa?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(oa)}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&&Re&&g.warn("fallback did not produce a valid ReactElement"),null)}}function KN(e,t){const n=e.displayName||e.name||nM,r=Ae.memo(o=>Ae.createElement(rM,{...t},Ae.createElement(e,{...o})));return r.displayName=`errorBoundary(${n})`,vo(r,e),r}const oM="redux.action",sM="info",iM={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function XN(e){const t={...iM,...e};return n=>(r,o)=>{t.attachReduxState&&er().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:oM,data:f,type:sM});const p=t.stateTransformer(d);if(typeof p<"u"&&p!==null){const y=C()?.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 QN(e){const t=bo({...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&&A.location&&Zd(r,A.location,o,(c,u="url")=>{Eo(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")&&Zd(r,c,o,(u,d="url")=>{To(a,{name:u,attributes:{[pe]:"navigation",[G]:"auto.navigation.react.reactrouter_v3",[ae]:d}})})})}}}function Zd(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>
499{if(s||!a)return r(o);const c=aM(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function aM(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 ZN(e,t={}){const n=e,r=bo({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){r.afterAllSetup(i);const a=A.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;Eo(i,{name:d?d.routeId:a.pathname,attributes:{[pe]:"pageload",[G]:"auto.pageload.react.tanstack_router",[ae]:d?"route":"url",...ef(d)}})}s&&n.subscribe("onBeforeNavigate",c=>{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=A.location,p=To(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(ef(S)))}})})}}}function ef(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 eO(e){const t=bo({...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),Xm(a,s,i,n,"reactrouter_v4",r,o)}}}function tO(e){const t=bo({...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),Xm(a,s,i,n,"reactrouter_v5",r,o)}}}function Xm(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if(A.location)return A.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const d=Qm(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);Eo(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);To(e,{name:l,attributes:{[pe]:"navigation",[G]:`auto.navigation.react.${o}`,[ae]:f}})}})}function Qm(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:cM(t);return s&&(r.push({route:o,match:s}),o.routes&&Qm(o.routes,t,n,r)),!!s}),r}function cM(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function nO(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=uM();j().setTransactionName(o),s&&(s.updateName(o),s.setAttribute(ae,"route"))}return Ae.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,vo(n,e),n}function uM(){const e=Te(),t=e&&Se(e);if(!t)return;const n=F(t).op;return n==="navigation"||n==="pageload"?t:void 0}function Io(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)||"/"}const tf=new WeakMap;function lM(e,t,n){if(!e||!t||!t.length)return null;const r=n?Io(e,n):e;let o=tf.get(t);o||(o=gM(t),tf.set(t,o),Re&&g.log("[React Router] Sorted route manifest by specificity:",o.length,"patterns"));for(const s of o)if(dM(r,s))return Re&&g.log("[React Router] Matched pathname",r,"to pattern",s),s;return Re&&g.log("[React Router] No manifest match found for pathname:",r),null}function dM(e,t){if(t==="/")return e==="/"||e==="";const n=rf(e),r=rf(t);if(r.length>0&&r[r.length-1]==="*"){const s=r.slice(0,-1);if(n.length<s.length)return!1;for(const[i,a]of s.entries())if(!nf(n[i],a))return!1;return!0}if(n.length!==r.length)return!1;for(const[s,i]of r.entries())if(!nf(n[s],i))return!1;return!0}function nf(e,t){return e===void 0||t===void 0?!1:Zm.test(t)?!0:e===t}
499function rf(e){return e.split("/").filter(Boolean)}const Zm=/^:[\w-]+$/,fM=10,pM=3,hM=1,mM=-2;function of(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=mM);for(const r of t)r!=="*"&&(Zm.test(r)?n+=pM:r===""?n+=hM:n+=fM);return n}function gM(e){return[...e].sort((t,n)=>{const r=of(t);return of(n)-r})}let mu,Rn=!1;const Xt=[],_M=10;function yM(e,t){const n={};return Xt.length>=_M&&(Re&&g.warn("[React Router] Navigation context stack overflow - removing oldest context"),Xt.shift()),Xt.push({token:n,targetPath:e,span:t}),n}function SM(e){Xt[Xt.length-1]?.token===e&&Xt.pop()}function eg(){const e=Xt.length;return e>0?Xt[e-1]??null:null}function bM(e,t=!1){mu=e,Rn=t}function EM(e){return vM(e.route.path||"")}function TM(e){return e.params["*"]||""}function vM(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function rr(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function tg(e){return e.endsWith("*")}function on(e){return e.includes("/*")||e.endsWith("*")}function sf(e,t){return tg(e)&&!!t.route.children?.length||!1}function IM(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}function wM(e,t,n){const r=e&&e.length>0?e:Rn?Io(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 af(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function Vs(e){return e[0]==="/"?e:`/${e}`}function ng(e,t){const n=mu(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const o=EM(r),s=Io(t.pathname,Vs(r.pathnameBase));return t.pathname===s?rr(s):rr(rr(o||"")+Vs(ng(e.filter(i=>i!==r.route),{pathname:s})))}return""}function kM(e,t){const n=mu(t,e);if(n){for(const r of n)if(IM(r.route)&&TM(r))return!0}return!1}function cf(e,t){return Rn?Io(e.pathname,t):e.pathname||""}function RM(e,t,n,r=""){if(!e||e.length===0)return[Rn?Io(t.pathname,r):t.pathname,"url"];if(!n)return[cf(t,r),"url"];let o="";for(const s of n){const i=s.route;if(!i)continue;if(i.index)return wM(o,s.pathname,r);const a=i.path;if(!a||sf(a,s))continue;const c=a[0]==="/"||o[o.length-1]==="/"?a:`/${a}`;if(o=rr(o)+Vs(c),rr(t.pathname)===rr(r+s.pathname))return af(o)!==af(s.pathname)&&!tg(o)?[(Rn?"":r)+c,"route"]:(sf(o,s)&&(o=o.slice(0,-1)),[(Rn?"":r)+o,"route"])}return[cf(t,r),"url"]}function ki(e,t,n,r,o="",s,i){if(i&&s&&s.length>0){const d=lM(e.pathname,s,o);if(d)return[(Rn?"":o)+d,"route"]}let a,c="url";const u=kM(e,n);return u&&(a=Vs(ng(n,e)),c="route"),(!u||!a)&&([a,c]=RM(t,e,r,o)),[a||e.pathname,c]}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 CM(){const e=eg();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof A<"u")try{const t=A.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch{Re&&g.warn("[React Router] Could not access window.location")}return null}function AM(){const e=eg();return e?e.span:Tt()}function xM(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=CM(),u=AM(),d=s.apply(i,a);return MM(d,t,n,r,c,u),d}});return Ee(o,"__sentry_proxied__",!0),o}function MM(e,t,n,r,o,s){un(e)?e.then(i=>{Array.isArray(i)&&r(i,t,o??void 0,s)}).catch(i=>{Re&&g.warn(`Error resolving async handler '${n}' for route`,t,i)}):Array.isArray(e)&&r(e,t,o??void 0,s)}function Ri(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]=xM(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)Ri(n,t)}let Qt,Zt,en,ps,rt,hn=!1,vn=3e3,wo,gu="";const rg=new WeakSet,Sn=new WeakMap,Ce=new Set,hs=new WeakMap,qa=new WeakMap;function NM(e){return A?.requestAnimationFrame?A.requestAnimationFrame(e):setTimeout(e,0)}function uf(e){A?.cancelAnimationFrame?A.cancelAnimationFrame(e):clearTimeout(e)}function og(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function lf(e){return e.includes(":")||e.includes("*")}function OM(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&&lf(e.routeName),c=lf(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 sg(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 ig(e,t){let n=hs.get(e);n||(n=new Set,hs.set(e,n)),n.add(t),t.finally(()=>{const r=hs.get(e);r&&r.delete(t)})}function ag(e){const t=new Promise(n=>{qa.set(e,n)});ig(e,t)}function PM(e){const t=qa.get(e);t&&(t(),qa.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function _u(e,t,n=null,r){e.forEach(s=>{Ce.add(s),hn&&Ri(s,_u)}),t&&sg(e,t);const o=r??Tt();if(o){const s=F(o);if(s.timestamp){Re&&g.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const i=s.op;let a=n;if(!a&&!r&&typeof A<"u"){const c=A.location;c?.pathname&&(a={pathname:c.pathname})}a&&(i==="pageload"?Ro({activeRootSpan:o,location:{pathname:a.pathname},routes:Array.from(Ce),allRoutes:Array.from(Ce)}):i==="navigation"&&Ga(o,a,Array.from(Ce),!1,rt))}}function Ga(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]=ki(t,n,n,d||[],gu,wo,hn),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 cg(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=og(d.location),p=()=>{u!==f&&(u=f,c=null,yu({location:d.location,routes:t,navigationType:d.historyAction,version:n,base
499name:r,allRoutes:Array.from(Ce)}))};d.navigation.state!=="idle"?(u!==f&&(u=null),c!==null&&uf(c),c=NM(p)):(c!==null&&(uf(c),c=null),p())}})}function ug(e,t){return!Qt||!Zt||!en||!rt?(Re&&g.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(ko(n),hn)for(const u of n)Ri(u,_u);const o=Tt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(Ee(o,"__sentry_may_have_lazy_routes__",!0),ag(o));const i=pg(r,!1,o),a=e(n,i),c=r?.basename;return a.state.historyAction==="POP"&&o&&Ro({activeRootSpan:o,location:a.state.location,routes:n,basename:c,allRoutes:Array.from(Ce)}),gu=c||"",cg(a,n,t,c,o),a}}function lg(e,t){return!Qt||!Zt||!en||!rt?(Re&&g.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(ko(n),hn)for(const _ of n)Ri(_,_u);const o=Tt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(Ee(o,"__sentry_may_have_lazy_routes__",!0),ag(o));const i=pg(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&&Ro({activeRootSpan:m,location:h,routes:n,basename:c,allRoutes:Array.from(Ce)}),gu=c||"",cg(a,n,t,c,m),a}}function dg(e,t){const n=bo({...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,lazyRouteManifest:p}=e;return{...n,setup(h){n.setup(h);const m=e.finalTimeout??3e4,_=(e.idleTimeout??1e3)*3,y=f??_;y===1/0?(vn=m,Re&&g.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",m,"ms to prevent indefinite hangs")):Number.isNaN(y)?(Re&&g.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",_),vn=_):y<0?(Re&&g.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",y,"falling back to:",_),vn=_):vn=y,Qt=r,Zt=o,en=s,rt=a,ps=i,hn=u,wo=p,bM(a,c||!1)},afterAllSetup(h){n.afterAllSetup(h);const m=A.location?.pathname;d&&m&&Eo(h,{name:m,attributes:{[ae]:"url",[pe]:"pageload",[G]:`auto.pageload.react.reactrouter_v${t}`}}),l&&rg.add(h)}}}function fg(e,t){if(!Qt||!Zt||!en||!rt)return Re&&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?(ko(s),Ro({activeRootSpan:Tt(),location:l,routes:s,allRoutes:Array.from(Ce)}),o.current=!1):yu({location:l,routes:s,navigationType:u,version:t,allRoutes:Array.from(Ce)})},[u,d]),a};return(r,o)=>Ae.createElement(n,{routes:r,locationArg:o})}function pg(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(ko(l),u&&u.length>0){const h=u[u.length-1]?.route;if(h){const m=Array.from(Ce).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&&sg(l,m)}}const f=i?F(i):void 0;return s&&i&&f&&!f.timestamp&&f.op==="navigation"&&Ga(i,{pathname:s,search:"",hash:"",state:null,key:"default"},Array.from(Ce),!0,rt),c(d,l)})}const a=(async()=>{const c=yM(s,i);let u;try{u=await r(o)}finally{SM(c),i&&PM(i)}const d=i?F(i):void 0;if(i&&d&&!d.timestamp&&d.op==="navigation"){const l=s;l&&Ga(i,{pathname:l,search:"",hash:"",state:null,key:"default"},Array.from(Ce),!1,rt)}return u})();return i&&ig(i,a),a}}}function yu(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=C();if(!u||!rg.has(u))return;const d=Tt();
499if(!(d&&F(d).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[l,f]=ki(t,a||n,a||n,c,i,wo,hn),p=og(t),h=Sn.get(u),m=h&&!h.isPlaceholder?!!F(h.span).timestamp:!1,{skip:_,shouldUpdate:y}=OM(h,p,l,m);if(_){if(y&&h){const L=h.routeName;h.isPlaceholder?(h.routeName=l,Re&&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,Re&&g.log(`[Tracing] Updated navigation span name from "${L}" to "${l}"`))}else Re&&g.log(`[Tracing] Skipping duplicate navigation for location: ${p}`);return}const M={span:{end:()=>{}},routeName:l,pathname:t.pathname,locationKey:p,isPlaceholder:!0};Sn.set(u,M);let v;try{v=To(u,{name:M.routeName,attributes:{[ae]:f,[pe]:"navigation",[G]:`auto.navigation.react.reactrouter_v${o}`}})}catch(L){throw Sn.delete(u),L}v?(Sn.set(u,{span:v,routeName:M.routeName,pathname:t.pathname,locationKey:p}),Va(v,t,n,i,"navigation")):Sn.delete(u)}}function ko(e){e.forEach(t=>{hg(t).forEach(r=>{Ce.add(r)})})}function hg(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{hg(n,t).forEach(o=>{t.add(o)})})),t}function Ro({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]=ki(t,s||n,s||n,i,o,wo,hn);j().setTransactionName(a||"/"),e&&(e.updateName(a),e.setAttribute(ae,c),Va(e,t,n,o,"pageload"))}else e&&Va(e,t,n,o,"pageload")}function LM(e,t,n,r,o=!1){return n?!!(!e&&o||e&&on(e)&&r==="route"&&!on(n)||t!=="route"&&r==="route"):!1}function sa(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]=ki(r,d,d,l,s,wo,hn),h=LM(n,c,f,p,!0),m=i==="pageload"||!t.timestamp;h&&m&&(e.updateName(f),e.setAttribute(ae,p))}catch(c){Re&&g.warn(`Error updating span details before ending: ${c}`)}}function Va(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=C();if(v&&o==="navigation"){const L=Sn.get(v);L&&L.span===e&&Sn.delete(v)}},_=hs.get(e),y=e.__sentry_may_have_lazy_routes__;if((_&&_.size>0||y)&&p&&(on(p)||h!=="route")){if(vn===0){sa(e,f,p,t,n,r,o,Ce),m(),a(l);return}const v=new Promise(N=>setTimeout(N,vn));let L;if(_&&_.size>0){const N=Promise.allSettled(_).then(()=>{});L=vn===1/0?N:Promise.race([N,v])}else L=v;L.then(()=>{const N=F(e);sa(e,N,N.description,t,n,r,o,Ce),m(),a(l)}).catch(()=>{m(),a(l)});return}sa(e,f,p,t,n,r,o,Ce),m(),a(l)},Ee(e,s,!0)}function mg(e,t){if(!Qt||!Zt||!en||!ps||!rt)return Re&&g.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
500      useEffect: ${Qt}. useLocation: ${Zt}. useNavigationType: ${en}.
501      createRoutesFromChildren: ${ps}. matchRoutes: ${rt}.`),e;const n=r=>{const o=Ae.useRef(!0),s=Zt(),i=en();return Qt(()=>{const a=ps(r.children);o.current?(ko(a),Ro({activeRootSpan:Tt(),location:s,routes:a,allRoutes:Array.from(Ce)}),o.current=!1):yu({location:s,routes:a,navigationType:i,version:t,allRoutes:Array.from(Ce)})},[s,i]),Ae.createElement(e,{...r})};return vo(n,e),n}function rO(e){return dg(e,"6")}function oO(e){return fg(e,"6")}function sO(e){return ug(e,"6")}function iO(e){return lg(e,"6")}function aO(e){return mg(e,"6")}function cO(e){return dg(e,"7")}function uO(e){return mg(e,"7")}function lO(e){return ug(e,"7")}function dO(e){return lg(e,"7")}function fO(e){return fg(e,"7")}export{FI as BrowserClient,rM as ErrorBoundary,$i as MULTIPLEXED_TRANSPORT_EXTRA_KEY,UN as OpenFeatureIntegrationHook,Km as Profiler,Gt as SDK_VERSION,pe as SEMANTIC_ATTRIBUTE_SENTRY_OP,G as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,ec as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,ae as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,bt as Scope,A as WINDOW,Et as addBreadcrumb,Iy as addEventProcessor,Ju as addIntegration,Mw as breadcrumbsIntegration,Ww as browserApiErrorsIntegration,LN as browserProfilingIntegration,Jw as browserSessionIntegration,bo as browserTracingIntegration,FN as buildLaunchDarklyFlagUsedHandler,XM as captureConsoleIntegration,oo as captureEvent,me as captureException,jb as captureFeedback,Ey as captureMessage,qm as captureReactException,qu as captureSession,mw as chromeStackLineParser,VM as close,sN as consoleLoggingIntegration,kN as contextLinesIntegration,BM as continueTrace,aN as createConsolaReporter,dN as createLangChainCallbackHandler,XN as createReduxEnhancer,Yy as createTransport,bN as createUserFeedbackEnvelope,Xw as cultureContextIntegration,GS as dedupeIntegration,Om as defaultRequestInstrumentationOptions,kw as defaultStackLineParsers,Rw as defaultStackParser,jN as diagnoseSdkConnectivity,Qf as endSession,CS as eventFiltersIntegration,NI as eventFromException,OI as eventFromMessage,$c as exceptionFromError,QM as extraErrorDataIntegration,rN as featureFlagsIntegration,hN as feedbackAsyncIntegration,mN as feedbackIntegration,mN as feedbackSyncIntegration,GM as flush,TN as forceLoad,wS as functionToStringIntegration,Sw as geckoStackLineParser,Te as getActiveSpan,C as getClient,j as getCurrentScope,yk as getDefaultIntegrations,pN as getFeedback,er as getGlobalScope,we as getIsolationScope,xN as getReplay,Se as getRootSpan,Yo as getSpanDescendants,t_ as getSpanStatusFromHttpCode,Sp as getTraceData,tk as globalHandlersIntegration,RN as graphqlClientIntegration,HN as growthbookIntegration,wN as httpClientIntegration,ik as httpContextIntegration,AS as inbou
501ndFiltersIntegration,GN as init,uN as instrumentAnthropicAiClient,lN as instrumentGoogleGenAIClient,fN as instrumentLangGraph,cN as instrumentOpenAiClient,G1 as instrumentOutgoingRequests,mb as instrumentSupabaseClient,vy as isEnabled,JM as isInitialized,Ty as lastEventId,DN as launchDarklyIntegration,II as lazyLoadIntegration,dk as linkedErrorsIntegration,oN as logger,PN as makeBrowserOfflineTransport,kh as makeFetchTransport,YM as makeMultiplexedTransport,iN as metrics,KM as moduleMetadataIntegration,vN as onLoad,$N as openFeatureIntegration,yN as opera10StackLineParser,SN as opera11StackLineParser,gS as parameterize,VN as reactErrorHandler,QN as reactRouterV3BrowserTracingIntegration,eO as reactRouterV4BrowserTracingIntegration,tO as reactRouterV5BrowserTracingIntegration,rO as reactRouterV6BrowserTracingIntegration,cO as reactRouterV7BrowserTracingIntegration,v_ as registerSpanErrorInstrumentation,qN as registerWebWorker,MN as replayCanvasIntegration,AN as replayIntegration,NN as reportPageLoaded,IN as reportingObserverIntegration,ZM as rewriteFramesIntegration,Cv as sendFeedback,ON as setActiveSpanInBrowser,Xf as setContext,aS as setCurrentClient,WM as setExtra,HM as setExtras,_s as setHttpStatus,z_ as setMeasurement,zM as setTag,jM as setTags,qM as setUser,Zl as showReportDialog,UM as spanToBaggageHeader,F as spanToJSON,y_ as spanToTraceHeader,EN as spotlightBrowserIntegration,To as startBrowserTracingNavigationSpan,Eo as startBrowserTracingPageLoadSpan,ut as startInactiveSpan,K_ as startNewTrace,zu as startSession,fn as startSpan,zt as startSpanManual,WN as statsigIntegration,eN as supabaseIntegration,Y_ as suppressTracing,ZN as tanstackRouterBrowserTracingIntegration,nN as thirdPartyErrorFilterIntegration,gN as uiProfiler,BN as unleashIntegration,$M as updateSpanName,YN as useProfiler,zN as webWorkerIntegration,_N as winjsStackLineParser,ar as withActiveSpan,KN as withErrorBoundary,FM as withIsolationScope,JN as withProfiler,Ke as withScope,aO as withSentryReactRouterV6Routing,uO as withSentryReactRouterV7Routing,nO as withSentryRouting,sO as wrapCreateBrowserRouterV6,lO as wrapCreateBrowserRouterV7,iO as wrapCreateMemoryRouterV6,dO as wrapCreateMemoryRouterV7,oO as wrapUseRoutesV6,fO as wrapUseRoutesV7,tN 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.