Files
apps.apple.com/assets/versionBNUm1OH-k3.js
2025-11-04 05:03:50 +08:00

3 lines
28 KiB
JavaScript

const z=Object.prototype.toString;function dt(e){switch(z.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return N(e,Error)}}function m(e,t){return z.call(e)==="[object ".concat(t,"]")}function ae(e){return m(e,"ErrorEvent")}function ce(e){return m(e,"DOMError")}function ue(e){return m(e,"DOMException")}function I(e){return m(e,"String")}function fe(e){return e===null||typeof e!="object"&&typeof e!="function"}function M(e){return m(e,"Object")}function lt(e){return typeof Event<"u"&&N(e,Event)}function _t(e){return typeof Element<"u"&&N(e,Element)}function ht(e){return m(e,"RegExp")}function K(e){return!!(e&&e.then&&typeof e.then=="function")}function pt(e){return M(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function gt(e){return typeof e=="number"&&e!==e}function N(e,t){try{return e instanceof t}catch(n){return!1}}function b(e){return e&&e.Math==Math?e:void 0}const h=typeof globalThis=="object"&&b(globalThis)||typeof window=="object"&&b(window)||typeof self=="object"&&b(self)||typeof global=="object"&&b(global)||function(){return this}()||{};function j(){return h}function U(e,t,n){const r=n||h,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const T=j(),yt=80;function mt(e,t={}){try{let n=e;const r=5,s=[];let i=0,o=0;const c=" > ",a=c.length;let u;const f=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||yt;for(;n&&i++<r&&(u=Et(n,f),!(u==="html"||i>1&&o+s.length*a+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(c)}catch(n){return"<unknown>"}}function Et(e,t){const n=e,r=[];let s,i,o,c,a;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(u&&u.length)u.forEach(d=>{r.push("[".concat(d[0],'="').concat(d[1],'"]'))});else if(n.id&&r.push("#".concat(n.id)),s=n.className,s&&I(s))for(i=s.split(/\s+/),a=0;a<i.length;a++)r.push(".".concat(i[a]));const f=["aria-label","type","name","title","alt"];for(a=0;a<f.length;a++)o=f[a],c=n.getAttribute(o),c&&r.push("[".concat(o,'="').concat(c,'"]'));return r.join("")}function de(){try{return T.document.location.href}catch(e){return""}}function le(e){return T.document&&T.document.querySelector?T.document.querySelector(e):null}const St="Sentry Logger ",k=["debug","info","warn","error","log","assert","trace"];function V(e){if(!("console"in h))return e();const t=h.console,n={};k.forEach(r=>{const s=t[r]&&t[r].__sentry_original__;r in t&&s&&(n[r]=t[r],t[r]=s)});try{return e()}finally{Object.keys(n).forEach(r=>{t[r]=n[r]})}}function Y(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?k.forEach(n=>{t[n]=(...r)=>{e&&V(()=>{h.console[n]("".concat(St,"[").concat(n,"]:"),...r)})}}):k.forEach(n=>{t[n]=()=>{}}),t}let _;typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?_=U("logger",Y):_=Y();const bt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Tt(e){return e==="http"||e==="https"}function Nt(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:c,publicKey:a}=e;return"".concat(c,"://").concat(a).concat(t&&s?":".concat(s):"")+"@".concat(n).concat(i?":".concat(i):"","/").concat(r&&"".concat(r,"/")).concat(o)}function Rt(e){const t=bt.exec(e);if(!t){console.error("Invalid Sentry Dsn: ".concat(e));return}const[n,r,s="",i,o="",c]=t.slice(1);let a="",u=c;const f=u.split("/");if(f.length>1&&(a=f.slice(0,-1).join("/"),u=f.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return X({host:i,pass:s,path:a,projectId:u,port:o,protocol:n,publicKey:r})}function X(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Dt(e){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(_.error("Invalid Sentry Dsn: ".concat(o," missing")),!0))?!1:n.match(/^\d+$/)?Tt(r)?t&&isNaN(parseInt(t,10))?(_.error("Invalid Sentry Dsn: Invalid port ".concat(t)),!1):!0:(_.error("Invalid Sentry Dsn: Invalid protocol ".concat(r)),!1):(_.error("Invalid Sentry Dsn: Invalid projectId ".concat(n)),!1)}function _e(e){const t=typeof e=="string"?Rt(e):X(e);if(!(!t||!Dt(t)))return t}class Ot extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function x(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:"".concat(e.slice(0,t),"...")}function he(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{n.push(String(s))}catch(i){n.push("[value cannot be serialized]")}}return n.join(t)}function wt(e,t,n=!1){return I(e)?ht(t)?t.test(e):I(t)?n?e===t:e.includes(t):!1:!1}function pe(e,t=[],n=!1){return t.some(r=>wt(e,r,n))}function ge(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);if(typeof s=="function")try{It(s,r)}catch(i){}e[t]=s}function Q(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function It(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,Q(e,"__sentry_original__",t)}function ye(e){return e.__sentry_original__}function me(e){return Object.keys(e).map(t=>"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))).join("&")}function Z(e){if(dt(e))return{message:e.message,name:e.name,stack:e.stack,...F(e)};if(lt(e)){const t={type:e.type,target:H(e.target),currentTarget:H(e.currentTarget),...F(e)};return typeof CustomEvent<"u"&&N(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function H(e){try{return _t(e)?mt(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function F(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 Ee(e,t=40){const n=Object.keys(Z(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return x(n[0],t);for(let r=n.length;r>0;r--){const s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:x(s,t)}return""}function G(e){return A(e,new Map)}function A(e,t){if(M(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=A(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(A(s,t))}),r}return e}const tt=50,C=/\(error: (.*)\)/;function kt(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const s=[],i=n.split("\n");for(let o=r;o<i.length;o++){const c=i[o];if(c.length>1024)continue;const a=C.test(c)?c.replace(C,"$1"):c;if(!a.match(/\S*Error: /)){for(const u of t){const f=u(a);if(f){s.push(f);break}}if(s.length>=tt)break}}return At(s)}}function Se(e){return Array.isArray(e)?kt(...e):e}function At(e){if(!e.length)return[];const t=e.slice(0,tt),n=t[t.length-1].function;n&&/sentryWrapped/.test(n)&&t.pop(),t.reverse();const r=t[t.length-1].function;return r&&/captureMessage|captureException/.test(r)&&t.pop(),t.map(s=>({...s,filename:s.filename||t[t.length-1].filename,function:s.function||"?"}))}const O="<anonymous>";function Lt(e){try{return!e||typeof e!="function"?O:e.name||O}catch(t){return O}}const L=j();function Pt(){if(!("fetch"in L))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function q(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function be(){if(!Pt())return!1;if(q(L.fetch))return!0;let e=!1;const t=L.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=q(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function vt(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let i=0;i<t.length;i++)if(t[i]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let i=0;i<t.length;i++)if(t[i]===s){t.splice(i,1);break}}return[n,r]}function S(){const e=h,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function et(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Te(e){const{message:t,event_id:n}=e;if(t)return t;const r=et(e);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ne(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="Error")}function Re(e,t){const n=et(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s&&s.data,...t.data};n.mechanism.data=i}}function De(e){if(e&&e.__sentry_captured__)return!0;try{Q(e,"__sentry_captured__",!0)}catch(t){}return!1}function $t(e){return Array.isArray(e)?e:[e]}function Bt(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Oe(){return"npm"}function Mt(){return!Bt()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function jt(e,t){return e.require(t)}function nt(e,t=100,n=1/0){try{return P("",e,t,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function Ut(e,t=3,n=100*1024){const r=nt(e,t);return Ht(r)>n?Ut(e,t-1,n):r}function P(e,t,n=1/0,r=1/0,s=vt()){const[i,o]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!gt(t))return t;const c=Gt(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;const a=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(a===0)return c.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const g=u.toJSON();return P("",g,a-1,r,s)}catch(g){}const f=Array.isArray(t)?[]:{};let d=0;const E=Z(t);for(const g in E){if(!Object.prototype.hasOwnProperty.call(E,g))continue;if(d>=r){f[g]="[MaxProperties ~]";break}const ft=E[g];f[g]=P(g,ft,a-1,r,s),d++}return o(t),f}function Gt(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(pt(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return"[Function: ".concat(Lt(t),"]");if(typeof t=="symbol")return"[".concat(String(t),"]");if(typeof t=="bigint")return"[BigInt: ".concat(String(t),"]");const n=Yt(t);return/^HTML(\w*)Element$/.test(n)?"[HTMLElement: ".concat(n,"]"):"[object ".concat(n,"]")}catch(n){return"**non-serializable** (".concat(n,")")}}function Yt(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function xt(e){return~-encodeURI(e).split(/%..|./).length}function Ht(e){return xt(JSON.stringify(e))}var p;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(p||(p={}));function Ft(e){return new l(t=>{t(e)})}function Ct(e){return new l((t,n)=>{n(e)})}class l{__init(){this._state=p.PENDING}__init2(){this._handlers=[]}constructor(t){l.prototype.__init.call(this),l.prototype.__init2.call(this),l.prototype.__init3.call(this),l.prototype.__init4.call(this),l.prototype.__init5.call(this),l.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new l((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 l((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)})})}__init3(){this._resolve=t=>{this._setResult(p.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(p.REJECTED,t)}}__init5(){this._setResult=(t,n)=>{if(this._state===p.PENDING){if(K(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state===p.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===p.RESOLVED&&n[1](this._value),this._state===p.REJECTED&&n[2](this._value),n[0]=!0)})}}}function we(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]}function s(o){if(!n())return Ct(new Ot("Not adding Promise because buffer limit was reached."));const c=o();return t.indexOf(c)===-1&&t.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function i(o){return new l((c,a)=>{let u=t.length;if(!u)return c(!0);const f=setTimeout(()=>{o&&o>0&&c(!1)},o);t.forEach(d=>{Ft(d).then(()=>{--u||(clearTimeout(f),c(!0))},a)})})}return{$:t,add:s,drain:i}}const rt=j(),v={nowSeconds:()=>Date.now()/1e3};function qt(){const{performance:e}=rt;if(!e||!e.now)return;const t=Date.now()-e.now();return{now:()=>e.now(),timeOrigin:t}}function Wt(){try{return jt(module,"perf_hooks").performance}catch(e){return}}const w=Mt()?Wt():qt(),W=w===void 0?v:{nowSeconds:()=>(w.timeOrigin+w.now())/1e3},st=v.nowSeconds.bind(v),it=W.nowSeconds.bind(W),Ie=(()=>{const{performance:e}=rt;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=e.timing&&e.timing.navigationStart,a=typeof o=="number"?Math.abs(o+n-r):t,u=a<t;return i||u?s<=a?e.timeOrigin:o:r})();function ke(e,t=[]){return[e,t]}function Ae(e,t){const[n,r]=e;return[n,[...r,t]]}function Jt(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 Le(e,t){return Jt(e,(n,r)=>t.includes(r))}function $(e,t){return(t||new TextEncoder).encode(e)}function Pe(e,t){const[n,r]=e;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[$(s,t),o]:s.push(typeof o=="string"?$(o,t):o)}for(const o of r){const[c,a]=o;if(i("\n".concat(JSON.stringify(c),"\n")),typeof a=="string"||a instanceof Uint8Array)i(a);else{let u;try{u=JSON.stringify(a)}catch(f){u=JSON.stringify(nt(a))}i(u)}}return typeof s=="string"?s:zt(s)}function zt(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 ve(e,t,n){let r=typeof e=="string"?t.encode(e):e;function s(a){const u=r.subarray(0,a);return r=r.subarray(a+1),u}function i(){let a=r.indexOf(10);return a<0&&(a=r.length),JSON.parse(n.decode(s(a)))}const o=i(),c=[];for(;r.length;){const a=i(),u=typeof a.length=="number"?a.length:void 0;c.push([a,u?s(u):i()])}return[o,c]}function $e(e,t){const n=typeof e.data=="string"?$(e.data,t):e.data;return[G({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Kt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Be(e){return Kt[e]}function Me(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function je(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&{dsn:Nt(r)},...s&&{trace:G({...s})}}}const Vt=60*1e3;function Xt(e,t=Date.now()){const n=parseInt("".concat(e),10);if(!isNaN(n))return n*1e3;const r=Date.parse("".concat(e));return isNaN(r)?Vt:r-t}function Qt(e,t){return e[t]||e.all||0}function Ue(e,t,n=Date.now()){return Qt(e,t)>n}function Ge(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const c of i.trim().split(",")){const[a,u]=c.split(":",2),f=parseInt(a,10),d=(isNaN(f)?60:f)*1e3;if(!u)s.all=r+d;else for(const E of u.split(";"))s[E]=r+d}else o?s.all=r+Xt(o,r):t===429&&(s.all=r+60*1e3);return s}const Zt="production";function te(e){const t=it(),n={sid:S(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>ne(n)};return e&&R(n,e),n}function R(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||it(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:S()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(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 ee(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),R(e,n)}function ne(e){return G({sid:"".concat(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"?"".concat(e.did):void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const re=100;class y{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){const n=new y;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments],n._sdkProcessingMetadata={...t._sdkProcessingMetadata}),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&R(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},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}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){const n=t(this);return n instanceof y?n:this}return t instanceof y?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):M(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){const r=typeof n=="number"?n:re;if(r<=0)return this;const s={timestamp:st(),...t};return this._breadcrumbs=[...this._breadcrumbs,s].slice(-r),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}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const r=this._span.transaction;if(r){t.sdkProcessingMetadata={dynamicSamplingContext:r.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const s=r.name;s&&(t.tags={transaction:s,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...ot(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,s=0){return new l((i,o)=>{const c=t[s];if(n===null||typeof c!="function")i(n);else{const a=c({...n},r);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&c.id&&a===null&&_.log('Event processor "'.concat(c.id,'" dropped event')),K(a)?a.then(u=>this._notifyEventProcessors(t,u,r,s+1).then(i)).then(null,o):this._notifyEventProcessors(t,a,r,s+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?$t(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function ot(){return U("globalEventProcessors",()=>[])}function Ye(e){ot().push(e)}const at=4,se=100;class ct{constructor(t,n=new y,r=at){this._version=r,this._stack=[{scope:n}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){const n=this.getStackTop();n.client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=y.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const n=this.pushScope();try{t(n)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:S(),s=new Error("Sentry syntheticException");return this._withClient((i,o)=>{i.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},o)}),r}captureMessage(t,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:S(),i=new Error(t);return this._withClient((o,c)=>{o.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},c)}),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:S();return t.type||(this._lastEventId=r),this._withClient((s,i)=>{s.captureEvent(t,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=se}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const a={timestamp:st(),...t},u=i?V(()=>i(a,n)):a;u!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,o))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=J(this);try{t(this)}finally{J(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(r){return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn("Cannot retrieve integration ".concat(t.id," from the current Hub")),null}}startTransaction(t,n){const r=this._callExtensionMethod("startTransaction",t,n);return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!r&&console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&ee(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=Zt}=r&&r.getOptions()||{},{userAgent:o}=h.navigator||{},c=te({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...t}),a=n.getSession&&n.getSession();return a&&a.status==="ok"&&R(a,{status:"exited"}),this.endSession(),n.setSession(c),c}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){const{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){const s=D().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn("Extension method ".concat(t," couldn't be found, doing nothing."))}}function D(){return h.__SENTRY__=h.__SENTRY__||{extensions:{},hub:void 0},h}function J(e){const t=D(),n=B(t);return ut(t,e),n}function xe(){const e=D();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return ie(e)}function ie(e=D()){return(!oe(e)||B(e).isOlderThan(at))&&ut(e,new ct),B(e)}function oe(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function B(e){return U("hub",()=>new ct,e)}function ut(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}const He="7.57.0";export{It as $,K as A,_e as B,k as C,Zt as D,Nt as E,me as F,h as G,Me as H,je as I,$t as J,Ye as K,y as L,x as M,nt as N,De as O,fe as P,R as Q,Ae as R,He as S,$e as T,M as U,Xt as V,Le as W,Rt as X,ye as Y,Te as Z,pe as _,Ue as a,Q as a0,Ne as a1,Re as a2,ae as a3,ce as a4,ue as a5,dt as a6,lt as a7,Ut as a8,Ee as a9,mt as aa,he as ab,Oe as ac,kt as ad,de as ae,N as af,Se as ag,Mt as ah,Ie as ai,le as aj,ve as ak,ct as al,B as am,J as an,Pe as b,ke as c,Ot as d,Be as e,Jt as f,xe as g,Ct as h,q as i,l as j,j as k,_ as l,we as m,ge as n,be as o,I as p,Lt as q,Ft as r,Pt as s,st as t,Ge as u,S as v,it as w,G as x,D as y,gt as z};
//# sourceMappingURL=version~BNUm1OH-k3.js.map