@mapvx/web-components 0.9.0-dev.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{base-floor-selector-C8tXYk9W.cjs → base-floor-selector-BMedqz0P.cjs} +3 -3
- package/dist/cjs/{class-map-DISSQ8nF.cjs → class-map-C2D175vh.cjs} +3 -3
- package/dist/cjs/{compact-floor-selector-BJkUv0BS.cjs → compact-floor-selector-DnF3Y0bm.cjs} +3 -3
- package/dist/cjs/{consume-DHGUcjnF.cjs → consume-DGHiJ7I1.cjs} +3 -3
- package/dist/cjs/{custom-map-DbyZ9EK1.cjs → custom-map-DMTzK90c.cjs} +3 -3
- package/dist/cjs/{enable-3d-attribute-BSYIYIR9.cjs → enable-3d-attribute-COwMFAl3.cjs} +4 -4
- package/dist/cjs/{floor-selector-CJVs0IRb.cjs → floor-selector-BdcHwHM5.cjs} +3 -3
- package/dist/cjs/index.cjs +3 -3
- package/dist/cjs/map-view-with-modal.cjs +3 -3
- package/dist/cjs/{qr-modal-BdL3fOhS.cjs → qr-modal-CVcwWbMz.cjs} +3 -3
- package/dist/cjs/{route-options-Brl4A4MD.cjs → route-options-bipiWsdN.cjs} +3 -3
- package/dist/cjs/route-view-totems.cjs +3 -3
- package/dist/es/assets/{base-floor-selector-DWcWg26z.js → base-floor-selector-tMT3OqNn.js} +3 -3
- package/dist/es/assets/{class-map-D1siPz5g.js → class-map-DARMkWL5.js} +3 -3
- package/dist/es/assets/{compact-floor-selector-LOwA4Kgm.js → compact-floor-selector-Cn32jNQ1.js} +3 -3
- package/dist/es/assets/{consume-DDxKBV3a.js → consume-CHy7FszE.js} +3 -3
- package/dist/es/assets/{custom-map-CuC_VSae.js → custom-map-D5CN1bK4.js} +3 -3
- package/dist/es/assets/{enable-3d-attribute-weTE_-As.js → enable-3d-attribute-ByF7UVrM.js} +3 -3
- package/dist/es/assets/{floor-selector-CxZUO8Ht.js → floor-selector-Dl4c0hkj.js} +3 -3
- package/dist/es/assets/{qr-modal-pVy0sZh6.js → qr-modal-CcTW0MC4.js} +3 -3
- package/dist/es/assets/{route-options-By5c6MeY.js → route-options-JdoUif98.js} +3 -3
- package/dist/es/index.js +3 -3
- package/dist/es/map-view-with-modal.js +3 -3
- package/dist/es/route-view-totems.js +3 -3
- package/dist/iife/map-view-with-modal.js +3 -3
- package/dist/iife/route-view-totems.js +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!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]="
|
|
2
|
+
!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]="8f1feea6-ea55-58aa-b54a-754a0c127f81")}catch(e){}}();
|
|
3
3
|
var MapVXRouteViewTotems=function(e){"use strict";var t="undefined"!=typeof document?document.currentScript:null;
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
@@ -42,7 +42,7 @@ const ce=e=>(t,n)=>{void 0!==n?n.addInitializer(()=>{customElements.define(e,t)}
|
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2018 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/const me=e=>e??W;class ge{constructor(){this.MEASUREMENT_ID="G-6XL8YD35QR",this.isInitialized=!1,this.sessionId=""}static getInstance(){return ge.instance||(ge.instance=new ge),ge.instance}generateSessionId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}initialize(e){if(this.isInitialized)return;ge.component=e,this.sessionId=this.generateSessionId();const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${this.MEASUREMENT_ID}`,document.head.appendChild(t),window.dataLayer=window.dataLayer||[];window.gtag=window.gtag||((...e)=>{window.dataLayer.push(e)}),window.gtag("js",new Date),window.gtag("config",this.MEASUREMENT_ID,{send_page_view:!0,groups:"mapvx"}),this.isInitialized=!0}resetSessionId(){this.sessionId=this.generateSessionId()}trackPageView(e){this.isInitialized&&window.gtag("event","page_view",{page_title:e,page_location:window.location.href,page_path:e,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackEvent(e,t){this.isInitialized&&window.gtag("event",e,{...t,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackUserTiming(e,t,n){this.isInitialized&&window.gtag("event","timing_complete",{name:t,value:n,event_category:e,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackException(e,t=!1){this.isInitialized&&window.gtag("event","exception",{description:e,fatal:t,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}}const Ae="https://tiles.mapvx.com/tiles";const ye="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ve=globalThis,be="10.68.0";function xe(){return _e(ve),ve}function _e(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||be,t[be]=t[be]||{}}function we(e,t,n=ve){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[be]=r[be]||{};return i[e]||(i[e]=t())}const Ee=["debug","info","warn","error","log","assert","trace"],Ce={};function Se(e){if(!("console"in ve))return e();const t=ve.console,n={},r=Object.keys(Ce);r.forEach(e=>{const r=Ce[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Ie(){return Te().enabled}function Me(e,...t){ye&&Ie()&&Se(()=>{ve.console[e](`Sentry Logger [${e}]:`,...t)})}function Te(){return ye?we("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const De={enable:function(){Te().enabled=!0},disable:function(){Te().enabled=!1},isEnabled:Ie,log:function(...e){Me("log",...e)},warn:function(...e){Me("warn",...e)},error:function(...e){Me("error",...e)}},Pe="?",Be=/\(error: (.*)\)/,Re=/captureMessage|captureException/;function Fe(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const i=[],a=e.split("\n");for(let s=n;s<a.length;s++){let e=a[s];e.length>1024&&(e=e.slice(0,1024));const n=Be.test(e)?e.replace(Be,"$1"):e;if(!n.includes("Error: ")){for(const e of t){const t=e(n);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(Le(t).function||"")&&t.pop();t.reverse(),Re.test(Le(t).function||"")&&(t.pop(),Re.test(Le(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||Le(t).filename,function:e.function||Pe}))}(i.slice(r))}}function Le(e){return e[e.length-1]||{}}const ke="<anonymous>";function Oe(e){try{return e&&"function"==typeof e&&e.name||ke}catch{return ke}}function ze(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}const Ne={},Ue={};function Ve(e,t){return Ne[e]=Ne[e]||[],Ne[e].push(t),()=>{const n=Ne[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function Ge(e,t){if(!Ue[e]){Ue[e]=!0;try{t()}catch(jke){ye&&De.error(`Error while instrumenting ${e}`,jke)}}}function je(e,t){const n=e&&Ne[e];if(n)for(const r of n)try{r(t)}catch(jke){ye&&De.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Oe(r)}\nError:`,jke)}}let qe=null;function He(){qe=ve.onerror,ve.onerror=function(e,t,n,r,i){return je("error",{column:r,error:i,line:n,msg:e,url:t}),!!qe&&qe.apply(this,arguments)},ve.onerror.__SENTRY_INSTRUMENTED__=!0}let Qe=null;function We(){Qe=ve.onunhandledrejection,ve.onunhandledrejection=function(e){return je("unhandledrejection",e),!Qe||Qe.apply(this,arguments)},ve.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ke=Object.prototype.toString;function Ze(e){switch(Ke.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return st(e,Error)}}function Ye(e,t){return Ke.call(e)===`[object ${t}]`}function Xe(e){return Ye(e,"ErrorEvent")}function Je(e){return Ye(e,"DOMError")}function $e(e){return Ye(e,"String")}function et(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function tt(e){return null===e||et(e)||"object"!=typeof e&&"function"!=typeof e}function nt(e){return Ye(e,"Object")}function rt(e){return"object"==typeof e&&null!==e}function it(e){return"undefined"!=typeof Event&&st(e,Event)}function at(e){return Boolean(e?.then&&"function"==typeof e.then)}function st(e,t){try{return e instanceof t}catch{return!1}}function ot(e){return"undefined"!=typeof Request&&st(e,Request)}function lt(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const i=n(r);"function"==typeof i&&ct(i,r);try{e[t]=i}catch{ye&&De.log(`Failed to replace method "${t}" in object`,e)}}function ut(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ye&&De.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function ct(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ut(e,"__sentry_original__",t)}catch{}}function ht(e){return e.__sentry_original__}function dt(e){if(Ze(e))return{message:e.message,name:e.name,stack:e.stack,...pt(e)};if(it(e)){const{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...pt(e)}}return e}function pt(e){return rt(e)?Object.fromEntries(Object.entries(e)):{}}let ft;function mt(e){if(void 0!==ft)return ft?ft(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=ve;return t in n&&"function"==typeof n[t]?(ft=n[t],ft(e)):(ft=null,e())}function gt(){return mt(()=>Math.random())}function At(){return mt(()=>Date.now())}const yt=Symbol.for("sentry.skipNormalization"),vt=Symbol.for("sentry.overrideNormalizationDepth");let bt,xt;function _t(e,t=100,n=1/0){try{return Et("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function wt(e,t=3,n=102400){const r=_t(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?wt(e,t-1,n):r;var i}function Et(e,t,n=1/0,r=1/0,i=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[a,s]=i;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const o=Ct(e,t);if(!o.startsWith("[object "))return o;if(function(e){return Boolean(e[yt])}(t))return t;const l=function(e){const t=e[vt];return"number"==typeof t?t:void 0}(t),u=void 0!==l?l:n;if(0===u)return o.replace("object ","");if(a(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return Et("",c.toJSON(),u-1,r,i)}catch{}const h=Array.isArray(t)?[]:{};let d=0;const p=dt(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(d>=r){h[f]="[MaxProperties ~]";break}const e=p[f];h[f]=Et(f,e,u-1,r,i),d++}return s(t),h}function Ct(e,t){try{if(bt){const e=bt(t);if(e)return e}if("undefined"!=typeof global&&t===global)return"[Global]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Oe(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const e=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return`[object ${e}]`}catch(n){return`**non-serializable** (${n})`}}function St(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function It(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];tt(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(Ct(0,t))}return n.join(t)}function Mt(e,t,n=!1){return!!$e(e)&&(Ye(t,"RegExp")?t.test(e):$e(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function Tt(e,t=[],n=!1){for(const r of t)if(Mt(e,r,n))return!0;return!1}function Dt(e=function(){const e=ve;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return mt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return xt||(xt="10000000100040008000100000000000"),xt.replace(/[018]/g,e=>(e^(16*gt()&15)>>e/4).toString(16))}function Pt(e){return e.exception?.values?.[0]}function Bt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Pt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Rt(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function Ft(e,t){const n=Pt(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function Lt(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{ut(e,"__sentry_captured__",!0)}catch{}return!1}function kt(){return At()/1e3}let Ot;function zt(){return(Ot??(Ot=function(){const{performance:e}=ve;if(!e?.now||!e.timeOrigin)return kt;const t=e.timeOrigin;return()=>(t+mt(()=>e.now()))/1e3}()))()}function Nt(e){const t=zt(),n={sid:Dt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{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&&Ut(n,e),n}function Ut(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||zt(),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:Dt()),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 Vt(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Vt(r[i],t[i],n-1));return r}function Gt(){return Dt()}function jt(){return Dt().substring(16)}function qt(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}const Ht="_sentrySpan";function Qt(e,t){t?ut(e,Ht,function(e){try{const t=ve.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[Ht]}function Wt(e){return qt(e[Ht])}let Kt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Gt(),sampleRand:gt()}}clone(){const t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Qt(t,Wt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}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,username:void 0},this._session&&Ut(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],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}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,r=n instanceof e?n.getScopeData():nt(n)?t:void 0,{tags:i,attributes:a,extra:s,user:o,contexts:l,level:u,fingerprint:c=[],propagationContext:h,conversationId:d}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...a},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},o&&Object.keys(o).length&&(this._user=o),u&&(this._level=u),c.length&&(this._fingerprint=c),h&&(this._propagationContext=h),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Qt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Gt(),sampleRand:gt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:kt(),...e,message:e.message?St(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Wt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Vt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||Dt();if(!this._client)return ye&&De.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?.event_id||Dt();if(!this._client)return ye&&De.warn("No client configured on scope - will not capture message!"),r;const i=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=e.event_id||t?.event_id||Dt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ye&&De.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)}};const Zt=e=>e instanceof Promise&&!e[Yt],Yt=Symbol("chained PromiseLike"),Xt=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const i=e[r];"function"==typeof i?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Yt]:!0}),t};let Jt=class{constructor(e,t){let n,r;n=e||new Kt,r=t||new Kt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(jke){throw this._popScope(),jke}return at(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Zt(r)&&Zt(e)?r:Xt(e,r)})(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function $t(){const e=_e(xe());return e.stack=e.stack||new Jt(we("defaultCurrentScope",()=>new Kt),we("defaultIsolationScope",()=>new Kt))}function en(e){return $t().withScope(e)}function tn(e,t){const n=$t();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function nn(e){return $t().withScope(()=>e($t().getIsolationScope()))}function rn(e){const t=_e(e);return t.acs?t.acs:{withIsolationScope:nn,withScope:en,withSetScope:tn,withSetIsolationScope:(e,t)=>nn(t),getCurrentScope:()=>$t().getScope(),getIsolationScope:()=>$t().getIsolationScope()}}function an(e,t){const{value:n,unit:r}="object"==typeof(i=e)&&null!=i&&!Array.isArray(i)&&Object.keys(i).includes("value")?e:{value:e,unit:void 0};var i;const a=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),s=r&&"string"==typeof r?{unit:r}:{};if(a)return{...a,...s};if(!t||"skip-undefined"===t&&void 0===n)return;let o="";try{o=JSON.stringify(n)??""}catch{}return{value:o,type:"string",...s}}function sn(e,t=!1){const n={};for(const[r,i]of Object.entries(e??{})){const e=an(i,t);e&&(n[r]=e)}return n}function on(){return rn(xe()).getCurrentScope()}function ln(){return rn(xe()).getIsolationScope()}function un(){return on().getClient()}function cn(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,a={trace_id:n,span_id:i||jt()};return r&&(a.parent_span_id=r),a}const hn="sentry.op",dn="sentry.profile_id",pn="sentry.exclusive_time";function fn(e){const t=e;return{scope:t._sentryScope,isolationScope:qt(t._sentryIsolationScope)}}const mn="sentry-";function gn(e){const t=function(e){if(!e||!$e(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=An(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return An(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(mn)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function An(e){return e.split(",").map(e=>{const t=e.indexOf("=");if(-1===t)return[];return[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const yn=/^o(\d+)\./,vn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function bn(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:s,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r?`${r}/`:r}${s}`}function xn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function _n(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(yn);return t?.[1]}(n)),r}function wn(e){const t="string"==typeof e?function(e){const t=vn.exec(e);if(!t)return void Se(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",a="",s="",o=""]=t.slice(1);let l="",u=o;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return xn({host:a,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}(e):xn(e);if(t&&function(e){if(!ye)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(De.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(De.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(De.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(De.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}let En=!1;function Cn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Tn(e).parent_span_id,a=fn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||jt():t,trace_id:n}}function Sn(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:1===n,attributes:i,...r})):void 0}function In(e){return"number"==typeof e?Mn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Mn(e.getTime()):zt()}function Mn(e){return e>9999999999?e/1e3:e}function Tn(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:i,name:a,endTime:s,status:o,links:l}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Dn(e),start_timestamp:In(i),timestamp:In(s)||void 0,status:Pn(o),op:r[hn],origin:r["sentry.origin"],links:Sn(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Dn(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Pn(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}const Bn=function(e){return e._sentryRootSpan||e};function Rn(){En||(Se(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),En=!0)}function Fn(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||un()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function Ln(e){De.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function kn(e,t){if(!t?.length)return!1;for(const n of t){if(Nn(n)){if(e.description&&Mt(e.description,n))return ye&&Ln(e),!0;continue}const t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;const r=!n.name||e.description&&Mt(e.description,n.name),i=!n.op||e.op&&Mt(e.op,n.op),a=!n.attributes||Object.entries(n.attributes).every(([t,n])=>On(e.attributes?.[t],n));if(r&&i&&a)return ye&&Ln(e),!0}return!1}function On(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?Mt(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function zn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function Nn(e){return"string"==typeof e||e instanceof RegExp}const Un=Symbol.for("sentry.nonRecordingSpan");const Vn="production";function Gn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||Vn,release:n.release,public_key:r,trace_id:e,org_id:_n(t)};return t.emit("createDsc",i),i}function jn(e,t){const n=t.getPropagationContext();return n.dsc||Gn(n.traceId,e)}function qn(e){const t=un();if(!t)return{};const n=Bn(e),r=Tn(n),i=r.data,a=n.spanContext().traceState,s=a?.get("sentry.sample_rate")??i["sentry.sample_rate"]??i["sentry.previous_trace_sample_rate"];function o(e){return"number"!=typeof s&&"string"!=typeof s||(e.sample_rate=`${s}`),e}const l=n._frozenDsc;if(l)return o(l);const u=function(e){return!!e&&!0===e[Un]}(n),c=u&&"ignored"===n.dropReason;if(u&&(!Fn(t.getOptions())||c)){const e=fn(n).scope;if(e){const n={...jn(t,e)};return c&&(n.sampled="false"),o(n)}}const h=a?.get("sentry.dsc"),d=h&&gn(h);if(d)return o(d);const p=Gn(e.spanContext().traceId,t),f=i["sentry.source"]??i["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),Fn()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=a?.get("sentry.sample_rand")??fn(n).scope?.getPropagationContext().sampleRand.toString()),o(p),t.emit("createDsc",p,n),p}function Hn(e,t=[]){return[e,t]}function Qn(e,t){const[n,r]=e;return[n,[...r,t]]}function Wn(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Kn(e){const t=_e(ve);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Zn(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[Kn(r),e]:r.push("string"==typeof e?Kn(e):e)}for(const a of n){const[e,t]=a;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)i(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(_t(t))}i(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(r)}function Yn(e){const t="string"==typeof e.data?Kn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Xn={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function Jn(e){return function(e){return e in Xn}(e)?Xn[e]:e}function $n(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function er(e,t,n,r){const i=$n(n),a=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const s=function(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(At()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:bn(r)},...i&&{trace:i}}}(e,i,r,t);delete e.sdkProcessingMetadata;return Hn(s,[[{type:a},e]])}function tr(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:a,level:s,transactionName:o}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(i).length&&(e.user={...i,...e.user});Object.keys(a).length&&(e.contexts={...a,...e.contexts});s&&(e.level=s);o&&"transaction"!==e.type&&(e.transaction=o)}(e,t),r&&function(e,t){e.contexts={trace:Cn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:qn(t),...e.sdkProcessingMetadata};const n=Bn(t),r=Tn(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(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,a)}function nr(e,t){const{extra:n,tags:r,attributes:i,user:a,contexts:s,level:o,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:p,transactionName:f,span:m}=t;rr(e,"extra",n),rr(e,"tags",r),rr(e,"attributes",i),rr(e,"user",a),rr(e,"contexts",s),e.sdkProcessingMetadata=Vt(e.sdkProcessingMetadata,l,2),o&&(e.level=o),f&&(e.transactionName=f),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function rr(e,t,n){e[t]=Vt(e[t],n,1)}function ir(e,t){const n=we("globalScope",()=>new Kt).getScopeData();return e&&nr(n,e.getScopeData()),t&&nr(n,t.getScopeData()),n}const ar="url.full",sr="user_agent.original";function or(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function lr(e){return new fr(t=>{t(e)})}function ur(e){return new fr((t,n)=>{n(e)})}let cr,hr,dr,pr,fr=class e{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(jke){r(jke)}else e(n)},t=>{if(n)try{e(n(t))}catch(jke){r(jke)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(at(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(jke){r(jke)}}};function mr(e,t,n,r=0){try{const i=gr(t,n,e,r);return at(i)?i:lr(i)}catch(M5){return ur(M5)}}function gr(e,t,n,r){const i=n[r];if(!e||!i)return e;const a=i({...e},t);return ye&&null===a&&De.log(`Event processor "${i.id||"?"}" dropped event`),at(a)?a.then(e=>gr(e,t,n,r+1)):gr(a,t,n,r+1)}function Ar(e,t,n,r,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Dt(),timestamp:t.timestamp||kt()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||Vn,!e.release&&r&&(e.release=r);!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&a&&(s.url=St(s.url,a));a&&e.exception?.values?.forEach(e=>{e.value&&(e.value=St(e.value,a))})}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,u),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=ve._sentryDebugIds,n=ve._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(pr&&r.length===hr&&i.length===dr)return pr;hr=r.length,dr=i.length,pr={},cr||(cr={});const a=(t,n)=>{for(const r of t){const t=n[r],i=cr?.[r];if(i&&pr&&t)pr[i[0]]=t,cr&&(cr[r]=[i[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const i=n[e],a=i?.filename;if(a&&pr&&cr){pr[a]=t,cr[r]=[a,t];break}}}}};return t&&a(r,t),n&&a(i,n),pr}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(l,e.stackParser);const c=function(e,t){if(!t)return e;const n=e?e.clone():new Kt;return n.update(t),n}(r,n.captureContext);n.mechanism&&Ft(l,n.mechanism);const h=i?i.getEventProcessors():[],d=ir(a,c),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),tr(l,d);const f=[...h,...d.eventProcessors];return(n.data&&!0===n.data.__sentry__?lr(l):mr(f,l,n)).then(e=>(e&&function(e){const t={};if(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)})}),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.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:_t(e.data,t,n)}}))},...e.user&&{user:_t(e.user,t,n)},...e.contexts&&{contexts:_t(e.contexts,t,n)},...e.extra&&{extra:_t(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=_t(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:_t(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=_t(e.contexts.flags,3,n));return r}(e,s,o):e))}function yr(e){if(e)return function(e){return e instanceof Kt||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>vr.includes(e))}(e)?{captureContext:e}:e}const vr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function br(e,t){return on().captureException(e,yr(t))}function xr(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return on().captureMessage(e,n,r)}function _r(e,t){return on().captureEvent(e,t)}function wr(e,t){ln().setTag(e,t)}function Er(e){const t=ln(),{user:n}=ir(t,on()),{userAgent:r}=ve.navigator||{},i=Nt({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return"ok"===a?.status&&Ut(a,{status:"exited"}),Cr(),t.setSession(i),i}function Cr(){const e=ln(),t=on().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Ut(e,t)}(t),Sr(),e.setSession()}function Sr(){const e=ln(),t=un(),n=e.getSession();n&&t&&t.captureSession(n)}function Ir(e=!1){e?Cr():Sr()}function Mr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function Tr(e,t,n){return t||`${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){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const Dr=[];function Pr(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function Br(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Rr(e,t,n){if(n[t.name])ye&&De.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Dr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),Dr.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("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)}["processSpan","processSegmentSpan"].forEach(n=>{const r=t[n];"function"==typeof r&&e.on(n,n=>r.call(t,n,e))}),ye&&De.log(`Integration installed: ${t.name}`)}}function Fr(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Lr(){return"undefined"!=typeof window&&(!Fr()||function(){const e=ve.process;return"renderer"===e?.type}())}function kr(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Or(e,t){const n=t??function(e){return zr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r,i){const a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),Hn(a,[kr(e,i)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);zr().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function zr(){return we("clientToLogBufferMap",()=>new WeakMap)}function Nr(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ur(e,t){const n=t??function(e){return Vr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r,i){const a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),Hn(a,[Nr(e,i)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Vr().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function Vr(){return we("clientToMetricBufferMap",()=>new WeakMap)}function Gr(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return n=t,{...n,attributes:sn(n.attributes),links:n.links?.map(e=>({...e,attributes:sn(e.attributes)}))};var n}const jr=Symbol.for("SentryBufferFullError");function qr(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return ur(jr);const i=r();return t.add(i),i.then(()=>n(i),()=>n(i)),i},drain:function(e){if(!t.size)return lr(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Mr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function Hr(e,{statusCode:t,headers:n},r=At()){const i={...e},a=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(a)for(const o of a.trim().split(",")){const[e,t,,,n]=o.split(":",5),a=parseInt(e,10),s=1e3*(isNaN(a)?60:a);if(t)for(const o of t.split(";"))"metric_bucket"===o&&n&&!n.split(";").includes("custom")||(i[o]=r+s);else i.all=r+s}else s?i.all=r+function(e,t=At()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}function Qr(e,t,n=qr(e.bufferSize||64)){let r={};return{send:function(i){const a=[];if(Wn(i,(t,n)=>{const i=Jn(n);!function(e,t,n=At()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?a.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===a.length)return Promise.resolve({});const s=Hn(i[0],a),o=t=>{!function(e,t){return Wn(e,(e,n)=>t.includes(n))}(s,["client_report"])?Wn(s,(n,r)=>{e.recordDroppedEvent(t,Jn(r))}):ye&&De.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:Zn(s)}).then(e=>413===e.statusCode?(ye&&De.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),o("send_error"),e):(ye&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&De.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Hr(r,e),e),e=>{throw o("network_error"),ye&&De.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===jr)return ye&&De.error("Skipped sending event because buffer is full."),o("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function Wr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const Kr=["forwarded","-ip","remote-","via","-user"];const Zr={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Yr(e){const t=null!=e.dataCollection?Zr:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Kr},httpHeaders:{request:{deny:Kr},response:{deny:Kr}},httpBodies:[],urlQueryParams:{deny:Kr},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7};const n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const Xr="Not capturing exception because it's already been captured.",Jr="Discarded session because of missing or non-string release",$r=Symbol.for("SentryInternalError"),ei=Symbol.for("SentryDoNotSendEventError");function ti(e){return{message:e,[$r]:!0}}function ni(e){return{message:e,[ei]:!0}}function ri(e){return rt(e)&&$r in e}function ii(e){return rt(e)&&ei in e}function ai(e,t,n,r,i){let a,s=0,o=!1;e.on(n,()=>{s=0,clearTimeout(a),o=!1}),e.on(t,t=>{if(s+=r(t),s>=8e5)i(e);else if(!o){const t=e.getOptions()._flushInterval??5e3;t>0&&(o=!0,a=Mr(setTimeout(()=>{i(e)},t)))}}),e.on("flush",()=>{i(e)})}let si=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=qr(e.transportOptions?.bufferSize??64),this._dataCollection=Yr(e),e.dsn?this._dsn=wn(e.dsn):ye&&De.warn("No DSN provided, client will not send events."),this._dsn){const t=Tr(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&ai(this,"afterCaptureLog","flushLogs",hi,Or);(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&ai(this,"afterCaptureMetric","flushMetrics",ci,Ur)}captureException(e,t,n){const r=Dt();if(Lt(e))return ye&&De.log(Xr),r;const i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),"error"),i.event_id}captureMessage(e,t,n,r){const i={event_id:Dt(),...n},a=et(e)?e:String(e),s=tt(e),o=s?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>o.then(e=>this._captureEvent(e,i,r)),s?"unknown":"error"),i.event_id}captureEvent(e,t,n){const r=Dt();if(t?.originalException&&Lt(t.originalException))return ye&&De.log(Xr),r;const i={event_id:r,...t},a=e.sdkProcessingMetadata||{},s=a.capturedSpanScope,o=a.capturedSpanIsolationScope,l=oi(e.type);return this._process(()=>this._captureEvent(e,i,s||n,o),l),i.event_id}captureSession(e){this.sendSession(e),Ut(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Rr(this,e,this._integrations),t||Br(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const n=[],r=[];for(const a of e.spans)a.op?.startsWith("gen_ai.")?n.push(Gr(a)):r.push(a);if(0===n.length)return;e.spans=r;const i=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}(e,this);let r=er(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of t.attachments||[])r=Qn(r,Yn(i));n&&(r=Qn(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=Vn}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(ye&&De.warn(Jr));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(ye&&De.warn(Jr));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const i=$n(n);return Hn({sent_at:new Date(At()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:bn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;ye&&De.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(t){return ye&&De.error("Error while sending envelope:",t),{}}return ye&&De.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Rr(e,t,n)}),n}(this,e),Br(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const i=t.exception?.values;if(i){r=!0,n=!1;for(const e of i)if(!1===e.mechanism?.handled){n=!0;break}}const a="ok"===e.status;(a&&0===e.errors||a&&n)&&(Ut(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ar(i,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...cn(n)},...e.contexts};const r=jn(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=on(),r=ln()){return ye&&li(e)&&De.log(`Captured error event \`${Wr(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{ye&&(ii(e)?De.log(e.message):ri(e)?De.warn(e.message):De.warn(e))})}_processEvent(e,t,n,r){const i=this.getOptions(),{sampleRate:a}=i,s=ui(e),o=li(e),l=`before send for type \`${e.type||"error"}\``,u=void 0===a?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(a);if(o&&"number"==typeof u&>()>u)return this.recordDroppedEvent("sample_rate","error"),ur(ni(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));const c=oi(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",c),ni("An event processor returned `null`, will not send event.");if(!0===t.data?.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:a,ignoreSpans:s}=t,o=(l=t.beforeSendSpan,!(l&&"function"==typeof l&&"_streamed"in l&&l._streamed)&&t.beforeSendSpan);var l;let u=n;if(li(u)&&i)return i(u,r);if(ui(u)){if(o||s){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:s,op:o}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:o,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:a,profile_id:s?.[dn],exclusive_time:s?.[pn],measurements:e.measurements,is_segment:!0}}(u);if(s?.length&&kn({description:t.description,op:t.op,attributes:t.data},s))return null;if(o){const e=o(t);e?u=Vt(n,{type:"transaction",timestamp:(c=e).timestamp,start_timestamp:c.start_timestamp,transaction:c.description,contexts:{trace:{trace_id:c.trace_id,span_id:c.span_id,parent_span_id:c.parent_span_id,op:c.op,status:c.status,origin:c.origin,data:{...c.data,...c.profile_id&&{[dn]:c.profile_id},...c.exclusive_time&&{[pn]:c.exclusive_time}}}},measurements:c.measurements}):Rn()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(s?.length&&kn({description:e.description,op:e.op,attributes:e.data},s))zn(n,e);else if(o){const n=o(e);n?t.push(n):(Rn(),t.push(e))}else t.push(e);const r=u.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),u.spans=t}}if(a){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(u,r)}}var c;return u}(this,i,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(at(e))return e.then(e=>{if(!nt(e)&&null!==e)throw ti(n);return e},e=>{throw ti(`${t} rejected with ${e}`)});if(!nt(e)&&null!==e)throw ti(n);return e}(n,l)}).then(i=>{if(null===i){if(this.recordDroppedEvent("before_send",c),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw ni(`${l} returned \`null\`, will not send event.`)}const a=n.getSession()||r.getSession();if(o&&a&&this._updateSessionFromEvent(a,i),s){const e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const u=i.transaction_info;if(s&&u&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...u,source:e}}return this.sendEvent(i,t),i}).then(null,e=>{if(ii(e)||ri(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),ti(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===jr&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){ye&&De.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(ye&&De.log("No outcomes to send"));if(!this._dsn)return void(ye&&De.log("No dsn provided, will not send outcomes"));ye&&De.log("Sending outcomes:",e);const t=(n=e,Hn((r=this._options.tunnel&&bn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:kt(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}};function oi(e){return"replay_event"===e?"replay":e||"error"}function li(e){return void 0===e.type}function ui(e){return"transaction"===e.type}function ci(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+di(e.attributes)}function hi(e){let t=0;return e.message&&(t+=2*e.message.length),t+di(e.attributes)}function di(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*pi(e[0]):tt(e)?t+=pi(e):t+=100}),t}function pi(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function fi(e,t){!0===t.debug&&(ye?De.enable():Se(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}));on().update(t.initialScope);const n=new e(t);return function(e){on().setClient(e)}(n),n.init(),n}function mi(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function gi(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}const Ai=100;function yi(e,t){const n=un(),r=ln();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Ai}=n.getOptions();if(a<=0)return;const s={timestamp:kt(),...e},o=i?Se(()=>i(s,t)):s;null!==o&&(n.emit&&n.emit("beforeAddBreadcrumb",o,t),r.addBreadcrumb(o,a))}const vi=new WeakMap,bi=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=ht(this);let r;try{vi.has(un())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){vi.set(e,!0)}}),xi=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],_i=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=Ei(e,r)},processEvent(n,r,i){if(!t){const n=i.getOptions();t=Ei(e,n)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&Tt(n,t)}(e,t.ignoreTransactions))return ye&&De.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Bt(e)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return Wr(e).some(e=>Tt(e,t))}(e,t.ignoreErrors))return ye&&De.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Bt(e)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return ye&&De.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Bt(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Ci(e);return!!n&&Tt(n,t)}(e,t.denyUrls))return ye&&De.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Bt(e)}.\nUrl: ${Ci(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Ci(e);return!n||Tt(n,t)}(e,t.allowUrls))return ye&&De.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Bt(e)}.\nUrl: ${Ci(e)}`),!0}return!1}(n,t)?null:n}}},wi=(e={})=>({..._i(e),name:"InboundFilters"});function Ei(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:xi],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ci(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return ye&&De.error(`Cannot extract url for event ${Bt(e)}`),null}}function Si(e,t,n,r,i,a){if(!i.exception?.values||!a||!st(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Ii(e,t,r,a.originalException,n,i.exception.values,s,0))}function Ii(e,t,n,r,i,a,s,o){if(a.length>=n+1)return a;let l=[...a];if(st(r[i],Error)){Ti(s,o,r);const a=e(t,r[i]),u=l.length;Di(a,i,u,o),l=Ii(e,t,n,r[i],i,[a,...l],a,u)}return Mi(r)&&r.errors.forEach((a,u)=>{if(st(a,Error)){Ti(s,o,r);const c=e(t,a),h=l.length;Di(c,`errors[${u}]`,h,o),l=Ii(e,t,n,a,i,[c,...l],c,h)}}),l}function Mi(e){return Array.isArray(e.errors)}function Ti(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Mi(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Di(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Pi(e){return function(e){return Ze(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const Bi=new Set([]);const Ri=new Set;function Fi(){"console"in ve&&Ee.forEach(function(e){!Ri.has(e)&&e in ve.console&&(Ri.add(e),lt(ve.console,e,function(t){return Ce[e]=t,function(...t){const n=t[0],r=Ce[e],i=Bi.size&&"string"==typeof n&&Tt(n,Bi);i||je("console",{args:t,level:e}),(!i||ye&&De.isEnabled())&&r?.apply(ve.console,t)}}))})}function Li(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ki=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!zi(e,t))return!1;if(!Oi(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Ni(t),r=Ni(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!zi(e,t))return!1;if(!Oi(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return ye&&De.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Oi(e,t){let n=ze(e),r=ze(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function zi(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function Ni(e){return e.exception?.values?.[0]}const Ui=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=on().getScopeData(),n=ln().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:i}=Tn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!i?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function Vi(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const Gi=ve;function ji(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qi(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Gi))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(ji(Gi.fetch))return!0;let e=!1;const t=Gi.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=ji(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ye&&De.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Hi(e,t){const n="fetch",r=Ve(n,e);return Ge(n,()=>function(e,t=!1){if(t&&!qi())return;lt(ve,"fetch",function(e){return function(...t){const n=new Error,{method:r,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Wi(t),method:Qi(n,"method")?String(n.method).toUpperCase():ot(t)&&Qi(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:Wi(t),method:Qi(t,"method")?String(t.method).toUpperCase():"GET"}}(t),a={args:t,fetchData:{method:r,url:i},startTimestamp:1e3*zt(),virtualError:n,headers:Ki(t)};return je("fetch",{...a}),e.apply(ve,t).then(async e=>(je("fetch",{...a,endTimestamp:1e3*zt(),response:e}),e),e=>{je("fetch",{...a,endTimestamp:1e3*zt(),error:e}),Ze(e)&&void 0===e.stack&&(e.stack=n.stack,ut(e,"framesToPop",1));const t=un(),r=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(a.fetchData.url).host;"always"===r?e.message=`${e.message} (${t})`:ut(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}(0,t)),r}function Qi(e,t){return rt(e)&&!!e[t]}function Wi(e){return"string"==typeof e?e:e?Qi(e,"url")?e.url:e.toString?e.toString():"":""}function Ki(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(ot(t))return new Headers(t.headers)}catch{}}const Zi=ve;function Yi(){try{return Zi.document.location.href}catch{return""}}const Xi=ve;let Ji=0;function $i(){return Ji>0}function ea(e,t={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(ht(e))return e}catch{return e}const n=function(...n){ve._sentryWrappedDepth=(ve._sentryWrappedDepth||0)+1;try{const r=n.map(e=>ea(e,t));return e.apply(this,r)}catch(r){throw Ji++,setTimeout(()=>{Ji--}),function(...e){const t=rn(xe());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(e=>{e.addEventProcessor(e=>(t.mechanism&&(Rt(e,void 0),Ft(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),br(r)}),r}finally{ve._sentryWrappedDepth=(ve._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}ct(n,e),ut(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function ta(){const e=Yi(),{referrer:t}=Xi.document||{},{userAgent:n}=Xi.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function na(e,t){const n=aa(e,t),r={type:la(t),value:ua(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ra(e,t,n,r){const i=un(),a=i?.getOptions().normalizeDepth,s=(o=t,Object.values(o).find(e=>e instanceof Error));var o;const l={__serialized__:wt(t,a)};if(s)return{exception:{values:[na(e,s)]},extra:l};const u={exception:{values:[{type:it(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:da(t,{isUnhandledRejection:r})}]},extra:l};if(n){const t=aa(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function ia(e,t){return{exception:{values:[na(e,t)]}}}function aa(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&sa.test(e.message))return 1;return 0}(t),i=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,i)}catch{}return[]}const sa=/Minified React error #\d+;/i;function oa(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function la(e){const t=e?.name;if(!t&&oa(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function ua(e){const t=e?.message;return oa(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?Pi(t.error):Pi(e):"No error message"}function ca(e,t,n,r,i){let a;if(Xe(t)&&t.error){return ia(e,t.error)}if(Je(t)||Ye(t,"DOMException")){const i=t;if("stack"in t){a=ia(e,t);const i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){const t=aa(e,n);t.length&&(i.stacktrace={frames:t},Ft(a,{synthetic:!0}))}}else{const t=i.name||(Je(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;a=ha(e,s,n,r),Rt(a,s)}return"code"in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}if(Ze(t))return ia(e,t);if(nt(t)||it(t)){return a=ra(e,t,n,i),Ft(a,{synthetic:!0}),a}return a=ha(e,t,n,r),Rt(a,`${t}`),Ft(a,{synthetic:!0}),a}function ha(e,t,n,r){const i={};if(r&&n){const r=aa(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Ft(i,{synthetic:!0})}if(et(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 da(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(dt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";if(Xe(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(it(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}let pa=class extends si{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Xi.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;!function(e,t,n=[t],r="npm"){const i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:be})),i.version=be)}(t,"browser",["browser"],Xi.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:r}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:r?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:i}=this._options;Xi.document&&Xi.document.addEventListener("visibilitychange",()=>{"hidden"===Xi.document.visibilityState&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",gi)}eventFromException(e,t){return function(e,t,n,r){const i=ca(e,t,n?.syntheticException||void 0,r);return Ft(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),lr(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const a=ha(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),lr(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};const fa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ma=ve;function ga(e,t,n){ma.document&&ma.addEventListener(e,t,n)}function Aa(e,t,n){ma.document&&ma.removeEventListener(e,t,n)}const ya={};try{"undefined"!=typeof Node&&(ya.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(ya.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,ya.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,ya.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,ya.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(ya.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function va(e,t,n){const r=ya[t];if(r)try{return r.call(e,n)}catch{}const i=e[t];return"function"==typeof i?i.call(e,n):i}function ba(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let a=0,s=0;const o=" > ",l=o.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<r&&(u=xa(n,c),!("html"===u||a>1&&s+i.length*l+u.length>=h));)i.push(u),s+=u.length,n=va(n,"parentNode");return i.reverse().join(o)}catch{return"<unknown>"}}function xa(e,t){const n=[],r=va(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=va(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const i=t?.length?t.filter(t=>va(e,"getAttribute",t)).map(t=>[t,va(e,"getAttribute",t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=va(e,"id");t&&n.push(`#${t}`);const r=va(e,"className");if(r&&$e(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const a of["aria-label","type","name","title","alt"]){const t=va(e,"getAttribute",a);t&&n.push(`[${a}="${t}"]`)}return n.join("")}let _a,wa,Ea,Ca;function Sa(){if(!ma.document)return;const e=je.bind(null,"dom"),t=Ia(e,!0);ma.document.addEventListener("click",t,!1),ma.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=ma,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(lt(r,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){const r=Ia(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),lt(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Ia(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;ut(n,"_sentryCaptured",!0),r&&!r._sentryId&&ut(r,"_sentryId",Dt());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==wa)return!1;try{if(!e.target||e.target._sentryId!==Ea)return!1}catch{}return!0}(n)){e({event:n,name:i,global:t}),wa=n.type,Ea=r?r._sentryId:void 0}clearTimeout(_a),_a=ma.setTimeout(()=>{Ea=void 0,wa=void 0},1e3)}}function Ma(e){const t="history";Ve(t,e),Ge(t,Ta)}function Ta(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Ca,i=function(e){try{return new URL(e,ma.location.origin).toString()}catch{return e}}(String(n));if(Ca=i,r===i)return e.apply(this,t);je("history",{from:r,to:i})}return e.apply(this,t)}}ma.addEventListener("popstate",()=>{const e=ma.location.href,t=Ca;if(Ca=e,t===e)return;je("history",{from:t,to:e})}),"history"in Gi&&Gi.history&&(lt(ma.history,"pushState",e),lt(ma.history,"replaceState",e))}const Da={};const Pa="__sentry_xhr_v3__";function Ba(){if(!ma.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*zt(),a=$e(n[0])?n[0].toUpperCase():void 0,s=function(e){if($e(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!a||!s)return e.apply(t,n);t[Pa]={method:a,url:s,request_headers:{}},"POST"===a&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const o=()=>{const e=t[Pa];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}je("xhr",{endTimestamp:1e3*zt(),startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener("readystatechange",o)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(o(),e.apply(t,n))}):t.addEventListener("readystatechange",o),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,a=t[Pa];return a&&$e(r)&&$e(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Pa];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return je("xhr",{startTimestamp:1e3*zt(),xhr:t}),e.apply(t,n)}})}function Ra(e,t=function(e){const t=Da[e];if(t)return t;let n=ma[e];if(ji(n))return Da[e]=n.bind(ma);const r=ma.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(jke){fa&&De.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,jke)}return n?Da[e]=n.bind(ma):n}("fetch")){let n=0,r=0;return Qr(e,async function(i){const a=i.body.length;n+=a,r++;const s={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,s);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(jke){throw function(e){Da[e]=void 0}("fetch"),jke}finally{n-=a,r--}},qr(e.bufferSize||40))}const Fa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function La(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?Pe:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ka=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Oa=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,za=/\((\S*)(?::(\d+))(?::(\d+))\)/,Na=/at (.+?) ?\(data:(.+?),/,Ua=[30,e=>{const t=e.match(Na);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ka.exec(e);if(n){const[,e,t,r]=n;return La(e,Pe,+t,+r)}const r=Oa.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=za.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Ha(r[1]||Pe,r[2]);return La(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Va=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ga=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ja=[50,e=>{const t=Va.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ga.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]||Pe;return[n,e]=Ha(n,e),La(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],qa=Fe(...[Ua,ja]),Ha=(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]:Pe,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Qa=1024,Wa=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console",n=Ve(t,e);Ge(t,Fi)}(function(e){return function(t){if(un()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Li(t.level),message:It(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${It(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}yi(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(un()!==e)return;let r,i,a="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>Qa&&(Fa&&De.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=Qa),"string"==typeof a&&(a=[a]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ba(t,{keyAttrs:a,maxStringLength:s}),i=function(e,t=5){if(!Zi.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}(t)}catch{r="<unknown>"}if(0===r.length)return;const o={category:`ui.${n.name}`,message:r};i&&(o.data={"ui.component_name":i}),yi(o,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Ve("dom",n),Ge("dom",Sa)),t.xhr&&function(e){Ve("xhr",e),Ge("xhr",Ba)}(function(e){return function(t){if(un()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Pa];if(!n||!r||!i)return;const{method:a,url:s,status_code:o,body:l}=i,u={method:a,url:s,status_code:o},c={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},h={category:"xhr",data:u,type:"http",level:Vi(o)};e.emit("beforeOutgoingRequestBreadcrumb",h,c),yi(h,c)}}(e)),t.fetch&&Hi(function(e){return function(t){if(un()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),yi(a,i)}else{const i=t.response,a={...t.fetchData,status_code:i?.status},s={input:t.args,response:i,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:a,type:"http",level:Vi(a.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",o,s),yi(o,s)}}}(e)),t.history&&Ma(function(e){return function(t){if(un()!==e)return;let n=t.from,r=t.to;const i=mi(Xi.location.href);let a=n?mi(n):void 0;const s=mi(r);a?.path||(a=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),yi({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){un()===e&&yi({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Bt(t)},{event:t})}}(e))}}};const Ka="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".split(","),Za=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&<(Xi,"setTimeout",Ya),t.setInterval&<(Xi,"setInterval",Ya),t.requestAnimationFrame&<(Xi,"requestAnimationFrame",Xa),t.XMLHttpRequest&&"XMLHttpRequest"in Xi&<(XMLHttpRequest.prototype,"send",Ja);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Ka).forEach(e=>function(e,t){const n=Xi,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;lt(r,"addEventListener",function(n){return function(r,i,a){try{"function"==typeof i.handleEvent&&(i.handleEvent=ea(i.handleEvent,{mechanism:{data:{handler:Oe(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,i),n.apply(this,[r,ea(i,{mechanism:{data:{handler:Oe(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),lt(r,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function Ya(e){return function(...t){const n=t[0];return t[0]=ea(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Oe(e)}`}}),e.apply(this,t)}}function Xa(e){return function(t){return e.apply(this,[ea(t,{mechanism:{data:{handler:Oe(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Ja(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&<(n,e,function(t){const n={mechanism:{data:{handler:Oe(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=ht(t);return r&&(n.mechanism.data.handler=Oe(r)),ea(t,n)})}),e.apply(this,t)}}const $a=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===Xi.document)return void(Fa&&De.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));Er({ignoreDuration:!0});let e=!1;(e=>{const t=ma.requestIdleCallback||ma.setTimeout;"hidden"===ma.document?.visibilityState?e():(ga("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),ga("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Aa("visibilitychange",e,{capture:!0}),Aa("pagehide",e,{capture:!0})}))})(()=>{e||(Ir(),e=!0)});const n=ln();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&Ir())}),"route"===t&&Ma(({from:t,to:n})=>{t!==n&&(Er({ignoreDuration:!0}),Ir(),e=!0)})}}},es=()=>({name:"CultureContext",preprocessEvent(e){const t=ts();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=ts();t&&or(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function ts(){try{const e=Xi.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const ns=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";Ve(t,e),Ge(t,He)}(t=>{const{stackParser:n,attachStacktrace:r}=is();if(un()!==e||$i())return;const{msg:i,url:a,line:s,column:o,error:l}=t,u=function(e,t,n,r){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},l=o.frames=o.frames||[];0===l.length&&l.push({colno:r,lineno:n,filename:as(t)??Yi(),function:Pe,in_app:!0});return e}(ca(n,l||i,void 0,r,!1),a,s,o);u.level="error",_r(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),rs("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";Ve(t,e),Ge(t,We)}(t=>{const{stackParser:n,attachStacktrace:r}=is();if(un()!==e||$i())return;const i=function(e){if(tt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),a=tt(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:ca(n,i,void 0,r,!0);a.level="error",_r(a,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),rs("onunhandledrejection"))}}};function rs(e){Fa&&De.log(`Global Handler attached: ${e}`)}function is(){const e=un();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function as(e){if($e(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),a=e.indexOf(",");let s="";if(t&&-1!==a){const t=e.slice(a+1);s=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?",base64":""}${s?`,${s}`:""}`}return e}(e,!1)}>`:e}const ss=()=>({name:"HttpContext",preprocessEvent(e){if(!Xi.navigator&&!Xi.location&&!Xi.document)return;const t=ta(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[hn];if(!Xi.navigator&&!Xi.location&&!Xi.document)return;const n=ta();or(e,{[ar]:"http.client"!==t?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),os=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){Si(na,i.getOptions().stackParser,n,t,e,r)}}},ls=/^HTML(\w*)Element$/;function us(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(ls.test(t))return`[HTMLElement: ${ba(e)}]`}}function cs(){return!!function(){if(void 0===Xi.window)return!1;const e=Xi;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=Yi();return!(Xi===Xi.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}()&&(Fa&&Se(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function hs(e={}){const t=!e.skipBrowserExtensionCheck&&cs();let n=null==e.defaultIntegrations?[wi(),bi(),Ui(),Za(),Wa(),ns(),os(),ki(),ss(),es(),$a()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(i=e.stackParser||qa,Array.isArray(i)?Fe(...i):i),integrations:Pr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Ra};var i;return bt=us,fi(pa,r)}class ds{constructor(){this.initialized=!1}static initialize(e){const t=ds.getInstance();if(t.initialized)return void wr("component",e);hs({dsn:"https://98a864152051bb3d42f8e955f2ab3078@sentry.mapvx.app/6",environment:"production",release:"0.9.0-dev.3"}),wr("component",e),t.initialized=!0}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}error(e,t){br(e,t?{extra:t}:void 0)}info(e,t){xr(e,{level:"info",extra:t})}warning(e,t){xr(e,{level:"warning",extra:t})}critical(e,t){xr(e,{level:"fatal",extra:t})}}
|
|
45
|
+
*/const me=e=>e??W;class ge{constructor(){this.MEASUREMENT_ID="G-6XL8YD35QR",this.isInitialized=!1,this.sessionId=""}static getInstance(){return ge.instance||(ge.instance=new ge),ge.instance}generateSessionId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}initialize(e){if(this.isInitialized)return;ge.component=e,this.sessionId=this.generateSessionId();const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${this.MEASUREMENT_ID}`,document.head.appendChild(t),window.dataLayer=window.dataLayer||[];window.gtag=window.gtag||((...e)=>{window.dataLayer.push(e)}),window.gtag("js",new Date),window.gtag("config",this.MEASUREMENT_ID,{send_page_view:!0,groups:"mapvx"}),this.isInitialized=!0}resetSessionId(){this.sessionId=this.generateSessionId()}trackPageView(e){this.isInitialized&&window.gtag("event","page_view",{page_title:e,page_location:window.location.href,page_path:e,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackEvent(e,t){this.isInitialized&&window.gtag("event",e,{...t,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackUserTiming(e,t,n){this.isInitialized&&window.gtag("event","timing_complete",{name:t,value:n,event_category:e,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackException(e,t=!1){this.isInitialized&&window.gtag("event","exception",{description:e,fatal:t,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}}const Ae="https://tiles.mapvx.com/tiles";const ye="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ve=globalThis,be="10.68.0";function xe(){return _e(ve),ve}function _e(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||be,t[be]=t[be]||{}}function we(e,t,n=ve){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[be]=r[be]||{};return i[e]||(i[e]=t())}const Ee=["debug","info","warn","error","log","assert","trace"],Ce={};function Se(e){if(!("console"in ve))return e();const t=ve.console,n={},r=Object.keys(Ce);r.forEach(e=>{const r=Ce[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Ie(){return Te().enabled}function Me(e,...t){ye&&Ie()&&Se(()=>{ve.console[e](`Sentry Logger [${e}]:`,...t)})}function Te(){return ye?we("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const De={enable:function(){Te().enabled=!0},disable:function(){Te().enabled=!1},isEnabled:Ie,log:function(...e){Me("log",...e)},warn:function(...e){Me("warn",...e)},error:function(...e){Me("error",...e)}},Pe="?",Be=/\(error: (.*)\)/,Re=/captureMessage|captureException/;function Fe(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const i=[],a=e.split("\n");for(let s=n;s<a.length;s++){let e=a[s];e.length>1024&&(e=e.slice(0,1024));const n=Be.test(e)?e.replace(Be,"$1"):e;if(!n.includes("Error: ")){for(const e of t){const t=e(n);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(Le(t).function||"")&&t.pop();t.reverse(),Re.test(Le(t).function||"")&&(t.pop(),Re.test(Le(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||Le(t).filename,function:e.function||Pe}))}(i.slice(r))}}function Le(e){return e[e.length-1]||{}}const ke="<anonymous>";function Oe(e){try{return e&&"function"==typeof e&&e.name||ke}catch{return ke}}function ze(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}const Ne={},Ue={};function Ve(e,t){return Ne[e]=Ne[e]||[],Ne[e].push(t),()=>{const n=Ne[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function Ge(e,t){if(!Ue[e]){Ue[e]=!0;try{t()}catch(jke){ye&&De.error(`Error while instrumenting ${e}`,jke)}}}function je(e,t){const n=e&&Ne[e];if(n)for(const r of n)try{r(t)}catch(jke){ye&&De.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Oe(r)}\nError:`,jke)}}let qe=null;function He(){qe=ve.onerror,ve.onerror=function(e,t,n,r,i){return je("error",{column:r,error:i,line:n,msg:e,url:t}),!!qe&&qe.apply(this,arguments)},ve.onerror.__SENTRY_INSTRUMENTED__=!0}let Qe=null;function We(){Qe=ve.onunhandledrejection,ve.onunhandledrejection=function(e){return je("unhandledrejection",e),!Qe||Qe.apply(this,arguments)},ve.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ke=Object.prototype.toString;function Ze(e){switch(Ke.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return st(e,Error)}}function Ye(e,t){return Ke.call(e)===`[object ${t}]`}function Xe(e){return Ye(e,"ErrorEvent")}function Je(e){return Ye(e,"DOMError")}function $e(e){return Ye(e,"String")}function et(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function tt(e){return null===e||et(e)||"object"!=typeof e&&"function"!=typeof e}function nt(e){return Ye(e,"Object")}function rt(e){return"object"==typeof e&&null!==e}function it(e){return"undefined"!=typeof Event&&st(e,Event)}function at(e){return Boolean(e?.then&&"function"==typeof e.then)}function st(e,t){try{return e instanceof t}catch{return!1}}function ot(e){return"undefined"!=typeof Request&&st(e,Request)}function lt(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const i=n(r);"function"==typeof i&&ct(i,r);try{e[t]=i}catch{ye&&De.log(`Failed to replace method "${t}" in object`,e)}}function ut(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ye&&De.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function ct(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ut(e,"__sentry_original__",t)}catch{}}function ht(e){return e.__sentry_original__}function dt(e){if(Ze(e))return{message:e.message,name:e.name,stack:e.stack,...pt(e)};if(it(e)){const{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...pt(e)}}return e}function pt(e){return rt(e)?Object.fromEntries(Object.entries(e)):{}}let ft;function mt(e){if(void 0!==ft)return ft?ft(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=ve;return t in n&&"function"==typeof n[t]?(ft=n[t],ft(e)):(ft=null,e())}function gt(){return mt(()=>Math.random())}function At(){return mt(()=>Date.now())}const yt=Symbol.for("sentry.skipNormalization"),vt=Symbol.for("sentry.overrideNormalizationDepth");let bt,xt;function _t(e,t=100,n=1/0){try{return Et("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function wt(e,t=3,n=102400){const r=_t(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?wt(e,t-1,n):r;var i}function Et(e,t,n=1/0,r=1/0,i=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[a,s]=i;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const o=Ct(e,t);if(!o.startsWith("[object "))return o;if(function(e){return Boolean(e[yt])}(t))return t;const l=function(e){const t=e[vt];return"number"==typeof t?t:void 0}(t),u=void 0!==l?l:n;if(0===u)return o.replace("object ","");if(a(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return Et("",c.toJSON(),u-1,r,i)}catch{}const h=Array.isArray(t)?[]:{};let d=0;const p=dt(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(d>=r){h[f]="[MaxProperties ~]";break}const e=p[f];h[f]=Et(f,e,u-1,r,i),d++}return s(t),h}function Ct(e,t){try{if(bt){const e=bt(t);if(e)return e}if("undefined"!=typeof global&&t===global)return"[Global]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Oe(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const e=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return`[object ${e}]`}catch(n){return`**non-serializable** (${n})`}}function St(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function It(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];tt(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(Ct(0,t))}return n.join(t)}function Mt(e,t,n=!1){return!!$e(e)&&(Ye(t,"RegExp")?t.test(e):$e(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function Tt(e,t=[],n=!1){for(const r of t)if(Mt(e,r,n))return!0;return!1}function Dt(e=function(){const e=ve;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return mt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return xt||(xt="10000000100040008000100000000000"),xt.replace(/[018]/g,e=>(e^(16*gt()&15)>>e/4).toString(16))}function Pt(e){return e.exception?.values?.[0]}function Bt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Pt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Rt(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function Ft(e,t){const n=Pt(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function Lt(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{ut(e,"__sentry_captured__",!0)}catch{}return!1}function kt(){return At()/1e3}let Ot;function zt(){return(Ot??(Ot=function(){const{performance:e}=ve;if(!e?.now||!e.timeOrigin)return kt;const t=e.timeOrigin;return()=>(t+mt(()=>e.now()))/1e3}()))()}function Nt(e){const t=zt(),n={sid:Dt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{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&&Ut(n,e),n}function Ut(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||zt(),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:Dt()),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 Vt(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Vt(r[i],t[i],n-1));return r}function Gt(){return Dt()}function jt(){return Dt().substring(16)}function qt(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}const Ht="_sentrySpan";function Qt(e,t){t?ut(e,Ht,function(e){try{const t=ve.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[Ht]}function Wt(e){return qt(e[Ht])}let Kt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Gt(),sampleRand:gt()}}clone(){const t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Qt(t,Wt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}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,username:void 0},this._session&&Ut(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],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}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,r=n instanceof e?n.getScopeData():nt(n)?t:void 0,{tags:i,attributes:a,extra:s,user:o,contexts:l,level:u,fingerprint:c=[],propagationContext:h,conversationId:d}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...a},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},o&&Object.keys(o).length&&(this._user=o),u&&(this._level=u),c.length&&(this._fingerprint=c),h&&(this._propagationContext=h),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Qt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Gt(),sampleRand:gt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:kt(),...e,message:e.message?St(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Wt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Vt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||Dt();if(!this._client)return ye&&De.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?.event_id||Dt();if(!this._client)return ye&&De.warn("No client configured on scope - will not capture message!"),r;const i=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=e.event_id||t?.event_id||Dt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ye&&De.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)}};const Zt=e=>e instanceof Promise&&!e[Yt],Yt=Symbol("chained PromiseLike"),Xt=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const i=e[r];"function"==typeof i?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Yt]:!0}),t};let Jt=class{constructor(e,t){let n,r;n=e||new Kt,r=t||new Kt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(jke){throw this._popScope(),jke}return at(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Zt(r)&&Zt(e)?r:Xt(e,r)})(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function $t(){const e=_e(xe());return e.stack=e.stack||new Jt(we("defaultCurrentScope",()=>new Kt),we("defaultIsolationScope",()=>new Kt))}function en(e){return $t().withScope(e)}function tn(e,t){const n=$t();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function nn(e){return $t().withScope(()=>e($t().getIsolationScope()))}function rn(e){const t=_e(e);return t.acs?t.acs:{withIsolationScope:nn,withScope:en,withSetScope:tn,withSetIsolationScope:(e,t)=>nn(t),getCurrentScope:()=>$t().getScope(),getIsolationScope:()=>$t().getIsolationScope()}}function an(e,t){const{value:n,unit:r}="object"==typeof(i=e)&&null!=i&&!Array.isArray(i)&&Object.keys(i).includes("value")?e:{value:e,unit:void 0};var i;const a=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),s=r&&"string"==typeof r?{unit:r}:{};if(a)return{...a,...s};if(!t||"skip-undefined"===t&&void 0===n)return;let o="";try{o=JSON.stringify(n)??""}catch{}return{value:o,type:"string",...s}}function sn(e,t=!1){const n={};for(const[r,i]of Object.entries(e??{})){const e=an(i,t);e&&(n[r]=e)}return n}function on(){return rn(xe()).getCurrentScope()}function ln(){return rn(xe()).getIsolationScope()}function un(){return on().getClient()}function cn(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,a={trace_id:n,span_id:i||jt()};return r&&(a.parent_span_id=r),a}const hn="sentry.op",dn="sentry.profile_id",pn="sentry.exclusive_time";function fn(e){const t=e;return{scope:t._sentryScope,isolationScope:qt(t._sentryIsolationScope)}}const mn="sentry-";function gn(e){const t=function(e){if(!e||!$e(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=An(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return An(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(mn)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function An(e){return e.split(",").map(e=>{const t=e.indexOf("=");if(-1===t)return[];return[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const yn=/^o(\d+)\./,vn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function bn(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:s,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r?`${r}/`:r}${s}`}function xn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function _n(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(yn);return t?.[1]}(n)),r}function wn(e){const t="string"==typeof e?function(e){const t=vn.exec(e);if(!t)return void Se(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",a="",s="",o=""]=t.slice(1);let l="",u=o;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return xn({host:a,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}(e):xn(e);if(t&&function(e){if(!ye)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(De.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(De.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(De.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(De.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}let En=!1;function Cn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Tn(e).parent_span_id,a=fn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||jt():t,trace_id:n}}function Sn(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:1===n,attributes:i,...r})):void 0}function In(e){return"number"==typeof e?Mn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Mn(e.getTime()):zt()}function Mn(e){return e>9999999999?e/1e3:e}function Tn(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:i,name:a,endTime:s,status:o,links:l}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Dn(e),start_timestamp:In(i),timestamp:In(s)||void 0,status:Pn(o),op:r[hn],origin:r["sentry.origin"],links:Sn(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Dn(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Pn(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}const Bn=function(e){return e._sentryRootSpan||e};function Rn(){En||(Se(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),En=!0)}function Fn(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||un()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function Ln(e){De.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function kn(e,t){if(!t?.length)return!1;for(const n of t){if(Nn(n)){if(e.description&&Mt(e.description,n))return ye&&Ln(e),!0;continue}const t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;const r=!n.name||e.description&&Mt(e.description,n.name),i=!n.op||e.op&&Mt(e.op,n.op),a=!n.attributes||Object.entries(n.attributes).every(([t,n])=>On(e.attributes?.[t],n));if(r&&i&&a)return ye&&Ln(e),!0}return!1}function On(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?Mt(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function zn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function Nn(e){return"string"==typeof e||e instanceof RegExp}const Un=Symbol.for("sentry.nonRecordingSpan");const Vn="production";function Gn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||Vn,release:n.release,public_key:r,trace_id:e,org_id:_n(t)};return t.emit("createDsc",i),i}function jn(e,t){const n=t.getPropagationContext();return n.dsc||Gn(n.traceId,e)}function qn(e){const t=un();if(!t)return{};const n=Bn(e),r=Tn(n),i=r.data,a=n.spanContext().traceState,s=a?.get("sentry.sample_rate")??i["sentry.sample_rate"]??i["sentry.previous_trace_sample_rate"];function o(e){return"number"!=typeof s&&"string"!=typeof s||(e.sample_rate=`${s}`),e}const l=n._frozenDsc;if(l)return o(l);const u=function(e){return!!e&&!0===e[Un]}(n),c=u&&"ignored"===n.dropReason;if(u&&(!Fn(t.getOptions())||c)){const e=fn(n).scope;if(e){const n={...jn(t,e)};return c&&(n.sampled="false"),o(n)}}const h=a?.get("sentry.dsc"),d=h&&gn(h);if(d)return o(d);const p=Gn(e.spanContext().traceId,t),f=i["sentry.source"]??i["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),Fn()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=a?.get("sentry.sample_rand")??fn(n).scope?.getPropagationContext().sampleRand.toString()),o(p),t.emit("createDsc",p,n),p}function Hn(e,t=[]){return[e,t]}function Qn(e,t){const[n,r]=e;return[n,[...r,t]]}function Wn(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Kn(e){const t=_e(ve);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Zn(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[Kn(r),e]:r.push("string"==typeof e?Kn(e):e)}for(const a of n){const[e,t]=a;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)i(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(_t(t))}i(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(r)}function Yn(e){const t="string"==typeof e.data?Kn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Xn={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function Jn(e){return function(e){return e in Xn}(e)?Xn[e]:e}function $n(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function er(e,t,n,r){const i=$n(n),a=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const s=function(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(At()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:bn(r)},...i&&{trace:i}}}(e,i,r,t);delete e.sdkProcessingMetadata;return Hn(s,[[{type:a},e]])}function tr(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:a,level:s,transactionName:o}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(i).length&&(e.user={...i,...e.user});Object.keys(a).length&&(e.contexts={...a,...e.contexts});s&&(e.level=s);o&&"transaction"!==e.type&&(e.transaction=o)}(e,t),r&&function(e,t){e.contexts={trace:Cn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:qn(t),...e.sdkProcessingMetadata};const n=Bn(t),r=Tn(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(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,a)}function nr(e,t){const{extra:n,tags:r,attributes:i,user:a,contexts:s,level:o,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:p,transactionName:f,span:m}=t;rr(e,"extra",n),rr(e,"tags",r),rr(e,"attributes",i),rr(e,"user",a),rr(e,"contexts",s),e.sdkProcessingMetadata=Vt(e.sdkProcessingMetadata,l,2),o&&(e.level=o),f&&(e.transactionName=f),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function rr(e,t,n){e[t]=Vt(e[t],n,1)}function ir(e,t){const n=we("globalScope",()=>new Kt).getScopeData();return e&&nr(n,e.getScopeData()),t&&nr(n,t.getScopeData()),n}const ar="url.full",sr="user_agent.original";function or(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function lr(e){return new fr(t=>{t(e)})}function ur(e){return new fr((t,n)=>{n(e)})}let cr,hr,dr,pr,fr=class e{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(jke){r(jke)}else e(n)},t=>{if(n)try{e(n(t))}catch(jke){r(jke)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(at(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(jke){r(jke)}}};function mr(e,t,n,r=0){try{const i=gr(t,n,e,r);return at(i)?i:lr(i)}catch(M5){return ur(M5)}}function gr(e,t,n,r){const i=n[r];if(!e||!i)return e;const a=i({...e},t);return ye&&null===a&&De.log(`Event processor "${i.id||"?"}" dropped event`),at(a)?a.then(e=>gr(e,t,n,r+1)):gr(a,t,n,r+1)}function Ar(e,t,n,r,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Dt(),timestamp:t.timestamp||kt()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||Vn,!e.release&&r&&(e.release=r);!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&a&&(s.url=St(s.url,a));a&&e.exception?.values?.forEach(e=>{e.value&&(e.value=St(e.value,a))})}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,u),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=ve._sentryDebugIds,n=ve._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(pr&&r.length===hr&&i.length===dr)return pr;hr=r.length,dr=i.length,pr={},cr||(cr={});const a=(t,n)=>{for(const r of t){const t=n[r],i=cr?.[r];if(i&&pr&&t)pr[i[0]]=t,cr&&(cr[r]=[i[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const i=n[e],a=i?.filename;if(a&&pr&&cr){pr[a]=t,cr[r]=[a,t];break}}}}};return t&&a(r,t),n&&a(i,n),pr}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(l,e.stackParser);const c=function(e,t){if(!t)return e;const n=e?e.clone():new Kt;return n.update(t),n}(r,n.captureContext);n.mechanism&&Ft(l,n.mechanism);const h=i?i.getEventProcessors():[],d=ir(a,c),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),tr(l,d);const f=[...h,...d.eventProcessors];return(n.data&&!0===n.data.__sentry__?lr(l):mr(f,l,n)).then(e=>(e&&function(e){const t={};if(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)})}),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.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:_t(e.data,t,n)}}))},...e.user&&{user:_t(e.user,t,n)},...e.contexts&&{contexts:_t(e.contexts,t,n)},...e.extra&&{extra:_t(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=_t(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:_t(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=_t(e.contexts.flags,3,n));return r}(e,s,o):e))}function yr(e){if(e)return function(e){return e instanceof Kt||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>vr.includes(e))}(e)?{captureContext:e}:e}const vr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function br(e,t){return on().captureException(e,yr(t))}function xr(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return on().captureMessage(e,n,r)}function _r(e,t){return on().captureEvent(e,t)}function wr(e,t){ln().setTag(e,t)}function Er(e){const t=ln(),{user:n}=ir(t,on()),{userAgent:r}=ve.navigator||{},i=Nt({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return"ok"===a?.status&&Ut(a,{status:"exited"}),Cr(),t.setSession(i),i}function Cr(){const e=ln(),t=on().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Ut(e,t)}(t),Sr(),e.setSession()}function Sr(){const e=ln(),t=un(),n=e.getSession();n&&t&&t.captureSession(n)}function Ir(e=!1){e?Cr():Sr()}function Mr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function Tr(e,t,n){return t||`${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){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const Dr=[];function Pr(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function Br(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Rr(e,t,n){if(n[t.name])ye&&De.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Dr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),Dr.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("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)}["processSpan","processSegmentSpan"].forEach(n=>{const r=t[n];"function"==typeof r&&e.on(n,n=>r.call(t,n,e))}),ye&&De.log(`Integration installed: ${t.name}`)}}function Fr(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Lr(){return"undefined"!=typeof window&&(!Fr()||function(){const e=ve.process;return"renderer"===e?.type}())}function kr(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Or(e,t){const n=t??function(e){return zr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r,i){const a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),Hn(a,[kr(e,i)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);zr().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function zr(){return we("clientToLogBufferMap",()=>new WeakMap)}function Nr(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ur(e,t){const n=t??function(e){return Vr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r,i){const a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),Hn(a,[Nr(e,i)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Vr().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function Vr(){return we("clientToMetricBufferMap",()=>new WeakMap)}function Gr(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return n=t,{...n,attributes:sn(n.attributes),links:n.links?.map(e=>({...e,attributes:sn(e.attributes)}))};var n}const jr=Symbol.for("SentryBufferFullError");function qr(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return ur(jr);const i=r();return t.add(i),i.then(()=>n(i),()=>n(i)),i},drain:function(e){if(!t.size)return lr(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Mr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function Hr(e,{statusCode:t,headers:n},r=At()){const i={...e},a=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(a)for(const o of a.trim().split(",")){const[e,t,,,n]=o.split(":",5),a=parseInt(e,10),s=1e3*(isNaN(a)?60:a);if(t)for(const o of t.split(";"))"metric_bucket"===o&&n&&!n.split(";").includes("custom")||(i[o]=r+s);else i.all=r+s}else s?i.all=r+function(e,t=At()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}function Qr(e,t,n=qr(e.bufferSize||64)){let r={};return{send:function(i){const a=[];if(Wn(i,(t,n)=>{const i=Jn(n);!function(e,t,n=At()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?a.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===a.length)return Promise.resolve({});const s=Hn(i[0],a),o=t=>{!function(e,t){return Wn(e,(e,n)=>t.includes(n))}(s,["client_report"])?Wn(s,(n,r)=>{e.recordDroppedEvent(t,Jn(r))}):ye&&De.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:Zn(s)}).then(e=>413===e.statusCode?(ye&&De.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),o("send_error"),e):(ye&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&De.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Hr(r,e),e),e=>{throw o("network_error"),ye&&De.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===jr)return ye&&De.error("Skipped sending event because buffer is full."),o("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function Wr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const Kr=["forwarded","-ip","remote-","via","-user"];const Zr={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Yr(e){const t=null!=e.dataCollection?Zr:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Kr},httpHeaders:{request:{deny:Kr},response:{deny:Kr}},httpBodies:[],urlQueryParams:{deny:Kr},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7};const n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const Xr="Not capturing exception because it's already been captured.",Jr="Discarded session because of missing or non-string release",$r=Symbol.for("SentryInternalError"),ei=Symbol.for("SentryDoNotSendEventError");function ti(e){return{message:e,[$r]:!0}}function ni(e){return{message:e,[ei]:!0}}function ri(e){return rt(e)&&$r in e}function ii(e){return rt(e)&&ei in e}function ai(e,t,n,r,i){let a,s=0,o=!1;e.on(n,()=>{s=0,clearTimeout(a),o=!1}),e.on(t,t=>{if(s+=r(t),s>=8e5)i(e);else if(!o){const t=e.getOptions()._flushInterval??5e3;t>0&&(o=!0,a=Mr(setTimeout(()=>{i(e)},t)))}}),e.on("flush",()=>{i(e)})}let si=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=qr(e.transportOptions?.bufferSize??64),this._dataCollection=Yr(e),e.dsn?this._dsn=wn(e.dsn):ye&&De.warn("No DSN provided, client will not send events."),this._dsn){const t=Tr(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&ai(this,"afterCaptureLog","flushLogs",hi,Or);(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&ai(this,"afterCaptureMetric","flushMetrics",ci,Ur)}captureException(e,t,n){const r=Dt();if(Lt(e))return ye&&De.log(Xr),r;const i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),"error"),i.event_id}captureMessage(e,t,n,r){const i={event_id:Dt(),...n},a=et(e)?e:String(e),s=tt(e),o=s?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>o.then(e=>this._captureEvent(e,i,r)),s?"unknown":"error"),i.event_id}captureEvent(e,t,n){const r=Dt();if(t?.originalException&&Lt(t.originalException))return ye&&De.log(Xr),r;const i={event_id:r,...t},a=e.sdkProcessingMetadata||{},s=a.capturedSpanScope,o=a.capturedSpanIsolationScope,l=oi(e.type);return this._process(()=>this._captureEvent(e,i,s||n,o),l),i.event_id}captureSession(e){this.sendSession(e),Ut(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Rr(this,e,this._integrations),t||Br(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const n=[],r=[];for(const a of e.spans)a.op?.startsWith("gen_ai.")?n.push(Gr(a)):r.push(a);if(0===n.length)return;e.spans=r;const i=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}(e,this);let r=er(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of t.attachments||[])r=Qn(r,Yn(i));n&&(r=Qn(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=Vn}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(ye&&De.warn(Jr));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(ye&&De.warn(Jr));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const i=$n(n);return Hn({sent_at:new Date(At()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:bn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;ye&&De.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(t){return ye&&De.error("Error while sending envelope:",t),{}}return ye&&De.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Rr(e,t,n)}),n}(this,e),Br(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const i=t.exception?.values;if(i){r=!0,n=!1;for(const e of i)if(!1===e.mechanism?.handled){n=!0;break}}const a="ok"===e.status;(a&&0===e.errors||a&&n)&&(Ut(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ar(i,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...cn(n)},...e.contexts};const r=jn(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=on(),r=ln()){return ye&&li(e)&&De.log(`Captured error event \`${Wr(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{ye&&(ii(e)?De.log(e.message):ri(e)?De.warn(e.message):De.warn(e))})}_processEvent(e,t,n,r){const i=this.getOptions(),{sampleRate:a}=i,s=ui(e),o=li(e),l=`before send for type \`${e.type||"error"}\``,u=void 0===a?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(a);if(o&&"number"==typeof u&>()>u)return this.recordDroppedEvent("sample_rate","error"),ur(ni(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));const c=oi(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",c),ni("An event processor returned `null`, will not send event.");if(!0===t.data?.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:a,ignoreSpans:s}=t,o=(l=t.beforeSendSpan,!(l&&"function"==typeof l&&"_streamed"in l&&l._streamed)&&t.beforeSendSpan);var l;let u=n;if(li(u)&&i)return i(u,r);if(ui(u)){if(o||s){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:s,op:o}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:o,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:a,profile_id:s?.[dn],exclusive_time:s?.[pn],measurements:e.measurements,is_segment:!0}}(u);if(s?.length&&kn({description:t.description,op:t.op,attributes:t.data},s))return null;if(o){const e=o(t);e?u=Vt(n,{type:"transaction",timestamp:(c=e).timestamp,start_timestamp:c.start_timestamp,transaction:c.description,contexts:{trace:{trace_id:c.trace_id,span_id:c.span_id,parent_span_id:c.parent_span_id,op:c.op,status:c.status,origin:c.origin,data:{...c.data,...c.profile_id&&{[dn]:c.profile_id},...c.exclusive_time&&{[pn]:c.exclusive_time}}}},measurements:c.measurements}):Rn()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(s?.length&&kn({description:e.description,op:e.op,attributes:e.data},s))zn(n,e);else if(o){const n=o(e);n?t.push(n):(Rn(),t.push(e))}else t.push(e);const r=u.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),u.spans=t}}if(a){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(u,r)}}var c;return u}(this,i,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(at(e))return e.then(e=>{if(!nt(e)&&null!==e)throw ti(n);return e},e=>{throw ti(`${t} rejected with ${e}`)});if(!nt(e)&&null!==e)throw ti(n);return e}(n,l)}).then(i=>{if(null===i){if(this.recordDroppedEvent("before_send",c),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw ni(`${l} returned \`null\`, will not send event.`)}const a=n.getSession()||r.getSession();if(o&&a&&this._updateSessionFromEvent(a,i),s){const e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const u=i.transaction_info;if(s&&u&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...u,source:e}}return this.sendEvent(i,t),i}).then(null,e=>{if(ii(e)||ri(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),ti(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===jr&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){ye&&De.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(ye&&De.log("No outcomes to send"));if(!this._dsn)return void(ye&&De.log("No dsn provided, will not send outcomes"));ye&&De.log("Sending outcomes:",e);const t=(n=e,Hn((r=this._options.tunnel&&bn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:kt(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}};function oi(e){return"replay_event"===e?"replay":e||"error"}function li(e){return void 0===e.type}function ui(e){return"transaction"===e.type}function ci(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+di(e.attributes)}function hi(e){let t=0;return e.message&&(t+=2*e.message.length),t+di(e.attributes)}function di(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*pi(e[0]):tt(e)?t+=pi(e):t+=100}),t}function pi(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function fi(e,t){!0===t.debug&&(ye?De.enable():Se(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}));on().update(t.initialScope);const n=new e(t);return function(e){on().setClient(e)}(n),n.init(),n}function mi(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function gi(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}const Ai=100;function yi(e,t){const n=un(),r=ln();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Ai}=n.getOptions();if(a<=0)return;const s={timestamp:kt(),...e},o=i?Se(()=>i(s,t)):s;null!==o&&(n.emit&&n.emit("beforeAddBreadcrumb",o,t),r.addBreadcrumb(o,a))}const vi=new WeakMap,bi=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=ht(this);let r;try{vi.has(un())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){vi.set(e,!0)}}),xi=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],_i=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=Ei(e,r)},processEvent(n,r,i){if(!t){const n=i.getOptions();t=Ei(e,n)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&Tt(n,t)}(e,t.ignoreTransactions))return ye&&De.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Bt(e)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return Wr(e).some(e=>Tt(e,t))}(e,t.ignoreErrors))return ye&&De.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Bt(e)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return ye&&De.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Bt(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Ci(e);return!!n&&Tt(n,t)}(e,t.denyUrls))return ye&&De.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Bt(e)}.\nUrl: ${Ci(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Ci(e);return!n||Tt(n,t)}(e,t.allowUrls))return ye&&De.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Bt(e)}.\nUrl: ${Ci(e)}`),!0}return!1}(n,t)?null:n}}},wi=(e={})=>({..._i(e),name:"InboundFilters"});function Ei(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:xi],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ci(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return ye&&De.error(`Cannot extract url for event ${Bt(e)}`),null}}function Si(e,t,n,r,i,a){if(!i.exception?.values||!a||!st(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Ii(e,t,r,a.originalException,n,i.exception.values,s,0))}function Ii(e,t,n,r,i,a,s,o){if(a.length>=n+1)return a;let l=[...a];if(st(r[i],Error)){Ti(s,o,r);const a=e(t,r[i]),u=l.length;Di(a,i,u,o),l=Ii(e,t,n,r[i],i,[a,...l],a,u)}return Mi(r)&&r.errors.forEach((a,u)=>{if(st(a,Error)){Ti(s,o,r);const c=e(t,a),h=l.length;Di(c,`errors[${u}]`,h,o),l=Ii(e,t,n,a,i,[c,...l],c,h)}}),l}function Mi(e){return Array.isArray(e.errors)}function Ti(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Mi(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Di(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Pi(e){return function(e){return Ze(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const Bi=new Set([]);const Ri=new Set;function Fi(){"console"in ve&&Ee.forEach(function(e){!Ri.has(e)&&e in ve.console&&(Ri.add(e),lt(ve.console,e,function(t){return Ce[e]=t,function(...t){const n=t[0],r=Ce[e],i=Bi.size&&"string"==typeof n&&Tt(n,Bi);i||je("console",{args:t,level:e}),(!i||ye&&De.isEnabled())&&r?.apply(ve.console,t)}}))})}function Li(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ki=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!zi(e,t))return!1;if(!Oi(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Ni(t),r=Ni(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!zi(e,t))return!1;if(!Oi(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return ye&&De.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Oi(e,t){let n=ze(e),r=ze(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function zi(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function Ni(e){return e.exception?.values?.[0]}const Ui=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=on().getScopeData(),n=ln().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:i}=Tn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!i?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function Vi(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const Gi=ve;function ji(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qi(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Gi))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(ji(Gi.fetch))return!0;let e=!1;const t=Gi.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=ji(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ye&&De.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Hi(e,t){const n="fetch",r=Ve(n,e);return Ge(n,()=>function(e,t=!1){if(t&&!qi())return;lt(ve,"fetch",function(e){return function(...t){const n=new Error,{method:r,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Wi(t),method:Qi(n,"method")?String(n.method).toUpperCase():ot(t)&&Qi(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:Wi(t),method:Qi(t,"method")?String(t.method).toUpperCase():"GET"}}(t),a={args:t,fetchData:{method:r,url:i},startTimestamp:1e3*zt(),virtualError:n,headers:Ki(t)};return je("fetch",{...a}),e.apply(ve,t).then(async e=>(je("fetch",{...a,endTimestamp:1e3*zt(),response:e}),e),e=>{je("fetch",{...a,endTimestamp:1e3*zt(),error:e}),Ze(e)&&void 0===e.stack&&(e.stack=n.stack,ut(e,"framesToPop",1));const t=un(),r=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(a.fetchData.url).host;"always"===r?e.message=`${e.message} (${t})`:ut(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}(0,t)),r}function Qi(e,t){return rt(e)&&!!e[t]}function Wi(e){return"string"==typeof e?e:e?Qi(e,"url")?e.url:e.toString?e.toString():"":""}function Ki(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(ot(t))return new Headers(t.headers)}catch{}}const Zi=ve;function Yi(){try{return Zi.document.location.href}catch{return""}}const Xi=ve;let Ji=0;function $i(){return Ji>0}function ea(e,t={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(ht(e))return e}catch{return e}const n=function(...n){ve._sentryWrappedDepth=(ve._sentryWrappedDepth||0)+1;try{const r=n.map(e=>ea(e,t));return e.apply(this,r)}catch(r){throw Ji++,setTimeout(()=>{Ji--}),function(...e){const t=rn(xe());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(e=>{e.addEventProcessor(e=>(t.mechanism&&(Rt(e,void 0),Ft(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),br(r)}),r}finally{ve._sentryWrappedDepth=(ve._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}ct(n,e),ut(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function ta(){const e=Yi(),{referrer:t}=Xi.document||{},{userAgent:n}=Xi.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function na(e,t){const n=aa(e,t),r={type:la(t),value:ua(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ra(e,t,n,r){const i=un(),a=i?.getOptions().normalizeDepth,s=(o=t,Object.values(o).find(e=>e instanceof Error));var o;const l={__serialized__:wt(t,a)};if(s)return{exception:{values:[na(e,s)]},extra:l};const u={exception:{values:[{type:it(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:da(t,{isUnhandledRejection:r})}]},extra:l};if(n){const t=aa(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function ia(e,t){return{exception:{values:[na(e,t)]}}}function aa(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&sa.test(e.message))return 1;return 0}(t),i=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,i)}catch{}return[]}const sa=/Minified React error #\d+;/i;function oa(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function la(e){const t=e?.name;if(!t&&oa(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function ua(e){const t=e?.message;return oa(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?Pi(t.error):Pi(e):"No error message"}function ca(e,t,n,r,i){let a;if(Xe(t)&&t.error){return ia(e,t.error)}if(Je(t)||Ye(t,"DOMException")){const i=t;if("stack"in t){a=ia(e,t);const i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){const t=aa(e,n);t.length&&(i.stacktrace={frames:t},Ft(a,{synthetic:!0}))}}else{const t=i.name||(Je(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;a=ha(e,s,n,r),Rt(a,s)}return"code"in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}if(Ze(t))return ia(e,t);if(nt(t)||it(t)){return a=ra(e,t,n,i),Ft(a,{synthetic:!0}),a}return a=ha(e,t,n,r),Rt(a,`${t}`),Ft(a,{synthetic:!0}),a}function ha(e,t,n,r){const i={};if(r&&n){const r=aa(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Ft(i,{synthetic:!0})}if(et(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 da(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(dt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";if(Xe(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(it(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}let pa=class extends si{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Xi.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;!function(e,t,n=[t],r="npm"){const i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:be})),i.version=be)}(t,"browser",["browser"],Xi.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:r}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:r?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:i}=this._options;Xi.document&&Xi.document.addEventListener("visibilitychange",()=>{"hidden"===Xi.document.visibilityState&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",gi)}eventFromException(e,t){return function(e,t,n,r){const i=ca(e,t,n?.syntheticException||void 0,r);return Ft(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),lr(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const a=ha(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),lr(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};const fa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ma=ve;function ga(e,t,n){ma.document&&ma.addEventListener(e,t,n)}function Aa(e,t,n){ma.document&&ma.removeEventListener(e,t,n)}const ya={};try{"undefined"!=typeof Node&&(ya.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(ya.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,ya.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,ya.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,ya.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(ya.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function va(e,t,n){const r=ya[t];if(r)try{return r.call(e,n)}catch{}const i=e[t];return"function"==typeof i?i.call(e,n):i}function ba(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let a=0,s=0;const o=" > ",l=o.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<r&&(u=xa(n,c),!("html"===u||a>1&&s+i.length*l+u.length>=h));)i.push(u),s+=u.length,n=va(n,"parentNode");return i.reverse().join(o)}catch{return"<unknown>"}}function xa(e,t){const n=[],r=va(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=va(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const i=t?.length?t.filter(t=>va(e,"getAttribute",t)).map(t=>[t,va(e,"getAttribute",t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=va(e,"id");t&&n.push(`#${t}`);const r=va(e,"className");if(r&&$e(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const a of["aria-label","type","name","title","alt"]){const t=va(e,"getAttribute",a);t&&n.push(`[${a}="${t}"]`)}return n.join("")}let _a,wa,Ea,Ca;function Sa(){if(!ma.document)return;const e=je.bind(null,"dom"),t=Ia(e,!0);ma.document.addEventListener("click",t,!1),ma.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=ma,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(lt(r,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){const r=Ia(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),lt(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Ia(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;ut(n,"_sentryCaptured",!0),r&&!r._sentryId&&ut(r,"_sentryId",Dt());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==wa)return!1;try{if(!e.target||e.target._sentryId!==Ea)return!1}catch{}return!0}(n)){e({event:n,name:i,global:t}),wa=n.type,Ea=r?r._sentryId:void 0}clearTimeout(_a),_a=ma.setTimeout(()=>{Ea=void 0,wa=void 0},1e3)}}function Ma(e){const t="history";Ve(t,e),Ge(t,Ta)}function Ta(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Ca,i=function(e){try{return new URL(e,ma.location.origin).toString()}catch{return e}}(String(n));if(Ca=i,r===i)return e.apply(this,t);je("history",{from:r,to:i})}return e.apply(this,t)}}ma.addEventListener("popstate",()=>{const e=ma.location.href,t=Ca;if(Ca=e,t===e)return;je("history",{from:t,to:e})}),"history"in Gi&&Gi.history&&(lt(ma.history,"pushState",e),lt(ma.history,"replaceState",e))}const Da={};const Pa="__sentry_xhr_v3__";function Ba(){if(!ma.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*zt(),a=$e(n[0])?n[0].toUpperCase():void 0,s=function(e){if($e(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!a||!s)return e.apply(t,n);t[Pa]={method:a,url:s,request_headers:{}},"POST"===a&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const o=()=>{const e=t[Pa];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}je("xhr",{endTimestamp:1e3*zt(),startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener("readystatechange",o)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(o(),e.apply(t,n))}):t.addEventListener("readystatechange",o),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,a=t[Pa];return a&&$e(r)&&$e(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Pa];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return je("xhr",{startTimestamp:1e3*zt(),xhr:t}),e.apply(t,n)}})}function Ra(e,t=function(e){const t=Da[e];if(t)return t;let n=ma[e];if(ji(n))return Da[e]=n.bind(ma);const r=ma.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(jke){fa&&De.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,jke)}return n?Da[e]=n.bind(ma):n}("fetch")){let n=0,r=0;return Qr(e,async function(i){const a=i.body.length;n+=a,r++;const s={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,s);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(jke){throw function(e){Da[e]=void 0}("fetch"),jke}finally{n-=a,r--}},qr(e.bufferSize||40))}const Fa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function La(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?Pe:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ka=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Oa=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,za=/\((\S*)(?::(\d+))(?::(\d+))\)/,Na=/at (.+?) ?\(data:(.+?),/,Ua=[30,e=>{const t=e.match(Na);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ka.exec(e);if(n){const[,e,t,r]=n;return La(e,Pe,+t,+r)}const r=Oa.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=za.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Ha(r[1]||Pe,r[2]);return La(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Va=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ga=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ja=[50,e=>{const t=Va.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ga.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]||Pe;return[n,e]=Ha(n,e),La(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],qa=Fe(...[Ua,ja]),Ha=(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]:Pe,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Qa=1024,Wa=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console",n=Ve(t,e);Ge(t,Fi)}(function(e){return function(t){if(un()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Li(t.level),message:It(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${It(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}yi(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(un()!==e)return;let r,i,a="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>Qa&&(Fa&&De.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=Qa),"string"==typeof a&&(a=[a]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ba(t,{keyAttrs:a,maxStringLength:s}),i=function(e,t=5){if(!Zi.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}(t)}catch{r="<unknown>"}if(0===r.length)return;const o={category:`ui.${n.name}`,message:r};i&&(o.data={"ui.component_name":i}),yi(o,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Ve("dom",n),Ge("dom",Sa)),t.xhr&&function(e){Ve("xhr",e),Ge("xhr",Ba)}(function(e){return function(t){if(un()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Pa];if(!n||!r||!i)return;const{method:a,url:s,status_code:o,body:l}=i,u={method:a,url:s,status_code:o},c={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},h={category:"xhr",data:u,type:"http",level:Vi(o)};e.emit("beforeOutgoingRequestBreadcrumb",h,c),yi(h,c)}}(e)),t.fetch&&Hi(function(e){return function(t){if(un()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),yi(a,i)}else{const i=t.response,a={...t.fetchData,status_code:i?.status},s={input:t.args,response:i,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:a,type:"http",level:Vi(a.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",o,s),yi(o,s)}}}(e)),t.history&&Ma(function(e){return function(t){if(un()!==e)return;let n=t.from,r=t.to;const i=mi(Xi.location.href);let a=n?mi(n):void 0;const s=mi(r);a?.path||(a=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),yi({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){un()===e&&yi({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Bt(t)},{event:t})}}(e))}}};const Ka="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".split(","),Za=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&<(Xi,"setTimeout",Ya),t.setInterval&<(Xi,"setInterval",Ya),t.requestAnimationFrame&<(Xi,"requestAnimationFrame",Xa),t.XMLHttpRequest&&"XMLHttpRequest"in Xi&<(XMLHttpRequest.prototype,"send",Ja);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Ka).forEach(e=>function(e,t){const n=Xi,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;lt(r,"addEventListener",function(n){return function(r,i,a){try{"function"==typeof i.handleEvent&&(i.handleEvent=ea(i.handleEvent,{mechanism:{data:{handler:Oe(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,i),n.apply(this,[r,ea(i,{mechanism:{data:{handler:Oe(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),lt(r,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function Ya(e){return function(...t){const n=t[0];return t[0]=ea(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Oe(e)}`}}),e.apply(this,t)}}function Xa(e){return function(t){return e.apply(this,[ea(t,{mechanism:{data:{handler:Oe(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Ja(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&<(n,e,function(t){const n={mechanism:{data:{handler:Oe(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=ht(t);return r&&(n.mechanism.data.handler=Oe(r)),ea(t,n)})}),e.apply(this,t)}}const $a=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===Xi.document)return void(Fa&&De.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));Er({ignoreDuration:!0});let e=!1;(e=>{const t=ma.requestIdleCallback||ma.setTimeout;"hidden"===ma.document?.visibilityState?e():(ga("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),ga("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Aa("visibilitychange",e,{capture:!0}),Aa("pagehide",e,{capture:!0})}))})(()=>{e||(Ir(),e=!0)});const n=ln();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&Ir())}),"route"===t&&Ma(({from:t,to:n})=>{t!==n&&(Er({ignoreDuration:!0}),Ir(),e=!0)})}}},es=()=>({name:"CultureContext",preprocessEvent(e){const t=ts();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=ts();t&&or(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function ts(){try{const e=Xi.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const ns=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";Ve(t,e),Ge(t,He)}(t=>{const{stackParser:n,attachStacktrace:r}=is();if(un()!==e||$i())return;const{msg:i,url:a,line:s,column:o,error:l}=t,u=function(e,t,n,r){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},l=o.frames=o.frames||[];0===l.length&&l.push({colno:r,lineno:n,filename:as(t)??Yi(),function:Pe,in_app:!0});return e}(ca(n,l||i,void 0,r,!1),a,s,o);u.level="error",_r(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),rs("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";Ve(t,e),Ge(t,We)}(t=>{const{stackParser:n,attachStacktrace:r}=is();if(un()!==e||$i())return;const i=function(e){if(tt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),a=tt(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:ca(n,i,void 0,r,!0);a.level="error",_r(a,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),rs("onunhandledrejection"))}}};function rs(e){Fa&&De.log(`Global Handler attached: ${e}`)}function is(){const e=un();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function as(e){if($e(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),a=e.indexOf(",");let s="";if(t&&-1!==a){const t=e.slice(a+1);s=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?",base64":""}${s?`,${s}`:""}`}return e}(e,!1)}>`:e}const ss=()=>({name:"HttpContext",preprocessEvent(e){if(!Xi.navigator&&!Xi.location&&!Xi.document)return;const t=ta(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[hn];if(!Xi.navigator&&!Xi.location&&!Xi.document)return;const n=ta();or(e,{[ar]:"http.client"!==t?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),os=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){Si(na,i.getOptions().stackParser,n,t,e,r)}}},ls=/^HTML(\w*)Element$/;function us(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(ls.test(t))return`[HTMLElement: ${ba(e)}]`}}function cs(){return!!function(){if(void 0===Xi.window)return!1;const e=Xi;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=Yi();return!(Xi===Xi.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}()&&(Fa&&Se(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function hs(e={}){const t=!e.skipBrowserExtensionCheck&&cs();let n=null==e.defaultIntegrations?[wi(),bi(),Ui(),Za(),Wa(),ns(),os(),ki(),ss(),es(),$a()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(i=e.stackParser||qa,Array.isArray(i)?Fe(...i):i),integrations:Pr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Ra};var i;return bt=us,fi(pa,r)}class ds{constructor(){this.initialized=!1}static initialize(e){const t=ds.getInstance();if(t.initialized)return void wr("component",e);hs({dsn:"https://98a864152051bb3d42f8e955f2ab3078@sentry.mapvx.app/6",environment:"production",release:"0.10.0"}),wr("component",e),t.initialized=!0}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}error(e,t){br(e,t?{extra:t}:void 0)}info(e,t){xr(e,{level:"info",extra:t})}warning(e,t){xr(e,{level:"warning",extra:t})}critical(e,t){xr(e,{level:"fatal",extra:t})}}
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2021 Google LLC
|
|
@@ -505,4 +505,4 @@ function(e,t){GGe&&GGe.exports?GGe.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t(
|
|
|
505
505
|
*/var u1e=null;try{u1e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function c1e(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function h1e(e){return!0===(e&&e.__isLong__)}function d1e(e){var t=Math.clz32(e&-e);return e?31-t:t}c1e.prototype.__isLong__,Object.defineProperty(c1e.prototype,"__isLong__",{value:!0}),c1e.isLong=h1e;var p1e={},f1e={};function m1e(e,t){var n,r,i;return t?(i=0<=(e>>>=0)&&e<256)&&(r=f1e[e])?r:(n=A1e(e,0,!0),i&&(f1e[e]=n),n):(i=-128<=(e|=0)&&e<128)&&(r=p1e[e])?r:(n=A1e(e,e<0?-1:0,!1),i&&(p1e[e]=n),n)}function g1e(e,t){if(isNaN(e))return t?S1e:C1e;if(t){if(e<0)return S1e;if(e>=_1e)return P1e}else{if(e<=-w1e)return B1e;if(e+1>=w1e)return D1e}return e<0?g1e(-e,t).neg():A1e(e%x1e|0,e/x1e|0,t)}function A1e(e,t,n){return new c1e(e,t,n)}c1e.fromInt=m1e,c1e.fromNumber=g1e,c1e.fromBits=A1e;var y1e=Math.pow;function v1e(e,t,n){if(0===e.length)throw Error("empty string");if("number"==typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?S1e:C1e;if((n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return v1e(e.substring(1),t,n).neg();for(var i=g1e(y1e(n,8)),a=C1e,s=0;s<e.length;s+=8){var o=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+o),n);if(o<8){var u=g1e(y1e(n,o));a=a.mul(u).add(g1e(l))}else a=(a=a.mul(i)).add(g1e(l))}return a.unsigned=t,a}function b1e(e,t){return"number"==typeof e?g1e(e,t):"string"==typeof e?v1e(e,t):A1e(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}c1e.fromString=v1e,c1e.fromValue=b1e;var x1e=4294967296,_1e=x1e*x1e,w1e=_1e/2,E1e=m1e(1<<24),C1e=m1e(0);c1e.ZERO=C1e;var S1e=m1e(0,!0);c1e.UZERO=S1e;var I1e=m1e(1);c1e.ONE=I1e;var M1e=m1e(1,!0);c1e.UONE=M1e;var T1e=m1e(-1);c1e.NEG_ONE=T1e;var D1e=A1e(-1,2147483647,!1);c1e.MAX_VALUE=D1e;var P1e=A1e(-1,-1,!0);c1e.MAX_UNSIGNED_VALUE=P1e;var B1e=A1e(0,-2147483648,!1);c1e.MIN_VALUE=B1e;var R1e=c1e.prototype;R1e.toInt=function(){return this.unsigned?this.low>>>0:this.low},R1e.toNumber=function(){return this.unsigned?(this.high>>>0)*x1e+(this.low>>>0):this.high*x1e+(this.low>>>0)},R1e.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(B1e)){var t=g1e(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=g1e(y1e(e,6),this.unsigned),a=this,s="";;){var o=a.div(i),l=(a.sub(o.mul(i)).toInt()>>>0).toString(e);if((a=o).isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},R1e.getHighBits=function(){return this.high},R1e.getHighBitsUnsigned=function(){return this.high>>>0},R1e.getLowBits=function(){return this.low},R1e.getLowBitsUnsigned=function(){return this.low>>>0},R1e.getNumBitsAbs=function(){if(this.isNegative())return this.eq(B1e)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},R1e.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&(-1===e&&!(0===this.low&&-2097152===this.high))},R1e.isZero=function(){return 0===this.high&&0===this.low},R1e.eqz=R1e.isZero,R1e.isNegative=function(){return!this.unsigned&&this.high<0},R1e.isPositive=function(){return this.unsigned||this.high>=0},R1e.isOdd=function(){return!(1&~this.low)},R1e.isEven=function(){return!(1&this.low)},R1e.equals=function(e){return h1e(e)||(e=b1e(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},R1e.eq=R1e.equals,R1e.notEquals=function(e){return!this.eq(e)},R1e.neq=R1e.notEquals,R1e.ne=R1e.notEquals,R1e.lessThan=function(e){return this.comp(e)<0},R1e.lt=R1e.lessThan,R1e.lessThanOrEqual=function(e){return this.comp(e)<=0},R1e.lte=R1e.lessThanOrEqual,R1e.le=R1e.lessThanOrEqual,R1e.greaterThan=function(e){return this.comp(e)>0},R1e.gt=R1e.greaterThan,R1e.greaterThanOrEqual=function(e){return this.comp(e)>=0},R1e.gte=R1e.greaterThanOrEqual,R1e.ge=R1e.greaterThanOrEqual,R1e.compare=function(e){if(h1e(e)||(e=b1e(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},R1e.comp=R1e.compare,R1e.negate=function(){return!this.unsigned&&this.eq(B1e)?B1e:this.not().add(I1e)},R1e.neg=R1e.negate,R1e.add=function(e){h1e(e)||(e=b1e(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,o=e.low>>>16,l=0,u=0,c=0,h=0;return c+=(h+=i+(65535&e.low))>>>16,u+=(c+=r+o)>>>16,l+=(u+=n+s)>>>16,l+=t+a,A1e((c&=65535)<<16|(h&=65535),(l&=65535)<<16|(u&=65535),this.unsigned)},R1e.subtract=function(e){return h1e(e)||(e=b1e(e)),this.add(e.neg())},R1e.sub=R1e.subtract,R1e.multiply=function(e){if(this.isZero())return this;if(h1e(e)||(e=b1e(e)),u1e)return A1e(u1e.mul(this.low,this.high,e.low,e.high),u1e.get_high(),this.unsigned);if(e.isZero())return this.unsigned?S1e:C1e;if(this.eq(B1e))return e.isOdd()?B1e:C1e;if(e.eq(B1e))return this.isOdd()?B1e:C1e;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(E1e)&&e.lt(E1e))return g1e(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,o=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,d=0;return h+=(d+=i*l)>>>16,c+=(h+=r*l)>>>16,h&=65535,c+=(h+=i*o)>>>16,u+=(c+=n*l)>>>16,c&=65535,u+=(c+=r*o)>>>16,c&=65535,u+=(c+=i*s)>>>16,u+=t*l+n*o+r*s+i*a,A1e((h&=65535)<<16|(d&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},R1e.mul=R1e.multiply,R1e.divide=function(e){if(h1e(e)||(e=b1e(e)),e.isZero())throw Error("division by zero");var t,n,r;if(u1e)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?A1e((this.unsigned?u1e.div_u:u1e.div_s)(this.low,this.high,e.low,e.high),u1e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?S1e:C1e;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return S1e;if(e.gt(this.shru(1)))return M1e;r=S1e}else{if(this.eq(B1e))return e.eq(I1e)||e.eq(T1e)?B1e:e.eq(B1e)?I1e:(t=this.shr(1).div(e).shl(1)).eq(C1e)?e.isNegative()?I1e:T1e:(n=this.sub(e.mul(t)),r=t.add(n.div(e)));if(e.eq(B1e))return this.unsigned?S1e:C1e;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=C1e}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var i=Math.ceil(Math.log(t)/Math.LN2),a=i<=48?1:y1e(2,i-48),s=g1e(t),o=s.mul(e);o.isNegative()||o.gt(n);)o=(s=g1e(t-=a,this.unsigned)).mul(e);s.isZero()&&(s=I1e),r=r.add(s),n=n.sub(o)}return r},R1e.div=R1e.divide,R1e.modulo=function(e){return h1e(e)||(e=b1e(e)),u1e?A1e((this.unsigned?u1e.rem_u:u1e.rem_s)(this.low,this.high,e.low,e.high),u1e.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},R1e.mod=R1e.modulo,R1e.rem=R1e.modulo,R1e.not=function(){return A1e(~this.low,~this.high,this.unsigned)},R1e.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},R1e.clz=R1e.countLeadingZeros,R1e.countTrailingZeros=function(){return this.low?d1e(this.low):d1e(this.high)+32},R1e.ctz=R1e.countTrailingZeros,R1e.and=function(e){return h1e(e)||(e=b1e(e)),A1e(this.low&e.low,this.high&e.high,this.unsigned)},R1e.or=function(e){return h1e(e)||(e=b1e(e)),A1e(this.low|e.low,this.high|e.high,this.unsigned)},R1e.xor=function(e){return h1e(e)||(e=b1e(e)),A1e(this.low^e.low,this.high^e.high,this.unsigned)},R1e.shiftLeft=function(e){return h1e(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?A1e(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):A1e(0,this.low<<e-32,this.unsigned)},R1e.shl=R1e.shiftLeft,R1e.shiftRight=function(e){return h1e(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?A1e(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):A1e(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},R1e.shr=R1e.shiftRight,R1e.shiftRightUnsigned=function(e){return h1e(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?A1e(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):A1e(32===e?this.high:this.high>>>e-32,0,this.unsigned)},R1e.shru=R1e.shiftRightUnsigned,R1e.shr_u=R1e.shiftRightUnsigned,R1e.rotateLeft=function(e){var t;return h1e(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?A1e(this.high,this.low,this.unsigned):e<32?(t=32-e,A1e(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),A1e(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},R1e.rotl=R1e.rotateLeft,R1e.rotateRight=function(e){var t;return h1e(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?A1e(this.high,this.low,this.unsigned):e<32?(t=32-e,A1e(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),A1e(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},R1e.rotr=R1e.rotateRight,R1e.toSigned=function(){return this.unsigned?A1e(this.low,this.high,!1):this},R1e.toUnsigned=function(){return this.unsigned?this:A1e(this.low,this.high,!0)},R1e.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},R1e.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},R1e.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},c1e.fromBytes=function(e,t,n){return n?c1e.fromBytesLE(e,t):c1e.fromBytesBE(e,t)},c1e.fromBytesLE=function(e,t){return new c1e(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},c1e.fromBytesBE=function(e,t){return new c1e(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},"function"==typeof BigInt&&(c1e.fromBigInt=function(e,t){return A1e(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},c1e.fromValue=function(e,t){return"bigint"==typeof e?c1e.fromBigInt(e,t):b1e(e,t)},R1e.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e});function F1e(e){"X"===e&&(e="");const t=e.padEnd(16,"0");return c1e.fromString(t,!0,16)}const L1e=180/Math.PI;function k1e(e,t,n){const r=1<<t;return[(e[0]+n[0])/r,(e[1]+n[1])/r]}function O1e(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function z1e(e){return[O1e(e[0]),O1e(e[1])]}function N1e(e,[t,n]){switch(e){case 0:return[1,t,n];case 1:return[-t,1,n];case 2:return[-t,-n,1];case 3:return[-1,-n,-t];case 4:return[n,-1,-t];case 5:return[n,t,-1];default:throw new Error("Invalid face")}}function U1e([e,t,n]){const r=Math.atan2(n,Math.sqrt(e*e+t*t));return[Math.atan2(t,e)*L1e,r*L1e]}function V1e(e,t,n,r){if(0===r){1===n&&(t[0]=e-1-t[0],t[1]=e-1-t[1]);const r=t[0];t[0]=t[1],t[1]=r}}function G1e(e){const{face:t,ij:n,level:r}=e,i=[[0,0],[0,1],[1,1],[1,0],[0,0]],a=Math.max(1,Math.ceil(100*Math.pow(2,-r))),s=new Float64Array(4*a*2+2);let o=0,l=0;for(let u=0;u<4;u++){const e=i[u].slice(0),c=i[u+1],h=(c[0]-e[0])/a,d=(c[1]-e[1])/a;for(let i=0;i<a;i++){e[0]+=h,e[1]+=d;const i=U1e(N1e(t,z1e(k1e(n,r,e))));Math.abs(i[1])>89.999&&(i[0]=l);const a=i[0]-l;i[0]+=a>180?-360:a<-180?360:0,s[o++]=i[0],s[o++]=i[1],l=i[0]}}return s[o++]=s[0],s[o++]=s[1],s}function j1e(e){const t=function(e){if(e.indexOf("/")>0)return e;const t=F1e(e);return function(e){if(e.isZero())return"";let t=e.toString(2);for(;t.length<64;)t="0"+t;const n=t.lastIndexOf("1"),r=t.substring(0,3),i=t.substring(3,n),a=i.length/2,s=c1e.fromString(r,!0,2).toString(10);let o="";if(0!==a)for(o=c1e.fromString(i,!0,2).toString(4);o.length<a;)o="0"+o;return`${s}/${o}`}(t)}(e),n=function(e){if(0===e.length)throw new Error(`Invalid Hilbert quad key ${e}`);const t=e.split("/"),n=parseInt(t[0],10),r=t[1],i=r.length;let a=0;const s=[0,0];for(let o=i-1;o>=0;o--){a=i-o;const e=r[o];let t=0,n=0;"1"===e?n=1:"2"===e?(t=1,n=1):"3"===e&&(t=1);const l=Math.pow(2,a-1);V1e(l,s,t,n),s[0]+=l*t,s[1]+=l*n}if(n%2==1){const e=s[0];s[0]=s[1],s[1]=e}return{face:n,ij:s,level:a}}(t);return n}function q1e(e){return function(e){const t=z1e(k1e(e.ij,e.level,[.5,.5]));return U1e(N1e(e.face,t))}(j1e(e))}function H1e(e){if(e.length%2!=0)throw new Error("Invalid corners");const t=[],n=[];for(let r=0;r<e.length;r+=2)t.push(e[r]),n.push(e[r+1]);return t.sort((e,t)=>e-t),n.sort((e,t)=>e-t),{west:t[0],east:t[t.length-1],north:n[n.length-1],south:n[0]}}function Q1e(e,t){const n=t?.minimumHeight||0,r=t?.maximumHeight||0,i=function(e){let t;if(2===e.face||5===e.face){let n=null,r=0;for(let t=0;t<4;t++){const i=G1e(j1e(`${e.face}/${t}`));null==n&&(n=new Float64Array(4*i.length)),n.set(i,r),r+=i.length}t=H1e(n)}else t=H1e(G1e(e));return t}(j1e(e)),a=i.west,s=i.south,o=i.east,l=i.north,u=[];return u.push(new gve(a,l,n)),u.push(new gve(o,l,n)),u.push(new gve(o,s,n)),u.push(new gve(a,s,n)),u.push(new gve(a,l,r)),u.push(new gve(o,l,r)),u.push(new gve(o,s,r)),u.push(new gve(a,s,r)),u}function W1e(e){const t=e.token,n={minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight},r=Q1e(t,n),i=q1e(t),a=i[0],s=i[1],o=jZe.WGS84.cartographicToCartesian([a,s,n.maximumHeight]),l=new gve(o[0],o[1],o[2]);r.push(l);const u=eqe(r);return[...u.center,...u.halfAxes]}const K1e={QUADTREE:4,OCTREE:8};function Z1e(e,t,n){if(e?.box){const r=function(e,t){const n=function(e){return e.and(e.not().add(1))}(e).shiftRightUnsigned(2);return e.add(c1e.fromNumber(2*t+1-4).multiply(n))}(F1e(e.s2VolumeInfo.token),t),i=function(e){if(e.isZero())return"X";let t=e.countTrailingZeros();t=(t-t%4)/4;const n=t;t*=4;const r=e.shiftRightUnsigned(t).toString(16).replace(/0+$/,"");return Array(17-n-r.length).join("0")+r}(r),a={...e.s2VolumeInfo};if(a.token=i,"OCTREE"===n){const t=e.s2VolumeInfo,n=t.maximumHeight-t.minimumHeight,r=n/2,i=t.minimumHeight+n/2;t.minimumHeight=i-r,t.maximumHeight=i+r}return{box:W1e(a),s2VolumeInfo:a}}}async function Y1e(e){const{subtree:t,subtreeData:n={level:0,x:0,y:0,z:0},parentData:r={mortonIndex:0,localLevel:-1,localX:0,localY:0,localZ:0},childIndex:i=0,implicitOptions:a,loaderOptions:s,s2VolumeBox:o}=e,{subdivisionScheme:l,subtreeLevels:u,maximumLevel:c,contentUrlTemplate:h,subtreesUriTemplate:d,basePath:p}=a,f={children:[],lodMetricValue:0,contentUrl:""};if(!c)return lhe.once(`Missing 'maximumLevel' or 'availableLevels' property. The subtree ${h} won't be loaded...`),f;const m=r.localLevel+1,g=n.level+m;if(g>c)return f;const A=K1e[l],y=Math.log2(A),v=1&i,b=i>>1&1,x=i>>2&1,_=J1e(r.localX,v,1),w=J1e(r.localY,b,1),E=J1e(r.localZ,x,1),C=J1e(n.x,_,m),S=J1e(n.y,w,m),I=J1e(n.z,E,m),M=J1e(r.mortonIndex,i,y);let T,D,P,B;if(m===u&&X1e(t.childSubtreeAvailability,M)){const e=$1e(`${p}/${d}`,g,C,S,I);T=await spe(e,l1e,s),B=0,D={level:g,x:C,y:S,z:I},P={mortonIndex:0,localLevel:0,localX:0,localY:0,localZ:0}}else{T=t;B=(A**m-1)/(A-1)+M,D=n,P={mortonIndex:M,localLevel:m,localX:_,localY:w,localZ:E}}if(!X1e(T.tileAvailability,B))return f;X1e(T.contentAvailability,B)&&(f.contentUrl=$1e(h,g,C,S,I));for(let R=0;R<A;R++){const e=Z1e(o,R,l),t=await Y1e({subtree:T,subtreeData:D,parentData:P,childIndex:R,implicitOptions:a,loaderOptions:s,s2VolumeBox:e});(t.contentUrl||t.children.length)&&f.children.push(t)}if(f.contentUrl||f.children.length){const e=function(e,t,n,r){const{basePath:i,refine:a,getRefine:s,lodMetricType:o,getTileType:l,rootLodMetricValue:u,rootBoundingVolume:c}=n,h=e.contentUrl&&e.contentUrl.replace(`${i}/`,""),d=u/2**t.level,p=r?.box?{box:r.box}:c,f=function(e,t,n){if(e.region){const{level:r,x:i,y:a,z:s}=t,[o,l,u,c,h,d]=e.region,p=2**r,f=(u-o)/p,[m,g]=[o+f*i,o+f*(i+1)],A=(c-l)/p,[y,v]=[l+A*a,l+A*(a+1)];let b,x;if("OCTREE"===n){const e=(d-h)/p;[b,x]=[h+e*s,h+e*(s+1)]}else[b,x]=[h,d];return{region:[m,y,g,v,b,x]}}if(e.box)return e;throw new Error(`Unsupported bounding volume type ${JSON.stringify(e)}`)}(p,t,n.subdivisionScheme);return{children:e.children,contentUrl:e.contentUrl,content:{uri:h},id:e.contentUrl,refine:s(a),type:l(e),lodMetricType:o,lodMetricValue:d,geometricError:d,transform:e.transform,boundingVolume:f}}(f,{level:g,x:C,y:S,z:I},a,o);return e}return f}function X1e(e,t){let n;return Array.isArray(e)?(n=e[0],e.length>1&&lhe.once('Not supported extension "3DTILES_multiple_contents" has been detected')):n=e,"constant"in n?Boolean(n.constant):!!n.explicitBitstream&&function(e,t){const n=Math.floor(e/8),r=e%8;return 1==(t[n]>>r&1)}(t,n.explicitBitstream)}function J1e(e,t,n){return(e<<n)+t}function $1e(e,t,n,r,i){const a=function(e){const t={};for(const n in e)t[`{${n}}`]=e[n];return t}({level:t,x:n,y:r,z:i});return e.replace(/{level}|{x}|{y}|{z}/gi,e=>a[e])}function e2e(e,t=""){if(!t)return hYe.EMPTY;const n=t.split("?")[0].split(".").pop();switch(n){case"pnts":return hYe.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return hYe.SCENEGRAPH;default:return n||hYe.EMPTY}}function t2e(e){switch(e){case"REPLACE":case"replace":return cYe.REPLACE;case"ADD":case"add":return cYe.ADD;default:return e}}function n2e(e,t){if(/^[a-z][0-9a-z+.-]*:/i.test(t)){const n=new URL(e,`${t}/`);return decodeURI(n.toString())}return e.startsWith("/")?e:jVe(t,e)}function r2e(e,t){if(!e)return null;let n;if(e.content){const r=e.content.uri||e.content?.url;void 0!==r&&(n=n2e(r,t))}return{...e,id:n,contentUrl:n,lodMetricType:pYe.GEOMETRIC_ERROR,lodMetricValue:e.geometricError,transformMatrix:e.transform,type:e2e(0,n),refine:t2e(e.refine)}}async function i2e(e,t,n,r,i){const{subdivisionScheme:a,maximumLevel:s,availableLevels:o,subtreeLevels:l,subtrees:{uri:u}}=r,c=n2e($1e(u,0,0,0,0),n),h=await spe(c,l1e,i),d=e.content?.uri,p=d?n2e(d,n):"",f=t?.root?.refine,m=e.geometricError,g=e.boundingVolume.extensions?.["3DTILES_bounding_volume_S2"];if(g){const t={box:W1e(g),s2VolumeInfo:g};e.boundingVolume=t}const A=e.boundingVolume,y={contentUrlTemplate:p,subtreesUriTemplate:u,subdivisionScheme:a,subtreeLevels:l,maximumLevel:Number.isFinite(o)?o-1:s,refine:f,basePath:n,lodMetricType:pYe.GEOMETRIC_ERROR,rootLodMetricValue:m,rootBoundingVolume:A,getTileType:e2e,getRefine:t2e};return await async function(e,t,n,r,i){if(!e)return null;const{children:a,contentUrl:s}=await Y1e({subtree:n,implicitOptions:r,loaderOptions:i});let o,l=null;s&&(o=s,l={uri:s.replace(`${t}/`,"")});const u={...e,id:o,contentUrl:o,lodMetricType:pYe.GEOMETRIC_ERROR,lodMetricValue:e.geometricError,transformMatrix:e.transform,type:e2e(0,o),refine:t2e(e.refine),content:l||e.content,children:a};return u}(e,n,h,y,i)}function a2e(e){return e?.extensions?.["3DTILES_implicit_tiling"]||e?.implicitTiling}const s2e={dataType:null,batchType:null,id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:uXe,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(e,t={},n){const r=t["3d-tiles"]||{};let i;i="auto"===r.isTileset?n?.url&&-1!==n.url.indexOf(".json"):r.isTileset;return i?async function(e,t,n){const r=JSON.parse((new TextDecoder).decode(e)),i=n?.url||"",a=function(e){return GVe(e)}(i),s=await async function(e,t,n){let r=null;const i=a2e(e.root);r=i&&e.root?await i2e(e.root,e,t,i,n):r2e(e.root,t);const a=[];for(a.push(r);a.length>0;){const r=a.pop()||{},i=r.children||[],s=[];for(const o of i){const r=a2e(o);let i;i=r?await i2e(o,e,t,r,n):r2e(o,t),i&&(s.push(i),a.push(i))}r.children=s}return r}(r,a,t||{}),o={...r,shape:"tileset3d",loader:s2e,url:i,queryString:n?.queryString||"",basePath:a,root:s||r.root,type:dYe.TILES3D,lodMetricType:pYe.GEOMETRIC_ERROR,lodMetricValue:r.root?.geometricError||0};return o}(e,t,n):async function(e,t,n){const r={content:{shape:"tile3d",featureIds:null}},i=0;return await a1e(e,i,t,n,r.content),r.content}(e,t,n)},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};const o2e=[0],l2e={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:"",loader:s2e,onTilesetLoad:{type:"function",value:e=>{}},onTileLoad:{type:"function",value:e=>{}},onTileUnload:{type:"function",value:e=>{}},onTileError:{type:"function",value:(e,t,n)=>{}},_getMeshColor:{type:"function",value:e=>[255,255,255]}};class u2e extends vBe{initializeState(){"onTileLoadFail"in this.props&&Tpe.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){return Boolean(this.state?.tileset3d?.isLoaded()&&super.isLoaded)}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState({props:e,oldProps:t,changeFlags:n}){if(e.data&&e.data!==t.data&&this._loadTileset(e.data),n.viewportChanged){const{activeViewports:e}=this.state;Object.keys(e).length&&(this._updateTileset(e),this.state.lastUpdatedViewports=e,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:e}=this.state;for(const t in e)e[t].needsUpdate=!0}}finalizeState(e){this.state.tileset3d?.destroy(),this.state.tileset3d=null,this.state.layerMap={},this.state.activeViewports={},this.state.lastUpdatedViewports=null,super.finalizeState(e)}activateViewport(e){const{activeViewports:t,lastUpdatedViewports:n}=this.state;this.internalState.viewport=e,t[e.id]=e;const r=n?.[e.id];r&&e.equals(r)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:e,sourceLayer:t}){const n=t&&t.props.tile;return e.picked&&(e.object=n),e.sourceTile=n,e}filterSubLayer({layer:e,viewport:t,cullRect:n,isPicking:r}){const{tile:i}=e.props,{id:a}=t;if(!i.selected||!i.viewportIds.includes(a))return!1;if(r&&n&&i.content?.cartographicOrigin){const[e,r]=t.project(i.content.cartographicOrigin),a=n.x+n.width/2,s=n.y+n.height/2,o=Math.max(t.width,t.height)/4,l=e-a,u=r-s;if(l*l+u*u>o*o)return!1}return!0}_updateAutoHighlight(e){const t=e.sourceTile,n=this.state.layerMap[t?.id];n&&n.layer&&n.layer.updateAutoHighlight(e)}async _loadTileset(e){const t=this.props.loadOptions||{},n=this.props.loaders?.length?this.props.loaders:this.props.loader,r=Array.isArray(n)?n[0]:n,{tileset:i,...a}=t,s={loadOptions:{...a},...i};let o=e;if("preload"in r&&"function"==typeof r.preload){const n=await r.preload(e,t);n.url&&(o=n.url),n.headers&&(s.loadOptions.core={...s.loadOptions.core,fetch:{...s.loadOptions.core?.fetch,headers:n.headers}}),Object.assign(s,n)}const l=await spe(o,r,s.loadOptions),u=new lXe(l,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,onUpdate:()=>this.setNeedsUpdate(),...s});this.setState({tileset3d:u,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(u)}_onTileLoad(e){const{lastUpdatedViewports:t}=this.state;e.tileDrawn=!1,this.props.onTileLoad(e),this._updateTileset(t),this.setNeedsUpdate()}_onTileUnload(e){delete this.state.layerMap[e.id],this.props.onTileUnload(e)}_updateTileset(e){if(!e)return;const{tileset3d:t}=this.state,{timeline:n}=this.context,r=Object.keys(e).length;n&&r&&t&&t.selectTiles(Object.values(e)).then(e=>{this.state.frameNumber!==e&&this.setState({frameNumber:e})})}_getSubLayer(e,t){if(!e.content)return null;switch(e.type){case hYe.POINTCLOUD:return this._makePointCloudLayer(e,t);case hYe.SCENEGRAPH:return this._make3DModelLayer(e);case hYe.MESH:return this._makeSimpleMeshLayer(e,t);default:throw new Error(`Tile3DLayer: Failed to render layer of type ${e.content.type}`)}}_makePointCloudLayer(e,t){const{attributes:n,pointCount:r,constantRGBA:i,cartographicOrigin:a,modelMatrix:s}=e.content,{positions:o,normals:l,colors:u}=n;if(!o)return null;const c=t&&t.props.data||{header:{vertexCount:r},attributes:{POSITION:o,NORMAL:l,COLOR_0:u}},{pointSize:h,getPointColor:d}=this.props;return new(this.getSubLayerClass("pointcloud",GRe))({pointSize:h},this.getSubLayerProps({id:"pointcloud"}),{id:`${this.id}-pointcloud-${e.id}`,tile:e,data:c,coordinateSystem:Zxe.METER_OFFSETS,coordinateOrigin:a,modelMatrix:s,getColor:i||d,_offset:0})}_make3DModelLayer(e){const{gltf:t,instances:n,cartographicOrigin:r,modelMatrix:i}=e.content;return new(this.getSubLayerClass("scenegraph",AZe))({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:`${this.id}-scenegraph-${e.id}`,tile:e,data:n||o2e,scenegraph:t,coordinateSystem:Zxe.METER_OFFSETS,coordinateOrigin:r,modelMatrix:i,getTransformMatrix:e=>e.modelMatrix,getPosition:[0,0,0],_offset:0,onFirstDraw:()=>{e.tileDrawn=!0}})}_makeSimpleMeshLayer(e,t){const n=e.content,{attributes:r,indices:i,modelMatrix:a,cartographicOrigin:s,coordinateSystem:o=Zxe.METER_OFFSETS,material:l,featureIds:u}=n,{_getMeshColor:c}=this.props,h=t&&t.props.mesh||new Jwe({topology:"triangle-list",attributes:c2e(r),indices:i});return new(this.getSubLayerClass("mesh",_Ze))(this.getSubLayerProps({id:"mesh"}),{id:`${this.id}-mesh-${e.id}`,tile:e,mesh:h,data:o2e,getColor:c(e),pbrMaterial:l,modelMatrix:a,coordinateOrigin:s,coordinateSystem:o,featureIds:u,_offset:0})}renderLayers(){const{tileset3d:e,layerMap:t}=this.state;return e?e.tiles.map(e=>{const n=t[e.id]=t[e.id]||{tile:e};let{layer:r}=n;return e.selected&&(r?n.needsUpdate&&(r=this._getSubLayer(e,r),n.needsUpdate=!1):r=this._getSubLayer(e)),n.layer=r,r}).filter(Boolean):null}}function c2e(e){const t={};return t.positions={...e.positions,value:new Float32Array(e.positions.value)},e.normals&&(t.normals=e.normals),e.texCoords&&(t.texCoords=e.texCoords),e.colors&&(t.colors=e.colors),e.uvRegions&&(t.uvRegions=e.uvRegions),t}u2e.defaultProps=l2e,u2e.layerName="Tile3DLayer";const h2e={dataType:null,batchType:null,name:"Terrain",id:"terrain",module:"terrain",version:"4.4.3",worker:!0,extensions:["png","pngraw","jpg","jpeg","gif","webp","bmp"],mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp"],options:{terrain:{tesselator:"auto",bounds:void 0,meshMaxError:10,elevationDecoder:{rScaler:1,gScaler:0,bScaler:0,offset:0},skirtHeight:void 0}}},d2e=[1],p2e=180,f2e={...Pqe.defaultProps,elevationData:lqe,texture:{...lqe,optional:!0},meshMaxError:{type:"number",value:4},bounds:{type:"array",value:null,optional:!0,compare:!0},color:{type:"color",value:[255,255,255]},elevationDecoder:{type:"object",value:{rScaler:1,gScaler:0,bScaler:0,offset:0}},workerUrl:"",wireframe:!1,material:!0,loaders:[h2e]};function m2e(e){return Array.isArray(e)?e.join(";"):e||""}class g2e extends vBe{updateState({props:e,oldProps:t}){const n=e.elevationData!==t.elevationData;if(n){const{elevationData:t}=e,n=t&&(Array.isArray(t)||A2e(t));this.setState({isTiled:n})}const r=n||e.meshMaxError!==t.meshMaxError||e.elevationDecoder!==t.elevationDecoder||e.bounds!==t.bounds;if(!this.state.isTiled&&r){const t=this.loadTerrain(e);this.setState({terrain:t})}e.workerUrl&&Tpe.removed("workerUrl","loadOptions.terrain.workerUrl")()}loadTerrain({elevationData:e,bounds:t,elevationDecoder:n,meshMaxError:r,signal:i}){if(!e)return null;const a=function(e){return!Number.isFinite(e)||e<=0?1:Math.max(e,1)}(r);let s=this.getLoadOptions();s={...s,terrain:{skirtHeight:this.state.isTiled?2*a:0,...s?.terrain,bounds:t,meshMaxError:a,elevationDecoder:n}};const{fetch:o}=this.props;return o(e,{propName:"elevationData",layer:this,loadOptions:s,signal:i})}getTiledTerrainData(e){const{elevationData:t,fetch:n,texture:r,elevationDecoder:i,meshMaxError:a}=this.props,{viewport:s}=this.context,o=cqe(t,e),l=r&&cqe(r,e),{signal:u}=e;let c=[0,0],h=[0,0];if(s.isGeospatial){const t=e.bbox;c=s.projectFlat([t.west,t.south]),h=s.projectFlat([t.east,t.north])}else{const t=e.bbox;c=[t.left,t.bottom],h=[t.right,t.top]}const d=function(e,t,n){const r=(e[2]-e[0])/t*1,i=(e[3]-e[1])/t*1,a=[e[0]-r,e[1]-i,e[2]+r,e[3]+i];return n?[Math.max(a[0],-180),Math.max(a[1],-90),Math.min(a[2],p2e),Math.min(a[3],90)]:a}([c[0],c[1],h[0],h[1]],this.props.tileSize,s instanceof SBe),p=this.loadTerrain({elevationData:o,bounds:d,elevationDecoder:i,meshMaxError:a,signal:u}),f=l?n(l,{propName:"texture",layer:this,loaders:[],signal:u}).catch(e=>null):Promise.resolve(null);return Promise.all([p,f])}renderSubLayers(e){const t=this.getSubLayerClass("mesh",$qe),{color:n,wireframe:r,material:i}=this.props,{data:a}=e;if(!a)return null;const[s,o]=a,{viewport:l}=this.context,u=l instanceof SBe,c=s?.header?.boundingBox,h=c&&c.every(([e,t])=>e>=-180&&e<=p2e&&t>=-90&&t<=90),d=u&&h?Zxe.LNGLAT:Zxe.CARTESIAN;return new t(e,{data:d2e,mesh:s,texture:o,_instanced:!1,coordinateSystem:d,getPosition:e=>[0,0,0],getColor:n,wireframe:r,material:i})}onViewportLoad(e){if(!e)return;const{zRange:t}=this.state,n=e.map(e=>e.content).filter(Boolean).map(e=>e[0].header.boundingBox.map(e=>e[2]));if(0===n.length)return;const r=Math.min(...n.map(e=>e[0])),i=Math.max(...n.map(e=>e[1]));(!t||r<t[0]||i>t[1])&&this.setState({zRange:[r,i]})}renderLayers(){const{color:e,material:t,elevationData:n,texture:r,wireframe:i,meshMaxError:a,elevationDecoder:s,tileSize:o,maxZoom:l,minZoom:u,extent:c,maxRequests:h,onTileLoad:d,onTileUnload:p,onTileError:f,maxCacheSize:m,maxCacheByteSize:g,refinementStrategy:A,zoomOffset:y}=this.props;if(this.state.isTiled)return new Pqe(this.getSubLayerProps({id:"tiles"}),{getTileData:this.getTiledTerrainData.bind(this),renderSubLayers:this.renderSubLayers.bind(this),updateTriggers:{getTileData:{elevationData:m2e(n),texture:m2e(r),meshMaxError:a,elevationDecoder:s,projectionMode:this.context.viewport.projectionMode,zoomOffset:y}},onViewportLoad:this.onViewportLoad.bind(this),zRange:this.state.zRange||null,tileSize:o,maxZoom:l,minZoom:u,extent:c,maxRequests:h,onTileLoad:d,onTileUnload:p,onTileError:f,maxCacheSize:m,maxCacheByteSize:g,refinementStrategy:A,zoomOffset:y});if(!n)return null;return new(this.getSubLayerClass("mesh",$qe))(this.getSubLayerProps({id:"mesh"}),{data:d2e,mesh:this.state.terrain,texture:r,_instanced:!1,getPosition:e=>[0,0,0],getColor:e,material:t,wireframe:i})}}g2e.defaultProps=f2e,g2e.layerName="TerrainLayer";const A2e=e=>e.includes("{x}")&&(e.includes("{y}")||e.includes("{-y}")),y2e={clipBounds:[0,0,1,1],clipByInstance:void 0},v2e="\nlayout(std140) uniform clipUniforms {\n vec4 bounds;\n} clip;\n\nbool clip_isInBounds(vec2 position) {\n return position.x >= clip.bounds[0] && position.y >= clip.bounds[1] && position.x < clip.bounds[2] && position.y < clip.bounds[3];\n}\n",b2e={name:"clip",vs:v2e,uniformTypes:{bounds:"vec4<f32>"}},x2e={"vs:#decl":"\nout float clip_isVisible;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));\n","fs:#decl":"\nin float clip_isVisible;\n","fs:DECKGL_FILTER_COLOR":"\n if (clip_isVisible < 0.5) discard;\n"},_2e={name:"clip",fs:v2e,uniformTypes:{bounds:"vec4<f32>"}},w2e={"vs:#decl":"\nout vec2 clip_commonPosition;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_commonPosition = geometry.position.xy;\n","fs:#decl":"\nin vec2 clip_commonPosition;\n","fs:DECKGL_FILTER_COLOR":"\n if (!clip_isInBounds(clip_commonPosition)) discard;\n"};class E2e extends jBe{getShaders(){let e="instancePositions"in this.getAttributeManager().attributes;return void 0!==this.props.clipByInstance&&(e=Boolean(this.props.clipByInstance)),this.state.clipByInstance=e,"webgpu"===this.context.device.type?{}:e?{modules:[b2e],inject:x2e}:{modules:[_2e],inject:w2e}}draw(){const{clipBounds:e}=this.props,t={};if(this.state.clipByInstance)t.bounds=e;else{const n=this.projectPosition([e[0],e[1],0]),r=this.projectPosition([e[2],e[3],0]);t.bounds=[Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.max(n[0],r[0]),Math.max(n[1],r[1])]}"webgpu"===this.context.device.type&&(t.enabled=!0,t.mode=this.state.clipByInstance?"instance":"geometry"),this.setShaderModuleProps({clip:t})}}function C2e(e,t,n){switch(e.type){case"Point":return function(e,t,n){const{positions:r}=e,i=I2e(r,t,n);if(i.length>1)return{type:"MultiPoint",coordinates:i};return{type:"Point",coordinates:i[0]}}(e,t,n);case"LineString":return function(e,t=-1/0,n=1/0){const{positions:r}=e,i=e.pathIndices.value.filter(e=>e>=t&&e<=n);if(!(i.length>2)){return{type:"LineString",coordinates:I2e(r,i[0],i[1])}}const a=[];for(let s=0;s<i.length-1;s++){const e=I2e(r,i[s],i[s+1]);a.push(e)}return{type:"MultiLineString",coordinates:a}}(e,t,n);case"Polygon":return S2e(e,t,n);default:const r=e;throw new Error(`Unsupported geometry type: ${r?.type}`)}}function S2e(e,t=-1/0,n=1/0){const{positions:r}=e,i=e.polygonIndices.value.filter(e=>e>=t&&e<=n),a=e.primitivePolygonIndices.value.filter(e=>e>=t&&e<=n);if(!(i.length>2)){const e=[];for(let t=0;t<a.length-1;t++){const n=I2e(r,a[t],a[t+1]);e.push(n)}return{type:"Polygon",coordinates:e}}const s=[];for(let o=0;o<i.length-1;o++){const t=S2e(e,i[o],i[o+1]).coordinates;s.push(t)}return{type:"MultiPolygon",coordinates:s}}function I2e(e,t,n){t=t||0,n=n||e.value.length/e.size;const r=[];for(let i=t;i<n;i++){const t=Array();for(let n=i*e.size;n<(i+1)*e.size;n++)t.push(Number(e.value[n]));r.push(t)}return r}function M2e(e,t){const n=t?.globalFeatureId;return void 0!==n?function(e,t){const n=T2e(e);for(const r of n){let e=0,n=r.featureIds.value[0];for(let i=0;i<r.featureIds.value.length;i++){const a=r.featureIds.value[i];if(a!==n){if(t===r.globalFeatureIds.value[e])return D2e(r,e,i);e=i,n=a}}if(t===r.globalFeatureIds.value[e])return D2e(r,e,r.featureIds.value.length)}throw new Error(`featureId:${t} not found`)}(e,n):function(e){const t=T2e(e);return function(e){const t=[];for(const n of e){if(0===n.featureIds.value.length)continue;let e=0,r=n.featureIds.value[0];for(let i=0;i<n.featureIds.value.length;i++){const a=n.featureIds.value[i];a!==r&&(t.push(D2e(n,e,i)),e=i,r=a)}t.push(D2e(n,e,n.featureIds.value.length))}return t}(t)}(e)}function T2e(e,t){const n=[];return e.points&&(e.points.type="Point",n.push(e.points)),e.lines&&(e.lines.type="LineString",n.push(e.lines)),e.polygons&&(e.polygons.type="Polygon",n.push(e.polygons)),n}function D2e(e,t,n){const r=C2e(e,t,n),i=function(e,t=0){const n=Object.assign({},e.properties[e.featureIds.value[t]]);for(const r in e.numericProps)n[r]=e.numericProps[r].value[t];return n}(e,t),a=function(e,t=0){return e.fields&&e.fields[e.featureIds.value[t]]}(e,t);return{type:"Feature",geometry:r,properties:i,...a}}E2e.defaultProps=y2e,E2e.extensionName="ClipExtension";var P2e,B2e,R2e,F2e={};
|
|
506
506
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */function L2e(){return P2e||(P2e=1,F2e.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,l=(1<<o)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+h],h+=d,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=r;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),a-=u}return(p?-1:1)*s*Math.pow(2,a-r)},F2e.write=function(e,t,n,r,i,a){var s,o,l,u=8*a-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=c?(o=0,s=c):s+h>=1?(o=(t*l-1)*Math.pow(2,i),s+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&o,p+=f,o/=256,i-=8);for(s=s<<i|o,u+=i;u>0;e[n+p]=255&s,p+=f,s/=256,u-=8);e[n+p-f]|=128*m}),F2e}!function(){if(R2e)return B2e;R2e=1,B2e=t;var e=L2e();function t(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}t.Varint=0,t.Fixed64=1,t.Bytes=2,t.Fixed32=5;var n=4294967296,r=1/n,i="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function a(e){return e.type===t.Bytes?e.readVarint()+e.pos:e.pos+1}function s(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function o(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function l(e,t){for(var n=0;n<e.length;n++)t.writeVarint(e[n])}function u(e,t){for(var n=0;n<e.length;n++)t.writeSVarint(e[n])}function c(e,t){for(var n=0;n<e.length;n++)t.writeFloat(e[n])}function h(e,t){for(var n=0;n<e.length;n++)t.writeDouble(e[n])}function d(e,t){for(var n=0;n<e.length;n++)t.writeBoolean(e[n])}function p(e,t){for(var n=0;n<e.length;n++)t.writeFixed32(e[n])}function f(e,t){for(var n=0;n<e.length;n++)t.writeSFixed32(e[n])}function m(e,t){for(var n=0;n<e.length;n++)t.writeFixed64(e[n])}function g(e,t){for(var n=0;n<e.length;n++)t.writeSFixed64(e[n])}function A(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function y(e,t,n){e[n]=t,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function v(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}t.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,a=this.pos;this.type=7&r,e(i,t,this),this.pos===a&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=A(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=v(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=A(this.buf,this.pos)+A(this.buf,this.pos+4)*n;return this.pos+=8,e},readSFixed64:function(){var e=A(this.buf,this.pos)+v(this.buf,this.pos+4)*n;return this.pos+=8,e},readFloat:function(){var t=e.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=e.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,a=n.buf;if(i=a[n.pos++],r=(112&i)>>4,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<3,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<10,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<17,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<24,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(1&i)<<31,i<128)return s(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&i?function(e,t,n){return i.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){var r="",i=t;for(;i<n;){var a,s,o,l=e[i],u=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)<=127&&(u=null):3===c?(a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&((u=(15&l)<<12|(63&a)<<6|63&s)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&((u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),i+=c}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,n){if(this.type!==t.Bytes)return e.push(this.readVarint(n));var r=a(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(n));return e},readPackedSVarint:function(e){if(this.type!==t.Bytes)return e.push(this.readSVarint());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==t.Bytes)return e.push(this.readBoolean());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==t.Bytes)return e.push(this.readFloat());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==t.Bytes)return e.push(this.readDouble());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==t.Bytes)return e.push(this.readFixed32());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==t.Bytes)return e.push(this.readSFixed32());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==t.Bytes)return e.push(this.readFixed64());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==t.Bytes)return e.push(this.readSFixed64());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readSFixed64());return e},skip:function(e){var n=7&e;if(n===t.Varint)for(;this.buf[this.pos++]>127;);else if(n===t.Bytes)this.pos=this.readVarint()+this.pos;else if(n===t.Fixed32)this.pos+=4;else{if(n!==t.Fixed64)throw new Error("Unimplemented type: "+n);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var n=new Uint8Array(t);n.set(this.buf),this.buf=n,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),y(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),y(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),y(this.buf,-1&e,this.pos),y(this.buf,Math.floor(e*r),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),y(this.buf,-1&e,this.pos),y(this.buf,Math.floor(e*r),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var n,r;e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}(n,0,t),function(e,t){var n=(7&e)<<4;if(t.buf[t.pos++]|=n|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,a=0;a<t.length;a++){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){r>56319||a+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&o(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),e.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),e.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n<t;n++)this.buf[this.pos++]=e[n]},writeRawMessage:function(e,t){this.pos++;var n=this.pos;e(t,this);var r=this.pos-n;r>=128&&o(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,n,r){this.writeTag(e,t.Bytes),this.writeRawMessage(n,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,l,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,u,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,m,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,g,t)},writeBytesField:function(e,n){this.writeTag(e,t.Bytes),this.writeBytes(n)},writeFixed32Field:function(e,n){this.writeTag(e,t.Fixed32),this.writeFixed32(n)},writeSFixed32Field:function(e,n){this.writeTag(e,t.Fixed32),this.writeSFixed32(n)},writeFixed64Field:function(e,n){this.writeTag(e,t.Fixed64),this.writeFixed64(n)},writeSFixed64Field:function(e,n){this.writeTag(e,t.Fixed64),this.writeSFixed64(n)},writeVarintField:function(e,n){this.writeTag(e,t.Varint),this.writeVarint(n)},writeSVarintField:function(e,n){this.writeTag(e,t.Varint),this.writeSVarint(n)},writeStringField:function(e,n){this.writeTag(e,t.Bytes),this.writeString(n)},writeFloatField:function(e,n){this.writeTag(e,t.Fixed32),this.writeFloat(n)},writeDoubleField:function(e,n){this.writeTag(e,t.Fixed64),this.writeDouble(n)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}}();const k2e={name:"Mapbox Vector Tile",id:"mvt",module:"mvt",extensions:["mvt","pbf"],mimeTypes:["application/vnd.mapbox-vector-tile","application/x-protobuf"],category:"geometry",dataType:null,batchType:null,version:"4.4.3",worker:!0,options:{mvt:{shape:"geojson",coordinates:"local",layerProperty:"layerName",layers:void 0,tileIndex:void 0}}},O2e={Point:z2e,MultiPoint:function(e,t,n){return N2e(e,t,n)},LineString:U2e,MultiLineString:function(e,t,n){return e.map(e=>U2e(e,t,n))},Polygon:V2e,MultiPolygon:function(e,t,n){return e.map(e=>V2e(e,t,n))}};function z2e([e,t],[n,r],i){const a=kye(n[0],r[0],e),s=kye(n[1],r[1],t);return i.unprojectFlat([a,s])}function N2e(e,t,n){return e.map(e=>z2e(e,t,n))}function U2e(e,t,n){return N2e(e,t,n)}function V2e(e,t,n){return e.map(e=>N2e(e,t,n))}const G2e=["points","lines","polygons"];function j2e(e,t,n,r){const i=e.featureIds.value;if(!i.length)return-1;let a=0,s=i[i.length-1]+1;if(r){const t=function(e,t){if(!e.__layers){const t={},{properties:n}=e;for(let e=0;e<n.length;e++){const{layerName:r}=n[e];r&&(t[r]?t[r][1]=e:t[r]=[e,e])}e.__layers=t}return e.__layers[t]}(e,r);if(!t)return-1;a=t[0],s=t[1]+1}let o=-1;if(t in e.numericProps){const r=e.numericProps[t].value.findIndex((e,t)=>e===n&&i[t]>=a&&i[t]<s);return r>=0?e.globalFeatureIds.value[r]:-1}return t?o=q2e(e.properties,e=>e[t]===n,a,s):e.fields&&(o=q2e(e.fields,e=>e.id===n,a,s)),o>=0?function(e,t){if(!e.__ids){const t=[],n=e.featureIds.value,r=e.globalFeatureIds.value;for(let e=0;e<n.length;e++)t[n[e]]=r[e];e.__ids=t}return e.__ids[t]}(e,o):-1}function q2e(e,t,n,r){for(let i=n;i<r;i++)if(t(e[i],i))return i;return-1}const H2e={...ake.defaultProps,data:lqe,onDataLoad:{type:"function",value:null,optional:!0,compare:!1},uniqueIdProperty:"",highlightedFeatureId:null,loaders:[k2e],binary:!0};class Q2e extends Pqe{initializeState(){super.initializeState();const e=void 0===this.context.viewport.resolution&&this.props.binary;this.setState({binary:e,data:null,tileJSON:null,hoveredFeatureId:null,hoveredFeatureLayerName:null})}get isLoaded(){return Boolean(this.state?.data&&super.isLoaded)}updateState({props:e,oldProps:t,context:n,changeFlags:r}){r.dataChanged&&this._updateTileData(),this.state?.data&&(super.updateState({props:e,oldProps:t,context:n,changeFlags:r}),this._setWGS84PropertyForTiles());const{highlightColor:i}=e;i!==t.highlightColor&&Array.isArray(i)&&this.setState({highlightColor:i})}async _updateTileData(){let e=this.props.data,t=null;if("string"!=typeof e||function(e){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(e)}(e))e&&"object"==typeof e&&"tilejson"in e&&(t=e);else{const{onDataLoad:n,fetch:r}=this.props;this.setState({data:null,tileJSON:null});try{t=await r(e,{propName:"data",layer:this,loaders:[]})}catch(M5){this.raiseError(M5,"loading TileJSON"),e=null}n&&n(t,{propName:"data",layer:this})}t&&(e=t.tiles),this.setState({data:e,tileJSON:t})}_getTilesetOptions(){const e=super._getTilesetOptions(),t=this.state.tileJSON,{minZoom:n,maxZoom:r}=this.props;return t&&(Number.isFinite(t.minzoom)&&t.minzoom>n&&(e.minZoom=t.minzoom),Number.isFinite(t.maxzoom)&&(!Number.isFinite(r)||t.maxzoom<r)&&(e.maxZoom=t.maxzoom)),e}renderLayers(){return this.state?.data?super.renderLayers():null}getTileData(e){const{data:t,binary:n}=this.state,{index:r,signal:i}=e,a=cqe(t,e);if(!a)return Promise.reject("Invalid URL");let s=this.getLoadOptions();const{fetch:o}=this.props;return s={...s,core:{...s?.core,mimeType:"application/x-protobuf"},mvt:{...s?.mvt,shape:n?"binary":"geojson",coordinates:this.context.viewport.resolution?"wgs84":"local",tileIndex:r}},o(a,{propName:"data",layer:this,loadOptions:s,signal:i})}renderSubLayers(e){const{x:t,y:n,z:r}=e.tile.index,i=Math.pow(2,r),a=512/i,s=-a,o=512*t/i,l=512*(1-n/i),u=(new Gve).scale([a,s,1]);e.autoHighlight=!1,this.context.viewport.resolution||(e.modelMatrix=u,e.coordinateOrigin=[o,l,0],e.coordinateSystem=Zxe.CARTESIAN,e.extensions=[...e.extensions||[],new E2e]);const c=super.renderSubLayers(e);return!this.state.binary||c instanceof ake||Tpe.warn("renderSubLayers() must return GeoJsonLayer when using binary:true")(),c}_updateAutoHighlight(e){const{uniqueIdProperty:t}=this.props,{hoveredFeatureId:n,hoveredFeatureLayerName:r}=this.state,i=e.object;let a=null,s=null;i&&(a=W2e(i,t),s=K2e(i));let{highlightColor:o}=this.props;"function"==typeof o&&(o=o(e)),n===a&&r===s||this.setState({highlightColor:o,hoveredFeatureId:a,hoveredFeatureLayerName:s})}_isWGS84(){return Boolean(this.context.viewport.resolution)}getPickingInfo(e){const t=super.getPickingInfo(e);if(this.state.binary&&-1!==t.index){const{data:n}=e.sourceLayer.props;t.object=M2e(n,{globalFeatureId:t.index})}return t.object&&!this._isWGS84()&&(t.object=Y2e(t.object,t.tile.bbox,this.context.viewport)),t}getSubLayerPropsByTile(e){return{highlightedObjectIndex:this.getHighlightedObjectIndex(e),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(e){const{hoveredFeatureId:t,hoveredFeatureLayerName:n,binary:r}=this.state,{uniqueIdProperty:i,highlightedFeatureId:a}=this.props,s=e.content,o=Z2e(a);if(!(Z2e(t)||o))return-1;const l=o?a:t;return Array.isArray(s)?s.findIndex(e=>{const t=W2e(e,i)===l,r=o||K2e(e)===n;return t&&r}):s&&r?function(e,t,n,r){for(const i of G2e){const a=e[i]&&j2e(e[i],t,n,r);if(a>=0)return a}return-1}(s,i,l,o?"":n):-1}_pickObjects(e){const{deck:t,viewport:n}=this.context,r=n.width,i=n.height,a=n.x,s=n.y,o=[this.id];return t.pickObjects({x:a,y:s,width:r,height:i,layerIds:o,maxObjects:e})}getRenderedFeatures(e=null){const t=this._pickObjects(e),n=new Set,r=[];for(const i of t){const e=W2e(i.object,this.props.uniqueIdProperty);void 0===e?r.push(i.object):n.has(e)||(n.add(e),r.push(i.object))}return r}_setWGS84PropertyForTiles(){const e="dataInWGS84";this.state.tileset.selectedTiles.forEach(t=>{t.hasOwnProperty(e)||Object.defineProperty(t,e,{get:()=>{if(!t.content)return null;if(this.state.binary&&Array.isArray(t.content)&&!t.content.length)return[];const{bbox:e}=t;if(void 0===t._contentWGS84&&function(e){return Number.isFinite(e.west)&&Number.isFinite(e.north)&&Number.isFinite(e.east)&&Number.isFinite(e.south)}(e)){const n=this.state.binary?M2e(t.content):t.content;t._contentWGS84=n.map(t=>Y2e(t,e,this.context.viewport))}return t._contentWGS84}})})}}function W2e(e,t){return e.properties&&t?e.properties[t]:"id"in e?e.id:void 0}function K2e(e){return e.properties?.layerName||null}function Z2e(e){return null!=e&&""!==e}function Y2e(e,t,n){const r={...e,geometry:{type:e.geometry.type}};return Object.defineProperty(r.geometry,"coordinates",{get:()=>{const r=function(e,t,n){const r=[n.projectFlat([t.west,t.north]),n.projectFlat([t.east,t.south])];return{...e,coordinates:O2e[e.type](e.coordinates,r,n)}}(e.geometry,t,n);return r.coordinates}}),r}Q2e.layerName="MVTLayer",Q2e.defaultProps=H2e;const X2e="0123456789bcdefghjkmnpqrstuvwxyz",J2e={};for(let GL=0;GL<32;GL++)J2e[X2e.charAt(GL)]=GL;function $2e(e){const[t,n,r,i]=function(e){let t,n=!0,r=90,i=-90,a=180,s=-180,o=0;for(let l=0,u=e.length;l<u;l++){const u=e[l].toLowerCase();o=J2e[u];for(let e=4;e>=0;e--){const l=o>>e&1;n?(t=(a+s)/2,1===l?s=t:a=t):(t=(r+i)/2,1===l?i=t:r=t),n=!n}}return[i,s,r,a]}(e);return[i,r,i,t,n,t,n,r,i,r]}class e3e extends lke{indexToBounds(){const{data:e,getGeohash:t}=this.props;return{data:e,_normalize:!1,positionFormat:"XY",getPolygon:(e,n)=>$2e(t(e,n))}}}e3e.layerName="GeohashLayer",e3e.defaultProps={getGeohash:{type:"accessor",value:e=>e.geohash}};const t3e=Object.freeze(Object.defineProperty({__proto__:null,A5Layer:mNe,GeohashLayer:e3e,GreatCircleLayer:NGe,H3ClusterLayer:Uqe,H3HexagonLayer:Nqe,MVTLayer:Q2e,QuadkeyLayer:nje,S2Layer:eje,TerrainLayer:g2e,Tile3DLayer:u2e,TileLayer:Pqe,TripsLayer:Oqe,_GeoCellLayer:lke,_Tile2DHeader:rje,_Tileset2D:Iqe,_WMSLayer:zGe,_getURLFromTemplate:cqe},Symbol.toStringTag,{value:"Module"})),n3e=Object.freeze(Object.defineProperty({__proto__:null,default:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 29 29" fill="none">\n <path d="M28.9058 23.8967C28.5889 22.9479 27.573 22.4331 26.6134 22.7514L25.5156 23.1161L23.1535 17.4537C22.8788 16.7146 22.2161 16.3125 21.474 16.3125H15.9353L15.3462 13.5938H19.0343C20.0364 13.5938 20.847 12.7832 20.847 11.7812C20.847 10.7793 20.0364 9.96875 19.0343 9.96875H14.5605L14.4784 9.58359C14.2632 8.04863 12.8697 7.06875 11.3969 7.27832C9.86185 7.48789 8.87623 8.86426 9.09148 10.3539L10.4328 18.3062C10.5246 19.2352 11.3063 19.9375 12.2353 19.9375H20.2448L22.7859 26.049C23.0714 26.7514 23.7511 27.1875 24.4705 27.1875C24.66 27.1875 24.8546 27.1574 25.0438 27.0937L27.7627 26.1875C28.7132 25.8734 29.223 24.8482 28.9058 23.8967ZM9.06316 26.2812C5.56478 26.2812 2.71895 23.4356 2.71895 19.9375C2.71895 16.8647 4.91563 14.2989 7.82037 13.7184L7.36948 11.0449C3.17551 11.8379 0 15.5139 0 19.9375C0 24.9428 4.05746 29 9.06316 29C13.4475 29 17.1011 25.8865 17.9451 21.75H15.1638C14.3255 24.3611 11.9294 26.2812 9.06316 26.2812ZM10.8758 5.4375C12.3774 5.4375 13.5947 4.22029 13.5947 2.71875C13.5947 1.21721 12.3769 0 10.8758 0C9.37471 0 8.15684 1.21721 8.15684 2.71875C8.15684 4.22029 9.37471 5.4375 10.8758 5.4375Z" fill="currentColor"/>\n</svg>'},Symbol.toStringTag,{value:"Module"})),r3e=Object.freeze(Object.defineProperty({__proto__:null,default:'<svg width="42" height="36" viewBox="0 0 42 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M32.4635 16.4726H8.95498L23.0255 4.25832C23.2505 4.06144 23.1139 3.69582 22.8166 3.69582H19.2608C19.1041 3.69582 18.9554 3.75207 18.8389 3.85251L3.65542 17.0271C3.51636 17.1476 3.40483 17.2966 3.3284 17.464C3.25196 17.6315 3.2124 17.8133 3.2124 17.9974C3.2124 18.1814 3.25196 18.3633 3.3284 18.5307C3.40483 18.6981 3.51636 18.8471 3.65542 18.9677L18.9273 32.2226C18.9876 32.2748 19.0599 32.303 19.1362 32.303H22.8126C23.1099 32.303 23.2465 31.9333 23.0215 31.7405L8.95498 19.5262H32.4635C32.6402 19.5262 32.7849 19.3815 32.7849 19.2047V16.794C32.7849 16.6172 32.6402 16.4726 32.4635 16.4726Z" fill="white"/>\n</svg>\n'},Symbol.toStringTag,{value:"Module"})),i3e=Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='11'%20cy='11'%20r='11'%20fill='%23E7F1F7'/%3e%3ccircle%20cx='11.0002'%20cy='10.9999'%20r='6.61538'%20fill='%23396FE5'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e"},Symbol.toStringTag,{value:"Module"})),a3e=Object.freeze(Object.defineProperty({__proto__:null,default:'<svg width="21" height="20" viewBox="0 0 21 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.36016 17.7535C6.43073 18.1345 6.36016 18.4258 6.17199 18.6051C5.98381 18.7843 5.6545 18.8292 5.27816 18.7395L0.691401 17.4622C-0.0848194 17.2605 -0.22595 16.6555 0.362095 16.1401L1.60875 15.042C1.58523 15.0196 1.58523 14.9972 1.56171 14.9748C-0.978649 10.8964 -0.0848196 5.80955 3.39641 2.73953C3.91389 2.26894 4.50194 1.86558 5.13702 1.48462C6.71299 0.588264 8.43008 0.140085 10.1472 0.117676V1.59667C8.71234 1.64149 7.25399 2.02244 5.93677 2.76193C5.39576 3.07566 4.90181 3.4342 4.45489 3.81516C1.53819 6.39219 0.761966 10.6051 2.76132 14.0112L4.0315 12.8908C4.61954 12.3754 5.23111 12.5547 5.39576 13.2941L6.36016 17.7535ZM15.6278 6.70591C15.7924 7.44541 16.404 7.62468 16.992 7.10927L18.2622 5.98883C20.2616 9.39499 19.4853 13.6079 16.5922 16.1849C16.1452 16.5883 15.6513 16.9244 15.1103 17.2381C13.7931 18 12.3347 18.3586 10.8999 18.4034V19.8824C12.617 19.8376 14.3341 19.3894 15.91 18.5154C16.5451 18.1569 17.1332 17.7311 17.6506 17.2605C21.1083 14.1905 21.9786 9.10367 19.4383 5.04765C19.4148 5.02524 19.4148 5.00283 19.3913 4.98042L20.6379 3.88238C21.226 3.36698 21.0848 2.76193 20.3086 2.56025L15.7218 1.30535C15.3455 1.19331 15.0162 1.26053 14.828 1.4398C14.6398 1.61908 14.5458 1.91039 14.6398 2.29135L15.6278 6.70591Z" fill="currentColor"/>\n</svg>\n'},Symbol.toStringTag,{value:"Module"})),s3e=Object.freeze(Object.defineProperty({__proto__:null,default:'<svg width="24" height="24" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M23.3111 5.74765C23.3048 7.25788 22.0259 8.47682 20.4559 8.47028C18.8858 8.46374 17.6171 7.23418 17.6234 5.72394C17.6297 4.21371 18.9086 2.99477 20.4787 3.00131C22.0487 3.00785 23.3174 4.23741 23.3111 5.74765ZM15.6027 14.335C15.5493 14.3576 15.49 14.3801 15.4365 14.4027L14.7837 14.6791C13.8762 15.0627 13.1628 15.7662 12.7918 16.6476L12.7015 16.8637C12.3089 17.7964 11.2038 18.2476 10.2331 17.8675C9.26247 17.4875 8.79409 16.4259 9.18665 15.4932L9.27701 15.2771C10.0184 13.5198 11.4457 12.1073 13.2548 11.34L13.9076 11.0636C15.1445 10.5446 16.4254 10.2765 17.8236 10.2823C20.4661 10.2933 22.8414 11.83 23.8448 14.1756L24.6951 16.2757L26.0079 16.8907C26.9421 17.3447 27.3167 18.44 26.8449 19.3382C26.3731 20.2363 25.2341 20.5962 24.2998 20.1422L22.7211 19.378C22.1121 19.0792 21.6343 18.5816 21.3761 17.9766L20.8128 16.664L19.6538 20.3906L22.5736 23.4849C22.8922 23.8223 23.1215 24.2277 23.2323 24.6726L24.5731 29.9193C24.8238 30.9003 24.2035 31.8889 23.1894 32.124C22.1693 32.3647 21.1409 31.7679 20.8428 30.7925L19.6077 25.7627L15.4431 21.353C14.5701 20.4321 14.1962 19.1487 14.5864 17.9483L15.6027 14.335ZM12.1328 25.6404L13.6265 22.0917C13.7531 22.2631 13.8899 22.4232 14.0397 22.5834L16.4406 25.1228L15.5729 27.1815C15.4292 27.5284 15.2146 27.8408 14.941 28.096L11.2726 31.5958C10.5291 32.3048 9.32871 32.2998 8.59121 31.5846C7.85382 30.8694 7.85862 29.7186 8.60194 29.0096L12.1328 25.6404Z"\n fill="currentColor" />\n</svg>'},Symbol.toStringTag,{value:"Module"}));function o3e(e,t,n=!1){if(n)return 1===t?"float":`vec${t}`;switch(e){case"uint8":case"uint16":case"uint32":return 1===t?"uint":`uvec${t}`;case"sint8":case"sint16":case"sint32":return 1===t?"int":`ivec${t}`;default:return 1===t?"float":`vec${t}`}}function l3e(e,t,n=!1){let r;if(n)switch(e){case"uint8":r="unorm8";break;case"sint8":r="snorm8";break;case"uint16":r="unorm16";break;case"sint16":r="snorm16";break;case"float32":r="float32";break;default:throw new Error(`Unsupported normalized vertex format for ${e}`)}else r=e;return 1===t?r:3!==t||r.startsWith("float32")||r.endsWith("32")?`${r}x${t}`:`${r}x3-webgl`}function u3e(e){switch(e[0]){case"u":return"0u";case"s":return"0";default:return"0."}}function c3e(e){switch(e){case"uint8":return"r8uint";case"sint8":return"r8sint";case"uint16":return"r16uint";case"sint16":return"r16sint";case"uint32":return"r32uint";case"sint32":return"r32sint";case"float32":return"r32float";default:throw new Error(`Unsupported WebGL gather texture format for ${e}`)}}const h3e=new Eye;function d3e({module:e,elementWise:t=!1,expression:n,inputs:r,output:i,operationType:a=i.type,outputBuffer:s}){const o=s.device,l=m3e("result",i.type,i.size,i.normalized),u=[e,l],c=[],h={},d=o3e(i.type,1,i.normalized),p=o3e(a,1,i.normalized);let f="",m=null;const g={TYPE:p,RESULT_LEN:i.size.toString()},A=function(e){return Array.isArray(e)?e.map((e,t)=>[`x${t}`,e]):Object.entries(e)}(r);for(const[x,_]of A)u.push(p3e(x,_.type,_.size,_.normalized,a)),c.push(f3e(x,_)),_ instanceof vDe?h[x]=_.buffer:(m=m||yDe.createOrReuse(o,s.byteLength),h[x]=m),f+=`TYPE ${x}[${_.size}]; get_${x}(${x});\n`,g[`${x.toUpperCase()}_LEN`]=_.size.toString();let y="";if(n)for(let x=0;x<i.size;x++)y+=`result[${x}]=${n(x)};\n`;else if(t)for(let x=0;x<i.size;x++){const t=u3e(p),n=A.map(([e,n])=>x<n.size?`${e}[${x}]`:t);y+=`result[${x}]=${e.name}(${n.join(", ")});\n`}else y=`${e.name}(${A.map(([e])=>e).join(", ")}, result);`;const v=`#version 300 es\n\nvoid main() {\n${f}\n${d} result[${i.size}];\n${y}\nset_result(result);\n}\n `,b=new tCe(o,{vs:v,shaderAssembler:h3e,defines:g,modules:u,bufferLayout:c,vertexCount:1,instanceCount:i.length,attributes:h,feedbackBufferMode:"interleaved",outputs:l.varyings});o.statsManager.getStats("GPGPU Operation Counts").get("Transform Runs").incrementCount(),b.run({inputBuffers:h,outputBuffers:{[l.varyings[0]]:0===i.offset?s:{buffer:s,byteOffset:i.offset,byteLength:i.byteLength}}}),m&&yDe.recycle(m)}function p3e(e,t,n,r=!1,i=t){let a="",s="";for(let o=0;o<n;o+=4){const l=Math.min(n-o,4);a+=`in ${o3e(t,l,r)} a${e}_${o};\n`;for(let n=0;n<l;n++){let a=`a${e}_${o}`;l>1&&(a=`${a}[${n}]`),(r||t!==i)&&(a=`TYPE(${a})`),s+=`v[${o+n}]=${a};\n`}}return{name:e,vs:`\n${a}\nvoid get_${e}(out TYPE v[${n}]) {\n ${s}\n}\n`}}function f3e(e,t){const n={name:e,stepMode:t.isConstant?"vertex":"instance",byteStride:t.stride,attributes:[]};for(let r=0;r<t.size;r+=4){const i=Math.min(t.size-r,4);n.attributes.push({attribute:`a${e}_${r}`,format:l3e(t.type,i,t.normalized),byteOffset:t.offset+t.ValueType.BYTES_PER_ELEMENT*r})}return n}function m3e(e,t,n,r=!1){const i=[],a=o3e(t,1,r);let s="",o="";for(let l=0;l<n;l+=4){const a=Math.min(n-l,4),u=o3e(t,a,r);i.push(`${e}_${l}`),s+=`flat out ${u} ${e}_${l};\n`;const c=Array.from({length:a},(e,t)=>l+t);o+=`${e}_${l} = ${u}(${c.map(e=>`v[${e}]`).join(",")});\n`}return{name:e,varyings:i,vs:`\n${s}\nvoid set_${e}(in ${a} v[${n}]) {\n ${o}\n}\n`}}const g3e=({inputs:e,output:t,target:n})=>{const r=t.type,i=o3e(r,1,t.normalized),a=u3e(i),s=e.namedInputs;return d3e({module:{name:"arithmetic",dependencies:[cbe],vs:"TYPE arithmetic_add(TYPE x, TYPE y) {\n return x + y;\n}\n\nTYPE arithmetic_subtract(TYPE x, TYPE y) {\n return x - y;\n}\n\nTYPE arithmetic_multiply(TYPE x, TYPE y) {\n return x * y;\n}\n\nTYPE arithmetic_divide(TYPE x, TYPE y) {\n return x / y;\n}\n\nfloat arithmetic_tan(float x) {\n return tan_fp32(x);\n}\n"},inputs:s,output:t,operationType:r,outputBuffer:n,expression:t=>NDe(e.expression,{operations:IDe,inputs:s,laneIndex:t,formatInput:e=>`${e}[${t}]`,formatOutOfBoundsInput:e=>1===s[e].size?`${e}[0]`:a,formatLiteral:e=>{const n=Array.isArray(e)?e[t]??0:e;return`${i}(${function(e,t){switch(e){case"uint8":case"uint16":case"uint32":return`${Math.trunc(t)}u`;case"sint8":case"sint16":case"sint32":return`${Math.trunc(t)}`;default:return Number.isInteger(t)?`${t}.0`:`${t}`}}(r,n)})`},formatCall:(e,t)=>`${e}(${t.join(", ")})`})}),{success:!0}},A3e=3e38;const y3e=`#define LE ${function(){const e=new Uint16Array([255]);return new Uint8Array(e.buffer)[0]>0}()?1:0}\nconst uint F32_NAN = 0xffffffffu;\nconst uint F32_INF = 0x7f800000u;\n\n// Find first set bit using binary search\n// https://en.wikipedia.org/wiki/Find_first_set#CLZ\nint countLeadingZeros(uint a) {\n if (a == 0u) return 32;\n int n = 0;\n if ((a & 0xffff0000u) == 0u) { n += 16; a = a << 16; }\n if ((a & 0xff000000u) == 0u) { n += 8; a = a << 8; }\n if ((a & 0xf0000000u) == 0u) { n += 4; a = a << 4; }\n if ((a & 0xc0000000u) == 0u) { n += 2; a = a << 2; }\n if ((a & 0x80000000u) == 0u) return n + 1;\n return n;\n}\n\nuint roundShiftRight(uint value, int shift) {\n if (shift <= 0) {\n return value << (-shift);\n }\n\n if (shift >= 32) {\n if (shift == 32 && value > 0x80000000u) {\n return 1u;\n }\n return 0u;\n }\n\n uint truncated = value >> shift;\n uint halfShift = 1u << (shift - 1);\n uint remainder = value & ((1u << shift) - 1u);\n if (remainder > halfShift || (remainder == halfShift && (truncated & 1u) == 1u)) {\n return truncated + 1u;\n }\n return truncated;\n}\n\nuint makeFloat_(uint sign, int exponent, uint mantissa) {\n return (sign << 31) | (uint(exponent + 127) << 23) | (mantissa & 0x7fffffu);\n}\n\n/**\n * Assemble a float32 in bit representation according to IEEE 754\n * https://en.wikipedia.org/wiki/Single-precision_floating-point_format\n */\nuint makeFloat(uint sign, int exponent, uint significand) {\n if (significand == 0u) {\n return sign << 31;\n }\n\n // Remove any extra leading zeros for better precision\n int lead_zeros = countLeadingZeros(significand);\n // Significand is encoded as 1.fraction\n int normalizedExponent = exponent + 31 - lead_zeros;\n\n if (normalizedExponent > 127) {\n return (sign << 31) | F32_INF;\n }\n\n uint mantissa;\n if (normalizedExponent >= -126) {\n mantissa = roundShiftRight(significand, 8 - lead_zeros);\n if (mantissa >= 0x1000000u) {\n mantissa >>= 1;\n normalizedExponent++;\n if (normalizedExponent > 127) {\n return (sign << 31) | F32_INF;\n }\n }\n return makeFloat_(sign, normalizedExponent, mantissa);\n }\n\n int subnormalShift = -149 - exponent;\n mantissa = roundShiftRight(significand, subnormalShift);\n if (mantissa >= 0x800000u) {\n return (sign << 31) | (1u << 23);\n }\n return (sign << 31) | mantissa;\n}\n\n/**\n * Parse 8-byte memory as a float64 number according to IEEE 754\n * https://en.wikipedia.org/wiki/Double-precision_floating-point_format\n * Returns 8-byte memory as 2 float32 numbers, consisting of\n * high part: fround(d)\n * low part: d - fround(d)\n */\nuvec2 parseAsDouble(uvec2 d) {\n #if LE\n d = d.yx; // to big endian\n #endif\n\n uint sign = (d[0] >> 31) & 1u; // first bit\n uint exponentBits = (d[0] >> 20) & 0x7ffu;\n int exponent = int(exponentBits) - 1023; // next 11 bits\n uint fractionHigh = d[0] & 0xfffffu;\n uint fractionLow = d[1];\n\n if (exponentBits == 0x7ffu) {\n if (fractionHigh == 0u && fractionLow == 0u) {\n return uvec2((sign << 31) | F32_INF, F32_NAN);\n }\n return uvec2(F32_NAN);\n }\n \n if (exponentBits == 0u) {\n // All float64 subnormals are too small to survive a float32 split.\n return uvec2(sign << 31);\n }\n\n if (exponent > 127) {\n return uvec2((sign << 31) | F32_INF, ((1u - sign) << 31) | F32_INF);\n }\n\n uint hi_part;\n uint low_part;\n\n // float64 significand has 52 bits\n // float32 significand has 23 bits\n // The significand of the high part is the significand of the double, trimmed\n uint f_hi = 0x800000u | (fractionHigh << 3) | (fractionLow >> 29);\n uint f_low = fractionLow & 0x1fffffffu;\n\n if (exponent < -126) {\n // For tiny normals, the top 24 significand bits still contribute to the float32\n // high part, but they land in the float32 subnormal range.\n hi_part = makeFloat(sign, exponent - 23, f_hi);\n\n // The residual keeps the remaining 29 significand bits at the original double scale.\n low_part = makeFloat(sign, exponent - 52, f_low);\n return uvec2(hi_part, low_part);\n }\n\n bool roundUp = f_low > 0x10000000u || (f_low == 0x10000000u && (f_hi & 1u) == 1u);\n\n uint f_rounded = f_hi + (roundUp ? 1u : 0u);\n int exponent_hi = exponent;\n if (f_rounded == 0x1000000u) {\n f_rounded = 0x800000u;\n exponent_hi++;\n }\n\n if (exponent_hi > 127) {\n // Overflows float32 limit\n hi_part = (sign << 31) | F32_INF;\n low_part = ((1u - sign) << 31) | F32_INF;\n return uvec2(hi_part, low_part);\n }\n \n hi_part = makeFloat_(sign, exponent_hi, f_rounded);\n\n int remainder = int(f_low);\n uint sign_low = sign;\n if (roundUp) {\n remainder -= 0x20000000;\n }\n if (remainder < 0) {\n sign_low = 1u - sign;\n remainder = -remainder;\n }\n low_part = makeFloat(sign_low, exponent - 52, uint(remainder));\n\n return uvec2(hi_part, low_part);\n}\n\nvoid fround(in uint x[X_LEN], out float result[X_LEN]) {\n int n = X_LEN / 2;\n for (int i = 0; i < n; i++) {\n uvec2 f = parseAsDouble(uvec2(x[i * 2], x[i * 2 + 1]));\n result[i] = uintBitsToFloat(f.x);\n result[i + n] = uintBitsToFloat(f.y);\n }\n}\n`;function v3e(e,t,n){const r=function(e){switch(e){case"uint32":return"usampler2D";case"sint32":return"isampler2D";case"float32":return"sampler2D";default:throw new Error(`Unsupported WebGL gather sampler type for ${e}`)}}(n),i=o3e(t,1),a=Array.from({length:e.size},(e,t)=>` v[${t}] = ${i}(texelFetch(source_values_texture, ivec2(${t}, rowIndex), 0).r);`).join("\n");return{name:"source_values_texture",vs:`\nuniform highp ${r} source_values_texture;\nvoid read_source_values(int rowIndex, out TYPE v[${e.size}]) {\n${a}\n}\n`}}function b3e(e,t,n){const r=n.createTexture({width:Math.max(e.size,1),height:e.length,format:c3e(t),usage:Wme.SAMPLE|Wme.COPY_DST});if(0===e.length)return r;const i=n.createCommandEncoder();return i.copyBufferToTexture({sourceBuffer:e.buffer,destinationTexture:r,byteOffset:e.offset,bytesPerRow:e.stride,rowsPerImage:e.length,size:[e.size,e.length,1]}),n.submit(i.finish()),r}function x3e(e,t){const n=o3e(e.type,1);let r="aids_0";return e.type!==function(e){switch(e){case"uint":return"uint32";case"int":return"sint32";default:return"float32"}}(t)&&(r=`${t}(${r})`),{name:"ids",vs:`\nin ${n} aids_0;\nvoid get_ids(out INDEX_TYPE v[1]) {\n v[0] = ${r};\n}\n`}}function _3e(e){return{name:"ids",stepMode:e.isConstant?"vertex":"instance",byteStride:e.stride,attributes:[{attribute:"aids_0",format:l3e(e.type,1,e.normalized),byteOffset:e.offset}]}}function w3e(e){return{name:"gather",vs:`\nvoid zero_result(out TYPE result[RESULT_LEN]) {\n for (int i = 0; i < RESULT_LEN; i++) {\n result[i] = ${u3e(e)};\n }\n}\n\nvoid gather(in INDEX_TYPE ids[1], out TYPE result[RESULT_LEN]) {\n int sourceIndex = int(ids[0]);\n if (sourceIndex < 0 || sourceIndex >= SOURCE_VALUES_ROWS) {\n zero_result(result);\n return;\n }\n read_source_values(sourceIndex, result);\n}\n`}}function E3e(e,t,n,r){return n<t.size?`${e}[${n}]`:1===t.size?`${e}[0]`:r}const C3e=Object.freeze(Object.defineProperty({__proto__:null,arithmetic:g3e,dot:({inputs:e,output:t,target:n})=>(d3e({module:{name:"row_dot",vs:"void row_dot(in TYPE x[X_LEN], in TYPE y[Y_LEN], out float result[1]) {\n float sum = 0.0;\n for (int i = 0; i < X_LEN; i++) {\n sum += float(x[i]) * float(y[i]);\n }\n result[0] = sum;\n}\n"},inputs:e,output:t,operationType:"float32",outputBuffer:n}),{success:!0}),equalAll:({inputs:e,output:t,target:n})=>(d3e({module:{name:"equalAll",vs:"void equalAll(in TYPE x[X_LEN], in TYPE y[Y_LEN], out uint result[1]) {\n uint allEqual = uint(1);\n for (int i = 0; i < X_LEN; i++) {\n if (x[i] != y[i]) {\n allEqual = uint(0);\n break;\n }\n }\n result[0] = allEqual;\n}\n"},inputs:e,output:t,operationType:"uint32"===t.type?e.x.type:t.type,outputBuffer:n}),{success:!0}),extent:({inputs:e,output:t,target:n})=>{const{sourceValues:r}=e,i=n.device;if(0===r.length){const e=new t.ValueType(t.length*t.size);return n.write(e),{success:!0,value:e}}if(r.isConstant){const e=r.value,i=new t.ValueType(t.length*t.size);for(let n=0;n<t.length;n++){const t=e[n];i[2*n]=t,i[2*n+1]=t}return n.write(i),{success:!0,value:i}}const a=i.createTexture({width:1,height:t.length,format:"rg32float",usage:Wme.RENDER|Wme.COPY_SRC|Wme.COPY_DST}),s=i.createFramebuffer({colorAttachments:[a]}),o=new QEe(i,{vs:"#version 300 es\n\nflat out float extent_value;\n\nvoid main() {\n float sourceValues[SOURCE_VALUES_LEN];\n get_sourceValues(sourceValues);\n extent_value = sourceValues[gl_VertexID];\n\n float y = (float(gl_VertexID) + 0.5) / float(CHANNEL_COUNT) * 2.0 - 1.0;\n gl_Position = vec4(0.0, y, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n ",fs:"#version 300 es\n\nprecision highp float;\n\nflat in float extent_value;\nout vec2 fragColor;\n\nvoid main() {\n fragColor = vec2(-extent_value, extent_value);\n}\n ",topology:"point-list",parameters:{depthCompare:"always",blend:!0,blendColorSrcFactor:"one",blendColorDstFactor:"one",blendColorOperation:"max",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one",blendAlphaOperation:"max"},modules:[p3e("sourceValues",r.type,r.size,r.normalized)],defines:{TYPE:"float",SOURCE_VALUES_LEN:r.size.toString(),CHANNEL_COUNT:t.length.toString()},attributes:{sourceValues:r.buffer},bufferLayout:[f3e("sourceValues",r)],instanceCount:r.length,vertexCount:t.length,disableWarnings:!0}),l=yDe.createOrReuse(i,t.byteLength);try{const e=i.beginRenderPass({framebuffer:s,parameters:{viewport:[0,0,1,t.length]},clearColor:[-A3e,-A3e,0,0],clearDepth:!1,clearStencil:!1});i.statsManager.getStats("GPGPU Operation Counts").get("Transform Runs").incrementCount(),o.draw(e),e.end();const r=i.createCommandEncoder();return r.copyTextureToBuffer({sourceTexture:a,width:1,height:t.length,destinationBuffer:l,byteOffset:0,bytesPerRow:8}),i.submit(r.finish()),g3e({device:i,inputs:{expression:{kind:"call",op:"multiply",args:[{kind:"input",name:"x"},{kind:"literal",value:[-1,1]}]},namedInputs:{x:new vDe({buffer:l,size:2,type:"float32",length:t.length})}},output:t,target:n})}finally{o.destroy(),yDe.recycle(l),s.destroy(),a.destroy()}},fround:({inputs:e,output:t,target:n})=>(d3e({module:{name:"fround",vs:y3e},inputs:e,output:t,operationType:"uint32",outputBuffer:n}),{success:!0}),gather:async({inputs:e,output:t,target:n})=>{const{ids:r,sourceValues:i}=e,a=n.device,s=m3e("result",t.type,t.size),o=o3e(r.type,1),l=o3e(t.type,1),u=t.type,c=b3e(i,u,a),h=`#version 300 es\n\nvoid main() {\n INDEX_TYPE ids[1];\n get_ids(ids);\n TYPE result[${t.size}];\n gather(ids, result);\n set_result(result);\n}\n `,d=new tCe(a,{vs:h,defines:{INDEX_TYPE:o,TYPE:l,RESULT_LEN:t.size.toString(),SOURCE_VALUES_ROWS:i.length.toString()},modules:[x3e(r,o),v3e(i,t.type,u),w3e(t.type),s],bindings:{source_values_texture:c},bufferLayout:[_3e(r)],vertexCount:1,instanceCount:t.length,feedbackBufferMode:"interleaved",outputs:s.varyings});try{return d.run({inputBuffers:{ids:r.buffer},outputBuffers:{[s.varyings[0]]:n}}),{success:!0}}finally{d.destroy(),c.destroy()}},interleave:({inputs:e,output:t,target:n})=>{const r=e.map((e,t)=>[`x${t}`,e]);!function(e,t){const n=t.reduce((e,[,t])=>e+Math.ceil(t.size/4),0);if(n>e)throw new Error(`interleave() requires ${n} vertex attributes, exceeding device limit ${e}`)}(n.device.limits.maxVertexAttributes,r),function(e,t){if(t.size>e)throw new Error(`interleave() output size ${t.size} exceeds device inter-stage component limit ${e}`)}(n.device.limits.maxInterStageShaderVariables,t);const i=r.map(([e,t])=>`in TYPE ${e}[${t.size}]`).join(", ");let a=0;const s=r.map(([e,t])=>{const n=Array.from({length:t.size},(t,n)=>` result[${a+n}] = ${e}[${n}];`).join("\n");return a+=t.size,n}).join("\n");return d3e({module:{name:"interleave",vs:`void interleave(${i}, out TYPE result[RESULT_LEN]) {\n${s}\n}\n`},inputs:e,output:t,outputBuffer:n}),{success:!0}},length:({inputs:e,output:t,target:n})=>(d3e({module:{name:"row_length",vs:"void row_length(in TYPE x[X_LEN], out float result[1]) {\n float sum = 0.0;\n for (int i = 0; i < X_LEN; i++) {\n sum += float(x[i]) * float(x[i]);\n }\n result[0] = sqrt(sum);\n}\n"},inputs:e,output:t,operationType:"float32",outputBuffer:n}),{success:!0}),segmentedMap:async({inputs:e,output:t,target:n})=>{const{segments:r}=e,i=n.device,a=m3e("result",t.type,t.size),s=r.type,o=b3e(r,s,i),l=new tCe(i,{vs:"#version 300 es\n\nvoid main() {\n TYPE result[RESULT_LEN];\n segmentedMap(result);\n set_result(result);\n}\n",defines:{TYPE:"uint",RESULT_LEN:t.size.toString(),SEGMENTS_LENGTH:r.length.toString()},modules:[v3e(r,t.type,s),{name:"segmentedMap",vs:"\nuint read_segment_start(int segmentIndex) {\n TYPE value[1];\n read_source_values(segmentIndex, value);\n return uint(value[0]);\n}\n\nvoid segmentedMap(out TYPE result[RESULT_LEN]) {\n uint vertexIndex = uint(gl_InstanceID);\n int low = 0;\n int high = SEGMENTS_LENGTH;\n\n while (low < high) {\n int mid = low + (high - low) / 2;\n uint midStart = read_segment_start(mid);\n if (midStart <= vertexIndex) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n\n uint segmentIndex = uint(max(low - 1, 0));\n uint segmentStart = read_segment_start(int(segmentIndex));\n result[0] = segmentIndex;\n result[1] = vertexIndex - segmentStart;\n}\n"},a],bindings:{source_values_texture:o},vertexCount:1,instanceCount:t.length,feedbackBufferMode:"interleaved",outputs:a.varyings});try{return l.run({outputBuffers:{[a.varyings[0]]:n}}),{success:!0}}finally{l.destroy(),o.destroy()}},select:async({inputs:e,output:t,target:n})=>{const r=u3e(o3e(t.type,1,t.normalized));return d3e({module:{name:"select",vs:""},inputs:e,output:t,operationType:t.type,outputBuffer:n,expression:t=>{const n=E3e("condition",e.condition,t,r),i=E3e("whenTrue",e.whenTrue,t,r),a=E3e("whenFalse",e.whenFalse,t,r);return`(${n} != ${r} ? ${i} : ${a})`}}),{success:!0}},sequence:({inputs:e,output:t,target:n})=>{const r=m3e("result",t.type,t.size),i=new tCe(n.device,{vs:"#version 300 es\n\nvoid main() {\n int result[1];\n result[0] = START + gl_InstanceID * STEP;\n set_result(result);\n}\n",defines:{START:e.start.toString(),STEP:e.step.toString()},modules:[r],vertexCount:1,instanceCount:t.length,feedbackBufferMode:"interleaved",outputs:r.varyings});try{return i.run({outputBuffers:{[r.varyings[0]]:n}}),{success:!0}}finally{i.destroy()}},swizzle:({inputs:e,output:t,target:n})=>{const{columns:r}=e;return d3e({module:{name:"swizzle",vs:"// swizzle expression handled inline"},expression:e=>`x[${r[e]}]`,inputs:{x:e.x},output:t,outputBuffer:n}),{success:!0}}},Symbol.toStringTag,{value:"Module"}));return Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});
|
|
507
507
|
|
|
508
|
-
//# debugId=
|
|
508
|
+
//# debugId=8f1feea6-ea55-58aa-b54a-754a0c127f81
|