@arcgis/core 4.28.0-next.20230721 → 4.28.0-next.20230722

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.
@@ -1 +1 @@
1
- var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},43697:(e,t,r)=>{"use strict";function n(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}r.d(t,{_:()=>n}),"function"==typeof SuppressedError&&SuppressedError},68773:(e,t,r)=>{"use strict";r.d(t,{default:()=>o}),r(80442);var n=r(78286),s=r(17202);const o={apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!1,portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(o,globalThis.esriConfig,!0),delete o.has),!o.assetsPath){{const e="4.28.0";o.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s.r}/assets`}o.defaultAssetsPath=o.assetsPath}},92036:(e,t,r)=>{"use strict";r.d(t,{Z:()=>x});var n=r(60235),s=r(61247),o=r(92604),i=r(70586),a=r(88022),c=r(67723),l=r(7628),u=(r(80442),r(22974)),f=r(71143),d=r(97831),h=r(42100),p=r(31263),g=r(58971),y=r(44550);class b{constructor(e,t){this.propertyName=e,this.metadata=t,this.observerObject=new m,this._accessed=null,this._handles=null,this.observerObject.flags=y.v.Dirty|(t.nonNullable?y.v.NonNullable:0)|(t.hasOwnProperty("value")?y.v.HasDefaultValue:0)|(void 0===t.get?y.v.DepTrackingInitialized:0)|(void 0===t.dependsOn?y.v.AutoTracked:0)}destroy(){this.observerObject.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(e){const t=this.observerObject;(0,g.it)(t);const r=e.store,n=this.propertyName,s=t.flags,o=r.get(n);if(s&y.v.Computing)return o;if(~s&y.v.Dirty&&r.has(n))return o;t.flags|=y.v.Computing;const i=e.host;let a;s&y.v.AutoTracked?a=(0,g.LJ)(this,this.metadata.get,i):((0,g.GF)(i,this),a=this.metadata.get.call(i)),r.set(n,a,p.s3.COMPUTED);const c=r.get(n);return c===o?t.flags&=~y.v.Dirty:(0,g.gb)(this.commit,this),t.flags&=~y.v.Computing,c}onObservableAccessed(e){if(e===this.observerObject)return;let t=this._accessed;if(null==t)t=[],this._accessed=t;else if(t.includes(e))return;t.push(e)}onTrackingEnd(){this._clearObservationHandles();const e=this.observerObject;e.flags|=y.v.DepTrackingInitialized;const t=this._accessed;if(null==t||0===t.length)return;let r=this._handles;null==r&&(r=[],this._handles=r);for(let n=0;n<t.length;++n)r.push(t[n].observe(e));t.length=0}notifyChange(){const e=this.observerObject;e.onInvalidated(),e.onCommitted()}invalidate(){this.observerObject.onInvalidated()}commit(){const e=this.observerObject;e.flags&=~y.v.Dirty,e.onCommitted()}_clearObservationHandles(){const e=this._handles;if(null!==e){for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}}class m extends h.s{constructor(){super(...arguments),this.flags=0}onInvalidated(){~this.flags&y.v.Overriden&&(this.flags|=y.v.Dirty);const e=this._observers;if(e&&e.length>0)for(const t of e)t.onInvalidated()}onCommitted(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onCommitted()}}destroy(){this.flags&y.v.Dirty&&this.onCommitted(),super.destroy()}}class v{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new v;return this._values.forEach(((r,n)=>{e&&e.has(n)||t.set(n,(0,u.d9)(r))})),t}get(e){return this._values.get(e)}originOf(){return p.s3.USER}keys(){return[...this._values.keys()]}set(e,t){this._values.set(e,t)}delete(e){this._values.delete(e)}has(e){return this._values.has(e)}forEach(e){this._values.forEach(e)}}function _(e,t,r){return void 0!==e}function w(e,t,r,n){return!(void 0===e||null==r&&e.observerObject.flags&y.v.NonNullable&&(n.lifecycle,d.F.INITIALIZING,1))}function O(e){return e&&"function"==typeof e.destroy}o.Z.getLogger("esri.core.accessorSupport.Properties");class A{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=d.F.INITIALIZING,this.store=new v,this._origin=p.s3.USER;const t=this.host.constructor.__accessorMetadata__;for(const e in t){const r=new b(e,t[e]);this.propertiesByName.set(e,r)}this.metadatas=t}initialize(){this.lifecycle=d.F.CONSTRUCTING}constructed(){this.lifecycle=d.F.CONSTRUCTED}destroy(){this.destroyed=!0;for(const[e,t]of this.propertiesByName){if(t.metadata.autoDestroy){const r=this.internalGet(e);r&&O(r)&&(r.destroy(),~t.observerObject.flags&y.v.NonNullable&&this._internalSet(t,null))}t.destroy()}}get initialized(){return this.lifecycle!==d.F.INITIALIZING}get(e){const t=this.propertiesByName.get(e);if(t.metadata.get)return t.getComputed(this);(0,g.it)(t.observerObject);const r=this.store;return r.has(e)?r.get(e):t.metadata.value}originOf(e){const t=this.store.originOf(e);if(void 0===t){const t=this.propertiesByName.get(e);if(void 0!==t&&t.observerObject.flags&y.v.HasDefaultValue)return"defaults"}return(0,p.x3)(t)}has(e){return!!this.propertiesByName.has(e)&&this.store.has(e)}keys(){return[...this.propertiesByName.keys()]}internalGet(e){const t=this.propertiesByName.get(e);if(_(t))return this.store.has(e)?this.store.get(e):t.metadata.value}internalSet(e,t){const r=this.propertiesByName.get(e);_(r)&&this._internalSet(r,t)}getDependsInfo(e,t,r){const n=this.propertiesByName.get(t);if(!_(n))return"";const s=new Set,o=(0,g.LJ)({onObservableAccessed:e=>s.add(e),onTrackingEnd:()=>{}},(()=>n.metadata.get?.call(e)));let i=`${r}${e.declaredClass.split(".").pop()}.${t}: ${o}\n`;if(0===s.size)return i;r+=" ";for(const e of s)e instanceof b&&(i+=`${r}${e.propertyName}: undefined\n`);return i}setAtOrigin(e,t,r){const n=this.propertiesByName.get(e);if(_(n))return this._setAtOrigin(n,t,r)}isOverridden(e){const t=this.propertiesByName.get(e);return void 0!==t&&!!(t.observerObject.flags&y.v.Overriden)}clearOverride(e){const t=this.propertiesByName.get(e),r=t?.observerObject;r&&r.flags&y.v.Overriden&&(r.flags&=~y.v.Overriden,t.notifyChange())}override(e,t){const r=this.propertiesByName.get(e);if(!w(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(S.release(e),!r)return;t=s}r.observerObject.flags|=y.v.Overriden,this._internalSet(r,t)}set(e,t){const r=this.propertiesByName.get(e);if(!w(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(S.release(e),!r)return;t=s}const s=r.metadata.set;s?s.call(this.host,t):this._internalSet(r,t)}setDefaultOrigin(e){this._origin=(0,p.M9)(e)}getDefaultOrigin(){return(0,p.x3)(this._origin)}notifyChange(e){const t=this.propertiesByName.get(e);void 0!==t&&t.notifyChange()}invalidate(e){const t=this.propertiesByName.get(e);void 0!==t&&t.invalidate()}commit(e){const t=this.propertiesByName.get(e);void 0!==t&&t.commit()}_internalSet(e,t){const r=this.lifecycle!==d.F.INITIALIZING?this._origin:p.s3.DEFAULTS;this._setAtOrigin(e,t,r)}_setAtOrigin(e,t,r){const n=this.store,s=e.propertyName;n.has(s,r)&&(0,u.fS)(t,n.get(s))&&~e.observerObject.flags&y.v.Overriden&&r===n.originOf(s)||(e.invalidate(),n.set(s,t,r),e.commit(),(0,g.mS)(this.host,e))}_cast(e,t){const r=S.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}const S=new f.Z(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var k=r(37697);var j,T,E=r(26258),N=r(5600),C=r(52011);function P(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const M=Symbol("Accessor-Handles"),I=Symbol("Accessor-Initialized");class x{static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:n}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const s=this;class o extends s{constructor(...e){super(...e),this.inherited=null,n&&n.apply(this,e)}}(0,l.fp)(o.prototype);for(const t in e){const r=e[t];o.prototype[t]="function"==typeof r?function(...e){const n=this.inherited;let o;this.inherited=function(...e){if(s.prototype[t])return s.prototype[t].apply(this,e)};try{o=r.apply(this,e)}catch(e){throw this.inherited=n,e}return this.inherited=n,o}:e[t]}for(const e in t){const r=P(t[e]);(0,N.Cb)(r)(o.prototype,e)}return(0,C.j)(r)(o)}constructor(...e){if(this[j]=null,this[T]=!1,this.constructor===x)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new A(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&this.normalizeCtorArgs&&(t.ctorArgs=this.normalizeCtorArgs.apply(this,e)),$.register(this,t.propertiesByName,this)}postscript(e){const t=this.__accessor__,r=t.ctorArgs||e;t.initialize(),r&&(this.set(r),t.ctorArgs=null),t.constructed(),this.initialize(),this[I]=!0}initialize(){}[a.F](){this[M]=(0,i.SC)(this[M])}destroy(){this.destroyed||($.unregister(this),(0,E.BT)(this),this.__accessor__.destroy())}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[I]}get destroyed(){return this.__accessor__&&this.__accessor__.destroyed||!1}commitProperty(e){(0,c.U2)(this,e)}get(e){return(0,n.XV)(o.Z.getLogger(this),"`Accessor.get` is deprecated in favor of using optional chaining",{version:"4.28",see:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining"}),(0,c.U2)(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return(0,k.t)(this,e,t),this}watch(e,t,r){return(0,E.YP)(this,e,t,r)}addHandles(e,t){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}let r=this[M];null==r&&(r=this[M]=new s.Z),r.add(e,t)}removeHandles(e){const t=this[M];null!=t&&t.remove(e)}removeAllHandles(){const e=this[M];null!=e&&e.removeAll()}hasHandles(e){const t=this[M];return null!=t&&t.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}j=M,T=I;const $=new FinalizationRegistry((e=>{for(const t of e.values())t.destroy()}))},3894:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(71143);function s(e){e.length=0}class o{constructor(e=50,t=50){this._pool=new n.Z(Array,void 0,s,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return i.acquire()}static release(e){return i.release(e)}static prune(){i.prune()}}const i=new o(100)},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),s=r(92604),o=r(58896);class i extends o.Z{constructor(e,t,r){super(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw s.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},61247:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(66374);class s{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach((t=>{e+=t.length})),e}add(e,t){if((0,n.TW)(e)){const r=this._getOrCreateGroup(t);for(const t of e)this._isHandle(t)&&r.push(t)}else this._isHandle(e)&&this._getOrCreateGroup(t).push(e);return this}forEach(e,t){if("function"==typeof e)this._groups.forEach((t=>t.forEach(e)));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(this._ensureGroupKey(e))}remove(e){if("string"!=typeof e&&(0,n.TW)(e)){for(const t of e)this.remove(t);return this}return this.has(e)?(this._removeAllFromGroup(this._getGroup(e)),this._groups.delete(this._ensureGroupKey(e)),this):this}removeAll(){return this._groups.forEach((e=>this._removeAllFromGroup(e))),this._groups.clear(),this}_isHandle(e){return e&&(!!e.remove||e instanceof s)}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(this._ensureGroupKey(e),t),t}_getGroup(e){return this._groups.get(this._ensureGroupKey(e))}_ensureGroupKey(e){return e||"_default_"}_removeAllFromGroup(e){for(const t of e)t instanceof s?t.removeAll():t.remove()}}},96674:(e,t,r)=>{"use strict";r.d(t,{wq:()=>b,eC:()=>p,AK:()=>y});var n=r(43697),s=r(92036),o=r(22974),i=r(31263);class a{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new a;return this._values.forEach(((r,n)=>{e&&e.has(n)||t.set(n,(0,o.d9)(r.value),r.origin)})),t}get(e,t){t=this._normalizeOrigin(t);const r=this._values.get(e);return null==t||r?.origin===t?r?.value:void 0}originOf(e){return this._values.get(e)?.origin??i.s3.USER}keys(e){e=this._normalizeOrigin(e);const t=[...this._values.keys()];return null==e?t:t.filter((t=>this._values.get(t)?.origin===e))}set(e,t,r){if((r=this._normalizeOrigin(r))===i.s3.DEFAULTS){const t=this._values.get(e);if(t&&null!=t.origin&&t.origin>r)return}this._values.set(e,new c(t,r))}delete(e,t){null!=(t=this._normalizeOrigin(t))&&this._values.get(e)?.origin!==t||this._values.delete(e)}has(e,t){return null!=(t=this._normalizeOrigin(t))?this._values.get(e)?.origin===t:this._values.has(e)}forEach(e){this._values.forEach((({value:t},r)=>e(t,r)))}_normalizeOrigin(e){if(null!=e)return e===i.s3.DEFAULTS?e:i.s3.USER}}class c{constructor(e,t){this.value=e,this.origin=t}}var l=r(41103),u=r(50549),f=r(1153),d=r(76169),h=r(52011);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,f.vw)(this),r=t.store,n=new a;t.store=n,(0,l.M)(t,r,n)}read(e,t){(0,u.i)(this,e,t)}write(e,t){return(0,d.c)(this,e??{},t)}toJSON(e){return this.write({},e)}static fromJSON(e,t){return g.call(this,e,t)}};return t=(0,n._)([(0,h.j)("esri.core.JSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e,t){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(e,t),r}function y(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}let b=class extends(p(s.Z)){};b=(0,n._)([(0,h.j)("esri.core.JSONSupport")],b)},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(68773),s=(r(80442),r(19153));const o={info:0,warn:1,error:2,none:3};class i{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,i._loggers.set(this.module,this);const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=i.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get test(){return{resetLoggers(e=new Map){const t=i._loggers;return i._loggers=e,t},set throttlingDisabled(e){i._throttlingDisabled=e}}}static getLogger(e){return e="string"!=typeof e?e.declaredClass:e,i._loggers.get(e)||new i({module:e})}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!i._throttlingDisabled){const n=this._argsToKey(r),s=this._loggedMessages[e].get(n);if("once"===t&&null!=s||"oncePerTick"===t&&s&&s>=i._tickCounter)return;this._loggedMessages[e].set(n,i._tickCounter),i._scheduleTickCounterIncrement()}for(const t of n.default.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;null!=r;){const t=r[e];if(null!=t)return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.default.log.level||"warn";return o[this._parentWithMember("level",t)]<=o[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then((()=>{i._tickCounter++,i._tickCounterScheduled=!1})))}}i._loggers=new Map,i._tickCounter=0,i._tickCounterScheduled=!1,i._throttlingDisabled=!1},30175:(e,t,r)=>{"use strict";function n(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}r.d(t,{s1:()=>n})},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(78286);class s{constructor(e,t,r){this.name=e,this.details=r,this.message=(t&&function(e,t){return e.replaceAll(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,((e,r)=>""===r?"$":((0,n.hS)(r,t)??"").toString()))}(t,r))??""}toString(){return"["+this.name+"]: "+this.message}}},71143:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e,t,r,n=1,s=0){if(this._ctor=e,this._acquireFunction=t,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let e=0;e<s;e++)this._pool[e]=new this._ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...e){let t;if(n.test.disabled)t=new this._ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this._ctor}t=this._pool.pop()}return this._acquireFunction?this._acquireFunction(t,...e):function(e){return e&&e.acquire&&"function"==typeof e.acquire}(t)&&t.acquire(...e),t}release(e){var t;e&&!n.test.disabled&&(this._releaseFunction?this._releaseFunction(e):(t=e)&&t.release&&"function"==typeof t.release&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}n.test={disabled:!1}},54790:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e,t=30){this.name=e,this._counter=0,this._samples=new Array(t)}record(e){null!=e&&(this._samples[++this._counter%this._samples.length]=e)}get median(){return this._samples.slice().sort(((e,t)=>e-t))[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce(((e,t)=>e+t),0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}},44553:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n,s=r(67676);!function(e){const t=(e,t,r,n)=>{let s=t,o=t;const i=r>>>1,a=e[s-1];for(;o<=i;){o=s<<1,o<r&&n(e[o-1],e[o])<0&&++o;const t=e[o-1];if(n(t,a)<=0)break;e[s-1]=t,s=o}e[s-1]=a},r=(e,t)=>e<t?-1:e>t?1:0;e.sort=function(e,n,s,o){void 0===n&&(n=0),void 0===s&&(s=e.length),void 0===o&&(o=r);for(let r=s>>>1;r>n;r--)t(e,r,s,o);const i=n+1;for(let r=s-1;r>n;r--){const s=e[n];e[n]=e[r],e[r]=s,t(e,i,r,o)}},e.iterableSort=function*(e,n,s,o){void 0===n&&(n=0),void 0===s&&(s=e.length),void 0===o&&(o=r);for(let r=s>>>1;r>n;r--)t(e,r,s,o),yield;const i=n+1;for(let r=s-1;r>n;r--){const s=e[n];e[n]=e[r],e[r]=s,t(e,i,r,o),yield}}}(n||(n={}));const o=n;class i{constructor(e){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new s.SO,e&&(e.initialSize&&(this.data=new Array(e.initialSize)),e.allocator&&(this._allocator=e.allocator),void 0!==e.deallocator&&(this._deallocator=e.deallocator),e.shrink&&(this._shrink=()=>a(this)))}toArray(){return this.data.slice(0,this.length)}filter(e){const t=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];e(n)&&t.push(n)}return t}at(e){if((e=Math.trunc(e)||0)<0&&(e+=this._length),!(e<0||e>=this._length))return this.data[e]}includes(e,t){const r=this.data.indexOf(e,t);return-1!==r&&r<this.length}get length(){return this._length}set length(e){if(e>this._length){if(this._allocator){for(;this._length<e;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=e}else{if(this._deallocator)for(let t=e;t<this._length;++t)this.data[t]=this._deallocator(this.data[t]);this._length=e,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(e){this.data[this._length++]=e}pushArray(e,t=e.length){for(let r=0;r<t;r++)this.data[this._length++]=e[r]}fill(e,t){for(let r=0;r<t;r++)this.data[this._length++]=e}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const e=this.data[this._length];return++this._length,e}unshift(e){this.data.unshift(e),this._length++,a(this)}pop(){if(0===this.length)return;const e=this.data[this.length-1];return this.length=this.length-1,this._shrink(),e}remove(e){const t=(0,s.cq)(this.data,e,this.length,this._hint);if(-1!==t)return this.data.splice(t,1),this.length=this.length-1,e}removeUnordered(e){return this.removeUnorderedIndex((0,s.cq)(this.data,e,this.length,this._hint))}removeUnorderedIndex(e){if(!(e>=this.length||e<0))return this.swapElements(e,this.length-1),this.pop()}removeUnorderedMany(e,t=e.length,r){this.length=(0,s.FY)(this.data,e,this.length,t,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(e,t){if(e>=this.length||t>=this.length||e===t)return;const r=this.data[e];this.data[e]=this.data[t],this.data[t]=r}sort(e){o.sort(this.data,0,this.length,e)}iterableSort(e){return o.iterableSort(this.data,0,this.length,e)}some(e,t){for(let r=0;r<this.length;++r)if(e.call(t,this.data[r],r,this.data))return!0;return!1}find(e,t){for(let r=0;r<this.length;++r){const n=this.data[r];if(e.call(t,n,r))return n}}filterInPlace(e,t){let r=0;for(let n=0;n<this._length;++n){const s=this.data[n];e.call(t,s,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=s,r++)}if(this._deallocator)for(let e=r;e<this._length;e++)this.data[e]=this._deallocator(this.data[e]);return this._length=r,this._shrink(),this}forAll(e,t){const r=this.length,n=this.data;for(let s=0;s<r;++s)e.call(t,n[s],s,n)}forEach(e,t){for(let r=0;r<this.length;++r)e.call(t,this.data[r],r,this.data)}map(e,t){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=e.call(t,this.data[n],n,this.data);return r}reduce(e,t){let r=t;for(let t=0;t<this.length;++t)r=e(r,this.data[t],t,this.data);return r}has(e){const t=this.length,r=this.data;for(let n=0;n<t;++n)if(r[n]===e)return!0;return!1}}function a(e){e.data.length>1.5*e.length&&(e.data.length=Math.floor(1.1*e.length))}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*n._m}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},20941:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(58896);class s extends n.Z{constructor(e,t,r){super(e,t,r)}}s.prototype.type="warning"},42100:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(50758),s=r(67676);class o{constructor(e,t){this._observers=e,this._observer=t}remove(){(0,s.Od)(this._observers,this._observer)}}class i{constructor(){this._observers=null,this.destroyed=!1}observe(e){if(this.destroyed||e.destroyed)return a;null==this._observers&&(this._observers=[]);const t=this._observers;let r=!1,n=!1;const s=t.length;for(let o=0;o<s;++o){const s=t[o];if(s.destroyed)n=!0;else if(s===e){r=!0;break}}return r||(t.push(e),n&&this._removeDestroyedObservers()),new o(t,e)}_removeDestroyedObservers(){const e=this._observers;if(!e||0===e.length)return;const t=e.length;let r=0;for(let n=0;n<t;++n){for(;n+r<t&&e[n+r].destroyed;)++r;if(r>0){if(!(n+r<t))break;e[n]=e[n+r]}}e.length=t-r}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this._observers;if(null!=e){for(const t of e)t.onCommitted();this._observers=null}}}const a=(0,n.kB)()},31263:(e,t,r)=>{"use strict";var n;r.d(t,{M9:()=>o,Wm:()=>a,kk:()=>s,s3:()=>n,x3:()=>i}),function(e){e[e.DEFAULTS=0]="DEFAULTS",e[e.COMPUTED=1]="COMPUTED",e[e.SERVICE=2]="SERVICE",e[e.PORTAL_ITEM=3]="PORTAL_ITEM",e[e.WEB_SCENE=4]="WEB_SCENE",e[e.WEB_MAP=5]="WEB_MAP",e[e.LINK_CHART=6]="LINK_CHART",e[e.USER=7]="USER"}(n||(n={}));const s=n.USER+1;function o(e){switch(e){case"defaults":return n.DEFAULTS;case"service":return n.SERVICE;case"portal-item":return n.PORTAL_ITEM;case"web-scene":return n.WEB_SCENE;case"web-map":return n.WEB_MAP;case"link-chart":return n.LINK_CHART;case"user":return n.USER;default:return null}}function i(e){switch(e){case n.DEFAULTS:return"defaults";case n.SERVICE:return"service";case n.PORTAL_ITEM:return"portal-item";case n.WEB_SCENE:return"web-scene";case n.WEB_MAP:return"web-map";case n.LINK_CHART:return"link-chart";case n.USER:return"user"}}function a(e){return i(e)}},88022:(e,t,r)=>{"use strict";r.d(t,{F:()=>n});const n=Symbol("Accessor-beforeDestroy")},5600:(e,t,r)=>{"use strict";r.d(t,{CJ:()=>l,Cb:()=>c,Eg:()=>u});var n=r(92604),s=r(75215),o=r(67723),i=r(7628),a=r(37697);function c(e={}){return(t,r)=>{if(t===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${t.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(t,r),l=(0,i.Oe)(t,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in e&&n.Z.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${t.constructor.name}" already defined in the metadata`,e),l.value=e.value=c.value)),null!=e.readOnly&&(l.readOnly=e.readOnly);const f=e.aliasOf;if(f){const e="string"==typeof f?f:f.source,t="string"==typeof f?null:!0===f.overridable;let n;l.dependsOn=[e],l.get=function(){let t=(0,o.U2)(this,e);if("function"==typeof t){n||(n=e.split(".").slice(0,-1).join("."));const r=(0,o.U2)(this,n);r&&(t=t.bind(r))}return t},l.readOnly||(l.set=t?function(e){this._override(r,e)}:function(t){(0,a.t)(this,e,t)})}const d=e.type,h=e.types;l.cast||(d?l.cast=function(e){let t=0,r=e;if((0,s.AY)(e))return(0,s.sY)(e);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],t++;const n=r;if((0,s.gB)(n))return 0===t?(0,s.i$)(n):(0,s.Iu)((0,s.i$)(n),t);if(1===t)return(0,s.rY)(n);if(t>1)return(0,s.di)(n,t);const o=e;return o.from?o.from:(0,s.se)(o)}(d):h&&(Array.isArray(h)?l.cast=(0,s.Ls)((0,s.N7)(h[0])):l.cast=(0,s.N7)(h))),(0,i.tz)(l,e),e.range&&(l.cast=u(l.cast,e.range))}}function l(e,t,r){const n=(0,i.Oe)(e,r);n.json||(n.json={});let s=n.json;return void 0!==t&&(s.origins||(s.origins={}),s.origins[t]||(s.origins[t]={}),s=s.origins[t]),s}function u(e,t){return r=>{let n=+e(r);return null!=t.step&&(n=Math.round(n/t.step)*t.step),null!=t.min&&(n=Math.max(t.min,n)),null!=t.max&&(n=Math.min(t.max,n)),n}}},52011:(e,t,r)=>{"use strict";r.d(t,{j:()=>u}),r(80442);var n=r(88022),s=r(97831),o=r(7628),i=r(58971),a=r(53906);const c=new Set,l=new Set;function u(e){return t=>{e??="esri.core.Accessor",t.prototype.declaredClass=e,d(t);const r=[],s=[];let i=t.prototype;for(;i;)i.hasOwnProperty("initialize")&&!c.has(i.initialize)&&(c.add(i.initialize),r.push(i.initialize)),i.hasOwnProperty("destroy")&&!l.has(i.destroy)&&(l.add(i.destroy),s.push(i.destroy)),i=Object.getPrototypeOf(i);c.clear(),l.clear();const a=class extends t{constructor(...e){if(super(...e),this.constructor===a&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let e=r.length-1;e>=0;e--)r[e].call(this)}}),s.length){let e=!1;const t=this[n.F];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){e=!0,t.call(this);for(let e=0;e<s.length;e++)s[e].call(this)}}})}this.postscript(...e)}}};a.__accessorMetadata__=(0,o.fp)(t.prototype),a.prototype.declaredClass=e;const u=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(a,"name",{value:u,configurable:!0}),a}}function f(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;(0,i.it)(r.observerObject);const n=t.store;return n.has(e)?n.get(e):r.metadata.value}:function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0!==r)return r.getComputed(t)}}function d(e){const t=e.prototype,r=(0,o.fp)(t),n={};for(const e of Object.getOwnPropertyNames(r)){const t=r[e];(0,a.OM)(t),n[e]={enumerable:!0,configurable:!0,get:f(e,t),set(r){const n=this.__accessor__;if(void 0!==n){if(!Object.isFrozen(this)){if(n.initialized&&t.readOnly)throw new TypeError(`[accessor] cannot assign to read-only property '${e}' of ${this.declaredClass}`);if(n.lifecycle===s.F.CONSTRUCTED&&t.constructOnly)throw new TypeError(`[accessor] cannot assign to construct-only property '${e}' of ${this.declaredClass}`);n.set(e,r)}}else Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(e.prototype,n)}},41103:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(31263);function s(e,t,r){t.keys().forEach((e=>{r.set(e,t.get(e),n.s3.DEFAULTS)}));const s=e.metadatas;Object.keys(s).forEach((t=>{e.internalGet(t)&&r.set(t,e.internalGet(t),n.s3.DEFAULTS)}))}},75215:(e,t,r)=>{"use strict";r.d(t,{AY:()=>C,Iu:()=>A,Ls:()=>_,N7:()=>T,TJ:()=>y,V5:()=>N,Zs:()=>c,di:()=>S,gB:()=>k,i$:()=>j,q9:()=>l,rY:()=>w,sY:()=>P,se:()=>v,vU:()=>u,z8:()=>E}),r(80442);var n=r(92604),s=r(30175);const o=n.Z.getLogger("esri.core.accessorSupport.ensureTypes");function i(e){return null==e?e:new Date(e)}function a(e){return null==e?e:!!e}function c(e){return null==e?e:e.toString()}function l(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function u(e){return null==e?e:Math.round(parseFloat(e))}function f(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function d(e,t){return null!=t&&e&&!(t instanceof e)}function h(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function g(e,t){return!!f(t)&&(o.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+b(e)+"'"),!0)}function y(e,t){return null==t?t:h(e)?function(e,t){if(!t||!t.constructor||!h(t.constructor))return g(e,t)?t:new e(t);const r=p(e.prototype.itemType),n=p(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(g(e,t),t):new e(t):t}(e,t):d(e,t)?g(e,t)?t:new e(t):t}function b(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const m=new WeakMap;function v(e,t){const r=function(e){switch(e){case Number:return l;case E:return u;case Boolean:return a;case String:return c;case Date:return i;default:return(0,s.s1)(m,e,(()=>y.bind(null,e)))}}(e);return 1===arguments.length?r:r(t)}function _(e,t,r){return 1===arguments.length?_.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,r))):[e(t,r)]:t}function w(e,t){return 1===arguments.length?_((t=>v(e,t))):_((t=>v(e,t)),t)}function O(e,t,r){return 0!==t&&Array.isArray(r)?r.map((r=>O(e,t-1,r))):e(r)}function A(e,t,r){if(2===arguments.length)return r=>A(e,t,r);if(!r)return r;r=O(e,t,r);let n=t,s=r;for(;n>0&&Array.isArray(s);)n--,s=s[0];if(void 0!==s)for(let e=0;e<n;e++)r=[r];return r}function S(e,t,r){return 2===arguments.length?A((t=>v(e,t)),t):A((t=>v(e,t)),t,r)}function k(e){return!!Array.isArray(e)&&!e.some((t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)}))}function j(e,t){if(2===arguments.length)return j(e).call(null,t);const r=new Set,n=e.filter((e=>"function"!=typeof e)),s=e.filter((e=>"function"==typeof e));for(const t of e)"string"!=typeof t&&"number"!=typeof t||r.add(t);let i=null,a=null;return(e,t)=>{if(null==e)return e;const c=typeof e,l="string"===c||"number"===c;return l&&(r.has(e)||s.some((e=>"string"===c&&e===String||"number"===c&&e===Number)))||"object"===c&&s.some((t=>!d(e,t)))?e:(l&&n.length?(i||(i=n.map((e=>"string"==typeof e?`'${e}'`:`${e}`)).join(", ")),o.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${i}`)):"object"==typeof e&&s.length?(a||(a=s.map((e=>b(e))).join(", ")),o.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${a}`)):o.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function T(e,t){if(2===arguments.length)return T(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const o=e.typeMap[t];r[t]=v(o),n.push(b(o)),s.push(t)}const i=()=>`'${n.join("', '")}'`,a=()=>`'${s.join("', '")}'`,c="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!d(e.base,t))return t;if(null==t)return t;const n=c(t)||e.defaultKeyValue,s=r[n];if(!s)return o.error("Accessor#set",`Invalid property value, value needs to be one of ${i()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!d(e.typeMap[n],t))return t;if("string"==typeof e.key&&!f(t)){const r={};for(const n in t)n!==e.key&&(r[n]=t[n]);return s(r)}return s(t)}}class E{}const N={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function C(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function P(e){switch(e.type){case"native":return v(e.value);case"array":return _(P(e.value));case"one-of":return function(e){let t=null;return(r,n)=>I(r,e)?r:(null==t&&(t=M(e)),o.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),n&&(n.valid=!1),null)}(e);default:return null}}function M(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case E:return"integer";case Date:return"date";default:return b(e.value)}case"array":return`array of ${M(e.value)}`;case"one-of":{const t=e.values.map((e=>M(e)));return`one of ${t.slice(0,-1)} or ${t[t.length-1]}`}}return"unknown"}function I(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case E:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!I(e,t.value)));case"one-of":return t.values.some((t=>I(e,t)))}}},53906:(e,t,r)=>{"use strict";r.d(t,{hk:()=>u,HS:()=>f,Ah:()=>d,OM:()=>b});var n=r(75215),s=r(63213);function o(e){if(e.json||(e.json={}),a(e.json),c(e.json),i(e.json),e.json.origins)for(const t in e.json.origins)a(e.json.origins[t]),c(e.json.origins[t]),i(e.json.origins[t]);return!0}function i(e){e.name&&(e.read&&"object"==typeof e.read?void 0===e.read.source&&(e.read.source=e.name):e.read={source:e.name},e.write&&"object"==typeof e.write?void 0===e.write.target&&(e.write.target=e.name):e.write={target:e.name})}function a(e){"boolean"==typeof e.read?e.read={enabled:e.read}:"function"==typeof e.read?e.read={enabled:!0,reader:e.read}:e.read&&"object"==typeof e.read&&void 0===e.read.enabled&&(e.read.enabled=!0)}function c(e){"boolean"==typeof e.write?e.write={enabled:e.write}:"function"==typeof e.write?e.write={enabled:!0,writer:e.write}:e.write&&"object"==typeof e.write&&void 0===e.write.enabled&&(e.write.enabled=!0)}var l=r(827);function u(e,t){return h(e,"any",t?.origin)}function f(e,t){return h(e,"read",t?.origin)}function d(e,t){return h(e,"write",t?.origin)}function h(e,t,r){let n=e?.json;if(n?.origins&&r){let e;e="link-chart"===r?n.origins[r]&&("any"===t||t in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],e&&("any"===t||t in e)&&(n=e)}return n}function p(e){return e.type?g(e):y(e)}function g(e){if(!e.type)return;let t=0,r=e.type;for(;Array.isArray(r)&&!(0,n.gB)(r);)r=r[0],t++;return{type:r,ndimArray:t}}function y(e){if(!e.types)return;let t=0,r=e.types;for(;Array.isArray(r);)r=r[0],t++;return{types:r,ndimArray:t}}function b(e){o(e)&&(function(e){if(e.json&&e.json.origins){const t=e.json.origins,r={"web-document":["web-scene","web-map"]};for(const e in r)if(t[e]){const n=t[e];r[e].forEach((e=>{t[e]=n})),delete t[e]}}}(e),function(e){const t=function(e){return e.json.types?y(e.json):e.type?g(e):y(e)}(e);if(e.json.origins)for(const r in e.json.origins){const n=e.json.origins[r],o=n.types?p(n):t;(0,s.U)(o,n,!1),n.types&&!n.write&&e.json.write&&e.json.write.enabled&&(n.write={...e.json.write}),(0,l.U)(o,n)}(0,s.U)(t,e.json,!0),(0,l.U)(t,e.json)}(e))}},63213:(e,t,r)=>{"use strict";r.d(t,{U:()=>l,d:()=>u});var n=r(92604),s=r(78286),o=r(20941),i=r(7628),a=r(14062);const c=n.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function l(e,t,r){e&&(!r&&!t.read||t.read?.reader||!1===t.read?.enabled||function(e){return"types"in e?y(e.types):g(e.type)}(e)&&(0,s.RB)("read.reader",u(e),t))}function u(e){const t=e.ndimArray??0;if(t>1)return function(e){const t=f(e),r=d.bind(null,t),n=e.ndimArray??0;return(e,t,s)=>{if(null==e)return e;e=r(e,s,n);let o=n,i=e;for(;o>0&&Array.isArray(i);)o--,i=i[0];if(void 0!==i)for(let t=0;t<o;t++)e=[e];return e}}(e);if(1===t)return h(e);if("type"in e&&p(e.type)){const t=e.type.prototype?.itemType?.Type,r=h("function"==typeof t?{type:t}:{types:t});return(t,n,s)=>{const o=r(t,n,s);return o?new e.type(o):o}}return f(e)}function f(e){return"type"in e?function(e){return e.prototype.read?(t,r,n)=>{if(null==t)return t;const s=typeof t;if("object"!==s)return void c.error(`Expected JSON value of type 'object' to deserialize type '${e.prototype.declaredClass}', but got '${s}'`);const o=new e;return o.read(t,n),o}:e.fromJSON}(e.type):function(e){let t=null;const r=e.errorContext??"type",n=e.validate;return(s,a,l)=>{if(null==s)return s;const u=typeof s;if("object"!==u)return void c.error(`Expected JSON value of type 'object' to deserialize, but got '${u}'`);t||(t=function(e){const t={};for(const r in e.typeMap){const n=e.typeMap[r],s=(0,i.fp)(n.prototype);if("function"==typeof e.key)continue;const o=s[e.key];if(!o)continue;o.json?.type&&Array.isArray(o.json.type)&&1===o.json.type.length&&"string"==typeof o.json.type[0]&&(t[o.json.type[0]]=n);const a=o.json?.write;if(!a||!a.writer){t[r]=n;continue}const c=a.target,l="string"==typeof c?c:e.key,u={};a.writer(r,u,l),u[l]&&(t[u[l]]=n)}return t}(e));const f=e.key;if("string"!=typeof f)return;const d=s[f],h=d?t[d]:e.defaultKeyValue?e.typeMap[e.defaultKeyValue]:void 0;if(!h){const e=`Type '${d||"unknown"}' is not supported`;return l&&l.messages&&s&&l.messages.push(new o.Z(`${r}:unsupported`,e,{definition:s,context:l})),void c.error(e)}const p=new h;return p.read(s,l),n?n(p):p}}(e.types)}function d(e,t,r,n){return 0!==n&&Array.isArray(t)?t.map((t=>d(e,t,r,n-1))):e(t,void 0,r)}function h(e){const t=f(e);return(e,r,n)=>{if(null==e)return e;if(Array.isArray(e)){const r=[];for(const s of e){const e=t(s,void 0,n);void 0!==e&&r.push(e)}return r}const s=t(e,void 0,n);return void 0!==s?[s]:void 0}}function p(e){if(!(0,a.u)(e))return!1;const t=e.prototype.itemType;return!(!t||!t.Type)&&("function"==typeof t.Type?g(t.Type):y(t.Type))}function g(e){return!Array.isArray(e)&&!!e&&e.prototype&&("read"in e.prototype||"fromJSON"in e||p(e))}function y(e){for(const t in e.typeMap)if(!g(e.typeMap[t]))return!1;return!0}},14062:(e,t,r)=>{"use strict";function n(e){return!!e&&e.prototype&&e.prototype.declaredClass&&0===e.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(t,{u:()=>n})},827:(e,t,r)=>{"use strict";r.d(t,{U:()=>a,k:()=>f});var n=r(20102),s=r(92604),o=r(78286),i=r(14062);function a(e,t){if(!t.write||t.write.writer||!1===t.write.enabled&&!t.write.overridePolicy)return;const r=e?.ndimArray??0;e&&(1===r||"type"in e&&(0,i.u)(e.type))?t.write.writer=d:r>1?t.write.writer=function(e){return(t,r,n,s)=>{let i;if(null===t)i=null;else{i=h(t,s,e);let r=e,n=i;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let e=0;e<r;e++)i=[i]}(0,o.RB)(n,i,r)}}(r):t.types?Array.isArray(t.types)?t.write.writer=function(e){return(t,r,n,s)=>t&&Array.isArray(t)?l(t.filter((t=>c(t,e,s))),r,n,s):l(t,r,n,s)}(t.types[0]):t.write.writer=function(e){return(t,r,n,s)=>t?c(t,e,s)?l(t,r,n,s):void 0:l(t,r,n,s)}(t.types):t.write.writer=l}function c(e,t,r){for(const r in t.typeMap)if(e instanceof t.typeMap[r])return!0;if(r?.messages){const o=t.errorContext??"type",i=`Values of type '${("function"!=typeof t.key?e[t.key]:e.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&e&&r.messages.push(new n.Z(`${o}:unsupported`,i,{definition:e,context:r})),s.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function l(e,t,r,n){(0,o.RB)(r,u(e,n),t)}function u(e,t){return e&&"function"==typeof e.write?e.write({},t):e&&"function"==typeof e.toJSON?e.toJSON():"number"==typeof e?f(e):e}function f(e){return e===-1/0?-Number.MAX_VALUE:e===1/0?Number.MAX_VALUE:isNaN(e)?null:e}function d(e,t,r,n){let s;null===e?s=null:e&&"function"==typeof e.map?(s=e.map((e=>u(e,n))),"function"==typeof s.toArray&&(s=s.toArray())):s=[u(e,n)],(0,o.RB)(r,s,t)}function h(e,t,r){return 0!==r&&Array.isArray(e)?e.map((e=>h(e,t,r-1))):u(e,t)}},67723:(e,t,r)=>{"use strict";r.d(t,{$z:()=>i,Gg:()=>c,U2:()=>a});var n=r(1153);function s(e,t){const r="?"===e[e.length-1]?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(r,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const s=(0,n.vw)(t);return(0,n.b6)(s,r)?s.get(r):t[r]}function o(e,t,r){if(null==e)return e;const n=s(t[r],e);return!n&&r<t.length-1?void 0:r===t.length-1?n:o(n,t,r+1)}function i(e,t,r=0){return"string"!=typeof t||t.includes(".")?o(e,(0,n.NI)(t),r):s(t,e)}function a(e,t){return i(e,t)}function c(e,t){return void 0!==i(t,e)}},97831:(e,t,r)=>{"use strict";var n;r.d(t,{F:()=>n}),function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED"}(n||(n={}))},7628:(e,t,r)=>{"use strict";r.d(t,{Oe:()=>i,fp:()=>o,tz:()=>a});var n=r(22974),s=r(1153);function o(e){let t=e.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!r){t=Object.create(t);for(const e in t)t[e]=(0,n.d9)(t[e]);Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t={},Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return e.constructor.__accessorMetadata__}function i(e,t){const r=o(e);let n=r[t];return n||(n=r[t]={}),n}function a(e,t){return(0,s.TS)(e,t,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(e){return c.test(e)?"replace":"merge"}},50549:(e,t,r)=>{"use strict";r.d(t,{$:()=>f,i:()=>u});var n=r(67723),s=r(1153),o=r(53906);function i(e,t,r){if(!e||!e.read||!1===e.read.enabled||!e.read.source)return!1;const s=e.read.source;if("string"==typeof s){if(s===t)return!0;if(s.includes(".")&&0===s.indexOf(t)&&(0,n.Gg)(s,r))return!0}else for(const e of s){if(e===t)return!0;if(e.includes(".")&&0===e.indexOf(t)&&(0,n.Gg)(e,r))return!0}return!1}function a(e,t,r,n,s){let a=(0,o.HS)(t[r],s);(function(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)})(a)&&(e[r]=!0);for(const c of Object.getOwnPropertyNames(t))a=(0,o.HS)(t[c],s),i(a,r,n)&&(e[c]=!0)}function c(e,t,r,n){const s=r.metadatas,i=(0,o.hk)(s[t],n),a=i?.default;if(void 0===a)return;const c="function"==typeof a?a.call(e,t,n):a;void 0!==c&&r.set(t,c)}const l={origin:"service"};function u(e,t,r=l){if(!t||"object"!=typeof t)return;const i=(0,s.vw)(e),u=i.metadatas,f={};for(const e of Object.getOwnPropertyNames(t))a(f,u,e,t,r);i.setDefaultOrigin(r.origin);for(const s of Object.getOwnPropertyNames(f)){const a=(0,o.HS)(u[s],r).read,c=a&&a.source;let l;l=c&&"string"==typeof c?(0,n.$z)(t,c):t[s],a&&a.reader&&(l=a.reader.call(e,l,t,r)),void 0!==l&&i.set(s,l)}if(!r||!r.ignoreDefaults){i.setDefaultOrigin("defaults");for(const t of Object.getOwnPropertyNames(u))f[t]||c(e,t,i,r)}i.setDefaultOrigin("user")}function f(e,t,r,n=l){const s={...n,messages:[]};r(s),s.messages?.forEach((t=>{"warning"!==t.type||e.loaded?n&&n.messages&&n.messages.push(t):e.loadWarnings.push(t)}))}},37697:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(20102),s=r(80442),o=(r(92604),r(67723));function i(e,t,r){if(e&&t)if("object"==typeof t)for(const r of Object.getOwnPropertyNames(t))i(e,r,t[r]);else{if(t.includes(".")){const n=t.split("."),s=n.splice(-1,1)[0];return void i((0,o.U2)(e,n),s,r)}const a=e.__accessor__;null!=a&&function(e,t){if((0,s.Z)("esri-unknown-property-errors")&&!function(e,t){return null!=t.metadatas[e]}(e,t))throw new n.Z("set:unknown-property",function(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}(e,t))}(t,a),e[t]=r}}},58971:(e,t,r)=>{"use strict";r.d(t,{GF:()=>v,LJ:()=>d,gb:()=>h,it:()=>l,mS:()=>b}),r(80442);var n=r(92604),s=r(1153),o=r(44550);const i={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},a=[];let c=i;function l(e){c.onObservableAccessed(e)}let u=!1,f=!1;function d(e,t,r){if(u)return p(e,t,r);g(e);const n=t.call(r);return y(),n}function h(e,t){return d(i,e,t)}function p(e,t,r){const s=u;u=!0,g(e);let o=null;try{o=t.call(r)}catch(e){f&&n.Z.getLogger("esri.core.accessorSupport.tracking").error(e)}return y(),u=s,o}function g(e){c=e,a.push(e)}function y(){const e=a.length;if(e>1){const t=a.pop();c=a[e-2],t.onTrackingEnd()}else if(1===e){const e=a.pop();c=i,e.onTrackingEnd()}else c=i}function b(e,t){const r=t.observerObject;if(r.flags&o.v.DepTrackingInitialized)return;const n=f;f=!1,r.flags&o.v.AutoTracked?p(t,t.metadata.get,e):v(e,t),f=n}const m=[];function v(e,t){const r=t.observerObject;r.flags&o.v.ExplicitlyTracking||(r.flags|=o.v.ExplicitlyTracking,p(t,(()=>{const r=t.metadata.dependsOn||m;for(const t of r)if("string"!=typeof t||t.includes(".")){const r=(0,s.NI)(t);for(let t=0,n=e;t<r.length&&null!=n&&"object"==typeof n;++t)n=_(n,r[t],t!==r.length-1)}else _(e,t,!1)})),r.flags&=~o.v.ExplicitlyTracking)}function _(e,t,r){const n="?"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(n,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const o=(0,s.vw)(e);if(o){const t=o.propertiesByName.get(n);t&&(l(t.observerObject),b(e,t))}return r?e[n]:void 0}},44550:(e,t,r)=>{"use strict";var n;r.d(t,{v:()=>n}),function(e){e[e.Dirty=1]="Dirty",e[e.Overriden=2]="Overriden",e[e.Computing=4]="Computing",e[e.NonNullable=8]="NonNullable",e[e.HasDefaultValue=16]="HasDefaultValue",e[e.DepTrackingInitialized=32]="DepTrackingInitialized",e[e.AutoTracked=64]="AutoTracked",e[e.ExplicitlyTracking=128]="ExplicitlyTracking"}(n||(n={}))},38805:(e,t,r)=>{"use strict";r.d(t,{M:()=>n});class n{constructor(e){this._accessed=[],this._handles=[],this._observerObject=new s(e),o.register(this,new WeakRef(this._observerObject),this)}destroy(){o.unregister(this._observerObject),this._accessed.length=0,this._observerObject?.destroy(),this.clear()}onObservableAccessed(e){const t=this._accessed;t.includes(e)||t.push(e)}onTrackingEnd(){const e=this._handles,t=this._accessed,r=this._observerObject;for(let n=0;n<t.length;++n)e.push(t[n].observe(r));t.length=0}clear(){const e=this._handles;for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}class s{constructor(e){this._notify=e,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const e=this._invalidCount;if(1===e)return this._invalidCount=0,void this._notify();this._invalidCount=e>0?e-1:0}destroy(){this.destroyed=!0,this._notify=i}}const o=new FinalizationRegistry((e=>{e.deref()?.destroy()}));function i(){}},87538:(e,t,r)=>{"use strict";r.d(t,{EH:()=>u,U5:()=>c,Xz:()=>l});var n=r(50758),s=r(58971),o=r(38805);let i=!1;const a=[];function c(e,t){let r=new o.M((function n(){if(!r||c)return;if(i)return void f(n);const o=a;r.clear(),i=!0,c=!0,a=(0,s.LJ)(r,e),c=!1,i=!1,t(a,o),d()})),a=null,c=!1;return c=!0,a=(0,s.LJ)(r,e),c=!1,(0,n.kB)((function(){r&&(r.destroy(),r=null,a=null)}))}function l(e,t){let r=new o.M((function(){t(i,a)})),i=null;function a(){return r?(r.clear(),i=(0,s.LJ)(r,e),i):null}return a(),(0,n.kB)((function(){r&&(r.destroy(),r=null),i=null}))}function u(e){let t=new o.M((function n(){t&&!r&&(i?f(n):(t.clear(),i=!0,r=!0,(0,s.LJ)(t,e),r=!1,i=!1,d()))})),r=!1;return r=!0,(0,s.LJ)(t,e),r=!1,(0,n.kB)((function(){t&&(t.destroy(),t=null)}))}function f(e){a.includes(e)||a.unshift(e)}function d(){for(;a.length;)a.pop()()}},1153:(e,t,r)=>{"use strict";r.d(t,{NI:()=>l,Qc:()=>f,TS:()=>a,b6:()=>i,vw:()=>o});var n=r(50758),s=r(22974);function o(e){return e.__accessor__??null}function i(e,t){return null!=e&&e.metadatas&&null!=e.metadatas[t]}function a(e,t,r){return c(e,t,r?{policy:r,path:""}:null)}function c(e,t,r){return t?Object.keys(t).reduce(((e,n)=>{const o=n;let i=null,a="merge";if(r&&(i=r.path?`${r.path}.${n}`:n,a=r.policy(i)),"replace"===a)return e[o]=t[o],e;if("replace-arrays"===a&&Array.isArray(e[o]))return e[o]=t[o],e;if(void 0===e[o])return e[o]=(0,s.d9)(t[o]),e;let l=e[o],u=t[o];if(l===u)return e;if(Array.isArray(u)||Array.isArray(e))l=l?Array.isArray(l)?e[o]=l.concat():e[o]=[l]:e[o]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach((e=>{l.includes(e)||l.push(e)})));else if(u&&"object"==typeof u)if(r){const t=r.path;r.path=i,e[o]=c(l,u,r),r.path=t}else e[o]=c(l,u,null);else e.hasOwnProperty(n)&&!t.hasOwnProperty(n)||(e[o]=u);return e}),e||{}):e}function l(e){return Array.isArray(e)?e:e.split(".")}function u(e){return e.includes(",")?e.split(",").map((e=>e.trim())):[e.trim()]}function f(e,t,r,s){const o=function(e){if(Array.isArray(e)){const t=[];for(const r of e)t.push(...u(r));return t}return u(e)}(t);if(1!==o.length){const t=o.map((t=>s(e,t,r)));return(0,n.AL)(t)}return s(e,o[0],r)}},26258:(e,t,r)=>{"use strict";r.d(t,{BT:()=>w,YP:()=>k,aQ:()=>j});var n=r(3894),s=r(50758),o=r(22974),i=r(71143);class a extends i.Z{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=null}acquire(...e){const t=super.acquire(...e);return this._set.delete(t),t}release(e){e&&!this._set.has(e)&&(super.release(e),this._set.add(e))}_dispose(e){this._set.delete(e),super._dispose(e)}}var c,l,u=r(1654),f=r(99001),d=r(67723),h=r(87538),p=r(1153);(l=c||(c={}))[l.Untracked=0]="Untracked",l[l.Tracked=1]="Tracked";class g{constructor(){this.uid=(0,f.D)(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(e,t,r,n,s){return this.pool.acquire(c.Untracked,e,t,r,n,s,o.fS)}static acquireTracked(e,t,r,n){return this.pool.acquire(c.Tracked,e,t,r,null,null,n)}notify(e,t){this.type===c.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,n,s,o,i){this.uid=(0,f.D)(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=n,this.target=s,this.path=o,this.equals=i}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=(0,f.D)(),this.removed=!0}}g.pool=new a(g);const y=new n.Z,b=new Set;let m;function v(e){b.delete(e),b.add(e),m||(m=(0,u.Os)(O))}function _(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function w(e){for(const t of b.values())t.target===e&&(t.removed=!0)}function O(){let e=10;for(;m&&e--;){m=null;const e=A(),t=y.acquire();for(const r of e){const e=r.uid;_(r),e===r.uid&&r.removed&&t.push(r)}for(const e of b)e.removed&&(t.push(e),b.delete(e));for(const e of t)g.pool.release(e);y.release(t),y.release(e),S.forEach((e=>e()))}}function A(){const e=y.acquire();e.length=b.size;let t=0;for(const r of b)e[t]=r,++t;return b.clear(),e}const S=new Set;function k(e,t,r,n=!1){return!e.__accessor__||e.__accessor__.destroyed?(0,s.kB)():n?function(e,t,r){const n=(0,p.Qc)(e,t,r,((e,t,r)=>{let s=!1;return(0,h.U5)((()=>(0,d.$z)(e,t)),((i,a)=>{e.__accessor__.destroyed?n.remove():s||(s=!0,(0,o.fS)(a,i)||r.call(e,i,a,t,e),s=!1)}))}));return n}(e,t,r):function(e,t,r){let n=(0,p.Qc)(e,t,r,((e,t,r)=>{let o,i,a=(0,h.Xz)((()=>(0,d.$z)(e,t)),((s,a)=>{e.__accessor__.destroyed||o&&o.uid!==i?n.remove():(o||(o=g.acquireUntracked(s,r,a,e,t),i=o.uid),v(o))}));return(0,s.kB)((()=>{a.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,v(o)),o=null),n=a=null}))}));return n}(e,t,r)}function j(e,t,r=!1,n=o.y7){return r?function(e,t,r){let n=!1;return(0,h.U5)(e,((e,s)=>{n||(n=!0,r(s,e)||t(e,s),n=!1)}))}(e,t,n):function(e,t,r){let n,o,i=(0,h.Xz)(e,((e,s)=>{n&&n.uid!==o?i.remove():(n||(n=g.acquireTracked(e,t,s,r),o=n.uid),v(n))}));return(0,s.kB)((()=>{i.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,v(n)),n=null),i=null}))}(e,t,n)}},76169:(e,t,r)=>{"use strict";r.d(t,{c:()=>h,d:()=>d});var n=r(67676),s=r(20102),o=r(92604),i=r(67723),a=r(31263),c=r(1153),l=r(53906);function u(e,t,r,n,s){const o={};return t.write?.writer?.call(e,n,o,r,s),o}function f(e,t,r,c,l,u){if(!c||!c.write)return!1;const f=(0,i.U2)(e,r);if(!l&&c.write.overridePolicy){const t=c.write.overridePolicy.call(e,f,r,u??void 0);void 0!==t&&(l=t)}if(l||(l=c.write),!l||!1===l.enabled)return!1;if((null===f&&!l.allowNull&&!l.writerEnsuresNonNull||void 0===f)&&l.isRequired){const t=new s.Z("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return t&&u&&u.messages?u.messages.push(t):t&&!u&&o.Z.getLogger("esri.core.accessorSupport.write").error(t.name,t.message),!1}return!(void 0===f||null===f&&!l.allowNull&&!l.writerEnsuresNonNull||!(l.alwaysWriteDefaults||t.store.multipleOriginsSupported&&t.store.originOf(r)!==a.s3.DEFAULTS)&&function(e,t,r,s,o){const i=s.default;if(void 0===i)return!1;if(null!=s.defaultEquals)return s.defaultEquals(o);if("function"==typeof i){if(Array.isArray(o)){const s=i.call(e,t,r??void 0);return(0,n.fS)(s,o)}return!1}return i===o}(e,r,u,c,f)||!l.ignoreOrigin&&u&&u.origin&&t.store.multipleOriginsSupported&&t.store.originOf(r)<(0,a.M9)(u.origin))}function d(e,t,r,n){const s=(0,c.vw)(e),o=s.metadatas,i=(0,l.Ah)(o[t],n);return!!i&&f(e,s,t,i,r,n)}function h(e,t,r){if(e&&"function"==typeof e.toJSON&&(!e.toJSON.isDefaultToJSON||!e.write))return(0,c.TS)(t,e.toJSON(r));const n=(0,c.vw)(e),s=n.metadatas;for(const o in s){const d=(0,l.Ah)(s[o],r);if(!f(e,n,o,d,void 0,r))continue;const h=(0,i.U2)(e,o),p=u(e,d,d.write&&"string"==typeof d.write.target?d.write.target:o,h,r);Object.keys(p).length>0&&(t=(0,c.TS)(t,p),r?.resources?.pendingOperations?.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then((()=>(0,c.TS)(t,p,(()=>"replace-arrays"))))),r&&r.writtenProperties&&r.writtenProperties.push({target:e,propName:o,oldOrigin:(0,a.Wm)(n.store.originOf(o)),newOrigin:r.origin}))}return t}},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>y,Od:()=>b,SO:()=>f,Vx:()=>o,a9:()=>l,cq:()=>h,e$:()=>p,e5:()=>i,fS:()=>s,pC:()=>m,w6:()=>u,zG:()=>a});var n=r(77734);function s(e,t,r){if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function o(e,t){let r=e.length!==t.length;r&&(e.length=t.length);for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function i(e,t,r){let n,s;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),s=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),s=e.filter((e=>!t.includes(e)))),{added:n,removed:s}}function a(e){return e&&"number"==typeof e.length}const c=!!Array.prototype.fill;function l(e,t){if(c)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function u(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class f{constructor(){this.last=0}}const d=new f;function h(e,t,r,n){n=n||d;const s=Math.max(0,n.last-10);for(let o=s;o<r;++o)if(e[o]===t)return n.last=o,o;const o=Math.min(s,r);for(let r=0;r<o;++r)if(e[r]===t)return n.last=r,r;return-1}function p(e,t,r,n){const s=r??e.length,o=h(e,t,s,n);if(-1!==o)return e[o]=e[s-1],null==r&&e.pop(),t}const g=new Set;function y(e,t,r=e.length,n=t.length,s,o){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);s=s||d;const i=Math.max(0,s.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(o&&o.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(o&&o.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function b(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function m(e,t){return null!=e}new n.Z},60235:(e,t,r)=>{"use strict";r.d(t,{Mr:()=>a,XV:()=>i,x9:()=>c});var n=r(80442);const s=new Set;function o(e,t,r=!1){r&&s.has(t)||(r&&s.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function i(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;c(e,"Function: "+(n?n+"::":"")+t+"()",r)}}function a(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;c(e,"Property: "+(n?n+"::":"")+t,r)}}function c(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{replacement:n,version:s,see:i,warnOnce:a}=r;let c=t;n&&(c+=`\n\t🛠️ Replacement: ${n}`),s&&(c+=`\n\t⚙️ Version: ${s}`),i&&(c+=`\n\t🔗 See ${i} for more details.`),o(e,c,a)}}},91460:(e,t,r)=>{"use strict";r.d(t,{IH:()=>i,on:()=>o,vT:()=>s});var n=r(50758);function s(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const s=t.slice();for(const t of s)e.addEventListener(t,r);return(0,n.kB)((()=>{for(const t of s)e.removeEventListener(t,r)}))}return e.addEventListener(t,r),(0,n.kB)((()=>e.removeEventListener(t,r)))}function i(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const n=o(e,t,(t=>{n.remove(),r.call(e,t)}));return n}},50758:(e,t,r)=>{"use strict";r.d(t,{AL:()=>o,kB:()=>s});const n={remove:()=>{}};function s(e){return e?{remove(){e&&(e(),e=void 0)}}:n}function o(e){return s((()=>function(e){e.forEach((e=>e?.remove()))}(e)))}},80442:(e,t,r)=>{"use strict";let n;function s(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>s}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},s.add=(e,t,r,o)=>((o||void 0===n[e])&&(n[e]=t),r&&s(e)),s.cache=n,s.add("esri-deprecation-warnings",!0),s.add("esri-force-fullscreen-debug",!1),(()=>{s.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(s.add("host-browser",e),s.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),s.add("dom",e),s("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(s.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),s.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),s.add("khtml",r.includes("Konqueror")?n:void 0),s.add("edge",parseFloat(t.split("Edge/")[1])||void 0),s.add("opr",parseFloat(t.split("OPR/")[1])||void 0),s.add("webkit",!s("wp")&&!s("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),s.add("chrome",!s("edge")&&!s("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),s.add("android",!s("wp")&&parseFloat(t.split("Android ")[1])||void 0),s.add("safari",!r.includes("Safari")||s("wp")||s("chrome")||s("android")||s("edge")||s("opr")?void 0:parseFloat(r.split("Version/")[1])),s.add("mac",r.includes("Macintosh")),!s("wp")&&/(iPhone|iPod|iPad)/.test(t)){const e=RegExp.$1.replace(/P/,"p"),r=/OS ([\d_]+)/.test(t)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replaceAll("_",""));s.add(e,n),s.add("ios",n)}s("webkit")||(!t.includes("Gecko")||s("wp")||s("khtml")||s("edge")||s.add("mozilla",n),s("mozilla")&&s.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&s.add("esri-mobile",t),r&&s.add("esri-iPhone",r),s.add("esri-geolocation",!!navigator.geolocation)}s.add("esri-wasm","WebAssembly"in globalThis),s.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),s.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),s.add("esri-atomics","Atomics"in globalThis),s.add("esri-workers","Worker"in globalThis),s.add("web-feat:cache","caches"in globalThis),s.add("esri-workers-arraybuffer-transfer",!s("safari")||Number(s("safari"))>=12),s.add("workers-pool-size",8),s.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),s.add("featurelayer-simplify-payload-size-factors",[1,1,4]),s.add("featurelayer-animation-enabled",!0),s.add("featurelayer-snapshot-enabled",!0),s.add("featurelayer-snapshot-point-min-threshold",8e4),s.add("featurelayer-snapshot-point-max-threshold",4e5),s.add("featurelayer-snapshot-point-coverage",.1),s.add("featurelayer-advanced-symbols",!1),s.add("featurelayer-pbf",!0),s.add("featurelayer-pbf-statistics",!1),s.add("feature-layers-workers",!0),s.add("feature-polyline-generalization-factor",1),s.add("mapview-transitions-duration",200),s.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),s.add("mapserver-pbf-version-support",10.81),s.add("mapservice-popup-identify-max-tolerance",20),s.add("heatmap-allow-raster-fallback",!1),s.add("heatmap-force-raster",!1),s("host-webworker")||s("host-browser")&&(s.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),s.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{s.add("esri-image-decode",!0,!0,!0)})).catch((()=>{s.add("esri-image-decode",!1,!0,!0)}))}return!1})),s.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},66374:(e,t,r)=>{"use strict";function n(e){const t=[];return function*(){yield*t;for(const r of e)t.push(r),yield r}}function s(e,t){for(const r of e)if(null!=r&&t(r))return r}function o(e){return null!=e&&"function"==typeof e[Symbol.iterator]}r.d(t,{Fs:()=>n,TW:()=>o,sE:()=>s})},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>i,fS:()=>h,tZ:()=>c,y7:()=>p,yd:()=>o});var n=r(67676),s=r(1533);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=d(e);if(null!=t)return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const t=d(e);if(null!=t)return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(e instanceof File||e instanceof Blob)return e;if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],s=a(n);if(null!=n&&null==s)return null;t[r]=s}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){if((0,s.W0)(e)||(0,s.lq)(e)||(0,s.KZ)(e)||(0,s.z3)(e)||(0,s.Uc)(e)||(0,s.Hx)(e)||(0,s.ZY)(e)||(0,s.xZ)(e)||(0,s.fS)(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,i(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(i(r));return t}return null}function h(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}function p(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.fS)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!f(e)&&f(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},70586:(e,t,r)=>{"use strict";function n(e,t){if(null==e)throw new Error(t??"value is None")}function s(e){return e?.destroy(),null}function o(e){return e?.dispose(),null}function i(e){return e?.remove(),null}function a(e){return e?.abort(),null}function c(e){return e?.release(),null}function l(e,t,r){return null!=e&&null!=t?null!=r?r(e,t):e.equals(t):e===t}r.d(t,{IM:()=>a,M2:()=>o,O3:()=>n,RY:()=>c,SC:()=>s,_W:()=>l,hw:()=>i})},41213:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});const n=[];function s(e){n.push(e),1===n.length&&queueMicrotask((()=>{const e=n.slice();n.length=0;for(const t of e)t()}))}},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>s,hS:()=>o});var n=r(22974);function s(e,t,r=!1){return c(e,t,r)}function o(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),s=n.pop(),o=a(n,!0,r);o&&s&&(o[s]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce(((e,s)=>{let o=e[s],i=t[s];return o===i?e:void 0===o?(e[s]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(o=o?Array.isArray(o)?e[s]=o.concat():e[s]=[o]:e[s]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{o.includes(e)||o.push(e)})):e[s]=i.concat())):i&&"object"==typeof i?e[s]=c(o,i,r):e.hasOwnProperty(s)&&!t.hasOwnProperty(s)||(e[s]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>S,UO:()=>A,OT:()=>O,zE:()=>l,hh:()=>E,Ds:()=>T,as:()=>_,WW:()=>w,R8:()=>v,D_:()=>m,Hc:()=>d,y8:()=>k,fu:()=>g,$F:()=>y,r9:()=>h,k_:()=>u,H9:()=>p,Yn:()=>N,gx:()=>j,Hl:()=>b});var n=r(50758);const s=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return(0,n.kB)((()=>o.clearTimeout(r)))}});var o,i=r(20102),a=r(91460),c=(r(92604),r(70586));function l(e="Aborted"){return new i.Z("AbortError",e)}function u(e,t="Aborted"){if(d(e))throw l(t)}function f(e){return null!=e?"aborted"in e?e:e.signal:e}function d(e){const t=f(e);return null!=t&&t.aborted}function h(e){if(m(e))throw e}function p(e){if(!m(e))throw e}function g(e,t){const r=f(e);if(null!=r){if(!r.aborted)return(0,a.IH)(r,"abort",(()=>t()));t()}}function y(e,t){const r=f(e);if(null!=r)return u(r),(0,a.IH)(r,"abort",(()=>t(l())))}function b(e,t){return null==f(t)?e:new Promise(((r,n)=>{let s=g(t,(()=>n(l())));const o=()=>s=(0,c.hw)(s);e.then(o,o),e.then(r,n)}))}function m(e){return"AbortError"===e?.name}async function v(e){try{return await e}catch(e){if(!m(e))throw e;return}}async function _(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await _(r),s={};return t.map(((e,t)=>s[e]=n[t])),s}const t=e;return Promise.allSettled(t).then((e=>Array.from(t,((t,r)=>{const n=e[r];return"fulfilled"===n.status?{promise:t,value:n.value}:{promise:t,error:n.reason}}))))}async function w(e){return(await _(e)).filter((e=>!!e.value)).map((e=>e.value))}async function O(e){return(await Promise.allSettled(e)).filter((e=>"fulfilled"===e.status)).map((e=>e.value))}async function A(e){return(await Promise.allSettled(e)).filter((e=>"rejected"===e.status)).map((e=>e.reason))}function S(e,t=void 0,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,s)=>{let o=setTimeout((()=>{o=0,r(t)}),e);g(n,(()=>{o&&(clearTimeout(o),s(l()))}))}))}function k(e){return e&&"function"==typeof e.then}function j(e){return k(e)?e:Promise.resolve(e)}function T(e,t=-1){let r,n,s,o,i=null;const a=(...c)=>{if(r){n=c,o&&o.reject(l()),o=E();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(s=o||E(),o=null,t>0){const n=new AbortController;r=j(e(...c,n.signal));const s=r;S(t).then((()=>{r===s&&(o?n.abort():i=n)}))}else r=1,r=j(e(...c));const u=()=>{const e=n;n=s=r=i=null,null!=e&&a(...e)},f=r,d=s;return f.then(u,u),f.then(d.resolve,d.reject),d.promise};return a}function E(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),n=t=>{e(t)};return n.resolve=t=>e(t),n.reject=e=>t(e),n.timeout=(e,t)=>s.setTimeout((()=>n.reject(t)),e),n.promise=r,n}async function N(e){await Promise.resolve(),u(e)}},1654:(e,t,r)=>{"use strict";r.d(t,{MU:()=>v,Os:()=>g});var n=r(41213),s=r(54790),o=r(44553),i=r(95330),a=r(76882);class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let l=0;const u={time:(0,a.HA)(0),deltaTime:(0,a.HA)(0),elapsedFrameTime:(0,a.HA)(0),frameDuration:(0,a.HA)(0)},f=["prepare","preRender","render","postRender","update","finish"],d=[],h=new o.Z,p={frameTasks:h,willDispatch:!1,clearFrameTasks:function(e=!1){h.forAll((e=>{e.removed=!0})),e&&b()},dispatch:m,executeFrameTasks:function(e){const t=(0,a.HA)(e-l);l=e;const r=1e3/60,n=Math.max(0,t-r);u.time=e,u.frameDuration=(0,a.HA)(r-n);for(let r=0;r<f.length;r++){const n=performance.now(),s=f[r];h.forAll((n=>{n.paused||n.removed||(0===r&&n.ticks++,n.phases[s]&&(u.elapsedFrameTime=(0,a.HA)(performance.now()-e),u.deltaTime=0===n.ticks?(0,a.HA)(0):t,n.phases[s]?.call(n,u)))})),_[r].record(performance.now()-n)}b(),w.record(performance.now()-e)}};function g(e){const t=new c(e);return d.push(t),p.willDispatch||(p.willDispatch=!0,(0,n.Y)(m)),t}const y=new o.Z;function b(){h.forAll((e=>{e.removed&&y.push(e)})),h.removeUnorderedMany(y.data,y.length),y.clear()}function m(){for(;d.length;){const e=d.shift();e.isActive&&e.callback()}p.willDispatch=!1}function v(e=1,t){const r=(0,i.hh)(),s=()=>{(0,i.Hc)(t)?r.reject((0,i.zE)()):0===e?r():(--e,(0,n.Y)((()=>s())))};return s(),r.promise}const _=f.map((e=>new s.Z(e))),w=new s.Z("total")},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const s=/\{([^\}]+)\}/g;function o(e){return e??""}function i(e,t){return e.replaceAll(s,"object"==typeof t?(e,r)=>o((0,n.hS)(r,t)):(e,r)=>o(t(r)))}function a(e,t){return e.replaceAll(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},76882:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{HA:()=>n})},1533:(e,t,r)=>{"use strict";function n(e){return e instanceof ArrayBuffer}function s(e){return"Int8Array"===e?.constructor?.name}function o(e){return"Uint8Array"===e?.constructor?.name}function i(e){return"Uint8ClampedArray"===e?.constructor?.name}function a(e){return"Int16Array"===e?.constructor?.name}function c(e){return"Uint16Array"===e?.constructor?.name}function l(e){return"Int32Array"===e?.constructor?.name}function u(e){return"Uint32Array"===e?.constructor?.name}function f(e){return"Float32Array"===e?.constructor?.name}function d(e){return"Float64Array"===e?.constructor?.name}function h(e){return!("buffer"in e)}function p(e){return null!=e?h(e)?8*e.length+12:e.byteLength+g:0}r.d(t,{B3:()=>b,DB:()=>y,Hx:()=>l,KZ:()=>i,Op:()=>v,Q7:()=>m,Uc:()=>c,W0:()=>s,Xw:()=>p,ZY:()=>u,eP:()=>n,fS:()=>d,kJ:()=>h,lq:()=>o,xZ:()=>f,z3:()=>a}),r(80442);const g=145,y=1024;function b(e){return d(e)||f(e)||l(e)||a(e)||s(e)}function m(e){return d(e)||f(e)}function v(e){return d(e)?179769e303:f(e)?3402823e32:u(e)?4294967295:c(e)?65535:o(e)||i(e)?255:l(e)?2147483647:a(e)?32767:s(e)?127:256}},99001:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});let n=0;function s(){return++n}},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ce,AH:()=>Q,B7:()=>N,D6:()=>z,Fv:()=>J,HK:()=>Y,Hu:()=>me,IR:()=>Ae,Ie:()=>ye,L:()=>j,Ml:()=>we,P$:()=>G,PF:()=>W,Qj:()=>ge,R9:()=>w,TI:()=>k,YP:()=>V,Yd:()=>de,ZN:()=>ve,Zo:()=>R,_l:()=>re,b7:()=>C,ed:()=>U,fZ:()=>Oe,fl:()=>_e,fw:()=>se,gi:()=>ne,hF:()=>H,hO:()=>le,io:()=>oe,jc:()=>K,kl:()=>F,mN:()=>T,oC:()=>ie,oh:()=>D,qg:()=>P,rS:()=>X,sJ:()=>te,tD:()=>$,tm:()=>L,u0:()=>E,v_:()=>Z,vt:()=>he,xs:()=>pe});var n=r(68773),s=r(67676),o=r(20102),i=r(96674),a=r(92604),c=r(19745),l=r(49917);const u=a.Z.getLogger("esri.core.urlUtils"),f=n.default.request,d="esri/config: esriConfig.request.proxyUrl is not set.",h=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,g=/^\s*https:/i,y=/^\s*file:/i,b=/:\d+$/,m=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,v=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),_=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class w{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=this.uri.match(v);this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=this.authority.match(_),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const O={};let A=new w(n.default.applicationUrl);let S=function(){const e=A.path,t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${A.scheme}://${A.host}${null!=A.port?`:${A.port}`:""}${t}`}();const k=()=>A,j=()=>S;function T(e){if(!e)return null;const t={path:null,query:null},r=new w(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=E(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function E(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,s;t<0?(n=decodeURIComponent(e),s=""):(n=decodeURIComponent(e.slice(0,t)),s=decodeURIComponent(e.slice(t+1)));let o=r[n];"string"==typeof o&&(o=r[n]=[o]),Array.isArray(o)?o.push(s):r[n]=s}return r}function N(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const s=encodeURIComponent(r)+"=",o=t&&t[r];return o?s+encodeURIComponent(o(n)):Array.isArray(n)?n.map((e=>(0,i.AK)(e)?s+encodeURIComponent(JSON.stringify(e)):s+encodeURIComponent(e))).join("&"):(0,i.AK)(n)?s+encodeURIComponent(JSON.stringify(n)):s+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function C(e=!1){let t,r=f.proxyUrl;if("string"==typeof e){t=ce(e);const n=U(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw u.warn(d),new o.Z("urlutils:proxy-not-set",d);return t&&ue()&&(r=le(r)),T(r)}function P(e){const t=U(e);let r,n;if(t){const e=I(t.proxyUrl);r=e.path,n=e.query?E(e.query):null}if(r){const t=T(e);e=r+"?"+t.path;const s=N({...n,...t.query});s&&(e=`${e}?${s}`)}return e}const M={path:"",query:""};function I(e){const t=e.indexOf("?");return-1!==t?(M.path=e.slice(0,t),M.query=e.slice(t+1)):(M.path=e,M.query=null),M}function x(e){return(e=fe(e=pe(e=I(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:x(e.urlPrefix)},r=f.proxyRules,n=t.urlPrefix;let s=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;s=e;break}0===t.indexOf(n)&&(s=e+1)}return r.splice(s,0,t),s}function U(e){const t=f.proxyRules,r=x(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function R(e,t){if(!e||!t)return!1;e=B(e),t=B(t);const r=(0,c.a)(e),n=(0,c.a)(t);return null!=r&&null!=n?r.portalHostname===n.portalHostname:null==r&&null==n&&z(e,t,!0)}function L(e,t){return e=B(e),t=B(t),fe(e)===fe(t)}function B(e){const t=(e=J(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function D(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=f.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function z(e,t,r=!1){if(!e||!t)return!1;const n=be(e),s=be(t);return!(!r&&n.scheme!==s.scheme)&&null!=n.host&&null!=s.host&&n.host.toLowerCase()===s.host.toLowerCase()&&n.port===s.port}function F(e){if("string"==typeof e){if(!V(e))return!0;e=be(e)}if(z(e,A))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=q(t[r]);for(let t=0;t<n.length;t++)if(z(e,n[t]))return!0}return!1}function q(e){return O[e]||(ae(e)||ie(e)?O[e]=[new w(H(e))]:O[e]=[new w(`http://${e}`),new w(`https://${e}`)]),O[e]}function H(e,t=S,r){return ie(e)?r&&r.preserveProtocolRelative?e:"http"===A.scheme&&A.authority===G(e).slice(2)?`http:${e}`:`https:${e}`:ae(e)?e:Z("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e)}function W(e,t=S,r){if(null==e||!V(e))return e;const n=J(e),s=n.toLowerCase(),o=J(t).toLowerCase().replace(/\/+$/,""),i=r?J(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==o.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(s,"/",s.indexOf("//")+2),l=-1;for(;s.slice(0,c+1)===o.slice(0,c)+"/"&&(l=c+1,c!==s.length);)c=a(s,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=o.slice(l-1).replaceAll(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function J(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&p.test(e)||"http"===A.scheme&&ie(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),b.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===A.scheme&&n===A.authority&&!m.test(e)||(ue()&&n===A.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||ue()&&!U(e))&&(e=le(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=I(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=H(e=e.trim()))))}function Z(...e){const t=e.filter(s.pC);if(!t||!t.length)return;const r=[];if(V(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return null!=e&&y.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function G(e,t=!1){if(null==e||K(e)||Y(e))return null;let r=e.indexOf("://");if(-1===r&&ie(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=fe(e,!0)),e}function V(e){return ie(e)||ae(e)}function K(e){return null!=e&&"blob:"===e.slice(0,5)}function Y(e){return null!=e&&"data:"===e.slice(0,5)}function Q(e){const t=te(e);return t&&t.isBase64?(0,l.R)(t.data):null}function X(e){return(0,l.s)(e).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const ee=/^data:(.*?)(;base64)?,(.*)$/;function te(e){const t=e.match(ee);if(!t)return null;const[,r,n,s]=t;return{mediaType:r,isBase64:!!n,data:s}}function re(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}async function ne(e){return(await fetch(e)).blob()}function se(e){const t=Q(e);if(!t)return null;const r=te(e);return new Blob([t],{type:r.mediaType})}function oe(e,t){!function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}(e,t)}function ie(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function ae(e){return null!=e&&h.test(e)}function ce(e){return null!=e&&g.test(e)||"https"===A.scheme&&ie(e)}function le(e){return ie(e)?`https:${e}`:e.replace(p,"https:")}function ue(){return"https"===A.scheme}function fe(e,t=!1){return ie(e)?e.slice(2):(e=e.replace(h,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function de(e){let t=0;if(V(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function he(e,t){if(!e)return"";const r=T(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(!t?.length)return n;const s=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(s,"")}function pe(e){return e.endsWith("/")?e:`${e}/`}function ge(e){return e.replace(/\/+$/,"")}function ye(e,t,r){if(!(t&&r&&e&&V(e)))return e;const n=e.indexOf("//"),s=e.indexOf("/",n+2),o=e.indexOf(":",n+2),i=Math.min(s<0?e.length:s,o<0?e.length:o);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function be(e){return"string"==typeof e?new w(H(e)):(e.scheme||(e.scheme=A.scheme),e)}function me(e,t){const r=T(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function ve(e,t,r){const n=T(e),s=n.query||{};return s[t]=String(r),`${n.path}?${N(s)}`}function _e(e,t){if(!t)return e;const r=T(e),n=r.query||{};for(const[e,r]of Object.entries(t))null!=r&&(n[e]=r);const s=N(n);return s?`${r.path}?${s}`:r.path}function we(e){if(null==e)return null;const t=e.match(Se);return t?t[2]:null}function Oe(e){if(null==e)return null;const t=e.match(Se);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function Ae(e){return"string"==typeof e?te(e)??{data:e}:new Promise(((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(te(n.result)),n.onerror=e=>r(e)}))}const Se=/([^.]*)\.([^\/]*)$/},728:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(40330),s=r(20102),o=r(91460),i=r(50758),a=r(70586),c=r(95330);const l={statsWorker:()=>Promise.all([r.e(1622),r.e(3314),r.e(5712),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8228)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(7096)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(7681),r.e(3656),r.e(9594)]).then(r.bind(r,49594)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(6481),r.e(6459),r.e(749)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(7126),r.e(5983),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(4599),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(4565),r.e(5545),r.e(5967)]).then(r.bind(r,65967)),GeoJSONSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1622),r.e(3314),r.e(9561),r.e(802)]).then(r.bind(r,10802)),Pipeline:()=>Promise.all([r.e(7126),r.e(5983),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(4599),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(4565),r.e(4325),r.e(5545),r.e(7937)]).then(r.bind(r,27937)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(4266),r.e(6122)]).then(r.bind(r,90447)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(6610),r.e(7420),r.e(5850)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(6481),r.e(7681),r.e(3656),r.e(3248)]).then(r.bind(r,73248)),SceneLayerWorker:()=>Promise.all([r.e(3314),r.e(1412)]).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(9805),r.e(4982),r.e(284)]).then(r.bind(r,56456))};var u=r(94362),f=r(17202);const{CLOSE:d,ABORT:h,INVOKE:p,RESPONSE:g,OPEN_PORT:y,ON:b}=u.MessageType;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===u.MessageType.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class v{static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new v(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),v.clients.set(n,r),t.port2}static loadWorker(e){const t=l[e];return t?t():Promise.resolve(null)}constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:d}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r?.signal,o=r?.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,u.jt)();return new Promise(((r,s)=>{if((0,c.Hc)(n))return this._processWork(),void s((0,c.zE)());const l=(0,c.fu)(n,(()=>{const e=this._outJobs.get(i);e&&(this._outJobs.delete(i),this._processWork(),(0,a.hw)(e.abortHandle),this._post({type:h,jobId:i}),s((0,c.zE)()))})),u={resolve:r,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:p,jobId:i,methodName:e,abortable:null!=n},t,o)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:u.MessageType.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),(0,i.kB)((()=>{r.port1.postMessage({type:u.MessageType.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}))}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:y,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,resolver:s}=e;this.invoke(t,r,n).then((e=>s.resolve(e))).catch((e=>s.reject(e)))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{(0,a.hw)(e.abortHandle),e.reject((0,c.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=null,this._client=null,this._schedule=null}_onMessage(e){null!=this._schedule?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,u.QM)(e);if(t)switch(t.type){case g:this._onResponseMessage(t);break;case p:this._invokeQueue.push(t);break;case h:this._onAbortMessage(t);break;case d:this._onCloseMessage();break;case y:this._onOpenPortMessage(t);break;case b:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&v.clients.get(this)===e&&e.destroy(),v.clients.delete(this),e?.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,o=s?new AbortController:null,i=this._inJobs;let a,l=this._client,f=l[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)l=l[e[t]],f=l[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);a=f.call(l,n,{client:this,signal:o?o.signal:null})}catch(e){return void this._post({type:g,jobId:r,error:(0,u.AB)(e)})}(0,c.y8)(a)?(i.set(r,{controller:o,promise:a}),a.then((e=>{i.has(r)&&(i.delete(r),this._post({type:g,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,c.D_)(e)||this._post({type:g,jobId:r,error:(0,u.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:g,jobId:r},a)}_onOpenPortMessage(e){new v(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,o.on)(e.port,"message",(e=>{const s=(0,u.QM)(e);s?.type===u.MessageType.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,o=this._outJobs;if(!o.has(t))return;const i=o.get(t);o.delete(t),this._processWork(),(0,a.hw)(i.abortHandle),r?i.reject(s.Z.fromJSON(JSON.parse(r))):i.resolve(n)}_post(e,t,r){return(0,u.oi)(this._port,e,t,r)}}v.kernelInfo={buildDate:f.r,fullVersion:n.bR,revision:f.$},v.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>a,MessageType:()=>n,QM:()=>l,jt:()=>i,oi:()=>c});var n,s=r(80442);!function(e){e[e.HANDSHAKE=0]="HANDSHAKE",e[e.OPEN=1]="OPEN",e[e.OPENED=2]="OPENED",e[e.RESPONSE=3]="RESPONSE",e[e.INVOKE=4]="INVOKE",e[e.ABORT=5]="ABORT",e[e.CLOSE=6]="CLOSE",e[e.OPEN_PORT=7]="OPEN_PORT",e[e.ON=8]="ON"}(n||(n={}));let o=0;function i(){return o++}function a(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function c(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let i;if(function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(i=u(r.transferList),t.data=r.result):(i=u(o),t.data=r),i){if((0,s.Z)("ff"))for(const r of i)if("byteLength"in r&&r.byteLength>267386880){const r="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case n.INVOKE:throw r;case n.RESPONSE:return void c(e,{type:n.RESPONSE,jobId:t.jobId,error:a(r)})}}e.postMessage(t,i)}else e.postMessage(t)}function l(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||"ArrayBuffer"===e?.constructor?.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>u,bR:()=>c,i8:()=>i,id:()=>a,qh:()=>l});var n=r(80442),s=r(17452),o=r(17202);const i="4.28";let a,c=i;function l(e){a=e}function u(e){const t=a?.findCredential(e);return t?.token?(0,s.ZN)(e,"token",t.token):e}c=`4.28.0-next.${o.r}`,(0,n.Z)("host-webworker")},19745:(e,t,r)=>{"use strict";r.d(t,{P:()=>i,a:()=>o});const n=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,s={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function o(e){const t=e?.match(n);if(!t)return null;const[,r,o,i]=t;if(!r)return null;let a=null,c=null,l=null;const{devext:u,qaext:f,www:d}=s;if(o)if(a=r,i)switch(i.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=u);break;case"qa":({customBaseUrl:c,portalHostname:l}=f);break;default:return null}else({customBaseUrl:c,portalHostname:l}=d);else switch(r.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=u);break;case"qaext":({customBaseUrl:c,portalHostname:l}=f);break;case"www":({customBaseUrl:c,portalHostname:l}=d);break;default:return null}return{customBaseUrl:c,isPortal:!1,portalHostname:l,urlKey:a}}function i(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}},49917:(e,t,r)=>{"use strict";function n(e){const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer}function s(e){const t=new Uint8Array(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}r.d(t,{R:()=>n,s:()=>s})},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>s,r:()=>n});const n="20230721",s="a4e92705f4bad5264352c8d8caa33f00252a6002"}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{7:"092fda62b6f62c2e4869",17:"7ec70a250a26bac2072d",24:"58e11ca7c6e27e0ece7e",37:"726bb661b9e6998572e7",65:"e1daab40a08af51f7a43",163:"14d6afec657bf93a3d06",223:"2cdbabcbfe32286ec78d",247:"a9f83bbccf3b5f229262",284:"73459ffe698d88d414d0",304:"fd0a91b9e0216cc269c3",448:"823ee9a60a005b52316e",450:"9a5916c66dad91d01d5b",540:"8be617f74c57a6dc29eb",565:"9124f0d6c09a71aa8091",576:"c5c56b6d99db96a6755a",639:"3048157f4f13d22c1753",749:"ef9a9a7d66d818720e20",802:"7fbdfd1527582c52f9b6",819:"d1ead6e8aa7e8e21fbc6",822:"408b790d24bea4181ede",824:"f3b458f55236566c940b",853:"182d6d264c27cba0679e",889:"550a2e7fcb68146e3689",1007:"212d98dbaf50df1cb087",1073:"4baee613a82f44a3cd0f",1074:"5f675c8eeb5b2fb0aa0b",1158:"8c72fec5fdcbbc628b30",1194:"8935745c296670d84d6f",1231:"b43c55fbb35dbcff2b69",1412:"c65fa970eddd27b00106",1421:"93e17ab3bc56ceea928d",1423:"f35cbf3ce31a43bb9cbf",1433:"4d5bdf18feeb9c8cb6ff",1444:"c900e747e9488fdce7e1",1534:"3bbaa78c68a4bf159722",1537:"3a0349c79551a03c2d8e",1596:"a4fa40dc77e116c954ac",1622:"9f5337a80963e0b3c009",1773:"eb4eec67a4b9f39a3948",1790:"61f7facac9a8da5ea462",1888:"1bf00dd4b71c9ea16578",1900:"f6040205c50e2795a1a0",1965:"acb59ff3f59d8e6bf465",2134:"c16ec2f614844b3191c0",2220:"a54ec9929a7db879d5db",2462:"5f36b5fe1ee4194a4824",2594:"040b3fc9c9c0736dd893",2637:"1e7c026ad549cb119e73",2664:"8b72cd9340e8a44358ac",2906:"870a05451e074b58f19a",3025:"c8d5c320072f09a40322",3027:"52731ab6856abb7cb5fd",3230:"ddc393a012588f799f42",3248:"cb763c42379341b94d1e",3314:"f4549e1a149324297fa7",3422:"c8e656cd470a17f538e9",3529:"88038ad401e5ec02f4d3",3582:"3d6ff8497c0acda3cb00",3656:"067d3d45caeaaba18d81",3852:"f0c62bb406bb93b1408a",3887:"d86ec98a0582cd3dfe8c",3919:"fdd6403a8390d629392b",3992:"e6785027a0f532f08ed3",4166:"8d324c861a68d45f34f3",4202:"32d940b2c891bf6ff9a2",4266:"ea478f2f4a19463e13fd",4325:"953407451813f406fdf1",4358:"4a2a0091cd830b6a1729",4371:"d81bd0907650a0378b7a",4466:"99a5a434e0bad48c7a5c",4475:"48a8d5e763ea9a30d399",4499:"0914b513579eb5ca515b",4547:"fdcb37a99392c348cc3f",4565:"1747cb9ee7b0674aaa64",4578:"b08f2a4aa94087c6c367",4599:"190b199406878e9491e9",4609:"308f3811dfa71f619279",4695:"b8a45b28a915a423d09d",4720:"02ab4779c6c8f1950c7d",4727:"ce7f575a6c2053c7ca17",4788:"da17d217222d6aee4c3e",4828:"9c133fd8c1fbd0295b86",4885:"256a82f6f6e1405fbcc6",4982:"740dc67038f554431f1b",4998:"d61506497275bafba384",5235:"f073ed545e8380be2091",5242:"8f9178c50c707746e859",5243:"212417c115cd1b21b94d",5245:"82dfbc175b52c7a10475",5329:"0e21e5b4d065567a6a91",5334:"80bf6cf1bef17215bca4",5389:"d08800a30b1227591986",5481:"de3baa85b1639c25458d",5545:"8c5a8c1dfb086069bb06",5575:"b8171b4c6f3b37e367ce",5642:"5e4dde2886a1027b4b96",5660:"697d5e58feafe98cf3ed",5712:"eba197e45507f56f3ed0",5732:"83f7e22a12d90ef93e62",5837:"277a477446d6644aada6",5850:"0b5eeec0f66c87a46a0c",5935:"60a08ce29d09cb07ef06",5967:"730eb7e5f617fdab4f10",5983:"1c4475057483041418c3",6004:"c0e12f6a7bb2360e4c21",6122:"33f169fdf3c41d36e00a",6124:"5ae63d31468222841d62",6138:"db9a303ee0468d018def",6233:"766f397dfdfbc0eb72d1",6237:"8a7fa4e8b0d14da7c9eb",6261:"98c2445fd3cd5d200a6d",6399:"c9dfe3fe8c17406a7223",6459:"50b17799f1abce982a19",6481:"f6c39edd04cb96d98240",6569:"72efc3074d9e6b7eb3ad",6610:"0dccbc6c2559fdc0c2ad",6695:"0d805fd9cd9ff3a636ca",6710:"1fc3b526e881ada30420",6774:"0f04978e8342d9a35e59",6841:"d9fe6cfbc9ad2920ca9c",6946:"8ef26aac0fe7feb8c324",7096:"5ae325e6a795c72eac6c",7126:"e0499f45b098450b80b4",7153:"0cad2b991d0d0fd07846",7215:"42173ec8bdbde9fb029e",7374:"2216e299488d8a5a7cc8",7420:"4481d1103363434f16da",7446:"675e16d99758e67e5f51",7476:"7cab61c9e09580520990",7528:"d0e203405f95e14b1399",7681:"da01e520a1ae0048e73e",7794:"9cddb504079d396779ea",7845:"3cf748c025f3936c1cb2",7873:"b2d4a56197dcabdbae35",7937:"e66cea26064ba8353af0",8008:"88d63d1e56732d148f67",8024:"14a6067d462b75794d24",8062:"1edd2647343dcf611c30",8079:"8bd5f94f7398b3601ddf",8092:"f1b26b73101210b8f29c",8096:"0a6297f5ccffd392b27a",8153:"2c57c9bd71637c5bed8a",8159:"afc5b84693757fda2bc8",8228:"e5352dc8983d06d4ee0f",8522:"b7770bb3ddbab2024027",8598:"e988b4ef78c4987395a6",8636:"0af18a96cbd4e2d35436",8758:"ebd006fcd568a7731115",8828:"4922a0fed7cbc6895882",8855:"807742f38885fa90b4fe",8949:"dabd889e064c4e7807fa",9059:"901d3f5f1a33c4855e32",9169:"cfad34c949cbe8a31ef8",9206:"d8e58dc14d3495f0830c",9238:"f0c9df0089a05da2b613",9243:"6c519c5a474f51f37af0",9291:"75ac2302859b0486763b",9296:"1ae96fc797d69e76af34",9370:"3b0e6836df29ba54bebd",9561:"0bd95f46a0a9005a19f9",9594:"1535423349f7eee694bc",9717:"2f9aec2238ff6cb99e09",9790:"0652f6a8d5221e978033",9805:"a3a1d4f32e518e97d071",9880:"38ebd270e6ffa60791bb",9884:"68b0e0aa33880bc1ba77",9904:"e05b54a0b834b4e4268e",9931:"b0571b9e602218cdc7aa",9971:"2d9d80b2d0042a9c09fb"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&!e;)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[s,o,i]=t;for(var a in o)r.o(o,a)&&(r.m[a]=o[a]);for(i&&i(r);s.length;)e[s.pop()]=1;n(t)}})(),r(88277);var n=r(728);RemoteClient=n})();
1
+ var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},43697:(e,t,r)=>{"use strict";function n(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}r.d(t,{_:()=>n}),"function"==typeof SuppressedError&&SuppressedError},68773:(e,t,r)=>{"use strict";r.d(t,{default:()=>o}),r(80442);var n=r(78286),s=r(17202);const o={apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!1,portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(o,globalThis.esriConfig,!0),delete o.has),!o.assetsPath){{const e="4.28.0";o.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s.r}/assets`}o.defaultAssetsPath=o.assetsPath}},92036:(e,t,r)=>{"use strict";r.d(t,{Z:()=>x});var n=r(60235),s=r(61247),o=r(92604),i=r(70586),a=r(88022),c=r(67723),l=r(7628),u=(r(80442),r(22974)),f=r(71143),d=r(97831),h=r(42100),p=r(31263),g=r(58971),y=r(44550);class b{constructor(e,t){this.propertyName=e,this.metadata=t,this.observerObject=new m,this._accessed=null,this._handles=null,this.observerObject.flags=y.v.Dirty|(t.nonNullable?y.v.NonNullable:0)|(t.hasOwnProperty("value")?y.v.HasDefaultValue:0)|(void 0===t.get?y.v.DepTrackingInitialized:0)|(void 0===t.dependsOn?y.v.AutoTracked:0)}destroy(){this.observerObject.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(e){const t=this.observerObject;(0,g.it)(t);const r=e.store,n=this.propertyName,s=t.flags,o=r.get(n);if(s&y.v.Computing)return o;if(~s&y.v.Dirty&&r.has(n))return o;t.flags|=y.v.Computing;const i=e.host;let a;s&y.v.AutoTracked?a=(0,g.LJ)(this,this.metadata.get,i):((0,g.GF)(i,this),a=this.metadata.get.call(i)),r.set(n,a,p.s3.COMPUTED);const c=r.get(n);return c===o?t.flags&=~y.v.Dirty:(0,g.gb)(this.commit,this),t.flags&=~y.v.Computing,c}onObservableAccessed(e){if(e===this.observerObject)return;let t=this._accessed;if(null==t)t=[],this._accessed=t;else if(t.includes(e))return;t.push(e)}onTrackingEnd(){this._clearObservationHandles();const e=this.observerObject;e.flags|=y.v.DepTrackingInitialized;const t=this._accessed;if(null==t||0===t.length)return;let r=this._handles;null==r&&(r=[],this._handles=r);for(let n=0;n<t.length;++n)r.push(t[n].observe(e));t.length=0}notifyChange(){const e=this.observerObject;e.onInvalidated(),e.onCommitted()}invalidate(){this.observerObject.onInvalidated()}commit(){const e=this.observerObject;e.flags&=~y.v.Dirty,e.onCommitted()}_clearObservationHandles(){const e=this._handles;if(null!==e){for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}}class m extends h.s{constructor(){super(...arguments),this.flags=0}onInvalidated(){~this.flags&y.v.Overriden&&(this.flags|=y.v.Dirty);const e=this._observers;if(e&&e.length>0)for(const t of e)t.onInvalidated()}onCommitted(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onCommitted()}}destroy(){this.flags&y.v.Dirty&&this.onCommitted(),super.destroy()}}class v{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new v;return this._values.forEach(((r,n)=>{e&&e.has(n)||t.set(n,(0,u.d9)(r))})),t}get(e){return this._values.get(e)}originOf(){return p.s3.USER}keys(){return[...this._values.keys()]}set(e,t){this._values.set(e,t)}delete(e){this._values.delete(e)}has(e){return this._values.has(e)}forEach(e){this._values.forEach(e)}}function _(e,t,r){return void 0!==e}function w(e,t,r,n){return!(void 0===e||null==r&&e.observerObject.flags&y.v.NonNullable&&(n.lifecycle,d.F.INITIALIZING,1))}function O(e){return e&&"function"==typeof e.destroy}o.Z.getLogger("esri.core.accessorSupport.Properties");class A{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=d.F.INITIALIZING,this.store=new v,this._origin=p.s3.USER;const t=this.host.constructor.__accessorMetadata__;for(const e in t){const r=new b(e,t[e]);this.propertiesByName.set(e,r)}this.metadatas=t}initialize(){this.lifecycle=d.F.CONSTRUCTING}constructed(){this.lifecycle=d.F.CONSTRUCTED}destroy(){this.destroyed=!0;for(const[e,t]of this.propertiesByName){if(t.metadata.autoDestroy){const r=this.internalGet(e);r&&O(r)&&(r.destroy(),~t.observerObject.flags&y.v.NonNullable&&this._internalSet(t,null))}t.destroy()}}get initialized(){return this.lifecycle!==d.F.INITIALIZING}get(e){const t=this.propertiesByName.get(e);if(t.metadata.get)return t.getComputed(this);(0,g.it)(t.observerObject);const r=this.store;return r.has(e)?r.get(e):t.metadata.value}originOf(e){const t=this.store.originOf(e);if(void 0===t){const t=this.propertiesByName.get(e);if(void 0!==t&&t.observerObject.flags&y.v.HasDefaultValue)return"defaults"}return(0,p.x3)(t)}has(e){return!!this.propertiesByName.has(e)&&this.store.has(e)}keys(){return[...this.propertiesByName.keys()]}internalGet(e){const t=this.propertiesByName.get(e);if(_(t))return this.store.has(e)?this.store.get(e):t.metadata.value}internalSet(e,t){const r=this.propertiesByName.get(e);_(r)&&this._internalSet(r,t)}getDependsInfo(e,t,r){const n=this.propertiesByName.get(t);if(!_(n))return"";const s=new Set,o=(0,g.LJ)({onObservableAccessed:e=>s.add(e),onTrackingEnd:()=>{}},(()=>n.metadata.get?.call(e)));let i=`${r}${e.declaredClass.split(".").pop()}.${t}: ${o}\n`;if(0===s.size)return i;r+=" ";for(const e of s)e instanceof b&&(i+=`${r}${e.propertyName}: undefined\n`);return i}setAtOrigin(e,t,r){const n=this.propertiesByName.get(e);if(_(n))return this._setAtOrigin(n,t,r)}isOverridden(e){const t=this.propertiesByName.get(e);return void 0!==t&&!!(t.observerObject.flags&y.v.Overriden)}clearOverride(e){const t=this.propertiesByName.get(e),r=t?.observerObject;r&&r.flags&y.v.Overriden&&(r.flags&=~y.v.Overriden,t.notifyChange())}override(e,t){const r=this.propertiesByName.get(e);if(!w(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(S.release(e),!r)return;t=s}r.observerObject.flags|=y.v.Overriden,this._internalSet(r,t)}set(e,t){const r=this.propertiesByName.get(e);if(!w(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(S.release(e),!r)return;t=s}const s=r.metadata.set;s?s.call(this.host,t):this._internalSet(r,t)}setDefaultOrigin(e){this._origin=(0,p.M9)(e)}getDefaultOrigin(){return(0,p.x3)(this._origin)}notifyChange(e){const t=this.propertiesByName.get(e);void 0!==t&&t.notifyChange()}invalidate(e){const t=this.propertiesByName.get(e);void 0!==t&&t.invalidate()}commit(e){const t=this.propertiesByName.get(e);void 0!==t&&t.commit()}_internalSet(e,t){const r=this.lifecycle!==d.F.INITIALIZING?this._origin:p.s3.DEFAULTS;this._setAtOrigin(e,t,r)}_setAtOrigin(e,t,r){const n=this.store,s=e.propertyName;n.has(s,r)&&(0,u.fS)(t,n.get(s))&&~e.observerObject.flags&y.v.Overriden&&r===n.originOf(s)||(e.invalidate(),n.set(s,t,r),e.commit(),(0,g.mS)(this.host,e))}_cast(e,t){const r=S.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}const S=new f.Z(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var k=r(37697);var j,T,E=r(26258),N=r(5600),C=r(52011);function P(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const M=Symbol("Accessor-Handles"),I=Symbol("Accessor-Initialized");class x{static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:n}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const s=this;class o extends s{constructor(...e){super(...e),this.inherited=null,n&&n.apply(this,e)}}(0,l.fp)(o.prototype);for(const t in e){const r=e[t];o.prototype[t]="function"==typeof r?function(...e){const n=this.inherited;let o;this.inherited=function(...e){if(s.prototype[t])return s.prototype[t].apply(this,e)};try{o=r.apply(this,e)}catch(e){throw this.inherited=n,e}return this.inherited=n,o}:e[t]}for(const e in t){const r=P(t[e]);(0,N.Cb)(r)(o.prototype,e)}return(0,C.j)(r)(o)}constructor(...e){if(this[j]=null,this[T]=!1,this.constructor===x)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new A(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&this.normalizeCtorArgs&&(t.ctorArgs=this.normalizeCtorArgs.apply(this,e)),$.register(this,t.propertiesByName,this)}postscript(e){const t=this.__accessor__,r=t.ctorArgs||e;t.initialize(),r&&(this.set(r),t.ctorArgs=null),t.constructed(),this.initialize(),this[I]=!0}initialize(){}[a.F](){this[M]=(0,i.SC)(this[M])}destroy(){this.destroyed||($.unregister(this),(0,E.BT)(this),this.__accessor__.destroy())}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[I]}get destroyed(){return this.__accessor__&&this.__accessor__.destroyed||!1}commitProperty(e){(0,c.U2)(this,e)}get(e){return(0,n.XV)(o.Z.getLogger(this),"`Accessor.get` is deprecated in favor of using optional chaining",{version:"4.28",see:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining"}),(0,c.U2)(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return(0,k.t)(this,e,t),this}watch(e,t,r){return(0,E.YP)(this,e,t,r)}addHandles(e,t){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}let r=this[M];null==r&&(r=this[M]=new s.Z),r.add(e,t)}removeHandles(e){const t=this[M];null!=t&&t.remove(e)}removeAllHandles(){const e=this[M];null!=e&&e.removeAll()}hasHandles(e){const t=this[M];return null!=t&&t.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}j=M,T=I;const $=new FinalizationRegistry((e=>{for(const t of e.values())t.destroy()}))},3894:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(71143);function s(e){e.length=0}class o{constructor(e=50,t=50){this._pool=new n.Z(Array,void 0,s,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return i.acquire()}static release(e){return i.release(e)}static prune(){i.prune()}}const i=new o(100)},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),s=r(92604),o=r(58896);class i extends o.Z{constructor(e,t,r){super(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw s.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},61247:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(66374);class s{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach((t=>{e+=t.length})),e}add(e,t){if((0,n.TW)(e)){const r=this._getOrCreateGroup(t);for(const t of e)this._isHandle(t)&&r.push(t)}else this._isHandle(e)&&this._getOrCreateGroup(t).push(e);return this}forEach(e,t){if("function"==typeof e)this._groups.forEach((t=>t.forEach(e)));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(this._ensureGroupKey(e))}remove(e){if("string"!=typeof e&&(0,n.TW)(e)){for(const t of e)this.remove(t);return this}return this.has(e)?(this._removeAllFromGroup(this._getGroup(e)),this._groups.delete(this._ensureGroupKey(e)),this):this}removeAll(){return this._groups.forEach((e=>this._removeAllFromGroup(e))),this._groups.clear(),this}_isHandle(e){return e&&(!!e.remove||e instanceof s)}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(this._ensureGroupKey(e),t),t}_getGroup(e){return this._groups.get(this._ensureGroupKey(e))}_ensureGroupKey(e){return e||"_default_"}_removeAllFromGroup(e){for(const t of e)t instanceof s?t.removeAll():t.remove()}}},96674:(e,t,r)=>{"use strict";r.d(t,{wq:()=>b,eC:()=>p,AK:()=>y});var n=r(43697),s=r(92036),o=r(22974),i=r(31263);class a{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new a;return this._values.forEach(((r,n)=>{e&&e.has(n)||t.set(n,(0,o.d9)(r.value),r.origin)})),t}get(e,t){t=this._normalizeOrigin(t);const r=this._values.get(e);return null==t||r?.origin===t?r?.value:void 0}originOf(e){return this._values.get(e)?.origin??i.s3.USER}keys(e){e=this._normalizeOrigin(e);const t=[...this._values.keys()];return null==e?t:t.filter((t=>this._values.get(t)?.origin===e))}set(e,t,r){if((r=this._normalizeOrigin(r))===i.s3.DEFAULTS){const t=this._values.get(e);if(t&&null!=t.origin&&t.origin>r)return}this._values.set(e,new c(t,r))}delete(e,t){null!=(t=this._normalizeOrigin(t))&&this._values.get(e)?.origin!==t||this._values.delete(e)}has(e,t){return null!=(t=this._normalizeOrigin(t))?this._values.get(e)?.origin===t:this._values.has(e)}forEach(e){this._values.forEach((({value:t},r)=>e(t,r)))}_normalizeOrigin(e){if(null!=e)return e===i.s3.DEFAULTS?e:i.s3.USER}}class c{constructor(e,t){this.value=e,this.origin=t}}var l=r(41103),u=r(50549),f=r(1153),d=r(76169),h=r(52011);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,f.vw)(this),r=t.store,n=new a;t.store=n,(0,l.M)(t,r,n)}read(e,t){(0,u.i)(this,e,t)}write(e,t){return(0,d.c)(this,e??{},t)}toJSON(e){return this.write({},e)}static fromJSON(e,t){return g.call(this,e,t)}};return t=(0,n._)([(0,h.j)("esri.core.JSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e,t){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(e,t),r}function y(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}let b=class extends(p(s.Z)){};b=(0,n._)([(0,h.j)("esri.core.JSONSupport")],b)},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(68773),s=(r(80442),r(19153));const o={info:0,warn:1,error:2,none:3};class i{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,i._loggers.set(this.module,this);const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=i.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get test(){return{resetLoggers(e=new Map){const t=i._loggers;return i._loggers=e,t},set throttlingDisabled(e){i._throttlingDisabled=e}}}static getLogger(e){return e="string"!=typeof e?e.declaredClass:e,i._loggers.get(e)||new i({module:e})}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!i._throttlingDisabled){const n=this._argsToKey(r),s=this._loggedMessages[e].get(n);if("once"===t&&null!=s||"oncePerTick"===t&&s&&s>=i._tickCounter)return;this._loggedMessages[e].set(n,i._tickCounter),i._scheduleTickCounterIncrement()}for(const t of n.default.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;null!=r;){const t=r[e];if(null!=t)return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.default.log.level||"warn";return o[this._parentWithMember("level",t)]<=o[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then((()=>{i._tickCounter++,i._tickCounterScheduled=!1})))}}i._loggers=new Map,i._tickCounter=0,i._tickCounterScheduled=!1,i._throttlingDisabled=!1},30175:(e,t,r)=>{"use strict";function n(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}r.d(t,{s1:()=>n})},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(78286);class s{constructor(e,t,r){this.name=e,this.details=r,this.message=(t&&function(e,t){return e.replaceAll(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,((e,r)=>""===r?"$":((0,n.hS)(r,t)??"").toString()))}(t,r))??""}toString(){return"["+this.name+"]: "+this.message}}},71143:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e,t,r,n=1,s=0){if(this._ctor=e,this._acquireFunction=t,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let e=0;e<s;e++)this._pool[e]=new this._ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...e){let t;if(n.test.disabled)t=new this._ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this._ctor}t=this._pool.pop()}return this._acquireFunction?this._acquireFunction(t,...e):function(e){return e&&e.acquire&&"function"==typeof e.acquire}(t)&&t.acquire(...e),t}release(e){var t;e&&!n.test.disabled&&(this._releaseFunction?this._releaseFunction(e):(t=e)&&t.release&&"function"==typeof t.release&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}n.test={disabled:!1}},54790:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e,t=30){this.name=e,this._counter=0,this._samples=new Array(t)}record(e){null!=e&&(this._samples[++this._counter%this._samples.length]=e)}get median(){return this._samples.slice().sort(((e,t)=>e-t))[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce(((e,t)=>e+t),0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}},44553:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n,s=r(67676);!function(e){const t=(e,t,r,n)=>{let s=t,o=t;const i=r>>>1,a=e[s-1];for(;o<=i;){o=s<<1,o<r&&n(e[o-1],e[o])<0&&++o;const t=e[o-1];if(n(t,a)<=0)break;e[s-1]=t,s=o}e[s-1]=a},r=(e,t)=>e<t?-1:e>t?1:0;e.sort=function(e,n,s,o){void 0===n&&(n=0),void 0===s&&(s=e.length),void 0===o&&(o=r);for(let r=s>>>1;r>n;r--)t(e,r,s,o);const i=n+1;for(let r=s-1;r>n;r--){const s=e[n];e[n]=e[r],e[r]=s,t(e,i,r,o)}},e.iterableSort=function*(e,n,s,o){void 0===n&&(n=0),void 0===s&&(s=e.length),void 0===o&&(o=r);for(let r=s>>>1;r>n;r--)t(e,r,s,o),yield;const i=n+1;for(let r=s-1;r>n;r--){const s=e[n];e[n]=e[r],e[r]=s,t(e,i,r,o),yield}}}(n||(n={}));const o=n;class i{constructor(e){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new s.SO,e&&(e.initialSize&&(this.data=new Array(e.initialSize)),e.allocator&&(this._allocator=e.allocator),void 0!==e.deallocator&&(this._deallocator=e.deallocator),e.shrink&&(this._shrink=()=>a(this)))}toArray(){return this.data.slice(0,this.length)}filter(e){const t=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];e(n)&&t.push(n)}return t}at(e){if((e=Math.trunc(e)||0)<0&&(e+=this._length),!(e<0||e>=this._length))return this.data[e]}includes(e,t){const r=this.data.indexOf(e,t);return-1!==r&&r<this.length}get length(){return this._length}set length(e){if(e>this._length){if(this._allocator){for(;this._length<e;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=e}else{if(this._deallocator)for(let t=e;t<this._length;++t)this.data[t]=this._deallocator(this.data[t]);this._length=e,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(e){this.data[this._length++]=e}pushArray(e,t=e.length){for(let r=0;r<t;r++)this.data[this._length++]=e[r]}fill(e,t){for(let r=0;r<t;r++)this.data[this._length++]=e}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const e=this.data[this._length];return++this._length,e}unshift(e){this.data.unshift(e),this._length++,a(this)}pop(){if(0===this.length)return;const e=this.data[this.length-1];return this.length=this.length-1,this._shrink(),e}remove(e){const t=(0,s.cq)(this.data,e,this.length,this._hint);if(-1!==t)return this.data.splice(t,1),this.length=this.length-1,e}removeUnordered(e){return this.removeUnorderedIndex((0,s.cq)(this.data,e,this.length,this._hint))}removeUnorderedIndex(e){if(!(e>=this.length||e<0))return this.swapElements(e,this.length-1),this.pop()}removeUnorderedMany(e,t=e.length,r){this.length=(0,s.FY)(this.data,e,this.length,t,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(e,t){if(e>=this.length||t>=this.length||e===t)return;const r=this.data[e];this.data[e]=this.data[t],this.data[t]=r}sort(e){o.sort(this.data,0,this.length,e)}iterableSort(e){return o.iterableSort(this.data,0,this.length,e)}some(e,t){for(let r=0;r<this.length;++r)if(e.call(t,this.data[r],r,this.data))return!0;return!1}find(e,t){for(let r=0;r<this.length;++r){const n=this.data[r];if(e.call(t,n,r))return n}}filterInPlace(e,t){let r=0;for(let n=0;n<this._length;++n){const s=this.data[n];e.call(t,s,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=s,r++)}if(this._deallocator)for(let e=r;e<this._length;e++)this.data[e]=this._deallocator(this.data[e]);return this._length=r,this._shrink(),this}forAll(e,t){const r=this.length,n=this.data;for(let s=0;s<r;++s)e.call(t,n[s],s,n)}forEach(e,t){for(let r=0;r<this.length;++r)e.call(t,this.data[r],r,this.data)}map(e,t){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=e.call(t,this.data[n],n,this.data);return r}reduce(e,t){let r=t;for(let t=0;t<this.length;++t)r=e(r,this.data[t],t,this.data);return r}has(e){const t=this.length,r=this.data;for(let n=0;n<t;++n)if(r[n]===e)return!0;return!1}}function a(e){e.data.length>1.5*e.length&&(e.data.length=Math.floor(1.1*e.length))}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*n._m}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},20941:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(58896);class s extends n.Z{constructor(e,t,r){super(e,t,r)}}s.prototype.type="warning"},42100:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(50758),s=r(67676);class o{constructor(e,t){this._observers=e,this._observer=t}remove(){(0,s.Od)(this._observers,this._observer)}}class i{constructor(){this._observers=null,this.destroyed=!1}observe(e){if(this.destroyed||e.destroyed)return a;null==this._observers&&(this._observers=[]);const t=this._observers;let r=!1,n=!1;const s=t.length;for(let o=0;o<s;++o){const s=t[o];if(s.destroyed)n=!0;else if(s===e){r=!0;break}}return r||(t.push(e),n&&this._removeDestroyedObservers()),new o(t,e)}_removeDestroyedObservers(){const e=this._observers;if(!e||0===e.length)return;const t=e.length;let r=0;for(let n=0;n<t;++n){for(;n+r<t&&e[n+r].destroyed;)++r;if(r>0){if(!(n+r<t))break;e[n]=e[n+r]}}e.length=t-r}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this._observers;if(null!=e){for(const t of e)t.onCommitted();this._observers=null}}}const a=(0,n.kB)()},31263:(e,t,r)=>{"use strict";var n;r.d(t,{M9:()=>o,Wm:()=>a,kk:()=>s,s3:()=>n,x3:()=>i}),function(e){e[e.DEFAULTS=0]="DEFAULTS",e[e.COMPUTED=1]="COMPUTED",e[e.SERVICE=2]="SERVICE",e[e.PORTAL_ITEM=3]="PORTAL_ITEM",e[e.WEB_SCENE=4]="WEB_SCENE",e[e.WEB_MAP=5]="WEB_MAP",e[e.LINK_CHART=6]="LINK_CHART",e[e.USER=7]="USER"}(n||(n={}));const s=n.USER+1;function o(e){switch(e){case"defaults":return n.DEFAULTS;case"service":return n.SERVICE;case"portal-item":return n.PORTAL_ITEM;case"web-scene":return n.WEB_SCENE;case"web-map":return n.WEB_MAP;case"link-chart":return n.LINK_CHART;case"user":return n.USER;default:return null}}function i(e){switch(e){case n.DEFAULTS:return"defaults";case n.SERVICE:return"service";case n.PORTAL_ITEM:return"portal-item";case n.WEB_SCENE:return"web-scene";case n.WEB_MAP:return"web-map";case n.LINK_CHART:return"link-chart";case n.USER:return"user"}}function a(e){return i(e)}},88022:(e,t,r)=>{"use strict";r.d(t,{F:()=>n});const n=Symbol("Accessor-beforeDestroy")},5600:(e,t,r)=>{"use strict";r.d(t,{CJ:()=>l,Cb:()=>c,Eg:()=>u});var n=r(92604),s=r(75215),o=r(67723),i=r(7628),a=r(37697);function c(e={}){return(t,r)=>{if(t===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${t.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(t,r),l=(0,i.Oe)(t,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in e&&n.Z.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${t.constructor.name}" already defined in the metadata`,e),l.value=e.value=c.value)),null!=e.readOnly&&(l.readOnly=e.readOnly);const f=e.aliasOf;if(f){const e="string"==typeof f?f:f.source,t="string"==typeof f?null:!0===f.overridable;let n;l.dependsOn=[e],l.get=function(){let t=(0,o.U2)(this,e);if("function"==typeof t){n||(n=e.split(".").slice(0,-1).join("."));const r=(0,o.U2)(this,n);r&&(t=t.bind(r))}return t},l.readOnly||(l.set=t?function(e){this._override(r,e)}:function(t){(0,a.t)(this,e,t)})}const d=e.type,h=e.types;l.cast||(d?l.cast=function(e){let t=0,r=e;if((0,s.AY)(e))return(0,s.sY)(e);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],t++;const n=r;if((0,s.gB)(n))return 0===t?(0,s.i$)(n):(0,s.Iu)((0,s.i$)(n),t);if(1===t)return(0,s.rY)(n);if(t>1)return(0,s.di)(n,t);const o=e;return o.from?o.from:(0,s.se)(o)}(d):h&&(Array.isArray(h)?l.cast=(0,s.Ls)((0,s.N7)(h[0])):l.cast=(0,s.N7)(h))),(0,i.tz)(l,e),e.range&&(l.cast=u(l.cast,e.range))}}function l(e,t,r){const n=(0,i.Oe)(e,r);n.json||(n.json={});let s=n.json;return void 0!==t&&(s.origins||(s.origins={}),s.origins[t]||(s.origins[t]={}),s=s.origins[t]),s}function u(e,t){return r=>{let n=+e(r);return null!=t.step&&(n=Math.round(n/t.step)*t.step),null!=t.min&&(n=Math.max(t.min,n)),null!=t.max&&(n=Math.min(t.max,n)),n}}},52011:(e,t,r)=>{"use strict";r.d(t,{j:()=>u}),r(80442);var n=r(88022),s=r(97831),o=r(7628),i=r(58971),a=r(53906);const c=new Set,l=new Set;function u(e){return t=>{e??="esri.core.Accessor",t.prototype.declaredClass=e,d(t);const r=[],s=[];let i=t.prototype;for(;i;)i.hasOwnProperty("initialize")&&!c.has(i.initialize)&&(c.add(i.initialize),r.push(i.initialize)),i.hasOwnProperty("destroy")&&!l.has(i.destroy)&&(l.add(i.destroy),s.push(i.destroy)),i=Object.getPrototypeOf(i);c.clear(),l.clear();const a=class extends t{constructor(...e){if(super(...e),this.constructor===a&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let e=r.length-1;e>=0;e--)r[e].call(this)}}),s.length){let e=!1;const t=this[n.F];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){e=!0,t.call(this);for(let e=0;e<s.length;e++)s[e].call(this)}}})}this.postscript(...e)}}};a.__accessorMetadata__=(0,o.fp)(t.prototype),a.prototype.declaredClass=e;const u=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(a,"name",{value:u,configurable:!0}),a}}function f(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;(0,i.it)(r.observerObject);const n=t.store;return n.has(e)?n.get(e):r.metadata.value}:function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0!==r)return r.getComputed(t)}}function d(e){const t=e.prototype,r=(0,o.fp)(t),n={};for(const e of Object.getOwnPropertyNames(r)){const t=r[e];(0,a.OM)(t),n[e]={enumerable:!0,configurable:!0,get:f(e,t),set(r){const n=this.__accessor__;if(void 0!==n){if(!Object.isFrozen(this)){if(n.initialized&&t.readOnly)throw new TypeError(`[accessor] cannot assign to read-only property '${e}' of ${this.declaredClass}`);if(n.lifecycle===s.F.CONSTRUCTED&&t.constructOnly)throw new TypeError(`[accessor] cannot assign to construct-only property '${e}' of ${this.declaredClass}`);n.set(e,r)}}else Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(e.prototype,n)}},41103:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(31263);function s(e,t,r){t.keys().forEach((e=>{r.set(e,t.get(e),n.s3.DEFAULTS)}));const s=e.metadatas;Object.keys(s).forEach((t=>{e.internalGet(t)&&r.set(t,e.internalGet(t),n.s3.DEFAULTS)}))}},75215:(e,t,r)=>{"use strict";r.d(t,{AY:()=>C,Iu:()=>A,Ls:()=>_,N7:()=>T,TJ:()=>y,V5:()=>N,Zs:()=>c,di:()=>S,gB:()=>k,i$:()=>j,q9:()=>l,rY:()=>w,sY:()=>P,se:()=>v,vU:()=>u,z8:()=>E}),r(80442);var n=r(92604),s=r(30175);const o=n.Z.getLogger("esri.core.accessorSupport.ensureTypes");function i(e){return null==e?e:new Date(e)}function a(e){return null==e?e:!!e}function c(e){return null==e?e:e.toString()}function l(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function u(e){return null==e?e:Math.round(parseFloat(e))}function f(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function d(e,t){return null!=t&&e&&!(t instanceof e)}function h(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function g(e,t){return!!f(t)&&(o.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+b(e)+"'"),!0)}function y(e,t){return null==t?t:h(e)?function(e,t){if(!t||!t.constructor||!h(t.constructor))return g(e,t)?t:new e(t);const r=p(e.prototype.itemType),n=p(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(g(e,t),t):new e(t):t}(e,t):d(e,t)?g(e,t)?t:new e(t):t}function b(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const m=new WeakMap;function v(e,t){const r=function(e){switch(e){case Number:return l;case E:return u;case Boolean:return a;case String:return c;case Date:return i;default:return(0,s.s1)(m,e,(()=>y.bind(null,e)))}}(e);return 1===arguments.length?r:r(t)}function _(e,t,r){return 1===arguments.length?_.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,r))):[e(t,r)]:t}function w(e,t){return 1===arguments.length?_((t=>v(e,t))):_((t=>v(e,t)),t)}function O(e,t,r){return 0!==t&&Array.isArray(r)?r.map((r=>O(e,t-1,r))):e(r)}function A(e,t,r){if(2===arguments.length)return r=>A(e,t,r);if(!r)return r;r=O(e,t,r);let n=t,s=r;for(;n>0&&Array.isArray(s);)n--,s=s[0];if(void 0!==s)for(let e=0;e<n;e++)r=[r];return r}function S(e,t,r){return 2===arguments.length?A((t=>v(e,t)),t):A((t=>v(e,t)),t,r)}function k(e){return!!Array.isArray(e)&&!e.some((t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)}))}function j(e,t){if(2===arguments.length)return j(e).call(null,t);const r=new Set,n=e.filter((e=>"function"!=typeof e)),s=e.filter((e=>"function"==typeof e));for(const t of e)"string"!=typeof t&&"number"!=typeof t||r.add(t);let i=null,a=null;return(e,t)=>{if(null==e)return e;const c=typeof e,l="string"===c||"number"===c;return l&&(r.has(e)||s.some((e=>"string"===c&&e===String||"number"===c&&e===Number)))||"object"===c&&s.some((t=>!d(e,t)))?e:(l&&n.length?(i||(i=n.map((e=>"string"==typeof e?`'${e}'`:`${e}`)).join(", ")),o.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${i}`)):"object"==typeof e&&s.length?(a||(a=s.map((e=>b(e))).join(", ")),o.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${a}`)):o.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function T(e,t){if(2===arguments.length)return T(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const o=e.typeMap[t];r[t]=v(o),n.push(b(o)),s.push(t)}const i=()=>`'${n.join("', '")}'`,a=()=>`'${s.join("', '")}'`,c="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!d(e.base,t))return t;if(null==t)return t;const n=c(t)||e.defaultKeyValue,s=r[n];if(!s)return o.error("Accessor#set",`Invalid property value, value needs to be one of ${i()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!d(e.typeMap[n],t))return t;if("string"==typeof e.key&&!f(t)){const r={};for(const n in t)n!==e.key&&(r[n]=t[n]);return s(r)}return s(t)}}class E{}const N={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function C(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function P(e){switch(e.type){case"native":return v(e.value);case"array":return _(P(e.value));case"one-of":return function(e){let t=null;return(r,n)=>I(r,e)?r:(null==t&&(t=M(e)),o.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),n&&(n.valid=!1),null)}(e);default:return null}}function M(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case E:return"integer";case Date:return"date";default:return b(e.value)}case"array":return`array of ${M(e.value)}`;case"one-of":{const t=e.values.map((e=>M(e)));return`one of ${t.slice(0,-1)} or ${t[t.length-1]}`}}return"unknown"}function I(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case E:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!I(e,t.value)));case"one-of":return t.values.some((t=>I(e,t)))}}},53906:(e,t,r)=>{"use strict";r.d(t,{hk:()=>u,HS:()=>f,Ah:()=>d,OM:()=>b});var n=r(75215),s=r(63213);function o(e){if(e.json||(e.json={}),a(e.json),c(e.json),i(e.json),e.json.origins)for(const t in e.json.origins)a(e.json.origins[t]),c(e.json.origins[t]),i(e.json.origins[t]);return!0}function i(e){e.name&&(e.read&&"object"==typeof e.read?void 0===e.read.source&&(e.read.source=e.name):e.read={source:e.name},e.write&&"object"==typeof e.write?void 0===e.write.target&&(e.write.target=e.name):e.write={target:e.name})}function a(e){"boolean"==typeof e.read?e.read={enabled:e.read}:"function"==typeof e.read?e.read={enabled:!0,reader:e.read}:e.read&&"object"==typeof e.read&&void 0===e.read.enabled&&(e.read.enabled=!0)}function c(e){"boolean"==typeof e.write?e.write={enabled:e.write}:"function"==typeof e.write?e.write={enabled:!0,writer:e.write}:e.write&&"object"==typeof e.write&&void 0===e.write.enabled&&(e.write.enabled=!0)}var l=r(827);function u(e,t){return h(e,"any",t?.origin)}function f(e,t){return h(e,"read",t?.origin)}function d(e,t){return h(e,"write",t?.origin)}function h(e,t,r){let n=e?.json;if(n?.origins&&r){let e;e="link-chart"===r?n.origins[r]&&("any"===t||t in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],e&&("any"===t||t in e)&&(n=e)}return n}function p(e){return e.type?g(e):y(e)}function g(e){if(!e.type)return;let t=0,r=e.type;for(;Array.isArray(r)&&!(0,n.gB)(r);)r=r[0],t++;return{type:r,ndimArray:t}}function y(e){if(!e.types)return;let t=0,r=e.types;for(;Array.isArray(r);)r=r[0],t++;return{types:r,ndimArray:t}}function b(e){o(e)&&(function(e){if(e.json&&e.json.origins){const t=e.json.origins,r={"web-document":["web-scene","web-map"]};for(const e in r)if(t[e]){const n=t[e];r[e].forEach((e=>{t[e]=n})),delete t[e]}}}(e),function(e){const t=function(e){return e.json.types?y(e.json):e.type?g(e):y(e)}(e);if(e.json.origins)for(const r in e.json.origins){const n=e.json.origins[r],o=n.types?p(n):t;(0,s.U)(o,n,!1),n.types&&!n.write&&e.json.write&&e.json.write.enabled&&(n.write={...e.json.write}),(0,l.U)(o,n)}(0,s.U)(t,e.json,!0),(0,l.U)(t,e.json)}(e))}},63213:(e,t,r)=>{"use strict";r.d(t,{U:()=>l,d:()=>u});var n=r(92604),s=r(78286),o=r(20941),i=r(7628),a=r(14062);const c=n.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function l(e,t,r){e&&(!r&&!t.read||t.read?.reader||!1===t.read?.enabled||function(e){return"types"in e?y(e.types):g(e.type)}(e)&&(0,s.RB)("read.reader",u(e),t))}function u(e){const t=e.ndimArray??0;if(t>1)return function(e){const t=f(e),r=d.bind(null,t),n=e.ndimArray??0;return(e,t,s)=>{if(null==e)return e;e=r(e,s,n);let o=n,i=e;for(;o>0&&Array.isArray(i);)o--,i=i[0];if(void 0!==i)for(let t=0;t<o;t++)e=[e];return e}}(e);if(1===t)return h(e);if("type"in e&&p(e.type)){const t=e.type.prototype?.itemType?.Type,r=h("function"==typeof t?{type:t}:{types:t});return(t,n,s)=>{const o=r(t,n,s);return o?new e.type(o):o}}return f(e)}function f(e){return"type"in e?function(e){return e.prototype.read?(t,r,n)=>{if(null==t)return t;const s=typeof t;if("object"!==s)return void c.error(`Expected JSON value of type 'object' to deserialize type '${e.prototype.declaredClass}', but got '${s}'`);const o=new e;return o.read(t,n),o}:e.fromJSON}(e.type):function(e){let t=null;const r=e.errorContext??"type",n=e.validate;return(s,a,l)=>{if(null==s)return s;const u=typeof s;if("object"!==u)return void c.error(`Expected JSON value of type 'object' to deserialize, but got '${u}'`);t||(t=function(e){const t={};for(const r in e.typeMap){const n=e.typeMap[r],s=(0,i.fp)(n.prototype);if("function"==typeof e.key)continue;const o=s[e.key];if(!o)continue;o.json?.type&&Array.isArray(o.json.type)&&1===o.json.type.length&&"string"==typeof o.json.type[0]&&(t[o.json.type[0]]=n);const a=o.json?.write;if(!a||!a.writer){t[r]=n;continue}const c=a.target,l="string"==typeof c?c:e.key,u={};a.writer(r,u,l),u[l]&&(t[u[l]]=n)}return t}(e));const f=e.key;if("string"!=typeof f)return;const d=s[f],h=d?t[d]:e.defaultKeyValue?e.typeMap[e.defaultKeyValue]:void 0;if(!h){const e=`Type '${d||"unknown"}' is not supported`;return l&&l.messages&&s&&l.messages.push(new o.Z(`${r}:unsupported`,e,{definition:s,context:l})),void c.error(e)}const p=new h;return p.read(s,l),n?n(p):p}}(e.types)}function d(e,t,r,n){return 0!==n&&Array.isArray(t)?t.map((t=>d(e,t,r,n-1))):e(t,void 0,r)}function h(e){const t=f(e);return(e,r,n)=>{if(null==e)return e;if(Array.isArray(e)){const r=[];for(const s of e){const e=t(s,void 0,n);void 0!==e&&r.push(e)}return r}const s=t(e,void 0,n);return void 0!==s?[s]:void 0}}function p(e){if(!(0,a.u)(e))return!1;const t=e.prototype.itemType;return!(!t||!t.Type)&&("function"==typeof t.Type?g(t.Type):y(t.Type))}function g(e){return!Array.isArray(e)&&!!e&&e.prototype&&("read"in e.prototype||"fromJSON"in e||p(e))}function y(e){for(const t in e.typeMap)if(!g(e.typeMap[t]))return!1;return!0}},14062:(e,t,r)=>{"use strict";function n(e){return!!e&&e.prototype&&e.prototype.declaredClass&&0===e.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(t,{u:()=>n})},827:(e,t,r)=>{"use strict";r.d(t,{U:()=>a,k:()=>f});var n=r(20102),s=r(92604),o=r(78286),i=r(14062);function a(e,t){if(!t.write||t.write.writer||!1===t.write.enabled&&!t.write.overridePolicy)return;const r=e?.ndimArray??0;e&&(1===r||"type"in e&&(0,i.u)(e.type))?t.write.writer=d:r>1?t.write.writer=function(e){return(t,r,n,s)=>{let i;if(null===t)i=null;else{i=h(t,s,e);let r=e,n=i;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let e=0;e<r;e++)i=[i]}(0,o.RB)(n,i,r)}}(r):t.types?Array.isArray(t.types)?t.write.writer=function(e){return(t,r,n,s)=>t&&Array.isArray(t)?l(t.filter((t=>c(t,e,s))),r,n,s):l(t,r,n,s)}(t.types[0]):t.write.writer=function(e){return(t,r,n,s)=>t?c(t,e,s)?l(t,r,n,s):void 0:l(t,r,n,s)}(t.types):t.write.writer=l}function c(e,t,r){for(const r in t.typeMap)if(e instanceof t.typeMap[r])return!0;if(r?.messages){const o=t.errorContext??"type",i=`Values of type '${("function"!=typeof t.key?e[t.key]:e.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&e&&r.messages.push(new n.Z(`${o}:unsupported`,i,{definition:e,context:r})),s.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function l(e,t,r,n){(0,o.RB)(r,u(e,n),t)}function u(e,t){return e&&"function"==typeof e.write?e.write({},t):e&&"function"==typeof e.toJSON?e.toJSON():"number"==typeof e?f(e):e}function f(e){return e===-1/0?-Number.MAX_VALUE:e===1/0?Number.MAX_VALUE:isNaN(e)?null:e}function d(e,t,r,n){let s;null===e?s=null:e&&"function"==typeof e.map?(s=e.map((e=>u(e,n))),"function"==typeof s.toArray&&(s=s.toArray())):s=[u(e,n)],(0,o.RB)(r,s,t)}function h(e,t,r){return 0!==r&&Array.isArray(e)?e.map((e=>h(e,t,r-1))):u(e,t)}},67723:(e,t,r)=>{"use strict";r.d(t,{$z:()=>i,Gg:()=>c,U2:()=>a});var n=r(1153);function s(e,t){const r="?"===e[e.length-1]?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(r,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const s=(0,n.vw)(t);return(0,n.b6)(s,r)?s.get(r):t[r]}function o(e,t,r){if(null==e)return e;const n=s(t[r],e);return!n&&r<t.length-1?void 0:r===t.length-1?n:o(n,t,r+1)}function i(e,t,r=0){return"string"!=typeof t||t.includes(".")?o(e,(0,n.NI)(t),r):s(t,e)}function a(e,t){return i(e,t)}function c(e,t){return void 0!==i(t,e)}},97831:(e,t,r)=>{"use strict";var n;r.d(t,{F:()=>n}),function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED"}(n||(n={}))},7628:(e,t,r)=>{"use strict";r.d(t,{Oe:()=>i,fp:()=>o,tz:()=>a});var n=r(22974),s=r(1153);function o(e){let t=e.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!r){t=Object.create(t);for(const e in t)t[e]=(0,n.d9)(t[e]);Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t={},Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return e.constructor.__accessorMetadata__}function i(e,t){const r=o(e);let n=r[t];return n||(n=r[t]={}),n}function a(e,t){return(0,s.TS)(e,t,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(e){return c.test(e)?"replace":"merge"}},50549:(e,t,r)=>{"use strict";r.d(t,{$:()=>f,i:()=>u});var n=r(67723),s=r(1153),o=r(53906);function i(e,t,r){if(!e||!e.read||!1===e.read.enabled||!e.read.source)return!1;const s=e.read.source;if("string"==typeof s){if(s===t)return!0;if(s.includes(".")&&0===s.indexOf(t)&&(0,n.Gg)(s,r))return!0}else for(const e of s){if(e===t)return!0;if(e.includes(".")&&0===e.indexOf(t)&&(0,n.Gg)(e,r))return!0}return!1}function a(e,t,r,n,s){let a=(0,o.HS)(t[r],s);(function(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)})(a)&&(e[r]=!0);for(const c of Object.getOwnPropertyNames(t))a=(0,o.HS)(t[c],s),i(a,r,n)&&(e[c]=!0)}function c(e,t,r,n){const s=r.metadatas,i=(0,o.hk)(s[t],n),a=i?.default;if(void 0===a)return;const c="function"==typeof a?a.call(e,t,n):a;void 0!==c&&r.set(t,c)}const l={origin:"service"};function u(e,t,r=l){if(!t||"object"!=typeof t)return;const i=(0,s.vw)(e),u=i.metadatas,f={};for(const e of Object.getOwnPropertyNames(t))a(f,u,e,t,r);i.setDefaultOrigin(r.origin);for(const s of Object.getOwnPropertyNames(f)){const a=(0,o.HS)(u[s],r).read,c=a&&a.source;let l;l=c&&"string"==typeof c?(0,n.$z)(t,c):t[s],a&&a.reader&&(l=a.reader.call(e,l,t,r)),void 0!==l&&i.set(s,l)}if(!r||!r.ignoreDefaults){i.setDefaultOrigin("defaults");for(const t of Object.getOwnPropertyNames(u))f[t]||c(e,t,i,r)}i.setDefaultOrigin("user")}function f(e,t,r,n=l){const s={...n,messages:[]};r(s),s.messages?.forEach((t=>{"warning"!==t.type||e.loaded?n&&n.messages&&n.messages.push(t):e.loadWarnings.push(t)}))}},37697:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(20102),s=r(80442),o=(r(92604),r(67723));function i(e,t,r){if(e&&t)if("object"==typeof t)for(const r of Object.getOwnPropertyNames(t))i(e,r,t[r]);else{if(t.includes(".")){const n=t.split("."),s=n.splice(-1,1)[0];return void i((0,o.U2)(e,n),s,r)}const a=e.__accessor__;null!=a&&function(e,t){if((0,s.Z)("esri-unknown-property-errors")&&!function(e,t){return null!=t.metadatas[e]}(e,t))throw new n.Z("set:unknown-property",function(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}(e,t))}(t,a),e[t]=r}}},58971:(e,t,r)=>{"use strict";r.d(t,{GF:()=>v,LJ:()=>d,gb:()=>h,it:()=>l,mS:()=>b}),r(80442);var n=r(92604),s=r(1153),o=r(44550);const i={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},a=[];let c=i;function l(e){c.onObservableAccessed(e)}let u=!1,f=!1;function d(e,t,r){if(u)return p(e,t,r);g(e);const n=t.call(r);return y(),n}function h(e,t){return d(i,e,t)}function p(e,t,r){const s=u;u=!0,g(e);let o=null;try{o=t.call(r)}catch(e){f&&n.Z.getLogger("esri.core.accessorSupport.tracking").error(e)}return y(),u=s,o}function g(e){c=e,a.push(e)}function y(){const e=a.length;if(e>1){const t=a.pop();c=a[e-2],t.onTrackingEnd()}else if(1===e){const e=a.pop();c=i,e.onTrackingEnd()}else c=i}function b(e,t){const r=t.observerObject;if(r.flags&o.v.DepTrackingInitialized)return;const n=f;f=!1,r.flags&o.v.AutoTracked?p(t,t.metadata.get,e):v(e,t),f=n}const m=[];function v(e,t){const r=t.observerObject;r.flags&o.v.ExplicitlyTracking||(r.flags|=o.v.ExplicitlyTracking,p(t,(()=>{const r=t.metadata.dependsOn||m;for(const t of r)if("string"!=typeof t||t.includes(".")){const r=(0,s.NI)(t);for(let t=0,n=e;t<r.length&&null!=n&&"object"==typeof n;++t)n=_(n,r[t],t!==r.length-1)}else _(e,t,!1)})),r.flags&=~o.v.ExplicitlyTracking)}function _(e,t,r){const n="?"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(n,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const o=(0,s.vw)(e);if(o){const t=o.propertiesByName.get(n);t&&(l(t.observerObject),b(e,t))}return r?e[n]:void 0}},44550:(e,t,r)=>{"use strict";var n;r.d(t,{v:()=>n}),function(e){e[e.Dirty=1]="Dirty",e[e.Overriden=2]="Overriden",e[e.Computing=4]="Computing",e[e.NonNullable=8]="NonNullable",e[e.HasDefaultValue=16]="HasDefaultValue",e[e.DepTrackingInitialized=32]="DepTrackingInitialized",e[e.AutoTracked=64]="AutoTracked",e[e.ExplicitlyTracking=128]="ExplicitlyTracking"}(n||(n={}))},38805:(e,t,r)=>{"use strict";r.d(t,{M:()=>n});class n{constructor(e){this._accessed=[],this._handles=[],this._observerObject=new s(e),o.register(this,new WeakRef(this._observerObject),this)}destroy(){o.unregister(this._observerObject),this._accessed.length=0,this._observerObject?.destroy(),this.clear()}onObservableAccessed(e){const t=this._accessed;t.includes(e)||t.push(e)}onTrackingEnd(){const e=this._handles,t=this._accessed,r=this._observerObject;for(let n=0;n<t.length;++n)e.push(t[n].observe(r));t.length=0}clear(){const e=this._handles;for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}class s{constructor(e){this._notify=e,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const e=this._invalidCount;if(1===e)return this._invalidCount=0,void this._notify();this._invalidCount=e>0?e-1:0}destroy(){this.destroyed=!0,this._notify=i}}const o=new FinalizationRegistry((e=>{e.deref()?.destroy()}));function i(){}},87538:(e,t,r)=>{"use strict";r.d(t,{EH:()=>u,U5:()=>c,Xz:()=>l});var n=r(50758),s=r(58971),o=r(38805);let i=!1;const a=[];function c(e,t){let r=new o.M((function n(){if(!r||c)return;if(i)return void f(n);const o=a;r.clear(),i=!0,c=!0,a=(0,s.LJ)(r,e),c=!1,i=!1,t(a,o),d()})),a=null,c=!1;return c=!0,a=(0,s.LJ)(r,e),c=!1,(0,n.kB)((function(){r&&(r.destroy(),r=null,a=null)}))}function l(e,t){let r=new o.M((function(){t(i,a)})),i=null;function a(){return r?(r.clear(),i=(0,s.LJ)(r,e),i):null}return a(),(0,n.kB)((function(){r&&(r.destroy(),r=null),i=null}))}function u(e){let t=new o.M((function n(){t&&!r&&(i?f(n):(t.clear(),i=!0,r=!0,(0,s.LJ)(t,e),r=!1,i=!1,d()))})),r=!1;return r=!0,(0,s.LJ)(t,e),r=!1,(0,n.kB)((function(){t&&(t.destroy(),t=null)}))}function f(e){a.includes(e)||a.unshift(e)}function d(){for(;a.length;)a.pop()()}},1153:(e,t,r)=>{"use strict";r.d(t,{NI:()=>l,Qc:()=>f,TS:()=>a,b6:()=>i,vw:()=>o});var n=r(50758),s=r(22974);function o(e){return e.__accessor__??null}function i(e,t){return null!=e&&e.metadatas&&null!=e.metadatas[t]}function a(e,t,r){return c(e,t,r?{policy:r,path:""}:null)}function c(e,t,r){return t?Object.keys(t).reduce(((e,n)=>{const o=n;let i=null,a="merge";if(r&&(i=r.path?`${r.path}.${n}`:n,a=r.policy(i)),"replace"===a)return e[o]=t[o],e;if("replace-arrays"===a&&Array.isArray(e[o]))return e[o]=t[o],e;if(void 0===e[o])return e[o]=(0,s.d9)(t[o]),e;let l=e[o],u=t[o];if(l===u)return e;if(Array.isArray(u)||Array.isArray(e))l=l?Array.isArray(l)?e[o]=l.concat():e[o]=[l]:e[o]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach((e=>{l.includes(e)||l.push(e)})));else if(u&&"object"==typeof u)if(r){const t=r.path;r.path=i,e[o]=c(l,u,r),r.path=t}else e[o]=c(l,u,null);else e.hasOwnProperty(n)&&!t.hasOwnProperty(n)||(e[o]=u);return e}),e||{}):e}function l(e){return Array.isArray(e)?e:e.split(".")}function u(e){return e.includes(",")?e.split(",").map((e=>e.trim())):[e.trim()]}function f(e,t,r,s){const o=function(e){if(Array.isArray(e)){const t=[];for(const r of e)t.push(...u(r));return t}return u(e)}(t);if(1!==o.length){const t=o.map((t=>s(e,t,r)));return(0,n.AL)(t)}return s(e,o[0],r)}},26258:(e,t,r)=>{"use strict";r.d(t,{BT:()=>w,YP:()=>k,aQ:()=>j});var n=r(3894),s=r(50758),o=r(22974),i=r(71143);class a extends i.Z{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=null}acquire(...e){const t=super.acquire(...e);return this._set.delete(t),t}release(e){e&&!this._set.has(e)&&(super.release(e),this._set.add(e))}_dispose(e){this._set.delete(e),super._dispose(e)}}var c,l,u=r(1654),f=r(99001),d=r(67723),h=r(87538),p=r(1153);(l=c||(c={}))[l.Untracked=0]="Untracked",l[l.Tracked=1]="Tracked";class g{constructor(){this.uid=(0,f.D)(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(e,t,r,n,s){return this.pool.acquire(c.Untracked,e,t,r,n,s,o.fS)}static acquireTracked(e,t,r,n){return this.pool.acquire(c.Tracked,e,t,r,null,null,n)}notify(e,t){this.type===c.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,n,s,o,i){this.uid=(0,f.D)(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=n,this.target=s,this.path=o,this.equals=i}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=(0,f.D)(),this.removed=!0}}g.pool=new a(g);const y=new n.Z,b=new Set;let m;function v(e){b.delete(e),b.add(e),m||(m=(0,u.Os)(O))}function _(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function w(e){for(const t of b.values())t.target===e&&(t.removed=!0)}function O(){let e=10;for(;m&&e--;){m=null;const e=A(),t=y.acquire();for(const r of e){const e=r.uid;_(r),e===r.uid&&r.removed&&t.push(r)}for(const e of b)e.removed&&(t.push(e),b.delete(e));for(const e of t)g.pool.release(e);y.release(t),y.release(e),S.forEach((e=>e()))}}function A(){const e=y.acquire();e.length=b.size;let t=0;for(const r of b)e[t]=r,++t;return b.clear(),e}const S=new Set;function k(e,t,r,n=!1){return!e.__accessor__||e.__accessor__.destroyed?(0,s.kB)():n?function(e,t,r){const n=(0,p.Qc)(e,t,r,((e,t,r)=>{let s=!1;return(0,h.U5)((()=>(0,d.$z)(e,t)),((i,a)=>{e.__accessor__.destroyed?n.remove():s||(s=!0,(0,o.fS)(a,i)||r.call(e,i,a,t,e),s=!1)}))}));return n}(e,t,r):function(e,t,r){let n=(0,p.Qc)(e,t,r,((e,t,r)=>{let o,i,a=(0,h.Xz)((()=>(0,d.$z)(e,t)),((s,a)=>{e.__accessor__.destroyed||o&&o.uid!==i?n.remove():(o||(o=g.acquireUntracked(s,r,a,e,t),i=o.uid),v(o))}));return(0,s.kB)((()=>{a.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,v(o)),o=null),n=a=null}))}));return n}(e,t,r)}function j(e,t,r=!1,n=o.y7){return r?function(e,t,r){let n=!1;return(0,h.U5)(e,((e,s)=>{n||(n=!0,r(s,e)||t(e,s),n=!1)}))}(e,t,n):function(e,t,r){let n,o,i=(0,h.Xz)(e,((e,s)=>{n&&n.uid!==o?i.remove():(n||(n=g.acquireTracked(e,t,s,r),o=n.uid),v(n))}));return(0,s.kB)((()=>{i.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,v(n)),n=null),i=null}))}(e,t,n)}},76169:(e,t,r)=>{"use strict";r.d(t,{c:()=>h,d:()=>d});var n=r(67676),s=r(20102),o=r(92604),i=r(67723),a=r(31263),c=r(1153),l=r(53906);function u(e,t,r,n,s){const o={};return t.write?.writer?.call(e,n,o,r,s),o}function f(e,t,r,c,l,u){if(!c||!c.write)return!1;const f=(0,i.U2)(e,r);if(!l&&c.write.overridePolicy){const t=c.write.overridePolicy.call(e,f,r,u??void 0);void 0!==t&&(l=t)}if(l||(l=c.write),!l||!1===l.enabled)return!1;if((null===f&&!l.allowNull&&!l.writerEnsuresNonNull||void 0===f)&&l.isRequired){const t=new s.Z("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return t&&u&&u.messages?u.messages.push(t):t&&!u&&o.Z.getLogger("esri.core.accessorSupport.write").error(t.name,t.message),!1}return!(void 0===f||null===f&&!l.allowNull&&!l.writerEnsuresNonNull||!(l.alwaysWriteDefaults||t.store.multipleOriginsSupported&&t.store.originOf(r)!==a.s3.DEFAULTS)&&function(e,t,r,s,o){const i=s.default;if(void 0===i)return!1;if(null!=s.defaultEquals)return s.defaultEquals(o);if("function"==typeof i){if(Array.isArray(o)){const s=i.call(e,t,r??void 0);return(0,n.fS)(s,o)}return!1}return i===o}(e,r,u,c,f)||!l.ignoreOrigin&&u&&u.origin&&t.store.multipleOriginsSupported&&t.store.originOf(r)<(0,a.M9)(u.origin))}function d(e,t,r,n){const s=(0,c.vw)(e),o=s.metadatas,i=(0,l.Ah)(o[t],n);return!!i&&f(e,s,t,i,r,n)}function h(e,t,r){if(e&&"function"==typeof e.toJSON&&(!e.toJSON.isDefaultToJSON||!e.write))return(0,c.TS)(t,e.toJSON(r));const n=(0,c.vw)(e),s=n.metadatas;for(const o in s){const d=(0,l.Ah)(s[o],r);if(!f(e,n,o,d,void 0,r))continue;const h=(0,i.U2)(e,o),p=u(e,d,d.write&&"string"==typeof d.write.target?d.write.target:o,h,r);Object.keys(p).length>0&&(t=(0,c.TS)(t,p),r?.resources?.pendingOperations?.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then((()=>(0,c.TS)(t,p,(()=>"replace-arrays"))))),r&&r.writtenProperties&&r.writtenProperties.push({target:e,propName:o,oldOrigin:(0,a.Wm)(n.store.originOf(o)),newOrigin:r.origin}))}return t}},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>y,Od:()=>b,SO:()=>f,Vx:()=>o,a9:()=>l,cq:()=>h,e$:()=>p,e5:()=>i,fS:()=>s,pC:()=>m,w6:()=>u,zG:()=>a});var n=r(77734);function s(e,t,r){if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function o(e,t){let r=e.length!==t.length;r&&(e.length=t.length);for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function i(e,t,r){let n,s;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),s=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),s=e.filter((e=>!t.includes(e)))),{added:n,removed:s}}function a(e){return e&&"number"==typeof e.length}const c=!!Array.prototype.fill;function l(e,t){if(c)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function u(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class f{constructor(){this.last=0}}const d=new f;function h(e,t,r,n){n=n||d;const s=Math.max(0,n.last-10);for(let o=s;o<r;++o)if(e[o]===t)return n.last=o,o;const o=Math.min(s,r);for(let r=0;r<o;++r)if(e[r]===t)return n.last=r,r;return-1}function p(e,t,r,n){const s=r??e.length,o=h(e,t,s,n);if(-1!==o)return e[o]=e[s-1],null==r&&e.pop(),t}const g=new Set;function y(e,t,r=e.length,n=t.length,s,o){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);s=s||d;const i=Math.max(0,s.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(o&&o.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(o&&o.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function b(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function m(e,t){return null!=e}new n.Z},60235:(e,t,r)=>{"use strict";r.d(t,{Mr:()=>a,XV:()=>i,x9:()=>c});var n=r(80442);const s=new Set;function o(e,t,r=!1){r&&s.has(t)||(r&&s.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function i(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;c(e,"Function: "+(n?n+"::":"")+t+"()",r)}}function a(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;c(e,"Property: "+(n?n+"::":"")+t,r)}}function c(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{replacement:n,version:s,see:i,warnOnce:a}=r;let c=t;n&&(c+=`\n\t🛠️ Replacement: ${n}`),s&&(c+=`\n\t⚙️ Version: ${s}`),i&&(c+=`\n\t🔗 See ${i} for more details.`),o(e,c,a)}}},91460:(e,t,r)=>{"use strict";r.d(t,{IH:()=>i,on:()=>o,vT:()=>s});var n=r(50758);function s(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const s=t.slice();for(const t of s)e.addEventListener(t,r);return(0,n.kB)((()=>{for(const t of s)e.removeEventListener(t,r)}))}return e.addEventListener(t,r),(0,n.kB)((()=>e.removeEventListener(t,r)))}function i(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const n=o(e,t,(t=>{n.remove(),r.call(e,t)}));return n}},50758:(e,t,r)=>{"use strict";r.d(t,{AL:()=>o,kB:()=>s});const n={remove:()=>{}};function s(e){return e?{remove(){e&&(e(),e=void 0)}}:n}function o(e){return s((()=>function(e){e.forEach((e=>e?.remove()))}(e)))}},80442:(e,t,r)=>{"use strict";let n;function s(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>s}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},s.add=(e,t,r,o)=>((o||void 0===n[e])&&(n[e]=t),r&&s(e)),s.cache=n,s.add("esri-deprecation-warnings",!0),s.add("esri-force-fullscreen-debug",!1),(()=>{s.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(s.add("host-browser",e),s.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),s.add("dom",e),s("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(s.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),s.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),s.add("khtml",r.includes("Konqueror")?n:void 0),s.add("edge",parseFloat(t.split("Edge/")[1])||void 0),s.add("opr",parseFloat(t.split("OPR/")[1])||void 0),s.add("webkit",!s("wp")&&!s("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),s.add("chrome",!s("edge")&&!s("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),s.add("android",!s("wp")&&parseFloat(t.split("Android ")[1])||void 0),s.add("safari",!r.includes("Safari")||s("wp")||s("chrome")||s("android")||s("edge")||s("opr")?void 0:parseFloat(r.split("Version/")[1])),s.add("mac",r.includes("Macintosh")),!s("wp")&&/(iPhone|iPod|iPad)/.test(t)){const e=RegExp.$1.replace(/P/,"p"),r=/OS ([\d_]+)/.test(t)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replaceAll("_",""));s.add(e,n),s.add("ios",n)}s("webkit")||(!t.includes("Gecko")||s("wp")||s("khtml")||s("edge")||s.add("mozilla",n),s("mozilla")&&s.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&s.add("esri-mobile",t),r&&s.add("esri-iPhone",r),s.add("esri-geolocation",!!navigator.geolocation)}s.add("esri-wasm","WebAssembly"in globalThis),s.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),s.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),s.add("esri-atomics","Atomics"in globalThis),s.add("esri-workers","Worker"in globalThis),s.add("web-feat:cache","caches"in globalThis),s.add("esri-workers-arraybuffer-transfer",!s("safari")||Number(s("safari"))>=12),s.add("workers-pool-size",8),s.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),s.add("featurelayer-simplify-payload-size-factors",[1,1,4]),s.add("featurelayer-animation-enabled",!0),s.add("featurelayer-snapshot-enabled",!0),s.add("featurelayer-snapshot-point-min-threshold",8e4),s.add("featurelayer-snapshot-point-max-threshold",4e5),s.add("featurelayer-snapshot-point-coverage",.1),s.add("featurelayer-advanced-symbols",!1),s.add("featurelayer-pbf",!0),s.add("featurelayer-pbf-statistics",!1),s.add("feature-layers-workers",!0),s.add("feature-polyline-generalization-factor",1),s.add("mapview-transitions-duration",200),s.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),s.add("mapserver-pbf-version-support",10.81),s.add("mapservice-popup-identify-max-tolerance",20),s.add("heatmap-allow-raster-fallback",!1),s.add("heatmap-force-raster",!1),s("host-webworker")||s("host-browser")&&(s.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),s.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{s.add("esri-image-decode",!0,!0,!0)})).catch((()=>{s.add("esri-image-decode",!1,!0,!0)}))}return!1})),s.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},66374:(e,t,r)=>{"use strict";function n(e){const t=[];return function*(){yield*t;for(const r of e)t.push(r),yield r}}function s(e,t){for(const r of e)if(null!=r&&t(r))return r}function o(e){return null!=e&&"function"==typeof e[Symbol.iterator]}r.d(t,{Fs:()=>n,TW:()=>o,sE:()=>s})},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>i,fS:()=>h,tZ:()=>c,y7:()=>p,yd:()=>o});var n=r(67676),s=r(1533);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=d(e);if(null!=t)return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const t=d(e);if(null!=t)return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(e instanceof File||e instanceof Blob)return e;if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],s=a(n);if(null!=n&&null==s)return null;t[r]=s}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){if((0,s.W0)(e)||(0,s.lq)(e)||(0,s.KZ)(e)||(0,s.z3)(e)||(0,s.Uc)(e)||(0,s.Hx)(e)||(0,s.ZY)(e)||(0,s.xZ)(e)||(0,s.fS)(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,i(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(i(r));return t}return null}function h(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}function p(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.fS)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!f(e)&&f(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},70586:(e,t,r)=>{"use strict";function n(e,t){if(null==e)throw new Error(t??"value is None")}function s(e){return e?.destroy(),null}function o(e){return e?.dispose(),null}function i(e){return e?.remove(),null}function a(e){return e?.abort(),null}function c(e){return e?.release(),null}function l(e,t,r){return null!=e&&null!=t?null!=r?r(e,t):e.equals(t):e===t}r.d(t,{IM:()=>a,M2:()=>o,O3:()=>n,RY:()=>c,SC:()=>s,_W:()=>l,hw:()=>i})},41213:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});const n=[];function s(e){n.push(e),1===n.length&&queueMicrotask((()=>{const e=n.slice();n.length=0;for(const t of e)t()}))}},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>s,hS:()=>o});var n=r(22974);function s(e,t,r=!1){return c(e,t,r)}function o(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),s=n.pop(),o=a(n,!0,r);o&&s&&(o[s]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce(((e,s)=>{let o=e[s],i=t[s];return o===i?e:void 0===o?(e[s]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(o=o?Array.isArray(o)?e[s]=o.concat():e[s]=[o]:e[s]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{o.includes(e)||o.push(e)})):e[s]=i.concat())):i&&"object"==typeof i?e[s]=c(o,i,r):e.hasOwnProperty(s)&&!t.hasOwnProperty(s)||(e[s]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>S,UO:()=>A,OT:()=>O,zE:()=>l,hh:()=>E,Ds:()=>T,as:()=>_,WW:()=>w,R8:()=>v,D_:()=>m,Hc:()=>d,y8:()=>k,fu:()=>g,$F:()=>y,r9:()=>h,k_:()=>u,H9:()=>p,Yn:()=>N,gx:()=>j,Hl:()=>b});var n=r(50758);const s=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return(0,n.kB)((()=>o.clearTimeout(r)))}});var o,i=r(20102),a=r(91460),c=(r(92604),r(70586));function l(e="Aborted"){return new i.Z("AbortError",e)}function u(e,t="Aborted"){if(d(e))throw l(t)}function f(e){return null!=e?"aborted"in e?e:e.signal:e}function d(e){const t=f(e);return null!=t&&t.aborted}function h(e){if(m(e))throw e}function p(e){if(!m(e))throw e}function g(e,t){const r=f(e);if(null!=r){if(!r.aborted)return(0,a.IH)(r,"abort",(()=>t()));t()}}function y(e,t){const r=f(e);if(null!=r)return u(r),(0,a.IH)(r,"abort",(()=>t(l())))}function b(e,t){return null==f(t)?e:new Promise(((r,n)=>{let s=g(t,(()=>n(l())));const o=()=>s=(0,c.hw)(s);e.then(o,o),e.then(r,n)}))}function m(e){return"AbortError"===e?.name}async function v(e){try{return await e}catch(e){if(!m(e))throw e;return}}async function _(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await _(r),s={};return t.map(((e,t)=>s[e]=n[t])),s}const t=e;return Promise.allSettled(t).then((e=>Array.from(t,((t,r)=>{const n=e[r];return"fulfilled"===n.status?{promise:t,value:n.value}:{promise:t,error:n.reason}}))))}async function w(e){return(await _(e)).filter((e=>!!e.value)).map((e=>e.value))}async function O(e){return(await Promise.allSettled(e)).filter((e=>"fulfilled"===e.status)).map((e=>e.value))}async function A(e){return(await Promise.allSettled(e)).filter((e=>"rejected"===e.status)).map((e=>e.reason))}function S(e,t=void 0,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,s)=>{let o=setTimeout((()=>{o=0,r(t)}),e);g(n,(()=>{o&&(clearTimeout(o),s(l()))}))}))}function k(e){return e&&"function"==typeof e.then}function j(e){return k(e)?e:Promise.resolve(e)}function T(e,t=-1){let r,n,s,o,i=null;const a=(...c)=>{if(r){n=c,o&&o.reject(l()),o=E();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(s=o||E(),o=null,t>0){const n=new AbortController;r=j(e(...c,n.signal));const s=r;S(t).then((()=>{r===s&&(o?n.abort():i=n)}))}else r=1,r=j(e(...c));const u=()=>{const e=n;n=s=r=i=null,null!=e&&a(...e)},f=r,d=s;return f.then(u,u),f.then(d.resolve,d.reject),d.promise};return a}function E(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),n=t=>{e(t)};return n.resolve=t=>e(t),n.reject=e=>t(e),n.timeout=(e,t)=>s.setTimeout((()=>n.reject(t)),e),n.promise=r,n}async function N(e){await Promise.resolve(),u(e)}},1654:(e,t,r)=>{"use strict";r.d(t,{MU:()=>v,Os:()=>g});var n=r(41213),s=r(54790),o=r(44553),i=r(95330),a=r(76882);class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let l=0;const u={time:(0,a.HA)(0),deltaTime:(0,a.HA)(0),elapsedFrameTime:(0,a.HA)(0),frameDuration:(0,a.HA)(0)},f=["prepare","preRender","render","postRender","update","finish"],d=[],h=new o.Z,p={frameTasks:h,willDispatch:!1,clearFrameTasks:function(e=!1){h.forAll((e=>{e.removed=!0})),e&&b()},dispatch:m,executeFrameTasks:function(e){const t=(0,a.HA)(e-l);l=e;const r=1e3/60,n=Math.max(0,t-r);u.time=e,u.frameDuration=(0,a.HA)(r-n);for(let r=0;r<f.length;r++){const n=performance.now(),s=f[r];h.forAll((n=>{n.paused||n.removed||(0===r&&n.ticks++,n.phases[s]&&(u.elapsedFrameTime=(0,a.HA)(performance.now()-e),u.deltaTime=0===n.ticks?(0,a.HA)(0):t,n.phases[s]?.call(n,u)))})),_[r].record(performance.now()-n)}b(),w.record(performance.now()-e)}};function g(e){const t=new c(e);return d.push(t),p.willDispatch||(p.willDispatch=!0,(0,n.Y)(m)),t}const y=new o.Z;function b(){h.forAll((e=>{e.removed&&y.push(e)})),h.removeUnorderedMany(y.data,y.length),y.clear()}function m(){for(;d.length;){const e=d.shift();e.isActive&&e.callback()}p.willDispatch=!1}function v(e=1,t){const r=(0,i.hh)(),s=()=>{(0,i.Hc)(t)?r.reject((0,i.zE)()):0===e?r():(--e,(0,n.Y)((()=>s())))};return s(),r.promise}const _=f.map((e=>new s.Z(e))),w=new s.Z("total")},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const s=/\{([^\}]+)\}/g;function o(e){return e??""}function i(e,t){return e.replaceAll(s,"object"==typeof t?(e,r)=>o((0,n.hS)(r,t)):(e,r)=>o(t(r)))}function a(e,t){return e.replaceAll(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},76882:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{HA:()=>n})},1533:(e,t,r)=>{"use strict";function n(e){return e instanceof ArrayBuffer}function s(e){return"Int8Array"===e?.constructor?.name}function o(e){return"Uint8Array"===e?.constructor?.name}function i(e){return"Uint8ClampedArray"===e?.constructor?.name}function a(e){return"Int16Array"===e?.constructor?.name}function c(e){return"Uint16Array"===e?.constructor?.name}function l(e){return"Int32Array"===e?.constructor?.name}function u(e){return"Uint32Array"===e?.constructor?.name}function f(e){return"Float32Array"===e?.constructor?.name}function d(e){return"Float64Array"===e?.constructor?.name}function h(e){return!("buffer"in e)}function p(e){return null!=e?h(e)?8*e.length+12:e.byteLength+g:0}r.d(t,{B3:()=>b,DB:()=>y,Hx:()=>l,KZ:()=>i,Op:()=>v,Q7:()=>m,Uc:()=>c,W0:()=>s,Xw:()=>p,ZY:()=>u,eP:()=>n,fS:()=>d,kJ:()=>h,lq:()=>o,xZ:()=>f,z3:()=>a}),r(80442);const g=145,y=1024;function b(e){return d(e)||f(e)||l(e)||a(e)||s(e)}function m(e){return d(e)||f(e)}function v(e){return d(e)?179769e303:f(e)?3402823e32:u(e)?4294967295:c(e)?65535:o(e)||i(e)?255:l(e)?2147483647:a(e)?32767:s(e)?127:256}},99001:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});let n=0;function s(){return++n}},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ce,AH:()=>Q,B7:()=>N,D6:()=>z,Fv:()=>J,HK:()=>Y,Hu:()=>me,IR:()=>Ae,Ie:()=>ye,L:()=>j,Ml:()=>we,P$:()=>G,PF:()=>W,Qj:()=>ge,R9:()=>w,TI:()=>k,YP:()=>V,Yd:()=>de,ZN:()=>ve,Zo:()=>R,_l:()=>re,b7:()=>C,ed:()=>U,fZ:()=>Oe,fl:()=>_e,fw:()=>se,gi:()=>ne,hF:()=>H,hO:()=>le,io:()=>oe,jc:()=>K,kl:()=>F,mN:()=>T,oC:()=>ie,oh:()=>D,qg:()=>P,rS:()=>X,sJ:()=>te,tD:()=>$,tm:()=>L,u0:()=>E,v_:()=>Z,vt:()=>he,xs:()=>pe});var n=r(68773),s=r(67676),o=r(20102),i=r(96674),a=r(92604),c=r(19745),l=r(49917);const u=a.Z.getLogger("esri.core.urlUtils"),f=n.default.request,d="esri/config: esriConfig.request.proxyUrl is not set.",h=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,g=/^\s*https:/i,y=/^\s*file:/i,b=/:\d+$/,m=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,v=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),_=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class w{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=this.uri.match(v);this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=this.authority.match(_),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const O={};let A=new w(n.default.applicationUrl);let S=function(){const e=A.path,t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${A.scheme}://${A.host}${null!=A.port?`:${A.port}`:""}${t}`}();const k=()=>A,j=()=>S;function T(e){if(!e)return null;const t={path:null,query:null},r=new w(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=E(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function E(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,s;t<0?(n=decodeURIComponent(e),s=""):(n=decodeURIComponent(e.slice(0,t)),s=decodeURIComponent(e.slice(t+1)));let o=r[n];"string"==typeof o&&(o=r[n]=[o]),Array.isArray(o)?o.push(s):r[n]=s}return r}function N(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const s=encodeURIComponent(r)+"=",o=t&&t[r];return o?s+encodeURIComponent(o(n)):Array.isArray(n)?n.map((e=>(0,i.AK)(e)?s+encodeURIComponent(JSON.stringify(e)):s+encodeURIComponent(e))).join("&"):(0,i.AK)(n)?s+encodeURIComponent(JSON.stringify(n)):s+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function C(e=!1){let t,r=f.proxyUrl;if("string"==typeof e){t=ce(e);const n=U(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw u.warn(d),new o.Z("urlutils:proxy-not-set",d);return t&&ue()&&(r=le(r)),T(r)}function P(e){const t=U(e);let r,n;if(t){const e=I(t.proxyUrl);r=e.path,n=e.query?E(e.query):null}if(r){const t=T(e);e=r+"?"+t.path;const s=N({...n,...t.query});s&&(e=`${e}?${s}`)}return e}const M={path:"",query:""};function I(e){const t=e.indexOf("?");return-1!==t?(M.path=e.slice(0,t),M.query=e.slice(t+1)):(M.path=e,M.query=null),M}function x(e){return(e=fe(e=pe(e=I(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:x(e.urlPrefix)},r=f.proxyRules,n=t.urlPrefix;let s=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;s=e;break}0===t.indexOf(n)&&(s=e+1)}return r.splice(s,0,t),s}function U(e){const t=f.proxyRules,r=x(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function R(e,t){if(!e||!t)return!1;e=B(e),t=B(t);const r=(0,c.a)(e),n=(0,c.a)(t);return null!=r&&null!=n?r.portalHostname===n.portalHostname:null==r&&null==n&&z(e,t,!0)}function L(e,t){return e=B(e),t=B(t),fe(e)===fe(t)}function B(e){const t=(e=J(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function D(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=f.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function z(e,t,r=!1){if(!e||!t)return!1;const n=be(e),s=be(t);return!(!r&&n.scheme!==s.scheme)&&null!=n.host&&null!=s.host&&n.host.toLowerCase()===s.host.toLowerCase()&&n.port===s.port}function F(e){if("string"==typeof e){if(!V(e))return!0;e=be(e)}if(z(e,A))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=q(t[r]);for(let t=0;t<n.length;t++)if(z(e,n[t]))return!0}return!1}function q(e){return O[e]||(ae(e)||ie(e)?O[e]=[new w(H(e))]:O[e]=[new w(`http://${e}`),new w(`https://${e}`)]),O[e]}function H(e,t=S,r){return ie(e)?r&&r.preserveProtocolRelative?e:"http"===A.scheme&&A.authority===G(e).slice(2)?`http:${e}`:`https:${e}`:ae(e)?e:Z("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e)}function W(e,t=S,r){if(null==e||!V(e))return e;const n=J(e),s=n.toLowerCase(),o=J(t).toLowerCase().replace(/\/+$/,""),i=r?J(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==o.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(s,"/",s.indexOf("//")+2),l=-1;for(;s.slice(0,c+1)===o.slice(0,c)+"/"&&(l=c+1,c!==s.length);)c=a(s,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=o.slice(l-1).replaceAll(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function J(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&p.test(e)||"http"===A.scheme&&ie(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),b.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===A.scheme&&n===A.authority&&!m.test(e)||(ue()&&n===A.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||ue()&&!U(e))&&(e=le(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=I(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=H(e=e.trim()))))}function Z(...e){const t=e.filter(s.pC);if(!t||!t.length)return;const r=[];if(V(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return null!=e&&y.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function G(e,t=!1){if(null==e||K(e)||Y(e))return null;let r=e.indexOf("://");if(-1===r&&ie(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=fe(e,!0)),e}function V(e){return ie(e)||ae(e)}function K(e){return null!=e&&"blob:"===e.slice(0,5)}function Y(e){return null!=e&&"data:"===e.slice(0,5)}function Q(e){const t=te(e);return t&&t.isBase64?(0,l.R)(t.data):null}function X(e){return(0,l.s)(e).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const ee=/^data:(.*?)(;base64)?,(.*)$/;function te(e){const t=e.match(ee);if(!t)return null;const[,r,n,s]=t;return{mediaType:r,isBase64:!!n,data:s}}function re(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}async function ne(e){return(await fetch(e)).blob()}function se(e){const t=Q(e);if(!t)return null;const r=te(e);return new Blob([t],{type:r.mediaType})}function oe(e,t){!function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}(e,t)}function ie(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function ae(e){return null!=e&&h.test(e)}function ce(e){return null!=e&&g.test(e)||"https"===A.scheme&&ie(e)}function le(e){return ie(e)?`https:${e}`:e.replace(p,"https:")}function ue(){return"https"===A.scheme}function fe(e,t=!1){return ie(e)?e.slice(2):(e=e.replace(h,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function de(e){let t=0;if(V(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function he(e,t){if(!e)return"";const r=T(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(!t?.length)return n;const s=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(s,"")}function pe(e){return e.endsWith("/")?e:`${e}/`}function ge(e){return e.replace(/\/+$/,"")}function ye(e,t,r){if(!(t&&r&&e&&V(e)))return e;const n=e.indexOf("//"),s=e.indexOf("/",n+2),o=e.indexOf(":",n+2),i=Math.min(s<0?e.length:s,o<0?e.length:o);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function be(e){return"string"==typeof e?new w(H(e)):(e.scheme||(e.scheme=A.scheme),e)}function me(e,t){const r=T(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function ve(e,t,r){const n=T(e),s=n.query||{};return s[t]=String(r),`${n.path}?${N(s)}`}function _e(e,t){if(!t)return e;const r=T(e),n=r.query||{};for(const[e,r]of Object.entries(t))null!=r&&(n[e]=r);const s=N(n);return s?`${r.path}?${s}`:r.path}function we(e){if(null==e)return null;const t=e.match(Se);return t?t[2]:null}function Oe(e){if(null==e)return null;const t=e.match(Se);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function Ae(e){return"string"==typeof e?te(e)??{data:e}:new Promise(((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(te(n.result)),n.onerror=e=>r(e)}))}const Se=/([^.]*)\.([^\/]*)$/},728:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(40330),s=r(20102),o=r(91460),i=r(50758),a=r(70586),c=r(95330);const l={statsWorker:()=>Promise.all([r.e(1622),r.e(3314),r.e(5712),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8228)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(7096)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(7681),r.e(3656),r.e(9594)]).then(r.bind(r,49594)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(6481),r.e(6459),r.e(749)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(7126),r.e(5983),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(4599),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(4565),r.e(5545),r.e(5967)]).then(r.bind(r,65967)),GeoJSONSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1622),r.e(3314),r.e(9561),r.e(802)]).then(r.bind(r,10802)),Pipeline:()=>Promise.all([r.e(7126),r.e(5983),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(4599),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(4565),r.e(4325),r.e(5545),r.e(7937)]).then(r.bind(r,27937)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(4266),r.e(6122)]).then(r.bind(r,90447)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(6610),r.e(7420),r.e(5850)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(6481),r.e(7681),r.e(3656),r.e(3248)]).then(r.bind(r,73248)),SceneLayerWorker:()=>Promise.all([r.e(3314),r.e(1412)]).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(9805),r.e(4982),r.e(284)]).then(r.bind(r,56456))};var u=r(94362),f=r(17202);const{CLOSE:d,ABORT:h,INVOKE:p,RESPONSE:g,OPEN_PORT:y,ON:b}=u.MessageType;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===u.MessageType.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class v{static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new v(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),v.clients.set(n,r),t.port2}static loadWorker(e){const t=l[e];return t?t():Promise.resolve(null)}constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:d}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r?.signal,o=r?.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,u.jt)();return new Promise(((r,s)=>{if((0,c.Hc)(n))return this._processWork(),void s((0,c.zE)());const l=(0,c.fu)(n,(()=>{const e=this._outJobs.get(i);e&&(this._outJobs.delete(i),this._processWork(),(0,a.hw)(e.abortHandle),this._post({type:h,jobId:i}),s((0,c.zE)()))})),u={resolve:r,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:p,jobId:i,methodName:e,abortable:null!=n},t,o)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:u.MessageType.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),(0,i.kB)((()=>{r.port1.postMessage({type:u.MessageType.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}))}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:y,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,resolver:s}=e;this.invoke(t,r,n).then((e=>s.resolve(e))).catch((e=>s.reject(e)))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{(0,a.hw)(e.abortHandle),e.reject((0,c.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=null,this._client=null,this._schedule=null}_onMessage(e){null!=this._schedule?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,u.QM)(e);if(t)switch(t.type){case g:this._onResponseMessage(t);break;case p:this._invokeQueue.push(t);break;case h:this._onAbortMessage(t);break;case d:this._onCloseMessage();break;case y:this._onOpenPortMessage(t);break;case b:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&v.clients.get(this)===e&&e.destroy(),v.clients.delete(this),e?.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,o=s?new AbortController:null,i=this._inJobs;let a,l=this._client,f=l[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)l=l[e[t]],f=l[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);a=f.call(l,n,{client:this,signal:o?o.signal:null})}catch(e){return void this._post({type:g,jobId:r,error:(0,u.AB)(e)})}(0,c.y8)(a)?(i.set(r,{controller:o,promise:a}),a.then((e=>{i.has(r)&&(i.delete(r),this._post({type:g,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,c.D_)(e)||this._post({type:g,jobId:r,error:(0,u.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:g,jobId:r},a)}_onOpenPortMessage(e){new v(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,o.on)(e.port,"message",(e=>{const s=(0,u.QM)(e);s?.type===u.MessageType.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,o=this._outJobs;if(!o.has(t))return;const i=o.get(t);o.delete(t),this._processWork(),(0,a.hw)(i.abortHandle),r?i.reject(s.Z.fromJSON(JSON.parse(r))):i.resolve(n)}_post(e,t,r){return(0,u.oi)(this._port,e,t,r)}}v.kernelInfo={buildDate:f.r,fullVersion:n.bR,revision:f.$},v.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>a,MessageType:()=>n,QM:()=>l,jt:()=>i,oi:()=>c});var n,s=r(80442);!function(e){e[e.HANDSHAKE=0]="HANDSHAKE",e[e.OPEN=1]="OPEN",e[e.OPENED=2]="OPENED",e[e.RESPONSE=3]="RESPONSE",e[e.INVOKE=4]="INVOKE",e[e.ABORT=5]="ABORT",e[e.CLOSE=6]="CLOSE",e[e.OPEN_PORT=7]="OPEN_PORT",e[e.ON=8]="ON"}(n||(n={}));let o=0;function i(){return o++}function a(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function c(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let i;if(function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(i=u(r.transferList),t.data=r.result):(i=u(o),t.data=r),i){if((0,s.Z)("ff"))for(const r of i)if("byteLength"in r&&r.byteLength>267386880){const r="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case n.INVOKE:throw r;case n.RESPONSE:return void c(e,{type:n.RESPONSE,jobId:t.jobId,error:a(r)})}}e.postMessage(t,i)}else e.postMessage(t)}function l(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||"ArrayBuffer"===e?.constructor?.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>u,bR:()=>c,i8:()=>i,id:()=>a,qh:()=>l});var n=r(80442),s=r(17452),o=r(17202);const i="4.28";let a,c=i;function l(e){a=e}function u(e){const t=a?.findCredential(e);return t?.token?(0,s.ZN)(e,"token",t.token):e}c=`4.28.0-next.${o.r}`,(0,n.Z)("host-webworker")},19745:(e,t,r)=>{"use strict";r.d(t,{P:()=>i,a:()=>o});const n=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,s={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function o(e){const t=e?.match(n);if(!t)return null;const[,r,o,i]=t;if(!r)return null;let a=null,c=null,l=null;const{devext:u,qaext:f,www:d}=s;if(o)if(a=r,i)switch(i.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=u);break;case"qa":({customBaseUrl:c,portalHostname:l}=f);break;default:return null}else({customBaseUrl:c,portalHostname:l}=d);else switch(r.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=u);break;case"qaext":({customBaseUrl:c,portalHostname:l}=f);break;case"www":({customBaseUrl:c,portalHostname:l}=d);break;default:return null}return{customBaseUrl:c,isPortal:!1,portalHostname:l,urlKey:a}}function i(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}},49917:(e,t,r)=>{"use strict";function n(e){const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer}function s(e){const t=new Uint8Array(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}r.d(t,{R:()=>n,s:()=>s})},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>s,r:()=>n});const n="20230722",s="ca3af831d8774825e2ca2ab9c21ac083b14116a4"}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{7:"092fda62b6f62c2e4869",17:"7ec70a250a26bac2072d",24:"58e11ca7c6e27e0ece7e",37:"726bb661b9e6998572e7",65:"e1daab40a08af51f7a43",163:"14d6afec657bf93a3d06",223:"2cdbabcbfe32286ec78d",247:"a9f83bbccf3b5f229262",284:"73459ffe698d88d414d0",304:"fd0a91b9e0216cc269c3",448:"823ee9a60a005b52316e",450:"9a5916c66dad91d01d5b",540:"8be617f74c57a6dc29eb",565:"9124f0d6c09a71aa8091",576:"c5c56b6d99db96a6755a",639:"3048157f4f13d22c1753",749:"ef9a9a7d66d818720e20",802:"7fbdfd1527582c52f9b6",819:"d1ead6e8aa7e8e21fbc6",822:"408b790d24bea4181ede",824:"f3b458f55236566c940b",853:"182d6d264c27cba0679e",889:"550a2e7fcb68146e3689",1007:"212d98dbaf50df1cb087",1073:"4baee613a82f44a3cd0f",1074:"5f675c8eeb5b2fb0aa0b",1158:"8c72fec5fdcbbc628b30",1194:"8935745c296670d84d6f",1231:"b43c55fbb35dbcff2b69",1412:"c65fa970eddd27b00106",1421:"93e17ab3bc56ceea928d",1423:"f35cbf3ce31a43bb9cbf",1433:"4d5bdf18feeb9c8cb6ff",1444:"c900e747e9488fdce7e1",1534:"3bbaa78c68a4bf159722",1537:"3a0349c79551a03c2d8e",1596:"a4fa40dc77e116c954ac",1622:"9f5337a80963e0b3c009",1773:"eb4eec67a4b9f39a3948",1790:"61f7facac9a8da5ea462",1888:"1bf00dd4b71c9ea16578",1900:"f6040205c50e2795a1a0",1965:"acb59ff3f59d8e6bf465",2134:"c16ec2f614844b3191c0",2220:"a54ec9929a7db879d5db",2462:"5f36b5fe1ee4194a4824",2594:"040b3fc9c9c0736dd893",2637:"1e7c026ad549cb119e73",2664:"8b72cd9340e8a44358ac",2906:"870a05451e074b58f19a",3025:"c8d5c320072f09a40322",3027:"52731ab6856abb7cb5fd",3230:"ddc393a012588f799f42",3248:"cb763c42379341b94d1e",3314:"f4549e1a149324297fa7",3422:"c8e656cd470a17f538e9",3529:"88038ad401e5ec02f4d3",3582:"3d6ff8497c0acda3cb00",3656:"067d3d45caeaaba18d81",3852:"f0c62bb406bb93b1408a",3887:"d86ec98a0582cd3dfe8c",3919:"fdd6403a8390d629392b",3992:"e6785027a0f532f08ed3",4166:"8d324c861a68d45f34f3",4202:"32d940b2c891bf6ff9a2",4266:"ea478f2f4a19463e13fd",4325:"953407451813f406fdf1",4358:"4a2a0091cd830b6a1729",4371:"d81bd0907650a0378b7a",4466:"99a5a434e0bad48c7a5c",4475:"48a8d5e763ea9a30d399",4499:"0914b513579eb5ca515b",4547:"fdcb37a99392c348cc3f",4565:"1747cb9ee7b0674aaa64",4578:"b08f2a4aa94087c6c367",4599:"190b199406878e9491e9",4609:"308f3811dfa71f619279",4695:"b8a45b28a915a423d09d",4720:"02ab4779c6c8f1950c7d",4727:"ce7f575a6c2053c7ca17",4788:"da17d217222d6aee4c3e",4828:"9c133fd8c1fbd0295b86",4885:"256a82f6f6e1405fbcc6",4982:"740dc67038f554431f1b",4998:"d61506497275bafba384",5235:"f073ed545e8380be2091",5242:"8f9178c50c707746e859",5243:"212417c115cd1b21b94d",5245:"82dfbc175b52c7a10475",5329:"0e21e5b4d065567a6a91",5334:"80bf6cf1bef17215bca4",5389:"d08800a30b1227591986",5481:"de3baa85b1639c25458d",5545:"8c5a8c1dfb086069bb06",5575:"b8171b4c6f3b37e367ce",5642:"5e4dde2886a1027b4b96",5660:"697d5e58feafe98cf3ed",5712:"eba197e45507f56f3ed0",5732:"83f7e22a12d90ef93e62",5837:"277a477446d6644aada6",5850:"0b5eeec0f66c87a46a0c",5935:"60a08ce29d09cb07ef06",5967:"730eb7e5f617fdab4f10",5983:"1c4475057483041418c3",6004:"c0e12f6a7bb2360e4c21",6122:"33f169fdf3c41d36e00a",6124:"5ae63d31468222841d62",6138:"db9a303ee0468d018def",6233:"766f397dfdfbc0eb72d1",6237:"8a7fa4e8b0d14da7c9eb",6261:"98c2445fd3cd5d200a6d",6399:"c9dfe3fe8c17406a7223",6459:"50b17799f1abce982a19",6481:"f6c39edd04cb96d98240",6569:"72efc3074d9e6b7eb3ad",6610:"0dccbc6c2559fdc0c2ad",6695:"0d805fd9cd9ff3a636ca",6710:"1fc3b526e881ada30420",6774:"0f04978e8342d9a35e59",6841:"d9fe6cfbc9ad2920ca9c",6946:"8ef26aac0fe7feb8c324",7096:"5ae325e6a795c72eac6c",7126:"e0499f45b098450b80b4",7153:"0cad2b991d0d0fd07846",7215:"42173ec8bdbde9fb029e",7374:"2216e299488d8a5a7cc8",7420:"4481d1103363434f16da",7446:"675e16d99758e67e5f51",7476:"7cab61c9e09580520990",7528:"d0e203405f95e14b1399",7681:"da01e520a1ae0048e73e",7794:"9cddb504079d396779ea",7845:"3cf748c025f3936c1cb2",7873:"b2d4a56197dcabdbae35",7937:"e66cea26064ba8353af0",8008:"88d63d1e56732d148f67",8024:"14a6067d462b75794d24",8062:"1edd2647343dcf611c30",8079:"8bd5f94f7398b3601ddf",8092:"f1b26b73101210b8f29c",8096:"0a6297f5ccffd392b27a",8153:"2c57c9bd71637c5bed8a",8159:"afc5b84693757fda2bc8",8228:"e5352dc8983d06d4ee0f",8522:"b7770bb3ddbab2024027",8598:"e988b4ef78c4987395a6",8636:"0af18a96cbd4e2d35436",8758:"ebd006fcd568a7731115",8828:"4922a0fed7cbc6895882",8855:"807742f38885fa90b4fe",8949:"dabd889e064c4e7807fa",9059:"901d3f5f1a33c4855e32",9169:"cfad34c949cbe8a31ef8",9206:"d8e58dc14d3495f0830c",9238:"f0c9df0089a05da2b613",9243:"6c519c5a474f51f37af0",9291:"75ac2302859b0486763b",9296:"1ae96fc797d69e76af34",9370:"3b0e6836df29ba54bebd",9561:"0bd95f46a0a9005a19f9",9594:"1535423349f7eee694bc",9717:"2f9aec2238ff6cb99e09",9790:"0652f6a8d5221e978033",9805:"a3a1d4f32e518e97d071",9880:"38ebd270e6ffa60791bb",9884:"68b0e0aa33880bc1ba77",9904:"e05b54a0b834b4e4268e",9931:"b0571b9e602218cdc7aa",9971:"2d9d80b2d0042a9c09fb"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&!e;)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[s,o,i]=t;for(var a in o)r.o(o,a)&&(r.m[a]=o[a]);for(i&&i(r);s.length;)e[s.pop()]=1;n(t)}})(),r(88277);var n=r(728);RemoteClient=n})();
package/interfaces.d.ts CHANGED
@@ -4135,7 +4135,7 @@ declare namespace __esri {
4135
4135
  *
4136
4136
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-RelationshipElement.html#relationshipId)
4137
4137
  */
4138
- readonly relationshipId: number;
4138
+ relationshipId: number;
4139
4139
  /**
4140
4140
  * Indicates the type of form [element](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-Element.html).
4141
4141
  *
@@ -4186,6 +4186,12 @@ declare namespace __esri {
4186
4186
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-RelationshipElement.html#orderByFields)
4187
4187
  */
4188
4188
  orderByFields?: RelatedRecordsInfoFieldOrderProperties[];
4189
+ /**
4190
+ * The numeric id value for the defined relationship.
4191
+ *
4192
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-RelationshipElement.html#relationshipId)
4193
+ */
4194
+ relationshipId?: number;
4189
4195
  /**
4190
4196
  * Indicates the type of form [element](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-Element.html).
4191
4197
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.28.0-next.20230721",
3
+ "version": "4.28.0-next.20230722",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- const a="20230721",c="a4e92705f4bad5264352c8d8caa33f00252a6002";export{a as buildDate,c as commitHash};
5
+ const a="20230722",c="ca3af831d8774825e2ca2ab9c21ac083b14116a4";export{a as buildDate,c as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{g as e,h as t,r as s,s as a}from"../../../../chunks/mat3.js";import{c as r}from"../../../../chunks/mat3f32.js";import{BucketType as i}from"./enums.js";import{CircleRenderBucket as o,SymbolRenderBucket as h,LineRenderBucket as n,FillRenderBucket as l}from"./RenderBucket.js";import{FADE_DURATION as y}from"./decluttering/config.js";import{TiledDisplayObject as c}from"../webgl/TiledDisplayObject.js";class d extends c{constructor(e,t,s,a,r,i,o,h=null){super(e,t,s,a,r,i,4096,4096),this.styleRepository=o,this._memCache=h,this.type="vector-tile",this._referenced=0,this._hasSymbolBuckets=!1,this._memoryUsedByLayerData=0,this.layerData=new Map,this.layerCount=0,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this._processed=!1,this._referenced=1,this.id=e.id}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<y}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<y)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e)if(this.layerData.has(s)){const e=this.layerData.get(s);this._memoryUsedByLayerData-=e.memoryUsed,e.type===i.SYMBOL&&this.symbols.has(s)&&(this.symbols.delete(s),t=!0),e.destroy(),this.layerData.delete(s),this.layerCount--}this._memCache?.updateSize(this.key.id,this,this._memoryUsedByLayerData),t&&this.emit("symbols-changed"),this.requestRender()}processed(){return this._processed}hasData(){return this.layerCount>0}dispose(){"unloaded"!==this.status&&(m.delete(this),d._destroyRenderBuckets(this.layerData),this.layerData=null,this.layerCount=0,this._memoryUsedByLayerData=0,this.destroy(),this.status="unloaded")}release(){return 0==--this._referenced&&(this.dispose(),this.stage=null,!0)}retain(){++this._referenced}get referenced(){return this._referenced}get memoryUsed(){return this._memoryUsedByLayerData+256}changeDataImpl(e){let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:a}=e,r=this._createRenderBuckets(s);if(a&&a.byteLength>0){const e=new Uint32Array(a);for(const t of e)this._deleteLayerData(t)}for(const[e,o]of r)this._deleteLayerData(e),o.type===i.SYMBOL&&(this.symbols.set(e,o.symbols),t=!0),this._memoryUsedByLayerData+=o.memoryUsed,this.layerData.set(e,o),this.layerCount++;this._memCache?.updateSize(this.key.id,this,this.memoryUsed)}this._hasSymbolBuckets=!1;for(const[s,a]of this.layerData)a.type===i.SYMBOL&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(r){super.setTransform(r);const i=this.resolution/(r.resolution*r.pixelRatio),o=this.width/this.rangeX*i,h=this.height/this.rangeY*i,n=[0,0];r.toScreen(n,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;e(l),t(l,l,n),s(l,l,Math.PI*r.rotation/180),a(l,l,[o,h,1])}_createTransforms(){return{dvs:r(),tileMat3:r(),tileUnitsToPixels:r()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;e.forEach((e=>{t.has(e)||(e.destroy(),t.add(e))})),e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const a of e){const e=this._deserializeBucket(a,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case i.FILL:s=new l(e,this.styleRepository);break;case i.LINE:s=new n(e,this.styleRepository);break;case i.SYMBOL:s=new h(e,this.styleRepository,this);break;case i.CIRCLE:s=new o(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._memoryUsedByLayerData-=t.memoryUsed,t.destroy(),this.layerData.delete(e),this.layerCount--}}const m=new Map;function u(){m.forEach(((e,t)=>{console.log(`\n${t.key}:`),e[0].forEach((e=>console.log(e))),console.log("========"),e[1].forEach((e=>console.log(e)))}))}export{d as VectorTile,u as printAllocations};
5
+ import"../../../../core/has.js";import{g as e,h as t,r as s,s as a}from"../../../../chunks/mat3.js";import{c as r}from"../../../../chunks/mat3f32.js";import{BucketType as i}from"./enums.js";import{CircleRenderBucket as o,SymbolRenderBucket as h,LineRenderBucket as n,FillRenderBucket as l}from"./RenderBucket.js";import{FADE_DURATION as c}from"./decluttering/config.js";import{TiledDisplayObject as y}from"../webgl/TiledDisplayObject.js";class d extends y{constructor(e,t,s,a,r,i,o,h=null){super(e,t,s,a,r,i,4096,4096),this.styleRepository=o,this._memCache=h,this.type="vector-tile",this._referenced=0,this._hasSymbolBuckets=!1,this._memoryUsedByLayerData=0,this.layerData=new Map,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this._processed=!1,this._referenced=1,this.id=e.id}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<c}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<c)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e){const e=this.layerData.get(s);e&&(this._memoryUsedByLayerData-=e.memoryUsed,e.type===i.SYMBOL&&this.symbols.delete(s)&&(t=!0),e.destroy(),this.layerData.delete(s))}this._memCache?.updateSize(this.key.id,this,this._memoryUsedByLayerData),t&&this.emit("symbols-changed"),this.requestRender()}processed(){return this._processed}hasData(){return this.layerData.size>0}dispose(){"unloaded"!==this.status&&(m.delete(this),d._destroyRenderBuckets(this.layerData),this.layerData=null,this._memoryUsedByLayerData=0,this.destroy(),this.status="unloaded")}release(){return 0==--this._referenced&&(this.dispose(),this.stage=null,!0)}retain(){++this._referenced}get referenced(){return this._referenced}get memoryUsed(){return this._memoryUsedByLayerData+256}changeDataImpl(e){let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:a}=e,r=this._createRenderBuckets(s);if(a&&a.byteLength>0){const e=new Uint32Array(a);for(const t of e)this._deleteLayerData(t)}for(const[e,o]of r)this._deleteLayerData(e),o.type===i.SYMBOL&&(this.symbols.set(e,o.symbols),t=!0),this._memoryUsedByLayerData+=o.memoryUsed,this.layerData.set(e,o);this._memCache?.updateSize(this.key.id,this,this.memoryUsed)}this._hasSymbolBuckets=!1;for(const[s,a]of this.layerData)a.type===i.SYMBOL&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(r){super.setTransform(r);const i=this.resolution/(r.resolution*r.pixelRatio),o=this.width/this.rangeX*i,h=this.height/this.rangeY*i,n=[0,0];r.toScreen(n,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;e(l),t(l,l,n),s(l,l,Math.PI*r.rotation/180),a(l,l,[o,h,1])}_createTransforms(){return{dvs:r(),tileMat3:r(),tileUnitsToPixels:r()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;for(const s of e.values())t.has(s)||(s.destroy(),t.add(s));e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const a of e){const e=this._deserializeBucket(a,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case i.FILL:s=new l(e,this.styleRepository);break;case i.LINE:s=new n(e,this.styleRepository);break;case i.SYMBOL:s=new h(e,this.styleRepository,this);break;case i.CIRCLE:s=new o(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._memoryUsedByLayerData-=t.memoryUsed,t.destroy(),this.layerData.delete(e)}}const m=new Map;function u(){m.forEach(((e,t)=>{console.log(`\n${t.key}:`),e[0].forEach((e=>console.log(e))),console.log("========"),e[1].forEach((e=>console.log(e)))}))}export{d as VectorTile,u as printAllocations};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{createResolver as e}from"../../../../core/promiseUtils.js";import{create as t}from"../../../../geometry/support/aaBoundingRect.js";import{SymbolFader as s}from"./decluttering/SymbolFader.js";import{Visibility as r,StyleLayerType as i}from"./style/StyleDefinition.js";import{WGLDrawPhase as l}from"../webgl/enums.js";import{RenderableTile as o}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import a from"../../tiling/TileCoverage.js";import d from"../../tiling/TileKey.js";import{StencilOperation as h,CompareFunction as c,BlendFactor as u}from"../../../webgl/enums.js";const y=1e-6;function p(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||s.getValue()!==r.NONE&&(void 0===e.minzoom||e.minzoom<t+y)&&(void 0===e.maxzoom||e.maxzoom>=t-y))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._pointToCallbacks=new Map}destroy(){this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null),this._styleRepository=null,this._backgroundTiles=[],this._pointToCallbacks.clear()}setStyleResources(e,t,r){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,null==this._symbolFader){const e=new s(this._styleRepository,this.children);e.on("fade-start",(()=>{this.emit("fade-start"),this.requestRender()})),e.on("fade-complete",(()=>{this.emit("fade-complete"),this.requestRender()})),this._symbolFader=e}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}async hitTest(t){const s=e();return this._pointToCallbacks.set(t,s),this.requestRender(),s.promise}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic,hasClipping:!!this._clippingInfos}}doRender(e){!this.visible||e.drawPhase!==l.MAP&&e.drawPhase!==l.DEBUG||void 0===this._spriteMosaic||super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;if(t!==l.DEBUG){if(this._doRender(e),this._pointToCallbacks.size>0){e.drawPhase=l.HITTEST;const s=e.painter.effects.hittestVTL;s.bind(e),this._doRender(e),s.draw(e,this._pointToCallbacks),s.unbind(e),e.drawPhase=t}}else super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter((e=>e.neededForCoverage&&e.hasData()))}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t}=e,s=this._styleRepository;if(!s)return;const r=s.layers;let i=!0;e.drawPhase===l.HITTEST&&(i=!1),s.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,s.backgroundBucketIds)),super.renderChildren(e),e.drawPhase===l.MAP&&this._fade(e.displayLevel,e.state);const o=this.children.filter((e=>e.visible&&e.hasData()));if(!o||0===o.length)return t.bindVAO(),t.setStencilTestEnabled(!0),void t.setBlendingEnabled(!0);for(const l of o)l.triangleCount=0;t.setStencilWriteMask(0),t.setColorMask(!0,!0,!0,!0),t.setStencilOp(h.KEEP,h.KEEP,h.REPLACE),t.setStencilTestEnabled(!0),t.setBlendingEnabled(!1),t.setDepthTestEnabled(!0),t.setDepthWriteEnabled(!0),t.setDepthFunction(c.LEQUAL),t.setClearDepth(1),t.clear(t.gl.DEPTH_BUFFER_BIT),e.renderPass="opaque";for(let l=r.length-1;l>=0;l--)this._renderStyleLayer(r[l],e,o);t.setDepthWriteEnabled(!1),t.setBlendingEnabled(i),t.setBlendFunctionSeparate(u.ONE,u.ONE_MINUS_SRC_ALPHA,u.ONE,u.ONE_MINUS_SRC_ALPHA),e.renderPass="translucent";for(let l=0;l<r.length;l++)this._renderStyleLayer(r[l],e,o);t.bindVAO(),t.setStencilTestEnabled(!0),t.setBlendingEnabled(!0)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{painter:l,renderPass:o}=t;if(void 0===e)return;const n=e.getLayoutProperty("visibility");if(n&&n.getValue()===r.NONE)return;let a;switch(e.type){case i.BACKGROUND:return;case i.FILL:if("opaque"!==o&&"translucent"!==t.renderPass)return;a="vtlFill";break;case i.LINE:if("translucent"!==o)return;a="vtlLine";break;case i.CIRCLE:if("translucent"!==o)return;a="vtlCircle";break;case i.SYMBOL:if("translucent"!==o)return;a="vtlSymbol"}if(s=e.type===i.SYMBOL?s.filter((e=>e.decluttered)):s.filter((e=>e.neededForCoverage)),"vtlSymbol"!==a){const r=t.displayLevel;if(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+y||void 0!==e.maxzoom&&e.maxzoom<r-y)return}const d=e.uid;t.styleLayerUID=d,t.styleLayer=e;for(const r of s)if(r.layerData.has(d)){l.renderObjects(t,s,a);break}}_renderBackgroundLayers(e,s){const{context:r,displayLevel:n,painter:u,state:y}=e,m=this._styleRepository;let _=!1;for(const t of s){if(m.getLayerById(t).type===i.BACKGROUND&&p(m.getLayerById(t),n)){_=!0;break}}if(!_)return;const f=this._tileInfoView.getTileCoverage(e.state,0,!0,"smallest"),{spans:b,lodInfo:g}=f,{level:T}=g,E=t(),C=[];if(this._renderPasses){const t=this._renderPasses[0];null!=this._clippingInfos&&(t.brushes[0].prepareState(e),t.brushes[0].drawMany(e,this._clippingInfos))}const L=this._backgroundTiles;let R,v=0;for(const{row:i,colFrom:l,colTo:a}of b)for(let e=l;e<=a;e++){if(v<L.length)R=L[v],R.key.set(T,i,g.normalizeCol(e),g.getWorldForColumn(e)),this._tileInfoView.getTileBounds(E,R.key,!1),R.x=E[0],R.y=E[3],R.resolution=this._tileInfoView.getTileResolution(T);else{const s=new d(T,i,g.normalizeCol(e),g.getWorldForColumn(e)),r=this._tileInfoView.getTileBounds(t(),s),l=this._tileInfoView.getTileResolution(T);R=new o(s,l,r[0],r[3],512,512,4096,4096),L.push(R)}R.setTransform(y),C.push(R),v++}r.setStencilWriteMask(0),r.setColorMask(!0,!0,!0,!0),r.setStencilOp(h.KEEP,h.KEEP,h.REPLACE),r.setStencilFunction(c.EQUAL,0,255);let S=!0;e.drawPhase===l.HITTEST&&(S=!1),r.setStencilTestEnabled(S);for(const t of s){const s=m.getLayerById(t);s.type===i.BACKGROUND&&p(s,n)&&(e.styleLayerUID=s.uid,e.styleLayer=s,u.renderObjects(e,C,"vtlBackground"))}a.pool.release(f)}}export{m as VectorTileContainer};
5
+ import{createResolver as e}from"../../../../core/promiseUtils.js";import{create as t}from"../../../../geometry/support/aaBoundingRect.js";import{SymbolFader as s}from"./decluttering/SymbolFader.js";import{Visibility as r,StyleLayerType as i}from"./style/StyleDefinition.js";import{WGLDrawPhase as l}from"../webgl/enums.js";import{RenderableTile as o}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import a from"../../tiling/TileCoverage.js";import d from"../../tiling/TileKey.js";import{StencilOperation as h,CompareFunction as c,BlendFactor as u}from"../../../webgl/enums.js";const y=1e-6;function p(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||s.getValue()!==r.NONE&&(void 0===e.minzoom||e.minzoom<t+y)&&(void 0===e.maxzoom||e.maxzoom>=t-y))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._pointToCallbacks=new Map}destroy(){this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null),this._styleRepository=null,this._backgroundTiles=[],this._pointToCallbacks.clear()}get fading(){return this._symbolFader?.fading??!1}setStyleResources(e,t,r){this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,null==this._symbolFader&&(this._symbolFader=new s(this._styleRepository,this.children)),this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}async hitTest(t){const s=e();return this._pointToCallbacks.set(t,s),this.requestRender(),s.promise}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic,hasClipping:!!this._clippingInfos}}doRender(e){!this.visible||e.drawPhase!==l.MAP&&e.drawPhase!==l.DEBUG||void 0===this._spriteMosaic||super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;if(t!==l.DEBUG){if(this._doRender(e),this._pointToCallbacks.size>0){e.drawPhase=l.HITTEST;const s=e.painter.effects.hittestVTL;s.bind(e),this._doRender(e),s.draw(e,this._pointToCallbacks),s.unbind(e),e.drawPhase=t}}else super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter((e=>e.neededForCoverage&&e.hasData()))}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t}=e,s=this._styleRepository;if(!s)return;const r=s.layers;let i=!0;e.drawPhase===l.HITTEST&&(i=!1),s.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,s.backgroundBucketIds)),super.renderChildren(e),e.drawPhase===l.MAP&&this._fade(e.displayLevel,e.state);const o=this.children.filter((e=>e.visible&&e.hasData()));if(!o||0===o.length)return t.bindVAO(),t.setStencilTestEnabled(!0),void t.setBlendingEnabled(!0);for(const l of o)l.triangleCount=0;t.setStencilWriteMask(0),t.setColorMask(!0,!0,!0,!0),t.setStencilOp(h.KEEP,h.KEEP,h.REPLACE),t.setStencilTestEnabled(!0),t.setBlendingEnabled(!1),t.setDepthTestEnabled(!0),t.setDepthWriteEnabled(!0),t.setDepthFunction(c.LEQUAL),t.setClearDepth(1),t.clear(t.gl.DEPTH_BUFFER_BIT),e.renderPass="opaque";for(let l=r.length-1;l>=0;l--)this._renderStyleLayer(r[l],e,o);t.setDepthWriteEnabled(!1),t.setBlendingEnabled(i),t.setBlendFunctionSeparate(u.ONE,u.ONE_MINUS_SRC_ALPHA,u.ONE,u.ONE_MINUS_SRC_ALPHA),e.renderPass="translucent";for(let l=0;l<r.length;l++)this._renderStyleLayer(r[l],e,o);t.bindVAO(),t.setStencilTestEnabled(!0),t.setBlendingEnabled(!0)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{painter:l,renderPass:o}=t;if(void 0===e)return;const n=e.getLayoutProperty("visibility");if(n&&n.getValue()===r.NONE)return;let a;switch(e.type){case i.BACKGROUND:return;case i.FILL:if("opaque"!==o&&"translucent"!==t.renderPass)return;a="vtlFill";break;case i.LINE:if("translucent"!==o)return;a="vtlLine";break;case i.CIRCLE:if("translucent"!==o)return;a="vtlCircle";break;case i.SYMBOL:if("translucent"!==o)return;a="vtlSymbol"}if(s=e.type===i.SYMBOL?s.filter((e=>e.decluttered)):s.filter((e=>e.neededForCoverage)),"vtlSymbol"!==a){const r=t.displayLevel;if(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+y||void 0!==e.maxzoom&&e.maxzoom<r-y)return}const d=e.uid;t.styleLayerUID=d,t.styleLayer=e;for(const r of s)if(r.layerData.has(d)){l.renderObjects(t,s,a);break}}_renderBackgroundLayers(e,s){const{context:r,displayLevel:n,painter:u,state:y}=e,m=this._styleRepository;let _=!1;for(const t of s){if(m.getLayerById(t).type===i.BACKGROUND&&p(m.getLayerById(t),n)){_=!0;break}}if(!_)return;const b=this._tileInfoView.getTileCoverage(e.state,0,!0,"smallest"),{spans:f,lodInfo:g}=b,{level:T}=g,E=t(),C=[];if(this._renderPasses){const t=this._renderPasses[0];null!=this._clippingInfos&&(t.brushes[0].prepareState(e),t.brushes[0].drawMany(e,this._clippingInfos))}const L=this._backgroundTiles;let v,F=0;for(const{row:i,colFrom:l,colTo:a}of f)for(let e=l;e<=a;e++){if(F<L.length)v=L[F],v.key.set(T,i,g.normalizeCol(e),g.getWorldForColumn(e)),this._tileInfoView.getTileBounds(E,v.key,!1),v.x=E[0],v.y=E[3],v.resolution=this._tileInfoView.getTileResolution(T);else{const s=new d(T,i,g.normalizeCol(e),g.getWorldForColumn(e)),r=this._tileInfoView.getTileBounds(t(),s),l=this._tileInfoView.getTileResolution(T);v=new o(s,l,r[0],r[3],512,512,4096,4096),L.push(v)}v.setTransform(y),C.push(v),F++}r.setStencilWriteMask(0),r.setColorMask(!0,!0,!0,!0),r.setStencilOp(h.KEEP,h.KEEP,h.REPLACE),r.setStencilFunction(c.EQUAL,0,255);let S=!0;e.drawPhase===l.HITTEST&&(S=!1),r.setStencilTestEnabled(S);for(const t of s){const s=m.getLayerById(t);s.type===i.BACKGROUND&&p(s,n)&&(e.styleLayerUID=s.uid,e.styleLayer=s,u.renderObjects(e,C,"vtlBackground"))}a.pool.release(b)}}export{m as VectorTileContainer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../../core/Evented.js";import{DECLUTTER_BUDGET as e,FADE_DURATION as i}from"./config.js";import{VTLUniqueSymbol as s}from"./core.js";import{CollisionJob as o}from"./jobs.js";import{SymbolDeclutterer as l}from"./SymbolDeclutterer.js";import{SymbolRepository as r}from"./SymbolRepository.js";import{writeOpacityToBuffers as a}from"./util.js";import{Visibility as h}from"../style/StyleDefinition.js";const c=.5,n=1e-6;class _ extends t{constructor(t,e){super(),this.styleRepository=t,this._tileToHandle=new Map,this._viewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._declutterViewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._completed=!1,this._symbolRepository=new r(4096,e,(()=>new s)),this._symbolDeclutterer=new l(e,this._symbolRepository,((t,e,i)=>new o(t,e,i,this.styleRepository,this._zoom,this._viewState.rotation)),((t,e)=>{t.allSymbolsFadingOut=!0,t.lastOpacityUpdate=e,a(t,e,!0),t.decluttered=!0,t.requestRender()}),((t,e)=>this.styleRepository.getStyleLayerByUID(t.styleLayerUID).z-this.styleRepository.getStyleLayerByUID(e.styleLayerUID).z),(t=>{const e=this.styleRepository.getStyleLayerByUID(t);if(this._zoom+n<e.minzoom||this._zoom-n>=e.maxzoom)return!1;const i=e.getLayoutProperty("visibility");return!i||i.getValue()!==h.NONE}))}addTile(t){t.decluttered=!1,this._tileToHandle.set(t,t.on("symbols-changed",(()=>{this._symbolRepository.add(t),this.restartDeclutter()}))),this._symbolRepository.add(t),this.restartDeclutter()}removeTile(t){const e=this._tileToHandle.get(t);e&&(this._symbolRepository.removeTile(t),this.restartDeclutter(),e.remove(),this._tileToHandle.delete(t))}update(t,e){return this._zoom=t,this._viewState={scale:e.scale,rotation:e.rotation,center:[e.center[0],e.center[1]],size:[e.size[0],e.size[1]]},this._continueDeclutter(),this._completed}restartDeclutter(){this._completed=!1,this._symbolDeclutterer.restart(),this._notifyUnstable()}clear(){this._completed=!1,this._symbolRepository=null,this._symbolDeclutterer.restart(),this._tileToHandle.forEach((t=>t.remove())),this._tileToHandle.clear()}get stale(){return this._zoom!==this._declutterZoom||this._viewState.size[0]!==this._declutterViewState.size[0]||this._viewState.size[1]!==this._declutterViewState.size[1]||this._viewState.scale!==this._declutterViewState.scale||this._viewState.rotation!==this._declutterViewState.rotation}deleteStyleLayers(t){this._symbolRepository.deleteStyleLayers(t)}_continueDeclutter(){this._completed&&!this.stale||(this._symbolDeclutterer.running||(this._declutterZoom=this._zoom,this._declutterViewState.center[0]=this._viewState.center[0],this._declutterViewState.center[1]=this._viewState.center[1],this._declutterViewState.rotation=this._viewState.rotation,this._declutterViewState.scale=this._viewState.scale,this._declutterViewState.size[0]=this._viewState.size[0],this._declutterViewState.size[1]=this._viewState.size[1],this._symbolDeclutterer.restart()),this._symbolDeclutterer.setScreenSize(this._viewState.size[0],this._viewState.size[1]),this._completed=this._symbolDeclutterer.continue(e),this._completed&&this._scheduleNotifyStable())}_scheduleNotifyStable(){null!=this._stableNotificationHandle&&clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=setTimeout((()=>{this._stableNotificationHandle=null,this.emit("fade-complete")}),(1+c)*i)}_notifyUnstable(){null!=this._stableNotificationHandle&&(clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=null),this.emit("fade-start")}}export{_ as SymbolFader};
5
+ import{signal as t}from"../../../../../core/signal.js";import{DECLUTTER_BUDGET as e,FADE_DURATION as i}from"./config.js";import{VTLUniqueSymbol as s}from"./core.js";import{CollisionJob as o}from"./jobs.js";import{SymbolDeclutterer as l}from"./SymbolDeclutterer.js";import{SymbolRepository as r}from"./SymbolRepository.js";import{writeOpacityToBuffers as a}from"./util.js";import{Visibility as h}from"../style/StyleDefinition.js";const n=.5,c=1e-6;class _{constructor(e,i){this.styleRepository=e,this._tileToHandle=new Map,this._viewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._declutterViewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._completed=!1,this._fading=t(!1),this._symbolRepository=new r(4096,i,(()=>new s)),this._symbolDeclutterer=new l(i,this._symbolRepository,((t,e,i)=>new o(t,e,i,this.styleRepository,this._zoom,this._viewState.rotation)),((t,e)=>{t.allSymbolsFadingOut=!0,t.lastOpacityUpdate=e,a(t,e,!0),t.decluttered=!0,t.requestRender()}),((t,e)=>this.styleRepository.getStyleLayerByUID(t.styleLayerUID).z-this.styleRepository.getStyleLayerByUID(e.styleLayerUID).z),(t=>{const e=this.styleRepository.getStyleLayerByUID(t);if(this._zoom+c<e.minzoom||this._zoom-c>=e.maxzoom)return!1;const i=e.getLayoutProperty("visibility");return!i||i.getValue()!==h.NONE}))}get fading(){return this._fading.value}addTile(t){t.decluttered=!1,this._tileToHandle.set(t,t.on("symbols-changed",(()=>{this._symbolRepository.add(t),this.restartDeclutter()}))),this._symbolRepository.add(t),this.restartDeclutter()}removeTile(t){const e=this._tileToHandle.get(t);e&&(this._symbolRepository.removeTile(t),this.restartDeclutter(),e.remove(),this._tileToHandle.delete(t))}update(t,e){return this._zoom=t,this._viewState={scale:e.scale,rotation:e.rotation,center:[e.center[0],e.center[1]],size:[e.size[0],e.size[1]]},this._continueDeclutter(),this._completed}restartDeclutter(){this._completed=!1,this._symbolDeclutterer.restart(),this._notifyUnstable()}clear(){this._completed=!1,this._symbolRepository=null,this._symbolDeclutterer.restart(),this._tileToHandle.forEach((t=>t.remove())),this._tileToHandle.clear()}get stale(){return this._zoom!==this._declutterZoom||this._viewState.size[0]!==this._declutterViewState.size[0]||this._viewState.size[1]!==this._declutterViewState.size[1]||this._viewState.scale!==this._declutterViewState.scale||this._viewState.rotation!==this._declutterViewState.rotation}deleteStyleLayers(t){this._symbolRepository.deleteStyleLayers(t)}_continueDeclutter(){this._completed&&!this.stale||(this._symbolDeclutterer.running||(this._declutterZoom=this._zoom,this._declutterViewState.center[0]=this._viewState.center[0],this._declutterViewState.center[1]=this._viewState.center[1],this._declutterViewState.rotation=this._viewState.rotation,this._declutterViewState.scale=this._viewState.scale,this._declutterViewState.size[0]=this._viewState.size[0],this._declutterViewState.size[1]=this._viewState.size[1],this._symbolDeclutterer.restart()),this._symbolDeclutterer.setScreenSize(this._viewState.size[0],this._viewState.size[1]),this._completed=this._symbolDeclutterer.continue(e),this._completed&&this._scheduleNotifyStable())}_scheduleNotifyStable(){null!=this._stableNotificationHandle&&clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=setTimeout((()=>{this._stableNotificationHandle=null,this._fading.value=!1}),(1+n)*i)}_notifyUnstable(){null!=this._stableNotificationHandle&&(clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=null),this._fading.value=!0}}export{_ as SymbolFader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import{clone as i}from"../../../core/lang.js";import s from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{diff as n,hasDiff as h}from"../../../core/accessorSupport/diffUtils.js";import{create as u}from"../../../geometry/support/aaBoundingRect.js";import{equals as c}from"../../../geometry/support/spatialReferenceUtils.js";import{StyleUpdateType as y}from"../engine/vectorTiles/enums.js";import{TileHandler as p}from"../engine/vectorTiles/TileHandler.js";import{TileManager as _}from"../engine/vectorTiles/TileManager.js";import{VectorTile as d}from"../engine/vectorTiles/VectorTile.js";import{VectorTileContainer as f}from"../engine/vectorTiles/VectorTileContainer.js";import{StyleLayerType as g}from"../engine/vectorTiles/style/StyleDefinition.js";import m from"../engine/vectorTiles/style/StyleRepository.js";import{LayerView2DMixin as T}from"./LayerView2D.js";import C from"../tiling/TileInfoViewPOT.js";import v from"../tiling/TileQueue.js";import R from"../../layers/LayerView.js";let H=class extends(T(R)){constructor(){super(...arguments),this._styleChanges=[],this._fetchQueue=null,this._parseQueue=null,this._tileHandlerPromise=null,this._isTileHandlerReady=!1,this._collisionOverlay=null,this.fading=!1}async hitTest(e,i){if(!this._tileHandlerPromise)return null;await this._tileHandlerPromise;const s=await this._vectorTileContainer.hitTest(i);if(!s||0===s.length)return null;const r=s[0]-1,a=this._styleRepository,l=a.getStyleLayerByUID(r);if(!l)return null;const o=a.getStyleLayerIndex(l.id);return[{type:"graphic",mapPoint:e,layer:this.layer,graphic:new t({attributes:{layerId:o,layerName:l.id,layerUID:r},layer:this.layer,sourceLayer:this.layer})}]}update(e){if(this._tileHandlerPromise&&this._isTileHandlerReady)return e.pixelRatio!==this._tileHandler.devicePixelRatio?(this._start(),void(this._tileHandler.devicePixelRatio=e.pixelRatio)):void(this._styleChanges.length>0?this._tileHandlerPromise=this._applyStyleChanges():(this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.state=e.state,this._parseQueue.state=e.state,this._tileManager.update(e)||this.requestUpdate(),this._parseQueue.resume(),this._fetchQueue.resume()))}attach(){const{style:e}=this.layer.currentStyleInfo;this._styleRepository=new m(e),this._tileInfoView=new C(this.layer.tileInfo,this.layer.fullExtent),this._vectorTileContainer=new f(this._tileInfoView),this._tileHandler=new p(this.layer,this._styleRepository,window.devicePixelRatio||1),this.container.addChild(this._vectorTileContainer),this._start(),this.addAttachHandles([this._vectorTileContainer.on("fade-start",(()=>{this.fading=!0,this.requestUpdate()})),this._vectorTileContainer.on("fade-complete",(()=>{this._collisionOverlay?.requestRender(),this.fading=!1,this.requestUpdate()})),this.layer.on("paint-change",(e=>{if(e.isDataDriven)this._styleChanges.push({type:y.PAINTER_CHANGED,data:e}),this.requestUpdate();else{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=i.type===g.SYMBOL;t.setPaintProperties(e.layer,e.paint),s&&this._vectorTileContainer.restartDeclutter(),this._vectorTileContainer.requestRender()}})),this.layer.on("layout-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=n(i.layout,e.layout);if(null!=s){if(h(s,"visibility")&&1===S(s))return t.setLayoutProperties(e.layer,e.layout),i.type===g.SYMBOL&&this._vectorTileContainer.restartDeclutter(),void this._vectorTileContainer.requestRender();this._styleChanges.push({type:y.LAYOUT_CHANGED,data:e}),this.requestUpdate()}})),this.layer.on("style-layer-visibility-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);i&&(t.setStyleLayerVisibility(e.layer,e.visibility),i.type===g.SYMBOL&&this._vectorTileContainer.restartDeclutter(),this._vectorTileContainer.requestRender())})),this.layer.on("style-layer-change",(e=>{this._styleChanges.push({type:y.LAYER_CHANGED,data:e}),this.requestUpdate()})),this.layer.on("delete-style-layer",(e=>{this._styleChanges.push({type:y.LAYER_REMOVED,data:e}),this.requestUpdate()})),this.layer.on("load-style",(()=>this._loadStyle())),this.layer.on("spriteSource-change",(e=>{this._newSpriteSource=e.spriteSource,this._styleChanges.push({type:y.SPRITES_CHANGED,data:null});const t=this._styleRepository.layers;for(const i of t)switch(i.type){case g.SYMBOL:i.getLayoutProperty("icon-image")&&this._styleChanges.push({type:y.LAYOUT_CHANGED,data:{layer:i.id,layout:i.layout}});break;case g.LINE:i.getPaintProperty("line-pattern")&&this._styleChanges.push({type:y.PAINTER_CHANGED,data:{layer:i.id,paint:i.paint,isDataDriven:i.isPainterDataDriven()}});break;case g.FILL:i.getLayoutProperty("fill-pattern")&&this._styleChanges.push({type:y.PAINTER_CHANGED,data:{layer:i.id,paint:i.paint,isDataDriven:i.isPainterDataDriven()}})}this.requestUpdate()}))])}detach(){this._stop(),this.container.removeAllChildren(),this._vectorTileContainer=r(this._vectorTileContainer),this._tileHandler=r(this._tileHandler)}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this._collisionOverlay&&this._vectorTileContainer.restartDeclutter(),this.requestUpdate()}supportsSpatialReference(e){return c(this.layer.tileInfo?.spatialReference,e)}canResume(){let e=super.canResume();const{currentStyleInfo:t}=this.layer;if(e&&t?.layerDefinition){const i=this.view.scale,{minScale:s,maxScale:r}=t.layerDefinition;t&&t.layerDefinition&&(s&&s<i&&(e=!1),r&&r>i&&(e=!1))}return e}isUpdating(){return this.fading}acquireTile(e){const t=this._createVectorTile(e);return this._updatingHandles.addPromise(this._fetchQueue.push(t.key).then((e=>this._parseQueue.push({key:t.key,data:e}))).then((e=>{t.once("attach",(()=>this.requestUpdate())),t.setData(e),this.requestUpdate()})).catch((e=>{a(e)||s.getLogger(this).error(e)}))),t}releaseTile(e){const t=e.key.id;this._fetchQueue.abort(t),this._parseQueue.abort(t),this.requestUpdate()}_start(){if(this._stop(),this._tileManager=new _({acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView},this._vectorTileContainer),!this.layer.currentStyleInfo)return;const e=new AbortController,t=this._tileHandler.start({signal:e.signal}).then((()=>{this._fetchQueue=new v({tileInfoView:this._tileInfoView,process:(e,t)=>this._getTileData(e,t),concurrency:15}),this._parseQueue=new v({tileInfoView:this._tileInfoView,process:(e,t)=>this._parseTileData(e,t),concurrency:8}),this.requestUpdate(),this._isTileHandlerReady=!0}));this._tileHandler.spriteMosaic.then((e=>{this._vectorTileContainer.setStyleResources(e,this._tileHandler.glyphMosaic,this._styleRepository),this.requestUpdate()})),this._tileHandlerAbortController=e,this._tileHandlerPromise=t}_stop(){if(!this._tileHandlerAbortController||!this._vectorTileContainer)return;const e=this._tileHandlerAbortController;e&&e.abort(),this._tileHandlerPromise=null,this._isTileHandlerReady=!1,this._fetchQueue=r(this._fetchQueue),this._parseQueue=r(this._parseQueue),this._tileManager=r(this._tileManager),this._vectorTileContainer.removeAllChildren()}async _getTileData(e,t){return this._tileHandler.fetchTileData(e,t)}async _parseTileData(e,t){return this._tileHandler.parseTileData(e,t)}async _applyStyleChanges(){this._isTileHandlerReady=!1,this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.clear(),this._parseQueue.clear(),this._tileManager.clearCache();const e=this._styleChanges;try{await this._tileHandler.updateStyle(e)}catch(o){s.getLogger(this).error("error applying vector-tiles style update",o.message),this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0}const t=this._styleRepository,i=[];e.forEach((e=>{if(e.type!==y.LAYER_REMOVED)return;const s=e.data,r=t.getLayerById(s.layer);r&&i.push(r.uid)}));const r=[];let a;e.forEach((e=>{const i=e.type,s=e.data;switch(i){case y.PAINTER_CHANGED:t.setPaintProperties(s.layer,s.paint),a=s.layer;break;case y.LAYOUT_CHANGED:t.setLayoutProperties(s.layer,s.layout),a=s.layer;break;case y.LAYER_REMOVED:return void t.deleteStyleLayer(s.layer);case y.LAYER_CHANGED:t.setStyleLayer(s.layer,s.index),a=s.layer.id;break;case y.SPRITES_CHANGED:this._vectorTileContainer.setSpriteMosaic(this._tileHandler.setSpriteSource(this._newSpriteSource)),this._newSpriteSource=null,a=null}const l=t.getLayerById(a);l&&r.push(l.uid)}));const l=this._vectorTileContainer.children;if(i.length>0){this._vectorTileContainer.deleteStyleLayers(i);for(const e of l)e.deleteLayerData(i)}if(this._fetchQueue.resume(),this._parseQueue.resume(),r.length>0){const e=[];for(const t of l){const i=this._updatingHandles.addPromise(this._fetchQueue.push(t.key).then((e=>this._parseQueue.push({key:t.key,data:e,styleLayerUIDs:r}))).then((e=>t.setData(e))));e.push(i)}await Promise.all(e)}this._styleChanges=[],this._isTileHandlerReady=!0,this.requestUpdate()}async _loadStyle(){const{style:e}=this.layer.currentStyleInfo,t=i(e);this._isTileHandlerReady=!1,this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.clear(),this._parseQueue.clear(),this._styleRepository=new m(t),this._vectorTileContainer.destroy(),this._tileManager.clear(),this._tileHandlerAbortController.abort(),this._tileHandlerAbortController=new AbortController;const{signal:s}=this._tileHandlerAbortController;try{this._tileHandlerPromise=this._tileHandler.setStyle(this._styleRepository,t),await this._tileHandlerPromise}catch(l){if(!a(l))throw l}if(s.aborted)return this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0,void this.requestUpdate();const r=await this._tileHandler.spriteMosaic;this._vectorTileContainer.setStyleResources(r,this._tileHandler.glyphMosaic,this._styleRepository),this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0,this.requestUpdate()}_createVectorTile(e){const t=this._tileInfoView.getTileBounds(u(),e),i=this._tileInfoView.getTileResolution(e.level);return new d(e,i,t[0],t[3],512,512,this._styleRepository)}};function S(e){if(null==e)return 0;switch(e.type){case"partial":return Object.keys(e.diff).length;case"complete":return Math.max(Object.keys(e.oldValue).length,Object.keys(e.newValue).length);case"collection":return Object.keys(e.added).length+Object.keys(e.changed).length+Object.keys(e.removed).length}}e([l()],H.prototype,"_isTileHandlerReady",void 0),e([l()],H.prototype,"fading",void 0),H=e([o("esri.views.2d.layers.VectorTileLayerView2D")],H);const D=H;export{D as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import{clone as i}from"../../../core/lang.js";import s from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{diff as n,hasDiff as h}from"../../../core/accessorSupport/diffUtils.js";import{create as y}from"../../../geometry/support/aaBoundingRect.js";import{equals as u}from"../../../geometry/support/spatialReferenceUtils.js";import{StyleUpdateType as c}from"../engine/vectorTiles/enums.js";import{TileHandler as p}from"../engine/vectorTiles/TileHandler.js";import{TileManager as d}from"../engine/vectorTiles/TileManager.js";import{VectorTile as _}from"../engine/vectorTiles/VectorTile.js";import{VectorTileContainer as f}from"../engine/vectorTiles/VectorTileContainer.js";import{StyleLayerType as m}from"../engine/vectorTiles/style/StyleDefinition.js";import g from"../engine/vectorTiles/style/StyleRepository.js";import{LayerView2DMixin as T}from"./LayerView2D.js";import C from"../tiling/TileInfoViewPOT.js";import H from"../tiling/TileQueue.js";import R from"../../layers/LayerView.js";let v=class extends(T(R)){constructor(){super(...arguments),this._styleChanges=[],this._fetchQueue=null,this._parseQueue=null,this._tileHandlerPromise=null,this._isTileHandlerReady=!1}get fading(){return this._vectorTileContainer?.fading??!1}async hitTest(e,i){if(!this._tileHandlerPromise)return null;await this._tileHandlerPromise;const s=await this._vectorTileContainer.hitTest(i);if(!s||0===s.length)return null;const r=s[0]-1,a=this._styleRepository,l=a.getStyleLayerByUID(r);if(!l)return null;const o=a.getStyleLayerIndex(l.id);return[{type:"graphic",mapPoint:e,layer:this.layer,graphic:new t({attributes:{layerId:o,layerName:l.id,layerUID:r},layer:this.layer,sourceLayer:this.layer})}]}update(e){if(this._tileHandlerPromise&&this._isTileHandlerReady)return e.pixelRatio!==this._tileHandler.devicePixelRatio?(this._start(),void(this._tileHandler.devicePixelRatio=e.pixelRatio)):void(this._styleChanges.length>0?this._tileHandlerPromise=this._applyStyleChanges():(this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.state=e.state,this._parseQueue.state=e.state,this._tileManager.update(e)||this.requestUpdate(),this._parseQueue.resume(),this._fetchQueue.resume()))}attach(){const{style:e}=this.layer.currentStyleInfo;this._styleRepository=new g(e),this._tileInfoView=new C(this.layer.tileInfo,this.layer.fullExtent),this._vectorTileContainer=new f(this._tileInfoView),this._tileHandler=new p(this.layer,this._styleRepository,window.devicePixelRatio||1),this.container.addChild(this._vectorTileContainer),this._start(),this.addAttachHandles([this.layer.on("paint-change",(e=>{if(e.isDataDriven)this._styleChanges.push({type:c.PAINTER_CHANGED,data:e}),this.requestUpdate();else{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=i.type===m.SYMBOL;t.setPaintProperties(e.layer,e.paint),s&&this._vectorTileContainer?.restartDeclutter(),this._vectorTileContainer?.requestRender()}})),this.layer.on("layout-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=n(i.layout,e.layout);if(null!=s){if(h(s,"visibility")&&1===D(s))return t.setLayoutProperties(e.layer,e.layout),i.type===m.SYMBOL&&this._vectorTileContainer?.restartDeclutter(),void this._vectorTileContainer?.requestRender();this._styleChanges.push({type:c.LAYOUT_CHANGED,data:e}),this.requestUpdate()}})),this.layer.on("style-layer-visibility-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);i&&(t.setStyleLayerVisibility(e.layer,e.visibility),i.type===m.SYMBOL&&this._vectorTileContainer?.restartDeclutter(),this._vectorTileContainer?.requestRender())})),this.layer.on("style-layer-change",(e=>{this._styleChanges.push({type:c.LAYER_CHANGED,data:e}),this.requestUpdate()})),this.layer.on("delete-style-layer",(e=>{this._styleChanges.push({type:c.LAYER_REMOVED,data:e}),this.requestUpdate()})),this.layer.on("load-style",(()=>this._loadStyle())),this.layer.on("spriteSource-change",(e=>{this._styleChanges.push({type:c.SPRITES_CHANGED,data:e});const t=this._styleRepository.layers;for(const i of t)switch(i.type){case m.SYMBOL:i.getLayoutProperty("icon-image")&&this._styleChanges.push({type:c.LAYOUT_CHANGED,data:{layer:i.id,layout:i.layout}});break;case m.LINE:i.getPaintProperty("line-pattern")&&this._styleChanges.push({type:c.PAINTER_CHANGED,data:{layer:i.id,paint:i.paint,isDataDriven:i.isPainterDataDriven()}});break;case m.FILL:i.getLayoutProperty("fill-pattern")&&this._styleChanges.push({type:c.PAINTER_CHANGED,data:{layer:i.id,paint:i.paint,isDataDriven:i.isPainterDataDriven()}})}this.requestUpdate()}))])}detach(){this._stop(),this.container.removeAllChildren(),this._vectorTileContainer=r(this._vectorTileContainer),this._tileHandler=r(this._tileHandler)}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return u(this.layer.tileInfo?.spatialReference,e)}canResume(){let e=super.canResume();const{currentStyleInfo:t}=this.layer;if(e&&t?.layerDefinition){const i=this.view.scale,{minScale:s,maxScale:r}=t.layerDefinition;t&&t.layerDefinition&&(s&&s<i&&(e=!1),r&&r>i&&(e=!1))}return e}isUpdating(){return this.fading}acquireTile(e){const t=this._createVectorTile(e);return this._updatingHandles.addPromise(this._fetchQueue.push(t.key).then((e=>this._parseQueue.push({key:t.key,data:e}))).then((e=>{t.once("attach",(()=>this.requestUpdate())),t.setData(e),this.requestUpdate()})).catch((e=>{a(e)||s.getLogger(this).error(e)}))),t}releaseTile(e){const t=e.key.id;this._fetchQueue.abort(t),this._parseQueue.abort(t),this.requestUpdate()}_start(){if(this._stop(),this._tileManager=new d({acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView},this._vectorTileContainer),!this.layer.currentStyleInfo)return;const e=new AbortController,t=this._tileHandler.start({signal:e.signal}).then((()=>{this._fetchQueue=new H({tileInfoView:this._tileInfoView,process:(e,t)=>this._getTileData(e,t),concurrency:15}),this._parseQueue=new H({tileInfoView:this._tileInfoView,process:(e,t)=>this._parseTileData(e,t),concurrency:8}),this.requestUpdate(),this._isTileHandlerReady=!0}));this._tileHandler.spriteMosaic.then((e=>{this._vectorTileContainer.setStyleResources(e,this._tileHandler.glyphMosaic,this._styleRepository),this.requestUpdate()})),this._tileHandlerAbortController=e,this._tileHandlerPromise=t}_stop(){if(!this._tileHandlerAbortController||!this._vectorTileContainer)return;const e=this._tileHandlerAbortController;e&&e.abort(),this._tileHandlerPromise=null,this._isTileHandlerReady=!1,this._fetchQueue=r(this._fetchQueue),this._parseQueue=r(this._parseQueue),this._tileManager=r(this._tileManager),this._vectorTileContainer.removeAllChildren()}async _getTileData(e,t){return this._tileHandler.fetchTileData(e,t)}async _parseTileData(e,t){return this._tileHandler.parseTileData(e,t)}async _applyStyleChanges(){this._isTileHandlerReady=!1,this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.clear(),this._parseQueue.clear(),this._tileManager.clearCache();const e=this._styleChanges;try{await this._tileHandler.updateStyle(e)}catch(l){s.getLogger(this).error("error applying vector-tiles style update",l.message),this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0}const t=this._styleRepository,i=new Set;e.forEach((e=>{if(e.type!==c.LAYER_REMOVED)return;const s=e.data,r=t.getLayerById(s.layer);r&&i.add(r.uid)}));const r=new Set;e.forEach((e=>{let i;switch(e.type){case c.PAINTER_CHANGED:t.setPaintProperties(e.data.layer,e.data.paint),i=e.data.layer;break;case c.LAYOUT_CHANGED:t.setLayoutProperties(e.data.layer,e.data.layout),i=e.data.layer;break;case c.LAYER_REMOVED:return void t.deleteStyleLayer(e.data.layer);case c.LAYER_CHANGED:t.setStyleLayer(e.data.layer,e.data.index),i=e.data.layer.id;break;case c.SPRITES_CHANGED:this._vectorTileContainer.setSpriteMosaic(this._tileHandler.setSpriteSource(e.data.spriteSource))}if(i){const e=t.getLayerById(i);e&&r.add(e.uid)}}));const a=this._vectorTileContainer.children;if(i.size>0){const e=Array.from(i);this._vectorTileContainer.deleteStyleLayers(e);for(const t of a)t.deleteLayerData(e)}if(this._fetchQueue.resume(),this._parseQueue.resume(),r.size>0){const e=Array.from(r),t=[];for(const i of a){const s=this._updatingHandles.addPromise(this._fetchQueue.push(i.key).then((t=>this._parseQueue.push({key:i.key,data:t,styleLayerUIDs:e}))).then((e=>i.setData(e))));t.push(s)}await Promise.all(t)}this._styleChanges=[],this._isTileHandlerReady=!0,this.requestUpdate()}async _loadStyle(){const{style:e}=this.layer.currentStyleInfo,t=i(e);this._isTileHandlerReady=!1,this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.clear(),this._parseQueue.clear(),this._styleRepository=new g(t),this._vectorTileContainer.destroy(),this._tileManager.clear(),this._tileHandlerAbortController.abort(),this._tileHandlerAbortController=new AbortController;const{signal:s}=this._tileHandlerAbortController;try{this._tileHandlerPromise=this._tileHandler.setStyle(this._styleRepository,t),await this._tileHandlerPromise}catch(l){if(!a(l))throw l}if(s.aborted)return this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0,void this.requestUpdate();const r=await this._tileHandler.spriteMosaic;this._vectorTileContainer.setStyleResources(r,this._tileHandler.glyphMosaic,this._styleRepository),this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0,this.requestUpdate()}_createVectorTile(e){const t=this._tileInfoView.getTileBounds(y(),e),i=this._tileInfoView.getTileResolution(e.level);return new _(e,i,t[0],t[3],512,512,this._styleRepository)}};function D(e){if(null==e)return 0;switch(e.type){case"partial":return Object.keys(e.diff).length;case"complete":return Math.max(Object.keys(e.oldValue).length,Object.keys(e.newValue).length);case"collection":return Object.keys(e.added).length+Object.keys(e.changed).length+Object.keys(e.removed).length}}e([l()],v.prototype,"_isTileHandlerReady",void 0),v=e([o("esri.views.2d.layers.VectorTileLayerView2D")],v);const w=v;export{w as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../intl.js";import{watch as t}from"../../../core/reactiveUtils.js";import{pt2px as s}from"../../../core/screenUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{renderSVG as r}from"../../../symbols/support/svgUtils.js";import{getCSSFilterFromEffectList as o}from"../../../symbols/support/utils.js";import l from"../../Widget.js";import{CSS as n}from"./CardCSS.js";import{renderRelationshipRamp as c}from"./support/relationshipUtils.js";import{getUnivariateAboveAndBelowRampElements as p,getUnivariateSizeRampSize as d,getUnivariateColorRampSize as m,getUnivariateColorRampPreview as h,getUnivariateColorRampMargin as y,getUnivariateColorSizeRampElements as g}from"./support/univariateUtils.js";import{getTitle as v,attachToNode as u,isImageryStretchedLegend as f,getStretchStopLabel as b}from"../support/styleUtils.js";import{Heading as _,incrementHeadingLevel as w}from"../../support/Heading.js";import{accessibleHandler as L}from"../../support/decorators/accessibleHandler.js";import{messageBundle as S}from"../../support/decorators/messageBundle.js";import{tsx as x}from"../../support/jsxFactory.js";import{isRTL as C}from"../../support/widgetUtils.js";import{substitute as R}from"../../../intl/substitute.js";const $=25,k=25,z=768,I=100;var A;!function(e){e.Auto="auto",e.Stack="stack",e.SideBySide="side-by-side"}(A||(A={}));const N="#ddd",j=window.devicePixelRatio;function E(e){if(e){if(e.type.includes("3d")){const t=e.symbolLayers&&e.symbolLayers.length;if(!t)return;const s=e.symbolLayers.at(t-1),i=s.resource&&s.resource.primitive;return"circle"===i||"cross"===i||"kite"===i||"sphere"===i||"cube"===i||"diamond"===i}{const t=e.style;return"circle"===t||"diamond"===t||"cross"===t}}}function F(e){if(e){if(e.type.includes("3d")){const t=e.symbolLayers&&e.symbolLayers.length;if(!t)return;const s=e.symbolLayers.at(t-1).get("resource.primitive");return"triangle"===s||"cone"===s||"tetrahedron"===s}return"triangle"===e.style}}let T=class extends l{constructor(e,t){super(e,t),this._hasIndicators=!1,this._selectedSectionName=null,this._sectionNames=[],this._sectionMap=new Map,this.activeLayerInfos=null,this.headingLevel=3,this.layout=A.Stack,this.messages=null,this.messagesCommon=null,this.type="card",this.view=null}initialize(){this.addHandles(t((()=>this.activeLayerInfos),(e=>{this.removeAllHandles(),this._watchForSectionChanges(e)})))}render(){const{view:e}=this;this._hasIndicators=this.layout===A.Auto&&e&&e.container.clientWidth<=z||this.layout===A.Stack;const t=this.activeLayerInfos,s=t&&t.toArray().map((e=>this._renderLegendForLayer(e))).filter((e=>!!e));this._hasIndicators?this._selectedSectionName&&this._sectionNames.includes(this._selectedSectionName)||(this._selectedSectionName=this._sectionNames&&this._sectionNames[0]):this._selectedSectionName=null;const i=this._sectionNames.length,a=this._sectionNames.map(((e,t)=>{const s=R(this.messagesCommon.pagination.pageText,{index:t+1,total:i});return x("div",{key:e,role:"tab",id:e,"aria-label":s,"aria-controls":`${e}-panel`,"aria-selected":(this._selectedSectionName===e).toString(),tabIndex:this._selectedSectionName===e?0:-1,title:s,onclick:this._selectSection,onkeydown:this._focusSection,bind:this,class:this.classes(n.indicator,{[n.activated]:this._selectedSectionName===e}),"data-section-name":e})})),r=this._hasIndicators&&i>1?x("div",{class:n.indicatorContainer,key:"carousel-navigation",role:"tablist"},a):null,o=this._hasIndicators?this._sectionMap.get(this._selectedSectionName):s&&s.length?s:null,l={[n.stacked]:this._hasIndicators};return x("div",{class:this.classes(n.base,l)},o||x("div",{class:n.message},this.messages.noLegend),r)}_selectSection(e){const t=e.target.getAttribute("data-section-name");t&&(this._selectedSectionName=t)}_focusSection(e){switch(e.key){case"ArrowLeft":case"ArrowRight":this._switchSectionOnArrowPress(e);break;case"Enter":case" ":this._selectSection(e)}}_switchSectionOnArrowPress(e){const t=e.key,s="ArrowLeft"===t?-1:1,i=e.target.getAttribute("data-section-name"),a=this._sectionNames.indexOf(i),r=this._sectionNames;let o=null;-1!==a&&(r[a+s]?o=document.getElementById(r[a+s]):"ArrowLeft"===t?o=document.getElementById(r[r.length-1]):"ArrowRight"===t&&(o=document.getElementById(r[0])),o?.focus())}_watchForSectionChanges(e){if(this._generateSectionNames(),e){e.forEach((e=>{const s=`activeLayerInfo-${e.layer.uid}-version-change`;this.removeHandles(s),this._watchForSectionChanges(e.children),this.addHandles(t((()=>e.version),(()=>this._generateSectionNames())),s)}));const s="activeLayerInfos-collection-change";this.removeHandles(s),this.addHandles(e.on("change",(()=>this._watchForSectionChanges(e))),s)}}_generateSectionNames(){this._sectionNames.length=0,this._selectedSectionName=null,this.activeLayerInfos&&this.activeLayerInfos.forEach(this._generateSectionNamesForActiveLayerInfo,this)}_getSectionName(e,t,s){return`${this.id}${e.uid}-type-${t.type}-${s}`}_generateSectionNamesForActiveLayerInfo(e){e.children.forEach(this._generateSectionNamesForActiveLayerInfo,this),e.legendElements&&e.legendElements.forEach(((t,s)=>{this._sectionNames.push(this._getSectionName(e.layer,t,s))}))}_renderLegendForLayer(e){if(!e.ready)return null;if(e.children.length){const t=e.children.map((e=>this._renderLegendForLayer(e))).toArray();return x("div",{key:e.layer.uid,class:this.classes(n.service,n.groupLayer)},x("div",{class:n.serviceCaptionContainer},e.title),t)}{const t=e.legendElements;if(t&&!t.length)return null;const s=t.some((e=>"relationship-ramp"===e.type)),i=t.map(((t,i)=>this._renderLegendForElement(t,e,i,s))).filter((e=>!!e));if(!i.length)return null;const a={[n.groupLayerChild]:!!e.parent};return x("div",{key:e.layer.uid,class:this.classes(n.service,a)},x("div",{class:n.serviceCaptionContainer},x("div",{class:n.serviceCaptionText},e.title)),x("div",{class:n.serviceContent},i))}}_renderLegendForElement(e,t,s,i=!1,a=!1){const r="color-ramp"===e.type,o="opacity-ramp"===e.type,l=t.layer;let p=null;if("string"==typeof e.title)p=e.title;else if(e.title){const t=e.title,s=v(this.messages,t,r||o);p=t.title?`${t.title} (${s})`:s}const d=this._getSectionName(l,e,s),m=this._hasIndicators&&!a?x("div",null,x(_,{level:this.headingLevel,class:n.carouselTitle},t.title),x(_,{level:w(this.headingLevel),class:n.layerCaption},p)):p?x(_,{level:this.headingLevel,class:n.layerCaption},p):null,h=t.effectList;let y=null;switch(e.type){case"symbol-table":{const s=e.infos.map(((s,i)=>this._renderLegendForElementInfo(s,t,e.legendType,i))).filter((e=>!!e));if(s.length){const e=s[0].properties.classes&&s[0].properties.classes[n.symbolRow],t={[n.labelContainer]:!e&&!i,[n.relationshipLabelContainer]:i};y=x("div",{class:this.classes(t)},s)}break}case"color-ramp":case"opacity-ramp":case"heatmap-ramp":case"stretch-ramp":y=this._renderLegendForRamp(e,l.opacity,h);break;case"size-ramp":y=this._renderSizeRamp(e,l.opacity);break;case"pie-chart-ramp":y=this._renderPieChartRamp(e);break;case"relationship-ramp":y=c(e,this.id,{opacity:l.opacity,effectList:h,ariaLabel:this.messages.previewRelationshipRampAriaLabel});break;case"univariate-above-and-below-ramp":y=this._renderUnivariateAboveAndBelowRamp(e,l.opacity,h);break;case"univariate-color-size-ramp":y=this._renderUnivariateColorSizeRamp(e,l.opacity,h)}if(!y)return null;const g=x("div",{key:d,class:n.section,id:`${d}-panel`,role:"tabpanel","aria-labelledby":d,tabIndex:0},[m,y]);return a||this._sectionMap.set(d,g),g}_renderPieChartRamp(e){return x("div",{class:n.pieChartRampPreview,bind:e.preview,afterCreate:u})}_renderUnivariateAboveAndBelowRamp(e,t,s){const{sizeRampElement:i,colorRampElement:a}=p(e,t,"horizontal");if(!i)return null;const r=d(i,"full",!0,"horizontal"),o=m(i,"above",!0,"horizontal"),l=m(i,"below",!0,"horizontal"),c=12,g=this.messages?.previewColorRampAriaLabel,v=h(a,{width:o,height:c,rampAlignment:"horizontal",opacity:t,type:"above",effectList:s,ariaLabel:g}),f=h(a,{width:l,height:c,rampAlignment:"horizontal",opacity:t,type:"below",effectList:s,ariaLabel:g}),b=y(i,"card"),_=i.infos.map((e=>e.label)),w=_.length-1,L=_.map(((e,t)=>0===t||t===w?x("div",{key:t},e):null)),S={display:"flex",flexDirection:"column"},R={display:"flex",flexDirection:"row"},$={marginTop:"3px",display:"flex"};C(this.container)?$.marginRight=`${b}px`:$.marginLeft=`${b}px`;const k={width:`${r}px`,display:"flex",flexDirection:"row",justifyContent:"space-between"};return x("div",{class:n.layerRow,key:"size-ramp-preview",styles:S},x("div",{class:this.classes(n.symbolContainer,n.sizeRampHorizontal),styles:R},i.infos.map(((e,t)=>x("div",{key:t,class:n.symbol,bind:e.preview,afterCreate:u})))),v?x("div",{class:n.univariateAboveAndBelowColorRamp,styles:$,key:"color-ramp-preview"},x("div",{bind:v,afterCreate:u}),x("div",{bind:f,afterCreate:u})):null,x("div",{class:n.layerInfo},x("div",{class:n.rampLabelsContainer,styles:k},L)))}_renderUnivariateColorSizeRamp(e,t,s){const{sizeRampElement:i,colorRampElement:a}=g(e,"horizontal");if(!i)return null;const r=d(i,"full",!1,"horizontal"),o=m(i,"full",!1,"horizontal"),l=h(a,{width:o,height:12,rampAlignment:"horizontal",opacity:t,type:"full",effectList:s,ariaLabel:this.messages?.previewColorRampAriaLabel}),c=y(i,"card"),p=i.infos.length-1,v=i.infos.map(((e,t)=>0===t||t===p?x("div",{key:t},e.label):null)),f={display:"flex",flexDirection:"column"},b={display:"flex",flexDirection:"row"},_={marginTop:"3px",display:"flex"};C(this.container)?_.marginRight=`${c}px`:_.marginLeft=`${c}px`;const w={width:`${r}px`,display:"flex",flexDirection:"row",justifyContent:"space-between"};return x("div",{class:n.layerRow,key:"size-ramp-preview",styles:f},x("div",{class:this.classes(n.symbolContainer,n.sizeRampHorizontal),styles:b},i.infos.map(((e,t)=>x("div",{key:t,class:n.symbol,bind:e.preview,afterCreate:u})))),x("div",{class:n.univariateAboveAndBelowColorRamp,styles:_,key:"color-ramp-preview"},x("div",{bind:l,afterCreate:u})),x("div",{class:n.layerInfo},x("div",{class:n.rampLabelsContainer,styles:w},v)))}_renderLegendForElementInfo(e,t,s,i){const a=t.layer;if(e.type)return this._renderLegendForElement(e,t,i,!1,!0);const r=f(a,s),l=v(this.messages,e.label,!1)??"";if(e.preview){if(!e.symbol||!e.symbol.type.includes("simple-fill")){if(!e.label)return x("div",{key:i,bind:e.preview,afterCreate:u});const t={[n.symbolCell]:this._hasIndicators};return x("div",{key:i,class:this.classes(n.layerRow,{[n.symbolRow]:this._hasIndicators})},x("div",{class:this.classes(t),bind:e.preview,afterCreate:u}),x("div",{class:this.classes(n.imageLabel,{[n.labelCell]:this._hasIndicators})},l))}let s=255,r=255,c=255,p=0,d=255,m=255,h=255,y=0;const g=e.symbol.color&&e.symbol.color.a,v=e.symbol.outline&&e.symbol.outline.color&&e.symbol.outline.color.a;g&&(s=e.symbol.color.r,r=e.symbol.color.g,c=e.symbol.color.b,p=e.symbol.color.a*a.opacity),v&&(d=e.symbol.outline.color.r,m=e.symbol.outline.color.g,h=e.symbol.outline.color.b,y=e.symbol.outline.color.a*a.opacity);const f=e.symbol.color?.isBright??!0,b=f?"rgba(255, 255, 255, .6)":"rgba(0, 0, 0, .6)",_={background:g?`rgba(${s}, ${r}, ${c}, ${p})`:"none",color:f?"black":"white",textShadow:`-1px -1px 0 ${b},\n 1px -1px 0 ${b},\n -1px 1px 0 ${b},\n 1px 1px 0 ${b}`,border:v?`1px solid rgba(${d}, ${m}, ${h}, ${y})`:"none",filter:o(t.effectList)??void 0};return x("div",{key:i,class:n.layerRow},x("div",{class:n.labelElement,styles:_},l))}if(e.src){const t=this._renderImage(e,a,r);return x("div",{key:i,class:n.layerRow},t,x("div",{class:n.imageLabel},l))}}_renderImage(e,t,s){const{label:i,src:a,opacity:r}=e,o={[n.imageryLayerStretchedImage]:s,[n.symbol]:!s},l={opacity:`${null!=r?r:t.opacity}`};return x("img",{alt:v(this.messages,i,!1),"aria-label":v(this.messages,i,!1),src:a,border:0,width:e.width,height:e.height,class:this.classes(o),styles:l})}_renderSizeRampLines(e){const t=e.infos,i=t[0],a=t[t.length-1],r=i.symbol,o=this._hasIndicators,l=s(i.size+i.outlineSize)*j,n=s(a.size+a.outlineSize)*j,c=o?l:l+50*j,p=o?l/2+50*j:l,d=F(r),m=E(r),h=document.createElement("canvas");h.width=c,h.height=p,h.style.width=h.width/j+"px",h.style.height=h.height/j+"px";const y=h.getContext("2d");if(o){y.beginPath();const e=0,t=0,s=c/2-n/2,i=p;y.moveTo(e,t),y.lineTo(s,i);const a=c,r=0,o=c/2+n/2,l=p;y.moveTo(a,r),y.lineTo(o,l)}else{y.beginPath();const e=0,t=p/2-n/2,s=c,i=0;y.moveTo(e,t),y.lineTo(s,i);const a=0,r=p/2+n/2,o=c,l=p;y.moveTo(a,r),y.lineTo(o,l)}return y.strokeStyle=N,y.stroke(),x("div",{bind:h,afterCreate:u,styles:o?{display:"flex",marginTop:`-${d?0:m?l/2:0}px`,marginBottom:`-${d?n:m?n/2:0}px`}:{display:"flex",marginRight:`-${d?0:m?l/2:0}px`,marginLeft:`-${d?0:m?n/2:0}px`}})}_renderSizeRamp(e,t){const s=e.infos,i=s[0].label,a=s[s.length-1].label;let r=s[0].preview,o=s[s.length-1].preview;const l=this._hasIndicators,c={"flex-direction":l?"column":"row-reverse"};r&&(r=r.cloneNode(!0),r.style.display="flex"),o&&(o=o.cloneNode(!0),o.style.display="flex");const p={opacity:null!=t?`${t}`:""};return x("div",{class:this.classes(n.layerRow,{[n.sizeRampRow]:l})},x("div",{class:n.rampLabel},l?i:a),x("div",{class:n.sizeRampContainer,styles:c},x("div",{bind:r,afterCreate:u,class:n.sizeRampPreview,styles:p}),this._renderSizeRampLines(e),x("div",{bind:o,afterCreate:u,class:n.sizeRampContainer,styles:p})),x("div",{class:n.rampLabel},l?a:i))}_getRampStopLabel(e,t){switch(t){case"heatmap-ramp":return this.messages[e.label];case"stretch-ramp":return b(e,this.messages);default:return e.label}}_renderLegendForRamp(e,t,s){const i=e.infos,a=e.type,l="heatmap-ramp"===a,c=i.length-1,p=k,d=c>2&&!l?$*c:I,m=d+20,h=10,y=i.slice(0).reverse(),g=y.length-1,v=y.length%2!=0?y[y.length/2|0]:null,u=v&&x("div",{class:n.intervalSeparatorsContainer},x("div",{class:n.intervalSeparator},"|"),x("div",{class:n.rampLabel},this._getRampStopLabel(v,a))),f=[[{shape:{type:"path",path:`M0 ${p/2} L${h} 0 L${h} ${p} Z`},fill:y[0].color,stroke:{width:0}},{shape:{type:"rect",x:h,y:0,width:d,height:p},fill:{type:"linear",x1:h,y1:0,x2:d+h,y2:0,colors:y.map(((e,t)=>({color:e.color?.toArray(),offset:l&&"ratio"in e?e.ratio:t/c})))},stroke:{width:0}},{shape:{type:"path",path:`M${d+h} 0 L${m} ${p/2} L${d+h} ${p} Z`},fill:y[g].color,stroke:{width:0}}]],b=r(f,m,p),_={filter:o(s)??void 0,opacity:null==t?void 0:`${t}`},w={justifyContent:"center"};return x("div",{class:n.layerRow,styles:w},x("div",{class:n.rampLabel},this._getRampStopLabel(y[0],a)),x("div",{class:n.symbolContainer},x("div",{styles:_},b),u),x("div",{class:n.rampLabel},this._getRampStopLabel(y[g],a)))}};e([i()],T.prototype,"activeLayerInfos",void 0),e([i()],T.prototype,"headingLevel",void 0),e([i()],T.prototype,"layout",void 0),e([i(),S("esri/widgets/Legend/t9n/Legend")],T.prototype,"messages",void 0),e([i(),S("esri/t9n/common")],T.prototype,"messagesCommon",void 0),e([i({readOnly:!0})],T.prototype,"type",void 0),e([i()],T.prototype,"view",void 0),e([L()],T.prototype,"_selectSection",null),T=e([a("esri.widgets.Legend.styles.Card")],T);const U=T;export{U as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../intl.js";import{watch as t}from"../../../core/reactiveUtils.js";import{pt2px as s}from"../../../core/screenUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{renderSVG as r}from"../../../symbols/support/svgUtils.js";import{getCSSFilterFromEffectList as o}from"../../../symbols/support/utils.js";import l from"../../Widget.js";import{CSS as n}from"./CardCSS.js";import{renderRelationshipRamp as c}from"./support/relationshipUtils.js";import{getUnivariateAboveAndBelowRampElements as p,getUnivariateSizeRampSize as d,getUnivariateColorRampSize as m,getUnivariateColorRampPreview as h,getUnivariateColorRampMargin as y,getUnivariateColorSizeRampElements as g}from"./support/univariateUtils.js";import{getTitle as v,attachToNode as u,isImageryStretchedLegend as f,getStretchStopLabel as b}from"../support/styleUtils.js";import{Heading as _,incrementHeadingLevel as w}from"../../support/Heading.js";import{accessibleHandler as L}from"../../support/decorators/accessibleHandler.js";import{messageBundle as S}from"../../support/decorators/messageBundle.js";import{tsx as x}from"../../support/jsxFactory.js";import{isRTL as C}from"../../support/widgetUtils.js";import{substitute as R}from"../../../intl/substitute.js";const $=25,k=25,z=768,I=100;var N;!function(e){e.Auto="auto",e.Stack="stack",e.SideBySide="side-by-side"}(N||(N={}));const A="#ddd",j=window.devicePixelRatio;function E(e){if(e){if(e.type.includes("3d")){const t=e.symbolLayers&&e.symbolLayers.length;if(!t)return;const s=e.symbolLayers.at(t-1),i=s.resource&&s.resource.primitive;return"circle"===i||"cross"===i||"kite"===i||"sphere"===i||"cube"===i||"diamond"===i}{const t=e.style;return"circle"===t||"diamond"===t||"cross"===t}}}function F(e){if(e){if(e.type.includes("3d")){const t=e.symbolLayers&&e.symbolLayers.length;if(!t)return;const s=e.symbolLayers.at(t-1).get("resource.primitive");return"triangle"===s||"cone"===s||"tetrahedron"===s}return"triangle"===e.style}}let T=class extends l{constructor(e,t){super(e,t),this._hasIndicators=!1,this._selectedSectionName=null,this._sectionNames=[],this._sectionMap=new Map,this.activeLayerInfos=null,this.headingLevel=3,this.layout=N.Stack,this.messages=null,this.messagesCommon=null,this.type="card",this.view=null}initialize(){this.addHandles(t((()=>this.activeLayerInfos),(e=>{this.removeAllHandles(),this._watchForSectionChanges(e)})))}render(){const{view:e}=this;this._hasIndicators=this.layout===N.Auto&&e&&e.container.clientWidth<=z||this.layout===N.Stack;const t=this.activeLayerInfos,s=t&&t.toArray().map((e=>this._renderLegendForLayer(e))).filter((e=>!!e));this._hasIndicators?this._selectedSectionName&&this._sectionNames.includes(this._selectedSectionName)||(this._selectedSectionName=this._sectionNames&&this._sectionNames[0]):this._selectedSectionName=null;const i=this._sectionNames.length,a=this._sectionNames.map(((e,t)=>{const s=R(this.messagesCommon.pagination.pageText,{index:t+1,total:i});return x("div",{key:e,role:"tab",id:e,"aria-label":s,"aria-controls":`${e}-panel`,"aria-selected":(this._selectedSectionName===e).toString(),tabIndex:this._selectedSectionName===e?0:-1,title:s,onclick:this._selectSection,onkeydown:this._focusSection,bind:this,class:this.classes(n.indicator,{[n.activated]:this._selectedSectionName===e}),"data-section-name":e})})),r=this._hasIndicators&&i>1?x("div",{class:n.indicatorContainer,key:"carousel-navigation",role:"tablist"},a):null,o=this._hasIndicators?this._sectionMap.get(this._selectedSectionName):s&&s.length?s:null,l={[n.stacked]:this._hasIndicators};return x("div",{class:this.classes(n.base,l)},o||x("div",{class:n.message},this.messages.noLegend),r)}_selectSection(e){const t=e.target.getAttribute("data-section-name");t&&(this._selectedSectionName=t)}_focusSection(e){switch(e.key){case"ArrowLeft":case"ArrowRight":this._switchSectionOnArrowPress(e);break;case"Enter":case" ":this._selectSection(e)}}_switchSectionOnArrowPress(e){const t=e.key,s="ArrowLeft"===t?-1:1,i=e.target.getAttribute("data-section-name"),a=this._sectionNames.indexOf(i),r=this._sectionNames;let o=null;-1!==a&&(r[a+s]?o=document.getElementById(r[a+s]):"ArrowLeft"===t?o=document.getElementById(r[r.length-1]):"ArrowRight"===t&&(o=document.getElementById(r[0])),o?.focus())}_watchForSectionChanges(e){if(this._generateSectionNames(),e){e.forEach((e=>{const s=`activeLayerInfo-${e.layer.uid}-version-change`;this.removeHandles(s),this._watchForSectionChanges(e.children),this.addHandles(t((()=>e.version),(()=>this._generateSectionNames())),s)}));const s="activeLayerInfos-collection-change";this.removeHandles(s),this.addHandles(e.on("change",(()=>this._watchForSectionChanges(e))),s)}}_generateSectionNames(){this._sectionNames.length=0,this._selectedSectionName=null,this.activeLayerInfos&&this.activeLayerInfos.forEach(this._generateSectionNamesForActiveLayerInfo,this)}_getSectionName(e,t,s){return`${this.id}${e.uid}-type-${t.type}-${s}`}_generateSectionNamesForActiveLayerInfo(e){e.children.forEach(this._generateSectionNamesForActiveLayerInfo,this),e.legendElements&&e.legendElements.forEach(((t,s)=>{this._sectionNames.push(this._getSectionName(e.layer,t,s))}))}_renderLegendForLayer(e){if(!e.ready)return null;if(e.children.length){const t=e.children.map((e=>this._renderLegendForLayer(e))).toArray();return x("div",{key:e.layer.uid,class:this.classes(n.service,n.groupLayer)},x("div",{class:n.serviceCaptionContainer},e.title),t)}{const t=e.legendElements;if(t&&!t.length)return null;const s=t.some((e=>"relationship-ramp"===e.type)),i=t.map(((t,i)=>this._renderLegendForElement(t,e,i,s))).filter((e=>!!e));if(!i.length)return null;const a={[n.groupLayerChild]:!!e.parent};return x("div",{key:e.layer.uid,class:this.classes(n.service,a)},x("div",{class:n.serviceCaptionContainer},x("div",{class:n.serviceCaptionText},e.title)),x("div",{class:n.serviceContent},i))}}_renderLegendForElement(e,t,s,i=!1,a=!1){const r="color-ramp"===e.type,o="opacity-ramp"===e.type,l=t.layer;let p=null;if("string"==typeof e.title)p=e.title;else if(e.title){const t=e.title,s=v(this.messages,t,r||o);p=t.title?`${t.title} (${s})`:s}const d=this._getSectionName(l,e,s),m=this._hasIndicators&&!a?x("div",null,x(_,{level:this.headingLevel,class:n.carouselTitle},t.title),x(_,{level:w(this.headingLevel),class:n.layerCaption},p)):p?x(_,{level:this.headingLevel,class:n.layerCaption},p):null,h=t.effectList;let y=null;switch(e.type){case"symbol-table":{const s=e.infos.map(((s,i)=>this._renderLegendForElementInfo(s,t,e.legendType,i))).filter((e=>!!e));if(s.length){const e=s[0].properties.classes&&s[0].properties.classes[n.symbolRow],t={[n.labelContainer]:!e&&!i,[n.relationshipLabelContainer]:i};y=x("div",{class:this.classes(t)},s)}break}case"color-ramp":case"opacity-ramp":case"heatmap-ramp":case"stretch-ramp":y=this._renderLegendForRamp(e,l.opacity,h);break;case"size-ramp":y=this._renderSizeRamp(e,l.opacity);break;case"pie-chart-ramp":y=this._renderPieChartRamp(e);break;case"relationship-ramp":y=c(e,this.id,{opacity:l.opacity,effectList:h,ariaLabel:this.messages.previewRelationshipRampAriaLabel});break;case"univariate-above-and-below-ramp":y=this._renderUnivariateAboveAndBelowRamp(e,l.opacity,h);break;case"univariate-color-size-ramp":y=this._renderUnivariateColorSizeRamp(e,l.opacity,h)}if(!y)return null;const g=x("div",{key:d,class:n.section,id:`${d}-panel`,role:"tabpanel","aria-labelledby":d,tabIndex:0},[m,y]);return a||this._sectionMap.set(d,g),g}_renderPieChartRamp(e){return x("div",{class:n.pieChartRampPreview,bind:e.preview,afterCreate:u})}_renderUnivariateAboveAndBelowRamp(e,t,s){const{sizeRampElement:i,colorRampElement:a}=p(e,t,"horizontal");if(!i)return null;const r=d(i,"full",!0,"horizontal"),o=m(i,"above",!0,"horizontal"),l=m(i,"below",!0,"horizontal"),c=12,g=this.messages?.previewColorRampAriaLabel,v=h(a,{width:o,height:c,rampAlignment:"horizontal",opacity:t,type:"above",effectList:s,ariaLabel:g}),f=h(a,{width:l,height:c,rampAlignment:"horizontal",opacity:t,type:"below",effectList:s,ariaLabel:g}),b=y(i,"card"),_=i.infos.map((e=>e.label)),w=_.length-1,L=_.map(((e,t)=>0===t||t===w?x("div",{key:t},e):null)),S={display:"flex",flexDirection:"column"},R={display:"flex",flexDirection:"row"},$={marginTop:"3px",display:"flex"};C(this.container)?$.marginRight=`${b}px`:$.marginLeft=`${b}px`;const k={width:`${r}px`,display:"flex",flexDirection:"row",justifyContent:"space-between"};return x("div",{class:n.layerRow,key:"size-ramp-preview",styles:S},x("div",{class:this.classes(n.symbolContainer,n.sizeRampHorizontal),styles:R},i.infos.map(((e,t)=>x("div",{key:t,class:n.symbol,bind:e.preview,afterCreate:u})))),v?x("div",{class:n.univariateAboveAndBelowColorRamp,styles:$,key:"color-ramp-preview"},x("div",{bind:v,afterCreate:u}),x("div",{bind:f,afterCreate:u})):null,x("div",{class:n.layerInfo},x("div",{class:n.rampLabelsContainer,styles:k},L)))}_renderUnivariateColorSizeRamp(e,t,s){const{sizeRampElement:i,colorRampElement:a}=g(e,"horizontal");if(!i)return null;const r=d(i,"full",!1,"horizontal"),o=m(i,"full",!1,"horizontal"),l=h(a,{width:o,height:12,rampAlignment:"horizontal",opacity:t,type:"full",effectList:s,ariaLabel:this.messages?.previewColorRampAriaLabel}),c=y(i,"card"),p=i.infos.length-1,v=i.infos.map(((e,t)=>0===t||t===p?x("div",{key:t},e.label):null)),f={display:"flex",flexDirection:"column"},b={display:"flex",flexDirection:"row"},_={marginTop:"3px",display:"flex"};C(this.container)?_.marginRight=`${c}px`:_.marginLeft=`${c}px`;const w={width:`${r}px`,display:"flex",flexDirection:"row",justifyContent:"space-between"};return x("div",{class:n.layerRow,key:"size-ramp-preview",styles:f},x("div",{class:this.classes(n.symbolContainer,n.sizeRampHorizontal),styles:b},i.infos.map(((e,t)=>x("div",{key:t,class:n.symbol,bind:e.preview,afterCreate:u})))),x("div",{class:n.univariateAboveAndBelowColorRamp,styles:_,key:"color-ramp-preview"},x("div",{bind:l,afterCreate:u})),x("div",{class:n.layerInfo},x("div",{class:n.rampLabelsContainer,styles:w},v)))}_renderLegendForElementInfo(e,t,s,i){const a=t.layer;if(e.type)return this._renderLegendForElement(e,t,i,!1,!0);const r=f(a,s),l=v(this.messages,e.label,!1)??"";if(e.preview){if(!e.symbol||!e.symbol.type.includes("simple-fill")){if(!e.label)return x("div",{key:i,bind:e.preview,afterCreate:u});const t={[n.symbolCell]:this._hasIndicators};return x("div",{key:i,class:this.classes(n.layerRow,{[n.symbolRow]:this._hasIndicators})},x("div",{class:this.classes(t),bind:e.preview,afterCreate:u}),x("div",{class:this.classes(n.imageLabel,{[n.labelCell]:this._hasIndicators})},l))}let s=255,r=255,c=255,p=0,d=255,m=255,h=255,y=0;const g=e.symbol.color&&e.symbol.color.a,v=e.symbol.outline&&e.symbol.outline.color&&e.symbol.outline.color.a;g&&(s=e.symbol.color.r,r=e.symbol.color.g,c=e.symbol.color.b,p=e.symbol.color.a*a.opacity),v&&(d=e.symbol.outline.color.r,m=e.symbol.outline.color.g,h=e.symbol.outline.color.b,y=e.symbol.outline.color.a*a.opacity);const f=e.symbol.color?.isBright??!0,b=f?"rgba(255, 255, 255, .6)":"rgba(0, 0, 0, .6)",_={background:g?`rgba(${s}, ${r}, ${c}, ${p})`:"none",color:f?"black":"white",textShadow:`-1px -1px 0 ${b},\n 1px -1px 0 ${b},\n -1px 1px 0 ${b},\n 1px 1px 0 ${b}`,border:v?`1px solid rgba(${d}, ${m}, ${h}, ${y})`:"none",filter:o(t.effectList)??void 0};return x("div",{key:i,class:n.layerRow},x("div",{class:n.labelElement,styles:_},l))}if(e.src){const t=this._renderImage(e,a,r);return x("div",{key:i,class:n.layerRow},t,x("div",{class:n.imageLabel},l))}}_renderImage(e,t,s){const{label:i,src:a,opacity:r}=e,o={[n.imageryLayerStretchedImage]:s,[n.symbol]:!s},l={opacity:`${null!=r?r:t.opacity}`};return x("img",{alt:v(this.messages,i,!1),"aria-label":v(this.messages,i,!1),src:a,border:0,width:e.width,height:e.height,class:this.classes(o),styles:l})}_renderSizeRampLines(e){const t=e.infos,i=t[0],a=t[t.length-1],r=i.symbol,o=this._hasIndicators,l=s(i.size+i.outlineSize)*j,n=s(a.size+a.outlineSize)*j,c=o?l:l+50*j,p=o?l/2+50*j:l,d=F(r),m=E(r),h=document.createElement("canvas");h.width=c,h.height=p,h.style.width=h.width/j+"px",h.style.height=h.height/j+"px";const y=h.getContext("2d");if(o){y.beginPath();const e=0,t=0,s=c/2-n/2,i=p;y.moveTo(e,t),y.lineTo(s,i);const a=c,r=0,o=c/2+n/2,l=p;y.moveTo(a,r),y.lineTo(o,l)}else{y.beginPath();const e=0,t=p/2-n/2,s=c,i=0;y.moveTo(e,t),y.lineTo(s,i);const a=0,r=p/2+n/2,o=c,l=p;y.moveTo(a,r),y.lineTo(o,l)}return y.strokeStyle=A,y.stroke(),x("div",{bind:h,afterCreate:u,styles:o?{display:"flex",marginTop:`-${d?0:m?l/2:0}px`,marginBottom:`-${d?n:m?n/2:0}px`}:{display:"flex",marginRight:`-${d?0:m?l/2:0}px`,marginLeft:`-${d?0:m?n/2:0}px`}})}_renderSizeRamp(e,t){const s=e.infos,i=s[0].label,a=s[s.length-1].label;let r=s[0].preview,o=s[s.length-1].preview;const l=this._hasIndicators,c={"flex-direction":l?"column":"row-reverse"};r&&(r=r.cloneNode(!0),r.style.display="flex"),o&&(o=o.cloneNode(!0),o.style.display="flex");const p={opacity:null!=t?`${t}`:""};return x("div",{class:this.classes(n.layerRow,{[n.sizeRampRow]:l})},x("div",{class:n.rampLabel},l?i:a),x("div",{class:n.sizeRampContainer,styles:c},x("div",{bind:r,afterCreate:u,class:n.sizeRampPreview,styles:p}),this._renderSizeRampLines(e),x("div",{bind:o,afterCreate:u,class:n.sizeRampContainer,styles:p})),x("div",{class:n.rampLabel},l?a:i))}_getRampStopLabel(e,t){switch(t){case"heatmap-ramp":return this.messages[e.label];case"stretch-ramp":return b(e,this.messages);default:return e.label}}_renderLegendForRamp(e,t,s){const i=e.infos,a=e.type,l="heatmap-ramp"===a,c=i.length-1,p=k,d=c>2&&!l?$*c:I,m=d+20,h=10,y=i.slice(0).reverse(),g=y.length-1,v=y.length%2!=0?y[y.length/2|0]:null,u=v&&x("div",{class:n.intervalSeparatorsContainer},x("div",{class:n.intervalSeparator},"|"),x("div",{class:n.rampLabel},this._getRampStopLabel(v,a))),f=[[{shape:{type:"path",path:`M0 ${p/2} L${h} 0 L${h} ${p} Z`},fill:y[0].color,stroke:{width:0}},{shape:{type:"rect",x:h,y:0,width:d,height:p},fill:{type:"linear",x1:h,y1:0,x2:d+h,y2:0,colors:y.map(((e,t)=>({color:e.color,offset:l&&"ratio"in e?e.ratio:t/c})))},stroke:{width:0}},{shape:{type:"path",path:`M${d+h} 0 L${m} ${p/2} L${d+h} ${p} Z`},fill:y[g].color,stroke:{width:0}}]],b=r(f,m,p),_={filter:o(s)??void 0,opacity:null==t?void 0:`${t}`},w={justifyContent:"center"};return x("div",{class:n.layerRow,styles:w},x("div",{class:n.rampLabel},this._getRampStopLabel(y[0],a)),x("div",{class:n.symbolContainer},x("div",{styles:_},b),u),x("div",{class:n.rampLabel},this._getRampStopLabel(y[g],a)))}};e([i()],T.prototype,"activeLayerInfos",void 0),e([i()],T.prototype,"headingLevel",void 0),e([i()],T.prototype,"layout",void 0),e([i(),S("esri/widgets/Legend/t9n/Legend")],T.prototype,"messages",void 0),e([i(),S("esri/t9n/common")],T.prototype,"messagesCommon",void 0),e([i({readOnly:!0})],T.prototype,"type",void 0),e([i()],T.prototype,"view",void 0),e([L()],T.prototype,"_selectSection",null),T=e([a("esri.widgets.Legend.styles.Card")],T);const U=T;export{U as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import t from"../../Widget.js";import{CSS as r,LEGEND as i}from"./ClassicCSS.js";import{renderRelationshipRamp as l}from"./support/relationshipUtils.js";import{getUnivariateAboveAndBelowRampElements as o,getUnivariateColorRampSize as n,getUnivariateColorRampPreview as p,getUnivariateColorRampMargin as d,getUnivariateColorSizeRampElements as c}from"./support/univariateUtils.js";import{getTitle as m,isRendererTitle as y,attachToNode as v,getStretchStopLabel as h,isImageryStretchedLegend as g}from"../support/styleUtils.js";import{Heading as u}from"../../support/Heading.js";import"../../support/widgetUtils.js";import{messageBundle as b}from"../../support/decorators/messageBundle.js";import{tsx as f}from"../../support/jsxFactory.js";const L=`${i}__`,w=24,C={display:"flex",alignItems:"flex-start"},R={marginLeft:"3px"},A={display:"table-cell",verticalAlign:"middle"};let _=class extends t{constructor(e,s){super(e,s),this.activeLayerInfos=null,this.headingLevel=3,this.messages=null,this.type="classic"}render(){const e=this.activeLayerInfos,s=e&&e.toArray().map((e=>this._renderLegendForLayer(e))).filter((e=>!!e));return f("div",null,s&&s.length?s:f("div",{class:r.message},this.messages.noLegend))}_renderLegendForLayer(e){if(!e.ready)return null;const s=!!e.children.length,a=`${L}${e.layer.uid}-version-${e.version}`,t=e.title?u({level:this.headingLevel,class:this.classes(r.header,r.label)},e.title):null;if(s){const s=e.children.map((e=>this._renderLegendForLayer(e))).toArray();return f("div",{key:a,class:this.classes(r.service,r.groupLayer)},t,s)}{const s=e.legendElements;if(s&&!s.length)return null;const i=s.map((s=>this._renderLegendForElement(s,e.layer,e.effectList))).filter((e=>!!e));if(!i.length)return null;const l={[r.groupLayerChild]:!!e.parent};return f("div",{key:a,class:this.classes(r.service,l),tabIndex:0},t,f("div",{class:r.layer},i))}}_renderLegendForElement(e,s,a,t){const i="color-ramp"===e.type,o="opacity-ramp"===e.type,n="size-ramp"===e.type;let p=null;if("symbol-table"===e.type||n){const t=e.infos.map((t=>this._renderLegendForElementInfo(t,s,a,n,e.legendType))).filter((e=>!!e));t.length&&(p=f("div",{class:r.layerBody},t))}else"color-ramp"===e.type||"opacity-ramp"===e.type||"heatmap-ramp"===e.type||"stretch-ramp"===e.type?p=this._renderLegendForRamp(e,s.opacity):"relationship-ramp"===e.type?p=l(e,this.id,{opacity:s.opacity,effectList:a,ariaLabel:this.messages.previewRelationshipRampAriaLabel}):"pie-chart-ramp"===e.type?p=this._renderPieChartRamp(e):"univariate-above-and-below-ramp"===e.type?p=this._renderUnivariateAboveAndBelowRamp(e,s.opacity,a):"univariate-color-size-ramp"===e.type&&(p=this._renderUnivariateColorSizeRamp(e,s.opacity,a));if(!p)return null;const d=e.title;let c=null;if("string"==typeof d)c=d;else if(d){const e=m(this.messages,d,i||o);c=y(d,i||o)&&d.title?`${d.title} (${e})`:e}const v=t?r.layerChildTable:r.layerTable,h=c?f("div",{class:r.layerCaption},c):null,g={[r.layerTableSizeRamp]:n||!t};return f("div",{class:this.classes(v,g)},h,p)}_renderPieChartRamp(e){return f("div",{bind:e.preview,afterCreate:v})}_renderUnivariateAboveAndBelowRamp(e,s,a){const{sizeRampElement:t,colorRampElement:i}=o(e,s);if(!t)return null;const l=this.messages?.previewColorRampAriaLabel,c=n(t,"above",!0),m=n(t,"below",!0),y=12,h=p(i,{width:y,height:c,rampAlignment:"vertical",opacity:s,type:"above",effectList:a,ariaLabel:l}),g=p(i,{width:y,height:m,rampAlignment:"vertical",opacity:s,type:"below",effectList:a,ariaLabel:l}),u=d(t),b=t.infos.map((e=>e.label)),L=b.map(((e,s)=>{const a=2===s;return 0===s?f("div",{key:s,class:e?h?r.univariateAboveAndBelowLabel:r.rampLabel:void 0},e):a?f("div",null):null})),w=b.length-1,_=Math.floor(b.length/2),j=b.map(((e,s)=>s===_||s===w?f("div",{key:s,class:e?h?r.univariateAboveAndBelowLabel:r.rampLabel:void 0},e):null)),I={display:"table-cell",verticalAlign:"middle"},$={marginTop:`${u}px`},x={height:`${c}px`},S={height:`${m}px`};return f("div",{key:"univariate-above-and-below-ramp-preview",styles:C},f("div",{class:r.layerBody},t.infos.map(((e,s)=>f("div",{class:this.classes(r.layerRow,r.sizeRamp)},f("div",{class:r.symbol,styles:I,bind:e.preview,afterCreate:v}),h||s%2!=0?null:f("div",{class:r.layerInfo},b[s]))))),h?f("div",{styles:$,key:"color-ramp-preview"},f("div",{styles:R},f("div",{styles:A},f("div",{class:r.rampContainer,bind:h,afterCreate:v})),f("div",{styles:A},f("div",{class:r.rampLabelsContainer,styles:x},L))),f("div",{styles:R},f("div",{styles:A},f("div",{class:r.rampContainer,bind:g,afterCreate:v})),f("div",{styles:A},f("div",{class:r.rampLabelsContainer,styles:S},j)))):null)}_renderUnivariateColorSizeRamp(e,s,a){const{sizeRampElement:t,colorRampElement:i}=c(e);if(!t)return null;const l=d(t),o=12,m=n(t,"full",!1),y=p(i,{width:o,height:m,rampAlignment:"vertical",opacity:s,type:"full",effectList:a,ariaLabel:this.messages?.previewColorRampAriaLabel}),h=t.infos.length-1,g=t.infos.map(((e,s)=>0===s||s===h?f("div",{key:s,class:e.label?i?r.univariateAboveAndBelowLabel:r.rampLabel:void 0},e.label):null)),u={display:"table-cell",verticalAlign:"middle"},b={marginTop:`${l}px`},L={height:`${m}px`};return f("div",{key:"univariate-above-and-below-ramp-preview",styles:C},f("div",{class:r.layerBody},t.infos.map((e=>f("div",{class:this.classes(r.layerRow,r.sizeRamp)},f("div",{class:r.symbol,styles:u,bind:e.preview,afterCreate:v}))))),f("div",{styles:b,key:"color-ramp-preview"},f("div",{styles:R},f("div",{styles:A},f("div",{class:r.rampContainer,bind:y,afterCreate:v})),f("div",{styles:A},f("div",{class:r.rampLabelsContainer,styles:L},g)))))}_renderLegendForRamp(e,s){const a=e.infos,t="opacity-ramp"===e.type,i="heatmap-ramp"===e.type,l="stretch-ramp"===e.type,o=e.preview,n=t?r.opacityRamp:"";o.className=`${r.colorRamp} ${n}`,null!=s&&(o.style.opacity=s.toString());const p=a.map((e=>f("div",{class:e.label?r.rampLabel:void 0},i?this.messages[e.label]||e.label:l?h(e,this.messages):e.label))),d={width:`${w}px`},c={height:o.style.height};return f("div",{class:r.layerRow},f("div",{class:r.symbolContainer,styles:d},f("div",{class:r.rampContainer,bind:o,afterCreate:v})),f("div",{class:r.layerInfo},f("div",{class:r.rampLabelsContainer,styles:c},p)))}_renderLegendForElementInfo(e,s,a,t,i){if(e.type)return this._renderLegendForElement(e,s,a,!0);let l=null;const o=g(s,i);if(e.preview?l=f("div",{class:r.symbol,bind:e.preview,afterCreate:v}):e.src&&(l=this._renderImage(e,s,o)),!l)return null;const n={[r.imageryLayerInfoStretched]:o},p={[r.imageryLayerInfoStretched]:o,[r.sizeRamp]:!o&&t};return f("div",{class:r.layerRow},f("div",{class:this.classes(r.symbolContainer,p)},l),f("div",{class:this.classes(r.layerInfo,n)},m(this.messages,e.label,!1)||""))}_renderImage(e,s,a){const{label:t,src:i,opacity:l}=e,o={[r.imageryLayerStretchedImage]:a,[r.symbol]:!a},n={opacity:`${null!=l?l:s.opacity}`};return f("img",{alt:m(this.messages,t,!1),"aria-label":m(this.messages,t,!1),src:i,border:0,width:e.width,height:e.height,class:this.classes(o),styles:n})}};e([s()],_.prototype,"activeLayerInfos",void 0),e([s()],_.prototype,"headingLevel",void 0),e([s(),b("esri/widgets/Legend/t9n/Legend")],_.prototype,"messages",void 0),e([s({readOnly:!0})],_.prototype,"type",void 0),_=e([a("esri.widgets.Legend.styles.Classic")],_);const j=_;export{j as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import t from"../../Widget.js";import{CSS as r,LEGEND as i}from"./ClassicCSS.js";import{renderRelationshipRamp as l}from"./support/relationshipUtils.js";import{getUnivariateAboveAndBelowRampElements as o,getUnivariateColorRampSize as n,getUnivariateColorRampPreview as p,getUnivariateColorRampMargin as d,getUnivariateColorSizeRampElements as c}from"./support/univariateUtils.js";import{getTitle as m,isRendererTitle as y,attachToNode as v,getStretchStopLabel as h,isImageryStretchedLegend as g}from"../support/styleUtils.js";import{Heading as u}from"../../support/Heading.js";import"../../support/widgetUtils.js";import{messageBundle as b}from"../../support/decorators/messageBundle.js";import{tsx as f}from"../../support/jsxFactory.js";const L=`${i}__`,w=24,C={display:"flex",alignItems:"flex-start"},R={marginLeft:"3px"},A={display:"table-cell",verticalAlign:"middle"};let _=class extends t{constructor(e,s){super(e,s),this.activeLayerInfos=null,this.headingLevel=3,this.messages=null,this.type="classic"}render(){const e=this.activeLayerInfos,s=e&&e.toArray().map((e=>this._renderLegendForLayer(e))).filter((e=>!!e));return f("div",null,s&&s.length?s:f("div",{class:r.message},this.messages.noLegend))}_renderLegendForLayer(e){if(!e.ready)return null;const s=!!e.children.length,a=`${L}${e.layer.uid}-version-${e.version}`,t=e.title?u({level:this.headingLevel,class:this.classes(r.header,r.label)},e.title):null;if(s){const s=e.children.map((e=>this._renderLegendForLayer(e))).toArray();return f("div",{key:a,class:this.classes(r.service,r.groupLayer)},t,s)}{const s=e.legendElements;if(s&&!s.length)return null;const i=s.map((s=>this._renderLegendForElement(s,e.layer,e.effectList))).filter((e=>!!e));if(!i.length)return null;const l={[r.groupLayerChild]:!!e.parent};return f("div",{key:a,class:this.classes(r.service,l)},t,f("div",{class:r.layer},i))}}_renderLegendForElement(e,s,a,t){const i="color-ramp"===e.type,o="opacity-ramp"===e.type,n="size-ramp"===e.type;let p=null;if("symbol-table"===e.type||n){const t=e.infos.map((t=>this._renderLegendForElementInfo(t,s,a,n,e.legendType))).filter((e=>!!e));t.length&&(p=f("div",{class:r.layerBody},t))}else"color-ramp"===e.type||"opacity-ramp"===e.type||"heatmap-ramp"===e.type||"stretch-ramp"===e.type?p=this._renderLegendForRamp(e,s.opacity):"relationship-ramp"===e.type?p=l(e,this.id,{opacity:s.opacity,effectList:a,ariaLabel:this.messages.previewRelationshipRampAriaLabel}):"pie-chart-ramp"===e.type?p=this._renderPieChartRamp(e):"univariate-above-and-below-ramp"===e.type?p=this._renderUnivariateAboveAndBelowRamp(e,s.opacity,a):"univariate-color-size-ramp"===e.type&&(p=this._renderUnivariateColorSizeRamp(e,s.opacity,a));if(!p)return null;const d=e.title;let c=null;if("string"==typeof d)c=d;else if(d){const e=m(this.messages,d,i||o);c=y(d,i||o)&&d.title?`${d.title} (${e})`:e}const v=t?r.layerChildTable:r.layerTable,h=c?f("div",{class:r.layerCaption},c):null,g={[r.layerTableSizeRamp]:n||!t};return f("div",{class:this.classes(v,g)},h,p)}_renderPieChartRamp(e){return f("div",{bind:e.preview,afterCreate:v})}_renderUnivariateAboveAndBelowRamp(e,s,a){const{sizeRampElement:t,colorRampElement:i}=o(e,s);if(!t)return null;const l=this.messages?.previewColorRampAriaLabel,c=n(t,"above",!0),m=n(t,"below",!0),y=12,h=p(i,{width:y,height:c,rampAlignment:"vertical",opacity:s,type:"above",effectList:a,ariaLabel:l}),g=p(i,{width:y,height:m,rampAlignment:"vertical",opacity:s,type:"below",effectList:a,ariaLabel:l}),u=d(t),b=t.infos.map((e=>e.label)),L=b.map(((e,s)=>{const a=2===s;return 0===s?f("div",{key:s,class:e?h?r.univariateAboveAndBelowLabel:r.rampLabel:void 0},e):a?f("div",null):null})),w=b.length-1,_=Math.floor(b.length/2),j=b.map(((e,s)=>s===_||s===w?f("div",{key:s,class:e?h?r.univariateAboveAndBelowLabel:r.rampLabel:void 0},e):null)),$={display:"table-cell",verticalAlign:"middle"},I={marginTop:`${u}px`},x={height:`${c}px`},S={height:`${m}px`};return f("div",{key:"univariate-above-and-below-ramp-preview",styles:C},f("div",{class:r.layerBody},t.infos.map(((e,s)=>f("div",{class:this.classes(r.layerRow,r.sizeRamp)},f("div",{class:r.symbol,styles:$,bind:e.preview,afterCreate:v}),h||s%2!=0?null:f("div",{class:r.layerInfo},b[s]))))),h?f("div",{styles:I,key:"color-ramp-preview"},f("div",{styles:R},f("div",{styles:A},f("div",{class:r.rampContainer,bind:h,afterCreate:v})),f("div",{styles:A},f("div",{class:r.rampLabelsContainer,styles:x},L))),f("div",{styles:R},f("div",{styles:A},f("div",{class:r.rampContainer,bind:g,afterCreate:v})),f("div",{styles:A},f("div",{class:r.rampLabelsContainer,styles:S},j)))):null)}_renderUnivariateColorSizeRamp(e,s,a){const{sizeRampElement:t,colorRampElement:i}=c(e);if(!t)return null;const l=d(t),o=12,m=n(t,"full",!1),y=p(i,{width:o,height:m,rampAlignment:"vertical",opacity:s,type:"full",effectList:a,ariaLabel:this.messages?.previewColorRampAriaLabel}),h=t.infos.length-1,g=t.infos.map(((e,s)=>0===s||s===h?f("div",{key:s,class:e.label?i?r.univariateAboveAndBelowLabel:r.rampLabel:void 0},e.label):null)),u={display:"table-cell",verticalAlign:"middle"},b={marginTop:`${l}px`},L={height:`${m}px`};return f("div",{key:"univariate-above-and-below-ramp-preview",styles:C},f("div",{class:r.layerBody},t.infos.map((e=>f("div",{class:this.classes(r.layerRow,r.sizeRamp)},f("div",{class:r.symbol,styles:u,bind:e.preview,afterCreate:v}))))),f("div",{styles:b,key:"color-ramp-preview"},f("div",{styles:R},f("div",{styles:A},f("div",{class:r.rampContainer,bind:y,afterCreate:v})),f("div",{styles:A},f("div",{class:r.rampLabelsContainer,styles:L},g)))))}_renderLegendForRamp(e,s){const a=e.infos,t="opacity-ramp"===e.type,i="heatmap-ramp"===e.type,l="stretch-ramp"===e.type,o=e.preview,n=t?r.opacityRamp:"";o.className=`${r.colorRamp} ${n}`,null!=s&&(o.style.opacity=s.toString());const p=a.map((e=>f("div",{class:e.label?r.rampLabel:void 0},i?this.messages[e.label]||e.label:l?h(e,this.messages):e.label))),d={width:`${w}px`},c={height:o.style.height};return f("div",{class:r.layerRow},f("div",{class:r.symbolContainer,styles:d},f("div",{class:r.rampContainer,bind:o,afterCreate:v})),f("div",{class:r.layerInfo},f("div",{class:r.rampLabelsContainer,styles:c},p)))}_renderLegendForElementInfo(e,s,a,t,i){if(e.type)return this._renderLegendForElement(e,s,a,!0);let l=null;const o=g(s,i);if(e.preview?l=f("div",{class:r.symbol,bind:e.preview,afterCreate:v}):e.src&&(l=this._renderImage(e,s,o)),!l)return null;const n={[r.imageryLayerInfoStretched]:o},p={[r.imageryLayerInfoStretched]:o,[r.sizeRamp]:!o&&t};return f("div",{class:r.layerRow},f("div",{class:this.classes(r.symbolContainer,p)},l),f("div",{class:this.classes(r.layerInfo,n)},m(this.messages,e.label,!1)||""))}_renderImage(e,s,a){const{label:t,src:i,opacity:l}=e,o={[r.imageryLayerStretchedImage]:a,[r.symbol]:!a},n={opacity:`${null!=l?l:s.opacity}`};return f("img",{alt:m(this.messages,t,!1),"aria-label":m(this.messages,t,!1),src:i,border:0,width:e.width,height:e.height,class:this.classes(o),styles:n})}};e([s()],_.prototype,"activeLayerInfos",void 0),e([s()],_.prototype,"headingLevel",void 0),e([s(),b("esri/widgets/Legend/t9n/Legend")],_.prototype,"messages",void 0),e([s({readOnly:!0})],_.prototype,"type",void 0),_=e([a("esri.widgets.Legend.styles.Classic")],_);const j=_;export{j as default};