From cbca9c2295a56831de0036899f78cd595c18542f Mon Sep 17 00:00:00 2001 From: Romeo Rosete <110788242+bombastictranz@users.noreply.github.com> Date: Sat, 13 Apr 2024 10:23:49 -0400 Subject: [PATCH] apmfe-1.1.19.min.js.download Stock control supervisors --- apmfe-1.1.19.min.js.download | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 apmfe-1.1.19.min.js.download diff --git a/apmfe-1.1.19.min.js.download b/apmfe-1.1.19.min.js.download new file mode 100644 index 0000000..fdce4d2 --- /dev/null +++ b/apmfe-1.1.19.min.js.download @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).OKSentry=e()}(this,(function(){"use strict";const t=Object.prototype.toString;function e(e){switch(t.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return d(e,Error)}}function n(e,n){return t.call(e)===`[object ${n}]`}function r(t){return n(t,"ErrorEvent")}function o(t){return n(t,"DOMError")}function i(t){return n(t,"String")}function s(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function a(t){return n(t,"Object")}function c(t){return"undefined"!=typeof Event&&d(t,Event)}function u(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t,e){try{return t instanceof e}catch(t){return!1}}function l(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}function p(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function f(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;eh(t,e,n)))}function g(t,e,n=250,r,o,i,s){if(!(i.exception&&i.exception.values&&s&&d(s.originalException,Error)))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var c,u;a&&(i.exception.values=(c=m(t,e,o,s.originalException,r,i.exception.values,a,0),u=n,c.map((t=>(t.value&&(t.value=p(t.value,u)),t)))))}function m(t,e,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(d(r[o],Error)){y(s,a);const i=t(e,r[o]),u=c.length;v(i,o,u,a),c=m(t,e,n,r[o],o,[i,...c],i,u)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(d(r,Error)){y(s,a);const u=t(e,r),d=c.length;v(u,`errors[${i}]`,d,a),c=m(t,e,n,r,o,[u,...c],u,d)}})),c}function y(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function v(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function E(t){return t&&t.Math==Math?t:void 0}const S="object"==typeof globalThis&&E(globalThis)||"object"==typeof window&&E(window)||"object"==typeof self&&E(self)||"object"==typeof global&&E(global)||function(){return this}()||{};function b(){return S}function w(t,e,n){const r=n||S,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[t]=e())}const T=b(),x=80;function k(t,e={}){try{let n=t;const r=5,o=[];let i=0,s=0;const a=" > ",c=a.length;let u;const d=Array.isArray(e)?e:e.keyAttrs,l=!Array.isArray(e)&&e.maxStringLength||x;for(;n&&i++1&&s+o.length*c+u.length>=l));)o.push(u),s+=u.length,n=n.parentNode;return o.reverse().join(a)}catch(t){return""}}function R(t,e){const n=t,r=[];let o,s,a,c,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const d=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(d&&d.length)d.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&i(o))for(s=o.split(/\s+/),u=0;u{const r=N[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const C=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?D.forEach((n=>{e[n]=(...e)=>{t&&O((()=>{S.console[n](`Sentry Logger [${n}]:`,...e)}))}})):D.forEach((t=>{e[t]=()=>{}})),e}(),U=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function L(t,e=!1){const{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${s}`}function $(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function B(t){const e="string"==typeof t?function(t){const e=U.exec(t);if(!e)return void console.error(`Invalid Sentry Dsn: ${t}`);const[n,r,o="",i,s="",a]=e.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 t=u.match(/^\d+/);t&&(u=t[0])}return $({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}(t):$(t);if(e&&function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;const{port:e,projectId:n,protocol:r}=t;return!(["protocol","publicKey","host","projectId"].find((e=>!t[e]&&(C.error(`Invalid Sentry Dsn: ${e} missing`),!0)))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(r)?e&&isNaN(parseInt(e,10))&&(C.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(C.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(C.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}class I extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function j(t,e,n){if(!(e in t))return;const r=t[e],o=n(r);"function"==typeof o&&A(o,r),t[e]=o}function P(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function A(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,P(t,"__sentry_original__",e)}catch(t){}}function G(t){return t.__sentry_original__}function Y(t){if(e(t))return{message:t.message,name:t.name,stack:t.stack,...q(t)};if(c(t)){const e={type:t.type,target:M(t.target),currentTarget:M(t.currentTarget),...q(t)};return"undefined"!=typeof CustomEvent&&d(t,CustomEvent)&&(e.detail=t.detail),e}return t}function M(t){try{return e=t,"undefined"!=typeof Element&&d(e,Element)?k(t):Object.prototype.toString.call(t)}catch(t){return""}var e}function q(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function F(t){return z(t,new Map)}function z(t,e){if(a(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=z(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(z(t,e))})),r}return t}const H=50,J=/\(error: (.*)\)/,V=/captureMessage|captureException/;function W(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{const r=[],o=t.split("\n");for(let t=n;t1024)continue;const i=J.test(n)?n.replace(J,"$1"):n;if(!i.match(/\S*Error: /)){for(const t of e){const e=t(i);if(e){r.push(e);break}}if(r.length>=H)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop();e.reverse(),V.test(e[e.length-1].function||"")&&(e.pop(),V.test(e[e.length-1].function||"")&&e.pop());return e.slice(0,H).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"})))}(r)}}const K="";function X(t){try{return t&&"function"==typeof t&&t.name||K}catch(t){return K}}const Z=b();function Q(){if(!("fetch"in Z))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function tt(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const et=b();const nt=b(),rt="__sentry_xhr_v2__",ot={},it={};function st(t){if(!it[t])switch(it[t]=!0,t){case"console":!function(){if(!("console"in S))return;D.forEach((function(t){t in S.console&&j(S.console,t,(function(e){return N[t]=e,function(...e){ct("console",{args:e,level:t});const n=N[t];n&&n.apply(S.console,e)}}))}))}();break;case"dom":!function(){if(!nt.document)return;const t=ct.bind(null,"dom"),e=_t(t,!0);nt.document.addEventListener("click",e,!1),nt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=nt[e]&&nt[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(j(n,"addEventListener",(function(e){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=i[n]=i[n]||{refCount:0};if(!s.handler){const r=_t(t);s.handler=r,e.call(this,n,r,o)}s.refCount++}catch(t){}return e.call(this,n,r,o)}})),j(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},i=o[e];i&&(i.refCount--,i.refCount<=0&&(t.call(this,e,i.handler,r),i.handler=void 0,delete o[e]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}})))}))}();break;case"xhr":!function(){if(!nt.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;j(t,"open",(function(t){return function(...e){const n=e[1],r=this[rt]={method:i(e[0])?e[0].toUpperCase():e[0],url:e[1],request_headers:{}};i(n)&&"POST"===r.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const t=this[rt];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}ct("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?j(this,"onreadystatechange",(function(t){return function(...e){return o(),t.apply(this,e)}})):this.addEventListener("readystatechange",o),j(this,"setRequestHeader",(function(t){return function(...e){const[n,r]=e,o=this[rt];return o&&(o.request_headers[n.toLowerCase()]=r),t.apply(this,e)}})),t.apply(this,e)}})),j(t,"send",(function(t){return function(...e){const n=this[rt];return n&&void 0!==e[0]&&(n.body=e[0]),ct("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}();break;case"fetch":!function(){if(!function(){if(!Q())return!1;if(tt(Z.fetch))return!0;let t=!1;const e=Z.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=tt(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t}())return;j(S,"fetch",(function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:dt(e),method:ut(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:dt(e),method:ut(e,"method")?String(e.method).toUpperCase():"GET"}}(e),o={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return ct("fetch",{...o}),t.apply(S,e).then((t=>(ct("fetch",{...o,endTimestamp:Date.now(),response:t}),t)),(t=>{throw ct("fetch",{...o,endTimestamp:Date.now(),error:t}),t}))}}))}();break;case"history":!function(){if(!function(){const t=et.chrome,e=t&&t.app&&t.app.runtime,n="history"in et&&!!et.history.pushState&&!!et.history.replaceState;return!e&&n}())return;const t=nt.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=lt,e=String(n);lt=e,ct("history",{from:t,to:e})}return t.apply(this,e)}}nt.onpopstate=function(...e){const n=nt.location.href,r=lt;if(lt=n,ct("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},j(nt.history,"pushState",e),j(nt.history,"replaceState",e)}();break;case"error":gt=nt.onerror,nt.onerror=function(t,e,n,r,o){return ct("error",{column:r,error:o,line:n,msg:t,url:e}),!(!gt||gt.__SENTRY_LOADER__)&>.apply(this,arguments)},nt.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":mt=nt.onunhandledrejection,nt.onunhandledrejection=function(t){return ct("unhandledrejection",t),!(mt&&!mt.__SENTRY_LOADER__)||mt.apply(this,arguments)},nt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn("unknown instrumentation type:",t))}}function at(t,e){ot[t]=ot[t]||[],ot[t].push(e),st(t)}function ct(t,e){if(t&&ot[t])for(const n of ot[t]||[])try{n(e)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${X(n)}\nError:`,e)}}function ut(t,e){return!!t&&"object"==typeof t&&!!t[e]}function dt(t){return"string"==typeof t?t:t?ut(t,"url")?t.url:t.toString?t.toString():"":""}let lt;const pt=1e3;let ft,ht;function _t(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;P(n,"_sentryCaptured",!0);const r="keypress"===n.type?"input":n.type;void 0!==ht&&function(t,e){if(t.type!==e.type)return!1;try{if(t.target!==e.target)return!1}catch(t){}return!0}(ht,n)||(t({event:n,name:r,global:e}),ht=n),clearTimeout(ft),ft=nt.setTimeout((()=>{ht=void 0}),pt)}}let gt=null;let mt=null;function yt(){const t=S,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>e.getRandomValues(new Uint8Array(1))[0])}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function vt(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Et(t){const{message:e,event_id:n}=t;if(e)return e;const r=vt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function St(t,e,n){const r=t.exception=t.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function bt(t,e){const n=vt(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function wt(t){if(t&&t.__sentry_captured__)return!0;try{P(t,"__sentry_captured__",!0)}catch(t){}return!1}function Tt(t){return Array.isArray(t)?t:[t]}function xt(t,e=100,n=1/0){try{return Rt("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function kt(t,e=3,n=102400){const r=xt(t,e);return o=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>n?kt(t,e-1,n):r;var o}function Rt(t,e,n=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t=r){f[t]="[MaxProperties ~]";break}const e=_[t];f[t]=Rt(t,e,d-1,r,o),h++}return s(e),f}var Dt;function Nt(t){return new Ct((e=>{e(t)}))}function Ot(t){return new Ct(((e,n)=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Dt||(Dt={}));class Ct{constructor(t){Ct.prototype.__init.call(this),Ct.prototype.__init2.call(this),Ct.prototype.__init3.call(this),Ct.prototype.__init4.call(this),this._state=Dt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Ct(((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Ct(((e,n)=>{let r,o;return this.then((e=>{o=!1,r=e,t&&t()}),(e=>{o=!0,r=e,t&&t()})).then((()=>{o?n(r):e(r)}))}))}__init(){this._resolve=t=>{this._setResult(Dt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Dt.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{this._state===Dt.PENDING&&(u(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Dt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===Dt.RESOLVED&&t[1](this._value),this._state===Dt.REJECTED&&t[2](this._value),t[0]=!0)}))}}}function Ut(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.lengthn(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(t){return new Ct(((n,r)=>{let o=e.length;if(!o)return n(!0);const i=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{Nt(t).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}function Lt(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}const $t=["fatal","error","warning","log","info","debug"];const Bt=b(),It={nowSeconds:()=>Date.now()/1e3};const jt="undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__||"[object process]"!==Object.prototype.toString.call("undefined"!=typeof process?process:0)?function(){const{performance:t}=Bt;if(!t||!t.now)return;return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}():function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(t){return}var t,e}(),Pt=void 0===jt?It:{nowSeconds:()=>(jt.timeOrigin+jt.now())/1e3},At=It.nowSeconds.bind(It),Gt=Pt.nowSeconds.bind(Pt);function Yt(t,e=[]){return[t,e]}function Mt(t,e){const[n,r]=t;return[n,[...r,e]]}function qt(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function Ft(t,e){return(e||new TextEncoder).encode(t)}function zt(t,e){const[n,r]=t;let o=JSON.stringify(n);function i(t){"string"==typeof o?o="string"==typeof t?o+t:[Ft(o,e),t]:o.push("string"==typeof t?Ft(t,e):t)}for(const t of r){const[e,n]=t;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(xt(n))}i(t)}}return"string"==typeof o?o:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(o)}function Ht(t,e){const n="string"==typeof t.data?Ft(t.data,e):t.data;return[F({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}(()=>{const{performance:t}=Bt;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=o[]))}function te(t){Qt().push(t)}function ee(t,e,n,r=0){return new Ct(((o,i)=>{const s=t[r];if(null===e||"function"!=typeof s)o(e);else{const a=s({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.id&&null===a&&C.log(`Event processor "${s.id}" dropped event`),u(a)?a.then((e=>ee(t,e,n,r+1).then(o))).then(null,i):ee(t,a,n,r+1).then(o).then(null,i)}}))}function ne(t){const e=Gt(),n={sid:yt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return F({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&re(n,t),n}function re(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Gt(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:yt()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class oe{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ie()}static clone(t){const e=new oe;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata},e._propagationContext={...t._propagationContext}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&re(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,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},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,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,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("function"==typeof t){const e=t(this);return e instanceof oe?e:this}return t instanceof oe?(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),t._propagationContext&&(this._propagationContext=t._propagationContext)):a(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),t.propagationContext&&(this._propagationContext=t.propagationContext)),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._propagationContext=ie(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:At(),...t},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,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,e={},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 e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}this._applyFingerprint(t);const r=this._getBreadcrumbs(),o=[...t.breadcrumbs||[],...r];return t.breadcrumbs=o.length>0?o:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},ee([...n||[],...Qt(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Tt(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function ie(){return{traceId:yt(),spanId:yt().substring(16)}}const se=4,ae=100;class ce{constructor(t,e=new oe,n=se){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version{o.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},i)})),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:yt(),o=new Error(t);return this._withClient(((i,s)=>{i.captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r},s)})),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:yt();return t.type||(this._lastEventId=n),this._withClient(((r,o)=>{r.captureEvent(t,{...e,event_id:n},o)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=ae}=r.getOptions&&r.getOptions()||{};if(i<=0)return;const s={timestamp:At(),...t},a=o?O((()=>o(s,e))):s;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,e),n.addBreadcrumb(a,i))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=de(this);try{t(this)}finally{de(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&!n){this.getClient()?console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):console.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),re(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:o=Zt}=n&&n.getOptions()||{},{userAgent:i}=S.navigator||{},s=ne({release:r,environment:o,user:e.getUser(),...i&&{userAgent:i},...t}),a=e.getSession&&e.getSession();return a&&"ok"===a.status&&re(a,{status:"exited"}),this.endSession(),e.setSession(s),s}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=ue().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function ue(){return S.__SENTRY__=S.__SENTRY__||{extensions:{},hub:void 0},S}function de(t){const e=ue(),n=pe(e);return fe(e,t),n}function le(){const t=ue();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=ue()){e=t,e&&e.__SENTRY__&&e.__SENTRY__.hub&&!pe(t).isOlderThan(se)||fe(t,new ce);var e;return pe(t)}(t)}function pe(t){return w("hub",(()=>new ce),t)}function fe(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}function he(t,e){return le().captureException(t,{captureContext:e})}function _e(t,e){return le().captureEvent(t,e)}function ge(t,e){le().setTag(t,e)}function me(t){le().withScope(t)}const ye="7";function ve(t,e){return n={sentry_key:t.publicKey,sentry_version:ye,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}function Ee(t,e,n,r){const o=Wt(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const s=function(t,e,n,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:L(r)},...o&&{trace:F({...o})}}}(t,o,r,e);delete t.sdkProcessingMetadata;return Yt(s,[[{type:i},t]])}const Se=[];function be(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach((t=>{t.isDefaultInstance=!0})),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?Tt(n(e)):e;const o=function(t){const e={};return t.forEach((t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)})),Object.keys(e).map((t=>e[t]))}(r),i=function(t,e){for(let n=0;n"Debug"===t.name));if(-1!==i){const[t]=o.splice(i,1);o.push(t)}return o}function we(t,e,n){if(n[e.name]=e,-1===Se.indexOf(e.name)&&(e.setupOnce(te,le),Se.push(e.name)),t.on&&"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if(t.addEventProcessor&&"function"==typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign(((e,r)=>n(e,r,t)),{id:e.name});t.addEventProcessor(r)}("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log(`Integration installed: ${e.name}`)}function Te(t,e,n,r,o){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=t,a={...e,event_id:e.event_id||n.event_id||yt(),timestamp:e.timestamp||At()},c=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:r,dist:o,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?n:Zt);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==o&&(t.dist=o);t.message&&(t.message=p(t.message,i));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=p(s.value,i));const a=t.request;a&&a.url&&(a.url=p(a.url,i))}(a,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(a,c),void 0===e.type&&function(t,e){const n=S._sentryDebugIds;if(!n)return;let r;const o=xe.get(e);o?r=o:(r=new Map,xe.set(e,r));const i=Object.keys(n).reduce(((t,o)=>{let i;const s=r.get(o);s?i=s:(i=e(o),r.set(o,i));for(let e=i.length-1;e>=0;e--){const r=i[e];if(r.filename){t[r.filename]=n[o];break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=i[t.filename])}))}))}catch(t){}}(a,t.stackParser);let u=r;n.captureContext&&(u=oe.clone(u).update(n.captureContext));let d=Nt(a);const l=o&&o.getEventProcessors?o.getEventProcessors():[];if(u){if(u.getAttachments){const t=[...n.attachments||[],...u.getAttachments()];t.length&&(n.attachments=t)}d=u.applyToEvent(a,n,l)}else d=ee([...l,...Qt()],a,n);return d.then((t=>(t&&function(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(t){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach((t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})}))}(t),"number"==typeof i&&i>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:xt(t.data,e,n)}})))},...t.user&&{user:xt(t.user,e,n)},...t.contexts&&{contexts:xt(t.contexts,e,n)},...t.extra&&{extra:xt(t.extra,e,n)}};t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=xt(t.contexts.trace.data,e,n)));t.spans&&(r.spans=t.spans.map((t=>(t.data&&(t.data=xt(t.data,e,n)),t))));return r}(t,i,s):t)))}const xe=new WeakMap;const ke="Not capturing exception because it's already been captured.";class Re{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=B(t.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn("No DSN provided, client will not send events."),this._dsn){const e=function(t,e={}){const n="string"==typeof e?e:e.tunnel,r="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return n||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(t)}?${ve(t,r)}`}(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if(wt(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log(ke));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then((t=>this._captureEvent(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let o=n&&n.event_id;const i=s(t)?this.eventFromMessage(String(t),e,n):this.eventFromException(t,n);return this._process(i.then((t=>this._captureEvent(t,n,r))).then((t=>{o=t}))),o}captureEvent(t,e,n){if(e&&e.originalException&&wt(e.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log(ke));let r=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then((t=>{r=t}))),r}captureSession(t){"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),re(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?this._isClientDoneProcessing(t).then((n=>e.flush(t).then((t=>n&&t)))):Nt(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,t)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=function(t,e){const n={};return e.forEach((e=>{e&&we(t,e,n)})),n}(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){we(this,t,this._integrations)}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=Ee(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=Mt(n,Ht(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((e=>this.emit("afterSendEvent",t,e)),null)}sendSession(t){const e=function(t,e,n,r){const o=Wt(n);return Yt({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&e&&{dsn:L(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach((t=>t(...e)))}_updateSessionFromEvent(t,e){let n=!1,r=!1;const o=e.exception&&e.exception.values;if(o){r=!0;for(const t of o){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&n)&&(re(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ct((e=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(t,e,n){const r=this.getOptions(),o=Object.keys(this._integrations);return!e.integrations&&o.length>0&&(e.integrations=o),this.emit("preprocessEvent",t,e),Te(r,t,e,n,this).then((t=>{if(null===t)return t;const{propagationContext:e}=t.sdkProcessingMetadata||{};if(!(t.contexts&&t.contexts.trace)&&e){const{traceId:r,spanId:o,parentSpanId:i,dsc:s}=e;t.contexts={trace:{trace_id:r,span_id:o,parent_span_id:i},...t.contexts};const a=s||function(t,e,n){const r=e.getOptions(),{publicKey:o}=e.getDsn()||{},{segment:i}=n&&n.getUser()||{},s=F({environment:r.environment||Zt,release:r.release,user_segment:i,public_key:o,trace_id:t});return e.emit&&e.emit("createDsc",s),s}(r,this,n);t.sdkProcessingMetadata={dynamicSamplingContext:a,...t.sdkProcessingMetadata}}return t}))}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then((t=>t.event_id),(t=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=t;"log"===e.logLevel?C.log(e.message):C.warn(e)}}))}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:o}=r,i=Ne(t),s=De(t),c=t.type||"error",d=`before send for type \`${c}\``;if(s&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",t),Ot(new I(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const l="replay_event"===c?"replay":c;return this._prepareEvent(t,e,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,t),new I("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const o=function(t,e,n){const{beforeSend:r,beforeSendTransaction:o}=t;if(De(e)&&r)return r(e,n);if(Ne(e)&&o)return o(e,n);return e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(u(t))return t.then((t=>{if(!a(t)&&null!==t)throw new I(n);return t}),(t=>{throw new I(`${e} rejected with ${t}`)}));if(!a(t)&&null!==t)throw new I(n);return t}(o,d)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,t),new I(`${d} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();!i&&o&&this._updateSessionFromEvent(o,r);const s=r.transaction_info;if(i&&s&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...s,source:t}}return this.sendEvent(r,e),r})).then(null,(t=>{if(t instanceof I)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new I(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}_process(t){this._numProcessing++,t.then((t=>(this._numProcessing--,t)),(t=>(this._numProcessing--,t)))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,(t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.error("Error while sending event:",t)}));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}}))}}function De(t){return void 0===t.type}function Ne(t){return"transaction"===t.type}const Oe=30;function Ce(t,e,n=Ut(t.bufferSize||Oe)){let r={};function o(o){const i=[];if(qt(o,((e,n)=>{const o=Vt(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,o)){const r=Ue(e,n);t.recordDroppedEvent("ratelimit_backoff",o,r)}else i.push(e)})),0===i.length)return Nt();const s=Yt(o[0],i),a=e=>{qt(s,((n,r)=>{const o=Ue(n,r);t.recordDroppedEvent(e,Vt(r),o)}))};return n.add((()=>e({body:zt(s,t.textEncoder)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=Xt(r,t),t)),(t=>{throw a("network_error"),t})))).then((t=>t),(t=>{if(t instanceof I)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.error("Skipped sending event because buffer is full."),a("queue_overflow"),Nt();throw t}))}return o.__sentry__baseTransport__=!0,{send:o,flush:t=>n.drain(t)}}function Ue(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const Le="7.74.1";let $e;class Be{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=Be.id}setupOnce(){$e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=G(this)||this;return $e.apply(e,t)}}catch(t){}}}Be.__initStatic();const Ie=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],je=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/];class Pe{static __initStatic(){this.id="InboundFilters"}constructor(t={}){this.name=Pe.id,this._options=t}setupOnce(t,e){}processEvent(t,e,n){const r=n.getOptions(),o=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Ie],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:je],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(this._options,r);return function(t,e){if(e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Et(t)}`),!0;if(function(t,e){if(t.type||!e||!e.length)return!1;return function(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch(t){}n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`));"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||0!==e.length||C.error(`Could not extract message for event ${Et(t)}`);return e}(t).some((t=>_(t,e)))}(t,e.ignoreErrors))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Et(t)}`),!0;if(function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&_(n,e)}(t,e.ignoreTransactions))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Et(t)}`),!0;if(function(t,e){if(!e||!e.length)return!1;const n=Ae(t);return!!n&&_(n,e)}(t,e.denyUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Et(t)}.\nUrl: ${Ae(t)}`),!0;if(!function(t,e){if(!e||!e.length)return!0;const n=Ae(t);return!n||_(n,e)}(t,e.allowUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Et(t)}.\nUrl: ${Ae(t)}`),!0;return!1}(t,o)?null:t}}function Ae(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.error(`Cannot extract url for event ${Et(t)}`),null}}Pe.__initStatic();const Ge=S;let Ye=0;function Me(){return Ye>0}function qe(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(G(t))return t}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const o=r.map((t=>qe(t,e)));return t.apply(this,o)}catch(t){throw Ye++,setTimeout((()=>{Ye--})),me((n=>{n.addEventProcessor((t=>(e.mechanism&&(St(t,void 0,void 0),bt(t,e.mechanism)),t.extra={...t.extra,arguments:r},t))),he(t)})),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}catch(t){}A(r,t),P(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch(t){}return r}function Fe(t,e){const n=He(t,e),r={type:e&&e.name,value:Ve(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ze(t,e){return{exception:{values:[Fe(t,e)]}}}function He(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(Je.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const Je=/Minified React error #\d+;/i;function Ve(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function We(t,e,n,r){const o=Ke(t,e,n&&n.syntheticException||void 0,r);return bt(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Nt(o)}function Ke(t,i,s,u,d){let l;if(r(i)&&i.error){return ze(t,i.error)}if(o(i)||n(i,"DOMException")){const e=i;if("stack"in i)l=ze(t,i);else{const n=e.name||(o(e)?"DOMError":"DOMException"),r=e.message?`${n}: ${e.message}`:n;l=Xe(t,r,s,u),St(l,r)}return"code"in e&&(l.tags={...l.tags,"DOMException.code":`${e.code}`}),l}if(e(i))return ze(t,i);if(a(i)||c(i)){return l=function(t,e,n,r){const o=le().getClient(),i=o&&o.getOptions().normalizeDepth,s={exception:{values:[{type:c(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Ze(e,{isUnhandledRejection:r})}]},extra:{__serialized__:kt(e,i)}};if(n){const e=He(t,n);e.length&&(s.exception.values[0].stacktrace={frames:e})}return s}(t,i,s,d),bt(l,{synthetic:!0}),l}return l=Xe(t,i,s,u),St(l,`${i}`,void 0),bt(l,{synthetic:!0}),l}function Xe(t,e,n,r){const o={message:e};if(r&&n){const r=He(t,n);r.length&&(o.exception={values:[{value:e,stacktrace:{frames:r}}]})}return o}function Ze(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(Y(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return p(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:p(r,e)}return""}(t),o=e?"promise rejection":"exception";if(r(t))return`Event \`ErrorEvent\` captured as ${o} with message \`${t.message}\``;if(c(t)){return`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${o}`}return`Object captured as ${o} with keys: ${n}`}class Qe extends Re{constructor(t){const e=Ge.SENTRY_SDK_SOURCE||"npm";t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${e}:@sentry/browser`,version:Le}],version:Le},super(t),t.sendClientReports&&Ge.document&&Ge.document.addEventListener("visibilitychange",(()=>{"hidden"===Ge.document.visibilityState&&this._flushOutcomes()}))}eventFromException(t,e){return We(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,o){const i=Xe(t,e,r&&r.syntheticException||void 0,o);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),Nt(i)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const o={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:L(r)}},i=function(t){return[{type:"user_report"},t]}(t);return Yt(o,[i])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log("Sending outcomes:",t);const e=(n=t,Yt((r=this._options.tunnel&&L(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||At(),discarded_events:n}]]));var n,r,o;this._sendEnvelope(e)}}let tn;function en(t,e=function(){if(tn)return tn;if(tt(Ge.fetch))return tn=Ge.fetch.bind(Ge);const t=Ge.document;let e=Ge.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return tn=e.bind(Ge)}()){let n=0,r=0;return Ce(t,(function(o){const i=o.body.length;n+=i,r++;const s={body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,s).then((t=>(n-=i,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return tn=void 0,n-=i,r--,Ot(t)}}))}const nn=4;function rn(t){return Ce(t,(function(e){return new Ct(((n,r)=>{const o=new XMLHttpRequest;o.onerror=r,o.onreadystatechange=()=>{o.readyState===nn&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&o.setRequestHeader(e,t.headers[e]);o.send(e.body)}))}))}const on="?";function sn(t,e,n,r){const o={filename:t,function:e,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const an=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cn=/\((\S*)(?::(\d+))(?::(\d+))\)/,un=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,dn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ln=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,pn=W(...[[30,t=>{const e=an.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=cn.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=fn(e[1]||on,e[2]);return sn(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=un.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=dn.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||on;return[n,t]=fn(n,t),sn(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=ln.exec(t);return e?sn(e[2],e[1]||on,+e[3],e[4]?+e[4]:void 0):void 0}]]),fn=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:on,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class hn{static __initStatic(){this.id="GlobalHandlers"}constructor(t){this.name=hn.id,this._options={onerror:!0,onunhandledrejection:!0,...t},this._installFunc={onerror:_n,onunhandledrejection:gn}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const n in t){const r=this._installFunc[n];r&&t[n]&&(e=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.log(`Global Handler attached: ${e}`),r(),this._installFunc[n]=void 0)}var e}}function _n(){at("error",(t=>{const[e,n,o]=vn();if(!e.getIntegration(hn))return;const{msg:s,url:a,line:c,column:u,error:d}=t;if(Me()||d&&d.__sentry_own_request__)return;const l=void 0===d&&i(s)?function(t,e,n,o){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=r(t)?t.message:t,a="Error";const c=s.match(i);c&&(a=c[1],s=c[2]);const u={exception:{values:[{type:a,value:s}]}};return mn(u,e,n,o)}(s,a,c,u):mn(Ke(n,d||s,void 0,o,!1),a,c,u);l.level="error",yn(e,d,l,"onerror")}))}function gn(){at("unhandledrejection",(t=>{const[e,n,r]=vn();if(!e.getIntegration(hn))return;let o=t;try{"reason"in t?o=t.reason:"detail"in t&&"reason"in t.detail&&(o=t.detail.reason)}catch(t){}if(Me()||o&&o.__sentry_own_request__)return!0;const i=s(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Ke(n,o,void 0,r,!0);i.level="error",yn(e,o,i,"onunhandledrejection")}))}function mn(t,e,n,r){const o=t.exception=t.exception||{},s=o.values=o.values||[],a=s[0]=s[0]||{},c=a.stacktrace=a.stacktrace||{},u=c.frames=c.frames||[],d=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,p=i(e)&&e.length>0?e:function(){try{return T.document.location.href}catch(t){return""}}();return 0===u.length&&u.push({colno:d,filename:p,function:"?",in_app:!0,lineno:l}),t}function yn(t,e,n,r){bt(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function vn(){const t=le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}hn.__initStatic();const En=["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"];class Sn{static __initStatic(){this.id="TryCatch"}constructor(t){this.name=Sn.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&j(Ge,"setTimeout",bn),this._options.setInterval&&j(Ge,"setInterval",bn),this._options.requestAnimationFrame&&j(Ge,"requestAnimationFrame",wn),this._options.XMLHttpRequest&&"XMLHttpRequest"in Ge&&j(XMLHttpRequest.prototype,"send",Tn);const t=this._options.eventTarget;if(t){(Array.isArray(t)?t:En).forEach(xn)}}}function bn(t){return function(...e){const n=e[0];return e[0]=qe(n,{mechanism:{data:{function:X(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function wn(t){return function(e){return t.apply(this,[qe(e,{mechanism:{data:{function:"requestAnimationFrame",handler:X(t)},handled:!1,type:"instrument"}})])}}function Tn(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&j(n,t,(function(e){const n={mechanism:{data:{function:t,handler:X(e)},handled:!1,type:"instrument"}},r=G(e);return r&&(n.mechanism.data.handler=X(r)),qe(e,n)}))})),t.apply(this,e)}}function xn(t){const e=Ge,n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(j(n,"addEventListener",(function(e){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=qe(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:X(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return e.apply(this,[n,qe(r,{mechanism:{data:{function:"addEventListener",handler:X(r),target:t},handled:!1,type:"instrument"}}),o])}})),j(n,"removeEventListener",(function(t){return function(e,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,o,r)}})))}Sn.__initStatic();const kn=1024;class Rn{static __initStatic(){this.id="Breadcrumbs"}constructor(t){this.name=Rn.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){if(this.options.console&&at("console",Nn),this.options.dom&&at("dom",function(t){function e(e){let n,r="object"==typeof t?t.serializeAttribute:void 0,o="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;o&&o>kn&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=kn),"string"==typeof r&&(r=[r]);try{const t=e.event;n=function(t){return!!t&&!!t.target}(t)?k(t.target,{keyAttrs:r,maxStringLength:o}):k(t,{keyAttrs:r,maxStringLength:o})}catch(t){n=""}0!==n.length&&le().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})}return e}(this.options.dom)),this.options.xhr&&at("xhr",On),this.options.fetch&&at("fetch",Cn),this.options.history&&at("history",Un),this.options.sentry){const t=le().getClient();t&&t.on&&t.on("beforeSendEvent",Dn)}}}function Dn(t){le().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Et(t)},{event:t})}function Nn(t){const e={category:"console",data:{arguments:t.args,logger:"console"},level:(n=t.level,"warn"===n?"warning":$t.includes(n)?n:"log"),message:f(t.args," ")};var n;if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${f(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}le().addBreadcrumb(e,{input:t.args,level:t.level})}function On(t){const{startTimestamp:e,endTimestamp:n}=t,r=t.xhr[rt];if(!e||!n||!r)return;const{method:o,url:i,status_code:s,body:a}=r,c={method:o,url:i,status_code:s},u={xhr:t.xhr,input:a,startTimestamp:e,endTimestamp:n};le().addBreadcrumb({category:"xhr",data:c,type:"http"},u)}function Cn(t){const{startTimestamp:e,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const r=t.fetchData,o={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};le().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},o)}else{const r={...t.fetchData,status_code:t.response&&t.response.status},o={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};le().addBreadcrumb({category:"fetch",data:r,type:"http"},o)}}function Un(t){let e=t.from,n=t.to;const r=Lt(Ge.location.href);let o=Lt(e);const i=Lt(n);o.path||(o=r),r.protocol===i.protocol&&r.host===i.host&&(n=i.relative),r.protocol===o.protocol&&r.host===o.host&&(e=o.relative),le().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}Rn.__initStatic();class Ln{static __initStatic(){this.id="LinkedErrors"}constructor(t={}){this.name=Ln.id,this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(){}preprocessEvent(t,e,n){const r=n.getOptions();g(Fe,r.stackParser,r.maxValueLength,this._key,this._limit,t,e)}}Ln.__initStatic();class $n{static __initStatic(){this.id="HttpContext"}constructor(){this.name=$n.id}setupOnce(){}preprocessEvent(t){if(!Ge.navigator&&!Ge.location&&!Ge.document)return;const e=t.request&&t.request.url||Ge.location&&Ge.location.href,{referrer:n}=Ge.document||{},{userAgent:r}=Ge.navigator||{},o={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:o};t.request=i}}$n.__initStatic();class Bn{static __initStatic(){this.id="Dedupe"}constructor(){this.name=Bn.id}setupOnce(t,e){}processEvent(t){if(t.type)return t;try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!jn(t,e))return!1;if(!In(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=Pn(e),r=Pn(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!jn(t,e))return!1;if(!In(t,e))return!1;return!0}(t,e))return!0;return!1}(t,this._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&C.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){}return this._previousEvent=t}}function In(t,e){let n=An(t),r=An(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t{void 0!==t&&t!==e&&Mn(le())}))}()}function Mn(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function qn(t,e=["authorization","token","ssn"]){if("object"!=typeof t||null===t)return t;try{return function t(n){return Object.entries(n).reduce(((n,[r,o])=>"object"==typeof o&&null!==o?{...n,[r]:t(o)}:{...n,[r]:e.includes(r.toLowerCase())?"[REDACTED]":o}),{})}(JSON.parse(JSON.stringify(t)))}catch(e){return console.warn("@ok/sentry captureException: Error while sanitizing error object",e),t}}function Fn(t,e){try{if(t&&"AxiosError"===t?.name){const n=qn(t);if(e?.contexts?.report?.info){const t=qn(e),r=function(t){try{if("string"!=typeof t)return t;const e=qn(JSON.parse(t));return JSON.stringify(e)}catch(e){return t}}(t?.contexts?.report?.info);return{exception:n,captureContext:{...t,contexts:{...t?.contexts,report:{...t?.contexts?.report,info:r}}}}}return{exception:n,captureContext:e}}return{exception:t,captureContext:e}}catch(n){return{exception:t,captureContext:e}}}const zn={message:"capture event",level:"info"},Hn=(t,e)=>{const{type:n,value:r}=e||{};if(!n&&!r)return t;const o={};if("string"==typeof n&&(o.type=n),"string"==typeof r&&(o.value=r),t&&t.values&&t.values.length){return{values:t.values.map((t=>{const e=o.type??t.type;return Object.assign({},t,{type:e})}))}}return{values:[o]}};const Jn=[{id:14,name:"/okfe/balance/",token:"90e92d576a744c048ef079540615e419"},{id:25,name:"/okfe/comb-trade/",token:"efc986e8cd9d46ae9aa1f455b6b0f383"},{id:32,name:"/okfe/defi-mode/",token:"78f39293a21b49f58a46fc3df0ae616c"},{id:35,name:"/okfe/p2p/",token:"a7469d35150046bcbf1f2827e2887018"},{id:36,name:"/okexchain/universe-swap/",token:"5402db24f78847a8bde4df03b259f3cc"},{id:64,name:"/okfe/invest/",token:"dd5871697f6c478d833bae9428428263"},{id:136,name:"/okfe/expressway/",token:"c3feecac5a4efc5c4f2340a1534da3ce"},{id:196,name:"/okfe/customer-service/",token:"b20d9b91c29b9810e01d642cc8b2abc1"},{id:160,name:"/okfe/okx-nav/",token:"b32011805ecf66fdb148c22d63d2803d"},{id:69,name:"/okfe/candle-chart/",token:"ad8c06d24d7743d087173c3fff709fce"},{id:206,name:"/okfe/util/ont/",token:"77d51bf92a0501485bb541a2ec96517e"},{id:243,name:"/okfe/blade/",token:"2b65098fbd898b1419f8241753fbf146"}],Vn=t=>{try{const e=JSON.parse(t),{id:n,token:r}=e.target_project||{};if(n&&r)return{id:n,token:r};const o=function(t){try{const e=JSON.parse(t);return e.exception.values[0].stacktrace.frames.map((t=>t.filename)).reverse()}catch(t){return[]}}(t),i=function(t){for(const e of t)for(const t of Jn){const n=t.name;if(e.indexOf(n)>=0)return t}}(o);return i||null}catch(t){return console.error(t),null}};function Wn(){try{const t=le().getClient(),e=Object.keys(t);for(const n of e)if(t[n]&&t[n].projectId)return t[n].projectId;return""}catch(t){return""}}let Kn=[];const Xn=new Map;function Zn(){return JSON.parse(JSON.stringify(Kn))}function Qn(){Kn.length=0,Kn=[]}function tr(t){Xn.delete(t)}const er=["transaction","customize"],nr=6e4,rr=.01,or=1073741824,ir=1e4,sr=10,ar=2e3,cr=1e4,ur=["/quotedPrice","priapi/v1/wallet/gas/multi-gas-price","/apmfe/api/","/amplitude","/umd/web/metric/v1"],dr=window?.location?.host||"",lr=window?.location?.port||"";function pr(t){const e=t[0],n=[];return t?.forEach?.((t=>{t?.body&&n.push(t.body)})),{...e,body:JSON.stringify(n)}}function fr(){Xn.size>0&&Xn?.forEach?.(((t,e)=>{if(t&&e){const n=pr(t);if(n?.body)try{fetch(e,n)}catch(t){}}tr(e)}))}dr?.includes("localhost")||dr?.includes("dev.local")||dr?.includes("local:8443")||dr?.includes("127.0.0.1")&&["16801","13861","15562"].includes(lr);let hr=null;function _r(t,e,n=ir){return new Promise(((r,o)=>{if(t&&e){!function(t,e){e&&t&&(Xn.has(e)?Xn.set(e,Xn.get(e).concat(t)):Xn.set(e,[t]))}(t,e),clearTimeout(hr);const o=function(t){return Xn.get(t)}(e);o?.length>=sr?(r(o),tr(e),fr()):hr=setTimeout((()=>{o?.length&&(r(o),tr(e),fr())}),n)}else o()}))}var gr="1.1.19";function mr(t){return en({...t,headers:{...t.headers,"content-type":"application/json;charset=UTF-8"},fetchOptions:{...t.fetchOptions,priority:"low"}},(async(t,e)=>{try{const n=function(t,e){const n=new URL(t),r=new URLSearchParams(n.search.slice(1));r.append("v",gr);const o=n.pathname.replace("/envelope","/batch/envelope"),i=`${n.origin}${o}?${r.toString()}`;try{const t=(e?.body||"").split("\n")[2]||"",n=Wn(),r=Vn(t);if(!n||!r)return{requestUrl:i,options:e};const o=new URL(i),s=new URLSearchParams(o.search.slice(1));s.set("sentry_key",r.token);const a=s.toString(),c=o.pathname.replace(`/${n}/`,`/${r.id}/`);return{requestUrl:`${o.origin}${c}?${a}`,options:e}}catch(t){return{requestUrl:i,options:e}}}(t,e),r=await _r(n.options,n.requestUrl);if(r?.length){const t=pr(r);return t?.body?await window.fetch(n.requestUrl,t):null}return null}catch(t){return null}}))}const yr={isInner:!1,resourceSamplingRate:.01,apiThreshold:2e3,debug:!1};function vr(t){return null==t||""===t}function Er(t){return t<0?0:t>nr?null:t}function Sr(){const t=window.navigator.userAgent.split(" ");for(const e of t)if("OKApp"===e.slice(0,5))return e.slice(7,e.length-1);return""}function br(t){return window.localStorage.getItem(t)||""}function wr(t){_e({message:"pageResource",metric_name:"pageResource",spans:t,type:"customize"})}let Tr=null;function xr(t,e=3500){var n;n=t,Kn=(Zn()||[]).concat(n),clearTimeout(Tr);const r=Zn();r?.length>=30?(wr(r),Qn()):Tr=setTimeout((()=>{r?.length&&(wr(r),Qn())}),e)}function kr(t){if(!t)return null;const e=function(t){const e=new URL(t).pathname,n=e.lastIndexOf(".");return-1===n?function(t){const e=t.substring(0,15);return e.includes("image/png")?"png":e.includes("image/jpeg")?"jpeg":e.includes("image/gif")?"gif":e.includes("image/webp")?"webp":e.includes("image/svg")?"svg":e.includes("application/pdf")?"pdf":""}(t):e.slice(n+1).toLowerCase()}(t);if(!e)return null;return["png","jpg","jpeg","gif","bmp","webp","svg","ico","tiff","tif"].includes(e)?"img":["css","scss","less"].includes(e)?"link":["js","ts","jsx","mjs"].includes(e)?"script":""}const Rr=S,Dr=class t{constructor(){this.name=t.id}setupOnce(){te((async e=>{const n=er.includes(e?.type);if(le().getIntegration(t)){if(!Rr.navigator&&!Rr.location&&!Rr.document)return e;if(!n)return e;const{host:t,pathname:r,href:o}=Rr.location,i=await async function(){let t=!1;try{const e=await(navigator?.userAgentData?.getHighEntropyValues?.(["platformVersion"]));if("Windows"===navigator?.userAgentData?.platform){if(!(parseInt(e?.platformVersion.split(".")[0],10)>=13))return!1;t=!0}return t}catch(t){return!1}}(),s={width:window.screen.width,height:window.screen.height},a=e?.request?.url?.split("?")?.[0],c={...e.request,host:t,path:r,isWindows11OrLater:i,url:a,orginUrl:o},u={name:e.sdk?.name,version:e.sdk?.version},d={...e,tags:{...e.tags,screenResolution:`${s.width}x${s.height}`},request:c,breadcrumbs:[],sdk:{...u,"@ok/sentry":gr}};return delete d.breadcrumbs,d}return e}))}};Dr.id="RequestInterceptor";let Nr=Dr;const Or=S,Cr=class t{constructor(){this.name=t.id}setupOnce(){te((e=>{if(le().getIntegration(t)){if(!Or?._okGlobal&&!Or?.okGlobal)return e;let t="";const n=Or?._okGlobal||window?.okGlobal||{},r=Or?.__INIT_STATE__?.appContext?.project;t=r||(n?.site?.sign||"");const o=function(){try{const t=performance.getEntriesByType("resource"),e=window?._okGlobal?.cdnBaseUrl,n=new URL(e||"")?.hostname||"",r=t?.filter((t=>(new URL(t.name)?.hostname||"")===n)),o=r?.filter((t=>0===t?.transferSize));return o?.length&&r?.length?(o.length/r.length)?.toFixed(4):0}catch(t){return 0}}(),i={projectName:t,site:n?.site?.sign,OKApp:Sr(),devId:br("devId"),deviceId:br("deviceId"),locale:br("locale")||n?.locale,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,isApp:String(n?.isApp),isSSRSuccess:Or?.__INIT_STATE__?.appContext?.isSSRSuccess,faasUseSSR:Or?.__INIT_STATE__?.appContext?.faasUseSSR,greyScale:n?.greyScale,cdnBaseUrl:n?.cdnBaseUrl,resourceCacheRatio:o},s=function(t){const e=window.localStorage.getItem(t);return e?JSON.parse(e):null}("ok_global"),{uuid:a,loginName:c,lastLogin:u}=s?.profile||{},d={id:a||"0",ip_address:u?.ipAddress,ip_region:u?.ipRegion,login_date:u?.loginDate,login_name:c};return{...e,tags:{...e.tags,...i},user:{...e.user,...d}}}return e}))}};Cr.id="OkGlobalHandler";let Ur=Cr;function Lr(t){if(!t.type)throw new Error("report: type params is required");const{type:e,message:n="",extra:r}=t;_e({message:n,metric_name:e,extra:r,level:"info",type:"customize"})}var $r,Br,Ir,jr,Pr,Ar=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Gr=function(t){if("loading"===document.readyState)return"loading";var e=Ar();if(e){if(t(e||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;t=r.parentNode}}catch(t){}return n},qr=-1,Fr=function(){return qr},zr=function(t){addEventListener("pageshow",(function(e){e.persisted&&(qr=e.timeStamp,t(e))}),!0)},Hr=function(){var t=Ar();return t&&t.activationStart||0},Jr=function(t,e){var n=Ar(),r="navigate";return Fr()>=0?r="back-forward-cache":n&&(document.prerendering||Hr()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Vr=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},Wr=function(t,e,n,r){var o,i;return function(s){e.value>=0&&(s||r)&&((i=e.value-(o||0))||void 0===o)&&(o=e.value,e.delta=i,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e))}},Kr=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Xr=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},Zr=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},Qr=-1,to=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},eo=function(t){"hidden"===document.visibilityState&&Qr>-1&&(Qr="visibilitychange"===t.type?t.timeStamp:0,ro())},no=function(){addEventListener("visibilitychange",eo,!0),addEventListener("prerenderingchange",eo,!0)},ro=function(){removeEventListener("visibilitychange",eo,!0),removeEventListener("prerenderingchange",eo,!0)},oo=function(){return Qr<0&&(Qr=to(),no(),zr((function(){setTimeout((function(){Qr=to(),no()}),0)}))),{get firstHiddenTime(){return Qr}}},io=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},so=[1800,3e3],ao=function(t,e){e=e||{},io((function(){var n,r=oo(),o=Jr("FCP"),i=Vr("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(i.disconnect(),t.startTimer.value&&(r.value=o,r.entries=i,n())},a=Vr("layout-shift",s);a&&(n=Wr(t,r,co,e.reportAllChanges),Xr((function(){s(a.takeRecords()),n(!0)})),zr((function(){o=0,r=Jr("CLS",0),n=Wr(t,r,co,e.reportAllChanges),Kr((function(){return n()}))})),setTimeout(n,0))})))}((function(e){!function(t){if(t.entries.length){var e=t.entries.reduce((function(t,e){return t&&t.value>e.value?t:e}));if(e&&e.sources&&e.sources.length){var n=(r=e.sources).find((function(t){return t.node&&1===t.node.nodeType}))||r[0];if(n)return void(t.attribution={largestShiftTarget:Mr(n.node),largestShiftTime:e.startTime,largestShiftValue:e.value,largestShiftSource:n,largestShiftEntry:e,loadState:Gr(e.startTime)})}}var r;t.attribution={}}(e),t(e)}),e)},lo=function(t,e){ao((function(e){!function(t){if(t.entries.length){var e=Ar(),n=t.entries[t.entries.length-1];if(e){var r=e.activationStart||0,o=Math.max(0,e.responseStart-r);return void(t.attribution={timeToFirstByte:o,firstByteToFCP:t.value-o,loadState:Gr(t.entries[0].startTime),navigationEntry:e,fcpEntry:n})}}t.attribution={timeToFirstByte:0,firstByteToFCP:t.value,loadState:Gr(Fr())}}(e),t(e)}),e)},po={passive:!0,capture:!0},fo=new Date,ho=function(t,e){$r||($r=e,Br=t,Ir=new Date,mo(removeEventListener),_o())},_o=function(){if(Br>=0&&Br1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){ho(t,e),o()},r=function(){o()},o=function(){removeEventListener("pointerup",n,po),removeEventListener("pointercancel",r,po)};addEventListener("pointerup",n,po),addEventListener("pointercancel",r,po)}(e,t):ho(e,t)}},mo=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,go,po)}))},yo=[100,300],vo=function(t,e){e=e||{},io((function(){var n,r=oo(),o=Jr("FID"),i=function(t){t.startTimee.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};Co[r.id]=r,Oo.push(r)}Oo.sort((function(t,e){return e.latency-t.latency})),Oo.splice(10).forEach((function(t){delete Co[t.id]}))}},Lo=function(t,e){!function(t,e){e=e||{},io((function(){var n;ko();var r,o=Jr("INP"),i=function(t){t.forEach((function(t){t.interactionId&&Uo(t),"first-input"===t.entryType&&!Oo.some((function(e){return e.entries.some((function(e){return t.duration===e.duration&&t.startTime===e.startTime}))}))&&Uo(t)}));var e,n=(e=Math.min(Oo.length-1,Math.floor(No()/50)),Oo[e]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())},s=Vr("event",i,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Wr(t,o,Ro,e.reportAllChanges),s&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),Xr((function(){i(s.takeRecords()),o.value<0&&No()>0&&(o.value=0,o.entries=[]),r(!0)})),zr((function(){Oo=[],Do=xo(),o=Jr("INP"),r=Wr(t,o,Ro,e.reportAllChanges)})))}))}((function(e){!function(t){if(t.entries.length){var e=t.entries.sort((function(t,e){return e.duration-t.duration||e.processingEnd-e.processingStart-(t.processingEnd-t.processingStart)}))[0],n=t.entries.find((function(t){return t.target}));t.attribution={eventTarget:Mr(n&&n.target),eventType:e.name,eventTime:e.startTime,eventEntry:e,loadState:Gr(e.startTime)}}else t.attribution={}}(e),t(e)}),e)},$o=[2500,4e3],Bo={},Io=function(t,e){!function(t,e){e=e||{},io((function(){var n,r=oo(),o=Jr("LCP"),i=function(t){var e=t[t.length-1];e&&e.startTimeperformance.now())return;n.value=Math.max(i-Hr(),0),n.entries=[o],r(!0),zr((function(){n=Jr("TTFB",0),(r=Wr(t,n,jo,e.reportAllChanges))(!0)}))}}))},Go=function(t,e){Ao((function(e){!function(t){if(t.entries.length){var e=t.entries[0],n=e.activationStart||0,r=Math.max(e.domainLookupStart-n,0),o=Math.max(e.connectStart-n,0),i=Math.max(e.requestStart-n,0);t.attribution={waitingTime:r,dnsTime:o-r,connectionTime:i-o,requestTime:t.value-i,navigationEntry:e}}else t.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(e),t(e)}),e)};function Yo(){return navigator.userAgent.includes("HeadlessChrome TestPlatform")}function Mo(t){const{name:e,value:n,attribution:r,navigationType:o="",rating:i=""}=t;if(0===n)return;let s={navigationType:o,rating:i},a={},c={};switch(function(t){Yo()&&(console.log(`HeadlessChrome recordWebVitals(${t.name}): `,JSON.parse(JSON.stringify(t))),window._webvital_metrics[t.name]=t)}(t),e){case"CLS":a={"cls.largestShiftTarget":r.largestShiftTarget},s={...s,c1:r?.largestShiftTarget};break;case"INP":r&&r?.eventEntry&&(c=function(t){try{const e=Math.max(t.processingEnd+4,t.startTime+t.duration);return{"inp.inputDelay":Math.round(t.processingStart-t.startTime),"inp.processingTime":Math.round(t.processingEnd-t.processingStart),"inp.presentationDelay":Math.round(e-t.processingEnd)}}catch(t){return{}}}(r.eventEntry)),a={...c},s={...s,c1:r?.eventTarget,c2:r?.eventType,c3:c?.["inp.inputDelay"],c4:c?.["inp.processingTime"],c5:c?.["inp.presentationDelay"]};break;case"FID":a={"fid.eventTarget":r?.eventTarget},s={...s,c1:r?.eventTarget};break;case"LCP":a={"lcp.element":r?.element,"lcp.url":r?.url,"lcp.size":r?.lcpEntry?.size},s={...s,c1:r?.element}}const u=e.toLowerCase();_e({message:"web-vitals",metric_name:u,extra:{...a,...s},measurements:{[u]:{value:n}},type:"customize"})}let qo={};const Fo=function(t,e){let n;return function(...r){const o=this;n&&clearTimeout(n),n=setTimeout((()=>{t.apply(o,r),n=null}),e)}}((function(){Mo(qo)}),1e3);function zo(){Yo()&&(window._webvital_metrics={}),Io(Mo),Eo(Mo),Go(Mo),lo(Mo),Lo(Mo),uo((t=>{qo=t,Fo()}),{reportAllChanges:!0})}var Ho=(t=>(t.load="load",t.firstByte="firstByte",t.domReady="domReady",t.dns="dns",t.tcp="tcp",t.request="request",t.response="response",t.resEnd="resEnd",t.domParse="domParse",t.resourceLoad="resourceLoad",t))(Ho||{});function Jo(t,e="resource",n="random"){if(!function(t){try{if(!t?.transferSize||!t?.encodedBodySize)return!1;if(t.encodedBodySize>=or)return!1;if(ur.some((e=>t.name.includes(e))))return!1;if(t?.duration>nr)return!1;const e="xmlhttprequest"==t?.initiatorType||"fetch"==t?.initiatorType,n=yr?.isInner?yr?.apiThreshold||0:ar;return yr?.debug&&console.log("curApiThreshold",n,yr),!(e&&t?.duration0&&r<=nr&&o>0&&o<=nr))return null;{const t={[Ho.domParse]:{value:Er(e)},[Ho.domReady]:{value:Er(r)},[Ho.resourceLoad]:{value:Er(n)},[Ho.load]:{value:Er(o)}};b={...b,...t},w="resource.html"}}return{op:w,url:o,host:r,duration:h,size:{transferSize:t.transferSize,encodedBodySize:t.encodedBodySize,decodedBodySize:t.decodedBodySize},timing:b,serverTiming:f,nextHopProtocol:_,flag:n}}function Vo(t,e="resource",n="random"){const r=[];return t?.forEach?.((t=>{const o=Jo(t,e,n);o&&r.push(o)})),r}const Wo="pageload";function Ko(){setTimeout((()=>{const t=function(){try{if(!window?.performance&&!window?.performance?.getEntries)return;const t=window?.performance?.getEntriesByType?.("navigation")?.[0],{domInteractive:e,domContentLoadedEventEnd:n,responseStart:r,responseEnd:o,fetchStart:i,loadEventStart:s,domainLookupStart:a,domainLookupEnd:c,connectStart:u,connectEnd:d,requestStart:l}=t,p=r-i,f=n-i,h=s-i,_=c-a,g=d-u,m=r-l,y=o-r,v=o-i,E=e-o,S=s-n;return f>0&&f<=nr&&h>0&&h<=nr?{[Ho.dns]:{value:Er(_)},[Ho.tcp]:{value:Er(g)},[Ho.request]:{value:Er(m)},[Ho.firstByte]:{value:Er(p)},[Ho.response]:{value:Er(y)},[Ho.resEnd]:{value:Er(v)},[Ho.domParse]:{value:Er(E)},[Ho.domReady]:{value:Er(f)},[Ho.resourceLoad]:{value:Er(S)},[Ho.load]:{value:Er(h)}}:{}}catch(t){return{}}}();_e({message:Wo,metric_name:Wo,measurements:{...t},type:"customize"})}),0)}function Xo(){"visible"===document.visibilityState&&Ko()}const Zo=[Ho.dns,Ho.tcp,Ho.request,Ho.response];function Qo(t,e){const n=t.filter((t=>t.host===e)),r=[];return Zo?.forEach?.((t=>{const e=function(t,e){const{maxAValue:n,item:r}=t.reduce(((t,n)=>n.timing[e].value>t.maxAValue?{maxAValue:n.timing[e].value,item:n}:t),{maxAValue:t[0].timing[e].value,item:t[0]});return n?r:t[Math.floor(Math.random()*t.length)]}(n,t);r.findIndex((t=>t.url===e.url))<0&&r.push(e)})),r}const ti=[new Nr];const ei=!window?._okGlobal&&!window?.okGlobal,ni=["local","dev","development","daily","pre","prod","production"];window.OkPerf={customLog:function(t){Lr({type:t.type,extra:{c1:t?.attributes?.extranKey,c2:t?.attributes?.extra1Key?`${t?.attributes?.extra1Key}`:"",c3:t?.attributes?.extra2Key?`${t?.attributes?.extra2Key}`:""}})}},function(){try{zo(),window.addEventListener("load",(()=>{"visible"===document.visibilityState?Ko():document.addEventListener("visibilitychange",(()=>{Xo()}))})),window.addEventListener("popstate",Xo),window.addEventListener("pushState",Xo),window.addEventListener("replaceState",Xo),window.addEventListener("load",(()=>{!function(){try{setTimeout((()=>{if(!window?.performance&&!window?.performance?.getEntries)return;const t=window?.performance?.getEntriesByType?.("navigation")?.[0];if(t){const e=Jo(t,"html");e&&wr([e])}}))}catch(t){console.warn("Current browser does not support performance.getEntriesByType")}}(),function(){try{if(!window?.performance&&!window?.performance?.getEntries)return;const t=new PerformanceObserver((e=>{const n=Vo(e.getEntries(),"resource","max"),r=[];if(n?.length){const t=new Set;n?.forEach?.((e=>t.add(e.op)));const e=[...t];e?.forEach?.((t=>{const e=n.filter((e=>e.op===t)),o=new Set;e?.forEach?.((t=>o.add(t.host)));const i=[...o];i?.forEach?.((t=>{const n=Qo(e,t);r.push(...n)}))})),r?.length&&xr(r)}return setTimeout((()=>{t.disconnect()}),cr),r}));t.observe({type:"resource",buffered:!0})}catch(t){console.warn(`@ok/sentry error: getResourceMaxEntries ${t}`)}}(),function(){try{if(!window?.performance&&!window?.performance?.getEntries)return;const t=new PerformanceObserver((e=>{const n=Vo(e.getEntries());yr?.debug&&console.log("随机上报",n),n?.length&&xr(n),yr?.isInner&&1==yr?.resourceSamplingRate||setTimeout((()=>{t.disconnect()}),cr)}));t.observe({type:"resource",buffered:!0})}catch(t){console.warn(`@ok/sentry error: getResourceRandomEntries ${t}`)}}()})),(t=>{const e=e=>{"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};window.addEventListener("visibilitychange",e,!0),window.addEventListener("pagehide",e,!0)})((()=>{fr()}))}catch(t){console.warn("defaultCustomReport error",t)}}();var ri={init:function(t,e){const n=t;try{const t=Boolean(e&&e.debug);n.isInner=n?.isInner||ei,"function"!=typeof n.integrations&&(n.integrations=(o=n.integrations,i=n?.isInner,"function"==typeof o?o:(o=o||[],i?[...o,...ti]:[...o,new Ur,...ti]))),"number"!=typeof n.tracesSampleRate&&(n.tracesSampleRate=1),n.tracePropagationTargets||(n.tracePropagationTargets=[]),n?.autoSessionTracking||(n.autoSessionTracking=!1),n.transport=mr;const s=function(){const t=window._okGlobal||window.okGlobal;return t?.envSign||""}();if(s&&(n.environment=s),!n.environment||!ni.includes(n.environment))throw new Error(`please check environment value should be one of ${ni}, now is ${n.environment}`);if(!n.dsn)throw new Error("dsn value is required");try{n.environment="local"===(r=n.environment)||"development"===r?"dev":"test"===r?"daily":"production"===r?"prod":r}catch(t){console.warn(`@ok/sentry: transformEnv error: ${t}`)}if(n?.isInner)return vr(n?.resourceSamplingRate)||function(t){for(const e in yr)vr(t[e])||(yr[e]=t[e])}({isInner:!0,resourceSamplingRate:n?.resourceSamplingRate,apiThreshold:n?.apiThreshold}),Yn(n),void ge("isInner","true");if(!n.dsn)return void Yn(n);n.dsn=function(t,e,n=!1){const r=-1===t.indexOf("/apmfe")?"/apmfe":"",o=e.match(/daily/)||"localhost"===window.document.domain||n?"sentry.coinall.ltd":window.document.domain;return-1===t.indexOf(".ltd")?t.replace(/(https:)|(http:)/,window.document.location.protocol).replace(/@.*com?/,"@"+o+r):t.replace(/(https:)|(http:)/,window.document.location.protocol).replace(/@.*ltd?/,"@"+o+r)}(n.dsn,s,n.isInner),n.allowUrls=function(t){const e=window._okGlobal||window.okGlobal,n=e?.cdnBaseUrl||"";return t=t||[],n&&"string"==typeof n?[window.origin,n,...t]:t}(n.allowUrls),!t&&s.match(/daily/)||(Yn(n),ge("isInner","false"))}catch(t){console.error(`init @ok/sentry fail, error ${t}`)}var r,o,i},report:Lr,captureException:function(t,e){try{const n=Fn(t,e);he(n?.exception,n?.captureContext)}catch(n){he(t,e)}},captureMessage:function(t,e){const n="string"==typeof e?e:void 0,r="string"!=typeof e?{captureContext:e}:void 0;return le().captureMessage(t,n,r)},captureEvent:function(t,e,n){n=t.customConfig||n;const r=Object.assign({},zn,t);for(const t of Object.keys(n||{})){const e=n[t];"error"===t?r.exception=Hn(r.exception,e):"project"===t&&e&&e.id&&e.token&&(r.target_project={...e})}_e(r,e)},setTag:ge,setTags:function(t){le().setTags(t)},setUser:function(t){le().setUser(t)},setExtra:function(t,e){le().setExtra(t,e)},setExtras:function(t){le().setExtras(t)},setContext:function(t,e){le().setContext(t,e)},addGlobalEventProcessor:te,addBreadcrumb:function(t){le().addBreadcrumb(t)},withScope:me,getCurrentHub:le,eventFromException:function(t,e,n){return We(pn,e,n)}};return ri})); +//# sourceMappingURL=index.umd.js.map