@chargebee/atomicpricing
Version:
JS wrapper for your Atomic Pricing hosted page
8 lines • 85.2 kB
JavaScript
(function(y,p){typeof exports=="object"&&typeof module!="undefined"?module.exports=p():typeof define=="function"&&define.amd?define(p):(y=typeof globalThis!="undefined"?globalThis:y||self,y["@chargebee/atomicpricing"]=p())})(this,function(){"use strict";var Wa=Object.defineProperty,Ya=Object.defineProperties;var Va=Object.getOwnPropertyDescriptors;var $e=Object.getOwnPropertySymbols;var er=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable;var Zn=(y,p,E)=>p in y?Wa(y,p,{enumerable:!0,configurable:!0,writable:!0,value:E}):y[p]=E,f=(y,p)=>{for(var E in p||(p={}))er.call(p,E)&&Zn(y,E,p[E]);if($e)for(var E of $e(p))tr.call(p,E)&&Zn(y,E,p[E]);return y},S=(y,p)=>Ya(y,Va(p));var nr=(y,p)=>{var E={};for(var m in y)er.call(y,m)&&p.indexOf(m)<0&&(E[m]=y[m]);if(y!=null&&$e)for(var m of $e(y))p.indexOf(m)<0&&tr.call(y,m)&&(E[m]=y[m]);return E};var Fe=(y,p,E)=>new Promise((m,V)=>{var te=k=>{try{re(E.next(k))}catch(C){V(C)}},ne=k=>{try{re(E.throw(k))}catch(C){V(C)}},re=k=>k.done?m(k.value):Promise.resolve(k.value).then(te,ne);re((E=E.apply(y,p)).next())});const y={THEME_UPDATED:"pricify.theme.updated",PAGE_LOAD:"pricify.hosted.page.load",DIMENSION:"pricify.hosted.page.dimension",SET_VISITOR:"pricify.hosted.page.setVisitor",SET_QUANTITY:"pricify.hosted.page.setQuantity",SET_BILLING_ADDRESS:"pricify.hosted.page.setBillingAddress",SET_SHIPPING_ADDRESS:"pricify.hosted.page.setShippingAddress",SET_BUSINESS_ENTITY:"pricify.hosted.page.setBusinessEntity",SET_PRICE_VARIANT:"pricify.hosted.page.setPriceVariant",SET_SUBSCRIPTION_ATTRIBUTES:"pricify.hosted.page.setSubscriptionAttributes"},p=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,E="9.30.0",m=globalThis;function V(){return te(m),m}function te(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||E,t[E]=t[E]||{}}function ne(e,t,n=m){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[E]=r[E]||{};return s[e]||(s[e]=t())}const re=Object.prototype.toString;function k(e){switch(re.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return G(e,Error)}}function C(e,t){return re.call(e)===`[object ${t}]`}function Et(e){return C(e,"ErrorEvent")}function St(e){return C(e,"DOMError")}function rr(e){return C(e,"DOMException")}function M(e){return C(e,"String")}function Ue(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Be(e){return e===null||Ue(e)||typeof e!="object"&&typeof e!="function"}function ue(e){return C(e,"Object")}function me(e){return typeof Event!="undefined"&&G(e,Event)}function sr(e){return typeof Element!="undefined"&&G(e,Element)}function ir(e){return C(e,"RegExp")}function ye(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function or(e){return ue(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function G(e,t){try{return e instanceof t}catch(n){return!1}}function It(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ar(e){return typeof Request!="undefined"&&G(e,Request)}const je=m,cr=80;function bt(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||cr;for(;n&&i++<r&&(u=ur(n,d),!(u==="html"||i>1&&o+s.length*c+u.length>=l));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch(n){return"<unknown>"}}function ur(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(je.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 s=t!=null&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s!=null&&s.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&M(o)){const a=o.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function He(){try{return je.document.location.href}catch(e){return""}}function fr(e){if(!je.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}const dr="Sentry Logger ",Ge=["debug","info","warn","error","log","assert","trace"],Ee={};function se(e){if(!("console"in m))return e();const t=m.console,n={},r=Object.keys(Ee);r.forEach(s=>{const i=Ee[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function lr(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return p?Ge.forEach(n=>{t[n]=(...r)=>{e&&se(()=>{m.console[n](`${dr}[${n}]:`,...r)})}}):Ge.forEach(n=>{t[n]=()=>{}}),t}const h=ne("logger",lr);function Se(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Tt(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{It(s)?n.push("[VueViewModel]"):n.push(String(s))}catch(i){n.push("[value cannot be serialized]")}}return n.join(t)}function pr(e,t,n=!1){return M(e)?ir(t)?t.test(e):M(t)?n?e===t:e.includes(t):!1:!1}function Ie(e,t=[],n=!1){return t.some(r=>pr(e,r,n))}function N(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&vt(s,r);try{e[t]=s}catch(i){p&&h.log(`Failed to replace method "${t}" in object`,e)}}function q(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(r){p&&h.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function vt(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,q(e,"__sentry_original__",t)}catch(n){}}function We(e){return e.__sentry_original__}function wt(e){if(k(e))return f({message:e.message,name:e.name,stack:e.stack},Pt(e));if(me(e)){const t=f({type:e.type,target:Rt(e.target),currentTarget:Rt(e.currentTarget)},Pt(e));return typeof CustomEvent!="undefined"&&G(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Rt(e){try{return sr(e)?bt(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function Pt(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 gr(e,t=40){const n=Object.keys(wt(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Se(r,t);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");if(!(i.length>t))return s===n.length?i:Se(i,t)}return""}function hr(){const e=m;return e.crypto||e.msCrypto}function A(e=hr()){let t=()=>Math.random()*16;try{if(e!=null&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e!=null&&e.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch(n){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function Nt(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function z(e){const{message:t,event_id:n}=e;if(t)return t;const r=Nt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ye(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function ie(e,t){const n=Nt(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism=f(f(f({},r),s),t),t&&"data"in t){const i=f(f({},s==null?void 0:s.data),t.data);n.mechanism.data=i}}function Dt(e){if(_r(e))return!0;try{q(e,"__sentry_captured__",!0)}catch(t){}return!1}function _r(e){try{return e.__sentry_captured__}catch(t){}}const At=1e3;function fe(){return Date.now()/At}function mr(){const{performance:e}=m;if(!(e!=null&&e.now))return fe;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/At}const $=mr();function yr(e){const t=$(),n={sid:A(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Sr(n)};return e&&oe(n,e),n}function oe(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||$(),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:A()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Er(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),oe(e,n)}function Sr(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 de(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r=f({},e);for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=de(r[s],t[s],n-1));return r}const Ve="_sentrySpan";function kt(e,t){t?q(e,Ve,t):delete e[Ve]}function Ot(e){return e[Ve]}function Ct(){return A()}function xt(){return A().substring(16)}const Ir=100;class x{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ct(),sampleRand:Math.random()}}clone(){const t=new x;return t._breadcrumbs=[...this._breadcrumbs],t._tags=f({},this._tags),t._extra=f({},this._extra),t._contexts=f({},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=f({},this._sdkProcessingMetadata),t._propagationContext=f({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,kt(t,Ot(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&&oe(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags=f(f({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=S(f({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=f(f({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=S(f({},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 x?n.getScopeData():ue(n)?t:void 0,{tags:s,extra:i,user:o,contexts:a,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags=f(f({},this._tags),s),this._extra=f(f({},this._extra),i),this._contexts=f(f({},this._contexts),a),o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,kt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ct(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var i;const r=typeof n=="number"?n:Ir;if(r<=0)return this;const s=S(f({timestamp:fe()},t),{message:t.message?Se(t.message,2048):t.message});return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(i=this._client)==null||i.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,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:Ot(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=de(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||A();if(!this._client)return h.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,S(f({originalException:t,syntheticException:s},n),{event_id:r}),this),r}captureMessage(t,n,r){const s=(r==null?void 0:r.event_id)||A();if(!this._client)return h.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,S(f({originalException:t,syntheticException:i},r),{event_id:s}),this),s}captureEvent(t,n){const r=(n==null?void 0:n.event_id)||A();return this._client?(this._client.captureEvent(t,S(f({},n),{event_id:r}),this),r):(h.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function br(){return ne("defaultCurrentScope",()=>new x)}function Tr(){return ne("defaultIsolationScope",()=>new x)}class vr{constructor(t,n){let r;t?r=t:r=new x;let s;n?s=n:s=new x,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return ye(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}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 ae(){const e=V(),t=te(e);return t.stack=t.stack||new vr(br(),Tr())}function wr(e){return ae().withScope(e)}function Rr(e,t){const n=ae();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Lt(e){return ae().withScope(()=>e(ae().getIsolationScope()))}function Pr(){return{withIsolationScope:Lt,withScope:wr,withSetScope:Rr,withSetIsolationScope:(e,t)=>Lt(t),getCurrentScope:()=>ae().getScope(),getIsolationScope:()=>ae().getIsolationScope()}}function qe(e){const t=te(e);return t.acs?t.acs:Pr()}function F(){const e=V();return qe(e).getCurrentScope()}function le(){const e=V();return qe(e).getIsolationScope()}function Nr(){return ne("globalScope",()=>new x)}function Dr(...e){const t=V(),n=qe(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function w(){return F().getClient()}function Ar(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||xt()};return r&&(i.parent_span_id=r),i}const kr="sentry.source",Or="sentry.sample_rate",Cr="sentry.previous_trace_sample_rate",xr="sentry.op",Lr="sentry.origin",Mt="sentry.profile_id",$t="sentry.exclusive_time",Mr=0,$r=1,Fr="_sentryScope",Ur="_sentryIsolationScope";function Ft(e){return{scope:e[Fr],isolationScope:e[Ur]}}function Br(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 jr="sentry-",Hr=/^sentry-/;function Gr(e){const t=Wr(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(Hr)){const o=s.slice(jr.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Wr(e){if(!(!e||!M(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Ut(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):Ut(e)}function Ut(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch(r){return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}const Bt=1;let jt=!1;function Yr(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:ze(e).parent_span_id,i=Ft(e).scope,o=r?(i==null?void 0:i.getPropagationContext().propagationSpanId)||xt():t;return{parent_span_id:s,span_id:o,trace_id:n}}function Vr(e){if(e&&e.length>0)return e.map(o=>{var a=o,{context:c}=a,u=c,{spanId:t,traceId:n,traceFlags:r}=u,s=nr(u,["spanId","traceId","traceFlags"]),{attributes:i}=a;return f({span_id:t,trace_id:n,sampled:r===Bt,attributes:i},s)})}function Ht(e){return typeof e=="number"?Gt(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Gt(e.getTime()):$()}function Gt(e){return e>9999999999?e/1e3:e}function ze(e){var r;if(zr(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(qr(e)){const{attributes:s,startTime:i,name:o,endTime:a,status:c,links:u}=e,d="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(r=e.parentSpanContext)==null?void 0:r.spanId:void 0;return{span_id:t,trace_id:n,data:s,description:o,parent_span_id:d,start_timestamp:Ht(i),timestamp:Ht(a)||void 0,status:Xr(c),op:s[xr],origin:s[Lr],links:Vr(u)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function qr(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function zr(e){return typeof e.getSpanJSON=="function"}function Kr(e){const{traceFlags:t}=e.spanContext();return t===Bt}function Xr(e){if(!(!e||e.code===Mr))return e.code===$r?"ok":e.message||"unknown_error"}const Jr="_sentryRootSpan";function Wt(e){return e[Jr]||e}function Yt(){jt||(se(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),jt=!0)}const Vt=50,K="?",qt=/\(error: (.*)\)/,zt=/captureMessage|captureException/;function Kt(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(`
`);for(let a=r;a<o.length;a++){const c=o[a];if(c.length>1024)continue;const u=qt.test(c)?c.replace(qt,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){i.push(l);break}}if(i.length>=Vt+s)break}}return Zr(i.slice(s))}}function Qr(e){return Array.isArray(e)?Kt(...e):e}function Zr(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(be(t).function||"")&&t.pop(),t.reverse(),zt.test(be(t).function||"")&&(t.pop(),zt.test(be(t).function||"")&&t.pop()),t.slice(0,Vt).map(n=>S(f({},n),{filename:n.filename||be(t).filename,function:n.function||K}))}function be(e){return e[e.length-1]||{}}const Ke="<anonymous>";function W(e){try{return!e||typeof e!="function"?Ke:e.name||Ke}catch(t){return Ke}}function Xt(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(r){return}}}const Te={},Jt={};function X(e,t){Te[e]=Te[e]||[],Te[e].push(t)}function J(e,t){if(!Jt[e]){Jt[e]=!0;try{t()}catch(n){p&&h.error(`Error while instrumenting ${e}`,n)}}}function O(e,t){const n=e&&Te[e];if(n)for(const r of n)try{r(t)}catch(s){p&&h.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${W(r)}
Error:`,s)}}let Xe=null;function es(e){const t="error";X(t,e),J(t,ts)}function ts(){Xe=m.onerror,m.onerror=function(e,t,n,r,s){return O("error",{column:r,error:s,line:n,msg:e,url:t}),Xe?Xe.apply(this,arguments):!1},m.onerror.__SENTRY_INSTRUMENTED__=!0}let Je=null;function ns(e){const t="unhandledrejection";X(t,e),J(t,rs)}function rs(){Je=m.onunhandledrejection,m.onunhandledrejection=function(e){return O("unhandledrejection",e),Je?Je.apply(this,arguments):!0},m.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ss(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=w())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const Qe="production",is=/^o(\d+)\./,os=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function as(e){return e==="http"||e==="https"}function ve(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function cs(e){const t=os.exec(e);if(!t){se(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",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 Qt({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function Qt(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function us(e){if(!p)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(h.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?as(r)?t&&isNaN(parseInt(t,10))?(h.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(h.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(h.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function fs(e){const t=e.match(is);return t==null?void 0:t[1]}function ds(e){const t=typeof e=="string"?cs(e):Qt(e);if(!(!t||!us(t)))return t}const ls="_frozenDsc";function Zt(e,t){const n=t.getOptions(),{publicKey:r,host:s}=t.getDsn()||{};let i;n.orgId?i=String(n.orgId):s&&(i=fs(s));const o={environment:n.environment||Qe,release:n.release,public_key:r,trace_id:e,org_id:i};return t.emit("createDsc",o),o}function ps(e,t){const n=t.getPropagationContext();return n.dsc||Zt(n.traceId,e)}function gs(e){var v,D,b,L;const t=w();if(!t)return{};const n=Wt(e),r=ze(n),s=r.data,i=n.spanContext().traceState,o=(D=(v=i==null?void 0:i.get("sentry.sample_rate"))!=null?v:s[Or])!=null?D:s[Cr];function a(H){return(typeof o=="number"||typeof o=="string")&&(H.sample_rate=`${o}`),H}const c=n[ls];if(c)return a(c);const u=i==null?void 0:i.get("sentry.dsc"),d=u&&Gr(u);if(d)return a(d);const l=Zt(e.spanContext().traceId,t),_=s[kr],g=r.description;return _!=="url"&&g&&(l.transaction=g),ss()&&(l.sampled=String(Kr(n)),l.sample_rand=(L=i==null?void 0:i.get("sentry.sample_rand"))!=null?L:(b=Ft(n).scope)==null?void 0:b.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function U(e,t=100,n=1/0){try{return Ze("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function en(e,t=3,n=100*1024){const r=U(e,t);return ys(r)>n?en(e,t-1,n):r}function Ze(e,t,n=1/0,r=1/0,s=Es()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=hs(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(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const g=u.toJSON();return Ze("",g,c-1,r,s)}catch(g){}const d=Array.isArray(t)?[]:{};let l=0;const _=wt(t);for(const g in _){if(!Object.prototype.hasOwnProperty.call(_,g))continue;if(l>=r){d[g]="[MaxProperties ~]";break}const v=_[g];d[g]=Ze(g,v,c-1,r,s),l++}return o(t),d}function hs(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global!="undefined"&&t===global)return"[Global]";if(typeof window!="undefined"&&t===window)return"[Window]";if(typeof document!="undefined"&&t===document)return"[Document]";if(It(t))return"[VueViewModel]";if(or(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${W(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=_s(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function _s(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function ms(e){return~-encodeURI(e).split(/%..|./).length}function ys(e){return ms(JSON.stringify(e))}function Es(){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 pe(e,t=[]){return[e,t]}function Ss(e,t){const[n,r]=e;return[n,[...r,t]]}function tn(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function et(e){const t=te(m);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Is(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[et(r),i]:r.push(typeof i=="string"?et(i):i)}for(const i of n){const[o,a]=i;if(s(`
${JSON.stringify(o)}
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch(u){c=JSON.stringify(U(a))}s(c)}}return typeof r=="string"?r:bs(r)}function bs(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Ts(e){const t=typeof e.data=="string"?et(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const vs={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function nn(e){return vs[e]}function rn(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function ws(e,t,n,r){var i;const s=(i=e.sdkProcessingMetadata)==null?void 0:i.dynamicSamplingContext;return f(f(f({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:ve(r)}),s&&{trace:s})}function Rs(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Ps(e,t,n,r){const s=rn(n),i=f(f({sent_at:new Date().toISOString()},s&&{sdk:s}),!!r&&t&&{dsn:ve(t)}),o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return pe(i,[o])}function Ns(e,t,n,r){const s=rn(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Rs(e,n==null?void 0:n.sdk);const o=ws(e,s,r,t);return delete e.sdkProcessingMetadata,pe(o,[[{type:i},e]])}var B;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(B||(B={}));function Q(e){return new Y(t=>{t(e)})}function we(e){return new Y((t,n)=>{n(e)})}class Y{constructor(t){this._state=B.PENDING,this._handlers=[],this._runExecutor(t)}then(t,n){return new Y((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Y((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===B.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===B.RESOLVED&&n[1](this._value),this._state===B.REJECTED&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===B.PENDING){if(ye(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(B.RESOLVED,i)},s=i=>{n(B.REJECTED,i)};try{t(r,s)}catch(i){s(i)}}}function tt(e,t,n,r=0){return new Y((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o(f({},t),n);p&&o.id&&a===null&&h.log(`Event processor "${o.id}" dropped event`),ye(a)?a.then(c=>tt(e,c,n,r+1).then(s)).then(null,i):tt(e,a,n,r+1).then(s).then(null,i)}})}let Re,sn,Pe;function Ds(e){const t=m._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Pe&&n.length===sn||(sn=n.length,Pe=n.reduce((r,s)=>{Re||(Re={});const i=Re[s];if(i)r[i[0]]=i[1];else{const o=e(s);for(let a=o.length-1;a>=0;a--){const c=o[a],u=c==null?void 0:c.filename,d=t[s];if(u&&d){r[u]=d,Re[s]=[u,d];break}}}return r},{})),Pe}function As(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;ks(e,t),r&&xs(e,r),Ls(e,n),Os(e,s),Cs(e,i)}function on(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:_,transactionName:g,span:v}=t;Ne(e,"extra",n),Ne(e,"tags",r),Ne(e,"user",s),Ne(e,"contexts",i),e.sdkProcessingMetadata=de(e.sdkProcessingMetadata,a,2),o&&(e.level=o),g&&(e.transactionName=g),v&&(e.span=v),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext=f(f({},e.propagationContext),_)}function Ne(e,t,n){e[t]=de(e[t],n,1)}function ks(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra=f(f({},n),e.extra)),Object.keys(r).length&&(e.tags=f(f({},r),e.tags)),Object.keys(s).length&&(e.user=f(f({},s),e.user)),Object.keys(i).length&&(e.contexts=f(f({},i),e.contexts)),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function Os(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Cs(e,t){e.sdkProcessingMetadata=f(f({},e.sdkProcessingMetadata),t)}function xs(e,t){e.contexts=f({trace:Yr(t)},e.contexts),e.sdkProcessingMetadata=f({dynamicSamplingContext:gs(t)},e.sdkProcessingMetadata);const n=Wt(t),r=ze(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Ls(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 Ms(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c=S(f({},t),{event_id:t.event_id||n.event_id||A(),timestamp:t.timestamp||fe()}),u=n.integrations||e.integrations.map(b=>b.name);$s(c,e),Bs(c,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&Fs(c,e.stackParser);const d=Hs(r,n.captureContext);n.mechanism&&ie(c,n.mechanism);const l=s?s.getEventProcessors():[],_=Nr().getScopeData();if(i){const b=i.getScopeData();on(_,b)}if(d){const b=d.getScopeData();on(_,b)}const g=[...n.attachments||[],..._.attachments];g.length&&(n.attachments=g),As(c,_);const v=[...l,..._.eventProcessors];return tt(v,c,n).then(b=>(b&&Us(b),typeof o=="number"&&o>0?js(b,o,a):b))}function $s(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;e.environment=e.environment||n||Qe,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o!=null&&o.url&&(o.url=Se(o.url,i))}function Fs(e,t){var r,s;const n=Ds(t);(s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(c=>{c.filename&&(c.debug_id=n[c.filename])})})}function Us(e){var r,s;const t={};if((s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(c=>{c.debug_id&&(c.abs_path?t[c.abs_path]=c.debug_id:c.filename&&(t[c.filename]=c.debug_id),delete c.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(([i,o])=>{n.push({type:"sourcemap",code_file:i,debug_id:o})})}function Bs(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function js(e,t,n){var s,i;if(!e)return null;const r=f(f(f(f(f({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>f(f({},o),o.data&&{data:U(o.data,t,n)}))}),e.user&&{user:U(e.user,t,n)}),e.contexts&&{contexts:U(e.contexts,t,n)}),e.extra&&{extra:U(e.extra,t,n)});return(s=e.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=U(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>f(f({},o),o.data&&{data:U(o.data,t,n)}))),(i=e.contexts)!=null&&i.flags&&r.contexts&&(r.contexts.flags=U(e.contexts.flags,3,n)),r}function Hs(e,t){if(!t)return e;const n=e?e.clone():new x;return n.update(t),n}function Gs(e){if(e)return Ws(e)?{captureContext:e}:Vs(e)?{captureContext:e}:e}function Ws(e){return e instanceof x||typeof e=="function"}const Ys=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Vs(e){return Object.keys(e).some(t=>Ys.includes(t))}function an(e,t){return F().captureException(e,Gs(t))}function qs(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return F().captureMessage(e,n,r)}function cn(e,t){return F().captureEvent(e,t)}function un(e){const t=le(),n=F(),{userAgent:r}=m.navigator||{},s=yr(f(f({user:n.getUser()||t.getUser()},r&&{userAgent:r}),e)),i=t.getSession();return(i==null?void 0:i.status)==="ok"&&oe(i,{status:"exited"}),fn(),t.setSession(s),s}function fn(){const e=le(),n=F().getSession()||e.getSession();n&&Er(n),dn(),e.setSession()}function dn(){const e=le(),t=w(),n=e.getSession();n&&t&&t.captureSession(n)}function ln(e=!1){if(e){fn();return}dn()}const zs="7";function Ks(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Xs(e){return`${Ks(e)}${e.projectId}/envelope/`}function Js(e,t){const n={sentry_version:zs};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Qs(e,t,n){return t||`${Xs(e)}?${Js(e,n)}`}const pn=[];function Zs(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function ei(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return Zs(r)}function ti(e,t){const n={};return t.forEach(r=>{r&&hn(e,r,n)}),n}function gn(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function hn(e,t,n){if(n[t.name]){p&&h.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,pn.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),pn.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",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}p&&h.log(`Integration installed: ${t.name}`)}function qa(e){return e}function _n(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch(n){}return t}function ni(e){var c,u,d;const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=(u=(c=e.contexts)==null?void 0:c.trace)!=null?u:{};return{data:o!=null?o:{},description:e.transaction,op:a,parent_span_id:n,span_id:r!=null?r:"",start_timestamp:(d=e.start_timestamp)!=null?d:0,status:s,timestamp:e.timestamp,trace_id:t!=null?t:"",origin:i,profile_id:o==null?void 0:o[Mt],exclusive_time:o==null?void 0:o[$t],measurements:e.measurements,is_segment:!0}}function ri(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:f(f(f({},e.data),e.profile_id&&{[Mt]:e.profile_id}),e.exclusive_time&&{[$t]:e.exclusive_time})}},measurements:e.measurements}}function si(e,t,n){const r=[{type:"client_report"},{timestamp:n||fe(),discarded_events:e}];return pe(t?{dsn:t}:{},[r])}const mn="Not capturing exception because it's already been captured.",yn="Discarded session because of missing or non-string release",En=Symbol.for("SentryInternalError"),Sn=Symbol.for("SentryDoNotSendEventError");function De(e){return{message:e,[En]:!0}}function nt(e){return{message:e,[Sn]:!0}}function In(e){return!!e&&typeof e=="object"&&En in e}function bn(e){return!!e&&typeof e=="object"&&Sn in e}class ii{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=ds(t.dsn):p&&h.warn("No DSN provided, client will not send events."),this._dsn){const n=Qs(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport(S(f({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:n}))}}captureException(t,n,r){const s=A();if(Dt(t))return p&&h.log(mn),s;const i=f({event_id:s},n);return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i=f({event_id:A()},r),o=Ue(t)?t:String(t),a=Be(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,s))),i.event_id}captureEvent(t,n,r){const s=A();if(n!=null&&n.originalException&&Dt(n.originalException))return p&&h.log(mn),s;const i=f({event_id:s},n),o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,c=o.capturedSpanIsolationScope;return this._process(this._captureEvent(t,i,a||r,c)),i.event_id}captureSession(t){this.sendSession(t),oe(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Q(!0)}close(t){return this.flush(t).then(n=>(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];hn(this,t,this._integrations),n||gn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Ns(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Ss(r,Ts(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const{release:n,environment:r=Qe}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){p&&h.warn(yn);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){p&&h.warn(yn);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=Ps(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;p&&h.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(p&&h.error("Error while sending envelope:",n),n)):(p&&h.error("Transport disabled"),Q({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=ti(this,t),gn(this,t)}_updateSessionFromEvent(t,n){var c;let r=n.level==="fatal",s=!1;const i=(c=n.exception)==null?void 0:c.values;if(i){s=!0;for(const u of i){const d=u.mechanism;if((d==null?void 0:d.handled)===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(oe(t,S(f({},r&&{status:"crashed"}),{errors:t.errors||Number(s||r)})),this.captureSession(t))}_isClientDoneProcessing(t){return new Y(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&(o!=null&&o.length)&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),Ms(i,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts=f({trace:Ar(r)},a.contexts);const c=ps(this,r);return a.sdkProcessingMetadata=f({dynamicSamplingContext:c},a.sdkProcessingMetadata),a})}_captureEvent(t,n={},r=F(),s=le()){return p&&rt(t)&&h.log(`Captured error event \`${_n(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{p&&(bn(i)?h.log(i.message):In(i)?h.warn(i.message):h.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=Tn(t),c=rt(t),u=t.type||"error",d=`before send for type \`${u}\``,l=typeof o=="undefined"?void 0:Br(o);if(c&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),we(nt(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const _=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",_),nt("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return g;const D=ai(this,i,g,n);return oi(D,d)}).then(g=>{var b;if(g===null){if(this.recordDroppedEvent("before_send",_),a){const H=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",H)}throw nt(`${d} returned \`null\`, will not send event.`)}const v=r.getSession()||s.getSession();if(c&&v&&this._updateSessionFromEvent(v,g),a){const L=((b=g.sdkProcessingMetadata)==null?void 0:b.spanCountBeforeProcessing)||0,H=g.spans?g.spans.length:0,Qn=L-H;Qn>0&&this.recordDroppedEvent("before_send","span",Qn)}const D=g.transaction_info;if(a&&D&&g.transaction!==t.transaction){const L="custom";g.transaction_info=S(f({},D),{source:L})}return this.sendEvent(g,n),g}).then(null,g=>{throw bn(g)||In(g)?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),De(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){p&&h.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){p&&h.log("No outcomes to send");return}if(!this._dsn){p&&h.log("No dsn provided, will not send outcomes");return}p&&h.log("Sending outcomes:",t);const n=si(t,this._options.tunnel&&ve(this._dsn));this.sendEnvelope(n)}}function oi(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ye(e))return e.then(r=>{if(!ue(r)&&r!==null)throw De(n);return r},r=>{throw De(`${t} rejected with ${r}`)});if(!ue(e)&&e!==null)throw De(n);return e}function ai(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;let a=n;if(rt(a)&&s)return s(a,r);if(Tn(a)){if(o){const c=o(ni(a));if(c?a=de(n,ri(c)):Yt(),a.spans){const u=[];for(const d of a.spans){const l=o(d);l?u.push(l):(Yt(),u.push(d))}a.spans=u}}if(i){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata=S(f({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:c})}return i(a,r)}}return a}function rt(e){return e.type===void 0}function Tn(e){return e.type==="transaction"}function ci(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function ui(e,t,n,r){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=ve(r)),pe(s,[ci(e)])}m._sentryClientToLogBufferMap=new WeakMap;function st(e,t){var i,o;const n=(i=t!=null?t:fi(e))!=null?i:[];if(n.length===0)return;const r=e.getOptions(),s=ui(n,r._metadata,r.tunnel,e.getDsn());(o=m._sentryClientToLogBufferMap)==null||o.set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function fi(e){var t;return(t=m._sentryClientToLogBufferMap)==null?void 0:t.get(e)}function di(e,t){t.debug===!0&&(p?h.enable():se(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),F().update(t.initialScope);const r=new e(t);return li(r),r.init(),r}function li(e){F().setClient(e)}const vn=Symbol.for("SentryBufferFullError");function pi(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return we(vn);const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Y((a,c)=>{let u=t.length;if(!u)return a(!0);const d=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(l=>{Q(l).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:s,drain:i}}const gi=60*1e3;function hi(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?gi:r-t}function _i(e,t){return e[t]||e.all||0}function mi(e,t,n=Date.now()){return _i(e,t)>n}function yi(e,{statusCode:t,headers:n},r=Date.now()){const s=f({},e),i=n==null?void 0:n["x-sentry-rate-limits"],o=n==null?void 0:n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),_=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+_;else for(const g of u.split(";"))g==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[g]=r+_):s[g]=r+_}else o?s.all=r+hi(o,r):t===429&&(s.all=r+60*1e3);return s}const Ei=64;function Si(e,t,n=pi(e.bufferSize||Ei)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(tn(o,(l,_)=>{const g=nn(_);mi(r,g)?e.recordDroppedEvent("ratelimit_backoff",g):a.push(l)}),a.length===0)return Q({});const c=pe(o[0],a),u=l=>{tn(c,(_,g)=>{e.recordDroppedEvent(l,nn(g))})},d=()=>t({body:Is(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&p&&h.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=yi(r,l),l),l=>{throw u("network_error"),p&&h.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===vn)return p&&h.error("Skipped sending event because buffer is full."),u("queue_overflow"),Q({});throw l})}return{send:i,flush:s}}function Ii(e){var t;((t=e.user)==null?void 0:t.ip_address)===void 0&&(e.user=S(f({},e.user),{ip_address:"{{auto}}"}))}function bi(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs=S(f({},e.attrs),{ip_address:"{{auto}}"})):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Ti(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:E})),version:E}),e._metadata=s}const vi=100;function Z(e,t){const n=w(),r=le();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=vi}=n.getOptions();if(i<=0)return;const o=fe(),a=f({timestamp:o},e),c=s?se(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}let wn;const wi="FunctionToString",Rn=new WeakMap,Ri=()=>({name:wi,setupOnce(){wn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=We(this),n=Rn.has(w())&&t!==void 0?t:this;return wn.apply(n,e)}}catch(e){}},setup(e){Rn.set(e,!0)}}),Pi=[/^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().getRestri