!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4af365af-77e0-55bd-b2aa-9dc7a453f18f")}catch(e){}}(); (()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();const t=Object.prototype.toString;function n(e){switch(t.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return d(e,Error)}}function r(e,n){return t.call(e)===`[object ${n}]`}function i(e){return r(e,"ErrorEvent")}function s(e){return r(e,"DOMError")}function o(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function a(e){return r(e,"Object")}function c(e){return"undefined"!=typeof Event&&d(e,Event)}function u(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function d(e,t){try{return e instanceof t}catch(e){return!1}}function l(e){return e&&e.Math==Math?e:void 0}const p="object"==typeof globalThis&&l(globalThis)||"object"==typeof window&&l(window)||"object"==typeof self&&l(self)||"object"==typeof e.g&&l(e.g)||function(){return this}()||{};function h(){return p}function f(e,t,n){const r=n||p,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}const g=h(),v=80;function m(e,t){const n=e,i=[];let s,o,a,c,u;if(!n||!n.tagName)return"";if(g.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;i.push(n.tagName.toLowerCase());const d=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(d&&d.length)d.forEach((e=>{i.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&i.push(`#${n.id}`),s=n.className,s&&r(s,"String"))for(o=s.split(/\s+/),u=0;u{const r=y[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const E=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return _?b.forEach((n=>{t[n]=(...t)=>{e&&w((()=>{p.console[n](`Sentry Logger [${n}]:`,...t)}))}})):b.forEach((e=>{t[e]=()=>{}})),t}();function S(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function I(e){if(n(e))return{message:e.message,name:e.name,stack:e.stack,...x(e)};if(c(e)){const t={type:e.type,target:O(e.target),currentTarget:O(e.currentTarget),...x(e)};return"undefined"!=typeof CustomEvent&&d(e,CustomEvent)&&(t.detail=e.detail),t}return e}function O(e){try{return"undefined"!=typeof Element&&d(e,Element)?function(e,t={}){if(!e)return"";try{let n=e;const r=5,i=[];let s=0,o=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||v;for(;n&&s++1&&o+i.length*c+u.length>=l));)i.push(u),o+=u.length,n=n.parentNode;return i.reverse().join(a)}catch(e){return""}}(e):Object.prototype.toString.call(e)}catch(e){return""}}function x(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function T(e){return C(e,new Map)}function C(e,t){if(function(e){if(!a(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=C(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(C(e,t))})),r}return e}function k(){const e=p,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function D(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function P(e,t){const n=function(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function A(e){if(e&&e.__sentry_captured__)return!0;try{!function(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){_&&E.log(`Failed to add non-enumerable property "${t}" to object`,e)}}(e,"__sentry_captured__",!0)}catch(e){}return!1}const N=1e3;function R(){return Date.now()/N}const M=function(){const{performance:e}=p;if(!e||!e.now)return R;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/N}();let F;(()=>{const{performance:e}=p;if(!e||!e.now)return void(F="none");const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=i{t(e)}))}function V(e){return new B(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(U||(U={}));class B{constructor(e){B.prototype.__init.call(this),B.prototype.__init2.call(this),B.prototype.__init3.call(this),B.prototype.__init4.call(this),this._state=U.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new B(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new B(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(U.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(U.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===U.PENDING&&(u(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===U.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===U.RESOLVED&&e[1](this._value),this._state===U.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function z(){return f("globalEventProcessors",(()=>[]))}function G(e){z().push(e)}function H(e,t,n,r=0){return new B(((i,s)=>{const o=e[r];if(null===t||"function"!=typeof o)i(t);else{const a=o({...t},n);$&&o.id&&null===a&&E.log(`Event processor "${o.id}" dropped event`),u(a)?a.then((t=>H(e,t,n,r+1).then(i))).then(null,s):H(e,a,n,r+1).then(i).then(null,s)}}))}function K(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||M(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:k()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t: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),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function W(e){return e.transaction}const q=1;function Y(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:s,status:o,tags:a,origin:c}=J(e);return T({data:r,op:i,parent_span_id:s,span_id:t,status:o,tags:a,trace_id:n,origin:c})}function J(e){return function(e){return"function"==typeof e.getSpanJSON}(e)?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function X(e,t,n){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},o=T({environment:r.environment||L,release:r.release,user_segment:s,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function Q(e){const t=ge();if(!t)return{};const n=X(J(e).trace_id||"",t,le().getScope()),r=W(e);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:s,source:o}=r.metadata;null!=s&&(n.sample_rate=`${s}`);const a=J(r);return o&&"url"!==o&&(n.transaction=a.description),n.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return Boolean(t&q)}(r)),t.emit&&t.emit("createDsc",n),n}function Z(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t,c=T(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=T(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const d=T(i);d&&Object.keys(d).length&&(e.user={...d,...e.user});const l=T(s);l&&Object.keys(l).length&&(e.contexts={...l,...e.contexts}),o&&(e.level=o),a&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Y(t),...e.contexts};const n=W(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Q(t),...e.sdkProcessingMetadata};const r=J(n).description;r&&(e.tags={transaction:r,...e.tags})}}(e,r),function(e,t){var n;e.fingerprint=e.fingerprint?(n=e.fingerprint,Array.isArray(n)?n:[n]):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}function ee(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:p,transactionName:h,span:f}=t;te(e,"extra",n),te(e,"tags",r),te(e,"user",i),te(e,"contexts",s),te(e,"sdkProcessingMetadata",a),o&&(e.level=o),h&&(e.transactionName=h),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...p}}function te(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}let ne;class re{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(e){return e?e.clone():new re}clone(){const e=new re;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&K(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e;if(t instanceof re){const e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(a(t)){const t=e;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)}return 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(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:R(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:i,_user:s,_level:o,_fingerprint:a,_eventProcessors:c,_propagationContext:u,_sdkProcessingMetadata:d,_transactionName:l,_span:p}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:i,user:s,level:o,fingerprint:a||[],eventProcessors:c,propagationContext:u,sdkProcessingMetadata:d,transactionName:l,span:p}}applyToEvent(e,t={},n=[]){return Z(e,this.getScopeData()),H([...n,...z(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:k();if(!this._client)return E.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:k();if(!this._client)return E.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:k();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(E.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}function ie(){return{traceId:k(),spanId:k().substring(16)}}const se="7.120.3",oe=parseFloat(se),ae=100;class ce{constructor(e,t,n,r=oe){let i,s;this._version=r,t?i=t:(i=new re,i.setClient(e)),n?s=n:(s=new re,s.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=s}isOlderThan(e){return this._version(this.popScope(),e)),(e=>{throw this.popScope(),e})):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:k(),r=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:k(),i=new Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:k();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=ae}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o={timestamp:R(),...e},a=i?w((()=>i(o,t))):o;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,t),n.addBreadcrumb(a,s))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=de(this);try{e(this)}finally{de(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return $&&E.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);return $&&!n&&(this.getClient()?E.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):E.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&function(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),K(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=L}=n&&n.getOptions()||{},{userAgent:s}=p.navigator||{},o=function(e){const t=M(),n={sid:k(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return T({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&K(n,e),n}({release:r,environment:i,user:t.getUser(),...s&&{userAgent:s},...e}),a=t.getSession&&t.getSession();return a&&"ok"===a.status&&K(a,{status:"exited"}),this.endSession(),t.setSession(o),o}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){const n=ue().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);$&&E.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function ue(){return p.__SENTRY__=p.__SENTRY__||{extensions:{},hub:void 0},p}function de(e){const t=ue(),n=pe(t);return he(t,e),n}function le(){const e=ue();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=ue()){return t=e,!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)&&!pe(e).isOlderThan(oe)||he(e,new ce),pe(e);var t}(e)}function pe(e){return f("hub",(()=>new ce),e)}function he(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function fe(e,t){le().setTag(e,t)}function ge(){return le().getClient()}const ve=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function me(e,t=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function _e(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}const be=/\(error: (.*)\)/,ye=/captureMessage|captureException/;const we="";function Ee(e,t=100,n=1/0){try{return Ie("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Se(e,t=3,n=102400){const r=Ee(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?Se(e,t-1,n):r;var i}function Ie(t,n,r=1/0,i=1/0,s=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e=i){h[e]="[MaxProperties ~]";break}const t=g[e];h[e]=Ie(e,t,l-1,i,s),f++}return c(n),h}function Oe(e,t=[]){return[e,t]}function xe(e,t){const[n,r]=e;return[n,[...r,t]]}function Te(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function Ce(e,t){return(t||new TextEncoder).encode(e)}function ke(e,t){const[n,r]=e;let i=JSON.stringify(n);function s(e){"string"==typeof i?i="string"==typeof e?i+e:[Ce(i,t),e]:i.push("string"==typeof e?Ce(e,t):e)}for(const e of r){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Ee(n))}s(e)}}return"string"==typeof i?i:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(i)}function De(e,t){const n="string"==typeof e.data?Ce(e.data,t):e.data;return[T({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Pe={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",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Ae(e){return Pe[e]}function Ne(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}class Re extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const Me="7";function Fe(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return n={sentry_key:e.publicKey,sentry_version:Me,...t&&{sentry_client:`${t.name}/${t.version}`}},Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join("&");var n}(e,r)}`}const Le=[];function $e(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ue(e,t,n){if(n[t.name])$&&E.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Le.indexOf(t.name)&&(t.setupOnce(G,le),Le.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if(e.addEventProcessor&&"function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}$&&E.log(`Integration installed: ${t.name}`)}}const je=new WeakMap,Ve="Not capturing exception because it's already been captured.";class Be{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=function(e){const t="string"==typeof e?function(e){const t=ve.exec(e);if(!t)return void w((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,i="",s,o="",a]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return _e({host:s,pass:i,path:c,projectId:u,port:o,protocol:n,publicKey:r})}(e):_e(e);if(t&&function(e){if(!_)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(E.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(E.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(E.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(E.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):$&&E.warn("No DSN provided, client will not send events."),this._dsn){const t=Fe(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(A(e))return void($&&E.log(Ve));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let i=n&&n.event_id;const s=o(e)?e:String(e),a=null===(c=e)||o(c)||"object"!=typeof c&&"function"!=typeof c?this.eventFromMessage(s,t,n):this.eventFromException(e,n);var c;return this._process(a.then((e=>this._captureEvent(e,n,r))).then((e=>{i=e}))),i}captureEvent(e,t,n){if(t&&t.originalException&&A(t.originalException))return void($&&E.log(Ve));let r=t&&t.event_id;const i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,i||n).then((e=>{r=e}))),r}captureSession(e){"string"!=typeof e.release?$&&E.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),K(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):j(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return $&&E.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const t=this._integrations[e.name];Ue(this,e,this._integrations),t||$e(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const i=Ne(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const o=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:me(r)},...i&&{trace:T({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Oe(o,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=xe(n,De(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,r){const i=Ne(n);return Oe({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:me(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,i=`${e}:${t}`;$&&E.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}captureAggregateMetrics(e){$&&E.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const t=function(e,t,n,r){const i={sent_at:(new Date).toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=me(t));const s=function(e){const t=function(e){let t="";for(const n of e){const e=Object.entries(n.tags),r=e.length>0?`|#${e.map((([e,t])=>`${e}:${t}`)).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}(e);return[{type:"statsd",length:t.length},t]}(e);return Oe(i,[s])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach((e=>e(...t)))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&Ue(e,t,n)})),n}(this,e),$e(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(K(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new B((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=function(){return le().getIsolationScope()}()){const i=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s.length>0&&(t.integrations=s),this.emit("preprocessEvent",e,t),function(e,t,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||k(),timestamp:t.timestamp||R()},u=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:L),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=S(e.message,s));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=S(o.value,s));const a=e.request;a&&a.url&&(a.url=S(a.url,s))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),void 0===t.type&&function(e,t){const n=p._sentryDebugIds;if(!n)return;let r;const i=je.get(t);i?r=i:(r=new Map,je.set(t,r));const s=Object.keys(n).reduce(((e,i)=>{let s;const o=r.get(i);o?s=o:(s=t(i),r.set(i,s));for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.filename){e[r.filename]=n[i];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=s[e.filename])}))}))}catch(e){}}(c,e.stackParser);const d=function(e,t){if(!t)return e;const n=e?e.clone():new re;return n.update(t),n}(r,n.captureContext);n.mechanism&&P(c,n.mechanism);const l=i&&i.getEventProcessors?i.getEventProcessors():[],h=(ne||(ne=new re),ne).getScopeData();s&&ee(h,s.getScopeData()),d&&ee(h,d.getScopeData());const f=[...n.attachments||[],...h.attachments];return f.length&&(n.attachments=f),Z(c,h),H([...l,...z(),...h.eventProcessors],c,n).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof o&&o>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Ee(e.data,t,n)}})))},...e.user&&{user:Ee(e.user,t,n)},...e.contexts&&{contexts:Ee(e.contexts,t,n)},...e.extra&&{extra:Ee(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ee(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>{const r=J(e).data;return r&&(e.data=Ee(r,t,n)),e}))),r}(e,o,a):e)))}(i,e,t,n,this,r).then((e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if((!e.contexts||!e.contexts.trace)&&t){const{traceId:r,spanId:i,parentSpanId:s,dsc:o}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:s},...e.contexts};const a=o||X(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:a,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if($){const t=e;"log"===t.logLevel?E.log(t.message):E.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,s=Ge(e),o=ze(e),c=e.type||"error",d=`before send for type \`${c}\``;if(o&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),V(new Re(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===c?"replay":c,p=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,p).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new Re("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;if(ze(t)&&r)return r(t,n);if(Ge(t)&&i){if(t.spans){const e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(t,n)}return t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(u(e))return e.then((e=>{if(!a(e)&&null!==e)throw new Re(n);return e}),(e=>{throw new Re(`${t} rejected with ${e}`)}));if(!a(e)&&null!==e)throw new Re(n);return e}(i,d)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",l,e),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new Re(`${d} returned \`null\`, will not send event.`,"log")}const i=n&&n.getSession();if(!s&&i&&this._updateSessionFromEvent(i,r),s){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const o=r.transaction_info;if(s&&o&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...o,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof Re)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Re(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,(e=>{$&&E.error("Error while sending event:",e)}));$&&E.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function ze(e){return void 0===e.type}function Ge(e){return"transaction"===e.type}const He="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Ke(e,t){const n=qe(e,t),r={type:t&&t.name,value:Je(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function We(e,t){return{exception:{values:[Ke(e,t)]}}}function qe(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Ye.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const Ye=/Minified React error #\d+;/i;function Je(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Xe(e,t,n,r){const i={};if(r&&n){const r=qe(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(o(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Qe(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(I(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return S(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:S(r,t)}return""}(e),r=t?"promise rejection":"exception";return i(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:c(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}const Ze=p;const et=6e4;function tt(e,t,n=function(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new B(((n,r)=>{let i=t.length;if(!i)return n(!0);const s=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{j(e).then((()=>{--i||(clearTimeout(s),n(!0))}),r)}))}))}}}(e.bufferSize||30)){let r={};function i(i){const s=[];if(Te(i,((t,n)=>{const i=Ae(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){const r=nt(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(t)})),0===s.length)return j();const o=Oe(i[0],s),a=t=>{Te(o,((n,r)=>{const i=nt(n,r);e.recordDroppedEvent(t,Ae(r),i)}))};return n.add((()=>t({body:ke(o,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&$&&E.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n,,,s]=e.split(":",5),o=parseInt(t,10),a=1e3*(isNaN(o)?60:o);if(n)for(const e of n.split(";"))"metric_bucket"===e&&s&&!s.split(";").includes("custom")||(i[e]=r+a);else i.all=r+a}else o?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?et:r-t}(o,r):429===t&&(i.all=r+6e4);return i}(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof Re)return $&&E.error("Skipped sending event because buffer is full."),a("queue_overflow"),j();throw e}))}return i.__sentry__baseTransport__=!0,{send:i,flush:e=>n.drain(e)}}function nt(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}let rt;h();const it="?";function st(e,t,n,r){const i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ot=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,at=/\((\S*)(?::(\d+))(?::(\d+))\)/,ct=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ut=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,dt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,lt=function(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0)=>{const r=[],i=e.split("\n");for(let e=n;e1024)continue;const s=be.test(n)?n.replace(be,"$1"):n;if(!s.match(/\S*Error: /)){for(const e of t){const t=e(s);if(t){r.push(t);break}}if(r.length>=50)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),ye.test(t[t.length-1].function||"")&&(t.pop(),ye.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}(r)}}([30,e=>{const t=ot.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=at.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=pt(t[1]||it,t[2]);return st(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=ct.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ut.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||it;return[n,e]=pt(n,e),st(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{const t=dt.exec(e);return t?st(t[2],t[1]||it,+t[3],t[4]?+t[4]:void 0):void 0}]),pt=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:it,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var ht,ft,gt,vt,mt,_t,bt,yt=(ht=function(e,t){return ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ht(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ht(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),wt=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},Et=function(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]({name:`${r}:@sentry/${e}`,version:se}))),version:se}),e._metadata=i}(e,"browser",["browser"],Ze.SENTRY_SDK_SOURCE||"npm"),super(e),e.sendClientReports&&Ze.document&&Ze.document.addEventListener("visibilitychange",(()=>{"hidden"===Ze.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,o,u){const d=function(e,t,o,u,d){let l;if(i(t)&&t.error)return We(e,t.error);if(s(t)||r(t,"DOMException")){const n=t;if("stack"in t)l=We(e,t);else{const t=n.name||(s(n)?"DOMError":"DOMException"),r=n.message?`${t}: ${n.message}`:t;l=Xe(e,r,o,u),D(l,r)}return"code"in n&&(l.tags={...l.tags,"DOMException.code":`${n.code}`}),l}return n(t)?We(e,t):a(t)||c(t)?(l=function(e,t,n,r){const i=ge(),s=i&&i.getOptions().normalizeDepth,o={exception:{values:[{type:c(t)?t.constructor.name:"Error",value:Qe(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Se(t,s)}};if(n){const t=qe(e,n);t.length&&(o.exception.values[0].stacktrace={frames:t})}return o}(e,t,o,void 0),P(l,{synthetic:!0}),l):(l=Xe(e,t,o,u),D(l,`${t}`,void 0),P(l,{synthetic:!0}),l)}(e,t,o&&o.syntheticException||void 0,u);return P(d),d.level="error",o&&o.event_id&&(d.event_id=o.event_id),j(d)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const s=Xe(e,t,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),j(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(He&&E.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:me(r)}},s=function(e){return[{type:"user_report"},e]}(e);return Oe(i,[s])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(He&&E.log("No outcomes to send"));if(!this._dsn)return void(He&&E.log("No dsn provided, will not send outcomes"));He&&E.log("Sending outcomes:",e);const t=(n=e,Oe((r=this._options.tunnel&&me(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:R(),discarded_events:n}]]));var n,r;this._sendEnvelope(t)}}({dsn:"https://3266931c85fced597df7d2c3891c380a@o4506872303845376.ingest.us.sentry.io/4506882884370432",transport:function(e,t=function(){if(rt)return rt;if((e=Ze.fetch)&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString()))return rt=Ze.fetch.bind(Ze);var e;const t=Ze.document;let n=Ze.fetch;if(t&&"function"==typeof t.createElement)try{const e=t.createElement("iframe");e.hidden=!0,t.head.appendChild(e);const r=e.contentWindow;r&&r.fetch&&(n=r.fetch),t.head.removeChild(e)}catch(e){He&&E.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return rt=n.bind(Ze)}()){let n=0,r=0;return tt(e,(function(i){const s=i.body.length;n+=s,r++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,o).then((e=>(n-=s,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return rt=void 0,n-=s,r--,V(e)}}))},stackParser:lt,integrations:[],environment:"production"}),It=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return yt(t,e),t}(Error);try{!function(){if(window.optibaseScriptLoaded)throw new It("[Optibase] Detected duplicated Optibase Script.");function e(e){for(var t=[],n=1;n-1||t.indexOf("edg")>-1?vt.EDGE:t.indexOf("opr")>-1&&window.opr?vt.OPERA:t.indexOf("chrome")>-1&&window.chrome?vt.CHROME:t.indexOf("trident")>-1?vt.IE:t.indexOf("firefox")>-1?vt.FIREFOX:t.indexOf("safari")>-1?vt.SAFARI:void 0;return e("metadata","Current Browser: ".concat(n,".")),n}function n(){var t=window.navigator.userAgent,n=window.navigator.platform,r=void 0;return/Macintosh|MacIntel|MacPPC|Mac68K|Darwin/.test(n)?r=gt.MAC_OS:/iPhone|iPad|iPod/.test(n)?r=gt.IOS:/Win32|Win64|Windows|WinCE/.test(n)?r=gt.WINDOWS:/Android/.test(t)?r=gt.ANDROID:/Linux/.test(n)&&(r=gt.LINUX),e("metadata","Current OS: ".concat(r,".")),r}function r(){var t=window.innerWidth<=767?ft.PHONE:window.innerWidth<=990?ft.TABLET:ft.DESKTOP;return e("metadata","Current Screen Size: ".concat(t,".")),t}var i=document.createElement("style");function s(){var t;e("showBody","Showing body."),null===(t=i.parentNode)||void 0===t||t.removeChild(i)}function o(t,n){return wt(this,void 0,void 0,(function(){var r,i,s,o,a,c;return Et(this,(function(u){switch(u.label){case 0:return e("getInitialize","Fetching active for publicApiKey: ".concat(O,".")),[4,fetch(x+"/api/script/active?publicApiKey=".concat(O,"&hostname=").concat(window.location.hostname))];case 1:if(!(r=u.sent()).ok)throw new It("[Optibase] Error occurred while fetching active.");return[4,r.json()];case 2:return e("getInitialize","Active response:",i=u.sent()),i.active?(window.optibaseSubscriptionPlan=i.subscriptionPlan,e("getInitialize","Calling with body:",s={publicApiKey:O,testedUserId:M,entryUrl:A,screenSize:D,browser:C,OS:k,topReferrer:P,testsOnPage:t,conversionsOnPage:n}),[4,fetch(x+"/api/script/initialize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),credentials:"include"}).catch((function(){}))]):[2,{userNotLoggedIn7Days:!0,randomSeed:Math.floor(1e9*Math.random())}];case 3:if(!(o=u.sent()))throw new It("[Optibase] Error occurred while fetching initialize.");return o.ok?[3,6]:[4,o.json().catch((function(){}))];case 4:return a=u.sent(),[4,o.text().catch((function(){}))];case 5:throw u.sent(),400!==o.status||a.clientError?500===o.status?new It("[Optibase] Response not ok when calling getInitialize: "+(null==a?void 0:a.message)||0):new Error("[Optibase] Response not ok when calling getInitialize: "+(null==a?void 0:a.message)||0):new It("[Optibase] Response not ok when calling getInitialize: "+(null==a?void 0:a.message)||0);case 6:return[4,o.json()];case 7:return e("getInitialize","Response:",c=u.sent()),[2,c]}}))}))}var a=0;function c(){var e=Math.pow(2,32);return(a=(1664525*a+1013904223)%e)/e}function u(t,n,r){return wt(this,void 0,void 0,(function(){var i,o,c,u,l,v,b,y,I,O,x;return Et(this,(function(T){switch(T.label){case 0:if(t.monthlyTestedUsersLimitReached&&(window.monthlyTestedUsersLimitReached=!0,console.error("[Optibase] The Monthly Tested Users limit has been reached.")),t.noTestsOrConversionsOnPage&&(window.noTestsOrConversionsOnPage=!0,e("handleInitializeResponse","No tests or conversions found on the page.")),t.userNotLoggedIn7Days&&(window.userNotLoggedIn7Days=!0,console.error("handleInitializeResponse","The user has not logged in in the last 7 days, please log in again to start running tests. It might take up to 2h after logging in for the script to be active again.")),!t.randomSeed)throw new Error("[Optibase] Random seed not returned.");return i="optibaseCachedInitializeResponse-tests".concat(n,"-conversions").concat(r),null==m||m.setItem(i,JSON.stringify(t)),a=t.randomSeed,t.testedUserId&&(M=t.testedUserId,window.optibaseTestedUserId=M,null===(c=window.localStorage)||void 0===c||c.setItem("optibaseTestedUserId",t.testedUserId)),t.testedUserExternalId&&(F=t.testedUserExternalId,window.optibaseTestedUserExternalId=t.testedUserExternalId,null===(u=window.localStorage)||void 0===u||u.setItem("optibaseTestedUserExternalId",t.testedUserExternalId)),p((null===(l=t.tests)||void 0===l?void 0:l.filter((function(e){return e.eligible&&e.test.type===mt.SPLIT})))||[],!1,E,S)?[2]:(h((null===(v=t.tests)||void 0===v?void 0:v.filter((function(e){return e.test.type===mt.AB})))||[],!1,E,S),window.optibaseInitialized=!0,s(),o=(new Date).getTime()-_.getTime(),w?[3,2]:(function(t){e("handleClickConversions","Setting up click listeners.");var n=document.querySelectorAll("[data-optibase-click-conversion-id]");0!==n.length?(e("handleClickConversions","Found elements with click conversion attribute:",n),n.forEach((function(e){var n=e.getAttribute("data-optibase-click-conversion-id");t.find((function(e){return e.userFriendlyId===n}))?e.addEventListener("click",(function(t){return wt(this,void 0,void 0,(function(){var r,i;return Et(this,(function(s){switch(s.label){case 0:return"A"!==e.tagName?[3,2]:(t.preventDefault(),[4,f(n)]);case 1:return s.sent(),(i=(r=e).href)&&("_blank"===r.target?window.open(i,"_blank"):window.location.href=i),[3,3];case 2:f(n),s.label=3;case 3:return[2]}}))}))})):console.error('[Optibase] Error: Element with click conversion ID "'.concat(n,'" does not have a corresponding Click Conversion on the server.'))}))):e("handleClickConversions","No elements with click conversion attribute found.")}((null===(b=t.conversions)||void 0===b?void 0:b.filter((function(e){return e.type===_t.CLICK||e.type===_t.LEGACY_CLICK_SUBMIT})))||[]),function(t){e("handleSubmitConversions","Setting up submit listeners.");var n=document.querySelectorAll("[data-optibase-submit-conversion-id]");0!==n.length?(e("handleSubmitConversions","Found elements with submit conversion attribute:",n),n.forEach((function(n){var r=n.getAttribute("data-optibase-submit-conversion-id");if(t.find((function(e){return e.userFriendlyId===r})))if("FORM"!==n.tagName){e("handleSubmitConversions",'Element with submit conversion ID "'.concat(r,'" is not a form element. Waiting for form to be added to the DOM by adding an observer.'));var i=function(){var t=n.querySelector("form");if(!t){var i=n.querySelector("iframe");if(!i)return void e("handleSubmitConversions",'Element with submit conversion ID "'.concat(r,'" is not a form element, does not contain a form element, and is not an iframe.'));var a=i.contentDocument;if(!a)return void e("handleSubmitConversions",'[Optibase] iframe in element with submit conversion ID "'.concat(r,'" does not have a contentDocument.'));if(!(t=a.querySelector("form")))return void e("handleSubmitConversions",'[Optibase] iframe in element with submit conversion ID "'.concat(r,'" does not have a form element.'))}e("handleSubmitConversions",'Adding submit listener to the found form element for submit conversion ID "'.concat(r,'":'),t),s.disconnect(),t.addEventListener("submit",o)},s=new MutationObserver((function(t){e("handleSubmitConversions MutationObserver",'Found Mutations for submit conversion ID "'.concat(r,'":'),t),t.forEach((function(e){"childList"==e.type&&i()}))}));s.observe(n,{childList:!0,subtree:!0}),i()}else e("handleSubmitConversions",'Adding submit listener to the found form element for submit conversion ID "'.concat(r,'":'),n),n.addEventListener("submit",o);else console.error('[Optibase] Error: Element with submit conversion ID "'.concat(r,'" does not have a corresponding Submit Conversion on the server.'));function o(t){return wt(this,void 0,void 0,(function(){return Et(this,(function(i){switch(i.label){case 0:return e("handleSubmitConversions",'Handling submit event for conversion ID "'.concat(r,'".')),!n.getAttribute("action")||t.defaultPrevented?[3,2]:(t.preventDefault(),[4,f(r)]);case 1:return i.sent(),n.submit(),[3,3];case 2:f(r),i.label=3;case 3:return[2]}}))}))}}))):e("handleSubmitConversions","No elements with submit conversion attribute found.")}((null===(y=t.conversions)||void 0===y?void 0:y.filter((function(e){return e.type===_t.SUBMIT||e.type===_t.LEGACY_CLICK_SUBMIT})))||[]),function(t){e("handleScrollConversions","Setting up scroll listeners.");var n=t.filter((function(e){return d(e.url,e.sameOrigin)}));if(0!==n.length){e("handleScrollConversions","Found scroll depth conversions:",n);var r=new Set;window.addEventListener("scroll",(function(){var t,i,s=(t=window.pageYOffset||document.documentElement.scrollTop,i=document.documentElement.scrollHeight,(t+window.innerHeight)/i*100);n.forEach((function(t){if(!r.has(t.userFriendlyId)){var n=function(e){var t=document.documentElement.scrollHeight;return e.scrollDepthUnit===bt.PERCENTAGE?e.scrollDepthValue:e.scrollDepthUnit===bt.PIXELS?e.scrollDepthValue/t*100:1/0}(t);s>=n&&(e("Scroll Depth Conversion Triggered","Conversion ID: ".concat(t.userFriendlyId)),f(t.userFriendlyId),r.add(t.userFriendlyId))}}))}),{passive:!0})}else e("handleScrollConversions","No scroll depth conversions found.")}((null===(I=t.conversions)||void 0===I?void 0:I.filter((function(e){return e.type===_t.SCROLL_DEPTH})))||[]),function(t){e("handleTimeOnPageConversions","Setting up time on page listeners.");var n=t.filter((function(e){return d(e.url,e.sameOrigin)}));if(0!==n.length){e("handleTimeOnPageConversions","Found time on page conversions:",n);for(var r=function(t){setTimeout((function(){e("Time On Page Conversion Triggered","Conversion ID: ".concat(t.userFriendlyId)),f(t.userFriendlyId)}),1e3*t.timeOnPage)},i=0,s=n;i element."),a=!1),e("validateExecution","Found publicApiKey: ".concat(r,", baseApiUrl: ").concat(o,", and canHideBody: ").concat(a,".")),{publicApiKey:r,baseApiUrl:o,canHideBody:a}}(),O=I.publicApiKey,x=I.baseApiUrl,T=I.canHideBody,C=t(),k=n(),D=r(),P=function(){var t,n,r;try{r=null===(n=null===(t=null===window||void 0===window?void 0:window.frames)||void 0===t?void 0:t.top)||void 0===n?void 0:n.document.referrer}catch(e){r=void 0}return e("metadata","Current Top Refferer: ".concat(r,".")),r}();fe("browser",C),fe("os",k);var A=function(){var t=window.location.origin+window.location.pathname;return e("metadata","Current Origin Url: ".concat(t,".")),t}(),N=function(e){try{var t=new URL(e.startsWith("http")?e:"https://".concat(e));return t.origin+t.pathname}catch(e){return null}}(A),R=function(e){try{return new URL(e.startsWith("http")?e:"https://".concat(e)).pathname}catch(e){return null}}(A),M=null==m?void 0:m.getItem("optibaseTestedUserId");window.optibaseTestedUserId=M;var F=null==m?void 0:m.getItem("optibaseTestedUserExternalId");window.optibaseTestedUserExternalId=F;var L=[];function $(){return wt(this,void 0,void 0,(function(){var t,n,r,i,c,d,l;return Et(this,(function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),e("onDOMContentLoaded","DOM Content Loaded"),_=new Date,t=document.querySelectorAll("[data-optibase-variant-id]"),n=document.querySelectorAll("[data-optibase-click-conversion-id]"),r=document.querySelectorAll("[data-optibase-submit-conversion-id]"),i=Boolean(t.length),c=Boolean(n.length)||Boolean(r.length),function(t,n){var r,i,o="optibaseCachedInitializeResponse-tests".concat(t,"-conversions").concat(n),c=null==m?void 0:m.getItem(o);if(c){var u=JSON.parse(c);if(e("handleCachedInitializeResponse","Detected cached getInitialize response for tests=".concat(t,", conversions=").concat(n,":"),u),!u.randomSeed)throw null==m||m.removeItem(o),new Error("[Optibase] Random seed not returned.");a=u.randomSeed,p((null===(r=u.tests)||void 0===r?void 0:r.filter((function(e){return e.eligible&&e.test.type===mt.SPLIT})))||[],!0,E,S)||(h((null===(i=u.tests)||void 0===i?void 0:i.filter((function(e){return e.test.type===mt.AB})))||[],!0,E,S),s())}else e("handleCachedInitializeResponse","No cached getInitialize response for tests=".concat(t,", conversions=").concat(n))}(i,c),Boolean(t.length)||e("onDOMContentLoaded","No variants found on the page."),Boolean(n.length)||e("onDOMContentLoaded","No click conversions found on the page."),Boolean(r.length)||e("onDOMContentLoaded","No submit conversions found on the page."),[4,o(i,c)];case 1:return d=f.sent(),e("getInitialize","Received response"),[4,u(d,i,c)];case 2:return f.sent(),[3,4];case 3:return(l=f.sent())instanceof It||null==St||St.captureException(l),console.error("[Optibase] Encountered an error:",l),window.optibaseInitialized=!0,s(),[3,4];case 4:return[2]}}))}))}T&&(e("hideBody","Hiding body."),i.innerHTML="body { visibility: hidden !important; }",document.head.appendChild(i),setTimeout((function(){s()}),5e3)),"loading"!==document.readyState?$():document.addEventListener("DOMContentLoaded",$)}()}catch(e){throw e instanceof It||null==St||St.captureException(e),e}})(); //# sourceMappingURL=script.js.map //# debugId=4af365af-77e0-55bd-b2aa-9dc7a453f18f