@arcgis/core 4.32.9 → 4.32.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/kernel.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var RemoteClient;(()=>{var e={2131:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},90237:(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}function s(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,s;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}r.d(t,{_:()=>n,b:()=>s,c:()=>i});var o="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function i(e){function t(t){e.error=e.hasError?new o(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function s(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(s);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(s,(function(e){return t(e),s()}))}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},92602:(e,t,r)=>{"use strict";r.d(t,{A:()=>s}),r(44208);var n=r(93637);const s={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:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,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:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.$N)(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.32";s.assetsPath=`https://js.arcgis.com/${e}/@arcgis/core/assets`}s.defaultAssetsPath=s.assetsPath}},69622:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(51447),s=r(71511),o=r(53966),i=r(97768),a=r(56454),c=r(16649),l=r(45873),u=r(96156),f=(r(44208),r(4718)),d=r(93687),h=r(11406),p=r(35666),g=r(62788),y=r(47328),b=r(67867);class m extends h.T{constructor(e,t){super(),this.propertyName=e,this.metadata=t,this.trackingTarget=new b.R(this),this.flags=0,this.flags=y.i.Dirty|(t.nonNullable?y.i.NonNullable:0)|(t.hasOwnProperty("value")?y.i.HasDefaultValue:0)|(void 0===t.get?y.i.DepTrackingInitialized:0)|(void 0===t.dependsOn?y.i.AutoTracked:0)}destroy(){this.flags&y.i.Dirty&&this.onCommitted(),super.destroy(),this.trackingTarget.destroy()}getComputed(e){e.mutable&&(0,g.gc)(this);const t=e.store,r=this.propertyName,n=this.flags,s=t.get(r);if(n&y.i.Computing)return s;if(~n&y.i.Dirty&&t.has(r))return s;this.flags|=y.i.Computing;const o=e.host;let i;n&y.i.AutoTracked?i=(0,g.a)(this.trackingTarget,this.metadata.get,o):((0,g.Xr)(o,this),i=this.metadata.get.call(o)),this.flags|=y.i.DepTrackingInitialized,t.set(r,i,p.Gr.COMPUTED);const a=t.get(r);return a===s?this.flags&=~y.i.Dirty:(0,g.F_)(this.commit,this),this.flags&=~y.i.Computing,a}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}commit(){this.flags&=~y.i.Dirty,this.onCommitted()}onInvalidated(){~this.flags&y.i.Overridden&&(this.flags|=y.i.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()}}}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,f.o8)(r))})),t}get(e){return this._values.get(e)}originOf(){return p.Gr.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.flags&y.i.NonNullable&&(n.lifecycle,l.v.INITIALIZING,1))}class A{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.lifecycle=l.v.INITIALIZING,this.store=new v,this.mutable=!0,this._origin=p.Gr.USER;const t=this.host.constructor.__accessorMetadata__;for(const e in t){const r=new m(e,t[e]);this.propertiesByName.set(e,r)}this.metadata=t}initialize(){this.lifecycle=l.v.CONSTRUCTING}constructed(){this.lifecycle=l.v.CONSTRUCTED}destroy(){this.lifecycle=l.v.DESTROYED,this.propertiesByName.forEach((e=>e.destroy()))}get initialized(){return this.lifecycle!==l.v.INITIALIZING}get(e){const t=this.propertiesByName.get(e);if(t.metadata.get)return t.getComputed(this);this.mutable&&(0,g.gc)(t);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.flags&y.i.HasDefaultValue)return"defaults"}return(0,p.OL)(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 b.R,o=(0,g.a)(s,(()=>n.metadata.get?.call(e)));let i=`${r}${e.declaredClass.split(".").pop()}.${t}: ${o}\n`;const a=s.accessed??new Set;if(0===a.size)return i;r+=" ";for(const e of a)e instanceof m&&(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.flags&y.i.Overridden)}clearOverride(e){const t=this.propertiesByName.get(e);t&&t.flags&y.i.Overridden&&(t.flags&=~y.i.Overridden,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(O.release(e),!r)return;t=s}r.flags|=y.i.Overridden,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(O.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.aB)(e)}getDefaultOrigin(){return(0,p.OL)(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!==l.v.INITIALIZING?this._origin:p.Gr.DEFAULTS;this._setAtOrigin(e,t,r)}_setAtOrigin(e,t,r){const n=this.store,s=e.propertyName;n.has(s,r)&&(0,f.aI)(t,n.get(s))&&~e.flags&y.i.Overridden&&r===n.originOf(s)||(e.invalidate(),n.set(s,t,r),e.commit(),(0,g.fE)(this.host,e))}_cast(e,t){const r=O.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}const O=new d.A(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var S=r(47821);var k;!function(e){e[e.Ignore=0]="Ignore",e[e.Destroy=1]="Destroy",e[e.ThrowError=2]="ThrowError"}(k||(k={}));var E,T,N=r(14012),j=r(10107),P=r(40608);function C(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 I=Symbol("Accessor-Handles"),M=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,u.tD)(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=C(t[e]);(0,j.MZ)(r)(o.prototype,e)}return(0,P.$)(r)(o)}static freeze(e){return e instanceof x?e.__accessor__.mutable=!1:Object.freeze(e),e}static isFrozen(e){return e instanceof x?!e.__accessor__.mutable:Object.isFrozen(e)}constructor(...e){if(this[E]=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&&(t.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0])}postscript(){const e=this.__accessor__,t=e.ctorArgs;e.initialize(),t&&(this.set(t),e.ctorArgs=null),e.constructed(),this.initialize(),this[M]=!0}initialize(){}[a.G](){this[I]=(0,i.pR)(this[I])}destroy(){this.destroyed||((0,N.iS)(this),this.__accessor__.destroy())}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[M]}get destroyed(){return this.__accessor__?.lifecycle===l.v.DESTROYED||!1}commitProperty(e){(0,c.Jt)(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,S.h)(this,e,t),this}watch(e,t,r){return(0,n.eO)(o.A.getLogger(this),"`watch` is deprecated in favor of reactiveUtils.watch",{replacement:"reactiveUtils.watch",version:"4.32",see:"https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html#watch",warnOnce:!0}),(0,N.wB)(this,e,t,r)}addHandles(e,t){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove()}else(this[I]??=new s.A).add(e,t)}removeHandles(e){this[I]?.remove(e)}removeAllHandles(){this[I]?.removeAll()}removeHandlesReference(e){this[I]?.removeReference(e)}hasHandles(e){return!0===this[I]?.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}}E=I,T=M},98291:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(93687);function s(e){e.length=0}class o{constructor(e=50,t=50){this._pool=new n.A(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)},49186:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(4718),s=r(53966),o=r(79907);class i extends o.A{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.o8)(t)}catch(e){return"[object]"}})))}}catch(e){throw s.A.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"},71511:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(5479);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.xZ)(e)){const r=this._getOrCreateGroup(t);for(const t of e)a(t)&&r.push(t)}else a(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(o(e))}remove(e){if("string"!=typeof e&&(0,n.xZ)(e)){for(const t of e)this.remove(t);return this}return this.has(e)?(i(this._getGroup(e)),this._groups.delete(o(e)),this):this}removeAll(){return this._groups.forEach(i),this._groups.clear(),this}removeReference(e){return this._groups.delete(e),this}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(o(e),t),t}_getGroup(e){return this._groups.get(o(e))}}function o(e){return e||"_default_"}function i(e){for(const t of e)t instanceof s?t.removeAll():t.remove()}function a(e){return null!=e&&(!!e.remove||e instanceof s)}},25482:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(90237),s=r(69622),o=r(4718),i=r(35666);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.o8)(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.Gr.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.Gr.DEFAULTS){const t=this._values.get(e);if(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.Gr.DEFAULTS?e:i.Gr.USER}}class c{constructor(e,t){this.value=e,this.origin=t}}var l=r(76953),u=r(45917),f=r(88620),d=r(49422),h=r(40608);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,f.oY)(this),r=t.store,n=new a;t.store=n,(0,l.k)(t,r,n)}read(e,t){(0,u.L)(this,e,t)}write(e,t){return(0,d.M)(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.$)("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}let y=class extends(p(s.A)){};var b;y=(0,n._)([(0,h.$)("esri.core.JSONSupport")],y),(b=y||(y={})).JSONSupportMixin=p,b.isSerializable=function(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON};const m=y},53966:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(92602),s=(r(44208),r(799));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(){}static get test(){}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=function(...e){return(0,s.Wm)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=i._tickCounter)return;this._loggedMessages[e].set(n,i._tickCounter),i._scheduleTickCounterIncrement()}for(const t of n.A.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",a)}_matchLevel(e){const t=n.A.log.level||"warn";return o[this._parentWithMember("level",t)]<=o[e]}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then((()=>{i._tickCounter++,i._tickCounterScheduled=!1})))}}function a(e,t,...r){console[e](`[${t}]`,...r)}i._loggers=new Map,i._tickCounter=0,i._tickCounterScheduled=!1,i._throttlingDisabled=!1},91869:(e,t,r)=>{"use strict";function n(e,t){for(const r of e.values())if(t(r))return!0;return!1}function s(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}function o(e){const t=new Map;return r=>(t.has(r)||t.set(r,e(r)),t.get(r))}r.d(t,{Bj:()=>o,Bs:()=>n,tE:()=>s})},79907:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(93637);class s{constructor(e,t,r=void 0){this.name=e,this.details=r,this.message=(t&&function(e,t){return e.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,((e,r)=>""===r?"$":((0,n.wc)(r,t)??"").toString()))}(t,r))??""}toString(){return"["+this.name+"]: "+this.message}}},93687:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});class n{constructor(e,t,r,n=1,s=0){this._ctor=e,this._acquireFunction=t,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s;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?.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}},61604:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});class n{constructor(e,t=30){this.name=e,this._counter=0,this._samples=new Array(t)}push(e){null!=e&&(this._samples[++this._counter%this._samples.length]=e)}set(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]}}},3694:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n,s=r(4576),o=r(21818);!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 i=n;class a{constructor(e){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new s.vW,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=()=>c(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++,c(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.qh)(this.data,(0,o.zI)(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.qh)(this.data,(0,o.zI)(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.mW)(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){i.sort(this.data,0,this.length,e)}iterableSort(e){return i.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){const{data:r,length:n}=this;for(let s=0;s<n;++s)if(e.call(t,r[s]))return r[s]}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{data:r,length:n}=this;for(let s=0;s<n;++s)e.call(t,r[s],s,r)}forEach(e,t){this.data.slice(0,this.length).forEach(e,t)}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}*[Symbol.iterator](){for(let e=0;e<this.length;e++)yield this.data[e]}}function c(e){e.data.length>1.5*e.length&&(e.data.length=Math.floor(1.1*e.length))}},87811:(e,t,r)=>{"use strict";r.d(t,{A:()=>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},67076:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(79907);class s extends n.A{constructor(e,t,r){super(e,t,r)}}s.prototype.type="warning"},11406:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(36563),s=r(4576);class o{constructor(e,t){this._observers=e,this._observer=t}remove(){(0,s.TF)(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.hA)()},35666:(e,t,r)=>{"use strict";var n;r.d(t,{AU:()=>s,Gr:()=>n,OL:()=>i,aB:()=>o,in:()=>a}),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)}},56454:(e,t,r)=>{"use strict";r.d(t,{G:()=>n});const n=Symbol("Accessor-beforeDestroy")},10107:(e,t,r)=>{"use strict";r.d(t,{MZ:()=>c,rM:()=>l});var n=r(53966),s=r(56507),o=r(16649),i=r(96156),a=r(47821);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.z4)(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.A.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 u=e.aliasOf;if(u){const e="string"==typeof u?u:u.source,t="string"==typeof u?null:!0===u.overridable;let n;l.dependsOn=[e],l.get=function(){let t=(0,o.Jt)(this,e);if("function"==typeof t){n||(n=e.split(".").slice(0,-1).join("."));const r=(0,o.Jt)(this,n);r&&(t=t.bind(r))}return t},l.readOnly||(l.set=t?function(e){this._override(r,e)}:function(t){(0,a.h)(this,e,t)})}const f=e.type,d=e.types;if(!l.cast){let t;f?t=function(e){let t=0,r=e;if((0,s.Zu)(e))return(0,s.Nd)(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.EK)(n))return 0===t?(0,s.MB)(n):(0,s._e)((0,s.MB)(n),t);if(1===t)return(0,s.eC)(n);if(t>1)return(0,s.e6)(n,t);const o=e;return o.from?o.from:(0,s.dp)(o)}(f):d&&(t=Array.isArray(d)?(0,s.wB)((0,s.aq)(d[0])):(0,s.aq)(d)),e.cast=function(e,t){if(e||t)return e?t?(r,n)=>t(e(r,n),n):e:t}(e.cast,t)}(0,i.CX)(l,e),e.range&&(l.cast=(0,s.Qp)(l.cast,e.range))}}function l(e,t,r){const n=(0,i.z4)(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}},40608:(e,t,r)=>{"use strict";r.d(t,{$:()=>f}),r(44208);var n=r(53966),s=r(56454),o=r(45873),i=r(96156),a=r(62788),c=r(51822);const l=new Set,u=new Set;function f(e){return t=>{e??="esri.core.Accessor",t.prototype.declaredClass=e,h(t);const r=[],n=[];let o=t.prototype;for(;o;)o.hasOwnProperty("initialize")&&!l.has(o.initialize)&&(l.add(o.initialize),r.push(o.initialize)),o.hasOwnProperty("destroy")&&!u.has(o.destroy)&&(u.add(o.destroy),n.push(o.destroy)),o=Object.getPrototypeOf(o);l.clear(),u.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)}}),n.length){let e=!1;const t=this[s.G];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){e=!0,t.call(this);for(let e=0;e<n.length;e++)n[e].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};a.__accessorMetadata__=(0,i.tD)(t.prototype),a.prototype.declaredClass=e;const c=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(a,"name",{value:c,configurable:!0}),a}}function d(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;t.mutable&&(0,a.gc)(r);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 h(e){const t=e.prototype,r=(0,i.tD)(t),n={};for(const e of Object.getOwnPropertyNames(r)){const t=r[e];(0,c.qk)(t),n[e]={enumerable:!0,configurable:!0,get:d(e,t),set(r){const n=this.__accessor__;if(void 0!==n){if(n.mutable)return n.initialized&&t.readOnly?p("read-only",e):n.lifecycle===o.v.CONSTRUCTED&&t.constructOnly?p("construct-only",e):void n.set(e,r)}else Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(e.prototype,n)}const p=(e,t)=>{n.A.getLogger("esri.core.Accessor").error(`cannot assign to ${e} property '${t}'`)}},76953:(e,t,r)=>{"use strict";r.d(t,{k:()=>s});var n=r(35666);function s(e,t,r){t.keys().forEach((e=>{r.set(e,t.get(e),n.Gr.DEFAULTS)}));const s=e.metadata;Object.keys(s).forEach((t=>{e.internalGet(t)&&r.set(t,e.internalGet(t),n.Gr.DEFAULTS)}))}},56507:(e,t,r)=>{"use strict";r.d(t,{EK:()=>T,GB:()=>l,GX:()=>c,MB:()=>N,Nd:()=>x,PZ:()=>m,Qp:()=>d,Uv:()=>C,Vr:()=>u,Zu:()=>M,_e:()=>k,aq:()=>j,dp:()=>w,e6:()=>E,eC:()=>O,gK:()=>I,jz:()=>P,wB:()=>A}),r(44208);var n=r(53966),s=r(91869);const o=()=>n.A.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,t=0){return null==e?e:(e=parseFloat(e),isNaN(e)?t:e)}function u(e){return null==e?e:Math.round(parseFloat(e))}function f(e){return null}function d(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}}function h(e){return e?.constructor&&void 0!==e.constructor.__accessorMetadata__}function p(e,t){return null!=t&&e&&!(t instanceof e)}function g(e){return e&&"isCollection"in e}function y(e){return e?.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function b(e,t){return!!h(t)&&(o().error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+v(e)+"'"),!0)}function m(e,t){return null==t?t:g(e)?function(e,t){if(!t?.constructor||!g(t.constructor))return b(e,t)?t:new e(t);const r=y(e.prototype.itemType),n=y(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(b(e,t),t):new e(t):t}(e,t):p(e,t)?b(e,t)?t:new e(t):t}function v(e){return e?.prototype?.declaredClass||"unknown"}const _=new WeakMap;function w(e,t){const r=function(e){switch(e){case Number:return e=>l(e);case P:return u;case Boolean:return a;case String:return c;case Date:return i;case C:return f;default:return(0,s.tE)(_,e,(()=>m.bind(null,e)))}}(e);return 1===arguments.length?r:r(t)}function A(e,t,r){return 1===arguments.length?A.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,r))):[e(t,r)]:t}function O(e,t){return 1===arguments.length?A((t=>w(e,t))):A((t=>w(e,t)),t)}function S(e,t,r){return 0!==t&&Array.isArray(r)?r.map((r=>S(e,t-1,r))):e(r)}function k(e,t,r){if(2===arguments.length)return r=>k(e,t,r);if(!r)return r;r=S(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 E(e,t,r){return 2===arguments.length?k((t=>w(e,t)),t):k((t=>w(e,t)),t,r)}function T(e){return!!Array.isArray(e)&&!e.some((t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)}))}function N(e,t){if(2===arguments.length)return N(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=>!p(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=>v(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 j(e,t){if(2===arguments.length)return j(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const o=e.typeMap[t];r[t]=w(o),n.push(v(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&&!p(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(!p(e.typeMap[n],t))return t;if("string"==typeof e.key&&!h(t)){const r={};for(const n in t)n!==e.key&&(r[n]=t[n]);return s(r)}return s(t)}}class P{}class C{}const I={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function M(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function x(e){switch(e.type){case"native":return w(e.value);case"array":return A(x(e.value));case"one-of":return function(e){let t=null;return(r,n)=>R(r,e)?r:(null==t&&(t=$(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 $(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case P:return"integer";case Date:return"date";case C:return"null";default:return v(e.value)}case"array":return`array of ${$(e.value)}`;case"one-of":{const t=e.values.map((e=>$(e)));return`one of ${t.slice(0,-1)} or ${t[t.length-1]}`}}return"unknown"}function R(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case P:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e;case C:return null===e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!R(e,t.value)));case"one-of":return t.values.some((t=>R(e,t)))}}},51822:(e,t,r)=>{"use strict";r.d(t,{xF:()=>u,N5:()=>f,k4:()=>d,qk:()=>b});var n=r(56507),s=r(90360);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(67124);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.EK)(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.v)(o,n,!1),n.types&&!n.write&&e.json.write?.enabled&&(n.write={...e.json.write}),(0,l.v)(o,n)}(0,s.v)(t,e.json,!0),(0,l.v)(t,e.json)}(e))}},90360:(e,t,r)=>{"use strict";r.d(t,{C:()=>u,v:()=>l});var n=r(53966),s=r(93637),o=r(67076),i=r(96156),a=r(15903);const c=()=>n.A.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.sM)("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.tD)(n.prototype);if("function"==typeof e.key)continue;const o=s[e.key];if(!o)continue;if(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;continue}const a=o.json?.write;if(!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?.messages&&s&&l.messages.push(new o.A(`${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.P)(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}},15903:(e,t,r)=>{"use strict";function n(e){return!!e&&e.prototype?.declaredClass&&0===e.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(t,{P:()=>n})},67124:(e,t,r)=>{"use strict";r.d(t,{B:()=>f,v:()=>a});var n=r(49186),s=r(53966),o=r(93637),i=r(15903);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.P)(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.sM)(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.A(`${o}:unsupported`,i,{definition:e,context:r})),s.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function l(e,t,r,n){(0,o.sM)(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.sM)(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)}},16649:(e,t,r)=>{"use strict";r.d(t,{Jt:()=>a,RP:()=>i,t2:()=>c});var n=r(88620);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.oY)(t);return(0,n.yh)(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.AH)(t),r):s(t,e)}function a(e,t){return i(e,t)}function c(e,t){return void 0!==i(t,e)}},45873:(e,t,r)=>{"use strict";var n;r.d(t,{v:()=>n}),function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED",e[e.DESTROYED=3]="DESTROYED"}(n||(n={}))},96156:(e,t,r)=>{"use strict";r.d(t,{CX:()=>a,tD:()=>o,z4:()=>i});var n=r(4718),s=r(88620);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.o8)(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.h1)(e,t,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(e){return c.test(e)?"replace":"merge"}},45917:(e,t,r)=>{"use strict";r.d(t,{L:()=>u,t:()=>f});var n=r(16649),s=r(88620),o=r(51822);function i(e,t,r){if(!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.t2)(s,r))return!0}else for(const e of s){if(e===t)return!0;if(e.includes(".")&&0===e.indexOf(t)&&(0,n.t2)(e,r))return!0}return!1}function a(e,t,r,n,s){let a=(0,o.N5)(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.N5)(t[c],s),i(a,r,n)&&(e[c]=!0)}function c(e,t,r,n){const s=r.metadata,i=(0,o.xF)(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.oY)(e),u=i.metadata,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.N5)(u[s],r).read,c=a?.source;let l;l=c&&"string"==typeof c?(0,n.RP)(t,c):t[s],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?.messages&&n.messages.push(t):e.loadWarnings.push(t)}))}},47821:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(49186),s=r(44208),o=(r(53966),r(16649));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.Jt)(e,n),s,r)}const a=e.__accessor__;null!=a&&function(e,t){if((0,s.A)("esri-unknown-property-errors")&&!function(e,t){return null!=t.metadata[e]}(e,t))throw new n.A("set:unknown-property",function(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}(e,t))}(t,a),e[t]=r}}},62788:(e,t,r)=>{"use strict";r.d(t,{F_:()=>h,Xr:()=>v,a:()=>d,fE:()=>b,gc:()=>l}),r(44208);var n=r(53966),s=r(88620),o=r(47328);const i=new(r(67867).R),a=[];let c=i;function l(e){c.onAccessed(e)}let u=!1,f=!1;function d(e,t,r){if(u)return p(e,t,r);let n=null;return g(e),n=t.call(r),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.A.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){if(t.flags&o.i.DepTrackingInitialized)return;t.flags|=o.i.DepTrackingInitialized;const r=f;f=!1,t.flags&o.i.AutoTracked?p(t.trackingTarget,t.metadata.get,e):v(e,t),f=r}const m=[];function v(e,t){t.flags&o.i.ExplicitlyTracking||(t.flags|=o.i.ExplicitlyTracking,p(t.trackingTarget,(()=>{const r=t.metadata.dependsOn||m;for(const t of r)if("string"!=typeof t||t.includes(".")){const r=(0,s.AH)(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)})),t.flags&=~o.i.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.oY)(e);if(o){const t=o.propertiesByName.get(n);t&&(l(t),b(e,t))}return r?e[n]:void 0}},47328:(e,t,r)=>{"use strict";var n;r.d(t,{i:()=>n}),function(e){e[e.Dirty=1]="Dirty",e[e.Overridden=2]="Overridden",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={}))},71429:(e,t,r)=>{"use strict";r.d(t,{r:()=>s});var n=r(67867);class s extends n.R{constructor(e){super(new o(e)),this._observer&&i.register(this,new WeakRef(this._observer),this)}destroy(){this._observer&&i.unregister(this._observer),this.accessed?.clear(),this.clear(),this._observer?.destroy()}}class o{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=a}}const i=new FinalizationRegistry((e=>{e.deref()?.destroy()}));function a(){}},67867:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});class n{constructor(e){this.accessed=void 0,this._handles=void 0,this._observer=e}destroy(){this.accessed?.clear(),this.clear()}onAccessed(e){null!=this._observer&&e!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(e))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach((e=>{this._handles.push(e.observe(this._observer))})),this.accessed.clear()))}clear(){if(null!=this._handles){for(let e=0;e<this._handles.length;++e)this._handles[e].remove();this._handles.length=0}}}},80559:(e,t,r)=>{"use strict";r.d(t,{Df:()=>l,fm:()=>u,mJ:()=>c});var n=r(36563),s=r(62788),o=r(71429);let i=!1;const a=[];function c(e,t){let r=new o.r((function n(){if(!r||c)return;if(i)return void f(n);const o=a;r.clear(),i=!0,c=!0,a=(0,s.a)(r,e),c=!1,i=!1,t(a,o),d()})),a=null,c=!1;return c=!0,a=(0,s.a)(r,e),c=!1,(0,n.hA)((function(){r&&(r.destroy(),r=null,a=null)}))}function l(e,t){let r=new o.r((function(){t(i,a)})),i=null;function a(){return r?(r.clear(),i=(0,s.a)(r,e),i):null}return a(),(0,n.hA)((function(){r&&(r.destroy(),r=null),i=null}))}function u(e,t){let r=!1,a=!1;const c=!!t?.sync;let l=new o.r((()=>{r||a||(a=!0,c?u():queueMicrotask(u))}));function u(){a=!1,l&&!r&&(i?f(u):(l.clear(),i=!0,r=!0,(0,s.a)(l,e),r=!1,i=!1,d()))}return r=!0,(0,s.a)(l,e),r=!1,(0,n.hA)((function(){l&&(l.destroy(),l=null)}))}function f(e){a.includes(e)||a.unshift(e)}function d(){for(;a.length;)a.pop()()}},88620:(e,t,r)=>{"use strict";r.d(t,{AH:()=>l,h1:()=>a,oY:()=>o,qg:()=>f,yh:()=>i});var n=r(36563),s=r(4718);function o(e){return e.__accessor__??null}function i(e,t){return null!=e?.metadata?.[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.o8)(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.slice():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.vE)(t)}return s(e,o[0],r)}},14012:(e,t,r)=>{"use strict";r.d(t,{iS:()=>A,wB:()=>E,Cn:()=>T});var n=r(98291),s=r(36563),o=r(4718),i=r(93687);class a extends i.A{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(11932),f=r(24326),d=r(16649),h=r(45873),p=r(80559),g=r(88620);(l=c||(c={}))[l.Untracked=0]="Untracked",l[l.Tracked=1]="Tracked";class y{constructor(){this.uid=(0,f.c)(),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.aI)}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.c)(),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.c)(),this.removed=!0}}y.pool=new a(y);const b=new n.A,m=new Set;let v;function _(e){m.delete(e),m.add(e),v||(v=(0,u._)(O))}function w(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function A(e){for(const t of m.values())t.target===e&&(t.removed=!0)}function O(){let e=10;for(;v&&e--;){v=null;const e=S(),t=b.acquire();for(const r of e){const e=r.uid;w(r),e===r.uid&&r.removed&&t.push(r)}for(const e of m)e.removed&&(t.push(e),m.delete(e));for(const e of t)y.pool.release(e);b.release(t),b.release(e),k.forEach((e=>e()))}}function S(){const e=b.acquire();e.length=m.size;let t=0;for(const r of m)e[t]=r,++t;return m.clear(),e}const k=new Set;function E(e,t,r,n=!1){return e.__accessor__&&e.__accessor__.lifecycle!==h.v.DESTROYED?n?function(e,t,r){const n=(0,g.qg)(e,t,r,((e,t,r)=>{let s=!1;return(0,p.mJ)((()=>(0,d.RP)(e,t)),((i,a)=>{e.__accessor__.lifecycle!==h.v.DESTROYED?s||(s=!0,(0,o.aI)(a,i)||r.call(e,i,a,t,e),s=!1):n.remove()}))}));return n}(e,t,r):function(e,t,r){let n=(0,g.qg)(e,t,r,((e,t,r)=>{let o,i,a=(0,p.Df)((()=>(0,d.RP)(e,t)),((s,a)=>{e.__accessor__?.lifecycle===h.v.DESTROYED||o&&o.uid!==i?n.remove():(o||(o=y.acquireUntracked(s,r,a,e,t),i=o.uid),_(o))}));return(0,s.hA)((()=>{a.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,_(o)),o=null),n=a=null}))}));return n}(e,t,r):(0,s.hA)()}function T(e,t,r=!1,n=o.gh){return r?function(e,t,r){let n=!1;return(0,p.mJ)(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,p.Df)(e,((e,s)=>{n&&n.uid!==o?i.remove():(n||(n=y.acquireTracked(e,t,s,r),o=n.uid),_(n))}));return(0,s.hA)((()=>{i.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,_(n)),n=null),i=null}))}(e,t,n)}},49422:(e,t,r)=>{"use strict";r.d(t,{M:()=>h,R:()=>d});var n=r(4576),s=r(49186),o=r(53966),i=r(16649),a=r(35666),c=r(88620),l=r(51822);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?.write)return!1;const f=(0,i.Jt)(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(l.layerContainerTypes&&u?.layerContainerType&&!l.layerContainerTypes.includes(u.layerContainerType))return!1;if((null===f&&!l.allowNull&&!l.writerEnsuresNonNull||void 0===f)&&l.isRequired){const t=new s.A("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return t&&u?.messages?u.messages.push(t):t&&!u&&o.A.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.Gr.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.aI)(s,o)}return!1}return i===o}(e,r,u,c,f)||!l.ignoreOrigin&&u?.origin&&t.store.multipleOriginsSupported&&t.store.originOf(r)<(0,a.aB)(u.origin))}function d(e,t,r,n){const s=(0,c.oY)(e),o=s.metadata,i=(0,l.k4)(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.h1)(t,e.toJSON(r));const n=(0,c.oY)(e),s=n.metadata;for(const o in s){const d=(0,l.k4)(s[o],r);if(!f(e,n,o,d,void 0,r))continue;const h=(0,i.Jt)(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.h1)(t,p),r?.resources?.pendingOperations?.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then((()=>(0,c.h1)(t,p,(()=>"replace-arrays"))))),r?.writtenProperties&&r.writtenProperties.push({target:e,propName:o,oldOrigin:(0,a.in)(n.store.originOf(o)),newOrigin:r.origin}))}return t}},4576:(e,t,r)=>{"use strict";r.d(t,{$U:()=>a,Am:()=>c,He:()=>i,Ji:()=>o,Mo:()=>m,Ru:()=>A,TF:()=>w,Xj:()=>f,Xy:()=>g,aI:()=>l,iv:()=>u,k4:()=>_,mW:()=>b,qh:()=>p,vW:()=>d});var n=r(21818),s=r(87811);const o=1.5,i=1/o,a=.5;function c(e,t){return t?e.filter(((e,r,n)=>n.findIndex(t.bind(null,e))===r)):Array.from(new Set(e))}function l(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 u(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 f(e){return e&&"number"==typeof e.length}class d{constructor(){this.last=0}}const h=new d;function p(e,t,r,n){n=n||h;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 g(e,t,r,s){const o=r??e.length,i=p(e,(0,n.zI)(t),o,s);if(-1!==i)return e[i]=e[o-1],null==r&&e.pop(),t}const y=new Set;function b(e,t,r=e.length,n=t.length,s,o){if(0===n||0===r)return r;y.clear();for(let e=0;e<n;++e)y.add(t[e]);s=s||h;const i=Math.max(0,s.last-10);for(let t=i;t<r;++t)if(y.has(e[t])&&(o?.push(e[t]),y.delete(e[t]),e[t]=e[r-1],--r,--t,0===y.size||0===r))return y.clear(),r;for(let t=0;t<i;++t)if(y.has(e[t])&&(o?.push(e[t]),y.delete(e[t]),e[t]=e[r-1],--r,--t,0===y.size||0===r))return y.clear(),r;return y.clear(),r}function m(e){return e?(v.seed=e,()=>v.getFloat()):Math.random}const v=new s.A;function _(e,t){const r=m(t);for(let t=e.length-1;t>0;t--){const n=Math.floor(r()*(t+1)),s=e[t];e[t]=e[n],e[n]=s}return e}function w(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function A(e,t){return null!=e}},21818:(e,t,r)=>{"use strict";function n(e){}function s(e){return e}r.d(t,{Xb:()=>n,zI:()=>s}),r(44208)},51447:(e,t,r)=>{"use strict";r.d(t,{Lx:()=>a,eF:()=>c,eO:()=>i,io:()=>l});var n=r(44208);const s=new WeakMap;function o(e,t,r=!1){const n=`🛑 DEPRECATED - ${t}`;if(!r)return void e.warn(n);let o=s.get(e);o||(o=new Set,s.set(e,o)),o.has(t)||(o.add(t),e.warn(n))}function i(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{moduleName:n}=r;l(e,"Function: "+(n?n+"::":"")+t+"()",r)}}function a(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{moduleName:n}=r;l(e,"Property: "+(n?n+"::":"")+t,r)}}function c(e,t,r={}){(0,n.A)("esri-deprecation-warnings")&&l(e,`Multiple argument constructor: ${t}`,{warnOnce:!0,replacement:`new ${t}({ <your properties here> })`,...r})}function l(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{replacement:n,version:s,see:i,warnOnce:a}=r;let c=t;if(n&&(c+=`\n\t🛠️ Replacement: ${n}`),s&&(c+=`\n\t⚙️ Version: ${s}`),i)if(Array.isArray(i)){c+="\n\t🔗 See for more details:";for(const e of i)c+=`\n\t\t${e}`}else c+=`\n\t🔗 See ${i} for more details.`;o(e,c,a)}}},37955:(e,t,r)=>{"use strict";r.d(t,{Oo:()=>a,on:()=>i,wb:()=>s});var n=r(36563);function s(e){return function(e){return null!=e&&"object"==typeof e&&"on"in e&&"function"==typeof e.on}(e)||o(e)}function o(e){return null!=e&&"object"==typeof e&&"addEventListener"in e&&"function"==typeof e.addEventListener}function i(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");return o(e)?function(e,t,r,s){if(Array.isArray(t)){const o=t.slice();for(const t of o)e.addEventListener(t,r,s);return(0,n.hA)((()=>{for(const t of o)e.removeEventListener(t,r,s)}))}return e.addEventListener(t,r,s),(0,n.hA)((()=>e.removeEventListener(t,r,s)))}(e,t,r):e.on(t,r)}function a(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=i(e,t,(t=>{n.remove(),r.call(e,t)}));return n}},36563:(e,t,r)=>{"use strict";r.d(t,{hA:()=>s,vE:()=>o});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)))}},44208:(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,{A:()=>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("big-integer-warning-enabled",!0),s.add("esri-deprecation-warnings",!0),s.add("esri-tests-disable-screenshots",!1),s.add("esri-tests-use-full-window",!1),s.add("esri-tests-post-to-influx",!0),s.add("esri-cim-animations-enable-status","enabled"),s.add("esri-cim-animations-spotlight",!1),s.add("esri-cim-animations-freeze-time",!1),s.add("enable-feature:multiple-highlights",!0),(()=>{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-performance-mode-frames-between-render",20),s.add("esri-force-performance-mode",!1),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-fast-triangulation-enabled",!0),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-query-max-depth",4),s.add("featurelayer-query-pausing-enabled",!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-essential-goto-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("request-queue-concurrency-hosted",16),s.add("request-queue-concurrency-non-hosted",4),s.add("curve-densification-coarse-segments",128),s.add("curve-densification-max-segments",2e3),s.add("curve-densification-min-segments",3),s.add("curve-densification-pixels-per-segment",16),s.add("view-readyState-waiting-delay",1e3),s.add("gradient-depth-bias",.01),s.add("gradient-depth-epsilon",1e-8),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")})))})()},5479:(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,{I6:()=>s,PP:()=>n,xZ:()=>o})},4718:(e,t,r)=>{"use strict";r.d(t,{Nb:()=>c,TU:()=>a,aI:()=>h,gh:()=>p,o8:()=>i,oy:()=>o});var n=r(4576),s=r(34275);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))throw new Error("Trying to clone an unclonable Accessor instance");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))return null;const r=new(0,Object.getPrototypeOf(e).constructor);for(const t of Object.getOwnPropertyNames(e)){const n=e[t],s=a(n);if(null!=n&&null==s)return null;r[t]=s}return r}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.dz)(e)||(0,s.mg)(e)||(0,s.UR)(e)||(0,s.IY)(e)||(0,s.jq)(e)||(0,s._G)(e)||(0,s.XJ)(e)||(0,s.vZ)(e)||(0,s.aI)(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.aI)(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))}},97768:(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}function u(e,t){let r;return e.some(((e,n)=>(r=t(e,n),null!=r))),r??void 0}r.d(t,{CM:()=>l,DC:()=>a,Gz:()=>c,Lw:()=>n,Pb:()=>u,WD:()=>o,pR:()=>s,xt:()=>i})},26390:(e,t,r)=>{"use strict";r.d(t,{d:()=>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()}))}},93637:(e,t,r)=>{"use strict";r.d(t,{$N:()=>s,i8:()=>a,sM:()=>i,wc:()=>o});var n=r(4718);function s(e,t,r=!1){return l(e,t,r)}function o(e,t){if(null!=t)return t[e]||c(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),s=n.pop(),o=c(n,!0,r);o&&s&&(o[s]=t)}function a(e,t){if(null==e&&null==t)return!1;if(null==e)return!0;if(null==t)return!0;if("object"==typeof e){if(Array.isArray(e)){const r=t;if(e.length!==r.length)return!0;for(let t=0;t<e.length;t++)if(a(e[t],r[t]))return!0;return!1}if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const r in e)if(a(e[r],t[r]))return!0;return!1}return e!==t}function c(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 l(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.o8)(i),e):(Array.isArray(i)||Array.isArray(e)?(o=o?Array.isArray(o)?e[s]=o.slice():e[s]=[o]:e[s]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{o.includes(e)||o.push(e)})):e[s]=i.slice())):i&&"object"==typeof i?e[s]=l(o,i,r):e.hasOwnProperty(s)&&!t.hasOwnProperty(s)||(e[s]=i),e)}),e||{}):e}},74887:(e,t,r)=>{"use strict";r.d(t,{Pl:()=>O,Ol:()=>A,nA:()=>w,NK:()=>l,Tw:()=>T,sg:()=>E,Lx:()=>_,QZ:()=>v,zf:()=>m,G4:()=>d,$X:()=>S,u7:()=>g,NY:()=>y,Mq:()=>f,QP:()=>h,Te:()=>u,jH:()=>p,NO:()=>N,z7:()=>k,qr:()=>b});var n=r(36563);const s=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return(0,n.hA)((()=>o.clearTimeout(r)))}});var o,i=r(49186),a=r(37955),c=(r(53966),r(97768));function l(e="Aborted"){return new i.A("AbortError",e)}function u(e,t="Aborted"){if(d(e))throw l(t)}function f(e){return e instanceof AbortSignal?e:e?.signal??void 0}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.Oo)(r,"abort",(()=>t()));t()}}function y(e,t){const r=f(e);if(null!=r)return u(r),(0,a.Oo)(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.xt)(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 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 O(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 S(e){return e&&"function"==typeof e.then}function k(e){return S(e)?e:Promise.resolve(e)}function E(e,t=-1){let r,n,s,o,i=null;const a=(...c)=>{if(r){n=c,o&&o.reject(l()),o=T();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(s=o||T(),o=null,t>0){const n=new AbortController;r=k(e(...c,n.signal));const s=r;O(t).then((()=>{r===s&&(o?n.abort():i=n)}))}else r=1,r=k(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 T(){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)}},11932:(e,t,r)=>{"use strict";r.d(t,{$m:()=>A,_:()=>g,md:()=>w});var n=r(26390),s=r(61604),o=r(3694),i=r(74887),a=r(78659);class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let l=0;const u={time:(0,a.l5)(0),deltaTime:(0,a.l5)(0),elapsedFrameTime:(0,a.l5)(0),frameDuration:(0,a.l5)(0)},f=["prepare","preRender","render","postRender","update","finish"],d=[],h=new o.A,p={frameTasks:h,willDispatch:!1,clearFrameTasks:function(e=!1){h.forAll((e=>{e.removed=!0})),e&&v()},dispatch:_,executeFrameTasks:function(e){const t=(0,a.l5)(e-l);l=e;const r=1e3/60,n=Math.max(0,t-r);u.time=e,u.frameDuration=(0,a.l5)(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.l5)(performance.now()-e),u.deltaTime=0===n.ticks?(0,a.l5)(0):t,n.phases[s]?.call(n,u)))})),O[r].push(performance.now()-n)}v(),S.push(performance.now()-e)},reschedule:function(){null!=y&&(cancelAnimationFrame(y),y=requestAnimationFrame(b))}};function g(e){const t=new c(e);return d.push(t),p.willDispatch||(p.willDispatch=!0,(0,n.d)(_)),t}let y=null;function b(){const e=performance.now();y=null;const t=h.some((e=>!e.paused&&!e.removed));y=t?requestAnimationFrame(b):null,p.executeFrameTasks(e)}const m=new o.A;function v(){h.forAll((e=>{e.removed&&m.push(e)})),h.removeUnorderedMany(m.data,m.length),m.clear()}function _(){for(;d.length;){const e=d.shift();e.isActive&&e.callback()}p.willDispatch=!1}function w(e=1,t){const r=(0,i.Tw)(),s=()=>{(0,i.G4)(t)?r.reject((0,i.NK)()):0===e?r():(--e,(0,n.d)((()=>s())))};return s(),r.promise}async function A(e){await function(e){return w(1,e)}(e),await new Promise((t=>requestAnimationFrame((()=>{e?.aborted||t()}))))}const O=f.map((e=>new s.A(e))),S=new s.A("total")},799:(e,t,r)=>{"use strict";r.d(t,{Cj:()=>a,HC:()=>i,Wm:()=>c,_e:()=>u});var n=r(93637);const s=/\{([^}]+)\}/g;function o(e){return e??""}function i(e,t){return t?e.replaceAll(s,"object"==typeof t?(e,r)=>o((0,n.wc)(r,t)):(e,r)=>o(t(r))):e}function a(e,t){return e.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,(e=>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}let l;function u(e){return l??=new DOMParser,l.parseFromString(e||"","text/html").body.innerText||""}},78659:(e,t,r)=>{"use strict";function n(e){return e}function s(e){return 1e3*e}function o(e){return e}r.d(t,{Kp:()=>o,gr:()=>s,l5:()=>n})},34275:(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}r.d(t,{IY:()=>a,JI:()=>g,UR:()=>i,XJ:()=>u,_G:()=>l,a3:()=>b,aI:()=>d,dk:()=>y,dz:()=>s,iu:()=>h,jq:()=>c,mg:()=>o,mw:()=>n,vZ:()=>f,y9:()=>p}),r(44208);const p=1024;function g(e){return d(e)||f(e)||l(e)||a(e)||s(e)}function y(e){return d(e)||f(e)}function b(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}},24326:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});let n=0;function s(){return++n}},84952:(e,t,r)=>{"use strict";r.d(t,{$1:()=>Q,$z:()=>V,An:()=>T,BQ:()=>oe,DB:()=>Z,FL:()=>B,FX:()=>z,Hg:()=>re,Il:()=>he,N9:()=>se,S8:()=>G,T1:()=>ge,UC:()=>pe,V1:()=>W,Xq:()=>k,Zo:()=>_e,_0:()=>Ae,a6:()=>ve,b8:()=>D,e7:()=>de,fj:()=>H,gd:()=>E,lJ:()=>X,lM:()=>ce,m3:()=>ae,nM:()=>fe,oP:()=>K,oy:()=>$,r$:()=>te,rs:()=>me,s0:()=>w,s2:()=>J,sC:()=>L,s_:()=>P,tk:()=>ne,ut:()=>U,w8:()=>Y,x0:()=>j,xw:()=>we,yM:()=>C,zf:()=>N,zi:()=>be,zs:()=>R});var n=r(92602),s=r(4576),o=r(49186),i=r(25482),a=r(53966),c=r(39131),l=r(26306);const u=()=>a.A.getLogger("esri.core.urlUtils"),f=n.A.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 A={};let O=new w(n.A.applicationUrl);let S=function(){const e=O.path,t=e.slice(0,e.lastIndexOf("/")+1);return`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}${t}`}();const k=()=>O,E=()=>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.slice(0,n),t.query=N(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.slice(0,t.path.length-(r.fragment.length+1)))),t}function N(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 j(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?.[r];return o?s+encodeURIComponent(o(n)):Array.isArray(n)?n.map((e=>i.A.isSerializable(e)?s+encodeURIComponent(JSON.stringify(e)):s+encodeURIComponent(e))).join("&"):i.A.isSerializable(n)?s+encodeURIComponent(JSON.stringify(n)):s+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function P(e=!1){let t,r=f.proxyUrl;if("string"==typeof e){t=ae(e);const n=R(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw u().warn(d),new o.A("urlUtils:proxy-not-set",d);return t&&le()&&(r=ce(r)),T(r)}function C(e,t=!1){const r=R(e);let n,s;if(r){const e=M(r.proxyUrl);n=e.path,s=e.query?N(e.query):null}else if(t){const t=P(e);n=t.path,s=t.query}if(n){const t=T(e);e=n+"?"+t.path;const r=j({...s,...t.query});r&&(e=`${e}?${r}`)}return e}const I={path:"",query:""};function M(e){const t=e.indexOf("?");return-1!==t?(I.path=e.slice(0,t),I.query=e.slice(t+1)):(I.path=e,I.query=null),I}function x(e){return(e=ue(e=he(e=M(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 R(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 D(e,t){if(!e||!t)return!1;e=q(e),t=q(t);const r=(0,c.py)(e),n=(0,c.py)(t);return null!=r&&null!=n?r.portalHostname===n.portalHostname:null==r&&null==n&&z(e,t,!0)}function U(e,t){return e=q(e),t=q(t),ue(e)===ue(t)}function q(e){const t=(e=G(e)).indexOf("/sharing");return t>0?e.slice(0,t):e.replace(/\/+$/,"")}function L(e,t=f.interceptors){const r=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t);if(t)for(const e of t)if(Array.isArray(e.urls)){if(e.urls.some(r))return e}else if(r(e.urls))return e;return null}function z(e,t,r=!1){if(!e||!t)return!1;const n=ye(e),s=ye(t);return!(!r&&n.scheme!==s.scheme)&&null!=n.host&&null!=s.host&&n.host.toLowerCase()===s.host.toLowerCase()&&n.port===s.port}function B(e){if("string"==typeof e){if(!K(e))return!0;e=ye(e)}if(z(e,O))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=F(t[r]);for(let t=0;t<n.length;t++)if(z(e,n[t]))return!0}return!1}function F(e){return A[e]||(ie(e)||oe(e)?A[e]=[new w(J(e))]:A[e]=[new w(`http://${e}`),new w(`https://${e}`)]),A[e]}function J(e,t=S,r){return oe(e)?r?.preserveProtocolRelative?e:"http"===O.scheme&&O.authority===V(e).slice(2)?`http:${e}`:`https:${e}`:ie(e)?e:H("/"===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||!K(e))return e;const n=G(e),s=n.toLowerCase(),o=G(t).toLowerCase().replace(/\/+$/,""),i=r?G(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 G(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&p.test(e)||"http"===O.scheme&&oe(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"===O.scheme&&n===O.authority&&!m.test(e)||(le()&&n===O.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||le()&&!R(e))&&(e=ce(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=M(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=J(e=e.trim()))))}function H(...e){const t=e.filter(s.Ru);if(!t?.length)return;const r=[];if(K(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 V(e,t=!1){if(null==e||Y(e)||Z(e))return null;let r=e.indexOf("://");if(-1===r&&oe(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=ue(e,!0)),e}function K(e){return oe(e)||ie(e)}function Y(e){return null!=e&&"blob:"===e.slice(0,5)}function Z(e){return null!=e&&"data:"===e.slice(0,5)}function X(e){const t=te(e);return t?.isBase64?(0,l.M)(t.data):null}function Q(e){return(0,l.Y)(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=X(e);if(!t)return null;const r=te(e);return new Blob([t],{type:r.mediaType})}function oe(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function ie(e){return null!=e&&h.test(e)}function ae(e){return null!=e&&g.test(e)||"https"===O.scheme&&oe(e)}function ce(e){return oe(e)?`https:${e}`:e.replace(p,"https:")}function le(){return"https"===O.scheme}function ue(e,t=!1){return oe(e)?e.slice(2):(e=e.replace(h,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function fe(e){let t=0;if(K(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function de(e,t){if(!e)return"";const r=T(e).path.replace(/\/+$/,""),n=r.slice(r.lastIndexOf("/")+1);if(!t?.length)return n;const s=new RegExp(`\\.(${t.join("|")})$`,"i");return n.replace(s,"")}function he(e){return e.endsWith("/")?e:`${e}/`}function pe(e){return e.replace(/\/+$/,"")}function ge(e,t,r){if(!(t&&r&&e&&K(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 ye(e){return"string"==typeof e?new w(J(e)):(e.scheme||(e.scheme=O.scheme),e)}function be(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 me(e,t,r){const n=T(e),s=n.query||{};return s[t]=String(r),`${n.path}?${j(s)}`}function ve(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=j(n);return s?`${r.path}?${s}`:r.path}function _e(e){if(null==e)return null;const t=e.match(Oe);return t?t[2]:null}function we(e){if(null==e)return null;const t=e.match(Oe);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 Oe=/([^.]*)\.([^/]*)$/},52268:(e,t,r)=>{"use strict";function n(e,t){return new Proxy({},{get:(r,n,s)=>(...r)=>{let s,o;const i=r[r.length-1];return function(e){return"object"==typeof e&&!Array.isArray(e)&&null!=e&&("signal"in e||"transferList"in e||0===Object.keys(e).length)}(i)&&(s=i.signal,o=i.transferList,r.pop()),e.apply(t?`${t}.${n.toString()}`:n.toString(),r,{transferList:o,signal:s})}})}r.d(t,{L:()=>n})},61322:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});var n=r(70333),s=r(49186),o=r(37955),i=r(36563),a=r(97768),c=r(74887),l=r(52268);const u={statsWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(7455),r.e(2781),r.e(7445),r.e(3009)]).then(r.bind(r,33009)),geometryEngineWorker:()=>Promise.all([r.e(9930),r.e(6387)]).then(r.bind(r,68887)),arcadeGeometryOperatorsWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(1123)]).then(r.bind(r,1123)),CSVSourceWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(752)]).then(r.bind(r,40752)),EdgeProcessingWorker:()=>Promise.all([r.e(3030),r.e(9899),r.e(6575),r.e(1437)]).then(r.bind(r,71936)),ElevationSamplerWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(3030),r.e(2324)]).then(r.bind(r,38419)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(6285),r.e(1956),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(4473),r.e(2678)]).then(r.bind(r,12543)),GeoJSONSourceWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(1202)]).then(r.bind(r,71202)),LercWorker:()=>r.e(7087).then(r.bind(r,57087)),MemorySourceWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(9432)]).then(r.bind(r,29432)),PBFDecoderWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(3720),r.e(9078)]).then(r.bind(r,39078)),FeaturePipelineWorker:()=>Promise.all([r.e(6285),r.e(5721),r.e(5055),r.e(1956),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(9949),r.e(4473),r.e(9423),r.e(377),r.e(5719)]).then(r.bind(r,93705)),PointCloudWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(7455),r.e(690),r.e(2944),r.e(7984),r.e(4731)]).then(r.bind(r,34142)),RasterWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(984),r.e(6049),r.e(2253)]).then(r.bind(r,30139)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(7455),r.e(690),r.e(3030),r.e(9899),r.e(6575),r.e(6064)]).then(r.bind(r,46064)),SceneLayerWorker:()=>Promise.all([r.e(6285),r.e(1956),r.e(9953),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(690),r.e(2944),r.e(958),r.e(4654),r.e(9607)]).then(r.bind(r,36233)),WFSSourceWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(3771)]).then(r.bind(r,33771)),WorkerTileHandler:()=>Promise.all([r.e(2741),r.e(4996),r.e(8902),r.e(9949),r.e(5013),r.e(9423),r.e(3379)]).then(r.bind(r,11764)),Lyr3DWorker:()=>Promise.all([r.e(2741),r.e(9234)]).then(r.bind(r,79234)),Feature3DPipelineWorker:()=>Promise.all([r.e(6285),r.e(8948),r.e(2106),r.e(5721),r.e(1956),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(690),r.e(7339),r.e(2781),r.e(3720),r.e(3030),r.e(5455),r.e(7445),r.e(2944),r.e(9899),r.e(958),r.e(655),r.e(2728),r.e(6702)]).then(r.bind(r,95652)),TextureCompressionWorker:()=>Promise.all([r.e(2741),r.e(6996)]).then(r.bind(r,46996))};var f=r(8341),d=r(18357);const{CLOSE:h,ABORT:p,INVOKE:g,RESPONSE:y,OPEN_PORT:b,ON:m}=f.Go;class v{constructor(e){this._invoke=e,this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._timer=null,this._process=this._process.bind(this)}push(e){e.type===f.Go.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 _{static connect(e,t){const r=new MessageChannel;let n;n="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const s=new _(r.port1,{channel:r,client:n,schedule:t});return"object"==typeof n&&"remoteClient"in n&&(n.remoteClient=s),_.clients.set(s,n),r.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}constructor(e,t,r){this._port=e,this._jobQueue=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new v((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:h}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const n=r?.signal,o=r?.transferList;if(!this._port)return Promise.reject(new s.A(f.T,`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,f.Jc)();return new Promise(((r,s)=>{if((0,c.G4)(n))return this._processWork(),void s((0,c.NK)());const l=(0,c.u7)(n,(()=>{const e=this._outJobs.get(i);e&&(this._outJobs.delete(i),this._processWork(),(0,a.xt)(e.abortHandle),this._post({type:p,jobId:i}),s((0,c.NK)()))})),u={resolve:r,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:g,jobId:i,methodName:e,abortable:null!=n},t,o)}))}createInvokeProxy(e){return(0,l.L)(this,e)}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:f.Go.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),(0,i.hA)((()=>{r.port1.postMessage({type:f.Go.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}))}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._jobQueue?.pop();if(!e)return;const{methodName:t,data:r,invokeOptions:n,resolver:s}=e;this.apply(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.xt)(e.abortHandle),e.reject((0,c.NK)(`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,!0))):this._processMessage(e,!1)}_processMessage(e,t){const r=(0,f.VI)(e);if(r)switch(r.type){case y:this._onResponseMessage(r);break;case g:t?this._onInvokeMessage(r):this._invokeQueue.push(r);break;case p:this._onAbortMessage(r);break;case h:this._onCloseMessage();break;case b:this._onOpenPortMessage(r);break;case m:this._onOnMessage(r)}}_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&&_.clients.get(this)===e&&e.destroy(),_.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,u=l[t];try{if(!u&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)l=l[e[t]],u=l[e[t+1]]}if("function"!=typeof u)throw new TypeError(`${t} is not a function`);n.push({client:this,signal:o?o.signal:null}),a=u.apply(l,n)}catch(e){return void this._post({type:y,jobId:r,error:(0,f.mF)(e)})}(0,c.$X)(a)?(i.set(r,{controller:o,promise:a}),a.then((e=>{i.has(r)&&(i.delete(r),this._post({type:y,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,c.zf)(e)||this._post({type:y,jobId:r,error:(0,f.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:y,jobId:r},a)}_onOpenPortMessage(e){new _(e.port,{client:this._client})}_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,f.VI)(e);s?.type===f.Go.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.xt)(i.abortHandle),r?i.reject(s.A.fromJSON(JSON.parse(r))):i.resolve(n)}_post(e,t,r){return(0,f.u1)(this._port,e,t,r)}}_.kernelInfo={buildDate:d.$,fullVersion:n.ol,revision:d.u},_.clients=new Map},8341:(e,t,r)=>{"use strict";r.d(t,{Go:()=>i,Jc:()=>l,T:()=>o,VI:()=>d,mF:()=>u,oV:()=>p,u1:()=>f});var n=r(44208),s=r(74887);const o="worker:port-closed";var i,a;(a=i||(i={}))[a.HANDSHAKE=0]="HANDSHAKE",a[a.OPEN=1]="OPEN",a[a.OPENED=2]="OPENED",a[a.RESPONSE=3]="RESPONSE",a[a.INVOKE=4]="INVOKE",a[a.ABORT=5]="ABORT",a[a.CLOSE=6]="CLOSE",a[a.OPEN_PORT=7]="OPEN_PORT",a[a.ON=8]="ON";let c=0;function l(){return c++}function u(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 f(e,t,r,s){if(t.type===i.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==i.INVOKE&&t.type!==i.RESPONSE)return void e.postMessage(t);let o;if(function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(o=h(r.transferList),t.data=r.result):(o=h(s),t.data=r),o){if((0,n.A)("ff"))for(const r of o)if("byteLength"in r&&r.byteLength>267386880){const r="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case i.INVOKE:throw r;case i.RESPONSE:return void f(e,{type:i.RESPONSE,jobId:t.jobId,error:u(r)})}}e.postMessage(t,o)}else e.postMessage(t)}function d(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function h(e){if(!e?.length)return null;if((0,n.A)("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}async function p(e){try{return await e}catch(e){const t=e?.name===o;if(!(0,s.zf)(e)&&!t)throw e;return}}},70333:(e,t,r)=>{"use strict";r.d(t,{Aq:()=>c,Y3:()=>l,id:()=>i,ol:()=>a,rE:()=>o});var n=r(44208),s=r(84952);Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const o="4.32";let i,a=o;function c(e){i=e}function l(e){const t=i?.findCredential(e);return t?.token?(0,s.rs)(e,"token",t.token):e}a="4.32.9",(0,n.A)("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),(0,n.A)("host-webworker")},39131:(e,t,r)=>{"use strict";r.d(t,{$E:()=>i,py:()=>o,qG:()=>a});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)}function a(e){const t=/^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,r=/^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,n=/^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;return t.test(e)?e=e.replace(t,"https://www.arcgis.com"):r.test(e)?e=e.replace(r,"https://devext.arcgis.com"):n.test(e)&&(e=e.replace(n,"https://qaext.arcgis.com")),e}},26306:(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,{M:()=>n,Y:()=>s})},18357:(e,t,r)=>{"use strict";r.d(t,{$:()=>n,u:()=>s});const n="20250318",s="878eb8750809e56d2a9ea9f1475c9e4e58226dad"}},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/"+{13:"7e49ddb5a2182f2c9ca6",36:"9fdefc01f49907bb83c0",52:"7292bb19b73f601d891b",59:"9cebecee1eee5fbe849e",146:"d0cbf3a455819d2e2686",177:"78683f1aadc1377be5fd",191:"09b77f82c22530b44daa",224:"5b56b271afb0fadf48b4",309:"af7010eb7b9631c43a70",349:"971c956de1f8dd230d0f",364:"04f9fb33fb2e33712290",369:"3871d2ecef5bcf6ac14f",377:"4990affabd907281cddd",382:"ad19e3eaa339b0d6cb44",427:"627cbe662d58cda62e7e",547:"085462ba3da7849fc296",563:"c80d542935803bf869f8",591:"ddcbab04b9559cf310e4",624:"f8e215ea3f420e666af4",647:"3c23e567cfb7372c44ba",655:"a5c9f0102b25170bb348",662:"61f2a202aede3846f9a2",690:"debfb75a94b66b58cbbc",692:"a39977478a6c57d2e8fb",752:"08a17dd3c573d1154234",812:"eb61e484f090fca28937",820:"339e7a900e2bba9d3647",934:"7321631cd766a8571c40",958:"5e9bf6d0db82526b8a8c",980:"d31f7598629f7cc50233",984:"f33da631352920d49639",1053:"71bd94cc789a55910f92",1056:"4155d28c0ea3d7615af3",1088:"78242f2bf742b33d99fa",1123:"afdbdc1569b56489c14d",1162:"6ec1cdb0f6411dd1cb48",1202:"7a4eecabeb86a23d832c",1204:"706f867a9034d62a8ef7",1273:"c2336d1f5b2b7bf6e7a7",1275:"4446888fbf1f864c3f93",1277:"cdd8983cf3a301805680",1319:"882f703365ca81f192bc",1384:"ad7596e7f81f557bb2c8",1414:"08fd7fa6d3f26cda8189",1435:"ecbfff23f0716446f050",1437:"e4651d577d297386268e",1598:"a559db8654b4f83fd79b",1728:"b8416f2560710258c239",1745:"278dac214a7cd6e2aee9",1867:"25362882a5c4cf339232",1878:"8de4280080296adb1757",1882:"5196c43dbce48d1b81ae",1904:"778f82f16b9719bea005",1956:"cb6b9f29d4471532e078",2106:"2611adb4f328f95ee508",2165:"3d9d056be30a9a5d5420",2186:"9fde9309cb64f1a9301c",2189:"20ac6ee693da8750ac75",2253:"c8a0089e080140db9076",2282:"89cb4f2f6da7c313d6a3",2288:"e7f866969be8477b6622",2324:"5b85f9da022742f602e2",2343:"c4ce3c35b52b7999e877",2372:"b3ca65d6112079fb1d00",2390:"6e7577cb6378ff34e722",2393:"794142db35dc521caad3",2503:"4d4a271351fd288277d2",2558:"bc8a49e0172fde44f274",2593:"2def7db73a776e759dae",2657:"5fbdb5fea7d6676fcf19",2678:"b141cb82c13f6943e657",2728:"7d94ba0a23fd20f18e32",2731:"6b0baecbd35d26393dcf",2741:"285dd7683f57d9d3667d",2763:"785fe520685b0efea0ff",2781:"75b5502fbea3b3fb8959",2833:"a60db83cabdf689b923b",2944:"ef6afba80fa2086ec104",2958:"f717ca7c2581c31de7a6",2980:"95f23bd17ce9e07fc8ef",3009:"3fe7be535affae31de7e",3029:"d1718ad93e3271b0525e",3030:"5660f13d78e9e4240034",3037:"8bbe8df40df2b8e54562",3054:"c04091eea7089dc2e864",3091:"35f3eef81fac7924a487",3103:"aadd13261b245116d958",3112:"26e9a1889d069e81a483",3116:"d8957c711756df11f774",3169:"e56647e61296643c5f84",3186:"c3806be4a760735e6082",3209:"bf3c4c1bff8b71bc0b13",3236:"bb73cd34fbae935ccbcc",3299:"33db840002a2b77abc33",3359:"01582612e10e6a880eb5",3379:"b2696362f758e3f7c983",3390:"9f122278e917c9ce5f95",3492:"21016d58428b15f7427c",3513:"86149b4a5a148744c7d1",3543:"f2cf05fbbb51d657d300",3561:"ed3fb3ea29a2be226322",3600:"0e178ec7ee6a7301c6a7",3637:"95ad76e58452b60fb79f",3656:"6592f6eee6bcdb1f3f08",3666:"61d64f163840563017d5",3720:"3cdd12250fbecc137f06",3766:"83e340f4321f363c4bc7",3771:"62e9e51564d7de62a01b",3813:"f4b3199e7e45d9ceb91f",3816:"df850d4c94a39a550229",3920:"31a5ee1907775cd10a54",3930:"c1970657a287ec96001e",3937:"71a64fbea3512d9a1547",4060:"1f3d2308e48f0e4758e7",4097:"c57b9f2b9c229e68919d",4110:"fec3d5e68892cc0173be",4111:"78c066e8fe167d4ab817",4118:"daeca0feb37bbb198677",4123:"dd9be173cddc16a354ed",4167:"96d7f47ea8fbf345101c",4190:"a01213d446be33d203e3",4196:"07c5f3fc475c57f5a7a7",4296:"e24307ee8b6d101da39a",4307:"a2293ef59b8b98a640e8",4399:"398c8637ed3c7260cf17",4473:"d57c7fb0340d800e7d27",4521:"4289635b2fabad2c16fd",4541:"57526c9dae5fa38154cb",4546:"486df1e042204b90b0dd",4575:"f664cc15238c8e9856a0",4594:"edb580ce96da6fd66503",4601:"4565cfc85f60960e3ea1",4654:"c249ad935f54d3b49ae3",4731:"364445d5a7d90c276246",4784:"b1baf39daf5725404be5",4796:"70309fa8d35ba8a3866d",4815:"c83b26ff96e39266adc2",4934:"10ca2107c99fab6bcc3b",4995:"90e890fe7c56c4b3c47a",4996:"2ff63a71213f618377d6",5008:"2ec7931a6192e55cc4b1",5013:"68c187dbf7dea7064ed8",5023:"ad3e692681b50bd1acc2",5055:"1ede0e123d0addadff63",5137:"774cbf14c74504458a6f",5141:"7d120f8b01fe719eb257",5165:"4e867c6e204aa457043a",5180:"b3aeda290470dcb2bdd2",5202:"6ef137ff1f70a179bbc3",5257:"f92d76b694ff0cdb212c",5345:"f1fdade1a5ff27fddef6",5356:"892ef3f6a46ab0fd7055",5367:"d45ff061bf71b73e9f26",5404:"d94e8a1f64499ec9a22e",5455:"7fe76e764c331b8ac938",5552:"7f87cf3d6a365d987f69",5605:"b42d26123784997c66e8",5613:"a2f3c5f4aeb997e59205",5666:"a61d05354348385f41b5",5719:"da7eaf403212704b74f5",5721:"57a51abfc708fa937eab",5740:"0f4b4e50ad9d634c8ed0",5754:"dfaf1da323906ee60549",5804:"46f6a190e3c943b44095",5913:"cee3a38b92a48a58c4d0",5920:"fa51036a48eec4175c74",5943:"8e90c5fee4ad7c7275dc",6049:"357631ee0d9032bccf0a",6052:"dfa4be2e07cc4c0938b0",6061:"63b8193ad90b2ebe6884",6064:"0b62871b89dcb4c70457",6126:"7aa763e7747530f6046f",6131:"787d0b7745103b1df618",6160:"fc07d47d44c04f123650",6183:"39d1a1ef9695405c70cc",6187:"762567124623f6d11e67",6263:"a03f4c1bce43330f5cc0",6285:"f2a6287c8d28be24f71e",6298:"c6085784a47d8afb36de",6339:"1d51c064045e9c47bd2e",6387:"89150d12c66c555afacf",6468:"1accbc048b74857269e4",6488:"60d5cbfa9e1c6b3c98df",6555:"ffd987a0662167b58ff9",6575:"258b46b58a4860942f7c",6650:"835fa4484c58d9b31c78",6702:"c593b6c7e145526efef0",6742:"5869cc7d1d90fb16c2e6",6928:"13453393e40ab80329d9",6996:"5e2e92cc87aab56e5393",7007:"6518954889df2e781c47",7074:"02387486f67a4699111e",7087:"8e6301006abdf47cc88d",7136:"453f71ac3579524221b2",7243:"e9993d4f2bfdc434fbcc",7251:"f8e609e8a11cfe5e03d8",7292:"52c13b3c074c9f6dadde",7301:"388dc6d50e16930aa66f",7339:"4145ee5aaae79e820117",7360:"cee8b985b9d5cd9c26b4",7367:"7a9e1696dc6120df15b0",7444:"2079f9d28e4199714f22",7445:"5d766ecc16b2389156ef",7455:"a6ec3665bde2af8a96e6",7546:"fdf49f8152eba2bb7f6d",7561:"f62f657f9fef28f492e0",7656:"9725398f6d56c8ba54ae",7675:"bef2a1096b1b0e646e32",7677:"ad5134ed753efaa3af21",7817:"e2f1e6c56c494a531bbf",7836:"5693d9ce4472a4c5959f",7883:"bb9ab85a135d211637f6",7982:"8aebd8c89c9b653bade9",7984:"e4ab971764d2e57c9e4a",8018:"2971266a49226e769360",8042:"109a56fc07f814c4baa4",8072:"bddfdbb2fb1dd813e8f2",8096:"91cce330c2720db377ec",8098:"b0952b81d5be214262dd",8111:"a8154c45aa798a8dc907",8125:"6e6422eda398774acbc7",8219:"f32ca4381e804cc3481e",8241:"c7b6f237efaab333459e",8256:"f0456d3eda9861f7e517",8330:"fbf42597b2af21eb0de4",8392:"e4b80c8f4c45fd78bde1",8411:"e6087eda5e3b7e5ad3e1",8445:"c139e737f602c424de13",8506:"7b367bb0ed9c218ca595",8535:"df86a49ddc505b4a7c4a",8613:"7019e238f173ff1b13f0",8628:"6b5d1a01b3828668d394",8666:"0c3930e40fc9f8a84599",8692:"200bb3dac05ba8ba4304",8714:"52b28aab40bb19e585bb",8812:"e012b319cc99429fc55e",8846:"b863951a5596d44dbeb2",8902:"fcc176a880b8fefbf0fe",8948:"25af8b25ab853941a992",9013:"4d7bd2bbe9045a2fee7a",9041:"cca7a3dbf899c6a9ce69",9062:"d8386803854f4b3e2576",9078:"b399173e13d8675f08bf",9159:"c1d80a709148e3373a82",9186:"5e889a675cbaff03ad5a",9202:"5dd92428f2ca78dabfa2",9234:"b42ecc7c3eb2fd8d1308",9239:"06f693780f70e5a627c4",9263:"2c6f2fdf274c0258621e",9265:"65f2b22d8fc12e6d4a87",9321:"c4e2b75b9135920babc3",9340:"9bfb091cec7eed6c8111",9384:"88cbaa91c495d86f4bb0",9423:"7b4880b2dc6b01d70ccc",9432:"83c1fecd2ef7e804bcad",9506:"629f4621ba6ffdcaa2f9",9547:"1b36d4400ab841c978c8",9588:"a69e885336eb5d2729fd",9607:"548ff32df8b8cc8df535",9655:"84cc488555df6431facc",9695:"b12262b10affb7785c26",9700:"7a8df1225abd54ff68ed",9838:"8f31fbb1d549230ee3db",9899:"bf7e8ee652abec309cf0",9926:"c03e6e35082beaec02a6",9930:"9f312f7284e506a84ed7",9933:"5a536de1ecae424bad05",9949:"24e174197a1be1f3d36c",9953:"391c200274bbeb92404c"}[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&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(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={76: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(2131);var n=r(61322);RemoteClient=n})();
|
|
1
|
+
var RemoteClient;(()=>{var e={2131:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},90237:(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}function s(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,s;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}r.d(t,{_:()=>n,b:()=>s,c:()=>i});var o="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function i(e){function t(t){e.error=e.hasError?new o(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function s(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(s);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(s,(function(e){return t(e),s()}))}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},92602:(e,t,r)=>{"use strict";r.d(t,{A:()=>s}),r(44208);var n=r(93637);const s={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:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,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:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.$N)(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.32";s.assetsPath=`https://js.arcgis.com/${e}/@arcgis/core/assets`}s.defaultAssetsPath=s.assetsPath}},69622:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(51447),s=r(71511),o=r(53966),i=r(97768),a=r(56454),c=r(16649),l=r(45873),u=r(96156),f=(r(44208),r(4718)),d=r(93687),h=r(11406),p=r(35666),g=r(62788),y=r(47328),b=r(67867);class m extends h.T{constructor(e,t){super(),this.propertyName=e,this.metadata=t,this.trackingTarget=new b.R(this),this.flags=0,this.flags=y.i.Dirty|(t.nonNullable?y.i.NonNullable:0)|(t.hasOwnProperty("value")?y.i.HasDefaultValue:0)|(void 0===t.get?y.i.DepTrackingInitialized:0)|(void 0===t.dependsOn?y.i.AutoTracked:0)}destroy(){this.flags&y.i.Dirty&&this.onCommitted(),super.destroy(),this.trackingTarget.destroy()}getComputed(e){e.mutable&&(0,g.gc)(this);const t=e.store,r=this.propertyName,n=this.flags,s=t.get(r);if(n&y.i.Computing)return s;if(~n&y.i.Dirty&&t.has(r))return s;this.flags|=y.i.Computing;const o=e.host;let i;n&y.i.AutoTracked?i=(0,g.a)(this.trackingTarget,this.metadata.get,o):((0,g.Xr)(o,this),i=this.metadata.get.call(o)),this.flags|=y.i.DepTrackingInitialized,t.set(r,i,p.Gr.COMPUTED);const a=t.get(r);return a===s?this.flags&=~y.i.Dirty:(0,g.F_)(this.commit,this),this.flags&=~y.i.Computing,a}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}commit(){this.flags&=~y.i.Dirty,this.onCommitted()}onInvalidated(){~this.flags&y.i.Overridden&&(this.flags|=y.i.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()}}}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,f.o8)(r))})),t}get(e){return this._values.get(e)}originOf(){return p.Gr.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.flags&y.i.NonNullable&&(n.lifecycle,l.v.INITIALIZING,1))}class A{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.lifecycle=l.v.INITIALIZING,this.store=new v,this.mutable=!0,this._origin=p.Gr.USER;const t=this.host.constructor.__accessorMetadata__;for(const e in t){const r=new m(e,t[e]);this.propertiesByName.set(e,r)}this.metadata=t}initialize(){this.lifecycle=l.v.CONSTRUCTING}constructed(){this.lifecycle=l.v.CONSTRUCTED}destroy(){this.lifecycle=l.v.DESTROYED,this.propertiesByName.forEach((e=>e.destroy()))}get initialized(){return this.lifecycle!==l.v.INITIALIZING}get(e){const t=this.propertiesByName.get(e);if(t.metadata.get)return t.getComputed(this);this.mutable&&(0,g.gc)(t);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.flags&y.i.HasDefaultValue)return"defaults"}return(0,p.OL)(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 b.R,o=(0,g.a)(s,(()=>n.metadata.get?.call(e)));let i=`${r}${e.declaredClass.split(".").pop()}.${t}: ${o}\n`;const a=s.accessed??new Set;if(0===a.size)return i;r+=" ";for(const e of a)e instanceof m&&(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.flags&y.i.Overridden)}clearOverride(e){const t=this.propertiesByName.get(e);t&&t.flags&y.i.Overridden&&(t.flags&=~y.i.Overridden,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(O.release(e),!r)return;t=s}r.flags|=y.i.Overridden,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(O.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.aB)(e)}getDefaultOrigin(){return(0,p.OL)(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!==l.v.INITIALIZING?this._origin:p.Gr.DEFAULTS;this._setAtOrigin(e,t,r)}_setAtOrigin(e,t,r){const n=this.store,s=e.propertyName;n.has(s,r)&&(0,f.aI)(t,n.get(s))&&~e.flags&y.i.Overridden&&r===n.originOf(s)||(e.invalidate(),n.set(s,t,r),e.commit(),(0,g.fE)(this.host,e))}_cast(e,t){const r=O.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}const O=new d.A(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var S=r(47821);var k;!function(e){e[e.Ignore=0]="Ignore",e[e.Destroy=1]="Destroy",e[e.ThrowError=2]="ThrowError"}(k||(k={}));var E,T,N=r(14012),j=r(10107),P=r(40608);function C(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 I=Symbol("Accessor-Handles"),M=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,u.tD)(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=C(t[e]);(0,j.MZ)(r)(o.prototype,e)}return(0,P.$)(r)(o)}static freeze(e){return e instanceof x?e.__accessor__.mutable=!1:Object.freeze(e),e}static isFrozen(e){return e instanceof x?!e.__accessor__.mutable:Object.isFrozen(e)}constructor(...e){if(this[E]=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&&(t.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0])}postscript(){const e=this.__accessor__,t=e.ctorArgs;e.initialize(),t&&(this.set(t),e.ctorArgs=null),e.constructed(),this.initialize(),this[M]=!0}initialize(){}[a.G](){this[I]=(0,i.pR)(this[I])}destroy(){this.destroyed||((0,N.iS)(this),this.__accessor__.destroy())}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[M]}get destroyed(){return this.__accessor__?.lifecycle===l.v.DESTROYED||!1}commitProperty(e){(0,c.Jt)(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,S.h)(this,e,t),this}watch(e,t,r){return(0,n.eO)(o.A.getLogger(this),"`watch` is deprecated in favor of reactiveUtils.watch",{replacement:"reactiveUtils.watch",version:"4.32",see:"https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html#watch",warnOnce:!0}),(0,N.wB)(this,e,t,r)}addHandles(e,t){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove()}else(this[I]??=new s.A).add(e,t)}removeHandles(e){this[I]?.remove(e)}removeAllHandles(){this[I]?.removeAll()}removeHandlesReference(e){this[I]?.removeReference(e)}hasHandles(e){return!0===this[I]?.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}}E=I,T=M},98291:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(93687);function s(e){e.length=0}class o{constructor(e=50,t=50){this._pool=new n.A(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)},49186:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(4718),s=r(53966),o=r(79907);class i extends o.A{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.o8)(t)}catch(e){return"[object]"}})))}}catch(e){throw s.A.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"},71511:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(5479);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.xZ)(e)){const r=this._getOrCreateGroup(t);for(const t of e)a(t)&&r.push(t)}else a(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(o(e))}remove(e){if("string"!=typeof e&&(0,n.xZ)(e)){for(const t of e)this.remove(t);return this}return this.has(e)?(i(this._getGroup(e)),this._groups.delete(o(e)),this):this}removeAll(){return this._groups.forEach(i),this._groups.clear(),this}removeReference(e){return this._groups.delete(e),this}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(o(e),t),t}_getGroup(e){return this._groups.get(o(e))}}function o(e){return e||"_default_"}function i(e){for(const t of e)t instanceof s?t.removeAll():t.remove()}function a(e){return null!=e&&(!!e.remove||e instanceof s)}},25482:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(90237),s=r(69622),o=r(4718),i=r(35666);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.o8)(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.Gr.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.Gr.DEFAULTS){const t=this._values.get(e);if(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.Gr.DEFAULTS?e:i.Gr.USER}}class c{constructor(e,t){this.value=e,this.origin=t}}var l=r(76953),u=r(45917),f=r(88620),d=r(49422),h=r(40608);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,f.oY)(this),r=t.store,n=new a;t.store=n,(0,l.k)(t,r,n)}read(e,t){(0,u.L)(this,e,t)}write(e,t){return(0,d.M)(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.$)("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}let y=class extends(p(s.A)){};var b;y=(0,n._)([(0,h.$)("esri.core.JSONSupport")],y),(b=y||(y={})).JSONSupportMixin=p,b.isSerializable=function(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON};const m=y},53966:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(92602),s=(r(44208),r(799));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(){}static get test(){}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=function(...e){return(0,s.Wm)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=i._tickCounter)return;this._loggedMessages[e].set(n,i._tickCounter),i._scheduleTickCounterIncrement()}for(const t of n.A.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",a)}_matchLevel(e){const t=n.A.log.level||"warn";return o[this._parentWithMember("level",t)]<=o[e]}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then((()=>{i._tickCounter++,i._tickCounterScheduled=!1})))}}function a(e,t,...r){console[e](`[${t}]`,...r)}i._loggers=new Map,i._tickCounter=0,i._tickCounterScheduled=!1,i._throttlingDisabled=!1},91869:(e,t,r)=>{"use strict";function n(e,t){for(const r of e.values())if(t(r))return!0;return!1}function s(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}function o(e){const t=new Map;return r=>(t.has(r)||t.set(r,e(r)),t.get(r))}r.d(t,{Bj:()=>o,Bs:()=>n,tE:()=>s})},79907:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(93637);class s{constructor(e,t,r=void 0){this.name=e,this.details=r,this.message=(t&&function(e,t){return e.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,((e,r)=>""===r?"$":((0,n.wc)(r,t)??"").toString()))}(t,r))??""}toString(){return"["+this.name+"]: "+this.message}}},93687:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});class n{constructor(e,t,r,n=1,s=0){this._ctor=e,this._acquireFunction=t,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s;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?.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}},61604:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});class n{constructor(e,t=30){this.name=e,this._counter=0,this._samples=new Array(t)}push(e){null!=e&&(this._samples[++this._counter%this._samples.length]=e)}set(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]}}},3694:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n,s=r(4576),o=r(21818);!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 i=n;class a{constructor(e){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new s.vW,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=()=>c(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++,c(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.qh)(this.data,(0,o.zI)(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.qh)(this.data,(0,o.zI)(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.mW)(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){i.sort(this.data,0,this.length,e)}iterableSort(e){return i.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){const{data:r,length:n}=this;for(let s=0;s<n;++s)if(e.call(t,r[s]))return r[s]}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{data:r,length:n}=this;for(let s=0;s<n;++s)e.call(t,r[s],s,r)}forEach(e,t){this.data.slice(0,this.length).forEach(e,t)}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}*[Symbol.iterator](){for(let e=0;e<this.length;e++)yield this.data[e]}}function c(e){e.data.length>1.5*e.length&&(e.data.length=Math.floor(1.1*e.length))}},87811:(e,t,r)=>{"use strict";r.d(t,{A:()=>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},67076:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(79907);class s extends n.A{constructor(e,t,r){super(e,t,r)}}s.prototype.type="warning"},11406:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(36563),s=r(4576);class o{constructor(e,t){this._observers=e,this._observer=t}remove(){(0,s.TF)(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.hA)()},35666:(e,t,r)=>{"use strict";var n;r.d(t,{AU:()=>s,Gr:()=>n,OL:()=>i,aB:()=>o,in:()=>a}),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)}},56454:(e,t,r)=>{"use strict";r.d(t,{G:()=>n});const n=Symbol("Accessor-beforeDestroy")},10107:(e,t,r)=>{"use strict";r.d(t,{MZ:()=>c,rM:()=>l});var n=r(53966),s=r(56507),o=r(16649),i=r(96156),a=r(47821);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.z4)(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.A.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 u=e.aliasOf;if(u){const e="string"==typeof u?u:u.source,t="string"==typeof u?null:!0===u.overridable;let n;l.dependsOn=[e],l.get=function(){let t=(0,o.Jt)(this,e);if("function"==typeof t){n||(n=e.split(".").slice(0,-1).join("."));const r=(0,o.Jt)(this,n);r&&(t=t.bind(r))}return t},l.readOnly||(l.set=t?function(e){this._override(r,e)}:function(t){(0,a.h)(this,e,t)})}const f=e.type,d=e.types;if(!l.cast){let t;f?t=function(e){let t=0,r=e;if((0,s.Zu)(e))return(0,s.Nd)(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.EK)(n))return 0===t?(0,s.MB)(n):(0,s._e)((0,s.MB)(n),t);if(1===t)return(0,s.eC)(n);if(t>1)return(0,s.e6)(n,t);const o=e;return o.from?o.from:(0,s.dp)(o)}(f):d&&(t=Array.isArray(d)?(0,s.wB)((0,s.aq)(d[0])):(0,s.aq)(d)),e.cast=function(e,t){if(e||t)return e?t?(r,n)=>t(e(r,n),n):e:t}(e.cast,t)}(0,i.CX)(l,e),e.range&&(l.cast=(0,s.Qp)(l.cast,e.range))}}function l(e,t,r){const n=(0,i.z4)(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}},40608:(e,t,r)=>{"use strict";r.d(t,{$:()=>f}),r(44208);var n=r(53966),s=r(56454),o=r(45873),i=r(96156),a=r(62788),c=r(51822);const l=new Set,u=new Set;function f(e){return t=>{e??="esri.core.Accessor",t.prototype.declaredClass=e,h(t);const r=[],n=[];let o=t.prototype;for(;o;)o.hasOwnProperty("initialize")&&!l.has(o.initialize)&&(l.add(o.initialize),r.push(o.initialize)),o.hasOwnProperty("destroy")&&!u.has(o.destroy)&&(u.add(o.destroy),n.push(o.destroy)),o=Object.getPrototypeOf(o);l.clear(),u.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)}}),n.length){let e=!1;const t=this[s.G];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){e=!0,t.call(this);for(let e=0;e<n.length;e++)n[e].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};a.__accessorMetadata__=(0,i.tD)(t.prototype),a.prototype.declaredClass=e;const c=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(a,"name",{value:c,configurable:!0}),a}}function d(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;t.mutable&&(0,a.gc)(r);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 h(e){const t=e.prototype,r=(0,i.tD)(t),n={};for(const e of Object.getOwnPropertyNames(r)){const t=r[e];(0,c.qk)(t),n[e]={enumerable:!0,configurable:!0,get:d(e,t),set(r){const n=this.__accessor__;if(void 0!==n){if(n.mutable)return n.initialized&&t.readOnly?p("read-only",e):n.lifecycle===o.v.CONSTRUCTED&&t.constructOnly?p("construct-only",e):void n.set(e,r)}else Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(e.prototype,n)}const p=(e,t)=>{n.A.getLogger("esri.core.Accessor").error(`cannot assign to ${e} property '${t}'`)}},76953:(e,t,r)=>{"use strict";r.d(t,{k:()=>s});var n=r(35666);function s(e,t,r){t.keys().forEach((e=>{r.set(e,t.get(e),n.Gr.DEFAULTS)}));const s=e.metadata;Object.keys(s).forEach((t=>{e.internalGet(t)&&r.set(t,e.internalGet(t),n.Gr.DEFAULTS)}))}},56507:(e,t,r)=>{"use strict";r.d(t,{EK:()=>T,GB:()=>l,GX:()=>c,MB:()=>N,Nd:()=>x,PZ:()=>m,Qp:()=>d,Uv:()=>C,Vr:()=>u,Zu:()=>M,_e:()=>k,aq:()=>j,dp:()=>w,e6:()=>E,eC:()=>O,gK:()=>I,jz:()=>P,wB:()=>A}),r(44208);var n=r(53966),s=r(91869);const o=()=>n.A.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,t=0){return null==e?e:(e=parseFloat(e),isNaN(e)?t:e)}function u(e){return null==e?e:Math.round(parseFloat(e))}function f(e){return null}function d(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}}function h(e){return e?.constructor&&void 0!==e.constructor.__accessorMetadata__}function p(e,t){return null!=t&&e&&!(t instanceof e)}function g(e){return e&&"isCollection"in e}function y(e){return e?.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function b(e,t){return!!h(t)&&(o().error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+v(e)+"'"),!0)}function m(e,t){return null==t?t:g(e)?function(e,t){if(!t?.constructor||!g(t.constructor))return b(e,t)?t:new e(t);const r=y(e.prototype.itemType),n=y(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(b(e,t),t):new e(t):t}(e,t):p(e,t)?b(e,t)?t:new e(t):t}function v(e){return e?.prototype?.declaredClass||"unknown"}const _=new WeakMap;function w(e,t){const r=function(e){switch(e){case Number:return e=>l(e);case P:return u;case Boolean:return a;case String:return c;case Date:return i;case C:return f;default:return(0,s.tE)(_,e,(()=>m.bind(null,e)))}}(e);return 1===arguments.length?r:r(t)}function A(e,t,r){return 1===arguments.length?A.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,r))):[e(t,r)]:t}function O(e,t){return 1===arguments.length?A((t=>w(e,t))):A((t=>w(e,t)),t)}function S(e,t,r){return 0!==t&&Array.isArray(r)?r.map((r=>S(e,t-1,r))):e(r)}function k(e,t,r){if(2===arguments.length)return r=>k(e,t,r);if(!r)return r;r=S(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 E(e,t,r){return 2===arguments.length?k((t=>w(e,t)),t):k((t=>w(e,t)),t,r)}function T(e){return!!Array.isArray(e)&&!e.some((t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)}))}function N(e,t){if(2===arguments.length)return N(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=>!p(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=>v(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 j(e,t){if(2===arguments.length)return j(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const o=e.typeMap[t];r[t]=w(o),n.push(v(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&&!p(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(!p(e.typeMap[n],t))return t;if("string"==typeof e.key&&!h(t)){const r={};for(const n in t)n!==e.key&&(r[n]=t[n]);return s(r)}return s(t)}}class P{}class C{}const I={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function M(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function x(e){switch(e.type){case"native":return w(e.value);case"array":return A(x(e.value));case"one-of":return function(e){let t=null;return(r,n)=>R(r,e)?r:(null==t&&(t=$(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 $(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case P:return"integer";case Date:return"date";case C:return"null";default:return v(e.value)}case"array":return`array of ${$(e.value)}`;case"one-of":{const t=e.values.map((e=>$(e)));return`one of ${t.slice(0,-1)} or ${t[t.length-1]}`}}return"unknown"}function R(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case P:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e;case C:return null===e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!R(e,t.value)));case"one-of":return t.values.some((t=>R(e,t)))}}},51822:(e,t,r)=>{"use strict";r.d(t,{xF:()=>u,N5:()=>f,k4:()=>d,qk:()=>b});var n=r(56507),s=r(90360);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(67124);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.EK)(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.v)(o,n,!1),n.types&&!n.write&&e.json.write?.enabled&&(n.write={...e.json.write}),(0,l.v)(o,n)}(0,s.v)(t,e.json,!0),(0,l.v)(t,e.json)}(e))}},90360:(e,t,r)=>{"use strict";r.d(t,{C:()=>u,v:()=>l});var n=r(53966),s=r(93637),o=r(67076),i=r(96156),a=r(15903);const c=()=>n.A.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.sM)("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.tD)(n.prototype);if("function"==typeof e.key)continue;const o=s[e.key];if(!o)continue;if(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;continue}const a=o.json?.write;if(!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?.messages&&s&&l.messages.push(new o.A(`${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.P)(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}},15903:(e,t,r)=>{"use strict";function n(e){return!!e&&e.prototype?.declaredClass&&0===e.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(t,{P:()=>n})},67124:(e,t,r)=>{"use strict";r.d(t,{B:()=>f,v:()=>a});var n=r(49186),s=r(53966),o=r(93637),i=r(15903);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.P)(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.sM)(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.A(`${o}:unsupported`,i,{definition:e,context:r})),s.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function l(e,t,r,n){(0,o.sM)(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.sM)(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)}},16649:(e,t,r)=>{"use strict";r.d(t,{Jt:()=>a,RP:()=>i,t2:()=>c});var n=r(88620);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.oY)(t);return(0,n.yh)(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.AH)(t),r):s(t,e)}function a(e,t){return i(e,t)}function c(e,t){return void 0!==i(t,e)}},45873:(e,t,r)=>{"use strict";var n;r.d(t,{v:()=>n}),function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED",e[e.DESTROYED=3]="DESTROYED"}(n||(n={}))},96156:(e,t,r)=>{"use strict";r.d(t,{CX:()=>a,tD:()=>o,z4:()=>i});var n=r(4718),s=r(88620);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.o8)(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.h1)(e,t,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(e){return c.test(e)?"replace":"merge"}},45917:(e,t,r)=>{"use strict";r.d(t,{L:()=>u,t:()=>f});var n=r(16649),s=r(88620),o=r(51822);function i(e,t,r){if(!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.t2)(s,r))return!0}else for(const e of s){if(e===t)return!0;if(e.includes(".")&&0===e.indexOf(t)&&(0,n.t2)(e,r))return!0}return!1}function a(e,t,r,n,s){let a=(0,o.N5)(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.N5)(t[c],s),i(a,r,n)&&(e[c]=!0)}function c(e,t,r,n){const s=r.metadata,i=(0,o.xF)(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.oY)(e),u=i.metadata,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.N5)(u[s],r).read,c=a?.source;let l;l=c&&"string"==typeof c?(0,n.RP)(t,c):t[s],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?.messages&&n.messages.push(t):e.loadWarnings.push(t)}))}},47821:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(49186),s=r(44208),o=(r(53966),r(16649));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.Jt)(e,n),s,r)}const a=e.__accessor__;null!=a&&function(e,t){if((0,s.A)("esri-unknown-property-errors")&&!function(e,t){return null!=t.metadata[e]}(e,t))throw new n.A("set:unknown-property",function(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}(e,t))}(t,a),e[t]=r}}},62788:(e,t,r)=>{"use strict";r.d(t,{F_:()=>h,Xr:()=>v,a:()=>d,fE:()=>b,gc:()=>l}),r(44208);var n=r(53966),s=r(88620),o=r(47328);const i=new(r(67867).R),a=[];let c=i;function l(e){c.onAccessed(e)}let u=!1,f=!1;function d(e,t,r){if(u)return p(e,t,r);let n=null;return g(e),n=t.call(r),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.A.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){if(t.flags&o.i.DepTrackingInitialized)return;t.flags|=o.i.DepTrackingInitialized;const r=f;f=!1,t.flags&o.i.AutoTracked?p(t.trackingTarget,t.metadata.get,e):v(e,t),f=r}const m=[];function v(e,t){t.flags&o.i.ExplicitlyTracking||(t.flags|=o.i.ExplicitlyTracking,p(t.trackingTarget,(()=>{const r=t.metadata.dependsOn||m;for(const t of r)if("string"!=typeof t||t.includes(".")){const r=(0,s.AH)(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)})),t.flags&=~o.i.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.oY)(e);if(o){const t=o.propertiesByName.get(n);t&&(l(t),b(e,t))}return r?e[n]:void 0}},47328:(e,t,r)=>{"use strict";var n;r.d(t,{i:()=>n}),function(e){e[e.Dirty=1]="Dirty",e[e.Overridden=2]="Overridden",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={}))},71429:(e,t,r)=>{"use strict";r.d(t,{r:()=>s});var n=r(67867);class s extends n.R{constructor(e){super(new o(e)),this._observer&&i.register(this,new WeakRef(this._observer),this)}destroy(){this._observer&&i.unregister(this._observer),this.accessed?.clear(),this.clear(),this._observer?.destroy()}}class o{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=a}}const i=new FinalizationRegistry((e=>{e.deref()?.destroy()}));function a(){}},67867:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});class n{constructor(e){this.accessed=void 0,this._handles=void 0,this._observer=e}destroy(){this.accessed?.clear(),this.clear()}onAccessed(e){null!=this._observer&&e!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(e))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach((e=>{this._handles.push(e.observe(this._observer))})),this.accessed.clear()))}clear(){if(null!=this._handles){for(let e=0;e<this._handles.length;++e)this._handles[e].remove();this._handles.length=0}}}},80559:(e,t,r)=>{"use strict";r.d(t,{Df:()=>l,fm:()=>u,mJ:()=>c});var n=r(36563),s=r(62788),o=r(71429);let i=!1;const a=[];function c(e,t){let r=new o.r((function n(){if(!r||c)return;if(i)return void f(n);const o=a;r.clear(),i=!0,c=!0,a=(0,s.a)(r,e),c=!1,i=!1,t(a,o),d()})),a=null,c=!1;return c=!0,a=(0,s.a)(r,e),c=!1,(0,n.hA)((function(){r&&(r.destroy(),r=null,a=null)}))}function l(e,t){let r=new o.r((function(){t(i,a)})),i=null;function a(){return r?(r.clear(),i=(0,s.a)(r,e),i):null}return a(),(0,n.hA)((function(){r&&(r.destroy(),r=null),i=null}))}function u(e,t){let r=!1,a=!1;const c=!!t?.sync;let l=new o.r((()=>{r||a||(a=!0,c?u():queueMicrotask(u))}));function u(){a=!1,l&&!r&&(i?f(u):(l.clear(),i=!0,r=!0,(0,s.a)(l,e),r=!1,i=!1,d()))}return r=!0,(0,s.a)(l,e),r=!1,(0,n.hA)((function(){l&&(l.destroy(),l=null)}))}function f(e){a.includes(e)||a.unshift(e)}function d(){for(;a.length;)a.pop()()}},88620:(e,t,r)=>{"use strict";r.d(t,{AH:()=>l,h1:()=>a,oY:()=>o,qg:()=>f,yh:()=>i});var n=r(36563),s=r(4718);function o(e){return e.__accessor__??null}function i(e,t){return null!=e?.metadata?.[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.o8)(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.slice():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.vE)(t)}return s(e,o[0],r)}},14012:(e,t,r)=>{"use strict";r.d(t,{iS:()=>A,wB:()=>E,Cn:()=>T});var n=r(98291),s=r(36563),o=r(4718),i=r(93687);class a extends i.A{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(11932),f=r(24326),d=r(16649),h=r(45873),p=r(80559),g=r(88620);(l=c||(c={}))[l.Untracked=0]="Untracked",l[l.Tracked=1]="Tracked";class y{constructor(){this.uid=(0,f.c)(),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.aI)}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.c)(),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.c)(),this.removed=!0}}y.pool=new a(y);const b=new n.A,m=new Set;let v;function _(e){m.delete(e),m.add(e),v||(v=(0,u._)(O))}function w(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function A(e){for(const t of m.values())t.target===e&&(t.removed=!0)}function O(){let e=10;for(;v&&e--;){v=null;const e=S(),t=b.acquire();for(const r of e){const e=r.uid;w(r),e===r.uid&&r.removed&&t.push(r)}for(const e of m)e.removed&&(t.push(e),m.delete(e));for(const e of t)y.pool.release(e);b.release(t),b.release(e),k.forEach((e=>e()))}}function S(){const e=b.acquire();e.length=m.size;let t=0;for(const r of m)e[t]=r,++t;return m.clear(),e}const k=new Set;function E(e,t,r,n=!1){return e.__accessor__&&e.__accessor__.lifecycle!==h.v.DESTROYED?n?function(e,t,r){const n=(0,g.qg)(e,t,r,((e,t,r)=>{let s=!1;return(0,p.mJ)((()=>(0,d.RP)(e,t)),((i,a)=>{e.__accessor__.lifecycle!==h.v.DESTROYED?s||(s=!0,(0,o.aI)(a,i)||r.call(e,i,a,t,e),s=!1):n.remove()}))}));return n}(e,t,r):function(e,t,r){let n=(0,g.qg)(e,t,r,((e,t,r)=>{let o,i,a=(0,p.Df)((()=>(0,d.RP)(e,t)),((s,a)=>{e.__accessor__?.lifecycle===h.v.DESTROYED||o&&o.uid!==i?n.remove():(o||(o=y.acquireUntracked(s,r,a,e,t),i=o.uid),_(o))}));return(0,s.hA)((()=>{a.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,_(o)),o=null),n=a=null}))}));return n}(e,t,r):(0,s.hA)()}function T(e,t,r=!1,n=o.gh){return r?function(e,t,r){let n=!1;return(0,p.mJ)(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,p.Df)(e,((e,s)=>{n&&n.uid!==o?i.remove():(n||(n=y.acquireTracked(e,t,s,r),o=n.uid),_(n))}));return(0,s.hA)((()=>{i.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,_(n)),n=null),i=null}))}(e,t,n)}},49422:(e,t,r)=>{"use strict";r.d(t,{M:()=>h,R:()=>d});var n=r(4576),s=r(49186),o=r(53966),i=r(16649),a=r(35666),c=r(88620),l=r(51822);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?.write)return!1;const f=(0,i.Jt)(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(l.layerContainerTypes&&u?.layerContainerType&&!l.layerContainerTypes.includes(u.layerContainerType))return!1;if((null===f&&!l.allowNull&&!l.writerEnsuresNonNull||void 0===f)&&l.isRequired){const t=new s.A("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return t&&u?.messages?u.messages.push(t):t&&!u&&o.A.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.Gr.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.aI)(s,o)}return!1}return i===o}(e,r,u,c,f)||!l.ignoreOrigin&&u?.origin&&t.store.multipleOriginsSupported&&t.store.originOf(r)<(0,a.aB)(u.origin))}function d(e,t,r,n){const s=(0,c.oY)(e),o=s.metadata,i=(0,l.k4)(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.h1)(t,e.toJSON(r));const n=(0,c.oY)(e),s=n.metadata;for(const o in s){const d=(0,l.k4)(s[o],r);if(!f(e,n,o,d,void 0,r))continue;const h=(0,i.Jt)(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.h1)(t,p),r?.resources?.pendingOperations?.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then((()=>(0,c.h1)(t,p,(()=>"replace-arrays"))))),r?.writtenProperties&&r.writtenProperties.push({target:e,propName:o,oldOrigin:(0,a.in)(n.store.originOf(o)),newOrigin:r.origin}))}return t}},4576:(e,t,r)=>{"use strict";r.d(t,{$U:()=>a,Am:()=>c,He:()=>i,Ji:()=>o,Mo:()=>m,Ru:()=>A,TF:()=>w,Xj:()=>f,Xy:()=>g,aI:()=>l,iv:()=>u,k4:()=>_,mW:()=>b,qh:()=>p,vW:()=>d});var n=r(21818),s=r(87811);const o=1.5,i=1/o,a=.5;function c(e,t){return t?e.filter(((e,r,n)=>n.findIndex(t.bind(null,e))===r)):Array.from(new Set(e))}function l(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 u(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 f(e){return e&&"number"==typeof e.length}class d{constructor(){this.last=0}}const h=new d;function p(e,t,r,n){n=n||h;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 g(e,t,r,s){const o=r??e.length,i=p(e,(0,n.zI)(t),o,s);if(-1!==i)return e[i]=e[o-1],null==r&&e.pop(),t}const y=new Set;function b(e,t,r=e.length,n=t.length,s,o){if(0===n||0===r)return r;y.clear();for(let e=0;e<n;++e)y.add(t[e]);s=s||h;const i=Math.max(0,s.last-10);for(let t=i;t<r;++t)if(y.has(e[t])&&(o?.push(e[t]),y.delete(e[t]),e[t]=e[r-1],--r,--t,0===y.size||0===r))return y.clear(),r;for(let t=0;t<i;++t)if(y.has(e[t])&&(o?.push(e[t]),y.delete(e[t]),e[t]=e[r-1],--r,--t,0===y.size||0===r))return y.clear(),r;return y.clear(),r}function m(e){return e?(v.seed=e,()=>v.getFloat()):Math.random}const v=new s.A;function _(e,t){const r=m(t);for(let t=e.length-1;t>0;t--){const n=Math.floor(r()*(t+1)),s=e[t];e[t]=e[n],e[n]=s}return e}function w(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function A(e,t){return null!=e}},21818:(e,t,r)=>{"use strict";function n(e){}function s(e){return e}r.d(t,{Xb:()=>n,zI:()=>s}),r(44208)},51447:(e,t,r)=>{"use strict";r.d(t,{Lx:()=>a,eF:()=>c,eO:()=>i,io:()=>l});var n=r(44208);const s=new WeakMap;function o(e,t,r=!1){const n=`🛑 DEPRECATED - ${t}`;if(!r)return void e.warn(n);let o=s.get(e);o||(o=new Set,s.set(e,o)),o.has(t)||(o.add(t),e.warn(n))}function i(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{moduleName:n}=r;l(e,"Function: "+(n?n+"::":"")+t+"()",r)}}function a(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{moduleName:n}=r;l(e,"Property: "+(n?n+"::":"")+t,r)}}function c(e,t,r={}){(0,n.A)("esri-deprecation-warnings")&&l(e,`Multiple argument constructor: ${t}`,{warnOnce:!0,replacement:`new ${t}({ <your properties here> })`,...r})}function l(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{replacement:n,version:s,see:i,warnOnce:a}=r;let c=t;if(n&&(c+=`\n\t🛠️ Replacement: ${n}`),s&&(c+=`\n\t⚙️ Version: ${s}`),i)if(Array.isArray(i)){c+="\n\t🔗 See for more details:";for(const e of i)c+=`\n\t\t${e}`}else c+=`\n\t🔗 See ${i} for more details.`;o(e,c,a)}}},37955:(e,t,r)=>{"use strict";r.d(t,{Oo:()=>a,on:()=>i,wb:()=>s});var n=r(36563);function s(e){return function(e){return null!=e&&"object"==typeof e&&"on"in e&&"function"==typeof e.on}(e)||o(e)}function o(e){return null!=e&&"object"==typeof e&&"addEventListener"in e&&"function"==typeof e.addEventListener}function i(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");return o(e)?function(e,t,r,s){if(Array.isArray(t)){const o=t.slice();for(const t of o)e.addEventListener(t,r,s);return(0,n.hA)((()=>{for(const t of o)e.removeEventListener(t,r,s)}))}return e.addEventListener(t,r,s),(0,n.hA)((()=>e.removeEventListener(t,r,s)))}(e,t,r):e.on(t,r)}function a(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=i(e,t,(t=>{n.remove(),r.call(e,t)}));return n}},36563:(e,t,r)=>{"use strict";r.d(t,{hA:()=>s,vE:()=>o});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)))}},44208:(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,{A:()=>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("big-integer-warning-enabled",!0),s.add("esri-deprecation-warnings",!0),s.add("esri-tests-disable-screenshots",!1),s.add("esri-tests-use-full-window",!1),s.add("esri-tests-post-to-influx",!0),s.add("esri-cim-animations-enable-status","enabled"),s.add("esri-cim-animations-spotlight",!1),s.add("esri-cim-animations-freeze-time",!1),s.add("enable-feature:multiple-highlights",!0),(()=>{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-performance-mode-frames-between-render",20),s.add("esri-force-performance-mode",!1),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-fast-triangulation-enabled",!0),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-query-max-depth",4),s.add("featurelayer-query-pausing-enabled",!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-essential-goto-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("request-queue-concurrency-hosted",16),s.add("request-queue-concurrency-non-hosted",4),s.add("curve-densification-coarse-segments",128),s.add("curve-densification-max-segments",2e3),s.add("curve-densification-min-segments",3),s.add("curve-densification-pixels-per-segment",16),s.add("view-readyState-waiting-delay",1e3),s.add("gradient-depth-bias",.01),s.add("gradient-depth-epsilon",1e-8),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")})))})()},5479:(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,{I6:()=>s,PP:()=>n,xZ:()=>o})},4718:(e,t,r)=>{"use strict";r.d(t,{Nb:()=>c,TU:()=>a,aI:()=>h,gh:()=>p,o8:()=>i,oy:()=>o});var n=r(4576),s=r(34275);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))throw new Error("Trying to clone an unclonable Accessor instance");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))return null;const r=new(0,Object.getPrototypeOf(e).constructor);for(const t of Object.getOwnPropertyNames(e)){const n=e[t],s=a(n);if(null!=n&&null==s)return null;r[t]=s}return r}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.dz)(e)||(0,s.mg)(e)||(0,s.UR)(e)||(0,s.IY)(e)||(0,s.jq)(e)||(0,s._G)(e)||(0,s.XJ)(e)||(0,s.vZ)(e)||(0,s.aI)(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.aI)(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))}},97768:(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}function u(e,t){let r;return e.some(((e,n)=>(r=t(e,n),null!=r))),r??void 0}r.d(t,{CM:()=>l,DC:()=>a,Gz:()=>c,Lw:()=>n,Pb:()=>u,WD:()=>o,pR:()=>s,xt:()=>i})},26390:(e,t,r)=>{"use strict";r.d(t,{d:()=>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()}))}},93637:(e,t,r)=>{"use strict";r.d(t,{$N:()=>s,i8:()=>a,sM:()=>i,wc:()=>o});var n=r(4718);function s(e,t,r=!1){return l(e,t,r)}function o(e,t){if(null!=t)return t[e]||c(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),s=n.pop(),o=c(n,!0,r);o&&s&&(o[s]=t)}function a(e,t){if(null==e&&null==t)return!1;if(null==e)return!0;if(null==t)return!0;if("object"==typeof e){if(Array.isArray(e)){const r=t;if(e.length!==r.length)return!0;for(let t=0;t<e.length;t++)if(a(e[t],r[t]))return!0;return!1}if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const r in e)if(a(e[r],t[r]))return!0;return!1}return e!==t}function c(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 l(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.o8)(i),e):(Array.isArray(i)||Array.isArray(e)?(o=o?Array.isArray(o)?e[s]=o.slice():e[s]=[o]:e[s]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{o.includes(e)||o.push(e)})):e[s]=i.slice())):i&&"object"==typeof i?e[s]=l(o,i,r):e.hasOwnProperty(s)&&!t.hasOwnProperty(s)||(e[s]=i),e)}),e||{}):e}},74887:(e,t,r)=>{"use strict";r.d(t,{Pl:()=>O,Ol:()=>A,nA:()=>w,NK:()=>l,Tw:()=>T,sg:()=>E,Lx:()=>_,QZ:()=>v,zf:()=>m,G4:()=>d,$X:()=>S,u7:()=>g,NY:()=>y,Mq:()=>f,QP:()=>h,Te:()=>u,jH:()=>p,NO:()=>N,z7:()=>k,qr:()=>b});var n=r(36563);const s=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return(0,n.hA)((()=>o.clearTimeout(r)))}});var o,i=r(49186),a=r(37955),c=(r(53966),r(97768));function l(e="Aborted"){return new i.A("AbortError",e)}function u(e,t="Aborted"){if(d(e))throw l(t)}function f(e){return e instanceof AbortSignal?e:e?.signal??void 0}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.Oo)(r,"abort",(()=>t()));t()}}function y(e,t){const r=f(e);if(null!=r)return u(r),(0,a.Oo)(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.xt)(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 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 O(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 S(e){return e&&"function"==typeof e.then}function k(e){return S(e)?e:Promise.resolve(e)}function E(e,t=-1){let r,n,s,o,i=null;const a=(...c)=>{if(r){n=c,o&&o.reject(l()),o=T();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(s=o||T(),o=null,t>0){const n=new AbortController;r=k(e(...c,n.signal));const s=r;O(t).then((()=>{r===s&&(o?n.abort():i=n)}))}else r=1,r=k(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 T(){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)}},11932:(e,t,r)=>{"use strict";r.d(t,{$m:()=>A,_:()=>g,md:()=>w});var n=r(26390),s=r(61604),o=r(3694),i=r(74887),a=r(78659);class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let l=0;const u={time:(0,a.l5)(0),deltaTime:(0,a.l5)(0),elapsedFrameTime:(0,a.l5)(0),frameDuration:(0,a.l5)(0)},f=["prepare","preRender","render","postRender","update","finish"],d=[],h=new o.A,p={frameTasks:h,willDispatch:!1,clearFrameTasks:function(e=!1){h.forAll((e=>{e.removed=!0})),e&&v()},dispatch:_,executeFrameTasks:function(e){const t=(0,a.l5)(e-l);l=e;const r=1e3/60,n=Math.max(0,t-r);u.time=e,u.frameDuration=(0,a.l5)(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.l5)(performance.now()-e),u.deltaTime=0===n.ticks?(0,a.l5)(0):t,n.phases[s]?.call(n,u)))})),O[r].push(performance.now()-n)}v(),S.push(performance.now()-e)},reschedule:function(){null!=y&&(cancelAnimationFrame(y),y=requestAnimationFrame(b))}};function g(e){const t=new c(e);return d.push(t),p.willDispatch||(p.willDispatch=!0,(0,n.d)(_)),t}let y=null;function b(){const e=performance.now();y=null;const t=h.some((e=>!e.paused&&!e.removed));y=t?requestAnimationFrame(b):null,p.executeFrameTasks(e)}const m=new o.A;function v(){h.forAll((e=>{e.removed&&m.push(e)})),h.removeUnorderedMany(m.data,m.length),m.clear()}function _(){for(;d.length;){const e=d.shift();e.isActive&&e.callback()}p.willDispatch=!1}function w(e=1,t){const r=(0,i.Tw)(),s=()=>{(0,i.G4)(t)?r.reject((0,i.NK)()):0===e?r():(--e,(0,n.d)((()=>s())))};return s(),r.promise}async function A(e){await function(e){return w(1,e)}(e),await new Promise((t=>requestAnimationFrame((()=>{e?.aborted||t()}))))}const O=f.map((e=>new s.A(e))),S=new s.A("total")},799:(e,t,r)=>{"use strict";r.d(t,{Cj:()=>a,HC:()=>i,Wm:()=>c,_e:()=>u});var n=r(93637);const s=/\{([^}]+)\}/g;function o(e){return e??""}function i(e,t){return t?e.replaceAll(s,"object"==typeof t?(e,r)=>o((0,n.wc)(r,t)):(e,r)=>o(t(r))):e}function a(e,t){return e.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,(e=>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}let l;function u(e){return l??=new DOMParser,l.parseFromString(e||"","text/html").body.innerText||""}},78659:(e,t,r)=>{"use strict";function n(e){return e}function s(e){return 1e3*e}function o(e){return e}r.d(t,{Kp:()=>o,gr:()=>s,l5:()=>n})},34275:(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}r.d(t,{IY:()=>a,JI:()=>g,UR:()=>i,XJ:()=>u,_G:()=>l,a3:()=>b,aI:()=>d,dk:()=>y,dz:()=>s,iu:()=>h,jq:()=>c,mg:()=>o,mw:()=>n,vZ:()=>f,y9:()=>p}),r(44208);const p=1024;function g(e){return d(e)||f(e)||l(e)||a(e)||s(e)}function y(e){return d(e)||f(e)}function b(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}},24326:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});let n=0;function s(){return++n}},84952:(e,t,r)=>{"use strict";r.d(t,{$1:()=>Q,$z:()=>V,An:()=>T,BQ:()=>oe,DB:()=>Z,FL:()=>B,FX:()=>z,Hg:()=>re,Il:()=>he,N9:()=>se,S8:()=>G,T1:()=>ge,UC:()=>pe,V1:()=>W,Xq:()=>k,Zo:()=>_e,_0:()=>Ae,a6:()=>ve,b8:()=>D,e7:()=>de,fj:()=>H,gd:()=>E,lJ:()=>X,lM:()=>ce,m3:()=>ae,nM:()=>fe,oP:()=>K,oy:()=>$,r$:()=>te,rs:()=>me,s0:()=>w,s2:()=>J,sC:()=>L,s_:()=>P,tk:()=>ne,ut:()=>U,w8:()=>Y,x0:()=>j,xw:()=>we,yM:()=>C,zf:()=>N,zi:()=>be,zs:()=>R});var n=r(92602),s=r(4576),o=r(49186),i=r(25482),a=r(53966),c=r(39131),l=r(26306);const u=()=>a.A.getLogger("esri.core.urlUtils"),f=n.A.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 A={};let O=new w(n.A.applicationUrl);let S=function(){const e=O.path,t=e.slice(0,e.lastIndexOf("/")+1);return`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}${t}`}();const k=()=>O,E=()=>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.slice(0,n),t.query=N(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.slice(0,t.path.length-(r.fragment.length+1)))),t}function N(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 j(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?.[r];return o?s+encodeURIComponent(o(n)):Array.isArray(n)?n.map((e=>i.A.isSerializable(e)?s+encodeURIComponent(JSON.stringify(e)):s+encodeURIComponent(e))).join("&"):i.A.isSerializable(n)?s+encodeURIComponent(JSON.stringify(n)):s+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function P(e=!1){let t,r=f.proxyUrl;if("string"==typeof e){t=ae(e);const n=R(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw u().warn(d),new o.A("urlUtils:proxy-not-set",d);return t&&le()&&(r=ce(r)),T(r)}function C(e,t=!1){const r=R(e);let n,s;if(r){const e=M(r.proxyUrl);n=e.path,s=e.query?N(e.query):null}else if(t){const t=P(e);n=t.path,s=t.query}if(n){const t=T(e);e=n+"?"+t.path;const r=j({...s,...t.query});r&&(e=`${e}?${r}`)}return e}const I={path:"",query:""};function M(e){const t=e.indexOf("?");return-1!==t?(I.path=e.slice(0,t),I.query=e.slice(t+1)):(I.path=e,I.query=null),I}function x(e){return(e=ue(e=he(e=M(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 R(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 D(e,t){if(!e||!t)return!1;e=q(e),t=q(t);const r=(0,c.py)(e),n=(0,c.py)(t);return null!=r&&null!=n?r.portalHostname===n.portalHostname:null==r&&null==n&&z(e,t,!0)}function U(e,t){return e=q(e),t=q(t),ue(e)===ue(t)}function q(e){const t=(e=G(e)).indexOf("/sharing");return t>0?e.slice(0,t):e.replace(/\/+$/,"")}function L(e,t=f.interceptors){const r=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t);if(t)for(const e of t)if(Array.isArray(e.urls)){if(e.urls.some(r))return e}else if(r(e.urls))return e;return null}function z(e,t,r=!1){if(!e||!t)return!1;const n=ye(e),s=ye(t);return!(!r&&n.scheme!==s.scheme)&&null!=n.host&&null!=s.host&&n.host.toLowerCase()===s.host.toLowerCase()&&n.port===s.port}function B(e){if("string"==typeof e){if(!K(e))return!0;e=ye(e)}if(z(e,O))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=F(t[r]);for(let t=0;t<n.length;t++)if(z(e,n[t]))return!0}return!1}function F(e){return A[e]||(ie(e)||oe(e)?A[e]=[new w(J(e))]:A[e]=[new w(`http://${e}`),new w(`https://${e}`)]),A[e]}function J(e,t=S,r){return oe(e)?r?.preserveProtocolRelative?e:"http"===O.scheme&&O.authority===V(e).slice(2)?`http:${e}`:`https:${e}`:ie(e)?e:H("/"===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||!K(e))return e;const n=G(e),s=n.toLowerCase(),o=G(t).toLowerCase().replace(/\/+$/,""),i=r?G(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 G(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&p.test(e)||"http"===O.scheme&&oe(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"===O.scheme&&n===O.authority&&!m.test(e)||(le()&&n===O.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||le()&&!R(e))&&(e=ce(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=M(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=J(e=e.trim()))))}function H(...e){const t=e.filter(s.Ru);if(!t?.length)return;const r=[];if(K(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 V(e,t=!1){if(null==e||Y(e)||Z(e))return null;let r=e.indexOf("://");if(-1===r&&oe(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=ue(e,!0)),e}function K(e){return oe(e)||ie(e)}function Y(e){return null!=e&&"blob:"===e.slice(0,5)}function Z(e){return null!=e&&"data:"===e.slice(0,5)}function X(e){const t=te(e);return t?.isBase64?(0,l.M)(t.data):null}function Q(e){return(0,l.Y)(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=X(e);if(!t)return null;const r=te(e);return new Blob([t],{type:r.mediaType})}function oe(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function ie(e){return null!=e&&h.test(e)}function ae(e){return null!=e&&g.test(e)||"https"===O.scheme&&oe(e)}function ce(e){return oe(e)?`https:${e}`:e.replace(p,"https:")}function le(){return"https"===O.scheme}function ue(e,t=!1){return oe(e)?e.slice(2):(e=e.replace(h,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function fe(e){let t=0;if(K(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function de(e,t){if(!e)return"";const r=T(e).path.replace(/\/+$/,""),n=r.slice(r.lastIndexOf("/")+1);if(!t?.length)return n;const s=new RegExp(`\\.(${t.join("|")})$`,"i");return n.replace(s,"")}function he(e){return e.endsWith("/")?e:`${e}/`}function pe(e){return e.replace(/\/+$/,"")}function ge(e,t,r){if(!(t&&r&&e&&K(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 ye(e){return"string"==typeof e?new w(J(e)):(e.scheme||(e.scheme=O.scheme),e)}function be(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 me(e,t,r){const n=T(e),s=n.query||{};return s[t]=String(r),`${n.path}?${j(s)}`}function ve(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=j(n);return s?`${r.path}?${s}`:r.path}function _e(e){if(null==e)return null;const t=e.match(Oe);return t?t[2]:null}function we(e){if(null==e)return null;const t=e.match(Oe);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 Oe=/([^.]*)\.([^/]*)$/},52268:(e,t,r)=>{"use strict";function n(e,t){return new Proxy({},{get:(r,n,s)=>(...r)=>{let s,o;const i=r[r.length-1];return function(e){return"object"==typeof e&&!Array.isArray(e)&&null!=e&&("signal"in e||"transferList"in e||0===Object.keys(e).length)}(i)&&(s=i.signal,o=i.transferList,r.pop()),e.apply(t?`${t}.${n.toString()}`:n.toString(),r,{transferList:o,signal:s})}})}r.d(t,{L:()=>n})},61322:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});var n=r(70333),s=r(49186),o=r(37955),i=r(36563),a=r(97768),c=r(74887),l=r(52268);const u={statsWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(7455),r.e(2781),r.e(7445),r.e(3009)]).then(r.bind(r,33009)),geometryEngineWorker:()=>Promise.all([r.e(9930),r.e(6387)]).then(r.bind(r,68887)),arcadeGeometryOperatorsWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(1123)]).then(r.bind(r,1123)),CSVSourceWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(752)]).then(r.bind(r,40752)),EdgeProcessingWorker:()=>Promise.all([r.e(3030),r.e(9899),r.e(6575),r.e(1437)]).then(r.bind(r,71936)),ElevationSamplerWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(3030),r.e(2324)]).then(r.bind(r,38419)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(6285),r.e(1956),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(4473),r.e(2678)]).then(r.bind(r,12543)),GeoJSONSourceWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(1202)]).then(r.bind(r,71202)),LercWorker:()=>r.e(7087).then(r.bind(r,57087)),MemorySourceWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(9432)]).then(r.bind(r,29432)),PBFDecoderWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(3720),r.e(9078)]).then(r.bind(r,39078)),FeaturePipelineWorker:()=>Promise.all([r.e(6285),r.e(5721),r.e(5055),r.e(1956),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(9949),r.e(4473),r.e(9423),r.e(377),r.e(5719)]).then(r.bind(r,93705)),PointCloudWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(7455),r.e(690),r.e(2944),r.e(7984),r.e(4731)]).then(r.bind(r,34142)),RasterWorker:()=>Promise.all([r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(984),r.e(6049),r.e(2253)]).then(r.bind(r,30139)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(7455),r.e(690),r.e(3030),r.e(9899),r.e(6575),r.e(6064)]).then(r.bind(r,46064)),SceneLayerWorker:()=>Promise.all([r.e(6285),r.e(1956),r.e(9953),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(690),r.e(2944),r.e(958),r.e(4654),r.e(9607)]).then(r.bind(r,36233)),WFSSourceWorker:()=>Promise.all([r.e(6285),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(7339),r.e(2781),r.e(3720),r.e(5455),r.e(7445),r.e(8111),r.e(3771)]).then(r.bind(r,33771)),WorkerTileHandler:()=>Promise.all([r.e(2741),r.e(4996),r.e(8902),r.e(9949),r.e(5013),r.e(9423),r.e(3379)]).then(r.bind(r,11764)),Lyr3DWorker:()=>Promise.all([r.e(2741),r.e(9234)]).then(r.bind(r,79234)),Feature3DPipelineWorker:()=>Promise.all([r.e(6285),r.e(8948),r.e(2106),r.e(5721),r.e(1956),r.e(2741),r.e(4996),r.e(7251),r.e(8902),r.e(1882),r.e(7455),r.e(690),r.e(7339),r.e(2781),r.e(3720),r.e(3030),r.e(5455),r.e(7445),r.e(2944),r.e(9899),r.e(958),r.e(655),r.e(2728),r.e(6702)]).then(r.bind(r,95652)),TextureCompressionWorker:()=>Promise.all([r.e(2741),r.e(6996)]).then(r.bind(r,46996))};var f=r(8341),d=r(18357);const{CLOSE:h,ABORT:p,INVOKE:g,RESPONSE:y,OPEN_PORT:b,ON:m}=f.Go;class v{constructor(e){this._invoke=e,this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._timer=null,this._process=this._process.bind(this)}push(e){e.type===f.Go.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 _{static connect(e,t){const r=new MessageChannel;let n;n="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const s=new _(r.port1,{channel:r,client:n,schedule:t});return"object"==typeof n&&"remoteClient"in n&&(n.remoteClient=s),_.clients.set(s,n),r.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}constructor(e,t,r){this._port=e,this._jobQueue=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new v((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:h}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const n=r?.signal,o=r?.transferList;if(!this._port)return Promise.reject(new s.A(f.T,`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,f.Jc)();return new Promise(((r,s)=>{if((0,c.G4)(n))return this._processWork(),void s((0,c.NK)());const l=(0,c.u7)(n,(()=>{const e=this._outJobs.get(i);e&&(this._outJobs.delete(i),this._processWork(),(0,a.xt)(e.abortHandle),this._post({type:p,jobId:i}),s((0,c.NK)()))})),u={resolve:r,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:g,jobId:i,methodName:e,abortable:null!=n},t,o)}))}createInvokeProxy(e){return(0,l.L)(this,e)}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:f.Go.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),(0,i.hA)((()=>{r.port1.postMessage({type:f.Go.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}))}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._jobQueue?.pop();if(!e)return;const{methodName:t,data:r,invokeOptions:n,resolver:s}=e;this.apply(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.xt)(e.abortHandle),e.reject((0,c.NK)(`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,!0))):this._processMessage(e,!1)}_processMessage(e,t){const r=(0,f.VI)(e);if(r)switch(r.type){case y:this._onResponseMessage(r);break;case g:t?this._onInvokeMessage(r):this._invokeQueue.push(r);break;case p:this._onAbortMessage(r);break;case h:this._onCloseMessage();break;case b:this._onOpenPortMessage(r);break;case m:this._onOnMessage(r)}}_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&&_.clients.get(this)===e&&e.destroy(),_.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,u=l[t];try{if(!u&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)l=l[e[t]],u=l[e[t+1]]}if("function"!=typeof u)throw new TypeError(`${t} is not a function`);n.push({client:this,signal:o?o.signal:null}),a=u.apply(l,n)}catch(e){return void this._post({type:y,jobId:r,error:(0,f.mF)(e)})}(0,c.$X)(a)?(i.set(r,{controller:o,promise:a}),a.then((e=>{i.has(r)&&(i.delete(r),this._post({type:y,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,c.zf)(e)||this._post({type:y,jobId:r,error:(0,f.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:y,jobId:r},a)}_onOpenPortMessage(e){new _(e.port,{client:this._client})}_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,f.VI)(e);s?.type===f.Go.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.xt)(i.abortHandle),r?i.reject(s.A.fromJSON(JSON.parse(r))):i.resolve(n)}_post(e,t,r){return(0,f.u1)(this._port,e,t,r)}}_.kernelInfo={buildDate:d.$,fullVersion:n.ol,revision:d.u},_.clients=new Map},8341:(e,t,r)=>{"use strict";r.d(t,{Go:()=>i,Jc:()=>l,T:()=>o,VI:()=>d,mF:()=>u,oV:()=>p,u1:()=>f});var n=r(44208),s=r(74887);const o="worker:port-closed";var i,a;(a=i||(i={}))[a.HANDSHAKE=0]="HANDSHAKE",a[a.OPEN=1]="OPEN",a[a.OPENED=2]="OPENED",a[a.RESPONSE=3]="RESPONSE",a[a.INVOKE=4]="INVOKE",a[a.ABORT=5]="ABORT",a[a.CLOSE=6]="CLOSE",a[a.OPEN_PORT=7]="OPEN_PORT",a[a.ON=8]="ON";let c=0;function l(){return c++}function u(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 f(e,t,r,s){if(t.type===i.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==i.INVOKE&&t.type!==i.RESPONSE)return void e.postMessage(t);let o;if(function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(o=h(r.transferList),t.data=r.result):(o=h(s),t.data=r),o){if((0,n.A)("ff"))for(const r of o)if("byteLength"in r&&r.byteLength>267386880){const r="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case i.INVOKE:throw r;case i.RESPONSE:return void f(e,{type:i.RESPONSE,jobId:t.jobId,error:u(r)})}}e.postMessage(t,o)}else e.postMessage(t)}function d(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function h(e){if(!e?.length)return null;if((0,n.A)("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}async function p(e){try{return await e}catch(e){const t=e?.name===o;if(!(0,s.zf)(e)&&!t)throw e;return}}},70333:(e,t,r)=>{"use strict";r.d(t,{Aq:()=>c,Y3:()=>l,id:()=>i,ol:()=>a,rE:()=>o});var n=r(44208),s=r(84952);Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const o="4.32";let i,a=o;function c(e){i=e}function l(e){const t=i?.findCredential(e);return t?.token?(0,s.rs)(e,"token",t.token):e}a="4.32.10",(0,n.A)("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),(0,n.A)("host-webworker")},39131:(e,t,r)=>{"use strict";r.d(t,{$E:()=>i,py:()=>o,qG:()=>a});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)}function a(e){const t=/^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,r=/^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,n=/^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;return t.test(e)?e=e.replace(t,"https://www.arcgis.com"):r.test(e)?e=e.replace(r,"https://devext.arcgis.com"):n.test(e)&&(e=e.replace(n,"https://qaext.arcgis.com")),e}},26306:(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,{M:()=>n,Y:()=>s})},18357:(e,t,r)=>{"use strict";r.d(t,{$:()=>n,u:()=>s});const n="20250407",s="04d2b42da93678ca718b23aaf7e216985f10fa8e"}},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/"+{13:"7e49ddb5a2182f2c9ca6",36:"9fdefc01f49907bb83c0",52:"7292bb19b73f601d891b",59:"9cebecee1eee5fbe849e",146:"d0cbf3a455819d2e2686",177:"78683f1aadc1377be5fd",191:"09b77f82c22530b44daa",224:"5b56b271afb0fadf48b4",309:"af7010eb7b9631c43a70",349:"971c956de1f8dd230d0f",364:"04f9fb33fb2e33712290",369:"3871d2ecef5bcf6ac14f",377:"4990affabd907281cddd",382:"ad19e3eaa339b0d6cb44",427:"627cbe662d58cda62e7e",547:"085462ba3da7849fc296",563:"c80d542935803bf869f8",591:"ddcbab04b9559cf310e4",624:"f8e215ea3f420e666af4",647:"3c23e567cfb7372c44ba",655:"a5c9f0102b25170bb348",662:"61f2a202aede3846f9a2",690:"debfb75a94b66b58cbbc",692:"a39977478a6c57d2e8fb",752:"08a17dd3c573d1154234",812:"eb61e484f090fca28937",820:"339e7a900e2bba9d3647",934:"7321631cd766a8571c40",958:"5e9bf6d0db82526b8a8c",980:"d31f7598629f7cc50233",984:"f33da631352920d49639",1053:"71bd94cc789a55910f92",1056:"4155d28c0ea3d7615af3",1088:"78242f2bf742b33d99fa",1123:"afdbdc1569b56489c14d",1162:"6ec1cdb0f6411dd1cb48",1202:"7a4eecabeb86a23d832c",1204:"706f867a9034d62a8ef7",1273:"c2336d1f5b2b7bf6e7a7",1275:"4446888fbf1f864c3f93",1277:"cdd8983cf3a301805680",1319:"882f703365ca81f192bc",1384:"ad7596e7f81f557bb2c8",1414:"08fd7fa6d3f26cda8189",1435:"ecbfff23f0716446f050",1437:"e4651d577d297386268e",1598:"a559db8654b4f83fd79b",1728:"b8416f2560710258c239",1745:"278dac214a7cd6e2aee9",1867:"25362882a5c4cf339232",1878:"8de4280080296adb1757",1882:"5196c43dbce48d1b81ae",1904:"778f82f16b9719bea005",1956:"cb6b9f29d4471532e078",2106:"2611adb4f328f95ee508",2165:"3d9d056be30a9a5d5420",2186:"9fde9309cb64f1a9301c",2189:"20ac6ee693da8750ac75",2253:"c8a0089e080140db9076",2282:"89cb4f2f6da7c313d6a3",2288:"e7f866969be8477b6622",2324:"5b85f9da022742f602e2",2343:"c4ce3c35b52b7999e877",2372:"b3ca65d6112079fb1d00",2390:"6e7577cb6378ff34e722",2393:"794142db35dc521caad3",2503:"4d4a271351fd288277d2",2558:"bc8a49e0172fde44f274",2593:"2def7db73a776e759dae",2657:"5fbdb5fea7d6676fcf19",2678:"b141cb82c13f6943e657",2728:"7d94ba0a23fd20f18e32",2731:"6b0baecbd35d26393dcf",2741:"285dd7683f57d9d3667d",2763:"785fe520685b0efea0ff",2781:"75b5502fbea3b3fb8959",2833:"a60db83cabdf689b923b",2944:"ef6afba80fa2086ec104",2958:"f717ca7c2581c31de7a6",2980:"95f23bd17ce9e07fc8ef",3009:"3fe7be535affae31de7e",3029:"d1718ad93e3271b0525e",3030:"5660f13d78e9e4240034",3037:"8bbe8df40df2b8e54562",3054:"c04091eea7089dc2e864",3091:"35f3eef81fac7924a487",3103:"aadd13261b245116d958",3112:"26e9a1889d069e81a483",3116:"d8957c711756df11f774",3169:"e56647e61296643c5f84",3186:"c3806be4a760735e6082",3209:"bf3c4c1bff8b71bc0b13",3236:"bb73cd34fbae935ccbcc",3299:"33db840002a2b77abc33",3359:"01582612e10e6a880eb5",3379:"b2696362f758e3f7c983",3390:"9f122278e917c9ce5f95",3492:"21016d58428b15f7427c",3513:"86149b4a5a148744c7d1",3543:"f2cf05fbbb51d657d300",3561:"ed3fb3ea29a2be226322",3600:"0e178ec7ee6a7301c6a7",3637:"95ad76e58452b60fb79f",3656:"6592f6eee6bcdb1f3f08",3666:"61d64f163840563017d5",3720:"3cdd12250fbecc137f06",3766:"83e340f4321f363c4bc7",3771:"62e9e51564d7de62a01b",3813:"f4b3199e7e45d9ceb91f",3816:"df850d4c94a39a550229",3920:"31a5ee1907775cd10a54",3930:"c1970657a287ec96001e",3937:"71a64fbea3512d9a1547",4060:"1f3d2308e48f0e4758e7",4097:"c57b9f2b9c229e68919d",4110:"fec3d5e68892cc0173be",4111:"78c066e8fe167d4ab817",4118:"daeca0feb37bbb198677",4123:"dd9be173cddc16a354ed",4167:"96d7f47ea8fbf345101c",4190:"a01213d446be33d203e3",4196:"07c5f3fc475c57f5a7a7",4296:"e24307ee8b6d101da39a",4307:"a2293ef59b8b98a640e8",4399:"398c8637ed3c7260cf17",4473:"d57c7fb0340d800e7d27",4521:"4289635b2fabad2c16fd",4541:"57526c9dae5fa38154cb",4546:"486df1e042204b90b0dd",4575:"f664cc15238c8e9856a0",4594:"edb580ce96da6fd66503",4601:"4565cfc85f60960e3ea1",4654:"c249ad935f54d3b49ae3",4731:"364445d5a7d90c276246",4784:"b1baf39daf5725404be5",4796:"70309fa8d35ba8a3866d",4815:"c83b26ff96e39266adc2",4934:"10ca2107c99fab6bcc3b",4995:"90e890fe7c56c4b3c47a",4996:"2ff63a71213f618377d6",5008:"2ec7931a6192e55cc4b1",5013:"68c187dbf7dea7064ed8",5023:"ad3e692681b50bd1acc2",5055:"1ede0e123d0addadff63",5137:"774cbf14c74504458a6f",5141:"7d120f8b01fe719eb257",5165:"4e867c6e204aa457043a",5180:"b3aeda290470dcb2bdd2",5202:"6ef137ff1f70a179bbc3",5257:"f92d76b694ff0cdb212c",5345:"f1fdade1a5ff27fddef6",5356:"892ef3f6a46ab0fd7055",5367:"d45ff061bf71b73e9f26",5404:"d94e8a1f64499ec9a22e",5455:"7fe76e764c331b8ac938",5552:"7f87cf3d6a365d987f69",5605:"b42d26123784997c66e8",5613:"a2f3c5f4aeb997e59205",5666:"a61d05354348385f41b5",5719:"da7eaf403212704b74f5",5721:"57a51abfc708fa937eab",5740:"0f4b4e50ad9d634c8ed0",5754:"dfaf1da323906ee60549",5804:"46f6a190e3c943b44095",5913:"cee3a38b92a48a58c4d0",5920:"fa51036a48eec4175c74",5943:"8e90c5fee4ad7c7275dc",6049:"357631ee0d9032bccf0a",6052:"dfa4be2e07cc4c0938b0",6061:"63b8193ad90b2ebe6884",6064:"0b62871b89dcb4c70457",6126:"7aa763e7747530f6046f",6131:"787d0b7745103b1df618",6160:"fc07d47d44c04f123650",6183:"39d1a1ef9695405c70cc",6187:"762567124623f6d11e67",6263:"a03f4c1bce43330f5cc0",6285:"f2a6287c8d28be24f71e",6298:"c6085784a47d8afb36de",6339:"1d51c064045e9c47bd2e",6387:"89150d12c66c555afacf",6468:"1accbc048b74857269e4",6488:"60d5cbfa9e1c6b3c98df",6555:"ffd987a0662167b58ff9",6575:"258b46b58a4860942f7c",6650:"835fa4484c58d9b31c78",6702:"c593b6c7e145526efef0",6742:"5869cc7d1d90fb16c2e6",6928:"13453393e40ab80329d9",6996:"5e2e92cc87aab56e5393",7007:"6518954889df2e781c47",7074:"02387486f67a4699111e",7087:"8e6301006abdf47cc88d",7136:"453f71ac3579524221b2",7243:"e9993d4f2bfdc434fbcc",7251:"f8e609e8a11cfe5e03d8",7292:"52c13b3c074c9f6dadde",7301:"388dc6d50e16930aa66f",7339:"4145ee5aaae79e820117",7360:"cee8b985b9d5cd9c26b4",7367:"7a9e1696dc6120df15b0",7444:"2079f9d28e4199714f22",7445:"5d766ecc16b2389156ef",7455:"a6ec3665bde2af8a96e6",7546:"fdf49f8152eba2bb7f6d",7561:"f62f657f9fef28f492e0",7656:"9725398f6d56c8ba54ae",7675:"bef2a1096b1b0e646e32",7677:"ad5134ed753efaa3af21",7817:"e2f1e6c56c494a531bbf",7836:"5693d9ce4472a4c5959f",7883:"bb9ab85a135d211637f6",7982:"8aebd8c89c9b653bade9",7984:"e4ab971764d2e57c9e4a",8018:"2971266a49226e769360",8042:"109a56fc07f814c4baa4",8072:"bddfdbb2fb1dd813e8f2",8096:"91cce330c2720db377ec",8098:"b0952b81d5be214262dd",8111:"a8154c45aa798a8dc907",8125:"6e6422eda398774acbc7",8219:"f32ca4381e804cc3481e",8241:"c7b6f237efaab333459e",8256:"f0456d3eda9861f7e517",8330:"fbf42597b2af21eb0de4",8392:"e4b80c8f4c45fd78bde1",8411:"e6087eda5e3b7e5ad3e1",8445:"c139e737f602c424de13",8506:"7b367bb0ed9c218ca595",8535:"df86a49ddc505b4a7c4a",8613:"7019e238f173ff1b13f0",8628:"6b5d1a01b3828668d394",8666:"0c3930e40fc9f8a84599",8692:"200bb3dac05ba8ba4304",8714:"52b28aab40bb19e585bb",8812:"e012b319cc99429fc55e",8846:"b863951a5596d44dbeb2",8902:"fcc176a880b8fefbf0fe",8948:"25af8b25ab853941a992",9013:"4d7bd2bbe9045a2fee7a",9041:"cca7a3dbf899c6a9ce69",9062:"d8386803854f4b3e2576",9078:"b399173e13d8675f08bf",9159:"c1d80a709148e3373a82",9186:"5e889a675cbaff03ad5a",9202:"5dd92428f2ca78dabfa2",9234:"b42ecc7c3eb2fd8d1308",9239:"06f693780f70e5a627c4",9263:"2c6f2fdf274c0258621e",9265:"65f2b22d8fc12e6d4a87",9321:"c4e2b75b9135920babc3",9340:"9bfb091cec7eed6c8111",9384:"88cbaa91c495d86f4bb0",9423:"7b4880b2dc6b01d70ccc",9432:"83c1fecd2ef7e804bcad",9506:"629f4621ba6ffdcaa2f9",9547:"1b36d4400ab841c978c8",9588:"a69e885336eb5d2729fd",9607:"548ff32df8b8cc8df535",9655:"84cc488555df6431facc",9695:"b12262b10affb7785c26",9700:"7a8df1225abd54ff68ed",9838:"8f31fbb1d549230ee3db",9899:"bf7e8ee652abec309cf0",9926:"c03e6e35082beaec02a6",9930:"9f312f7284e506a84ed7",9933:"5a536de1ecae424bad05",9949:"24e174197a1be1f3d36c",9953:"391c200274bbeb92404c"}[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&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(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={76: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(2131);var n=r(61322);RemoteClient=n})();
|
package/kernel.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.32";let s,r=e;r="4.32.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.32";let s,r=e;r="4.32.10";function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const a="20250407",e="04d2b42da93678ca718b23aaf7e216985f10fa8e";export{a as buildDate,e 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.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import r from"../../../core/Logger.js";import{watch as i,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{sqlAnd as s}from"../../../core/sql.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as u}from"../../../layers/support/floorFilterUtils.js";import{isSubtypeGroupLayer as p,isFeatureLayer as d}from"../../../layers/support/layerUtils.js";import{isUtilityNetworkWebMap as c}from"./snappingUtils.js";import{scaleBoundsPredicate as y}from"../../support/layerViewUtils.js";let f=class extends t{set attributeRulesEnabled(e){this._set("attributeRulesEnabled",e),e&&this.loadRules()}get layerView(){return this.view?.allLayerViews?.find((e=>e.layer===this.layer))}get valid(){const{_valid:e,snappingSource:t,layer:r}=this;return!(!t||!r)&&e}get subtypeFilter(){const{layer:e,snappingSource:t}=this;if(!p(e)||!e.subtypes?.length||!t)return{mode:"not-in-use",filter:null};const r=t.layerSource.sublayerSources.filter((e=>e.enabled&&e.layer.visible&&y(this.view?.scale,e.layer.effectiveScaleRange.minScale,e.layer.effectiveScaleRange.maxScale))).map((e=>e.layer.subtypeCode));if(!r.length)return{mode:"none-visible",filter:null};if(r.length===e.subtypes.length)return{mode:"all-visible",filter:null};const i=e.fieldsIndex.get(e.subtypeField)?.name??e.subtypeField;return 1===r.length?{mode:"in-use",filter:`${i} = ${r.getItemAt(0)}`}:{mode:"in-use",filter:`${i} IN (${r.join(", ")})`}}get floorFilter(){const{view:e,layer:t}=this;return e&&t?u({view:e,layer:t}):null}constructor(e){super(e),this.layer=null,this.snappingSource=null,this.rulesTable=null,this._valid=null}initialize(){if(!this.snappingSource||!this.layer)return void(this._valid=!1);const{layer:e,snappingSource:t}=this;if("refresh"in e){const r=e;this.addHandles(r.on("refresh",(()=>t.refresh())))}this.loadRules(),this.addHandles([i((()=>t.updating),(e=>t.layerSource.updating=e),l),i((()=>t.availability),(e=>t.layerSource.availability=e),l)])}getFetchCandidatesParameters(e,t,r){if(!this.valid)return[];const{layer:i,layerView:l,floorFilter:o,rulesTable:a,subtypeFilter:u}=this,y={distance:r,mode:this.view?.type??"2d",point:e,coordinateHelper:t.coordinateHelper,...h(),filter:l&&"filter"in l?l.filter:null};if(o&&(y.filter=m(y.filter,o)),"not-in-use"!==u.mode&&"all-visible"!==u.mode){if("none-visible"===u.mode)return[];y.filter?y.filter.where=s(y.filter.where,u.mode):y.filter=new n({where:u.filter})}if(!this.attributeRulesEnabled)return[y];const f=t.feature,v="subtype-sublayer"===f?.sourceLayer?.type?f.sourceLayer.parent:f?.sourceLayer;if(a&&f&&c(this.view?.map)&&(d(i)||p(i))&&
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import r from"../../../core/Logger.js";import{watch as i,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{sqlAnd as s}from"../../../core/sql.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as u}from"../../../layers/support/floorFilterUtils.js";import{isSubtypeGroupLayer as p,isFeatureLayer as d}from"../../../layers/support/layerUtils.js";import{isUtilityNetworkWebMap as c}from"./snappingUtils.js";import{scaleBoundsPredicate as y}from"../../support/layerViewUtils.js";let f=class extends t{set attributeRulesEnabled(e){this._set("attributeRulesEnabled",e),e&&this.loadRules()}get layerView(){return this.view?.allLayerViews?.find((e=>e.layer===this.layer))}get valid(){const{_valid:e,snappingSource:t,layer:r}=this;return!(!t||!r)&&e}get subtypeFilter(){const{layer:e,snappingSource:t}=this;if(!p(e)||!e.subtypes?.length||!t)return{mode:"not-in-use",filter:null};const r=t.layerSource.sublayerSources.filter((e=>e.enabled&&e.layer.visible&&y(this.view?.scale,e.layer.effectiveScaleRange.minScale,e.layer.effectiveScaleRange.maxScale))).map((e=>e.layer.subtypeCode));if(!r.length)return{mode:"none-visible",filter:null};if(r.length===e.subtypes.length)return{mode:"all-visible",filter:null};const i=e.fieldsIndex.get(e.subtypeField)?.name??e.subtypeField;return 1===r.length?{mode:"in-use",filter:`${i} = ${r.getItemAt(0)}`}:{mode:"in-use",filter:`${i} IN (${r.join(", ")})`}}get floorFilter(){const{view:e,layer:t}=this;return e&&t?u({view:e,layer:t}):null}constructor(e){super(e),this.layer=null,this.snappingSource=null,this.rulesTable=null,this._valid=null}initialize(){if(!this.snappingSource||!this.layer)return void(this._valid=!1);const{layer:e,snappingSource:t}=this;if("refresh"in e){const r=e;this.addHandles(r.on("refresh",(()=>t.refresh())))}this.loadRules(),this.addHandles([i((()=>t.updating),(e=>t.layerSource.updating=e),l),i((()=>t.availability),(e=>t.layerSource.availability=e),l)])}getFetchCandidatesParameters(e,t,r){if(!this.valid)return[];const{layer:i,layerView:l,floorFilter:o,rulesTable:a,subtypeFilter:u}=this,y={distance:r,mode:this.view?.type??"2d",point:e,coordinateHelper:t.coordinateHelper,...h(),filter:l&&"filter"in l?l.filter:null};if(o&&(y.filter=m(y.filter,o)),"not-in-use"!==u.mode&&"all-visible"!==u.mode){if("none-visible"===u.mode)return[];y.filter?y.filter.where=s(y.filter.where,u.mode):y.filter=new n({where:u.filter})}if(!this.attributeRulesEnabled)return[y];const f=t.feature,v="subtype-sublayer"===f?.sourceLayer?.type?f.sourceLayer.parent:f?.sourceLayer;if(a&&f&&c(this.view?.map)&&(d(i)||p(i))&&(d(v)||p(v))&&this.view.map.utilityNetworks?.find((e=>e.isUtilityLayer(v)))){if("loaded"!==a.loadStatus)return[];const e=[],t=i.layerId,r=a.getFeatureSQL(v,f)?.[t];if(!r)return[];const l=r.anyVertex;let s=r.endVertex;return s&&l&&s===l&&(s=""),s&&e.push({...y,returnEdge:!1,vertexMode:"ends",filter:m(y.filter,s)}),l&&e.push({...y,returnEdge:has("snapping-include-edges-when-applying-any-vertex-rule")??!1,vertexMode:"all",filter:m(y.filter,l)}),e}return[y]}async loadRules(){this._valid=null;const{layer:e,view:t,attributeRulesEnabled:i}=this;if(i&&e&&t&&c(t?.map)&&(d(e)||p(e)))try{await Promise.allSettled(t.map.utilityNetworks?.map((e=>e.load()))??[]);const r=t.map.utilityNetworks?.find((t=>t.isUtilityLayer(e)));r&&(this.rulesTable=await r.getRulesTable(),await(this.rulesTable?.load()))}catch(l){return this._valid=!1,void r.getLogger("esri.views.interactive.snapping.FeatureSnappingSourceInfo").error("Failed to load rules table for snapping source",e.title)}this._valid=!0}remove(){this.destroy()}destroy(){this.snappingSource?.destroy()}};function h(){return{returnEdge:!0,vertexMode:"all"}}function m(e,t){return null==e?new n({where:t}):e.where?new n({where:s(e.where,t)}):new n({where:t})}e([o({constructOnly:!0})],f.prototype,"layer",void 0),e([o({constructOnly:!0})],f.prototype,"snappingSource",void 0),e([o({constructOnly:!0})],f.prototype,"view",void 0),e([o({value:!1})],f.prototype,"attributeRulesEnabled",null),e([o()],f.prototype,"layerView",null),e([o()],f.prototype,"rulesTable",void 0),e([o()],f.prototype,"valid",null),e([o()],f.prototype,"subtypeFilter",null),e([o()],f.prototype,"floorFilter",null),e([o()],f.prototype,"_valid",void 0),f=e([a("esri.views.interactive.snapping.FeatureSnappingSourceInfo")],f);export{f as FeatureSnappingSourceInfo};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{substitute as e}from"../../../intl/substitute.js";import{loadFooterActionsComponents as t,FooterActions as o}from"./FooterActions.js";import{loadNoticesComponents as a,Notices as n}from"./Notices.js";import{loadPanelContentComponents as i,PanelContentSection as s,PanelContentSectionGroup as l,PanelContent as r}from"./PanelContent.js";import
|
|
5
|
+
import{substitute as e}from"../../../intl/substitute.js";import{loadFooterActionsComponents as t,FooterActions as o}from"./FooterActions.js";import{loadNoticesComponents as a,Notices as n}from"./Notices.js";import{loadPanelContentComponents as i,PanelContentSection as s,PanelContentSectionGroup as l,PanelContent as r}from"./PanelContent.js";import u from"./PendingFeatureList.js";import{Heading as d,incrementHeadingLevel as c}from"../../support/Heading.js";import"../../support/widgetUtils.js";import{tsx as p,tsxFragment as m}from"../../support/jsxFactory.js";const f=()=>Promise.all([t(),a(),i()]);function g({editorViewModel:t,headingLevel:a,messages:i,messagesCommon:f,onDelete:g,onDeleteAssociation:h,onSave:y,renderAttachments:w,renderFeatureForm:b,renderSketchToolbar:v}){const{activeLeafWorkflow:k,activeWorkflow:F,featureFormViewModel:A,syncing:j}=t;if(!k||!F||!A)return null;const C=k.type.includes("update"),S=C&&!k.hasPendingEdits||j||A.updating,L=C?f.update:f.create,P="create-features"===k?.type?k.numPendingFeaturesExcludingHidden:0,D="create-features"!==k?.type||!!k.data.selectedPendingFeature,H=P>1?e(i.createFeaturesTemplate,{numFeatures:P}):L,I="shouldShowAttachments"in k&&k.shouldShowAttachments&&!A.activeRelationshipInput&&!A.activeAssociationInput,T=A.inputs.every((e=>!e.visible))&&!I,x=T?p(s,null,"create-features"===k.type?p(u,{headingLevel:a,key:"pending-feature-list",workflow:k}):void 0):p(s,{key:"panel-content-section"},p(n,{messages:i,workflow:F}),p(l,null,D||"create-features"!==k.type?b():p(u,{headingLevel:a,key:"pending-feature-list",workflow:k}),I?p("div",{key:"attachments"},p(d,{level:c(a)},i.attachments),w()):null)),B=()=>{const{featureFormViewModel:e}=t;null!=e?.associationId&&(e.associationId=null)},M={appearance:"solid",onClick:y,disabled:S,label:H,type:"button"},V={appearance:"outline",onClick:g,disabled:j,kind:"danger",label:f.delete,type:"button"},E={...V,onClick:h,label:i.deleteAssociationTitle,type:"button"},W={...V,primaryLabel:f.delete,primaryText:f.delete,dropdownItems:[{onClick:h,label:i.deleteAssociationTitle}],type:"split-button"},N={appearance:"outline",onClick:B,disabled:j,label:f.cancel,type:"button"},R="viewing-associated-features"===t.page||"viewing-associated-layers"===t.page?[N]:[M,t.shouldShowDeleteButton&&!t.featureFormHasAssociation?V:void 0,t.shouldShowDeleteButton&&t.featureFormHasAssociation?W:void 0,!t.shouldShowDeleteButton&&t.featureFormHasAssociation?E:void 0];return p(m,null,T?v():void 0,p(r,{key:"attribute-panel-content"},x),p(o,{buttons:R}))}export{g as UpdateFeaturePanelContent,f as loadUpdateFeaturePanelContentComponents};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../Widget.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as s}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{messageBundle as r}from"../../support/decorators/messageBundle.js";import{tsx as c}from"../../support/jsxFactory.js";import{getAssociationTitle as a}from"../../support/UtilityNetworkAssociations/utils/getAssociationTitle.js";import{isFromElement as l}from"../../support/UtilityNetworkAssociations/utils/isFromElement.js";const m="esri-feature-form-utility-network-association-settings",
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../Widget.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as s}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{messageBundle as r}from"../../support/decorators/messageBundle.js";import{tsx as c}from"../../support/jsxFactory.js";import{getAssociationTitle as a}from"../../support/UtilityNetworkAssociations/utils/getAssociationTitle.js";import{isFromElement as l}from"../../support/UtilityNetworkAssociations/utils/isFromElement.js";const m="esri-feature-form-utility-network-association-settings",u={base:m,infoContainer:`${m}__info-container`};let d=class extends i{constructor(e,t){super(e,t),this.percentAlong=50,this.headingLevel=5,this.messagesFeature=null,this.messagesCommon=null,this.messagesFeatureForm=null,this.readOnly=!1,this.sourceFeature=null,this.targetFeature=null,this.utilityNetwork=null}loadDependencies(){return n({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch")})}get association(){return this._get("association")}set association(e){this.percentAlong=e.percentAlong?100*e.percentAlong:50,this._set("association",e)}get associationType(){return this.association.associationType}set associationType(e){this.association.associationType=e,"junction-edge-to-connectivity"!==e&&"junction-edge-from-connectivity"!==e||(this.association.percentAlong=void 0)}render(){return c("div",{class:this.classes(u.base,s.widget)},this._renderFromAssociationEndpoint(),this._renderToAssociationEndpoint(),this._renderAdditionalContent())}_renderFromAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?o:i,r=s.label,c=a(t,"from",n.associations);switch(e){case"connectivity":case"junction-junction-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-from-connectivity":case"junction-edge-to-connectivity":return this._renderAssociationEndpoint(r,c,this._renderConnectivityContent(s.feature,t.fromNetworkElement))}return this._renderAssociationEndpoint(r,c)}_renderToAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?i:o,r=s.label,c=a(t,"to",n.associations);let m;switch(e){case"connectivity":case"junction-junction-connectivity":m=this._renderConnectivityContent(s.feature,t.toNetworkElement);break;case"containment":m=this._isNonspatial(s.feature)?null:this._renderContainmentContent()}return this._renderAssociationEndpoint(r,c,m)}_renderAssociationEndpoint(e,t,o){return c("calcite-block",{description:t,heading:e,open:!0},o)}_renderContainmentContent(){const{messagesFeatureForm:e,association:t}=this,o=t.isContentVisible??!1;return c("calcite-label",{layout:"inline"},e.associations.visible,c("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{t.isContentVisible=e.checked}}))}_renderConnectivityContent(e,t){const{messagesFeatureForm:o,utilityNetwork:i}=this,n=i.getTerminalConfiguration(e),s=n?.terminals.map((e=>this._renderComboboxListItemNumber(e.id,t.terminalId,e.name)))||[];return c("calcite-label",null,o.associations.terminal,c("calcite-combobox",{allowCustomValues:!1,clearDisabled:!0,label:o.associations.terminalComboboxLabel,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:e})=>{t.terminalId=parseInt(e.value,10)}},...s))}_renderAdditionalContent(){const{associationType:e}=this;switch(e){case"connectivity":case"junction-junction-connectivity":case"attachment":case"containment":return}const t="junction-edge-midspan-connectivity"===e?e:"junction-edge-from-connectivity",{messagesFeatureForm:o}=this,i=[this._renderComboboxListItemString("junction-edge-midspan-connectivity",t,o.associations.midspanEdge),this._renderComboboxListItemString("junction-edge-from-connectivity",t,o.associations.endpointEdge)];return c("div",{class:u.infoContainer},c("calcite-label",{key:"additional-content"},o.associations.connectTo,c("calcite-combobox",{allowCustomValues:!1,clearDisabled:!0,label:o.associations.edgeConnectionComboboxLabel,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:e})=>{this.associationType=e.value}},...i)),"junction-edge-midspan-connectivity"===t?this._renderMidspanEdgeContent():this._renderEndpointEdgeContent())}_renderMidspanEdgeContent(){const{messagesFeatureForm:e,percentAlong:t,association:o}=this;return o.percentAlong=t/100,c("calcite-label",{key:"midspan-edge"},e.associations.midspanLocation,c("calcite-input-number",{max:100,min:0,numberButtonType:"vertical",suffixText:"%",value:`${t}`,onCalciteInputNumberInput:({currentTarget:e})=>{this.percentAlong=parseFloat(e.value)}}))}_renderEndpointEdgeContent(){const{associationType:e,messagesFeatureForm:t}=this,o="junction-edge-to-connectivity"===e;return c("calcite-label",{key:"endpoint-edge"},t.associations.edgeSide,c("calcite-label",{layout:"inline"},t.associations.fromSide,c("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{const t=e.checked?"junction-edge-to-connectivity":"junction-edge-from-connectivity";this.associationType=t}}),t.associations.toSide))}_renderComboboxListItemNumber(e,t,o){return c("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_renderComboboxListItemString(e,t,o){return c("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_isNonspatial(e){const{sourceLayer:t}=e;return null!=t&&"geometryType"in t&&null==t.geometryType}};e([t()],d.prototype,"association",null),e([t()],d.prototype,"percentAlong",void 0),e([t()],d.prototype,"associationType",null),e([t()],d.prototype,"headingLevel",void 0),e([t(),r("esri/widgets/Feature/t9n/Feature")],d.prototype,"messagesFeature",void 0),e([t(),r("esri/t9n/common")],d.prototype,"messagesCommon",void 0),e([t(),r("esri/widgets/FeatureForm/t9n/FeatureForm")],d.prototype,"messagesFeatureForm",void 0),e([t()],d.prototype,"readOnly",void 0),e([t()],d.prototype,"sourceFeature",void 0),e([t()],d.prototype,"targetFeature",void 0),e([t()],d.prototype,"utilityNetwork",void 0),d=e([o("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.UtilityNetworkAssociationSettings")],d);const p=d;export{p 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.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import{id as t}from"../../kernel.js";import r from"../../core/Collection.js";import{deprecatedFunction as s}from"../../core/deprecate.js";import i from"../../core/Error.js";import a from"../../core/Evented.js";import l from"../../core/Logger.js";import{whenOnce as o}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{isPoint as h,isMultipoint as u}from"../../geometry/support/jsonUtils.js";import{fetchMessageBundle as p}from"../../intl/messages.js";import d from"../../layers/FeatureLayer.js";import g from"../../layers/GraphicsLayer.js";import y from"../../layers/support/CodedValueDomain.js";import{isFeatureLayer as m,getOwningPortalUrl as f}from"../../layers/support/layerUtils.js";import w from"../../networks/UtilityNetwork.js";import{getFeaturesFromLayers as _}from"../../networks/support/utils.js";import b from"../../portal/Portal.js";import{hasUserTypeExtension as A}from"../../portal/support/utils.js";import{trace as v}from"../../rest/networks/trace.js";import k from"../../rest/networks/support/TraceLocation.js";import I from"../../rest/networks/support/TraceParameters.js";import{addUniqueLayer as G}from"../../views/draw/support/layerUtils.js";import{GeometryHandler as R}from"./support/GeometryHandler.js";import{GraphicHandler as F,barrierColor as L,startingPointColor as T}from"./support/GraphicHandler.js";import{ResultAreaHandler as N}from"./support/ResultAreaHandler.js";import{UtilityHelper as S}from"./support/UtilityHelper.js";const H=()=>p("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace"),P=()=>p("esri/core/t9n/Units"),U=`utility-network-trace-flags-${Date.now()}`,V=`utility-network-trace-results-${Date.now()}`,B=`utility-network-trace-sketch-${Date.now()}`;function C(e){return e instanceof y}function E(e){return"feature"===e.layer.type||"subtype-group"===e.layer.type}function j(e){return"layer"in e}function D(e){return void 0!==e.layerViews}function O(e){return"graphics"===e.type}function M(e){return"feature"===e.type||"subtype-group"===e.type||"group"===e.type}async function x(e){const t=new d({url:e.networkSystemLayers.dirtyAreasLayerUrl});await t.load();const r=t.version;if(Number(r)<=11.1){const t=await f(e.layerUrl),r=new b({url:t});await r.load();const s=r?.user?.username;return!!s&&A(r,s,"utilityNetwork")}return!0}let q=class extends a.EventedAccessor{constructor(e){super(e),this._activeProgress=!1,this._clickHandler=null,this._flags=[],this._flagId=0,this._geometryHandler=null,this._highlightHandler=[],this._resultAreaHandler=null,this._sketchViewModel=null,this._traceTimeout=6e5,this._utilityHelper=new S,this._validUNLayers=[],this._watchHandler=null,this.traces=[],this.graphicHandler=null,this.defaultGraphicColor={color:[255,255,0,.6],haloOpacity:.9,fillOpacity:.2,hex:"#FFFF00"},this.enableResultArea=!1,this.flags=[],this.gdbVersion="sde.DEFAULT",this.messages=null,this.messagesUnits=null,this.defaultResultAreaProperties={type:"convexhull",distance:10,unit:"meters",areaUnit:"square-meters",color:{color:[255,165,0,.5],haloOpacity:.9,fillOpacity:.2,hex:"#ffa500"},show:!1},this.selectedTraces=[],this.selectOnComplete=!0,this.showGraphicsOnComplete=!0,this.showSelectionAttributes=!0,this.traceResults=[],this.utilityNetwork=null}initialize(){s(l.getLogger(this),"gdbVersion will be removed and the gdbVersion of the UtilityNetwork will be consumed directly.",{replacement:"UtilityNetwork.gdbVersion",version:"4.31"}),this._geometryHandler=new R,this.graphicHandler=new F,this._resultAreaHandler=new N;(async()=>{const[e,t]=await Promise.all([H(),P()]);this.set({messages:e,messagesUnits:t})})()}destroy(){this.view=null}get resultAreaProperties(){return this.defaultResultAreaProperties}set resultAreaProperties(e){this._set("resultAreaProperties",{...this.defaultResultAreaProperties,...e}),this.graphicHandler.addCustomColor(this.resultAreaProperties.color),this.traceResults.forEach((t=>{const r=t.resultArea?.show;t.resultArea={...this.defaultResultAreaProperties,...e},this.removeResultAreaFromMap(t),this.enableResultArea&&this.createResultAreaGraphic(t).then((s=>{if(s){t.resultAreaGraphic=s;const i=e?.show??r;t.resultArea&&(t.resultArea.show=i),i&&this.addResultAreaToMap(t,s)}}))}))}get state(){return this.view?.ready?"ready":"loading"}get view(){return this._get("view")}set view(e){e&&"2d"!==e.type&&l.getLogger(this).error(new i("view:invalid-view","SceneView is not supported",{view:e})),this._set("view",e),this.utilityNetwork&&this.reset(),this.utilityNetwork=null,this.loadUtilityNetwork().then((e=>{e&&this.selectTracesOnLoad()}))}addFlagByHit(e,t){const r=!!this.view&&this.view.popupEnabled,s=e=>{this.view?.popup&&(this.view.popupEnabled=e)};return new Promise(((i,a)=>{r&&s(!1),this._clickHandler?.remove(),this._clickHandler=this._sketchViewModel.on("create",(l=>{if("complete"===l.state){const o=this._getGraphicLayer(B);o&&l.graphic&&o.remove(l.graphic),this.queryFlagByHitTest(l,e,t).then((r=>{this.emit("add-flag-complete",{type:e,symbol:t}),i(r)})).catch((r=>{this.emit("add-flag-error",{type:e,symbol:t}),a(r)})).finally((()=>{r&&s(!0),this._clickHandler?.remove()}))}})),this._sketchViewModel.create("point"),this.emit("add-flag",{type:e})}))}addNonspatialTraceLocation(e,t){const r=this._getDisplayField(e),s=this.utilityNetwork?.getTerminalConfiguration(e),i={terminalId:null,isFilterBarrier:!1,allTerminals:s,selectedTerminals:[s?s.terminals[0].id||null:1],displayValue:r};e.attributes={...e.attributes,...i};const a=e.attributes.hasOwnProperty("GLOBALID")?e.attributes.GLOBALID:e.attributes.globalid;if(!this._flags.some((e=>e.globalId===a&&e.type===t))){const r=this._createFlagProperty(e,t,null);this._flags.push(r),this.emit("add-flag-complete",{type:t})}this.emit("add-flag",{type:t})}async addFlagsOnLoad(){if(this._flags.length>0)return[];await o((()=>null!=this.view&&!this.view.updating));return(await Promise.all(this.flags.map((async e=>{if(!e.mapPoint)return null;const{type:t}=e,r=e.mapPoint.clone(),s="barrier"===t?L:T,i={graphic:this.graphicHandler.makeGraphic(r,s),state:"complete",tool:"point",toolEventInfo:null,type:"create"};try{return await this.queryFlagByHitTest(i,e.type,null),this.emit("add-flag-complete",{type:t}),null}catch(a){return this.emit("add-flag-error",{type:t}),"barrier"===t?"barrier":"starting-point"}})))).filter((e=>!e))}async addResultAreaToMap(e,t){if(this.view)if(e.resultArea.show=!0,t)this._resultAreaHandler?.addResultAreaToMap(t,this.view.map),this.emit("add-result-area",{graphic:t});else if(e.results){const t=await this.createResultAreaGraphic(e);t&&(e.resultAreaGraphic=t,this._resultAreaHandler?.addResultAreaToMap(t,this.view.map),this.emit("add-result-area",{graphic:t}))}}async addResultGraphicToView(e,t){const{view:r}=this,{results:s}=e;if(r&&s&&this.utilityNetwork)for(const i in s.aggregatedGeometry)if("line,multipoint,polygon".includes(i)){const a=i,l=s.aggregatedGeometry[a];if(null!=l){l.spatialReference=this.utilityNetwork.spatialReference,e.graphicEnabled=!0;const s=await this._geometryHandler.projectGeometry(l,r.spatialReference),i={globalid:e.trace.globalId};if(null!==s){const e=this.graphicHandler.makeGraphic(s,t.color,i,r.spatialReference);this._getGraphicLayer(V)?.add(e)}}}}addTerminal(e,t){const r=[...this._flags];r.forEach((r=>{r.globalId===t.globalId&&(t.selectedTerminals?.includes(parseInt(e,10))||r.selectedTerminals?.push(parseInt(e,10)))})),this._flags=r}async callTrace(){const e=this.traces.filter((e=>e.selected));return!!e.length&&(this.traceResults.length>0&&this.traceResults.forEach((e=>{this.removeResultGraphicFromView(e)})),this.traceResults=[],this.removeSelection(),await Promise.all(e.map((async(e,t)=>{const r=e,s=new I({gdbVersion:this.utilityNetwork?.gdbVersion,moment:this.utilityNetwork?.historicMoment,namedTraceConfigurationGlobalId:r.globalId,outSpatialReference:null,resultTypes:null,traceType:r.traceType,traceLocations:this._flags,traceConfiguration:null});await this.executeTrace(r,this.utilityNetwork?.networkServiceUrl,s).then((e=>{if(e.hasOwnProperty("results")){const r={...e};if(null!==r.results){r.resultArea={...this.resultAreaProperties};const e=[...r.results.elements];r.results.elements.length=0;const s=new Map;for(const t of e)s.has(t.globalId)||(s.set(t.globalId,!0),r.results.elements.push(t));const i=[...this.traceResults];i.splice(t,0,r),this.traceResults=i,null!==r.results&&(this.selectOnComplete&&this.mergeSelection(!0,r.trace),this.showGraphicsOnComplete&&this.addResultGraphicToView(r,r.graphicColor),this.enableResultArea&&this.createResultAreaGraphic(r).then((e=>{e&&(r.resultAreaGraphic=e,r.resultArea?.show&&this.addResultAreaToMap(r,r.resultAreaGraphic))})))}else{const r=[...this.traceResults];r.splice(t,0,e),this.traceResults=r}this._activeProgress=!1}else{this._activeProgress=!1;const r=[...this.traceResults];r.splice(t,0,e),this.traceResults=r}})).catch((e=>{throw this._activeProgress=!1,e}))}))),!0)}changeResultAreaColor(e,t){if(!e.resultArea)return;e.resultArea.color=t;const r=this._resultAreaHandler?.changeResultAreaColor(e.trace.globalId,t,this.view.map);e.resultAreaGraphic&&(e.resultAreaGraphic.symbol=r)}changeResultGraphicColor(e,t){const r=[...this.traceResults];r.length>0&&r.forEach((r=>{r.trace.globalId===t.trace.globalId&&(r.graphicColor=e,r.graphicEnabled=!0)})),this.traceResults=r,this.removeResultGraphicFromView(t),this.addResultGraphicToView(t,e)}changeFlagSymbol(e,t){this._flags.length>0&&this._flags.forEach((r=>{r.type===e&&t&&r.mapGraphic&&(r.mapGraphic.symbol=t)}))}checkCanTrace(){const e={status:!0,issues:[]},t=this.traces.filter((e=>e.selected));t.length||(e.status=!1,e.issues.push("noTracesSelected"));this._flags.some((e=>"starting-point"===e.type))||(e.status=!1,e.issues.push("noStartingPoints"));return this._flags.filter((e=>null!==e.allTerminals)).some((e=>!e.selectedTerminals.length))&&(e.status=!1,e.issues.push("noTerminalSelected")),e}checkSelectionExist(){return this._highlightHandler.some((e=>e))}clearResult(e){if(!this.view)return;let t=this.traceResults;if(t.length>0){const r=t.filter((t=>t.trace.globalId===e.globalId));r.length>0&&(this.removeResultGraphicFromView(r[0]),this.removeResultAreaFromMap(r[0])),t=t.filter((t=>t.trace.globalId!==e.globalId))}this.traceResults=t,0===t.length?(this.removeAllResultAreaGraphics(),this.removeSelection(),this.emit("clear-selection",{resultSet:[]})):this.mergeSelection(!1,e)}createResultAreaGeometries(e,t,r){if(!this.view||!this.resultAreaProperties)return;let s;if(s="convexhull"===this.resultAreaProperties?.type?1===t.length&&(h(t[0])||u(t[0])&&1===t[0].points.length)?this._resultAreaHandler?.createBuffer(t,r,e.resultArea?.unit,!0):this._resultAreaHandler?.createConvexHull(t,e.resultArea?.distance,e.resultArea?.unit):this._resultAreaHandler?.createBuffer(t,r,e.resultArea?.unit,!0),!s)return;if(Array.isArray(s)){for(const t of s){const r=this.getResultAreaAttributes(e,t),s=this._resultAreaHandler?.createResultAreaGraphic(t,r,e.resultArea?.areaUnit,this.messages,this.messagesUnits,e.resultArea?.color);if(s)return s}return}const i=this.getResultAreaAttributes(e,s);return this._resultAreaHandler?.createResultAreaGraphic(s,i,e.resultArea?.areaUnit,this.messages,this.messagesUnits,e.resultArea?.color)}async createResultAreaGraphic(e){if(e.results){const t=await this._createResultAreaInputGeometry(e.results);if(t.length>0){const r=Array(t.length).fill(e.resultArea?.distance),s=this.createResultAreaGeometries(e,t,r);return this.emit("create-result-area",{graphic:s}),s}}}executeTrace(e,t,r){const s=this._processFlags(r.traceLocations);return r.traceLocations=s,v(t,r,{timeout:this._traceTimeout}).then((t=>({trace:e,results:t,selectionEnabled:!1,graphicEnabled:!1,graphicColor:this.defaultGraphicColor,status:"success",date:new Date}))).catch((t=>({trace:e,results:null,selectionEnabled:!1,graphicEnabled:!1,graphicColor:this.defaultGraphicColor,status:t.message,date:new Date})))}async getNonspatialTraceLocationInitialFeature(){return new Promise(((e,t)=>{this._clickHandler?.remove(),this._clickHandler=this._sketchViewModel.on("create",(async r=>{if("complete"!==r.state)return;const s=this._getGraphicLayer(B);s&&r.graphic&&s.remove(r.graphic);const i=this.view?.toScreen(r.graphic?.geometry);if(!i)return;const a=await(this.view?.hitTest(i));if(a?.results.length){const r=a.results.find((e=>"graphic"===e.type&&this.utilityNetwork?.isUtilityLayer(e.layer)));r?e(r):t(null)}})),this._sketchViewModel.create("point")}))}getResultAreaAttributes(e,r){const{messages:s}=this,i=[],a=[];this._flags.forEach((e=>{const t=e.displayValue?.field+":"+e.displayValue?.value+";"+s.attributeStrings.globalid+":"+e.globalId+";"+s.attributeStrings.terminalid+":"+e.terminalId+";"+s.attributeStrings.x+":"+e.mapPoint?.x+";"+s.attributeStrings.y+":"+e.mapPoint?.y;"starting-point"===e.type?i.push(t):a.push(t)}));const l=this.utilityNetwork?this.utilityNetwork.gdbVersion:this.gdbVersion;return{traceId:e.trace.globalId,traceName:e.trace.title,traceDescription:e.trace.description??"",startingPoints:i.toString(),barriers:a.toString(),version:l??void 0,username:t.credentials[0].userId,date:e.date,elementCount:e.results?.elements.length,functionResult:JSON.stringify(e.results?.globalFunctionResults),areaStatistic:r?this._geometryHandler.calculateArea(r,e.resultArea?.areaUnit):0}}getValidSources(){let e=[];const t=this.utilityNetwork?.dataElement?.domainNetworks??[];for(const r of t)e=e.concat(r.junctionSources),e=e.concat(r.edgeSources);return e}groupResultsByNetworkSource(e){return 0===e.length?[]:this._groupBy(e,"networkSourceId")}async loadUtilityNetwork(){const{view:e}=this;if(!e)return null;if(await e.when(),this.utilityNetwork){if(this.utilityNetwork.loaded||await this.utilityNetwork.load(),this.utilityNetwork instanceof w){try{const t=e.map;await t.loadAll()}finally{this._loadUNSupportItems()}return this.utilityNetwork}return null}const t=e.map,r=t.utilityNetworks?.at(0);if(r){if(await r.load(),this.utilityNetwork=r,!await x(r))throw new i("utility-network:no-user-type-extension","User type extension not found");try{await t.loadAll()}finally{this._loadUNSupportItems()}return r}return null}manageFilterBarrier(e,t){const r=[...this._flags];r.forEach((r=>{r.globalId===t.globalId&&"barrier"===t.type&&r.id===t.id&&(r.isFilterBarrier=e)})),this._flags=r}mergeSelection(e,t){let r=[];const s=[...this.traceResults],i=t.globalId;s.forEach((t=>{i===t.trace.globalId&&(t.selectionEnabled=e),t.selectionEnabled&&null!==t.results?.elements&&(r=[...r,...t.results?.elements??[]])})),this.selectResults([...new Set(r)])}async queryFeaturesById(e){const{view:t}=this;if(!t||!this.utilityNetwork)return null;const s=this.utilityNetwork.getObjectIdsFromElements(e),i={layerUrl:s[0].layerUrl,objectIds:s[0].objectIds,outFields:["*"]},a=t.map?.allTables.toArray().filter((e=>e?.parsedUrl?.path===s[0].layerUrl)).filter(m)??[];this._getUniqueMapLayerViews(t).filter((({layer:e})=>e?.parsedUrl?.path===s[0].layerUrl)).forEach((({layer:e})=>{"feature"!==e.type&&"subtype-group"!==e.type||a.push(e)}));const l=(await Promise.all(a.map((async e=>{const s={layers:new r([e]),layerInfos:[i],returnGeometry:!0,outSpatialReference:t.spatialReference},[a]=await _(s,!1);return a})))).filter((({featureSet:e})=>e.features.length>0));return l.length>0?l:null}queryFlagByHitTest(e,t,r){return this._lookupFlagByHit(e).then((e=>{const{view:s}=this;if(!s)return!1;if(e.length>0){const s=[...this._flags],i=r;return e.forEach((e=>{const r=e.graphic,a=r.attributes.hasOwnProperty("GLOBALID")?r.attributes.GLOBALID:r.attributes.globalid;if(s.filter((e=>e.globalId===a)).length<=0){const e=this.graphicHandler.getFlagGraphic(r.attributes.mapPoint,t,r,i);this._getGraphicLayer(U)?.add(e);const a=this._createFlagProperty(r,t,e);s.push(a)}else if(null!==r.attributes.percentAlong){const e=this.graphicHandler.getFlagGraphic(r.attributes.mapPoint,t,r,i);this._getGraphicLayer(U)?.add(e);const a=this._createFlagProperty(r,t,e);s.push(a)}})),this._flags=s,!0}return!1}))}removeResultGraphicFromView(e){const{view:t}=this;if(!t)return;const r=this._getGraphicLayer(V)?.graphics;e.graphicEnabled=!1;const s=r?.filter((t=>t.attributes[t.attributes.hasOwnProperty("GLOBALID")?"GLOBALID":"globalid"]===e.trace.globalId));s?.forEach((e=>{this._getGraphicLayer(V)?.remove(e)}))}removeFlag(e){const t=this._flags.filter((t=>{if(t.id!==e.id)return t}));this._removeGraphic(e),this._flags=t}removeAllResultAreaGraphics(){this._resultAreaHandler?.removeAllResultAreaGraphics(this.view.map)}removeResultAreaFromMap(e){if(e.resultArea){e.resultArea.show=!1;const t=this._resultAreaHandler?.removeResultArea(e.trace.globalId,this.view?.map);t&&this.emit("remove-result-area",{graphic:t})}}removeSelection(){this._highlightHandler.forEach((e=>{e&&e.remove()})),this._highlightHandler=[]}removeTerminal(e,t){const r=[...this._flags];r.forEach((r=>{if(r.globalId===t.globalId&&t.selectedTerminals?.includes(parseInt(e,10))){const s=t.selectedTerminals.indexOf(parseInt(e,10));r.selectedTerminals?.splice(s,1)}})),this._flags=r}removeFlagsOnLoadWatcher(){this._watchHandler&&null!==this._watchHandler&&this._watchHandler.remove()}removeClickHandler(){this._clickHandler&&(this._sketchViewModel.cancel(),this._clickHandler.remove())}reset(){this._flags=[],this.traceResults=[];const e=[...this.traces];e.forEach((e=>{e.selected=!1})),this.traces=e,this.view&&(this._getGraphicLayer(B)?.removeAll(),this._getGraphicLayer(U)?.removeAll(),this._getGraphicLayer(V)?.removeAll(),this.removeAllResultAreaGraphics(),this.removeSelection(),this.emit("clear-selection",{resultSet:[]}),this.emit("reset"))}selectFeaturesById(e){const{view:t}=this;if(!t||!this.utilityNetwork)return;const r=this.utilityNetwork.getObjectIdsFromElements(e);this._getUniqueMapLayerViews(t).forEach((e=>{j(e)&&e.layer?.parsedUrl?.path===r[0].layerUrl&&E(e)&&this._highlightHandler.push(e.highlight(r[0].objectIds))}))}selectResults(e){if(e.length>0){this.removeSelection();const t=this.groupResultsByNetworkSource(e),r=[];for(const e in t)this.selectFeaturesById(t[e]),r.push(this.queryFeaturesById(t[e]));Promise.all(r).then((e=>{this.emit("select-features",{resultSet:e})}))}else this.removeSelection(),this.emit("clear-selection",{resultSet:[]})}selectTraces(e,t){const r=[...this.traces];r.forEach((r=>{t===r.globalId&&(r.selected=e)})),this.traces=r}selectTracesOnLoad(){this.utilityNetwork?.hasOwnProperty("sharedNamedTraceConfigurations")&&(this.traces=[...this.utilityNetwork.sharedNamedTraceConfigurations],this.traces.forEach((e=>{e.selected=!1,this.selectedTraces.includes(e.globalId)&&(e.selected=!0)})))}zoomToAsset(e){this.view?.goTo(e).catch((e=>console.error(e)))}async _createResultAreaInputGeometry(e){if(null!=e.aggregatedGeometry)return this._geometryHandler.mergeAggregatedToGeometries(e.aggregatedGeometry);const t=this.groupResultsByNetworkSource(e.elements),r=[];for(const s in t)r.push(this.queryFeaturesById(t[s]));try{const e=await Promise.all(r),t=[];for(const r of e)if(r)for(const e of r)for(const r of e.featureSet.features)r.geometry&&t.push(r.geometry);return t}catch{return[]}}_loadUNSupportItems(){if(!this.utilityNetwork)return;const{map:e}=this.view,{messages:t}=this;this._populateOutfields(),this._createGraphicLayer(B),this._createGraphicLayer(U),this._createGraphicLayer(V),this._resultAreaHandler?.createGraphicLayer(e,t?.alertsStrings.genericResultHeader),this._validUNLayers=this._utilityHelper.getValidUtilityNetworkLayers(e,this.utilityNetwork),this._sketchViewModel=this.graphicHandler.initializeSketch(this.view,this._getGraphicLayer(B),this._validUNLayers)}_getUniqueMapLayerViews(e){const t=[],r=e.layerViews.filter((({layer:{type:e}})=>"feature"===e||"group"===e||"subtype-group"===e)).toArray(),s=e=>{for(const r of e.layerViews)D(r)?s(r):t.push(r)};return r.forEach((e=>{switch(e.layer.type){case"group":D(e)&&s(e);break;case"subtype-group":t.push(e);break;default:t.some((t=>t.layer.id===e.layer.id))||t.push(e)}})),t}_processFlags(e){const t=[];return e.forEach((e=>{if(null!==e.selectedTerminals&&e.selectedTerminals.length>0)e.selectedTerminals.forEach((r=>{const s=new k({globalId:e.globalId,percentAlong:e.percentAlong,terminalId:r,type:e.type,isFilterBarrier:e.isFilterBarrier});t.push(s)}));else{const r=new k({globalId:e.globalId,percentAlong:e.percentAlong,type:e.type,isFilterBarrier:e.isFilterBarrier});t.push(r)}})),t}_getDisplayField(e){return"subtype-sublayer"===e?.layer?.type?this._getDisplayFieldBySublayer(e):this._getDisplayFieldByFeatureLayer(e)}_getDisplayFieldBySublayer(e){let t="",r="";const s=e.layer;t=this._checkParentForData(s,"displayField");for(const i in e.attributes){const a=i.toLowerCase();a===t?.toLowerCase()?(r=e.attributes[i],"assetgroup"===a||"assettype"===a?r=this._checkSubtype(s,s.subtypeCode):(r=this._checkDomain(s.fields,i,r),"string"==typeof r&&(r=this._defaultDisplayField(r,s)))):(r=this._checkDomain(s.fields,i,r),"string"==typeof r&&(r=this._defaultDisplayField(r,s)))}return{field:t,value:r.toString()}}_getDisplayFieldByFeatureLayer(e){const t=e.layer;let r=t.displayField,s="";for(const i in e.attributes){const a=i.toLowerCase();if(a===r?.toLowerCase())if(s=e.attributes[i],"assetgroup"===a||"assettype"===a){let a=e.attributes[t.typeIdField.toUpperCase()];a||(a=e.attributes[t.typeIdField.toLowerCase()]),r=t.typeIdField,s=this._checkSubtype(t,a),""===r&&(t.templates&&t.templates.length>0?(r=t.templates[0]?.name,s=t.templates[0]?.name):(r=t.displayField,s=e.attributes[i]))}else s=this._checkDomain(t.fields,i,s),"string"==typeof s&&(s=this._defaultDisplayField(s,t));else s=this._checkDomain(t.fields,i,s),"string"==typeof s&&(s=this._defaultDisplayField(s,t))}return{field:r,value:s?s.toString():""}}_checkSubtype(e,t){let r=t;if("subtype-sublayer"===e.type){const s=this._checkParentForData(e,"subtypes");s?.length>0&&s.forEach((e=>{e.code===t&&(r=e.name)}))}else if(null!=e.types&&e.types.length>0){const s=e.types.filter((e=>e.id===t));s.length>0&&(r=s[0].name)}return r}_checkDomain(e,t,r){let s=r;const i=e.filter((e=>e.name.toLowerCase()===t.toLowerCase()));if(i.length>0&&C(i[0].domain)&&i[0].domain?.codedValues){const e=i[0].domain.codedValues.filter((({code:e})=>e===r));e.length>0&&(s=e[0].name)}return s}_checkParentForData(e,t){return e.parent?.[t]??null}_defaultDisplayField(e,t){return e.trim()?e:t.templates&&t.templates?.length>0?t.templates[0].name:t.title}get _uniqueFlagId(){return this._flagId++}_groupBy(e,t){return e.reduce(((e,r)=>((e[r[t]]=e[r[t]]||[]).push(r),e)),{})}async _lookupFlagByHit(e){const t=e.graphic?.geometry,r=[];if(t&&h(t)&&this.view){const s=this.view.toScreen(t);if(s){const t=await this.view.hitTest(s,{include:this._validUNLayers});if(t?.results.length){const s=t.results.find((e=>null!==e.layer));if(s.graphic?.geometry)if("polyline"===s.graphic.geometry.type){const t={terminalId:null,isFilterBarrier:!1,allTerminals:null,selectedTerminals:null,percentAlong:this._geometryHandler.getPercentageAlong(s.graphic.geometry,e.graphic?.geometry,s.graphic.geometry.spatialReference),displayValue:this._getDisplayField(s.graphic),mapPoint:s.mapPoint};s.graphic.attributes={...s.graphic.attributes,...t},r.push(s)}else if(("point"===s.graphic.geometry.type||"polygon"===s.graphic.geometry.type)&&this.utilityNetwork){const e=this.utilityNetwork.getTerminalConfiguration(s.graphic),t=this._getDisplayField(s.graphic),i={terminalId:e?e.terminals[0].id||null:1,isFilterBarrier:!1,allTerminals:e??null,selectedTerminals:[e?e.terminals[0].id||null:1],percentAlong:null,displayValue:t,mapPoint:s.mapPoint};s.graphic.attributes={...s.graphic.attributes,...i},r.push(s)}}}}return r}_createFlagProperty(e,t,r){const s=new k;s.terminalId=e.attributes.terminalId,s.isFilterBarrier=e.attributes.isFilterBarrier,s.percentAlong=e.attributes.percentAlong,s.globalId=e.attributes.globalid||e.attributes.GLOBALID,s.type=t;const i=s;return i.details=e,i.mapGraphic=r,i.id=this._uniqueFlagId,i.allTerminals=e.attributes.allTerminals,i.selectedTerminals=e.attributes.selectedTerminals,i.displayValue=e.attributes.displayValue,i.mapPoint=e.attributes.mapPoint,i}async _populateOutfields(){if(!this.view)return;const{map:e}=this.view,t=this.getValidSources(),r=e=>{"group"===e.type?e.layers.forEach((e=>{M(e)&&r(e)})):t.some((t=>t.layerId===e.layerId))&&e.fields.some((e=>"assetgroup"===e.name.toLowerCase()))&&(e.outFields=["assetgroup","assettype","globalid","objectid"])};for(const s of e.layers)M(s)&&r(s)}_removeGraphic(e){this._getGraphicLayer(U)?.remove(e.mapGraphic)}_createGraphicLayer(e){const{map:t}=this.view;if(!t.findLayerById(e)){const t=new g({id:e,internal:!0,listMode:"hide",title:e});G(this.view,t)}}_getGraphicLayer(e){const{map:t}=this.view;if(t){const r=t.findLayerById(e);if(r&&O(r))return r}return null}};e([n()],q.prototype,"_activeProgress",void 0),e([n()],q.prototype,"_flags",void 0),e([n()],q.prototype,"traces",void 0),e([n()],q.prototype,"defaultGraphicColor",void 0),e([n()],q.prototype,"enableResultArea",void 0),e([n()],q.prototype,"flags",void 0),e([n()],q.prototype,"gdbVersion",void 0),e([n()],q.prototype,"messages",void 0),e([n()],q.prototype,"messagesUnits",void 0),e([n()],q.prototype,"resultAreaProperties",null),e([n()],q.prototype,"selectedTraces",void 0),e([n()],q.prototype,"selectOnComplete",void 0),e([n()],q.prototype,"showGraphicsOnComplete",void 0),e([n()],q.prototype,"showSelectionAttributes",void 0),e([n({readOnly:!0})],q.prototype,"state",null),e([n()],q.prototype,"traceResults",void 0),e([n()],q.prototype,"utilityNetwork",void 0),e([n({value:null})],q.prototype,"view",null),q=e([c("esri.widgets.UtilityNetworkTrace.UtilityNetworkTraceViewModel")],q);const z=q;export{z as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import{id as t}from"../../kernel.js";import r from"../../core/Collection.js";import{deprecatedFunction as s}from"../../core/deprecate.js";import i from"../../core/Error.js";import a from"../../core/Evented.js";import l from"../../core/Logger.js";import{whenOnce as o}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{isPoint as h,isMultipoint as u}from"../../geometry/support/jsonUtils.js";import{fetchMessageBundle as p}from"../../intl/messages.js";import d from"../../layers/FeatureLayer.js";import g from"../../layers/GraphicsLayer.js";import y from"../../layers/support/CodedValueDomain.js";import{isFeatureLayer as m,getOwningPortalUrl as f}from"../../layers/support/layerUtils.js";import w from"../../networks/UtilityNetwork.js";import{getFeaturesFromLayers as _}from"../../networks/support/utils.js";import b from"../../portal/Portal.js";import{hasUserTypeExtension as A}from"../../portal/support/utils.js";import{trace as v}from"../../rest/networks/trace.js";import k from"../../rest/networks/support/TraceLocation.js";import I from"../../rest/networks/support/TraceParameters.js";import{addUniqueLayer as G}from"../../views/draw/support/layerUtils.js";import{GeometryHandler as R}from"./support/GeometryHandler.js";import{GraphicHandler as F,barrierColor as L,startingPointColor as T}from"./support/GraphicHandler.js";import{ResultAreaHandler as H}from"./support/ResultAreaHandler.js";import{UtilityHelper as N}from"./support/UtilityHelper.js";const S=()=>p("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace"),P=()=>p("esri/core/t9n/Units"),U=`utility-network-trace-flags-${Date.now()}`,V=`utility-network-trace-results-${Date.now()}`,B=`utility-network-trace-sketch-${Date.now()}`;function C(e){return e instanceof y}function E(e){return"feature"===e.layer.type||"subtype-group"===e.layer.type}function j(e){return"layer"in e}function D(e){return void 0!==e.layerViews}function O(e){return"graphics"===e.type}function M(e){return"feature"===e.type||"subtype-group"===e.type||"group"===e.type}async function x(e){const t=new d({url:e.networkSystemLayers.dirtyAreasLayerUrl});await t.load();const r=t.version;if(Number(r)<=11.1){const t=await f(e.layerUrl),r=new b({url:t});await r.load();const s=r?.user?.username;return!!s&&A(r,s,"utilityNetwork")}return!0}let q=class extends a.EventedAccessor{constructor(e){super(e),this._activeProgress=!1,this._clickHandler=null,this._flags=[],this._flagId=0,this._geometryHandler=null,this._highlightHandler=[],this._resultAreaHandler=null,this._sketchViewModel=null,this._traceTimeout=6e5,this._utilityHelper=new N,this._validUNLayers=[],this._watchHandler=null,this.traces=[],this.graphicHandler=null,this.defaultGraphicColor={color:[255,255,0,.6],haloOpacity:.9,fillOpacity:.2,hex:"#FFFF00"},this.enableResultArea=!1,this.flags=[],this.gdbVersion="sde.DEFAULT",this.messages=null,this.messagesUnits=null,this.defaultResultAreaProperties={type:"convexhull",distance:10,unit:"meters",areaUnit:"square-meters",color:{color:[255,165,0,.5],haloOpacity:.9,fillOpacity:.2,hex:"#ffa500"},show:!1},this.selectedTraces=[],this.selectOnComplete=!0,this.showGraphicsOnComplete=!0,this.showSelectionAttributes=!0,this.traceResults=[],this.utilityNetwork=null}initialize(){s(l.getLogger(this),"gdbVersion will be removed and the gdbVersion of the UtilityNetwork will be consumed directly.",{replacement:"UtilityNetwork.gdbVersion",version:"4.31"}),this._geometryHandler=new R,this.graphicHandler=new F,this._resultAreaHandler=new H;(async()=>{const[e,t]=await Promise.all([S(),P()]);this.set({messages:e,messagesUnits:t})})()}destroy(){this.view=null}get resultAreaProperties(){return this.defaultResultAreaProperties}set resultAreaProperties(e){this._set("resultAreaProperties",{...this.defaultResultAreaProperties,...e}),this.graphicHandler.addCustomColor(this.resultAreaProperties.color),this.traceResults.forEach((t=>{const r=t.resultArea?.show;t.resultArea={...this.defaultResultAreaProperties,...e},this.removeResultAreaFromMap(t),this.enableResultArea&&this.createResultAreaGraphic(t).then((s=>{if(s){t.resultAreaGraphic=s;const i=e?.show??r;t.resultArea&&(t.resultArea.show=i),i&&this.addResultAreaToMap(t,s)}}))}))}get state(){return this.view?.ready?"ready":"loading"}get view(){return this._get("view")}set view(e){e&&"2d"!==e.type&&l.getLogger(this).error(new i("view:invalid-view","SceneView is not supported",{view:e})),this._set("view",e),this.utilityNetwork&&this.reset(),this.utilityNetwork=null,this.loadUtilityNetwork().then((e=>{e&&this.selectTracesOnLoad()}))}addFlagByHit(e,t){const r=!!this.view&&this.view.popupEnabled,s=e=>{this.view?.popup&&(this.view.popupEnabled=e)};return new Promise(((i,a)=>{r&&s(!1),this._clickHandler?.remove(),this._clickHandler=this._sketchViewModel.on("create",(l=>{if("complete"===l.state){const o=this._getGraphicLayer(B);o&&l.graphic&&o.remove(l.graphic),this.queryFlagByHitTest(l,e,t).then((r=>{this.emit("add-flag-complete",{type:e,symbol:t}),i(r)})).catch((r=>{this.emit("add-flag-error",{type:e,symbol:t}),a(r)})).finally((()=>{r&&s(!0),this._clickHandler?.remove()}))}})),this._sketchViewModel.create("point"),this.emit("add-flag",{type:e})}))}addNonspatialTraceLocation(e,t){const r=this._getDisplayField(e),s=this.utilityNetwork?.getTerminalConfiguration(e),i={terminalId:null,isFilterBarrier:!1,allTerminals:s,selectedTerminals:[s?s.terminals[0].id||null:1],displayValue:r};e.attributes={...e.attributes,...i};const a=e.attributes.hasOwnProperty("GLOBALID")?e.attributes.GLOBALID:e.attributes.globalid;if(!this._flags.some((e=>e.globalId===a&&e.type===t))){const r=this._createFlagProperty(e,t,null);this._flags.push(r),this.emit("add-flag-complete",{type:t})}this.emit("add-flag",{type:t})}async addFlagsOnLoad(){if(this._flags.length>0)return[];await o((()=>null!=this.view&&!this.view.updating));return(await Promise.all(this.flags.map((async e=>{if(!e.mapPoint)return null;const{type:t}=e,r=e.mapPoint.clone(),s="barrier"===t?L:T,i={graphic:this.graphicHandler.makeGraphic(r,s),state:"complete",tool:"point",toolEventInfo:null,type:"create"};try{return await this.queryFlagByHitTest(i,e.type,null),this.emit("add-flag-complete",{type:t}),null}catch(a){return this.emit("add-flag-error",{type:t}),"barrier"===t?"barrier":"starting-point"}})))).filter((e=>!e))}async addResultAreaToMap(e,t){if(this.view)if(e.resultArea.show=!0,t)this._resultAreaHandler?.addResultAreaToMap(t,this.view.map),this.emit("add-result-area",{graphic:t});else if(e.results){const t=await this.createResultAreaGraphic(e);t&&(e.resultAreaGraphic=t,this._resultAreaHandler?.addResultAreaToMap(t,this.view.map),this.emit("add-result-area",{graphic:t}))}}async addResultGraphicToView(e,t){const{view:r}=this,{results:s}=e;if(r&&s&&this.utilityNetwork)for(const i in s.aggregatedGeometry)if("line,multipoint,polygon".includes(i)){const a=i,l=s.aggregatedGeometry[a];if(null!=l){l.spatialReference=this.utilityNetwork.spatialReference,e.graphicEnabled=!0;const s=await this._geometryHandler.projectGeometry(l,r.spatialReference),i={globalid:e.trace.globalId};if(null!==s){const e=this.graphicHandler.makeGraphic(s,t.color,i,r.spatialReference);this._getGraphicLayer(V)?.add(e)}}}}addTerminal(e,t){const r=[...this._flags];r.forEach((r=>{r.globalId===t.globalId&&(t.selectedTerminals?.includes(parseInt(e,10))||r.selectedTerminals?.push(parseInt(e,10)))})),this._flags=r}async callTrace(){const e=this.traces.filter((e=>e.selected));return!!e.length&&(this.traceResults.length>0&&this.traceResults.forEach((e=>{this.removeResultGraphicFromView(e)})),this.traceResults=[],this.removeSelection(),await Promise.all(e.map((async(e,t)=>{const r=e,s=new I({gdbVersion:this.utilityNetwork?.gdbVersion,moment:this.utilityNetwork?.historicMoment,namedTraceConfigurationGlobalId:r.globalId,outSpatialReference:null,resultTypes:null,traceType:r.traceType,traceLocations:this._flags,traceConfiguration:null});await this.executeTrace(r,this.utilityNetwork?.networkServiceUrl,s).then((e=>{if(e.hasOwnProperty("results")){const r={...e};if(null!==r.results){r.resultArea={...this.resultAreaProperties};const e=[...r.results.elements];r.results.elements.length=0;const s=new Map;for(const t of e)s.has(t.globalId)||(s.set(t.globalId,!0),r.results.elements.push(t));const i=[...this.traceResults];i.splice(t,0,r),this.traceResults=i,null!==r.results&&(this.selectOnComplete&&this.mergeSelection(!0,r.trace),this.showGraphicsOnComplete&&this.addResultGraphicToView(r,r.graphicColor),this.enableResultArea&&this.createResultAreaGraphic(r).then((e=>{e&&(r.resultAreaGraphic=e,r.resultArea?.show&&this.addResultAreaToMap(r,r.resultAreaGraphic))})))}else{const r=[...this.traceResults];r.splice(t,0,e),this.traceResults=r}this._activeProgress=!1}else{this._activeProgress=!1;const r=[...this.traceResults];r.splice(t,0,e),this.traceResults=r}})).catch((e=>{throw this._activeProgress=!1,e}))}))),!0)}cancelAddFlagByHit(){this._sketchViewModel.cancel()}changeResultAreaColor(e,t){if(!e.resultArea)return;e.resultArea.color=t;const r=this._resultAreaHandler?.changeResultAreaColor(e.trace.globalId,t,this.view.map);e.resultAreaGraphic&&(e.resultAreaGraphic.symbol=r)}changeResultGraphicColor(e,t){const r=[...this.traceResults];r.length>0&&r.forEach((r=>{r.trace.globalId===t.trace.globalId&&(r.graphicColor=e,r.graphicEnabled=!0)})),this.traceResults=r,this.removeResultGraphicFromView(t),this.addResultGraphicToView(t,e)}changeFlagSymbol(e,t){this._flags.length>0&&this._flags.forEach((r=>{r.type===e&&t&&r.mapGraphic&&(r.mapGraphic.symbol=t)}))}checkCanTrace(){const e={status:!0,issues:[]},t=this.traces.filter((e=>e.selected));t.length||(e.status=!1,e.issues.push("noTracesSelected"));this._flags.some((e=>"starting-point"===e.type))||(e.status=!1,e.issues.push("noStartingPoints"));return this._flags.filter((e=>null!==e.allTerminals)).some((e=>!e.selectedTerminals.length))&&(e.status=!1,e.issues.push("noTerminalSelected")),e}checkSelectionExist(){return this._highlightHandler.some((e=>e))}clearResult(e){if(!this.view)return;let t=this.traceResults;if(t.length>0){const r=t.filter((t=>t.trace.globalId===e.globalId));r.length>0&&(this.removeResultGraphicFromView(r[0]),this.removeResultAreaFromMap(r[0])),t=t.filter((t=>t.trace.globalId!==e.globalId))}this.traceResults=t,0===t.length?(this.removeAllResultAreaGraphics(),this.removeSelection(),this.emit("clear-selection",{resultSet:[]})):this.mergeSelection(!1,e)}createResultAreaGeometries(e,t,r){if(!this.view||!this.resultAreaProperties)return;let s;if(s="convexhull"===this.resultAreaProperties?.type?1===t.length&&(h(t[0])||u(t[0])&&1===t[0].points.length)?this._resultAreaHandler?.createBuffer(t,r,e.resultArea?.unit,!0):this._resultAreaHandler?.createConvexHull(t,e.resultArea?.distance,e.resultArea?.unit):this._resultAreaHandler?.createBuffer(t,r,e.resultArea?.unit,!0),!s)return;if(Array.isArray(s)){for(const t of s){const r=this.getResultAreaAttributes(e,t),s=this._resultAreaHandler?.createResultAreaGraphic(t,r,e.resultArea?.areaUnit,this.messages,this.messagesUnits,e.resultArea?.color);if(s)return s}return}const i=this.getResultAreaAttributes(e,s);return this._resultAreaHandler?.createResultAreaGraphic(s,i,e.resultArea?.areaUnit,this.messages,this.messagesUnits,e.resultArea?.color)}async createResultAreaGraphic(e){if(e.results){const t=await this._createResultAreaInputGeometry(e.results);if(t.length>0){const r=Array(t.length).fill(e.resultArea?.distance),s=this.createResultAreaGeometries(e,t,r);return this.emit("create-result-area",{graphic:s}),s}}}executeTrace(e,t,r){const s=this._processFlags(r.traceLocations);return r.traceLocations=s,v(t,r,{timeout:this._traceTimeout}).then((t=>({trace:e,results:t,selectionEnabled:!1,graphicEnabled:!1,graphicColor:this.defaultGraphicColor,status:"success",date:new Date}))).catch((t=>({trace:e,results:null,selectionEnabled:!1,graphicEnabled:!1,graphicColor:this.defaultGraphicColor,status:t.message,date:new Date})))}async getNonspatialTraceLocationInitialFeature(){return new Promise(((e,t)=>{this._clickHandler?.remove(),this._clickHandler=this._sketchViewModel.on("create",(async r=>{if("complete"!==r.state)return;const s=this._getGraphicLayer(B);s&&r.graphic&&s.remove(r.graphic);const i=this.view?.toScreen(r.graphic?.geometry);if(!i)return;const a=await(this.view?.hitTest(i));if(a?.results.length){const r=a.results.find((e=>"graphic"===e.type&&this.utilityNetwork?.isUtilityLayer(e.layer)));r?e(r):t(null)}})),this._sketchViewModel.create("point")}))}getResultAreaAttributes(e,r){const{messages:s}=this,i=[],a=[];this._flags.forEach((e=>{const t=e.displayValue?.field+":"+e.displayValue?.value+";"+s.attributeStrings.globalid+":"+e.globalId+";"+s.attributeStrings.terminalid+":"+e.terminalId+";"+s.attributeStrings.x+":"+e.mapPoint?.x+";"+s.attributeStrings.y+":"+e.mapPoint?.y;"starting-point"===e.type?i.push(t):a.push(t)}));const l=this.utilityNetwork?this.utilityNetwork.gdbVersion:this.gdbVersion;return{traceId:e.trace.globalId,traceName:e.trace.title,traceDescription:e.trace.description??"",startingPoints:i.toString(),barriers:a.toString(),version:l??void 0,username:t.credentials[0].userId,date:e.date,elementCount:e.results?.elements.length,functionResult:JSON.stringify(e.results?.globalFunctionResults),areaStatistic:r?this._geometryHandler.calculateArea(r,e.resultArea?.areaUnit):0}}getValidSources(){let e=[];const t=this.utilityNetwork?.dataElement?.domainNetworks??[];for(const r of t)e=e.concat(r.junctionSources),e=e.concat(r.edgeSources);return e}groupResultsByNetworkSource(e){return 0===e.length?[]:this._groupBy(e,"networkSourceId")}async loadUtilityNetwork(){const{view:e}=this;if(!e)return null;if(await e.when(),this.utilityNetwork){if(this.utilityNetwork.loaded||await this.utilityNetwork.load(),this.utilityNetwork instanceof w){try{const t=e.map;await t.loadAll()}catch(s){if("layer:unsupported-layer-type"!==s.name)throw s}finally{this._loadUNSupportItems()}return this.utilityNetwork}return null}const t=e.map,r=t.utilityNetworks?.at(0);if(r){if(await r.load(),this.utilityNetwork=r,!await x(r))throw new i("utility-network:no-user-type-extension","User type extension not found");try{await t.loadAll()}catch(s){if("layer:unsupported-layer-type"!==s.name)throw s}finally{this._loadUNSupportItems()}return r}return null}manageFilterBarrier(e,t){const r=[...this._flags];r.forEach((r=>{r.globalId===t.globalId&&"barrier"===t.type&&r.id===t.id&&(r.isFilterBarrier=e)})),this._flags=r}mergeSelection(e,t){let r=[];const s=[...this.traceResults],i=t.globalId;s.forEach((t=>{i===t.trace.globalId&&(t.selectionEnabled=e),t.selectionEnabled&&null!==t.results?.elements&&(r=[...r,...t.results?.elements??[]])})),this.selectResults([...new Set(r)])}async queryFeaturesById(e){const{view:t}=this;if(!t||!this.utilityNetwork)return null;const s=this.utilityNetwork.getObjectIdsFromElements(e),i={layerUrl:s[0].layerUrl,objectIds:s[0].objectIds,outFields:["*"]},a=t.map?.allTables.toArray().filter((e=>e?.parsedUrl?.path===s[0].layerUrl)).filter(m)??[];this._getUniqueMapLayerViews(t).filter((({layer:e})=>e?.parsedUrl?.path===s[0].layerUrl)).forEach((({layer:e})=>{"feature"!==e.type&&"subtype-group"!==e.type||a.push(e)}));const l=(await Promise.all(a.map((async e=>{const s={layers:new r([e]),layerInfos:[i],returnGeometry:!0,outSpatialReference:t.spatialReference},[a]=await _(s,!1);return a})))).filter((({featureSet:e})=>e.features.length>0));return l.length>0?l:null}queryFlagByHitTest(e,t,r){return this._lookupFlagByHit(e).then((e=>{const{view:s}=this;if(!s)return!1;if(e.length>0){const s=[...this._flags],i=r;return e.forEach((e=>{const r=e.graphic,a=r.attributes.hasOwnProperty("GLOBALID")?r.attributes.GLOBALID:r.attributes.globalid;if(s.filter((e=>e.globalId===a)).length<=0){const e=this.graphicHandler.getFlagGraphic(r.attributes.mapPoint,t,r,i);this._getGraphicLayer(U)?.add(e);const a=this._createFlagProperty(r,t,e);s.push(a)}else if(null!==r.attributes.percentAlong){const e=this.graphicHandler.getFlagGraphic(r.attributes.mapPoint,t,r,i);this._getGraphicLayer(U)?.add(e);const a=this._createFlagProperty(r,t,e);s.push(a)}})),this._flags=s,!0}return!1}))}removeResultGraphicFromView(e){const{view:t}=this;if(!t)return;const r=this._getGraphicLayer(V)?.graphics;e.graphicEnabled=!1;const s=r?.filter((t=>t.attributes[t.attributes.hasOwnProperty("GLOBALID")?"GLOBALID":"globalid"]===e.trace.globalId));s?.forEach((e=>{this._getGraphicLayer(V)?.remove(e)}))}removeFlag(e){const t=this._flags.filter((t=>{if(t.id!==e.id)return t}));this._removeGraphic(e),this._flags=t}removeAllResultAreaGraphics(){this._resultAreaHandler?.removeAllResultAreaGraphics(this.view.map)}removeResultAreaFromMap(e){if(e.resultArea){e.resultArea.show=!1;const t=this._resultAreaHandler?.removeResultArea(e.trace.globalId,this.view?.map);t&&this.emit("remove-result-area",{graphic:t})}}removeSelection(){this._highlightHandler.forEach((e=>{e&&e.remove()})),this._highlightHandler=[]}removeTerminal(e,t){const r=[...this._flags];r.forEach((r=>{if(r.globalId===t.globalId&&t.selectedTerminals?.includes(parseInt(e,10))){const s=t.selectedTerminals.indexOf(parseInt(e,10));r.selectedTerminals?.splice(s,1)}})),this._flags=r}removeFlagsOnLoadWatcher(){this._watchHandler&&null!==this._watchHandler&&this._watchHandler.remove()}removeClickHandler(){this._clickHandler&&(this._sketchViewModel.cancel(),this._clickHandler.remove())}reset(){this._flags=[],this.traceResults=[];const e=[...this.traces];e.forEach((e=>{e.selected=!1})),this.traces=e,this.view&&(this._getGraphicLayer(B)?.removeAll(),this._getGraphicLayer(U)?.removeAll(),this._getGraphicLayer(V)?.removeAll(),this.removeAllResultAreaGraphics(),this.removeSelection(),this.emit("clear-selection",{resultSet:[]}),this.emit("reset"))}selectFeaturesById(e){const{view:t}=this;if(!t||!this.utilityNetwork)return;const r=this.utilityNetwork.getObjectIdsFromElements(e);this._getUniqueMapLayerViews(t).forEach((e=>{j(e)&&e.layer?.parsedUrl?.path===r[0].layerUrl&&E(e)&&this._highlightHandler.push(e.highlight(r[0].objectIds))}))}selectResults(e){if(e.length>0){this.removeSelection();const t=this.groupResultsByNetworkSource(e),r=[];for(const e in t)this.selectFeaturesById(t[e]),r.push(this.queryFeaturesById(t[e]));Promise.all(r).then((e=>{this.emit("select-features",{resultSet:e})}))}else this.removeSelection(),this.emit("clear-selection",{resultSet:[]})}selectTraces(e,t){const r=[...this.traces];r.forEach((r=>{t===r.globalId&&(r.selected=e)})),this.traces=r}selectTracesOnLoad(){this.utilityNetwork?.hasOwnProperty("sharedNamedTraceConfigurations")&&(this.traces=[...this.utilityNetwork.sharedNamedTraceConfigurations],this.traces.forEach((e=>{e.selected=!1,this.selectedTraces.includes(e.globalId)&&(e.selected=!0)})))}zoomToAsset(e){this.view?.goTo(e).catch((e=>console.error(e)))}async _createResultAreaInputGeometry(e){if(null!=e.aggregatedGeometry)return this._geometryHandler.mergeAggregatedToGeometries(e.aggregatedGeometry);const t=this.groupResultsByNetworkSource(e.elements),r=[];for(const s in t)r.push(this.queryFeaturesById(t[s]));try{const e=await Promise.all(r),t=[];for(const r of e)if(r)for(const e of r)for(const r of e.featureSet.features)r.geometry&&t.push(r.geometry);return t}catch{return[]}}_loadUNSupportItems(){if(!this.utilityNetwork)return;const{map:e}=this.view,{messages:t}=this;this._populateOutfields(),this._createGraphicLayer(B),this._createGraphicLayer(U),this._createGraphicLayer(V),this._resultAreaHandler?.createGraphicLayer(e,t?.alertsStrings.genericResultHeader),this._validUNLayers=this._utilityHelper.getValidUtilityNetworkLayers(e,this.utilityNetwork),this._sketchViewModel=this.graphicHandler.initializeSketch(this.view,this._getGraphicLayer(B),this._validUNLayers)}_getUniqueMapLayerViews(e){const t=[],r=e.layerViews.filter((({layer:{type:e}})=>"feature"===e||"group"===e||"subtype-group"===e)).toArray(),s=e=>{for(const r of e.layerViews)D(r)?s(r):t.push(r)};return r.forEach((e=>{switch(e.layer.type){case"group":D(e)&&s(e);break;case"subtype-group":t.push(e);break;default:t.some((t=>t.layer.id===e.layer.id))||t.push(e)}})),t}_processFlags(e){const t=[];return e.forEach((e=>{if(null!==e.selectedTerminals&&e.selectedTerminals.length>0)e.selectedTerminals.forEach((r=>{const s=new k({globalId:e.globalId,percentAlong:e.percentAlong,terminalId:r,type:e.type,isFilterBarrier:e.isFilterBarrier});t.push(s)}));else{const r=new k({globalId:e.globalId,percentAlong:e.percentAlong,type:e.type,isFilterBarrier:e.isFilterBarrier});t.push(r)}})),t}_getDisplayField(e){return"subtype-sublayer"===e?.layer?.type?this._getDisplayFieldBySublayer(e):this._getDisplayFieldByFeatureLayer(e)}_getDisplayFieldBySublayer(e){let t="",r="";const s=e.layer;t=this._checkParentForData(s,"displayField");for(const i in e.attributes){const a=i.toLowerCase();a===t?.toLowerCase()?(r=e.attributes[i],"assetgroup"===a||"assettype"===a?r=this._checkSubtype(s,s.subtypeCode):(r=this._checkDomain(s.fields,i,r),"string"==typeof r&&(r=this._defaultDisplayField(r,s)))):(r=this._checkDomain(s.fields,i,r),"string"==typeof r&&(r=this._defaultDisplayField(r,s)))}return{field:t,value:r.toString()}}_getDisplayFieldByFeatureLayer(e){const t=e.layer;let r=t.displayField,s="";for(const i in e.attributes){const a=i.toLowerCase();if(a===r?.toLowerCase())if(s=e.attributes[i],"assetgroup"===a||"assettype"===a){let a=e.attributes[t.typeIdField.toUpperCase()];a||(a=e.attributes[t.typeIdField.toLowerCase()]),r=t.typeIdField,s=this._checkSubtype(t,a),""===r&&(t.templates&&t.templates.length>0?(r=t.templates[0]?.name,s=t.templates[0]?.name):(r=t.displayField,s=e.attributes[i]))}else s=this._checkDomain(t.fields,i,s),"string"==typeof s&&(s=this._defaultDisplayField(s,t));else s=this._checkDomain(t.fields,i,s),"string"==typeof s&&(s=this._defaultDisplayField(s,t))}return{field:r,value:s?s.toString():""}}_checkSubtype(e,t){let r=t;if("subtype-sublayer"===e.type){const s=this._checkParentForData(e,"subtypes");s?.length>0&&s.forEach((e=>{e.code===t&&(r=e.name)}))}else if(null!=e.types&&e.types.length>0){const s=e.types.filter((e=>e.id===t));s.length>0&&(r=s[0].name)}return r}_checkDomain(e,t,r){let s=r;const i=e.filter((e=>e.name.toLowerCase()===t.toLowerCase()));if(i.length>0&&C(i[0].domain)&&i[0].domain?.codedValues){const e=i[0].domain.codedValues.filter((({code:e})=>e===r));e.length>0&&(s=e[0].name)}return s}_checkParentForData(e,t){return e.parent?.[t]??null}_defaultDisplayField(e,t){return e.trim()?e:t.templates&&t.templates?.length>0?t.templates[0].name:t.title}get _uniqueFlagId(){return this._flagId++}_groupBy(e,t){return e.reduce(((e,r)=>((e[r[t]]=e[r[t]]||[]).push(r),e)),{})}async _lookupFlagByHit(e){const t=e.graphic?.geometry,r=[];if(t&&h(t)&&this.view){const s=this.view.toScreen(t);if(s){const t=await this.view.hitTest(s,{include:this._validUNLayers});if(t?.results.length){const s=t.results.find((e=>null!==e.layer));if(s.graphic?.geometry)if("polyline"===s.graphic.geometry.type){const t={terminalId:null,isFilterBarrier:!1,allTerminals:null,selectedTerminals:null,percentAlong:this._geometryHandler.getPercentageAlong(s.graphic.geometry,e.graphic?.geometry,s.graphic.geometry.spatialReference),displayValue:this._getDisplayField(s.graphic),mapPoint:s.mapPoint};s.graphic.attributes={...s.graphic.attributes,...t},r.push(s)}else if(("point"===s.graphic.geometry.type||"polygon"===s.graphic.geometry.type)&&this.utilityNetwork){const e=this.utilityNetwork.getTerminalConfiguration(s.graphic),t=this._getDisplayField(s.graphic),i={terminalId:e?e.terminals[0].id||null:1,isFilterBarrier:!1,allTerminals:e??null,selectedTerminals:[e?e.terminals[0].id||null:1],percentAlong:null,displayValue:t,mapPoint:s.mapPoint};s.graphic.attributes={...s.graphic.attributes,...i},r.push(s)}}}}return r}_createFlagProperty(e,t,r){const s=new k;s.terminalId=e.attributes.terminalId,s.isFilterBarrier=e.attributes.isFilterBarrier,s.percentAlong=e.attributes.percentAlong,s.globalId=e.attributes.globalid||e.attributes.GLOBALID,s.type=t;const i=s;return i.details=e,i.mapGraphic=r,i.id=this._uniqueFlagId,i.allTerminals=e.attributes.allTerminals,i.selectedTerminals=e.attributes.selectedTerminals,i.displayValue=e.attributes.displayValue,i.mapPoint=e.attributes.mapPoint,i}async _populateOutfields(){if(!this.view)return;const{map:e}=this.view,t=this.getValidSources(),r=e=>{"group"===e.type?e.layers.forEach((e=>{M(e)&&r(e)})):t.some((t=>t.layerId===e.layerId))&&e.fields.some((e=>"assetgroup"===e.name.toLowerCase()))&&(e.outFields=["assetgroup","assettype","globalid","objectid"])};for(const s of e.layers)M(s)&&r(s)}_removeGraphic(e){this._getGraphicLayer(U)?.remove(e.mapGraphic)}_createGraphicLayer(e){const{map:t}=this.view;if(!t.findLayerById(e)){const t=new g({id:e,internal:!0,listMode:"hide",title:e});G(this.view,t)}}_getGraphicLayer(e){const{map:t}=this.view;if(t){const r=t.findLayerById(e);if(r&&O(r))return r}return null}};e([n()],q.prototype,"_activeProgress",void 0),e([n()],q.prototype,"_flags",void 0),e([n()],q.prototype,"traces",void 0),e([n()],q.prototype,"defaultGraphicColor",void 0),e([n()],q.prototype,"enableResultArea",void 0),e([n()],q.prototype,"flags",void 0),e([n()],q.prototype,"gdbVersion",void 0),e([n()],q.prototype,"messages",void 0),e([n()],q.prototype,"messagesUnits",void 0),e([n()],q.prototype,"resultAreaProperties",null),e([n()],q.prototype,"selectedTraces",void 0),e([n()],q.prototype,"selectOnComplete",void 0),e([n()],q.prototype,"showGraphicsOnComplete",void 0),e([n()],q.prototype,"showSelectionAttributes",void 0),e([n({readOnly:!0})],q.prototype,"state",null),e([n()],q.prototype,"traceResults",void 0),e([n()],q.prototype,"utilityNetwork",void 0),e([n({value:null})],q.prototype,"view",null),q=e([c("esri.widgets.UtilityNetworkTrace.UtilityNetworkTraceViewModel")],q);const z=q;export{z 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.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedFunction as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{watch as i,on as r,when as o}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as n}from"../core/support/UpdatingHandles.js";import c from"../layers/support/CodedValueDomain.js";import{isSubtypeGroupLayer as d}from"../layers/support/layerUtils.js";import u from"../rest/support/Query.js";import h from"./Widget.js";import{loadCalciteComponents as p}from"./support/componentsUtils.js";import{globalCss as g}from"./support/globalCss.js";import{storeNode as m}from"./support/widgetUtils.js";import{messageBundle as _}from"./support/decorators/messageBundle.js";import{vmEvent as b}from"./support/decorators/vmEvent.js";import{tsx as w}from"./support/jsxFactory.js";import v from"./UtilityNetworkTrace/UtilityNetworkTraceFeature.js";import y from"./UtilityNetworkTrace/UtilityNetworkTraceViewModel.js";import{defaultSwatchColors as f}from"./UtilityNetworkTrace/support/GraphicHandler.js";const S="esri-utility-network-trace",T={base:S,addButtonContainer:`${S}__add-button-container`,blockContainer:`${S}__block-container`,blockContent:`${S}__block-content`,clearPrompt:`${S}__reset-prompt`,doublePaddingTop:`${S}__double-pad-top`,flow:`${S}__flow`,listContainer:`${S}__list-container`,noticeContainer:`${S}__notice-container`,numberInput:`${S}__number-input`,promptDivider:`${S}__divider`};function k(e){return{height:e+"px"}}function F(e){return{width:e+"px"}}function C(){return{width:"75%"}}function A(e){return{width:"100%",height:window.getComputedStyle(e).getPropertyValue("max-height")}}function R(e){return{display:"flex",flexDirection:e}}function N(e){return e instanceof c}const M={noExtension:-2147208474};let x=class extends h{constructor(e,t){super(e,t),this._activeTab="input",this._activeTrace=null,this._activeSwatch="",this._addNonspatialObjectActive=!1,this._alertRemoveModal=!1,this._assetGroupHeader="",this._assetTypeHeader="",this._confirmReset=!1,this._errorMessage="",this._swatchNode=null,this._selectToolActive=!1,this._showFeatureInfoActive=!1,this._traceHeaderForFlow="",this._traceResultsFunctions=[],this._traceResultsAssetGroup=[],this._traceResultsAssetType=[],this._traceResultsIndividual=[],this._traceResultsState="result",this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._findNonspatialFeatureWidget=new v({mode:"add-nso"}),this._individualResultNode=null,this._loadUnError=!0,this._resultDisplayField="objectid",this._resultFeatureWidget=new v({mode:"show-feature-info"}),this._resultObjectIdField="objectid",this._resultSortField="objectid",this._resultSortOrder="desc",this._showResultOptions=!1,this._symbolStartFlag=null,this._symbolBarrier=null,this._traceLocationType="starting-point",this._updatingHandles=new n,this._warningNoBarrierAssetFound=!1,this._warningNoBarrierAssetNsoFound=!1,this._warningNoStartAssetFound=!1,this._warningNoStartAssetNsoFound=!1,this._warningNoTerminal=!1,this._wasPopupEnabled=!1,this._watchHandler=null,this.disabled=!0,this.inputSettings=[],this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new y,this._afterComponentCreate=this._afterComponentCreate.bind(this)}initialize(){this._wasPopupEnabled=!!this.view&&this.view.popupEnabled,this._findNonspatialFeatureWidget.view=this.view,this._resultFeatureWidget.view=this.view,this._utilityNetworkTraceInitialized(),this.addHandles([i((()=>this.viewModel?.resultAreaProperties),(()=>this.scheduleRender())),i((()=>this._addNonspatialObjectActive),(e=>{this._findNonspatialFeatureWidget.feature=null,e?this._changeCursor("crosshair"):this.view.popupEnabled=this._wasPopupEnabled})),i((()=>this._showFeatureInfoActive),(e=>{e||(this._resultFeatureWidget.feature=null,this.view.popupEnabled=this._wasPopupEnabled)})),r((()=>this._findNonspatialFeatureWidget),"add-nso-trace-location",(({featureWidget:e})=>{this.viewModel.addNonspatialTraceLocation(e.graphic,this._traceLocationType),this._warningNoFlag=!1,this._addNonspatialObjectActive=!1})),r((()=>this._findNonspatialFeatureWidget),"close-un-trace-feature-block",(()=>{this._addNonspatialObjectActive=!1})),r((()=>this._resultFeatureWidget),"close-un-trace-feature-block",(()=>{this._showFeatureInfoActive=!1})),r((()=>this._resultFeatureWidget),"close",(()=>{this._resetResultFeatureWidget()}))])}destroy(){this._findNonspatialFeatureWidget?.destroy(),this._resultFeatureWidget?.destroy()}get defaultGraphicColor(){return this.viewModel.defaultGraphicColor}set defaultGraphicColor(e){this.viewModel.defaultGraphicColor=e}get enableResultArea(){return this.viewModel.enableResultArea}set enableResultArea(e){this.viewModel.enableResultArea=e}get flags(){return this.viewModel.flags}set flags(e){this.viewModel.flags=e}get gdbVersion(){return t(s.getLogger(this),"gdbVersion will be removed and the gdbVersion of the UtilityNetwork will be consumed directly.",{replacement:"UtilityNetwork.gdbVersion",version:"4.31"}),this.viewModel.gdbVersion}set gdbVersion(e){t(s.getLogger(this),"gdbVersion will be removed and the gdbVersion of the UtilityNetwork will be consumed directly.",{replacement:"UtilityNetwork.gdbVersion",version:"4.31"}),this.viewModel.gdbVersion=e}get icon(){return"utility-network-trace"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get resultAreaProperties(){return this.viewModel.resultAreaProperties}set resultAreaProperties(e){this.viewModel.resultAreaProperties=e}get selectedTraces(){return this.viewModel.selectedTraces}set selectedTraces(e){this.viewModel.selectedTraces=e}get selectOnComplete(){return this.viewModel.selectOnComplete}set selectOnComplete(e){this.viewModel.selectOnComplete=e}get showGraphicsOnComplete(){return this.viewModel.showGraphicsOnComplete}set showGraphicsOnComplete(e){this.viewModel.showGraphicsOnComplete=e}get showSelectionAttributes(){return this.viewModel.showSelectionAttributes}set showSelectionAttributes(e){this.viewModel.showSelectionAttributes=e}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(e){this.viewModel.utilityNetwork=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}async checkCanTrace(){this._confirmReset=!1,this._resetResultFeatureWidget();const e=this.viewModel.checkCanTrace();e.status?(this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoTerminal=!1,this._traceResultsState="result",this.switchTab("results"),this.viewModel._activeProgress=!0,this.viewModel.removeAllResultAreaGraphics(),await this.viewModel.callTrace(),this.viewModel._activeProgress=!1):e.issues.forEach((e=>{switch(e){case"noStartingPoints":this._warningNoFlag=!0;break;case"noTerminalSelected":this._warningNoTerminal=!0;break;default:this._warningNoTraceSelected=!0}}))}confirmReset(){this._confirmReset=!0}render(){return this._mixCustomStrings(),this._overrideFlagSymbol(),w("div",{class:this.classes(T.base,g.widget,g.panel,{[g.widgetDisabled]:this.disabled})},this._renderUtilityNetworkTrace())}loadDependencies(){return p({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),"color-picker-swatch":()=>import("@esri/calcite-components/dist/components/calcite-color-picker-swatch"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),fab:()=>import("@esri/calcite-components/dist/components/calcite-flow"),flow:()=>import("@esri/calcite-components/dist/components/calcite-fab"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),"split-button":()=>import("@esri/calcite-components/dist/components/calcite-split-button"),tab:()=>import("@esri/calcite-components/dist/components/calcite-tab"),"tab-nav":()=>import("@esri/calcite-components/dist/components/calcite-tab-nav"),"tab-title":()=>import("@esri/calcite-components/dist/components/calcite-tab-title"),tabs:()=>import("@esri/calcite-components/dist/components/calcite-tabs")})}switchTab(e){this._activeTab=e}switchToFromAssetGroup(e,t,s){this._traceHeaderForFlow=t,this._traceResultsAssetGroup=e,this._traceResultsState=s}switchToFromAssetType(e,t,s){this._assetGroupHeader=t,this._traceResultsAssetType=e,this._traceResultsState=s}switchToFromFunctions(e,t){this._traceResultsFunctions=e,this._traceResultsState=t}switchToFromIndividualRecords(e,t,s){this._assetTypeHeader=t,this._traceResultsIndividual=e,this._traceResultsState=s}_renderAddNonspatialLocationBlock(){const{messages:e}=this;return w("calcite-block",{key:`${this.id}__add-spatial-location-block`,label:e.inputsStrings.addNonspatialOption,open:!0},this._findNonspatialFeatureWidget.render())}_renderAddSpatialLocationBlock(){const{messages:e,messagesCommon:t}=this;return w("calcite-block",{class:T.blockContent,heading:"starting-point"===this._traceLocationType?e.inputsStrings.headerStartingPoint:e.inputsStrings.headerBarrier,key:`${this.id}__add-nonspatial-location-block`,label:"starting-point"===this._traceLocationType?e.inputsStrings.headerStartingPoint:e.inputsStrings.headerBarrier,open:!0},w("calcite-action",{icon:"x",onclick:()=>{this.viewModel.removeClickHandler(),this.view?.popup&&(this.view.popupEnabled=this._wasPopupEnabled),this._changeCursor("default"),this._selectToolActive=!1},slot:"control",text:t.close}),w("calcite-notice",{icon:"starting-point"===this._traceLocationType?"pin-plus":"x-circle-f",kind:"info",open:!0},w("div",{slot:"message"},e.inputsStrings.addPointHint)))}_renderClearTraceResultsBlock(){const{messages:e,messagesCommon:t}=this;return w("calcite-scrim",{key:"prompt"},w("div",{class:T.clearPrompt},w("h3",{slot:"header"},e.resultsStrings.startOverButton),w("div",{slot:"content"},e.resultsStrings.startOverValidation),w("div",{class:T.promptDivider}),w("div",{styles:R("row")},w("calcite-button",{appearance:"outline",onclick:()=>{this._confirmReset=!1},slot:"secondary",width:"full"},t.cancel),w("calcite-button",{onclick:()=>{this._confirmReset=!1,this.viewModel.reset(),this.switchTab("input")},slot:"primary",width:"full"},t.form.ok))))}_renderExecutingTraceBlock(){const{messages:e}=this;return w("calcite-loader",{label:e.alertsStrings.traceExecuting,text:e.alertsStrings.traceExecuting,type:"indeterminate"})}_renderInputBlock(){const{messages:e}=this;return w("calcite-block",{class:T.blockContainer,key:`${this.id}__inputs-block`,label:e.inputsStrings.headerTabInputs,open:!0},w("calcite-flow",{class:T.flow},w("calcite-flow-item",{key:`${this.id}__inputs-flow-item`,selected:!this._selectToolActive&&!this._addNonspatialObjectActive},this._warningNoFlag?this._renderWarningMessage("flag",!0):null,this._warningNoTerminal?this._renderWarningMessage("noTerminal",!0):null,this._warningNoTraceSelected?this._renderWarningMessage("trace",!0):null,this._renderTraceSelectorContainer(),this._renderStartFlagsContainer(),this._renderBarriersFlagsContainer(),this._warningNoFlag&&this._warningNoTraceSelected?w("div",{styles:k(10)}):null,w("calcite-fab",{appearance:"solid",icon:"utility-network-trace",kind:"brand",onclick:()=>{this.checkCanTrace()},slot:"fab",text:e.tracingStrings.runTrace,textEnabled:!0,title:e.tracingStrings.runTrace,type:"button"}))))}_renderInputsTab(){const{messagesCommon:e}=this;let t="input";return this._selectToolActive&&!this._addNonspatialObjectActive&&(t="add-spatial-location"),!this._selectToolActive&&this._addNonspatialObjectActive&&(t="add-nso-location"),this.disabled&&(t="loading"),w("calcite-tab",{key:`${this.id}__inputs-tab-item`,selected:"input"===this._activeTab},"loading"===t?w("calcite-loader",{label:e.loading,type:"indeterminate"}):null,"input"===t?this._renderInputBlock():null,"add-spatial-location"===t?this._renderAddSpatialLocationBlock():null,"add-nso-location"===t?this._renderAddNonspatialLocationBlock():null)}_renderBarriersFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"barrier"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"barrier"))}));let i=null;return this._symbolBarrier&&(i=this._getSymbolIcon(this._symbolBarrier)),w("calcite-block",{class:T.blockContent,collapsible:!0,heading:e.inputsStrings.headerBarrier+" ("+s.length+")",open:!0,overlayPositioning:"fixed"},w("div",{slot:"icon"},i||w("calcite-icon",{icon:"x-circle-f",scale:"s"})),w("div",null,e.inputsStrings.barrierPointHint),w("div",{class:T.listContainer},t),this._warningNoBarrierAssetFound?this._renderWarningMessage("noBarrierAsset",!0):null,this._warningNoBarrierAssetNsoFound?this._renderWarningMessage("noBarrierAssetNso",!0):null,w("div",{class:T.addButtonContainer},w("calcite-split-button",{appearance:"outline-fill",primaryIconStart:"select",primaryText:e.inputsStrings.addPointOption,onCalciteSplitButtonPrimaryClick:()=>{this._setupAddTraceLocation("barrier")}},w("calcite-dropdown-group",{selectionMode:"none"},w("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>{this._setupAddNonspatialObject("barrier")}},e.inputsStrings.addNonspatialOption)))))}_renderFlagRow(e,t){const{messages:s,messagesCommon:i}=this,r=[];let o=!1;return null!=e.allTerminals&&e.allTerminals.terminals.length>0&&(o=!0,e.allTerminals.terminals.forEach((t=>{let s=!1;e?.selectedTerminals?.includes(t.id)&&(s=!0),r.push(w("calcite-combobox-item",{key:t.name,selected:s,textLabel:t.name,value:t.id}))}))),w("calcite-block",{collapsible:null!==e.allTerminals||"barrier"===e.type,heading:e.displayValue?.value??"",key:"pop"+e.globalId+e.type+e.id+t,overlayPositioning:"fixed"},w("calcite-action",{icon:"trash",label:i.remove,onclick:()=>{this.viewModel.removeFlag(e)},scale:"s",slot:"header-menu-actions",text:i.remove,textEnabled:!0}),e.mapGraphic&&e.mapPoint?w("calcite-action",{icon:"zoom-to-object",label:s.globalStrings.zoomToFeature,onclick:()=>{this.viewModel.zoomToAsset(e.details.geometry)},scale:"s",slot:"header-menu-actions",text:s.globalStrings.zoomToFeature,textEnabled:!0}):null,"barrier"===e.type?w("calcite-label",{layout:"inline",scale:"s"},w("calcite-checkbox",{checked:e.isFilterBarrier,onclick:()=>{this.viewModel.manageFilterBarrier(!e.isFilterBarrier,e)},scale:"s"}),s.inputsStrings.barrierFilter):null,o?w("calcite-combobox",{label:s.globalStrings.selectTerminalPlaceholder,maxItems:0,overlayPositioning:"fixed",placeholder:s.globalStrings.selectTerminalPlaceholder,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:t=>{t.currentTarget.selectedItems.length>0?(e.selectedTerminals=[],t.currentTarget.selectedItems.forEach((t=>{this.viewModel.addTerminal(t.value,e)}))):e.selectedTerminals=[]},onCalciteComboboxChipClose:t=>{t.preventDefault(),this.viewModel.removeTerminal(t.currentTarget.value,e)}},r):null)}_renderHighlightColorPicker(e,t,s){const{messages:i}=this,{graphicHandler:r}=this.viewModel,o=[],a=new RegExp(`^${e.hex}$`,"i"),l=r.highlightColor.length>f.length?5:4;for(const n of r.highlightColor)o.push(w("calcite-action",{active:a.test(n.hex),key:n.hex,label:i.resultsStrings.graphicColor,onclick:()=>{"aggregate"===s?this.viewModel.changeResultGraphicColor(n,t):this.viewModel.changeResultAreaColor(t,n)},scale:"s",text:i.resultsStrings.graphicColor},w("calcite-color-picker-swatch",{active:a.test(n.hex),color:n.hex,scale:"s"})));return w("calcite-action-pad",{expandDisabled:!0,layout:"grid",position:"start"},w("calcite-action-group",{columns:l},o))}_renderRemoveTraceContainer(e){const{messages:t}=this;return w("calcite-action",{icon:"trash",label:t.globalStrings.clearResults,onclick:()=>{this._alertRemoveModal=!0,this._activeTrace=e.trace},scale:"s",slot:"header-menu-actions",text:t.globalStrings.clearResults,textEnabled:!0})}_renderResultsTab(){let e="results";return this._showFeatureInfoActive&&(e="show-feature-info"),this.viewModel._activeProgress&&(e="executing"),this._confirmReset&&(e="clear-trace-results"),w("calcite-tab",{key:`${this.id}__results-tab-item`},"executing"===e?this._renderExecutingTraceBlock():null,"results"===e?this.viewModel.traceResults.length?this._renderResultsPanel():this._renderWarningMessage("noTraceExecuted",!1):null,"show-feature-info"===e?this._renderShowFeatureInfoBlock():null,"clear-trace-results"===e?this._renderClearTraceResultsBlock():null)}_renderResultsPanel(){const{messages:e}=this;return w("calcite-block",{class:T.blockContainer,key:`${this.id}__results-block`,label:e.resultsStrings.headerTabResults,open:!0},w("calcite-flow",{class:T.flow},this._renderTraceResults(),this._renderTraceResultFunctions(),this._renderTraceResultByAssetGroup(),this._renderTraceResultByAssetType(),this._renderTraceResultIndividual()))}_renderResultRowFunctions(e){return w("calcite-block",{collapsible:!1,heading:e.networkAttributeName+" "+e.functionType+" = "+e.result,overlayPositioning:"fixed"})}_renderResultRowAssetGroup(e){const t=this._getAssetGroupName(e[0]);return w("calcite-list-item",{key:`${t}-${e.assetGroupCode}`,label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.switchToFromAssetType(this._groupResultsByAssetType(e),t+" ("+e.length+")","assetType")}},w("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowAssetType(e){const t=this._getAssetTypeName(e[0]);return w("calcite-list-item",{key:`${t}-${e.assetTypeCode}`,label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this._updatingHandles.addPromise(this.viewModel.queryFeaturesById(e).then((s=>{if(s?.length){this._resultObjectIdField=s[0].layer.objectIdField,"objectid"===this._resultDisplayField&&(this._resultDisplayField=s[0].layer.objectIdField),"objectid"===this._resultSortField&&(this._resultSortField=s[0].layer.objectIdField);const i=this._appendAttributes(e,s,"objectId");this.switchToFromIndividualRecords(i,t+" ("+e.length+")","records")}else this.switchToFromIndividualRecords(e,t+" ("+e.length+")","records")})))}},w("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowIndividual(e){const{messages:t}=this;let s,i=null;if(i=e?.details?.fields.find((({name:e})=>e===this._resultDisplayField)),"date"===i?.type){s=new Date(e.details.attributes[this._resultDisplayField]).toDateString()}else if("assetgroup"===this._resultDisplayField.toLowerCase())s=this._getAssetGroupName(e);else if("assettype"===this._resultDisplayField.toLowerCase())s=this._getAssetTypeName(e);else if(i?.domain&&N(i.domain)){const t=i.domain.codedValues.find((({code:t})=>t===e.details.attributes[this._resultDisplayField]));s=t?.name}else s=e.details?.attributes[this._resultDisplayField]??e.objectId;return s&&""!==s&&null!==s?"string"==typeof s&&(s.trim()||(s=t.resultsStrings.noValue)):s=t.resultsStrings.noValue,w("calcite-list-item",{key:e.details.uid,label:s,onCalciteListItemSelect:async()=>{this._disablePopup(),this._showFeatureInfoActive=!0;const t=d(e.details?.layer)?e.details?.layer:null;if(t){const s=Object.keys(e.details.attributes).find((e=>e.toLowerCase()===t.subtypeField.toLowerCase()))??"assetgroup",i=t.sublayers.find((t=>t.subtypeCode===e.details.attributes[s])),r=Object.keys(e.details.attributes).find((e=>e.toLowerCase()===t.objectIdField.toLowerCase()))??"objectid",o=new u;o.outFields=["*"],o.returnGeometry=!0,o.where=r+" = "+e.details.attributes[r];const a=await(i?.queryFeatures(o));a&&this._resultFeatureWidget.open(a.features[0])}else this._resultFeatureWidget.open(e.details)}},w("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderShowFeatureInfoBlock(){const{messages:e}=this;return w("calcite-block",{class:T.blockContainer,key:`${this.id}__show-feature-info-block`,label:e.resultsStrings.headerFeatureInfo,open:!0},this._resultFeatureWidget.render())}_renderStartFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"starting-point"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"start"))}));let i=null;return this._symbolStartFlag&&(i=this._getSymbolIcon(this._symbolStartFlag)),w("calcite-block",{class:T.blockContent,collapsible:!0,heading:e.inputsStrings.headerStartingPoint+" ("+s.length+")",open:!0,overlayPositioning:"fixed"},w("div",{slot:"icon"},i||w("calcite-icon",{icon:"pin",scale:"s"})),w("div",null,e.inputsStrings.startingPointHint),w("div",{class:T.listContainer},t),this._warningNoStartAssetFound?this._renderWarningMessage("noStartAsset",!0):null,this._warningNoStartAssetNsoFound?this._renderWarningMessage("noStartAssetNso",!0):null,w("div",{class:T.addButtonContainer},w("calcite-split-button",{appearance:"outline-fill",primaryIconStart:"select",primaryText:e.inputsStrings.addPointOption,onCalciteSplitButtonPrimaryClick:()=>{this._setupAddTraceLocation("starting-point")}},w("calcite-dropdown-group",{selectionMode:"none"},w("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>{this._setupAddNonspatialObject("starting-point")}},e.inputsStrings.addNonspatialOption)))))}_renderStartOverContainer(){const{messages:e}=this;return w("calcite-fab",{appearance:"solid",icon:"trash",kind:"brand",onclick:()=>{this.confirmReset()},slot:"fab",text:e.resultsStrings.startOverButton,textEnabled:!0,title:e.resultsStrings.startOverButton,type:"button"})}_renderTraceResultByAssetGroup(){const e=this._traceResultsAssetGroup,t=[];for(const s in e){const i=e[s];for(const e in i)t.push(this._renderResultRowAssetGroup(i[e]))}return w("calcite-flow-item",{heading:this._traceHeaderForFlow,key:"assetGroupResultMultiple",selected:"assetGroup"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromAssetGroup([],"","result")}},w("calcite-list",{label:""},t),this._renderStartOverContainer())}_renderTraceResultByAssetType(){const e=this._traceResultsAssetType,t=[];for(const s in e)e[s].length>0&&t.push(this._renderResultRowAssetType(e[s]));return w("calcite-flow-item",{heading:this._assetGroupHeader,key:"assetTypeResult",loading:this._updatingHandles.updating,selected:"assetType"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromAssetType([],"","assetGroup")}},w("calcite-list",{label:"",selectionMode:"none"},t),this._renderStartOverContainer())}_renderTraceResultFunctions(){if("functions"!==this._traceResultsState)return null;const{messages:e}=this,t=this._traceResultsFunctions,s=[];return t.forEach((e=>{s.push(this._renderResultRowFunctions(e))})),w("calcite-flow-item",{heading:e.resultsStrings.functionHeader,key:"functionResultMultiple",selected:"functions"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromFunctions([],"result")}},s,this._renderStartOverContainer())}_renderTraceResultIndividual(){const{messages:e}=this,t=this._traceResultsIndividual;t.sort(this._compare(this._resultSortField,this._resultSortOrder));const s=[];if(t.length>0){(t[0].details?.fields.some((({name:e})=>e.toLowerCase()===this._resultDisplayField.toLocaleLowerCase()))??!1)||(this._resultDisplayField=this._resultObjectIdField,this._resultSortField=this._resultObjectIdField),t.forEach((e=>{e?.details&&s.push(this._renderResultRowIndividual(e))})),0===s.length&&s.push(w("calcite-list-item",{label:e.resultsStrings.noFeaturesInMap}))}return w("calcite-flow-item",{heading:this._assetTypeHeader,key:"individualResult",selected:"records"===this._traceResultsState,onCalciteFlowItemBack:()=>{this._showResultOptions=!1,this.switchToFromIndividualRecords([],"","assetType")}},w("calcite-action",{afterCreate:m,bind:this,"data-node-ref":"_individualResultNode",icon:"gear",id:"field_options"+this.id,label:e.resultsStrings.displayAttribute,onclick:()=>{this._showResultOptions=!0},slot:"header-actions-end",text:e.resultsStrings.displayAttribute}),this._renderTraceResultIndividualPopover(),w("calcite-list",{label:"",selectionMode:"none"},s),this._renderStartOverContainer())}_renderTraceResultIndividualPopover(){const{messages:e}=this,t=this._traceResultsIndividual,s=[],i=[];return t.length>0&&(t[0].details?t[0].details.fields.forEach((({name:e,alias:t})=>{s.push(w("calcite-option",{key:`display-${e}`,label:t??e,selected:e===this._resultDisplayField,value:e})),i.push(w("calcite-option",{key:`sort-${e}`,label:t??e,selected:e===this._resultSortField,value:e}))})):(s.push(w("calcite-option",{key:`display-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})),i.push(w("calcite-option",{key:`sort-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})))),w("calcite-popover",{autoClose:!0,label:e.resultsStrings.displayAttribute,offsetDistance:0,offsetSkidding:0,open:this._showResultOptions,overlayPositioning:"fixed",placement:"left-start",referenceElement:this._individualResultNode,styles:null!==this.domNode?F(.75*this.domNode.clientWidth):C()},w("calcite-block",{label:e.resultsStrings.displayAttribute,open:!0,overlayPositioning:"fixed"},w("calcite-label",{scale:"s"},e.resultsStrings.displayAttribute,w("calcite-select",{label:e.resultsStrings.displayAttribute,scale:"s",onCalciteSelectChange:e=>{const t=e.currentTarget;this._resultDisplayField=t.selectedOption.value,this._showResultOptions=!1}},s)),w("calcite-label",{scale:"s"},e.resultsStrings.sortBy,w("calcite-select",{label:e.resultsStrings.sortBy,scale:"s",onCalciteSelectChange:e=>{const s=e.currentTarget;this._resultSortField=s.selectedOption.value,t.sort(this._compare(this._resultSortField,this._resultSortOrder)),this._traceResultsIndividual=t,this._showResultOptions=!1}},i))))}_renderTraceResults(){const{messages:e,messagesCommon:t}=this,{selectFeatures:s}=e.resultsStrings,i=this.viewModel.traceResults,r=[];return i.forEach(((t,i)=>{let o=[],a=[],l=!1,n=!1,c=!1,d="";null!==t.results&&t.results.hasOwnProperty("elements")?(null!==t.results.aggregatedGeometry&&(n=!0),null!==t.results.globalFunctionResults&&t.results.globalFunctionResults.length>0&&(a=t.results.globalFunctionResults,a.length>0&&(c=!0)),t.results.elements&&t.results.elements.length>0&&(o=t.results.elements,o.length>0&&(l=!0)),(n||l)&&(d=this.messagesUnits.units[t.resultArea?.unit]?.abbr),r.push(w("calcite-block",{class:T.blockContent,collapsible:!0,description:t.trace.description??"",heading:t.trace.title,key:`${t.trace.title}${i}`,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),w("calcite-list",{label:""},c?w("calcite-list-item",{label:e.resultsStrings.functionHeader+" ("+a.length+")",onCalciteListItemSelect:()=>{this.switchToFromFunctions(a,"functions")}},w("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):null,l&&this.viewModel.showSelectionAttributes?w("calcite-list-item",{key:this.id,label:e.resultsStrings.viewFeatures+" ("+o.length+")",onCalciteListItemSelect:()=>{this.switchToFromAssetGroup(this._groupResultsByAssetGroup(t),t.trace.title+" ("+o.length+")","assetGroup")}},w("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):this.viewModel.showSelectionAttributes?w("calcite-label",{layout:"inline",scale:"s"},e.resultsStrings.noSelectionResults):null),l?w("div",{class:T.doublePaddingTop},w("calcite-label",{layout:"inline",onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"s"},w("calcite-checkbox",{checked:t.selectionEnabled,onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)}}),this.viewModel.showSelectionAttributes?s:`${s} (${o.length})`)):null,n?w("calcite-block-section",{key:`aggregate-${t.trace.title}-${i}`,open:t.graphicEnabled,text:e.resultsStrings.highlightTrace,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.currentTarget.open?this.viewModel.changeResultGraphicColor(t.graphicColor,t):this.viewModel.removeResultGraphicFromView(t)}},w("calcite-list",{label:e.resultsStrings.graphicColor,selectionMode:"none"},w("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{this._swatchNode=e.currentTarget,this._activeSwatch="aggGeom_"+i}},w("calcite-color-picker-swatch",{color:t.graphicColor.hex,scale:"s",slot:"actions-end"})))):null,this.enableResultArea&&(n||l)?w("calcite-block-section",{key:`area-${t.trace.title}-${i}`,open:t.resultArea?.show,text:e.resultsStrings.resultAreaHeader,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.currentTarget.open?t.resultAreaGraphic?this.viewModel.addResultAreaToMap(t,t.resultAreaGraphic):this.viewModel.addResultAreaToMap(t):this.viewModel.removeResultAreaFromMap(t)}},w("calcite-list",{label:"",selectionMode:"none"},w("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.currentTarget;this._swatchNode=t,this._activeSwatch="resultArea_"+i}},w("calcite-color-picker-swatch",{color:t.resultArea?.color.hex,scale:"s",slot:"actions-end"}))),w("calcite-list",{label:"",selectionMode:"none"},w("calcite-list-item",{label:e.resultsStrings.resultAreaBuffer},w("calcite-input-number",{afterCreate:this._afterComponentCreate,class:T.numberInput,max:999999,min:0,scale:"s",slot:"actions-end",suffixText:d,value:t.resultArea?.distance.toString(),onCalciteInputNumberChange:e=>{if(!this.view?.popup)return;this.view.popup.visible&&this.view.closePopup();const s=e.currentTarget;t.resultArea.distance>=0?(t.resultArea.distance=parseInt(s.value,10),this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t)):(t.resultArea.distance=0,this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t))}})))):null,w("calcite-popover",{autoClose:!0,closable:!0,label:e.resultsStrings.graphicColor,offsetDistance:0,offsetSkidding:0,open:this._activeSwatch==="aggGeom_"+i||this._activeSwatch==="resultArea_"+i,overlayPositioning:"fixed",placement:"auto-start",referenceElement:this._swatchNode,scale:"s",onCalcitePopoverClose:()=>{this._swatchNode=null,this._activeSwatch=null}},this._renderHighlightColorPicker(this._activeSwatch==="resultArea_"+i?t.resultArea?.color:t.graphicColor,t,this._activeSwatch==="resultArea_"+i?"resultArea":"aggregate"))))):r.push(w("calcite-block",{collapsible:!1,heading:t.trace.title,key:"error-"+i,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),this._renderWarningMessage("noController",!1,t.status)))})),w("calcite-flow-item",{key:"traceResults",selected:"result"===this._traceResultsState},r,this._renderStartOverContainer(),this._alertRemoveModal?w("calcite-scrim",{key:"prompt"},w("div",{class:T.clearPrompt},w("h3",{slot:"header"},e.globalStrings.clearResults),w("div",{slot:"content"},e.alertsStrings.clearResultsAlert),w("div",{class:T.promptDivider}),w("div",{styles:R("row")},w("calcite-button",{appearance:"outline",onclick:()=>{this._alertRemoveModal=!1},slot:"secondary",width:"full"},t.cancel),w("calcite-button",{onclick:()=>{this._activeTrace&&this.viewModel.clearResult(this._activeTrace),this._alertRemoveModal=!1,0===this.viewModel.traceResults.length?this.switchTab("input"):(this._activeTrace=this.viewModel.traceResults[0].trace,this._traceResultsState="result")},slot:"primary",width:"full"},t.form.ok)))):null)}_renderTraceSelectorContainer(){const{messages:e}=this,t=this.viewModel.traces.map((e=>this._renderComboboxItem({value:e.globalId,text:e.title,selected:e.selected??!1}))),s=this.viewModel.traces.filter((e=>e.selected)),i=e.tracingStrings.traceOperation+` (${s.length})`;return w("calcite-block",{class:T.blockContent,collapsible:!0,heading:i,open:!0,overlayPositioning:"fixed"},w("calcite-icon",{icon:"utility-network-trace",scale:"s",slot:"icon"}),w("calcite-combobox",{label:e.inputsStrings.selectTraces,maxItems:0,overlayPositioning:"fixed",placeholder:e.inputsStrings.selectTraces,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:e=>{this.viewModel.traces.forEach((t=>{t.selected=e.currentTarget.selectedItems.some((e=>e.value===t.globalId))})),e.currentTarget.selectedItems.length&&(this._warningNoTraceSelected=!1)}},t))}_renderUtilityNetworkTrace(){const{viewModel:e,viewModel:{utilityNetwork:t}}=this,s=e.view?.map,{messages:i}=this;let r=w("calcite-tabs",{layout:"center",position:"top",styles:A(this.container)},w("calcite-tab-nav",{slot:"title-group"},w("calcite-tab-title",{onclick:()=>{this.switchTab("input")},selected:"input"===this._activeTab},i.inputsStrings.headerTabInputs),w("calcite-tab-title",{onclick:()=>{this.switchTab("results")},selected:"results"===this._activeTab},i.resultsStrings.headerTabResults)),this._renderInputsTab(),this._renderResultsTab());return(!s.utilityNetworks?.length&&!t||t&&!t.sharedNamedTraceConfigurations.length)&&(r=w("calcite-panel",null,this._renderWarningMessage("noTraceConfig",!1))),this._loadUnError||(r=w("calcite-panel",null,this._renderWarningMessage("loadUNError",!1,this._errorMessage))),r}_renderWarningMessage(e,t,s){const{messages:i}=this;let r=i.alertsStrings.NoRunAlertHeader,o=i.alertsStrings.noResultsInfo;switch(e){case"flag":r=i.alertsStrings.startingPointAlertHeader,o=i.alertsStrings.startingPointAlert;break;case"noTerminal":r=i.alertsStrings.noTerminalDefinedHeader,o=i.alertsStrings.noTerminalDefined;break;case"trace":r=i.alertsStrings.selectTraceAlertHeader,o=i.alertsStrings.selectTraceAlert;break;case"noTraceExecuted":r=i.alertsStrings.NoRunAlertHeader,o=i.alertsStrings.noResultsInfo;break;case"noBarrierAsset":case"noStartAsset":r=i.alertsStrings.noAssetsFoundHeader,o=i.alertsStrings.noAssetFound;break;case"noBarrierAssetNso":case"noStartAssetNso":r="",o=i.alertsStrings.noAssetFound;break;case"noTraceConfig":r="",o=i.alertsStrings.noTraceSupported;break;default:r=i.alertsStrings.genericErrorHeader,o=s||""}return w("div",{class:T.noticeContainer,key:e},w("calcite-notice",{closable:t,icon:!0,key:e,kind:"danger",open:!0,scale:"s",width:"auto",onCalciteNoticeClose:()=>this._handleWarningNoticeClose(e)},w("div",{slot:"title"},r),w("div",{slot:"message"},o)))}_afterComponentCreate(e){"value"in e&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"})}_appendAttributes(e,t,s){const i=[];return e.forEach((e=>{t.forEach((t=>{t.featureSet.features.forEach((r=>{e[s]===r.attributes[this._resultObjectIdField]&&(e.details=r,e.details.fields=t.featureSet.fields,i.push(e))}))}))})),i}_changeCursor(e="default"){const t=this.view?.container?.style;t&&(t.cursor=e)}_disablePopup(){const{view:e}=this;e.popupEnabled=!1,e.closePopup()}_compare(e,t){return(s,i)=>{let r=0,o=s.details?.attributes[e]??s.objectId,a=i.details?.attributes[e]??i.objectId;return isNaN(o)&&(o=o.toLowerCase()),isNaN(a)&&(a=a.toLowerCase()),"desc"===t?o>a?r=1:o<a&&(r=-1):o<a?r=1:o>a&&(r=-1),r}}_getAssetGroupName(e){let t=e.assetGroupCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const e=i.assetGroups.find((e=>e.assetGroupCode===s));e&&(t=e.assetGroupName)}return t}_getAssetTypeName(e){let t=e.assetTypeCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const r=i.assetGroups.find((e=>e.assetGroupCode===s));if(r){const s=r.assetTypes.find((t=>t.assetTypeCode===e.assetTypeCode));s&&(t=s.assetTypeName)}}return t}_getSymbolIcon(e){return"picture-marker"===e.type?w("img",{height:e.height,src:e.url??void 0,width:e.width}):null}_groupBy(e,t){return e.reduce(((e,s)=>((e[s[t]]=e[s[t]]||[]).push(s),e)),{})}_groupResultsByAssetGroup(e){const t=[],s=e.results?.elements,i=this._groupBy(s??[],"networkSourceId");for(const r in i)t.push(this._groupBy(i[r],"assetGroupCode"));return t}_groupResultsByAssetType(e){return this._groupBy(e,"assetTypeCode")}_handleWarningNoticeClose(e){switch(e){case"flag":this._warningNoFlag=!1;break;case"noTerminal":this._warningNoTerminal=!1;break;case"trace":this._warningNoTraceSelected=!1;break;case"noStartAsset":this._warningNoStartAssetFound=!1;break;case"noStartAssetNso":this._warningNoStartAssetNsoFound=!1;break;case"noBarrierAsset":this._warningNoBarrierAssetFound=!1;break;case"noBarrierAssetNso":this._warningNoBarrierAssetNsoFound=!1}}_mixCustomStrings(){const{messages:e}=this;this.inputSettings.length>0&&this.inputSettings.forEach((t=>{"starting-point"===t.type&&(e.inputsStrings.headerStartingPoint=t.label,e.inputsStrings.startingPointHint=t.description),"barrier"===t.type&&(e.inputsStrings.headerBarrier=t.label,e.inputsStrings.barrierPointHint=t.description)}))}_overrideFlagSymbol(){this.inputSettings.length>0&&this.inputSettings.forEach((e=>{"starting-point"===e.type?this._symbolStartFlag=e.symbol:this._symbolBarrier=e.symbol,this.viewModel.changeFlagSymbol(e.type,e.symbol)}))}_processFlagOnLoad(){return this.view?.when().then((()=>{this._watchHandler=o((()=>!this.view?.updating),(async()=>{this._warningNoFlag=!1,this._warningNoBarrierAssetFound=!1,this._warningNoStartAssetFound=!1;const e=await this.viewModel.addFlagsOnLoad();this.viewModel.removeFlagsOnLoadWatcher(),e.includes("barrier")&&(this._warningNoBarrierAssetFound=!0),e.includes("starting-point")&&(this._warningNoStartAssetFound=!0),this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}))}))}_registerWatchers(){this.addHandles([i((()=>this.selectedTraces),(()=>{this.viewModel.selectTracesOnLoad(),this.scheduleRender()})),i((()=>this.defaultGraphicColor),(()=>{this.viewModel.traceResults.length>0&&this.viewModel.traceResults.forEach((e=>{this.viewModel.changeResultGraphicColor(this.viewModel.defaultGraphicColor,e)})),this.scheduleRender()}))])}_renderComboboxItem({text:e,value:t,selected:s}){return w("calcite-combobox-item",{key:t,selected:s,textLabel:e,value:t})}_resetResultFeatureWidget(){this._showFeatureInfoActive=!1,this._resultFeatureWidget.feature=null,this.view.popupEnabled=this._wasPopupEnabled}_resetTraceLocationWarnings(){this._warningNoBarrierAssetFound=!1,this._warningNoBarrierAssetNsoFound=!1,this._warningNoStartAssetFound=!1,this._warningNoStartAssetNsoFound=!1}_setupAddNonspatialObject(e){this._disablePopup(),this._traceLocationType=e,this._addNonspatialObjectActive=!0,this._resetTraceLocationWarnings(),this.viewModel.getNonspatialTraceLocationInitialFeature().then((e=>{this._findNonspatialFeatureWidget.feature=null;const t=e.graphic;this._findNonspatialFeatureWidget.open(t)})).catch((()=>{this._warningNoStartAssetNsoFound="starting-point"===e,this._warningNoBarrierAssetNsoFound="barrier"===e,this._addNonspatialObjectActive=!1})).finally((()=>this._changeCursor("default")))}_setupAddTraceLocation(e){this._traceLocationType=e,this._changeCursor("crosshair"),this._selectToolActive=!0,this._addNonspatialObjectActive=!1,this._resetTraceLocationWarnings(),this.viewModel.addFlagByHit(this._traceLocationType,this._symbolStartFlag).then((e=>{this._changeCursor("default"),e?this._warningNoFlag=!1:(this._warningNoStartAssetFound="starting-point"===this._traceLocationType,this._warningNoBarrierAssetFound="barrier"===this._traceLocationType),this._selectToolActive=!1}))}_utilityNetworkTraceInitialized(){this.viewModel.loadUtilityNetwork().then((e=>{e&&(this.viewModel.selectTracesOnLoad(),this._registerWatchers(),this.viewModel.flags.length>0&&this._processFlagOnLoad()),this.disabled=!1})).catch((e=>{const{messages:t}=this;this._loadUnError=!1,"utility-network:no-user-type-extension"===e.name||e.details.raw.extendedCode===M.noExtension?this._errorMessage=t.alertsStrings.noUserExtension:this._errorMessage=e.message,this.disabled=!1}))}};e([a()],x.prototype,"_activeTab",void 0),e([a()],x.prototype,"_activeTrace",void 0),e([a()],x.prototype,"_activeSwatch",void 0),e([a()],x.prototype,"_addNonspatialObjectActive",void 0),e([a()],x.prototype,"_alertRemoveModal",void 0),e([a()],x.prototype,"_assetGroupHeader",void 0),e([a()],x.prototype,"_assetTypeHeader",void 0),e([a()],x.prototype,"_confirmReset",void 0),e([a()],x.prototype,"_errorMessage",void 0),e([a()],x.prototype,"_swatchNode",void 0),e([a()],x.prototype,"_selectToolActive",void 0),e([a()],x.prototype,"_showFeatureInfoActive",void 0),e([a()],x.prototype,"_traceHeaderForFlow",void 0),e([a()],x.prototype,"_traceResultsFunctions",void 0),e([a()],x.prototype,"_traceResultsAssetGroup",void 0),e([a()],x.prototype,"_traceResultsAssetType",void 0),e([a()],x.prototype,"_traceResultsIndividual",void 0),e([a()],x.prototype,"_traceResultsState",void 0),e([a()],x.prototype,"_warningNoFlag",void 0),e([a()],x.prototype,"_warningNoTraceSelected",void 0),e([a()],x.prototype,"_updatingHandles",void 0),e([a()],x.prototype,"defaultGraphicColor",null),e([a()],x.prototype,"disabled",void 0),e([a()],x.prototype,"enableResultArea",null),e([a()],x.prototype,"flags",null),e([a()],x.prototype,"gdbVersion",null),e([a()],x.prototype,"icon",null),e([a()],x.prototype,"inputSettings",void 0),e([a()],x.prototype,"label",null),e([a(),_("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")],x.prototype,"messages",void 0),e([a(),_("esri/t9n/common")],x.prototype,"messagesCommon",void 0),e([a(),_("esri/core/t9n/Units")],x.prototype,"messagesUnits",void 0),e([a()],x.prototype,"resultAreaProperties",null),e([a()],x.prototype,"selectedTraces",null),e([a()],x.prototype,"selectOnComplete",null),e([a()],x.prototype,"showGraphicsOnComplete",null),e([a()],x.prototype,"showSelectionAttributes",null),e([a()],x.prototype,"utilityNetwork",null),e([a()],x.prototype,"view",null),e([b(["add-flag","add-flag-complete","add-flag-error","select-features","clear-selection","add-result-area","remove-result-area","create-result-area","reset"]),a({type:y})],x.prototype,"viewModel",void 0),x=e([l("esri.widgets.UtilityNetworkTrace")],x);const I=x;export{I as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedFunction as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{watch as i,initial as r,on as o,when as a}from"../core/reactiveUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as c}from"../core/support/UpdatingHandles.js";import d from"../layers/support/CodedValueDomain.js";import{isSubtypeGroupLayer as u}from"../layers/support/layerUtils.js";import h from"../rest/support/Query.js";import p from"./Widget.js";import{loadCalciteComponents as g}from"./support/componentsUtils.js";import{globalCss as m}from"./support/globalCss.js";import{storeNode as _}from"./support/widgetUtils.js";import{messageBundle as b}from"./support/decorators/messageBundle.js";import{vmEvent as w}from"./support/decorators/vmEvent.js";import{tsx as v}from"./support/jsxFactory.js";import y from"./UtilityNetworkTrace/UtilityNetworkTraceFeature.js";import f from"./UtilityNetworkTrace/UtilityNetworkTraceViewModel.js";import{defaultSwatchColors as S}from"./UtilityNetworkTrace/support/GraphicHandler.js";const T="esri-utility-network-trace",k={base:T,addButtonContainer:`${T}__add-button-container`,blockContainer:`${T}__block-container`,blockContent:`${T}__block-content`,clearPrompt:`${T}__reset-prompt`,doublePaddingTop:`${T}__double-pad-top`,flow:`${T}__flow`,listContainer:`${T}__list-container`,noticeContainer:`${T}__notice-container`,numberInput:`${T}__number-input`,promptDivider:`${T}__divider`};function F(e){return{height:e+"px"}}function C(e){return{width:e+"px"}}function A(){return{width:"75%"}}function R(e){return{width:"100%",height:window.getComputedStyle(e).getPropertyValue("max-height")}}function N(e){return{display:"flex",flexDirection:e}}function M(e){return e instanceof d}const x={noExtension:-2147208474};let I=class extends p{constructor(e,t){super(e,t),this._activeTab="input",this._activeTrace=null,this._activeSwatch="",this._addNonspatialObjectActive=!1,this._alertRemoveModal=!1,this._assetGroupHeader="",this._assetTypeHeader="",this._confirmReset=!1,this._errorMessage="",this._swatchNode=null,this._selectToolActive=!1,this._showFeatureInfoActive=!1,this._traceHeaderForFlow="",this._traceResultsFunctions=[],this._traceResultsAssetGroup=[],this._traceResultsAssetType=[],this._traceResultsIndividual=[],this._traceResultsState="result",this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._findNonspatialFeatureWidget=new y({mode:"add-nso"}),this._individualResultNode=null,this._loadUnError=!0,this._resultDisplayField="objectid",this._resultFeatureWidget=new y({mode:"show-feature-info"}),this._resultObjectIdField="objectid",this._resultSortField="objectid",this._resultSortOrder="desc",this._showResultOptions=!1,this._symbolStartFlag=null,this._symbolBarrier=null,this._traceLocationType="starting-point",this._updatingHandles=new c,this._warningNoBarrierAssetFound=!1,this._warningNoBarrierAssetNsoFound=!1,this._warningNoStartAssetFound=!1,this._warningNoStartAssetNsoFound=!1,this._warningNoTerminal=!1,this._wasPopupEnabled=!1,this._watchHandler=null,this.disabled=!0,this.inputSettings=[],this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new f,this._afterComponentCreate=this._afterComponentCreate.bind(this)}initialize(){this._utilityNetworkTraceInitialized(),this.addHandles([i((()=>this.view),(()=>this._viewChangeHandle()),r),i((()=>this.viewModel?.resultAreaProperties),(()=>this.scheduleRender())),i((()=>this._addNonspatialObjectActive),(e=>{this._findNonspatialFeatureWidget.feature=null,e?this._changeCursor("crosshair"):this.view.popupEnabled=this._wasPopupEnabled})),i((()=>this._showFeatureInfoActive),(e=>{e||(this._resultFeatureWidget.feature=null,this.view.popupEnabled=this._wasPopupEnabled)})),o((()=>this._findNonspatialFeatureWidget),"add-nso-trace-location",(({featureWidget:e})=>{this.viewModel.addNonspatialTraceLocation(e.graphic,this._traceLocationType),this._warningNoFlag=!1,this._addNonspatialObjectActive=!1})),o((()=>this._findNonspatialFeatureWidget),"close-un-trace-feature-block",(()=>{this._changeCursor("default"),this._addNonspatialObjectActive=!1,this.viewModel.cancelAddFlagByHit()})),o((()=>this._resultFeatureWidget),"close-un-trace-feature-block",(()=>{this._showFeatureInfoActive=!1})),o((()=>this._resultFeatureWidget),"close",(()=>{this._resetResultFeatureWidget()}))])}destroy(){this._findNonspatialFeatureWidget?.destroy(),this._resultFeatureWidget?.destroy()}get defaultGraphicColor(){return this.viewModel.defaultGraphicColor}set defaultGraphicColor(e){this.viewModel.defaultGraphicColor=e}get enableResultArea(){return this.viewModel.enableResultArea}set enableResultArea(e){this.viewModel.enableResultArea=e}get flags(){return this.viewModel.flags}set flags(e){this.viewModel.flags=e}get gdbVersion(){return t(s.getLogger(this),"gdbVersion will be removed and the gdbVersion of the UtilityNetwork will be consumed directly.",{replacement:"UtilityNetwork.gdbVersion",version:"4.31"}),this.viewModel.gdbVersion}set gdbVersion(e){t(s.getLogger(this),"gdbVersion will be removed and the gdbVersion of the UtilityNetwork will be consumed directly.",{replacement:"UtilityNetwork.gdbVersion",version:"4.31"}),this.viewModel.gdbVersion=e}get icon(){return"utility-network-trace"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get resultAreaProperties(){return this.viewModel.resultAreaProperties}set resultAreaProperties(e){this.viewModel.resultAreaProperties=e}get selectedTraces(){return this.viewModel.selectedTraces}set selectedTraces(e){this.viewModel.selectedTraces=e}get selectOnComplete(){return this.viewModel.selectOnComplete}set selectOnComplete(e){this.viewModel.selectOnComplete=e}get showGraphicsOnComplete(){return this.viewModel.showGraphicsOnComplete}set showGraphicsOnComplete(e){this.viewModel.showGraphicsOnComplete=e}get showSelectionAttributes(){return this.viewModel.showSelectionAttributes}set showSelectionAttributes(e){this.viewModel.showSelectionAttributes=e}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(e){this.viewModel.utilityNetwork=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}async checkCanTrace(){this._confirmReset=!1,this._resetResultFeatureWidget();const e=this.viewModel.checkCanTrace();e.status?(this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoTerminal=!1,this._traceResultsState="result",this.switchTab("results"),this.viewModel._activeProgress=!0,this.viewModel.removeAllResultAreaGraphics(),await this.viewModel.callTrace(),this.viewModel._activeProgress=!1):e.issues.forEach((e=>{switch(e){case"noStartingPoints":this._warningNoFlag=!0;break;case"noTerminalSelected":this._warningNoTerminal=!0;break;default:this._warningNoTraceSelected=!0}}))}confirmReset(){this._confirmReset=!0}render(){return this._mixCustomStrings(),this._overrideFlagSymbol(),v("div",{class:this.classes(k.base,m.widget,m.panel,{[m.widgetDisabled]:this.disabled})},this._renderUtilityNetworkTrace())}loadDependencies(){return g({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),"color-picker-swatch":()=>import("@esri/calcite-components/dist/components/calcite-color-picker-swatch"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),fab:()=>import("@esri/calcite-components/dist/components/calcite-flow"),flow:()=>import("@esri/calcite-components/dist/components/calcite-fab"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),"split-button":()=>import("@esri/calcite-components/dist/components/calcite-split-button"),tab:()=>import("@esri/calcite-components/dist/components/calcite-tab"),"tab-nav":()=>import("@esri/calcite-components/dist/components/calcite-tab-nav"),"tab-title":()=>import("@esri/calcite-components/dist/components/calcite-tab-title"),tabs:()=>import("@esri/calcite-components/dist/components/calcite-tabs")})}switchTab(e){this._activeTab=e}switchToFromAssetGroup(e,t,s){this._traceHeaderForFlow=t,this._traceResultsAssetGroup=e,this._traceResultsState=s}switchToFromAssetType(e,t,s){this._assetGroupHeader=t,this._traceResultsAssetType=e,this._traceResultsState=s}switchToFromFunctions(e,t){this._traceResultsFunctions=e,this._traceResultsState=t}switchToFromIndividualRecords(e,t,s){this._assetTypeHeader=t,this._traceResultsIndividual=e,this._traceResultsState=s}_renderAddNonspatialLocationBlock(){const{messages:e}=this;return v("calcite-block",{key:`${this.id}__add-spatial-location-block`,label:e.inputsStrings.addNonspatialOption,open:!0},this._findNonspatialFeatureWidget.render())}_renderAddSpatialLocationBlock(){const{messages:e,messagesCommon:t}=this;return v("calcite-block",{class:k.blockContent,heading:"starting-point"===this._traceLocationType?e.inputsStrings.headerStartingPoint:e.inputsStrings.headerBarrier,key:`${this.id}__add-nonspatial-location-block`,label:"starting-point"===this._traceLocationType?e.inputsStrings.headerStartingPoint:e.inputsStrings.headerBarrier,open:!0},v("calcite-action",{icon:"x",onclick:()=>{this.viewModel.removeClickHandler(),this.view?.popup&&(this.view.popupEnabled=this._wasPopupEnabled),this._changeCursor("default"),this._selectToolActive=!1},slot:"control",text:t.close}),v("calcite-notice",{icon:"starting-point"===this._traceLocationType?"pin-plus":"x-circle-f",kind:"info",open:!0},v("div",{slot:"message"},e.inputsStrings.addPointHint)))}_renderClearTraceResultsBlock(){const{messages:e,messagesCommon:t}=this;return v("calcite-scrim",{key:"prompt"},v("div",{class:k.clearPrompt},v("h3",{slot:"header"},e.resultsStrings.startOverButton),v("div",{slot:"content"},e.resultsStrings.startOverValidation),v("div",{class:k.promptDivider}),v("div",{styles:N("row")},v("calcite-button",{appearance:"outline",onclick:()=>{this._confirmReset=!1},slot:"secondary",width:"full"},t.cancel),v("calcite-button",{onclick:()=>{this._confirmReset=!1,this.viewModel.reset(),this.switchTab("input")},slot:"primary",width:"full"},t.form.ok))))}_renderExecutingTraceBlock(){const{messages:e}=this;return v("calcite-loader",{label:e.alertsStrings.traceExecuting,text:e.alertsStrings.traceExecuting,type:"indeterminate"})}_renderInputBlock(){const{messages:e}=this;return v("calcite-block",{class:k.blockContainer,key:`${this.id}__inputs-block`,label:e.inputsStrings.headerTabInputs,open:!0},v("calcite-flow",{class:k.flow},v("calcite-flow-item",{key:`${this.id}__inputs-flow-item`,selected:!this._selectToolActive&&!this._addNonspatialObjectActive},this._warningNoFlag?this._renderWarningMessage("flag",!0):null,this._warningNoTerminal?this._renderWarningMessage("noTerminal",!0):null,this._warningNoTraceSelected?this._renderWarningMessage("trace",!0):null,this._renderTraceSelectorContainer(),this._renderStartFlagsContainer(),this._renderBarriersFlagsContainer(),this._warningNoFlag&&this._warningNoTraceSelected?v("div",{styles:F(10)}):null,v("calcite-fab",{appearance:"solid",icon:"utility-network-trace",kind:"brand",onclick:()=>{this.checkCanTrace()},slot:"fab",text:e.tracingStrings.runTrace,textEnabled:!0,title:e.tracingStrings.runTrace,type:"button"}))))}_renderInputsTab(){const{messagesCommon:e}=this;let t="input";return this._selectToolActive&&!this._addNonspatialObjectActive&&(t="add-spatial-location"),!this._selectToolActive&&this._addNonspatialObjectActive&&(t="add-nso-location"),this.disabled&&(t="loading"),v("calcite-tab",{key:`${this.id}__inputs-tab-item`,selected:"input"===this._activeTab},"loading"===t?v("calcite-loader",{label:e.loading,type:"indeterminate"}):null,"input"===t?this._renderInputBlock():null,"add-spatial-location"===t?this._renderAddSpatialLocationBlock():null,"add-nso-location"===t?this._renderAddNonspatialLocationBlock():null)}_renderBarriersFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"barrier"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"barrier"))}));let i=null;return this._symbolBarrier&&(i=this._getSymbolIcon(this._symbolBarrier)),v("calcite-block",{class:k.blockContent,collapsible:!0,heading:e.inputsStrings.headerBarrier+" ("+s.length+")",open:!0,overlayPositioning:"fixed"},v("div",{slot:"icon"},i||v("calcite-icon",{icon:"x-circle-f",scale:"s"})),v("div",null,e.inputsStrings.barrierPointHint),v("div",{class:k.listContainer},t),this._warningNoBarrierAssetFound?this._renderWarningMessage("noBarrierAsset",!0):null,this._warningNoBarrierAssetNsoFound?this._renderWarningMessage("noBarrierAssetNso",!0):null,v("div",{class:k.addButtonContainer},v("calcite-split-button",{appearance:"outline-fill",primaryIconStart:"select",primaryText:e.inputsStrings.addPointOption,onCalciteSplitButtonPrimaryClick:()=>{this._setupAddTraceLocation("barrier")}},v("calcite-dropdown-group",{selectionMode:"none"},v("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>{this._setupAddNonspatialObject("barrier")}},e.inputsStrings.addNonspatialOption)))))}_renderFlagRow(e,t){const{messages:s,messagesCommon:i}=this,r=[];let o=!1;return null!=e.allTerminals&&e.allTerminals.terminals.length>0&&(o=!0,e.allTerminals.terminals.forEach((t=>{let s=!1;e?.selectedTerminals?.includes(t.id)&&(s=!0),r.push(v("calcite-combobox-item",{key:t.name,selected:s,textLabel:t.name,value:t.id}))}))),v("calcite-block",{collapsible:null!==e.allTerminals||"barrier"===e.type,heading:e.displayValue?.value??"",key:"pop"+e.globalId+e.type+e.id+t,overlayPositioning:"fixed"},v("calcite-action",{icon:"trash",label:i.remove,onclick:()=>{this.viewModel.removeFlag(e)},scale:"s",slot:"header-menu-actions",text:i.remove,textEnabled:!0}),e.mapGraphic&&e.mapPoint?v("calcite-action",{icon:"zoom-to-object",label:s.globalStrings.zoomToFeature,onclick:()=>{this.viewModel.zoomToAsset(e.details.geometry)},scale:"s",slot:"header-menu-actions",text:s.globalStrings.zoomToFeature,textEnabled:!0}):null,"barrier"===e.type?v("calcite-label",{layout:"inline",scale:"s"},v("calcite-checkbox",{checked:e.isFilterBarrier,onclick:()=>{this.viewModel.manageFilterBarrier(!e.isFilterBarrier,e)},scale:"s"}),s.inputsStrings.barrierFilter):null,o?v("calcite-combobox",{label:s.globalStrings.selectTerminalPlaceholder,maxItems:0,overlayPositioning:"fixed",placeholder:s.globalStrings.selectTerminalPlaceholder,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:t=>{t.currentTarget.selectedItems.length>0?(e.selectedTerminals=[],t.currentTarget.selectedItems.forEach((t=>{this.viewModel.addTerminal(t.value,e)}))):e.selectedTerminals=[]},onCalciteComboboxChipClose:t=>{t.preventDefault(),this.viewModel.removeTerminal(t.currentTarget.value,e)}},r):null)}_renderHighlightColorPicker(e,t,s){const{messages:i}=this,{graphicHandler:r}=this.viewModel,o=[],a=new RegExp(`^${e.hex}$`,"i"),l=r.highlightColor.length>S.length?5:4;for(const n of r.highlightColor)o.push(v("calcite-action",{active:a.test(n.hex),key:n.hex,label:i.resultsStrings.graphicColor,onclick:()=>{"aggregate"===s?this.viewModel.changeResultGraphicColor(n,t):this.viewModel.changeResultAreaColor(t,n)},scale:"s",text:i.resultsStrings.graphicColor},v("calcite-color-picker-swatch",{active:a.test(n.hex),color:n.hex,scale:"s"})));return v("calcite-action-pad",{expandDisabled:!0,layout:"grid",position:"start"},v("calcite-action-group",{columns:l},o))}_renderRemoveTraceContainer(e){const{messages:t}=this;return v("calcite-action",{icon:"trash",label:t.globalStrings.clearResults,onclick:()=>{this._alertRemoveModal=!0,this._activeTrace=e.trace},scale:"s",slot:"header-menu-actions",text:t.globalStrings.clearResults,textEnabled:!0})}_renderResultsTab(){let e="results";return this._showFeatureInfoActive&&(e="show-feature-info"),this.viewModel._activeProgress&&(e="executing"),this._confirmReset&&(e="clear-trace-results"),v("calcite-tab",{key:`${this.id}__results-tab-item`},"executing"===e?this._renderExecutingTraceBlock():null,"results"===e?this.viewModel.traceResults.length?this._renderResultsPanel():this._renderWarningMessage("noTraceExecuted",!1):null,"show-feature-info"===e?this._renderShowFeatureInfoBlock():null,"clear-trace-results"===e?this._renderClearTraceResultsBlock():null)}_renderResultsPanel(){const{messages:e}=this;return v("calcite-block",{class:k.blockContainer,key:`${this.id}__results-block`,label:e.resultsStrings.headerTabResults,open:!0},v("calcite-flow",{class:k.flow},this._renderTraceResults(),this._renderTraceResultFunctions(),this._renderTraceResultByAssetGroup(),this._renderTraceResultByAssetType(),this._renderTraceResultIndividual()))}_renderResultRowFunctions(e){return v("calcite-block",{collapsible:!1,heading:e.networkAttributeName+" "+e.functionType+" = "+e.result,overlayPositioning:"fixed"})}_renderResultRowAssetGroup(e){const t=this._getAssetGroupName(e[0]);return v("calcite-list-item",{key:`${t}-${e.assetGroupCode}`,label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.switchToFromAssetType(this._groupResultsByAssetType(e),t+" ("+e.length+")","assetType")}},v("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowAssetType(e){const t=this._getAssetTypeName(e[0]);return v("calcite-list-item",{key:`${t}-${e.assetTypeCode}`,label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this._updatingHandles.addPromise(this.viewModel.queryFeaturesById(e).then((s=>{if(s?.length){this._resultObjectIdField=s[0].layer.objectIdField,"objectid"===this._resultDisplayField&&(this._resultDisplayField=s[0].layer.objectIdField),"objectid"===this._resultSortField&&(this._resultSortField=s[0].layer.objectIdField);const i=this._appendAttributes(e,s,"objectId");this.switchToFromIndividualRecords(i,t+" ("+e.length+")","records")}else this.switchToFromIndividualRecords(e,t+" ("+e.length+")","records")})))}},v("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowIndividual(e){const{messages:t}=this;let s,i=null;if(i=e?.details?.fields.find((({name:e})=>e===this._resultDisplayField)),"date"===i?.type){s=new Date(e.details.attributes[this._resultDisplayField]).toDateString()}else if("assetgroup"===this._resultDisplayField.toLowerCase())s=this._getAssetGroupName(e);else if("assettype"===this._resultDisplayField.toLowerCase())s=this._getAssetTypeName(e);else if(i?.domain&&M(i.domain)){const t=i.domain.codedValues.find((({code:t})=>t===e.details.attributes[this._resultDisplayField]));s=t?.name}else s=e.details?.attributes[this._resultDisplayField]??e.objectId;return s&&""!==s&&null!==s?"string"==typeof s&&(s.trim()||(s=t.resultsStrings.noValue)):s=t.resultsStrings.noValue,v("calcite-list-item",{key:e.details.uid,label:s,onCalciteListItemSelect:async()=>{this._disablePopup(),this._showFeatureInfoActive=!0;const t=u(e.details?.layer)?e.details?.layer:null;if(t){const s=Object.keys(e.details.attributes).find((e=>e.toLowerCase()===t.subtypeField.toLowerCase()))??"assetgroup",i=t.sublayers.find((t=>t.subtypeCode===e.details.attributes[s])),r=Object.keys(e.details.attributes).find((e=>e.toLowerCase()===t.objectIdField.toLowerCase()))??"objectid",o=new h;o.outFields=["*"],o.returnGeometry=!0,o.where=r+" = "+e.details.attributes[r];const a=await(i?.queryFeatures(o));a&&this._resultFeatureWidget.open(a.features[0])}else this._resultFeatureWidget.open(e.details)}},v("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderShowFeatureInfoBlock(){const{messages:e}=this;return v("calcite-block",{class:k.blockContainer,key:`${this.id}__show-feature-info-block`,label:e.resultsStrings.headerFeatureInfo,open:!0},this._resultFeatureWidget.render())}_renderStartFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"starting-point"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"start"))}));let i=null;return this._symbolStartFlag&&(i=this._getSymbolIcon(this._symbolStartFlag)),v("calcite-block",{class:k.blockContent,collapsible:!0,heading:e.inputsStrings.headerStartingPoint+" ("+s.length+")",open:!0,overlayPositioning:"fixed"},v("div",{slot:"icon"},i||v("calcite-icon",{icon:"pin",scale:"s"})),v("div",null,e.inputsStrings.startingPointHint),v("div",{class:k.listContainer},t),this._warningNoStartAssetFound?this._renderWarningMessage("noStartAsset",!0):null,this._warningNoStartAssetNsoFound?this._renderWarningMessage("noStartAssetNso",!0):null,v("div",{class:k.addButtonContainer},v("calcite-split-button",{appearance:"outline-fill",primaryIconStart:"select",primaryText:e.inputsStrings.addPointOption,onCalciteSplitButtonPrimaryClick:()=>{this._setupAddTraceLocation("starting-point")}},v("calcite-dropdown-group",{selectionMode:"none"},v("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>{this._setupAddNonspatialObject("starting-point")}},e.inputsStrings.addNonspatialOption)))))}_renderStartOverContainer(){const{messages:e}=this;return v("calcite-fab",{appearance:"solid",icon:"trash",kind:"brand",onclick:()=>{this.confirmReset()},slot:"fab",text:e.resultsStrings.startOverButton,textEnabled:!0,title:e.resultsStrings.startOverButton,type:"button"})}_renderTraceResultByAssetGroup(){const e=this._traceResultsAssetGroup,t=[];for(const s in e){const i=e[s];for(const e in i)t.push(this._renderResultRowAssetGroup(i[e]))}return v("calcite-flow-item",{heading:this._traceHeaderForFlow,key:"assetGroupResultMultiple",selected:"assetGroup"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromAssetGroup([],"","result")}},v("calcite-list",{label:""},t),this._renderStartOverContainer())}_renderTraceResultByAssetType(){const e=this._traceResultsAssetType,t=[];for(const s in e)e[s].length>0&&t.push(this._renderResultRowAssetType(e[s]));return v("calcite-flow-item",{heading:this._assetGroupHeader,key:"assetTypeResult",loading:this._updatingHandles.updating,selected:"assetType"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromAssetType([],"","assetGroup")}},v("calcite-list",{label:"",selectionMode:"none"},t),this._renderStartOverContainer())}_renderTraceResultFunctions(){if("functions"!==this._traceResultsState)return null;const{messages:e}=this,t=this._traceResultsFunctions,s=[];return t.forEach((e=>{s.push(this._renderResultRowFunctions(e))})),v("calcite-flow-item",{heading:e.resultsStrings.functionHeader,key:"functionResultMultiple",selected:"functions"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromFunctions([],"result")}},s,this._renderStartOverContainer())}_renderTraceResultIndividual(){const{messages:e}=this,t=this._traceResultsIndividual;t.sort(this._compare(this._resultSortField,this._resultSortOrder));const s=[];if(t.length>0){(t[0].details?.fields.some((({name:e})=>e.toLowerCase()===this._resultDisplayField.toLocaleLowerCase()))??!1)||(this._resultDisplayField=this._resultObjectIdField,this._resultSortField=this._resultObjectIdField),t.forEach((e=>{e?.details&&s.push(this._renderResultRowIndividual(e))})),0===s.length&&s.push(v("calcite-list-item",{label:e.resultsStrings.noFeaturesInMap}))}return v("calcite-flow-item",{heading:this._assetTypeHeader,key:"individualResult",selected:"records"===this._traceResultsState,onCalciteFlowItemBack:()=>{this._showResultOptions=!1,this.switchToFromIndividualRecords([],"","assetType")}},v("calcite-action",{afterCreate:_,bind:this,"data-node-ref":"_individualResultNode",icon:"gear",id:"field_options"+this.id,label:e.resultsStrings.displayAttribute,onclick:()=>{this._showResultOptions=!0},slot:"header-actions-end",text:e.resultsStrings.displayAttribute}),this._renderTraceResultIndividualPopover(),v("calcite-list",{label:"",selectionMode:"none"},s),this._renderStartOverContainer())}_renderTraceResultIndividualPopover(){const{messages:e}=this,t=this._traceResultsIndividual,s=[],i=[];return t.length>0&&(t[0].details?t[0].details.fields.forEach((({name:e,alias:t})=>{s.push(v("calcite-option",{key:`display-${e}`,label:t??e,selected:e===this._resultDisplayField,value:e})),i.push(v("calcite-option",{key:`sort-${e}`,label:t??e,selected:e===this._resultSortField,value:e}))})):(s.push(v("calcite-option",{key:`display-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})),i.push(v("calcite-option",{key:`sort-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})))),v("calcite-popover",{autoClose:!0,label:e.resultsStrings.displayAttribute,offsetDistance:0,offsetSkidding:0,open:this._showResultOptions,overlayPositioning:"fixed",placement:"left-start",referenceElement:this._individualResultNode,styles:null!==this.domNode?C(.75*this.domNode.clientWidth):A()},v("calcite-block",{label:e.resultsStrings.displayAttribute,open:!0,overlayPositioning:"fixed"},v("calcite-label",{scale:"s"},e.resultsStrings.displayAttribute,v("calcite-select",{label:e.resultsStrings.displayAttribute,scale:"s",onCalciteSelectChange:e=>{const t=e.currentTarget;this._resultDisplayField=t.selectedOption.value,this._showResultOptions=!1}},s)),v("calcite-label",{scale:"s"},e.resultsStrings.sortBy,v("calcite-select",{label:e.resultsStrings.sortBy,scale:"s",onCalciteSelectChange:e=>{const s=e.currentTarget;this._resultSortField=s.selectedOption.value,t.sort(this._compare(this._resultSortField,this._resultSortOrder)),this._traceResultsIndividual=t,this._showResultOptions=!1}},i))))}_renderTraceResults(){const{messages:e,messagesCommon:t}=this,{selectFeatures:s}=e.resultsStrings,i=this.viewModel.traceResults,r=[];return i.forEach(((t,i)=>{let o=[],a=[],l=!1,n=!1,c=!1,d="";null!==t.results&&t.results.hasOwnProperty("elements")?(null!==t.results.aggregatedGeometry&&(n=!0),null!==t.results.globalFunctionResults&&t.results.globalFunctionResults.length>0&&(a=t.results.globalFunctionResults,a.length>0&&(c=!0)),t.results.elements&&t.results.elements.length>0&&(o=t.results.elements,o.length>0&&(l=!0)),(n||l)&&(d=this.messagesUnits.units[t.resultArea?.unit]?.abbr),r.push(v("calcite-block",{class:k.blockContent,collapsible:!0,description:t.trace.description??"",heading:t.trace.title,key:`${t.trace.title}${i}`,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),v("calcite-list",{label:""},c?v("calcite-list-item",{label:e.resultsStrings.functionHeader+" ("+a.length+")",onCalciteListItemSelect:()=>{this.switchToFromFunctions(a,"functions")}},v("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):null,l&&this.viewModel.showSelectionAttributes?v("calcite-list-item",{key:this.id,label:e.resultsStrings.viewFeatures+" ("+o.length+")",onCalciteListItemSelect:()=>{this.switchToFromAssetGroup(this._groupResultsByAssetGroup(t),t.trace.title+" ("+o.length+")","assetGroup")}},v("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):this.viewModel.showSelectionAttributes?v("calcite-label",{layout:"inline",scale:"s"},e.resultsStrings.noSelectionResults):null),l?v("div",{class:k.doublePaddingTop},v("calcite-label",{layout:"inline",onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"s"},v("calcite-checkbox",{checked:t.selectionEnabled,onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)}}),this.viewModel.showSelectionAttributes?s:`${s} (${o.length})`)):null,n?v("calcite-block-section",{key:`aggregate-${t.trace.title}-${i}`,open:t.graphicEnabled,text:e.resultsStrings.highlightTrace,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.currentTarget.open?this.viewModel.changeResultGraphicColor(t.graphicColor,t):this.viewModel.removeResultGraphicFromView(t)}},v("calcite-list",{label:e.resultsStrings.graphicColor,selectionMode:"none"},v("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{this._swatchNode=e.currentTarget,this._activeSwatch="aggGeom_"+i}},v("calcite-color-picker-swatch",{color:t.graphicColor.hex,scale:"s",slot:"actions-end"})))):null,this.enableResultArea&&(n||l)?v("calcite-block-section",{key:`area-${t.trace.title}-${i}`,open:t.resultArea?.show,text:e.resultsStrings.resultAreaHeader,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.currentTarget.open?t.resultAreaGraphic?this.viewModel.addResultAreaToMap(t,t.resultAreaGraphic):this.viewModel.addResultAreaToMap(t):this.viewModel.removeResultAreaFromMap(t)}},v("calcite-list",{label:"",selectionMode:"none"},v("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.currentTarget;this._swatchNode=t,this._activeSwatch="resultArea_"+i}},v("calcite-color-picker-swatch",{color:t.resultArea?.color.hex,scale:"s",slot:"actions-end"}))),v("calcite-list",{label:"",selectionMode:"none"},v("calcite-list-item",{label:e.resultsStrings.resultAreaBuffer},v("calcite-input-number",{afterCreate:this._afterComponentCreate,class:k.numberInput,max:999999,min:0,scale:"s",slot:"actions-end",suffixText:d,value:t.resultArea?.distance.toString(),onCalciteInputNumberChange:e=>{if(!this.view?.popup)return;this.view.popup.visible&&this.view.closePopup();const s=e.currentTarget;t.resultArea.distance>=0?(t.resultArea.distance=parseInt(s.value,10),this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t)):(t.resultArea.distance=0,this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t))}})))):null,v("calcite-popover",{autoClose:!0,closable:!0,label:e.resultsStrings.graphicColor,offsetDistance:0,offsetSkidding:0,open:this._activeSwatch==="aggGeom_"+i||this._activeSwatch==="resultArea_"+i,overlayPositioning:"fixed",placement:"auto-start",referenceElement:this._swatchNode,scale:"s",onCalcitePopoverClose:()=>{this._swatchNode=null,this._activeSwatch=null}},this._renderHighlightColorPicker(this._activeSwatch==="resultArea_"+i?t.resultArea?.color:t.graphicColor,t,this._activeSwatch==="resultArea_"+i?"resultArea":"aggregate"))))):r.push(v("calcite-block",{collapsible:!1,heading:t.trace.title,key:"error-"+i,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),this._renderWarningMessage("noController",!1,t.status)))})),v("calcite-flow-item",{key:"traceResults",selected:"result"===this._traceResultsState},r,this._renderStartOverContainer(),this._alertRemoveModal?v("calcite-scrim",{key:"prompt"},v("div",{class:k.clearPrompt},v("h3",{slot:"header"},e.globalStrings.clearResults),v("div",{slot:"content"},e.alertsStrings.clearResultsAlert),v("div",{class:k.promptDivider}),v("div",{styles:N("row")},v("calcite-button",{appearance:"outline",onclick:()=>{this._alertRemoveModal=!1},slot:"secondary",width:"full"},t.cancel),v("calcite-button",{onclick:()=>{this._activeTrace&&this.viewModel.clearResult(this._activeTrace),this._alertRemoveModal=!1,0===this.viewModel.traceResults.length?this.switchTab("input"):(this._activeTrace=this.viewModel.traceResults[0].trace,this._traceResultsState="result")},slot:"primary",width:"full"},t.form.ok)))):null)}_renderTraceSelectorContainer(){const{messages:e}=this,t=this.viewModel.traces.map((e=>this._renderComboboxItem({value:e.globalId,text:e.title,selected:e.selected??!1}))),s=this.viewModel.traces.filter((e=>e.selected)),i=e.tracingStrings.traceOperation+` (${s.length})`;return v("calcite-block",{class:k.blockContent,collapsible:!0,heading:i,open:!0,overlayPositioning:"fixed"},v("calcite-icon",{icon:"utility-network-trace",scale:"s",slot:"icon"}),v("calcite-combobox",{label:e.inputsStrings.selectTraces,maxItems:0,overlayPositioning:"fixed",placeholder:e.inputsStrings.selectTraces,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:e=>{this.viewModel.traces.forEach((t=>{t.selected=e.currentTarget.selectedItems.some((e=>e.value===t.globalId))})),e.currentTarget.selectedItems.length&&(this._warningNoTraceSelected=!1)}},t))}_renderUtilityNetworkTrace(){const{viewModel:e,viewModel:{utilityNetwork:t}}=this,s=e.view?.map,{messages:i}=this;let r=v("calcite-tabs",{layout:"center",position:"top",styles:R(this.container)},v("calcite-tab-nav",{slot:"title-group"},v("calcite-tab-title",{onclick:()=>{this.switchTab("input")},selected:"input"===this._activeTab},i.inputsStrings.headerTabInputs),v("calcite-tab-title",{onclick:()=>{this.switchTab("results")},selected:"results"===this._activeTab},i.resultsStrings.headerTabResults)),this._renderInputsTab(),this._renderResultsTab());return(!s.utilityNetworks?.length&&!t||t&&!t.sharedNamedTraceConfigurations.length)&&(r=v("calcite-panel",null,this._renderWarningMessage("noTraceConfig",!1))),this._loadUnError||(r=v("calcite-panel",null,this._renderWarningMessage("loadUNError",!1,this._errorMessage))),r}_renderWarningMessage(e,t,s){const{messages:i}=this;let r=i.alertsStrings.NoRunAlertHeader,o=i.alertsStrings.noResultsInfo;switch(e){case"flag":r=i.alertsStrings.startingPointAlertHeader,o=i.alertsStrings.startingPointAlert;break;case"noTerminal":r=i.alertsStrings.noTerminalDefinedHeader,o=i.alertsStrings.noTerminalDefined;break;case"trace":r=i.alertsStrings.selectTraceAlertHeader,o=i.alertsStrings.selectTraceAlert;break;case"noTraceExecuted":r=i.alertsStrings.NoRunAlertHeader,o=i.alertsStrings.noResultsInfo;break;case"noBarrierAsset":case"noStartAsset":r=i.alertsStrings.noAssetsFoundHeader,o=i.alertsStrings.noAssetFound;break;case"noBarrierAssetNso":case"noStartAssetNso":r="",o=i.alertsStrings.noAssetFound;break;case"noTraceConfig":r="",o=i.alertsStrings.noTraceSupported;break;default:r=i.alertsStrings.genericErrorHeader,o=s||""}return v("div",{class:k.noticeContainer,key:e},v("calcite-notice",{closable:t,icon:!0,key:e,kind:"danger",open:!0,scale:"s",width:"auto",onCalciteNoticeClose:()=>this._handleWarningNoticeClose(e)},v("div",{slot:"title"},r),v("div",{slot:"message"},o)))}_afterComponentCreate(e){"value"in e&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"})}_appendAttributes(e,t,s){const i=[];return e.forEach((e=>{t.forEach((t=>{t.featureSet.features.forEach((r=>{e[s]===r.attributes[this._resultObjectIdField]&&(e.details=r,e.details.fields=t.featureSet.fields,i.push(e))}))}))})),i}_changeCursor(e="default"){const t=this.view?.container?.style;t&&(t.cursor=e)}_disablePopup(){const{view:e}=this;e.popupEnabled=!1,e.closePopup()}_compare(e,t){return(s,i)=>{let r=0,o=s.details?.attributes[e]??s.objectId,a=i.details?.attributes[e]??i.objectId;return isNaN(o)&&(o=o.toLowerCase()),isNaN(a)&&(a=a.toLowerCase()),"desc"===t?o>a?r=1:o<a&&(r=-1):o<a?r=1:o>a&&(r=-1),r}}_getAssetGroupName(e){let t=e.assetGroupCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const e=i.assetGroups.find((e=>e.assetGroupCode===s));e&&(t=e.assetGroupName)}return t}_getAssetTypeName(e){let t=e.assetTypeCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const r=i.assetGroups.find((e=>e.assetGroupCode===s));if(r){const s=r.assetTypes.find((t=>t.assetTypeCode===e.assetTypeCode));s&&(t=s.assetTypeName)}}return t}_getSymbolIcon(e){return"picture-marker"===e.type?v("img",{height:e.height,src:e.url??void 0,width:e.width}):null}_groupBy(e,t){return e.reduce(((e,s)=>((e[s[t]]=e[s[t]]||[]).push(s),e)),{})}_groupResultsByAssetGroup(e){const t=[],s=e.results?.elements,i=this._groupBy(s??[],"networkSourceId");for(const r in i)t.push(this._groupBy(i[r],"assetGroupCode"));return t}_groupResultsByAssetType(e){return this._groupBy(e,"assetTypeCode")}_handleWarningNoticeClose(e){switch(e){case"flag":this._warningNoFlag=!1;break;case"noTerminal":this._warningNoTerminal=!1;break;case"trace":this._warningNoTraceSelected=!1;break;case"noStartAsset":this._warningNoStartAssetFound=!1;break;case"noStartAssetNso":this._warningNoStartAssetNsoFound=!1;break;case"noBarrierAsset":this._warningNoBarrierAssetFound=!1;break;case"noBarrierAssetNso":this._warningNoBarrierAssetNsoFound=!1}}_mixCustomStrings(){const{messages:e}=this;this.inputSettings.length>0&&this.inputSettings.forEach((t=>{"starting-point"===t.type&&(e.inputsStrings.headerStartingPoint=t.label,e.inputsStrings.startingPointHint=t.description),"barrier"===t.type&&(e.inputsStrings.headerBarrier=t.label,e.inputsStrings.barrierPointHint=t.description)}))}_overrideFlagSymbol(){this.inputSettings.length>0&&this.inputSettings.forEach((e=>{"starting-point"===e.type?this._symbolStartFlag=e.symbol:this._symbolBarrier=e.symbol,this.viewModel.changeFlagSymbol(e.type,e.symbol)}))}_processFlagOnLoad(){return this.view?.when().then((()=>{this._watchHandler=a((()=>!this.view?.updating),(async()=>{this._warningNoFlag=!1,this._warningNoBarrierAssetFound=!1,this._warningNoStartAssetFound=!1;const e=await this.viewModel.addFlagsOnLoad();this.viewModel.removeFlagsOnLoadWatcher(),e.includes("barrier")&&(this._warningNoBarrierAssetFound=!0),e.includes("starting-point")&&(this._warningNoStartAssetFound=!0),this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}))}))}_registerWatchers(){this.addHandles([i((()=>this.selectedTraces),(()=>{this.viewModel.selectTracesOnLoad(),this.scheduleRender()})),i((()=>this.defaultGraphicColor),(()=>{this.viewModel.traceResults.length>0&&this.viewModel.traceResults.forEach((e=>{this.viewModel.changeResultGraphicColor(this.viewModel.defaultGraphicColor,e)})),this.scheduleRender()}))])}_renderComboboxItem({text:e,value:t,selected:s}){return v("calcite-combobox-item",{key:t,selected:s,textLabel:e,value:t})}_resetResultFeatureWidget(){this._showFeatureInfoActive=!1,this._resultFeatureWidget.feature=null,this.view.popupEnabled=this._wasPopupEnabled}_resetTraceLocationWarnings(){this._warningNoBarrierAssetFound=!1,this._warningNoBarrierAssetNsoFound=!1,this._warningNoStartAssetFound=!1,this._warningNoStartAssetNsoFound=!1}_setupAddNonspatialObject(e){this._disablePopup(),this._traceLocationType=e,this._addNonspatialObjectActive=!0,this._resetTraceLocationWarnings(),this.viewModel.getNonspatialTraceLocationInitialFeature().then((e=>{this._findNonspatialFeatureWidget.feature=null;const t=e.graphic;this._findNonspatialFeatureWidget.open(t)})).catch((()=>{this._warningNoStartAssetNsoFound="starting-point"===e,this._warningNoBarrierAssetNsoFound="barrier"===e,this._addNonspatialObjectActive=!1})).finally((()=>this._changeCursor("default")))}_setupAddTraceLocation(e){this._traceLocationType=e,this._changeCursor("crosshair"),this._selectToolActive=!0,this._addNonspatialObjectActive=!1,this._resetTraceLocationWarnings(),this.viewModel.addFlagByHit(this._traceLocationType,this._symbolStartFlag).then((e=>{this._changeCursor("default"),e?this._warningNoFlag=!1:(this._warningNoStartAssetFound="starting-point"===this._traceLocationType,this._warningNoBarrierAssetFound="barrier"===this._traceLocationType),this._selectToolActive=!1}))}_utilityNetworkTraceInitialized(){this.viewModel.loadUtilityNetwork().then((e=>{e&&(this.viewModel.selectTracesOnLoad(),this._registerWatchers(),this.viewModel.flags.length>0&&this._processFlagOnLoad()),this.disabled=!1})).catch((e=>{const{messages:t}=this;this._loadUnError=!1,"utility-network:no-user-type-extension"===e.name||e.details.raw?.extendedCode===x.noExtension?this._errorMessage=t.alertsStrings.noUserExtension:this._errorMessage=e.message,this.disabled=!1}))}_viewChangeHandle(){this._wasPopupEnabled=this.view?.popupEnabled??!1,this._findNonspatialFeatureWidget.view=this.view,this._resultFeatureWidget.view=this.view}};e([l()],I.prototype,"_activeTab",void 0),e([l()],I.prototype,"_activeTrace",void 0),e([l()],I.prototype,"_activeSwatch",void 0),e([l()],I.prototype,"_addNonspatialObjectActive",void 0),e([l()],I.prototype,"_alertRemoveModal",void 0),e([l()],I.prototype,"_assetGroupHeader",void 0),e([l()],I.prototype,"_assetTypeHeader",void 0),e([l()],I.prototype,"_confirmReset",void 0),e([l()],I.prototype,"_errorMessage",void 0),e([l()],I.prototype,"_swatchNode",void 0),e([l()],I.prototype,"_selectToolActive",void 0),e([l()],I.prototype,"_showFeatureInfoActive",void 0),e([l()],I.prototype,"_traceHeaderForFlow",void 0),e([l()],I.prototype,"_traceResultsFunctions",void 0),e([l()],I.prototype,"_traceResultsAssetGroup",void 0),e([l()],I.prototype,"_traceResultsAssetType",void 0),e([l()],I.prototype,"_traceResultsIndividual",void 0),e([l()],I.prototype,"_traceResultsState",void 0),e([l()],I.prototype,"_warningNoFlag",void 0),e([l()],I.prototype,"_warningNoTraceSelected",void 0),e([l()],I.prototype,"_updatingHandles",void 0),e([l()],I.prototype,"defaultGraphicColor",null),e([l()],I.prototype,"disabled",void 0),e([l()],I.prototype,"enableResultArea",null),e([l()],I.prototype,"flags",null),e([l()],I.prototype,"gdbVersion",null),e([l()],I.prototype,"icon",null),e([l()],I.prototype,"inputSettings",void 0),e([l()],I.prototype,"label",null),e([l(),b("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")],I.prototype,"messages",void 0),e([l(),b("esri/t9n/common")],I.prototype,"messagesCommon",void 0),e([l(),b("esri/core/t9n/Units")],I.prototype,"messagesUnits",void 0),e([l()],I.prototype,"resultAreaProperties",null),e([l()],I.prototype,"selectedTraces",null),e([l()],I.prototype,"selectOnComplete",null),e([l()],I.prototype,"showGraphicsOnComplete",null),e([l()],I.prototype,"showSelectionAttributes",null),e([l()],I.prototype,"utilityNetwork",null),e([l()],I.prototype,"view",null),e([w(["add-flag","add-flag-complete","add-flag-error","select-features","clear-selection","add-result-area","remove-result-area","create-result-area","reset"]),l({type:f})],I.prototype,"viewModel",void 0),I=e([n("esri.widgets.UtilityNetworkTrace")],I);const B=I;export{B as default};
|