@arcgis/core 5.1.0-next.86 → 5.1.0-next.88
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/Graphic.js +1 -1
- package/analysis/LineOfSightAnalysisObserver.d.ts +2 -2
- package/analysis/LineOfSightAnalysisTarget.d.ts +2 -2
- package/applications/Components/arcadeUtils.d.ts +23 -0
- package/applications/Components/arcadeUtils.js +2 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00e9e25269d5776f8645.js +1 -0
- package/assets/esri/core/workers/chunks/015fc0a17b17d69cc3bb.js +1 -0
- package/assets/esri/core/workers/chunks/0a6df243b18acae471be.js +1 -0
- package/assets/esri/core/workers/chunks/0cc4b3100a7a453bd058.js +1 -0
- package/assets/esri/core/workers/chunks/10cf6a70bf79f04a7208.js +1 -0
- package/assets/esri/core/workers/chunks/{e9a42f0262fc44a79d4b.js → 164ee62f2211987ad850.js} +1 -1
- package/assets/esri/core/workers/chunks/169ca3724053fc046d1b.js +1 -0
- package/assets/esri/core/workers/chunks/206bdfd868a9ef88f3a8.js +1 -0
- package/assets/esri/core/workers/chunks/2343b1105bc4c1b4a086.js +1 -0
- package/assets/esri/core/workers/chunks/{1bad4331a43169f3cc34.js → 2549a07f403447482f4e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f89b7b0ccfbd1e5f9a0f.js → 3092184350d66c79f610.js} +1 -1
- package/assets/esri/core/workers/chunks/3469df5c4846b0cee012.js +1 -0
- package/assets/esri/core/workers/chunks/{26f804c92077c11c626d.js → 394812e19b6915d560b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f8b173d1dac73ba0d9e.js → 3cf77b7a61f78f9bcd62.js} +1 -1
- package/assets/esri/core/workers/chunks/{edbdee69440dbfc05644.js → 3e72bd6dbfc52d956c06.js} +1 -1
- package/assets/esri/core/workers/chunks/3feec3d08424b94e1bcf.js +1 -0
- package/assets/esri/core/workers/chunks/{ce4dfc3a470230ddc9e4.js → 43f58604ba4a94a9167c.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff57a071156d8a7e47be.js → 456d269e3982c437010a.js} +1 -1
- package/assets/esri/core/workers/chunks/46b16501db6681dc467b.js +1 -0
- package/assets/esri/core/workers/chunks/48549d3d7bf0154c0afa.js +1 -0
- package/assets/esri/core/workers/chunks/{713ab619060bd5087479.js → 4baf66314f82cfa76beb.js} +182 -157
- package/assets/esri/core/workers/chunks/{1ab66600579fa4232d7b.js → 4dc91c2208201ba34c90.js} +1 -1
- package/assets/esri/core/workers/chunks/{b14c4c3f295970f731ab.js → 500be1fb7cc9efec875c.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc6ca7ffb9f1b875059c.js → 51716e411fad624ac21c.js} +1 -1
- package/assets/esri/core/workers/chunks/54c035cdc171998d0776.js +1 -0
- package/assets/esri/core/workers/chunks/{b23e677c33db6f9bac8a.js → 566f6319ded0634769e0.js} +1 -1
- package/assets/esri/core/workers/chunks/{701b823763e941b71f4f.js → 7185486c6dc28fc367a1.js} +1 -1
- package/assets/esri/core/workers/chunks/752f4e0e2961fc315dca.js +1 -0
- package/assets/esri/core/workers/chunks/7ba67f1d7831a5576a5a.js +1 -0
- package/assets/esri/core/workers/chunks/{186bfde8c552e3b42302.js → 7ef51b0ebd560113ae7e.js} +1 -1
- package/assets/esri/core/workers/chunks/7f0f10946f05a09b5654.js +1 -0
- package/assets/esri/core/workers/chunks/{fce2306a1b31c6680f90.js → 7f34fa9f154f5101cb13.js} +1 -1
- package/assets/esri/core/workers/chunks/8178e9ba3c568d406a87.js +1 -0
- package/assets/esri/core/workers/chunks/83f1871d04c979fa23b7.js +1 -0
- package/assets/esri/core/workers/chunks/85da2987e17b6755a94e.js +1 -0
- package/assets/esri/core/workers/chunks/8a5a827ee557d9f9a66e.js +1 -0
- package/assets/esri/core/workers/chunks/9c09097e390985bbac58.js +1 -0
- package/assets/esri/core/workers/chunks/{618106f5fbdf88ef2278.js → a401d44a5b45c05072c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0aee7c80c5c7e23d216.js → a429355534bf6cbd8304.js} +1 -1
- package/assets/esri/core/workers/chunks/a432219de6a873f88776.js +1 -0
- package/assets/esri/core/workers/chunks/{455d08294e0f5c5509ff.js → a6b75576d598ec161cc4.js} +1 -1
- package/assets/esri/core/workers/chunks/{99c6bd2125f4eb6796fe.js → aae40d70eb01249c1bab.js} +1 -1
- package/assets/esri/core/workers/chunks/b2662bfdbd1e3623ceb9.js +1 -0
- package/assets/esri/core/workers/chunks/b4bac22467e96be7a974.js +1 -0
- package/assets/esri/core/workers/chunks/{5166f204fd078dced5db.js → baea6f86b2dbe067940e.js} +1 -1
- package/assets/esri/core/workers/chunks/c3e89c7c7b677bd18557.js +1 -0
- package/assets/esri/core/workers/chunks/cb81d524f12edcadb9bb.js +1 -0
- package/assets/esri/core/workers/chunks/cc0f3b9b153a0c232afe.js +1 -0
- package/assets/esri/core/workers/chunks/cd0c232f4e3868d91a05.js +1 -0
- package/assets/esri/core/workers/chunks/{bae8f2a5dfe0cfbc0688.js → d00dddc3881fa29446e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → d8ccc713c5ad93e7a0c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{e66b9d00d02fc08cbb2d.js → da008d6a3afb30d18392.js} +1 -1
- package/assets/esri/core/workers/chunks/dde94664110ff231a52d.js +1 -0
- package/assets/esri/core/workers/chunks/de3e5d82502ee15b7eae.js +1 -0
- package/assets/esri/core/workers/chunks/defac06f9e2b43090677.js +2 -0
- package/assets/esri/core/workers/chunks/e6fe8b5fbe95de01453b.js +1 -0
- package/assets/esri/core/workers/chunks/ee7e9bca57160694b3c4.js +1 -0
- package/assets/esri/core/workers/chunks/f36345ebb9851ab92453.js +1 -0
- package/assets/esri/core/workers/chunks/{add000f51c778114c028.js → f37e4ae0e9be80210db0.js} +1 -1
- package/assets/esri/core/workers/chunks/{c503c79ba5761f7abbeb.js → fa869bfe4366f7f49cca.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8de7fe49dba9ed589df.js → fade7b878a9498382bb2.js} +1 -1
- package/assets/esri/core/workers/chunks/fe30e61652716fcccf16.js +2 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +25 -17
- package/chunks/GlowBlur.glsl.js +11 -8
- package/chunks/OITBlend.glsl.js +1 -1
- package/chunks/bundle2.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/interfaces.d.ts +0 -3
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/networks/CircuitManager.d.ts +33 -25
- package/networks/CircuitManager.js +1 -1
- package/networks/support/typeUtils.d.ts +4 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +3 -3
- package/renderers/ClassBreaksRenderer.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/renderers/support/scaleDependentSymbolUtils.js +2 -0
- package/rest/networks/circuits/queryCircuits.js +1 -1
- package/rest/networks/circuits/support/QueryCircuitsParameters.d.ts +21 -15
- package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/support/Query.js +1 -1
- package/support/revision.js +1 -1
- package/third-party-notices.txt +19 -12
- package/views/2d/engine/webgl/GlyphSDFCreator.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringStore.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +149 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/webmap/utils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/assets/esri/core/workers/chunks/0c074c46d106ca4d3bad.js +0 -1
- package/assets/esri/core/workers/chunks/1f16bc8c02d8c4b2f693.js +0 -1
- package/assets/esri/core/workers/chunks/29878b52aa12b3815230.js +0 -1
- package/assets/esri/core/workers/chunks/2c916b93d8a6e6b9c0d7.js +0 -1
- package/assets/esri/core/workers/chunks/3ea5a18b264628dc37f0.js +0 -1
- package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +0 -1
- package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +0 -1
- package/assets/esri/core/workers/chunks/49e8144effc299dfcd66.js +0 -1
- package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +0 -1
- package/assets/esri/core/workers/chunks/65ac73de5bb133c6bf89.js +0 -1
- package/assets/esri/core/workers/chunks/67ec1694d6e18b7c234c.js +0 -1
- package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +0 -1
- package/assets/esri/core/workers/chunks/6f7aaba26773fe416ac2.js +0 -1
- package/assets/esri/core/workers/chunks/7acf82763aeba44049d0.js +0 -1
- package/assets/esri/core/workers/chunks/88eb1e4320c4ada01711.js +0 -1
- package/assets/esri/core/workers/chunks/8af9a78cf316581ea482.js +0 -1
- package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +0 -1
- package/assets/esri/core/workers/chunks/97719271a3e4c9f2b2c9.js +0 -1
- package/assets/esri/core/workers/chunks/9ea23cd4b2664c08b670.js +0 -1
- package/assets/esri/core/workers/chunks/a1a12552d34ea9eea130.js +0 -1
- package/assets/esri/core/workers/chunks/a844547bf33a8527ee9f.js +0 -2
- package/assets/esri/core/workers/chunks/ac5999c88c27b49cd760.js +0 -1
- package/assets/esri/core/workers/chunks/b575292013bceef9b015.js +0 -1
- package/assets/esri/core/workers/chunks/bbc27d9285162696d089.js +0 -1
- package/assets/esri/core/workers/chunks/bc8a74da48b08309875f.js +0 -1
- package/assets/esri/core/workers/chunks/cd7159600ce132e32d04.js +0 -1
- package/assets/esri/core/workers/chunks/ce66c551b7083913eee5.js +0 -1
- package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +0 -1
- package/assets/esri/core/workers/chunks/d9c3f14eee4db7a7137b.js +0 -1
- package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +0 -1
- package/assets/esri/core/workers/chunks/dcc719e15b2e0cce1f3b.js +0 -1
- package/assets/esri/core/workers/chunks/ded2f19a1685db2137f4.js +0 -2
- package/assets/esri/core/workers/chunks/f43d628d47eec7d530c7.js +0 -1
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +0 -1
- package/assets/esri/core/workers/chunks/fcf51697c361e0075cc2.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +0 -132
- /package/assets/esri/core/workers/chunks/{ded2f19a1685db2137f4.js.LICENSE.txt → defac06f9e2b43090677.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a844547bf33a8527ee9f.js.LICENSE.txt → fe30e61652716fcccf16.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6219,8575],{52106(e,t,n){n.d(t,{A:()=>C});var r,i,o=n(5482),s=n(37838),a=n(69540),l=n(51447),u=n(25482),c=n(4718),p=n(53966),d=n(36708),f=n(24326),h=n(91429),y=n(12195),g=n(65864),m=n(50498),b=n(55156),M=n(60950),w=n(54339),v=n(94128),I=n(33910);function F(e){if(null==e)return null;const t={};for(const n in e){const r=e[n];r&&(t[n]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let C=class extends((0,a.OU)(u.o)){static{r=v.Z}static{i=this}constructor(e){super(e),this[r]=!0,this.aggregateIds=void 0,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,f.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,aggregateIds:this.aggregateIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,M.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const n=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[n,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const n=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",n,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,b.I)(this.origin);if(e)return(0,w.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){const e=(0,b.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){const e={aggregateGeometries:F(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.aggregateIds?.length&&(e.aggregateIds=(0,c.o8)(this.aggregateIds)),e}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const n={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",n,n,e.action)}}_notifyLayer(e,t,n,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:n};"origin-transform"===e&&(i.action=r),"attributes"===e&&(i.attributeName=r),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,d.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,d.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,o.Cg)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const n in e){const r=(0,g.rS)(e[n]);r&&(t[n]=r)}return 0!==Object.keys(t).length?t:null}}})],C.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,h.MZ)()],C.prototype,"aggregateIds",void 0),(0,o.Cg)([(0,h.MZ)({value:null})],C.prototype,"attributes",null),(0,o.Cg)([(0,h.MZ)({value:null,types:m.yR,json:{read:g.rS}})],C.prototype,"geometry",null),(0,o.Cg)([(0,h.MZ)({type:Boolean})],C.prototype,"isAggregate",void 0),(0,o.Cg)([(0,h.MZ)({clonable:!1})],C.prototype,"layer",void 0),(0,o.Cg)([(0,h.MZ)({clonable:"reference"})],C.prototype,"origin",void 0),(0,o.Cg)([(0,h.MZ)({type:s.A,value:null})],C.prototype,"popupTemplate",null),(0,o.Cg)([(0,h.MZ)({clonable:"reference"})],C.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,h.MZ)({value:null,types:I.Es})],C.prototype,"symbol",null),(0,o.Cg)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],C.prototype,"_version",void 0),(0,o.Cg)([(0,h.MZ)({type:Boolean,value:!0})],C.prototype,"visible",null),C=i=(0,o.Cg)([(0,h.$K)("esri.Graphic")],C)},6797(e,t,n){n.d(t,{Ui:()=>d});var r=n(69622),i=n(7762),o=n(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof r.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const r=l(e),i=l(t);if(0===r.length&&0===i.length)return;if(!r.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter(e=>!r.includes(e)),d=r.filter(e=>!i.includes(e)),f=r.filter(n=>i.includes(n)&&u(e,n)!==u(t,n)).concat(o,d).sort(),h=c(e);if(h&&s.has(h)&&f.length)return{type:"complete",oldValue:e,newValue:t};let y;const g=a(e)&&a(t);for(const r of f){const i=u(e,r),o=u(t,r);let s;if((g||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(n&&n[r]&&"function"==typeof n[r])s=n[r]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&c(i)===c(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=y?y.diff[r]=s:y={type:"partial",diff:{[r]:s}})}}return y}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},85334(e,t,n){n.d(t,{$:()=>m,IB:()=>s,Iy:()=>v,N2:()=>b,RH:()=>w,ZD:()=>M});var r=n(68197),i=n(4576),o=n(4718);function s(e){return"r"in e&&"g"in e&&"b"in e}function a(e){return"h"in e&&"s"in e&&"v"in e}function l(e){return"l"in e&&"a"in e&&"b"in e}function u(e){return"l"in e&&"c"in e&&"h"in e}n(34727),n(78955),n(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],p=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function d(e,t){const n=[];let r,i;if(e[0].length!==t.length)throw new Error("dimensions do not match");const o=e.length,s=e[0].length;let a=0;for(r=0;r<o;r++){for(a=0,i=0;i<s;i++)a+=e[r][i]*t[i];n.push(a)}return n}function f(e){const t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),n=d(c,t);return{x:100*n[0],y:100*n[1],z:100*n[2]}}function h(e){const t=d(p,[e.x/100,e.y/100,e.z/100]).map(e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function y(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function g(e){const t=e.l,n=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*n[0],y:100*n[1],z:108.883*n[2]}}function m(e){return s(e)?e:u(e)?function(e){return h(g(function(e){const t=e.l,n=e.c,r=e.h;return{l:t,a:n*Math.cos(r),b:n*Math.sin(r)}}(e)))}(e):l(e)?function(e){return h(g(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?h(e):a(e)?function(e){const t=(e.h+360)%360/60,n=e.s/100,r=e.v/100*255,i=r*n,o=i*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:i,g:o,b:0};break;case 1:s={r:o,g:i,b:0};break;case 2:s={r:0,g:i,b:o};break;case 3:s={r:0,g:o,b:i};break;case 4:s={r:o,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:o};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+r-i),s.g=Math.round(s.g+r-i),s.b=Math.round(s.b+r-i),s}(e):e}function b(e){return a(e)?e:function(e){const t=e.r,n=e.g,r=e.b,i=Math.max(t,n,r),o=i-Math.min(t,n,r);let s=i,a=0===o?0:i===t?(n-r)/o%6:i===n?(r-t)/o+2:(t-n)/o+4,l=0===o?0:o/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(m(e))}function M(e){return l(e)?e:function(e){return y(f(e))}(m(e))}function w(e){return u(e)?e:function(e){return function(e){const t=e.l,n=e.a,r=e.b,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o=o>0?o:o+2*Math.PI,{l:t,c:i,h:o}}(y(f(e)))}(m(e))}function v(e,t,n={}){if(0===e.length||t<=0)return[];if(1===(e=e.map(e=>"string"==typeof e?new r.A(e):e)).length||1===t){const n=[],r=e[0];for(let e=0;e<t;e++)n.push(r.clone());return n}if(n.shuffle&&(e=(0,i.k4)((0,o.o8)(e),n.seed)),e.length>=t){const n=[],r=(e.length-1)/(t-1);for(let i=0;i<t;i++){const t=Math.round(i*r);n.push(e[t].clone())}return n}return function(e,t,n={}){const r=[],o=e.length-1,s=Math.ceil((t-e.length)/o);e:for(let i=0;i<o;i++){const o=e[i],a=e[i+1];for(let i=1;i<=s;i++){const l=i/(s+1);if(r.push(F(o,a,l,n)),r.length+e.length===t)break e}}return[...e.map(e=>e.clone()),...(0,i.k4)(r,n.seed??1)]}(e,t,n)}const I=(e,t)=>{const n=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+n))};function F(e,t,n,o={}){const s=e.r,a=e.g,l=e.b,u=t.r,c=t.g,p=t.b,d=Math.round(s+(u-s)*n),f=Math.round(a+(c-a)*n),h=Math.round(l+(p-l)*n);if(!o.offset)return new r.A([d,f,h]);const y=(0,i.Mo)(o.seed);return new r.A([I(d,y),I(f,y),I(h,y)])}},9093(e,t,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(e,t,n,r,i,o,s,a,l,u,c,p,d,f,h,y){return[e,t,n,r,i,o,s,a,l,u,c,p,d,f,h,y]}},Symbol.toStringTag,{value:"Module"}))},35522(e,t,n){n.d(t,{$A:()=>T,Bw:()=>o,C:()=>s,Cc:()=>x,DI:()=>I,Il:()=>z,Io:()=>b,Ln:()=>m,Om:()=>C,Qr:()=>p,Re:()=>u,S8:()=>F,T9:()=>y,WQ:()=>l,Z0:()=>A,_S:()=>f,aI:()=>P,ei:()=>j,fw:()=>O,g7:()=>Z,gL:()=>S,hG:()=>M,hZ:()=>a,hs:()=>g,jb:()=>L,jk:()=>h,lo:()=>U,lw:()=>c,m3:()=>w,oW:()=>k,t2:()=>R,tn:()=>d,uE:()=>D,xg:()=>$,ze:()=>v});var r=n(51850),i=n(34304);function o(e){const t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function c(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function p(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function f(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function h(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function y(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function g(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function m(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function b(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function M(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function w(e){const t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function v(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function I(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function F(e,t){const n=t[0],r=t[1],i=t[2];let o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}function C(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function T(e,t,n){const r=t[0],i=t[1],o=t[2],s=n[0],a=n[1],l=n[2];return e[0]=i*l-o*a,e[1]=o*s-r*l,e[2]=r*a-i*s,e}function x(e,t,n,r){const i=t[0],o=t[1],s=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=s+r*(n[2]-s),e}function A(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12],e[1]=n[1]*r+n[5]*i+n[9]*o+n[13],e[2]=n[2]*r+n[6]*i+n[10]*o+n[14],e}function j(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function S(e,t,n){return O(e,t,n[0],n[1],n[2],n[3])}function O(e,t,n,r,i,o){const s=t[0],a=t[1],l=t[2],u=r*l-i*a,c=i*s-n*l,p=n*a-r*s,d=r*p-i*c,f=i*u-n*p,h=n*c-r*u,y=2*o;return e[0]=s+u*y+2*d,e[1]=a+c*y+2*f,e[2]=l+p*y+2*h,e}function Z(e,t){F(_,e),F(E,t);const n=C(_,E);return n>1?0:n<-1?Math.PI:Math.acos(n)}const _=(0,r.vt)(),E=(0,r.vt)();function R(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function P(e,t){if(e===t)return!0;const n=e[0],r=e[1],o=e[2],s=t[0],a=t[1],l=t[2],u=(0,i.FD)();return Math.abs(n-s)<=u*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(o-l)<=u*Math.max(1,Math.abs(o),Math.abs(l))}function k(e,t,n){const r=n[0]-t[0],i=n[1]-t[1],o=n[2]-t[2];let s=r*r+i*i+o*o;return s>0?(s=1/Math.sqrt(s),e[0]=r*s,e[1]=i*s,e[2]=o*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const L=u,q=c,N=p,$=b,U=M,z=o,D=w;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:Z,bezier:function(e,t,n,r,i,o){const s=1-o,a=s*s,l=o*o,u=a*s,c=3*o*a,p=3*l*s,d=l*o;return e[0]=t[0]*u+n[0]*c+r[0]*p+i[0]*d,e[1]=t[1]*u+n[1]*c+r[1]*p+i[1]*d,e[2]=t[2]*u+n[2]*c+r[2]*p+i[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:s,cross:T,crossAndNormalize:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=n[0],a=n[1],l=n[2],u=i*l-o*a,c=o*s-r*l,p=r*a-i*s,d=Math.sqrt(u*u+c*c+p*p);return e[0]=u/d,e[1]=c/d,e[2]=p/d,e},direction:k,dist:$,distance:b,div:N,divide:p,dot:C,equals:P,exactEquals:R,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,i,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,u=s*(o-1),c=s*(3-2*o);return e[0]=t[0]*a+n[0]*l+r[0]*u+i[0]*c,e[1]=t[1]*a+n[1]*l+r[1]*u+i[1]*c,e[2]=t[2]*a+n[2]*l+r[2]*u+i[2]*c,e},inverse:I,len:z,length:o,lerp:x,max:y,min:h,mul:q,multiply:c,negate:v,normalize:F,random:function(e,t=1){const n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*t;return e[0]=Math.cos(r)*s,e[1]=Math.sin(r)*s,e[2]=o*t,e},rotateX:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateY:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateZ:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:m,set:a,sign:f,sqrDist:U,sqrLen:D,squaredDistance:M,squaredLength:w,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:L,subtract:u,transformMat3:j,transformMat4:A,transformQuat:S,transformQuatValues:O},Symbol.toStringTag,{value:"Module"}))},81583(e,t,n){n.d(t,{L:()=>a,g:()=>s});var r=n(60999),i=n(7762),o=n(92474);async function s(e,t){return await e.load(),a(e,t)}async function a(e,t){const n=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):i.A.isCollection(t)?t.forEach(e=>s(e)):(0,o.Zm)(t)&&n.push(t))};t(s);let a=null;if(await(0,r.Tj)(n,async e=>{const t=await(0,r.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)}),a)throw a.error;return e}},16494(e,t,n){n.d(t,{Nd:()=>a,W5:()=>s});var r=n(17632);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],s=new r.I({whiteList:i,onTagAttr:(e,t,n)=>{const r=`${t}="${n}"`;if(o.includes(t))return r},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new r.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},13069(e,t,n){n.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},159(e,t,n){n.d(t,{A:()=>u});var r,i=n(5482),o=n(69540),s=n(25482),a=n(91429),l=n(99157);let u=r=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new r;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,i.Cg)([(0,a.MZ)({type:[l.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=r=(0,i.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,n){n.d(t,{A:()=>l});var r,i=n(5482),o=n(69540),s=n(25482),a=n(91429);let l=r=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,a.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,n)=>{t[n]=!e}}})],l.prototype,"isInverse",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],l.prototype,"wkt",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],l.prototype,"wkid",void 0),l=r=(0,i.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],l)},9762(e,t,n){n.r(t),n.d(t,{projectBuffer:()=>i});var r=n(49208);function i(e,t,n,i,o,s,a=Math.floor(e.length/3)){const l=(0,r.jd)(t,o);if(null==l)return!1;if(l===r.pO){if(e===i&&n===s)return!0;const t=n+3*a;for(let r=n,o=s;r<t;r++,o++)i[o]=e[r]??0;return!0}const u=n+3*a;for(let t=n,r=s;t<u;t+=3,r+=3)l(e,t,i,r);return!0}},49208(e,t,n){n.d(t,{Tp:()=>p,jd:()=>c,pO:()=>f,w5:()=>u});var r=n(34727),i=n(86211),o=n(73941),s=n(79258),a=n(34403),l=n(21325);const u={2:{5:f,7:null,9:null,10:f,1:v,6:null,8:null,0:null,3:y,11:g,2:f,4:x},5:{5:f,7:null,9:null,10:f,1:v,6:null,8:null,0:null,3:y,11:g,2:f,4:x},7:{5:null,7:f,9:null,10:f,1:null,6:w,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:f,10:f,1:null,6:null,8:M,0:null,3:null,11:null,2:null,4:null},3:{5:h,7:null,9:null,10:h,1:function(e,t,n,r){const i=e[t]/_,o=Z-2*Math.atan(Math.exp(-e[t+1]/_)),s=_+(e[t+2]??0),a=Math.cos(o)*s;n[r]=Math.cos(i)*a,n[r+1]=Math.sin(i)*a,n[r+2]=Math.sin(o)*s},6:null,8:null,0:null,3:f,11:function(e,t,n,r){h(e,t,n,r),g(n,r,n,r)},2:h,4:function(e,t,n,r){h(e,t,n,r),x(n,r,n,r)}},4:{5:A,7:null,9:null,10:A,1:function(e,t,n,r){A(e,t,n,r),v(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){A(e,t,n,r),y(n,r,n,r)},11:function(e,t,n,r){A(e,t,n,r),g(n,r,n,r)},2:A,4:f},1:{5:T,7:null,9:null,10:T,1:f,6:null,8:null,0:null,3:function(e,t,n,r){T(e,t,n,r),y(n,r,n,r)},11:function(e,t,n,r){T(e,t,n,r),g(n,r,n,r)},2:T,4:function(e,t,n,r){T(e,t,n,r),x(n,r,n,r)}},6:{5:null,7:C,9:null,10:C,1:null,6:f,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:F,10:F,1:null,6:null,8:f,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:f,3:null,11:null,2:null,4:null},10:{5:f,7:f,9:f,10:f,1:v,6:w,8:M,0:null,3:y,11:g,2:f,4:x},11:{5:m,7:null,9:null,10:m,1:function(e,t,n,r){m(e,t,n,r),v(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){m(e,t,n,r),y(n,r,n,r)},11:f,2:m,4:function(e,t,n,r){m(e,t,n,r),x(n,r,n,r)}}};function c(e,t){return p(e,t)?.projector}function p(e,t){if(null==e||null==t)return null;if(j.source.spatialReference===e&&j.dest.spatialReference===t)return j;const n=d(e,j.source),r=d(t,j.dest);return 0===n&&0===r?(0,l.aI)(e,t)?j.projector=f:j.projector=null:j.projector=u[n][r],j}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,o.jA)(e)?t.spatialReferenceId=1:(0,l.oT)(e)?t.spatialReferenceId=2:(0,l.K8)(e)?t.spatialReferenceId=3:(0,l.r1)(e)?t.spatialReferenceId=11:e.wkt===o.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===o.FY.wkt?t.spatialReferenceId=6:e.wkt===o.LJ.wkt?t.spatialReferenceId=8:(0,o.q8)(e)?t.spatialReferenceId=7:(0,o.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function f(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t]??0)}function h(e,t,n,r){n[r]=O*(e[t]/_),n[r+1]=O*(Z-2*Math.atan(Math.exp(-e[t+1]/_))),n[r+2]=e[t+2]??0}function y(e,t,n,i){!function(e,t,n,i,o){const s=.4999999*Math.PI,a=(0,r.qE)(S*e[t+1],-s,s),l=Math.sin(a);n[i++]=S*e[t]*o.radius,n[i++]=o.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[i]=e[t+2]??0}(e,t,n,i,s.$O)}function g(e,t,n,r){n[r]=e[t]*E,n[r+1]=e[t+1]*E,n[r+2]=e[t+2]??0}function m(e,t,n,r){n[r]=e[t]*R,n[r+1]=e[t+1]*R,n[r+2]=e[t+2]??0}function b(e,t,n,r,i){const o=i+(e[t+2]??0),s=S*e[t],a=S*e[t+1],l=Math.cos(a)*o;n[r]=Math.cos(s)*l,n[r+1]=Math.sin(s)*l,n[r+2]=Math.sin(a)*o}function M(e,t,n,r){b(e,t,n,r,s.Sw.radius)}function w(e,t,n,r){b(e,t,n,r,s.sH.radius)}function v(e,t,n,r){b(e,t,n,r,s.$O.radius)}function I(e,t,n,i,o){const s=e[t],a=e[t+1],l=e[t+2]??0,u=Math.sqrt(s*s+a*a+l*l),c=(0,r.YN)(l/(0===u?1:u)),p=Math.atan2(a,s);n[i++]=O*p,n[i++]=O*c,n[i]=u-o}function F(e,t,n,r){I(e,t,n,r,s.Sw.radius)}function C(e,t,n,r){I(e,t,n,r,s.sH.radius)}function T(e,t,n,r){I(e,t,n,r,s.$O.radius)}function x(e,t,n,r){!function(e,t,n,r,i){const o=S*e[t],s=S*e[t+1],a=e[t+2]??0,l=Math.sin(s),u=Math.cos(s),c=i.radius/Math.sqrt(1-i.eccentricitySquared*l*l);n[r++]=(c+a)*u*Math.cos(o),n[r++]=(c+a)*u*Math.sin(o),n[r++]=(c*(1-i.eccentricitySquared)+a)*l}(e,t,n,r,s.$O)}function A(e,t,n,r){const i=a.TP,o=e[t],l=e[t+1],u=e[t+2]??0;let c,p,d,f,h,y,g,m,b,M,w,v,I,F,C,T,x,A,j,S,Z;c=Math.abs(u),p=o*o+l*l,d=Math.sqrt(p),f=p+u*u,h=Math.sqrt(f),S=Math.atan2(l,o),y=u*u/f,g=p/f,F=i.a2/h,C=i.a3-i.a4/h,g>.3?(m=c/h*(1+g*(i.a1+F+y*C)/h),j=Math.asin(m),M=m*m,b=Math.sqrt(1-M)):(b=d/h*(1-y*(i.a5-F-g*C)/h),j=Math.acos(b),M=1-b*b,m=Math.sqrt(M)),w=1-s.$O.eccentricitySquared*M,v=s.$O.radius/Math.sqrt(w),I=i.a6*v,F=d-v*b,C=c-I*m,x=b*F+m*C,T=b*C-m*F,A=T/(I/w+x),j+=A,Z=x+T*A/2,u<0&&(j=-j),n[r++]=O*S,n[r++]=O*j,n[r]=Z}const j={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:f},S=(0,r.kU)(1),O=(0,r.KJ)(1),Z=.5*Math.PI,_=s.$O.radius,E=_*Math.PI/180,R=180/(_*Math.PI)},91218(e,t,n){n.r(t),n.d(t,{canProjectWithoutEngine:()=>K,initializeProjection:()=>B,isEqualBaseGCS:()=>H,isLoaded:()=>_,isLoadedOrLoad:()=>E,isLoadedOrLoadFor:()=>R,load:()=>k,project:()=>L,projectAsync:()=>V,projectExtent:()=>ie,projectMany:()=>q,projectMultipoint:()=>W,projectOrLoad:()=>$,projectOrLoadMany:()=>U,projectPoint:()=>Q,projectPolygon:()=>ne,projectPolyline:()=>ee,projectWithoutEngine:()=>J,requiresLoad:()=>P,test:()=>G,tryProject:()=>N,unload:()=>D});var r=n(49186),i=n(17676),o=n(62788),s=n(95488),a=n(51850),l=n(21276),u=n(73941),c=n(5443),p=n(91075),d=n(48526),f=n(86738),h=n(39829),y=n(82799),g=n(16930),m=n(98764),b=n(159),M=n(9762),w=n(49208);function v(e,t,n,r,i,o){return I[0]=e,I[1]=t,I[2]=n,(0,M.projectBuffer)(I,r,0,i,o,0)}const I=(0,a.vt)();var F=n(60408),C=n(21325),T=n(52006);let x=null,A=null,j=null,S=null,O={};const Z=new s.I;function _(){return!!(A?.isLoaded()&&j?.isLoaded()&&S?.isLoaded())}function E(){return!!_()||((0,o.gc)(Z),k(),!1)}function R(e,t){return!e||!t||K(e,t)||E()}function P(e,t){return!K(e,t)&&!_()}async function k(e){null==x&&(x=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(A=e,A.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(j=e,j.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(S=e,S.load()))])),await x,(0,i.Te)(e),Z.notify()}function L(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),q(e,e[0].spatialReference,t,n)):((0,l.f)(e),q([e],e.spatialReference,t,n)[0])}function q(e,t,n,r){if(null==t||null==n)return e;if(K(t,n,r))return e.map(e=>J(e,t,n));if(null==r?.geographicTransformation&&(0,u.jA)(t))return q(e.map(e=>J(e,t,g.A.WGS84)),g.A.WGS84,n,{zConversionDisabled:r?.zConversionDisabled});if(null==r?.geographicTransformation&&(0,u.jA)(n))return q(e,t,g.A.WGS84).map(e=>J(e,g.A.WGS84,n));if(!_())throw new z;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:S.getTransformation(t,n,r.areaOfInterestExtent)||new b.A};else if(!r?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let i=O[e];i||(i=S.getTransformation(t,n)||new b.A,O[e]=i),r={geographicTransformation:i,zConversionDisabled:r?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?A.executeMany(e,n,r):j.executeMany(e,n,r)}function N(e,t,n){try{return L(e,t,n)}catch(e){return null}}function $(e,t){const n=U([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function U(e,t,n){if(!_())for(const n of e)if(null!=n&&!(0,C.aI)(n.spatialReference,t)&&(0,C.fn)(n.spatialReference)&&(0,C.fn)(t)&&!K(n.spatialReference,t))return(0,o.gc)(Z),{pending:k(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,C.aI)(e.spatialReference,t)?e:(0,C.fn)(e.spatialReference)&&(0,C.fn)(t)?L(e,t,n):null)}}class z extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){x=null,A=null,j=null,S=null,O={}}const G={get loadPromise(){return x}};async function V(e,t,n){if((0,i.Te)(n),!e)return e;const r=U(Array.isArray(e)?e:[e],t,n);if(r.pending)return await r.pending,(0,i.Te)(n),V(e,t,n);const o=r.geometries??[];return Array.isArray(e)?o:o[0]}function K(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,C.aI)(e,t)||(0,C.fn)(e)&&(0,C.fn)(t)&&!!(0,w.jd)(e,t))}function H(e,t){if((0,C.aI)(e,t))return!0;if(!(0,C.fn)(e)||!(0,C.fn)(t))return!1;const n=(0,C.oT)(e)||(0,C.K8)(e)||(0,C.x1)(e),r=(0,C.oT)(t)||(0,C.K8)(t)||(0,C.x1)(t);return n&&r}async function B(e,t,n,r){if(_())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:n,options:i}of e)if(t&&n&&!K(t,n,i))return k(r)}else if(e&&t&&!K(e,t,n))return k(r);return(0,i.NO)(r)}function J(e,t,n){return e?(0,F.fT)(e)?Y(e,t,new f.A,n,0):(0,F.ZC)(e)?oe(e,t,new c.A,n,0):(0,F.Bi)(e)?re(e,t,new h.A,n,0):(0,F.Rg)(e)?te(e,t,new y.A,n,0):(0,F.U9)(e)?X(e,t,new d.A,n,0):null:null}function Q(e,t,n=t.spatialReference,r=0){return null!=n&&null!=e.spatialReference&&null!=Y(e,e.spatialReference,t,n,r)}function Y(e,t,n,r,i){ue[0]=e.x,ue[1]=e.y;const o=e.z;return ue[2]=void 0!==o?o:i,(0,M.projectBuffer)(ue,t,0,ue,r,0)?(n.x=ue[0],n.y=ue[1],n.spatialReference=r,void 0!==o||(0,u.xP)(r)?(n.z=ue[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function W(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=X(e,e.spatialReference,t,n,r)}function X(e,t,n,r,i){const{points:o,hasZ:s,hasM:a}=e,l=[],u=o.length,c=[];for(const e of o)c.push(e[0],e[1],s?e[2]:i);if(!(0,M.projectBuffer)(c,t,0,c,r,0,u))return null;const p=le(s,r);for(let e=0;e<u;++e){const t=3*e,n=c[t],r=c[t+1];p&&a?l.push([n,r,c[t+2],o[e][3]]):p?l.push([n,r,c[t+2]]):a?l.push([n,r,o[e][2]]):l.push([n,r])}return n.points=l,n.spatialReference=r,n.hasZ=s,n.hasM=a,n}function ee(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,r)}function te(e,t,n,r,i){const{curvePaths:o,paths:s,hasZ:a,hasM:l}=e;if(!(o?ae(o,a??!1,l??!1,t,n.curvePaths=[],r,i):se(s,a??!1,l??!1,t,n.paths,r,i)))return null;const u=le(a,r);return n.spatialReference=r,n.hasZ=u,n.hasM=l,n}function ne(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=re(e,e.spatialReference,t,n,r)}function re(e,t,n,r,i){const{curveRings:o,rings:s,hasZ:a,hasM:l}=e;return(o?ae(o,a??!1,l??!1,t,n.curveRings=[],r,i):se(s,a??!1,l??!1,t,n.rings,r,i))?(n.spatialReference=r,n.hasZ=le(a,r),n.hasM=l,n):null}function ie(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=oe(e,e.spatialReference,t,n,r)}function oe(e,t,n,r,i){const{xmin:o,ymin:s,xmax:a,ymax:l,hasZ:u,hasM:c}=e;if(!v(o,s,u?e.zmin:i,t,ue,r))return null;const p=le(u,r);return n.xmin=ue[0],n.ymin=ue[1],p&&(n.zmin=ue[2]),v(a,l,u?e.zmax:i,t,ue,r)?(n.xmax=ue[0],n.ymax=ue[1],p&&(n.zmax=ue[2]),c&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null}function se(e,t,n,r,i,o,s=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:s);if(!(0,M.projectBuffer)(a,r,0,a,o,0))return!1;let l=0;i.length=0;const u=t?3:2,c=le(t,o);for(const t of e){const e=new Array;for(const r of t){const t=a.slice(l,l+=3);c||t.pop(),n&&t.push(r[u]),e.push(t)}i.push(e)}return!0}function ae(e,t,n,r,i,o,s=0){const a=new Array;for(const n of e)for(const e of n){if((0,T.FG)(e))return!1;if((0,T.aO)(e)){const[n,r]=e.c;a.push(n[0],n[1],t?n[2]:s,r[0],r[1],s);continue}if((0,T.n1)(e)){const[n,r,i]=e.b;a.push(n[0],n[1],t?n[2]:s,r[0],r[1],s,i[0],i[1],s);continue}const n=e;a.push(n[0],n[1],t?n[2]:s)}if(!(0,M.projectBuffer)(a,r,0,a,o,0))return!1;let l=0;i.length=0;const u=t?3:2,c=le(t,o);for(const t of e){const e=new Array;for(const r of t){const t=a.slice(l,l+=3);if(c||t.pop(),n&&t.push((0,T.yP)(r)[u]),(0,T.FG)(r))return!1;if((0,T.aO)(r)){const n=a[l++],r=a[l++];++l,e.push({c:[t,[n,r]]});continue}if((0,T.n1)(r)){const n=a[l++],r=a[l++];++l;const i=a[l++],o=a[l++];++l,e.push({b:[t,[n,r],[i,o]]});continue}e.push(t)}i.push(e)}return!0}function le(e,t){return e||(0,u.xP)(t)||(0,C.aI)(t,m.Y0)}const ue=(0,a.vt)()},98764(e,t,n){n.d(t,{GD:()=>s,Y0:()=>u,lO:()=>c});var r=n(73941),i=n(16930),o=n(21325);const s=new i.A(r.fv),a=new i.A(r.FY),l=new i.A(r.LJ),u=new i.A(r.Ro);function c(e){const t=p.get(e);if(t)return t;let n=s;if(e)if(e===a)n=a;else if(e===l)n=l;else{const t=e.wkid,r=e.latestWkid;if(null!=t||null!=r)(0,o.tl)(t)||(0,o.tl)(r)?n=a:((0,o.ZL)(t)||(0,o.ZL)(r))&&(n=l);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===d?n=a:e===f&&(n=l)}}}return p.set(e,n),n}const p=new Map,d=a.wkt.toUpperCase(),f=l.wkt.toUpperCase()},4197(e,t,n){n.d(t,{Vj:()=>l,cj:()=>a,jh:()=>o,l5:()=>s});var r=n(34275),i=n(9093);function o(e){return e<=r.y9?new Array(e).fill(0):new Float64Array(e)}function s(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function a(e){return[...e]}function l(e){const t=(0,i.vt)();for(let n=0;n<16;++n)t[n]=e[n];return t}},70328(e,t,n){n.d(t,{BI:()=>M,DC:()=>p,Ej:()=>f,Ie:()=>m,Jt:()=>b,Ne:()=>h,RF:()=>c,aI:()=>v,fA:()=>s,gE:()=>l,hZ:()=>g,iT:()=>d,is:()=>w,qv:()=>I,vI:()=>y,vY:()=>a,v_:()=>F,vt:()=>o,w1:()=>u}),n(35522);var r=n(5443),i=(n(19419),n(4197));function o(e=F){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,n,r,i,s,a=o()){return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=i,a[5]=s,a}function a(e,t=o()){return function(e,t,n,r=o()){return g(r,I),function(e,t,n=0,r=t.length/3){let i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)i=Math.min(i,t[n+3*e]),o=Math.min(o,t[n+3*e+1]),s=Math.min(s,t[n+3*e+2]),a=Math.max(a,t[n+3*e]),l=Math.max(l,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(r,e,t,n),r}(e,0,e.length/3,t)}function l(e,t=(0,i.jh)(24)){const[n,r,o,s,a,l]=e;return t[0]=n,t[1]=r,t[2]=o,t[3]=n,t[4]=r,t[5]=l,t[6]=n,t[7]=a,t[8]=o,t[9]=n,t[10]=a,t[11]=l,t[12]=s,t[13]=r,t[14]=o,t[15]=s,t[16]=r,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function y(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?g(e,I):o(I)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function M(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function v(e,t,n){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const I=[1/0,1/0,1/0,-1/0,-1/0,-1/0],F=[0,0,0,0,0,0];o()},34403(e,t,n){n.d(t,{TP:()=>s});var r=n(79258);Math.PI;const i=r.$O.radius,o=r.$O.eccentricitySquared,s={a1:i*o,a2:i*o*i*o,a3:i*o*o/2,a4:i*o*i*o*2.5,a5:i*o+i*o*o/2,a6:1-o};r.$O.radius,r.$O.flattening,r.Sw.radius,r.Sw.flattening,r.sH.radius,r.sH.flattening,r.sH.radius},55156(e,t,n){n.d(t,{I:()=>i,e:()=>r});const r=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&r in t?e[r]:void 0;var t}},97483(e,t,n){n.r(t),n.d(t,{default:()=>Ue});var r=n(5482),i=n(69540),o=n(7762),s=n(49186),a=n(81583),l=n(91869),u=n(25728),c=n(17676),p=n(36708),d=n(39516),f=n(91429),h=n(4146),y=n(52136),g=n(18768),m=n(63074),b=n(69208),M=n(6455),w=n(47685),v=n(10086),I=n(34287),F=n(8303),C=n(54310),T=n(25036),x=n(82935),A=n(60694),j=n(10873),S=n(15426),O=n(17036),Z=n(30524),_=n(85334),E=n(90360),R=n(86162),P=n(92438),k=n(96576),L=n(93618),q=n(62046),N=n(37531);const $={key:"type",base:P.A,errorContext:"renderer",typeMap:{simple:k.A,"unique-value":L.A,"class-breaks":R.A}},U=(0,E.C)({types:$}),z=["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"];var D=n(37838),G=n(4902),V=n(4718),K=n(92474),H=n(53966),B=n(97768),J=n(93637),Q=n(89317),Y=n(78247),W=n(16930),X=n(55156),ee=n(60950),te=n(89808),ne=n(99959);const re=Symbol("isSubtypeGroupGraphicOriginSymbol");var ie;class oe extends ne.A{get[(ie=re,ee.ym)](){return this.sublayer}get[X.e](){return this.sublayer}get[te.Q](){return this.layer}constructor(e){super(),this[ie]=!0,this.type="subtype-group",this.sublayer=e}get layer(){return this.sublayer.parent}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var se=n(29005),ae=n(30279),le=n(16194),ue=n(46499),ce=n(39383),pe=n(17311),de=n(54546),fe=n(61956),he=n(30291),ye=n(59868),ge=n(43440),me=n(43937),be=n(36005);const Me=(0,O.p)();let we=0;function ve(e,t){let n=e.json.write;return"object"!=typeof n&&(n=e.json.write={}),n.ignoreOrigin=!0,t?.spatialOnly&&(n.layerContainerTypes=Q.K),e}function Ie(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=Q.K),e?.target&&(t.write.target=e.target)),t}function Fe(e){switch(e){case"point":case"multipoint":return ye.UK.clone();case"polyline":return ye.A7.clone();case"polygon":case"multipatch":return ye.Cx.clone();default:return null}}function Ce(e){return xe(e,"user")===e}function Te(e){return xe(e,"service")}function xe(e,t){const n=e.parent?.getAtOrigin("sublayers",t);return n?.find(({subtypeCode:t})=>t===e.subtypeCode)}function Ae(e,t){return null==e?null:t.subtypes?.find(t=>t.code===e)}function je(e,t){let n=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":n="point";break;case"esriGeometryPolyline":n="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":n="polygon";break;default:t.type,n=null}const r={},i=Ae(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)r[t]=e[t]}return r[t.subtypeField]=e,new se.A({name:"New Feature",drawingTool:n,prototype:{attributes:r}})}let Se=class extends((0,u.M)((0,i.OU)((0,G.s)(K.x_)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.graphicOrigin=new oe(this),this.id=`${Date.now().toString(16)}-subtype-sublayer-${we++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.visible=!0}load(e){return(0,Z.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,B.pR)(e),new pe.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,displayField:this.parent?.displayField??"",fields:this.fields,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}get featureTitleFields(){return[...this._titleCreator.requiredFields]}set fieldConfigurations(e){if(this._override("fieldConfigurations",e),!this.parent?.loaded)return;const t=(0,le.sS)(this,e);t&&this._set("popupTemplate",t)}get fieldConfigurations(){return this._isOverridden("fieldConfigurations")?this._get("fieldConfigurations"):(0,le.QX)(this)||null}writeFieldOverrides(e,t,n){const{fields:r,parent:i}=this;let o;if(r){o=[];let e=0;r.forEach(({name:t,alias:n,editable:r,visible:s})=>{if(!s)return;const a=i?.fields?.find(e=>e.name===t);if(!a)return;const l={name:t};let u=!1;n!==a.alias&&(l.alias=n,u=!0),r!==a.editable&&(l.editable=r,u=!0),o.push(l),u&&e++}),0===e&&o.length===r.length&&(o=null)}else o=(0,V.o8)(e);o?.length&&(0,J.sM)(n,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:n}=this,r=e?.fields;if(!e||!r?.length)return null;const{subtypes:i,subtypeField:o}=e,s=i?.find(e=>e.code===n),a=s?.defaultValues,l=s?.domains,u=[];for(const e of r){const r=e.clone(),{name:i}=r,s=t?.find(e=>e.name===i);if(r.visible=!t?.length||!!s,s){const{alias:e,editable:t}=s;e&&(r.alias=e),!1===t&&(r.editable=!1)}const c=a?.[i]??null;r.defaultValue=i===o?n:c;const p=l?.[i]??null;r.domain=i===o?null:p?"inherited"===p.type?r.domain:p.clone():null,u.push(r)}return u}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(H.A.getLogger(this).error(_e("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||H.A.getLogger(this).error(_e("objectIdField")),this.parent?.objectIdField}writePopupTemplate(e,t,n,r){e&&(t[n]=e.toJSON({...r,writeFieldFormat:!0}))}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,Z.yp)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?(Ce(this)?(0,V.o8)(Te(this)?.renderer):null)??function(e){return new k.A({symbol:Fe(e)})}(e.geometryType):null}readRendererFromService(e,t,n){if("Table"===t.type)return null;const r=t.drawingInfo?.renderer,i=U(r,t,n);let o;const{subtypeCode:s}=this;if(null!=s&&function(e,t){return!(!t||"unique-value"!==e?.type||null==e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find(({value:e})=>(e="number"==typeof e?String(e):e)===String(s));e&&(o=new k.A({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,n){const r=t?.layerDefinition?.drawingInfo?.renderer;if(r)return U(r,t,n)||void 0}get spatialReference(){return this.parent?.spatialReference??W.A.WGS84}get subtypeField(){return this.parent?.subtypeField}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,V.o8)(Ce(this)?Te(this)?.templates:xe(this,"portal-item")?.templates||Te(this)?.templates)}set templates(e){this._override("templates",e)}readTemplatesFromService(e,t){return[je(this.subtypeCode,t)]}get title(){if(this._isOverridden("title"))return this._get("title");const e=Ce(this)?Te(this):null;return e?.title}set title(e){this._override("title",e)}readTitleFromService(e,t){const n=Ae(this.subtypeCode,t);return null!=n?n.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:n}=this;if(!n)throw _e("addAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return n.addAttachment(e,t)}async updateAttachment(e,t,n){const{parent:r}=this;if(!r)throw _e("updateAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return r.updateAttachment(e,t,n)}async deleteAttachments(e,t){const{parent:n}=this;if(!n)throw _e("deleteAttachments");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return n.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw _e("applyEdits");return this.parent.applyEdits(e,t)}createFieldConfigurations(){return(0,le.xY)(this)}createPopupTemplate(e){let t=this;const{parent:n,fields:r,title:i}=this;if(n){const{displayField:e,editFieldsInfo:o,objectIdField:s}=n;t={displayField:e,editFieldsInfo:o,fields:r,objectIdField:s,title:i}}return(0,he.tn)(t,e)}createQuery(){if(!this.parent)throw _e("createQuery");const e=(0,S.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d.mA)(t,this.parent.definitionExpression),e}getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getField(e){return this.fieldsIndex.get(e)}getFieldAlias(e){const t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=(0,S.pc)(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const n=await this.load();if(!n.parent)throw _e("queryAttachments");const r=e instanceof de.A?e.clone():new de.A(e);return r.where=Ze(r.where,n.parent.subtypeField,n.subtypeCode),n.parent.queryAttachments(r,t)}async queryFeatureCount(e,t){const n=await this.load();if(!n.parent)throw _e("queryFeatureCount");return n.parent.queryFeatureCount(Oe(n.parent,n,e),t)}async queryFeatures(e,t){const n=await this.load();if(!n.parent)throw _e("queryFeatures");return n.parent.queryFeatures(Oe(n.parent,n,e),t)}async queryObjectIds(e,t){const n=await this.load();if(!n.parent)throw _e("queryObjectIds");return n.parent.queryObjectIds(Oe(n.parent,n,e),t)}async queryRelatedFeatures(e,t){const n=await this.load();if(!n.parent)throw _e("queryRelatedFeatures");return n.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const n=await this.load();if(!n.parent)throw _e("queryRelatedFeaturesCount");return n.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,r.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],Se.prototype,"_titleCreator",null),(0,r.Cg)([(0,f.MZ)({type:ge.A,json:Ie({name:"attributeTableInfo"})})],Se.prototype,"attributeTableTemplate",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"capabilities",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"effectiveCapabilities",null),(0,r.Cg)([(0,f.MZ)({json:Ie()})],Se.prototype,"charts",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0,json:Ie({name:"enableEditing"})})],Se.prototype,"editingEnabled",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],Se.prototype,"effectiveEditingEnabled",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"elevationInfo",null),(0,r.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],Se.prototype,"featureTitleFields",null),(0,r.Cg)([(0,f.MZ)({type:[ae.A],json:{name:"layerDefinition.fieldConfigurations",write:{ignoreOrigin:!0}}})],Se.prototype,"fieldConfigurations",null),(0,r.Cg)([(0,f.MZ)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],Se.prototype,"fieldOverrides",void 0),(0,r.Cg)([(0,me.K)("fieldOverrides")],Se.prototype,"writeFieldOverrides",null),(0,r.Cg)([(0,f.MZ)({...Me.fields,readOnly:!0,json:{read:!1}})],Se.prototype,"fields",null),(0,r.Cg)([(0,f.MZ)(Me.fieldsIndex)],Se.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"floorInfo",null),(0,r.Cg)([(0,f.MZ)({type:Y.A,json:Ie({name:"formInfo"})})],Se.prototype,"formTemplate",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],Se.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,f.MZ)({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],Se.prototype,"id",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"isTable",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"geometryType",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"globalIdField",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"type",void 0),(0,r.Cg)([(0,f.MZ)(ve((0,V.o8)(j.kF)))],Se.prototype,"labelsVisible",void 0),(0,r.Cg)([(0,f.MZ)({type:[ue.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:ce.w},write:{ignoreOrigin:!0,layerContainerTypes:Q.K}}})],Se.prototype,"labelingInfo",void 0),(0,r.Cg)([(0,f.MZ)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:Q.K}}})],Se.prototype,"layerType",void 0),(0,r.Cg)([(0,f.MZ)(ve((0,V.o8)(j.fV)))],Se.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,f.MZ)({type:["show","hide"]})],Se.prototype,"listMode",void 0),(0,r.Cg)([(0,f.MZ)((()=>{const e=(0,V.o8)(j.hn);return e.json.origins.service.read=!1,ve(e,{spatialOnly:!0})})())],Se.prototype,"minScale",void 0),(0,r.Cg)([(0,f.MZ)((()=>{const e=(0,V.o8)(j.hG);return e.json.origins.service.read=!1,ve(e,{spatialOnly:!0})})())],Se.prototype,"maxScale",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Se.prototype,"effectiveScaleRange",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"objectIdField",null),(0,r.Cg)([(0,f.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:Ie({spatialOnly:!0})})],Se.prototype,"opacity",void 0),(0,r.Cg)([(0,f.MZ)({clonable:!1})],Se.prototype,"parent",void 0),(0,r.Cg)([(0,f.MZ)(ve((0,V.o8)(j.M6)))],Se.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,f.MZ)({type:D.A,json:Ie({name:"popupInfo"})})],Se.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,me.K)("popupTemplate")],Se.prototype,"writePopupTemplate",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Se.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"relationships",null),(0,r.Cg)([(0,f.MZ)({types:$,json:Ie({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],Se.prototype,"renderer",null),(0,r.Cg)([(0,be.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],Se.prototype,"readRendererFromService",null),(0,r.Cg)([(0,be.w)("renderer",["layerDefinition.drawingInfo.renderer"])],Se.prototype,"readRenderer",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"spatialReference",null),(0,r.Cg)([(0,f.MZ)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],Se.prototype,"subtypeCode",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"subtypeField",null),(0,r.Cg)([(0,f.MZ)({type:[se.A],json:Ie({name:"layerDefinition.templates"})})],Se.prototype,"templates",null),(0,r.Cg)([(0,be.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],Se.prototype,"readTemplatesFromService",null),(0,r.Cg)([(0,f.MZ)({type:String,json:Ie()})],Se.prototype,"title",null),(0,r.Cg)([(0,be.w)("service","title",["subtypes"])],Se.prototype,"readTitleFromService",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"url",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Se.prototype,"userHasUpdateItemPrivileges",null),(0,r.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0,json:Ie({name:"visibility",spatialOnly:!0})})],Se.prototype,"visible",void 0),Se=(0,r.Cg)([(0,f.$K)("esri.layers.support.SubtypeSublayer")],Se);const Oe=(e,t,n)=>{if(!n)return t.createQuery();const r=fe.A.from(n);return r.where=Ze(r.where,e.subtypeField,t.subtypeCode),r},Ze=(e,t,n)=>{const r=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${n}`,o=e??"";return r.test(o)?o.replace(r,i):(0,d.mA)(i,o)},_e=e=>new s.A("subtype-sublayer:parent-missing",`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`);var Ee=n(96184),Re=n(91908),Pe=n(54218),ke=n(59923);const Le="SubtypeGroupLayer";function qe(e,t){const n=[];for(const r of e){const e=new Se;e.read(r,t),n.push(e)}return n}const Ne=(0,O.p)();let $e=class extends((0,v.j)((0,M.FJ)((0,w.w6)((0,m.dM)((0,x.e)((0,T.j)((0,C.J)((0,g.b)((0,I.q)((0,F.A)((0,u.M)((0,b.d)((0,y.p)((0,i.OU)(h.A))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.A.ofType(Se)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,c.sg)(async(e,t,r)=>{const{save:i,saveAs:o}=await n.e(5740).then(n.bind(n,33359));switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}}),this.addHandles((0,p.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),p.OH))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,n=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(c.QP).then(async()=>{if(!this.url)throw new s.A("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s.A("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");this._initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,S.VA)(this,"load",e));return this.addResolvingPromise(n),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,S.C$)(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,A.yG)(this.url,t):t}async addAttachment(e,t){const n=await(0,S.Xl)(this,e,t,Le);return this.lastEditsEventDate=new Date,n}async updateAttachment(e,t,n){const r=await(0,S.bt)(this,e,t,n,Le);return this.lastEditsEventDate=new Date,r}async applyEdits(e,t){return(0,S.ct)(this,e,t)}async createGraphicsSource(e){const{default:t}=await(0,c.qr)(Promise.all([n.e(893),n.e(3636),n.e(9062)]).then(n.bind(n,65515)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,S.VZ)(this),t=this.sublayers.map(e=>e.subtypeCode);return e.where=(0,d.mA)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const n=await(0,S.mm)(this,e,t,Le);return this.lastEditsEventDate=new Date,n}async fetchRecomputedExtents(e){return(0,S.WP)(this,e,Le)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),n=e.attributes[t.name];return this.findSublayerForSubtypeCode(n)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=(0,S.pc)(this,e);if(t)return t}const n=(0,S.Nv)(this,t?.feature);if(n){const t=n.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}loadAll(){return(0,a.g)(this,e=>{e(this.sublayers)})}async queryAttachments(e,t){return(0,S.lV)(this,e,t,Le)}async queryFeatures(e,t){const n=await this.load(),r=fe.A.from(e)??n.createQuery(),i=r.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),r.outFields=i);const o=await n.source.queryFeatures(r,t);if(o?.features)for(const e of o.features){const t=this.findSublayerForFeature(e);e.origin=t?.graphicOrigin,e.layer=e.sourceLayer=this.findSublayerForFeature(e)}return o}async queryObjectIds(e,t){return(await(0,S.sg)(this,e,t,Le)).filter(Pe.Et)}async queryFeatureCount(e,t){return(0,S.Ye)(this,e,t,Le)}async queryExtent(e,t){return(0,S.B5)(this,e,t,Le)}async queryRelatedFeatures(e,t){return(0,S.hM)(this,e,t,Le)}async queryRelatedFeaturesCount(e,t){return(0,S.S2)(this,e,t,Le)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}write(e,t){const{origin:n,layerContainerType:r,messages:i}=t;if(this.isTable){if("web-scene"===n||"web-map"===n&&"tables"!==r)return(0,ke.U4)(t,this,"a table source cannot be written to web scenes and web maps"),null}else if(this.loaded&&"web-map"===n&&"tables"===r)return(0,ke.U4)(t,this,"a non-table source cannot be written to tables in web maps"),null;return this.sublayers?.length?super.write(e,t):(i?.push(new s.A("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,Re.D)(this,e)}async getFeatureTitle(e,t){const n=this.findSublayerForFeature(e);return n?await n.getFeatureTitle(e,t):this._getFeatureTitleForUnknownSublayer(e)}async getFeatureTitles(e,t){const n=new Map,r=new Map,i=[],o=[r];if(e.forEach(e=>{const o=this.findSublayerForFeature(e);if(o)(0,l.tE)(n,o,()=>[]).push(e);else{const n=e.getObjectId()??e.attributes[this.objectIdField];t?.fetchMissingFields?i.push(e):r.set(n,this._getFeatureTitleForUnknownSublayer(e))}}),i.length>0){const e=new Set(this.featureTitleFields);e.add(this.objectIdField),e.add(this.subtypeField);const t=await this.queryFeatures({outFields:[...e],returnGeometry:!1,objectIds:i.map(e=>e.getObjectId()??e.attributes[this.objectIdField])}),o=new Set;for(const e of t.features??[]){const t=e.getObjectId()??e.attributes[this.objectIdField];o.add(t);const i=this.findSublayerForFeature(e);i?(0,l.tE)(n,i,()=>[]).push(e):r.set(t,this._getFeatureTitleForUnknownSublayer(e))}for(const e of i){const t=e.getObjectId()??e.attributes[this.objectIdField];o.has(t)||r.set(t,this._getFeatureTitleForUnknownSublayer(e))}}const s=await Promise.all(Array.from(n).map(([e,n])=>e.getFeatureTitles(n,t)));s.forEach(e=>o.push(e));const a=new Map(o.flatMap(e=>[...e]));return r.forEach((e,t)=>{a.set(t,e)}),a}get featureTitleFields(){const e=new Set;for(const t of this.sublayers){const n=t.featureTitleFields;for(const t of n)e.add(t)}return[...e]}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s.A("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,Z.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,S.jp)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}_getFeatureTitleForUnknownSublayer(e){const{displayField:t,fieldsIndex:n,objectIdField:r}=this;if(t&&n.has(t))return e.attributes[n.get(t).name]??"";const i=e.getObjectId();return null!=i?i.toString():r&&n.has(r)?e.attributes[n.get(r).name]??"":""}};(0,r.Cg)([(0,f.MZ)({readOnly:!0})],$e.prototype,"createQueryVersion",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],$e.prototype,"editingEnabled",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],$e.prototype,"effectiveEditingEnabled",null),(0,r.Cg)([(0,f.MZ)({...Ne.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],$e.prototype,"fields",void 0),(0,r.Cg)([(0,f.MZ)(Ne.fieldsIndex)],$e.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,f.MZ)(j.id)],$e.prototype,"id",void 0),(0,r.Cg)([(0,f.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],$e.prototype,"listMode",void 0),(0,r.Cg)([(0,f.MZ)({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{"web-document":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}},"portal-item":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],$e.prototype,"operationalLayerType",null),(0,r.Cg)([(0,f.MZ)(Ne.outFields)],$e.prototype,"outFields",void 0),(0,r.Cg)([(0,f.MZ)({clonable:!1})],$e.prototype,"source",null),(0,r.Cg)([(0,f.MZ)({type:o.A.ofType(Se),json:{origins:{service:{read:{source:"subtypes",reader(e,t,n){let r=null;if(this.useUniqueColorsForSublayers){const i=function(e,t){const n=e.drawingInfo?.renderer,r=n?U(n,e,t):null;if("simple"===r?.type)return(0,N.Sx)(r.symbol,null)?r.symbol.clone():null}(t,n);r=i?function(e,t){return(0,_.Iy)(z,e,{offset:!0,shuffle:!0}).reverse().map(e=>{const n=t.clone();return"cim"===n.type?(0,q.Fe)(n,e):(0,N.dt)(n,e),new k.A({symbol:n})})}(e.length,i):null}const i=e.map(({code:e},i)=>{const o=new Se({subtypeCode:e});o.read(t,n);const s=r?.[i];return s&&o.read({drawingInfo:{renderer:s.toJSON()}},n),o});return new(o.A.ofType(Se))(i)}}}},read:{source:["layers","tables"],reader(e,t,n){let r;return"SubtypeGroupLayer"===t.layerType&&t.layers?.length?r=qe(t.layers,n):"SubtypeGroupTable"===t.layerType&&t.tables?.length&&(r=qe(t.tables,n)),new(o.A.ofType(Se))(r)}},write:{ignoreOrigin:!0,writer(e,t,n,r){const i=[];for(const t of e){const e=t.write({},r);i.push(e)}this.isTable?t.tables=i:t.layers=i}}}})],$e.prototype,"sublayers",void 0),(0,r.Cg)([(0,f.MZ)()],$e.prototype,"useUniqueColorsForSublayers",void 0),(0,r.Cg)([(0,f.MZ)({type:Ee.A})],$e.prototype,"timeInfo",void 0),(0,r.Cg)([(0,f.MZ)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],$e.prototype,"title",void 0),(0,r.Cg)([(0,be.w)("service","title",["name"])],$e.prototype,"readTitleFromService",null),(0,r.Cg)([(0,f.MZ)({json:{read:!1}})],$e.prototype,"type",void 0),(0,r.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],$e.prototype,"featureTitleFields",null),$e=(0,r.Cg)([(0,f.$K)("esri.layers.SubtypeGroupLayer")],$e);const Ue=$e},54339(e,t,n){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const n=[];for(const r of t.fieldNames)n.push(e.attributes[r]??null);return JSON.stringify(n)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const n=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(n)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}n.d(t,{W:()=>r,r:()=>i})},52136(e,t,n){n.d(t,{p:()=>o});var r=n(5482),i=n(91429);const o=e=>{const t=e;let n=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r.Cg)([(0,i.MZ)({type:String})],n.prototype,"apiKey",null),n=(0,r.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],n),n}},28032(e,t,n){n.d(t,{A:()=>l});var r=n(5482),i=n(69540),o=n(25482),s=n(91429),a=n(56400);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,r.Cg)([(0,s.MZ)()],l.prototype,"creatorField",void 0),(0,r.Cg)([(0,s.MZ)()],l.prototype,"creationDateField",void 0),(0,r.Cg)([(0,s.MZ)()],l.prototype,"editorField",void 0),(0,r.Cg)([(0,s.MZ)()],l.prototype,"editDateField",void 0),(0,r.Cg)([(0,s.MZ)()],l.prototype,"realm",void 0),(0,r.Cg)([(0,s.MZ)((0,a.P6)("dateFieldsTimeReference",!0))],l.prototype,"timeZone",void 0),l=(0,r.Cg)([(0,s.$K)("esri.layers.support.EditFieldsInfo")],l)},29005(e,t,n){n.d(t,{A:()=>u});var r=n(5482),i=n(69540),o=n(66552),s=n(25482),a=n(91429);const l=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],u.prototype,"drawingTool",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,r.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],u)},30279(e,t,n){n.d(t,{A:()=>u});var r=n(5482),i=n(69540),o=n(25482),s=n(10107),a=n(64108),l=n(62044);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.alias=null,this.name=void 0,this.fieldFormat=null}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"alias",void 0),(0,r.Cg)([(0,s.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],u.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({types:l.fg,json:{write:!0}})],u.prototype,"fieldFormat",void 0),u=(0,r.Cg)([(0,a.$)("esri.layers.support.FieldConfiguration")],u)},37352(e,t,n){n.d(t,{A:()=>l});var r,i=n(5482),o=n(7762),s=n(25482),a=n(91429);let l=r=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=r=(0,i.Cg)([(0,a.$K)("esri.layers.support.LayerFloorInfo")],l)},45067(e,t,n){n.d(t,{A:()=>c});var r=n(5482),i=n(69540),o=n(66552),s=n(25482),a=n(91429);const l=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let c=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,r.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],c.prototype,"cardinality",void 0),(0,r.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],c.prototype,"catalogId",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"composite",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"id",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyField",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyFieldInRelationshipTable",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"relatedTableId",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"relationshipTableId",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"role",void 0),c=(0,r.Cg)([(0,a.$K)("esri.layers.support.Relationship")],c)},17311(e,t,n){n.d(t,{A:()=>f});var r=n(5482),i=n(69622),o=n(4576),s=n(60999),a=n(7762),l=n(16494),u=n(91429),c=n(30524),p=n(43668);const d=/<br\s*\/*>/gi;let f=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)(()=>(0,p.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([n.e(4560),n.e(9301)]).then(n.bind(n,99301)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const n=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(n.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:n,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(n,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const n=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of n){const n=t.split("."),r=this.fieldsIndex.get(n.at(-1)??"");r&&e.add(r.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const n of t){const t=this.fieldsIndex.get(n);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,n){const r=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],n)).get(r)??""}async getTitles(e,t,n){const r=new Map,i=n?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);n?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:a}=this,u=a&&s;t.forEach(t=>{const c=t.getObjectId()??t.attributes[e.objectIdField];let p=u?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";n?.removeHTML&&(p=l.Nd.sanitize(p).replaceAll(d," ")),r.set(c,p)})}catch{}return r}async _checkAndReQueryGraphics(e,t){const n=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(o.Ru);if(n.length!==t.length)return t;if(t.some(e=>!(0,c.Kl)(e,this.requiredFields))){const r=e.createQuery();r.where="1=1",r.outFields=[...this.requiredFields],r.objectIds=n;const i=await e.queryFeatures(r);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const n of e){if(!n.fieldName)continue;const e=this.fieldsIndex.get(n.fieldName),r=e?.name??n.fieldName;n.fieldName=r,t.set(r.toLowerCase(),n)}return t}_createFormattedAttributes(e,t,n="system"){const r=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const n=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:n}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:r,attributes:o,graphic:t,timeZone:n,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"_arcadeTask",null),(0,r.Cg)([(0,u.MZ)()],f.prototype,"_featureUtils",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"featureUtilsPromise",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"calculatedExpressions",null),(0,r.Cg)([(0,u.MZ)()],f.prototype,"displayField",void 0),(0,r.Cg)([(0,u.MZ)()],f.prototype,"effectivePopupTemplate",void 0),(0,r.Cg)([(0,u.MZ)()],f.prototype,"expressionsUsedInTitle",null),(0,r.Cg)([(0,u.MZ)()],f.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,u.MZ)()],f.prototype,"fieldInfoMap",null),(0,r.Cg)([(0,u.MZ)()],f.prototype,"fields",void 0),(0,r.Cg)([(0,u.MZ)()],f.prototype,"objectIdField",void 0),(0,r.Cg)([(0,u.MZ)()],f.prototype,"requiredFields",null),f=(0,r.Cg)([(0,u.$K)("esri.layers.support.TitleCreator")],f)},41560(e,t,n){n.d(t,{Ch:()=>s,mW:()=>o});var r=n(34727),i=n(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,n){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:n,maxScale:r}of e.filters)t[0]=Math.max(t[0],c(n)),t[1]=Math.min(t[1],p(r));return t}(e);if(o&&((0,r.gg)(t,o[0])||(0,r.ZH)(n,o[1])))return"";const s=Array.from(a(e,t,n)),l=function(e,t,n){if(0===e.length)return!0;const i=c(e.at(0)?.minScale),o=p(e.at(-1)?.maxScale);if((0,r.ZH)(i,t)||(0,r.gg)(o,n))return!0;for(let t=0;t<e.length-1;t++){const n=e[t],i=e[t+1];if((0,r.ZH)(c(i.minScale),p(n.maxScale)))return!0}return!1}(s,t,n)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,n){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)l(r.minScale,r.maxScale,t,n)&&(yield r)}}function l(e,t,n,i){return e=c(e),n=c(n),t=p(t),!(!(0,r.Sp)(n,e)&&(i??n)>e||(0,r.Hx)(t,n)||void 0!==i&&(0,r.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},16194(e,t,n){n.d(t,{QX:()=>l,sS:()=>c,xY:()=>u});var r=n(4718),i=n(30279),o=n(62044),s=n(30524),a=n(41227);function l(e){const{popupTemplate:t,fieldsIndex:n}=e,r=t?.fieldInfos;if(!r?.length||!n)return;const s=[];for(const e of r){const{fieldName:t,label:r}=e,a=n.get(t);if(!a)continue;const l=r&&r!==a.alias?r:null,u=(0,o.iu)(e,a);(l||u)&&s.push(new i.A({name:a.name,alias:l,fieldFormat:u}))}return s.length?s:null}function u(e){const{fields:t}=e;if(!t?.length)return;const n=[];for(const e of t){const t=(0,o.qH)(e)?(0,o.$P)(e):null;t&&n.push(new i.A({name:e.name,fieldFormat:t}))}return n.length?n:null}function c(e,t){const{popupTemplate:n,fieldsIndex:i}=e;if(!n||!i)return;const s=function(e,t,n){t??=[],n=(0,r.o8)(n)??[];let i=!1;const s=new Map;for(const n of t){const t=e.fieldsIndex.get(n.name);t&&s.set(t.name,n)}for(const t of n){const n=e.fieldsIndex.get(t.fieldName);if(!n)continue;const r=s.get(n.name);t.label=r?.alias||n.alias,t.format=(0,o.qH)(n)&&r?.fieldFormat?(0,o.PK)(r.fieldFormat,n):null,i=!0,s.delete(n.name)}for(const t of s.values()){const r=p(e,t);r&&(n.push(r),i=!0)}return i?n:null}(e,t,n.fieldInfos);if(!s)return;const a=n.clone();return a.fieldInfos=s,a}function p(e,t){const{name:n,alias:r,fieldFormat:i}=t,l=e.fieldsIndex.get(n);if(!l||!r&&!i)return;const u=r||l.alias,c=(0,o.qH)(l)&&i?(0,o.PK)(i,l):null;return new a.A({fieldName:l.name,label:u,format:c,visible:!1,isEditable:(0,s.R$)(l,e)})}},32730(e,t,n){n.d(t,{BI:()=>f,D3:()=>p,XJ:()=>d,lc:()=>c,mX:()=>y,rU:()=>h,tH:()=>w,vK:()=>v,zA:()=>I});var r=n(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i");function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function d(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function f(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function h(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(g);return t?.[1].trim()||null}(t.expression);case"arcade":return w(t.expression)}return null}function y(e){let t;return e?(t=(0,r.HC)(e,e=>i+'$feature["'+e+'"]'+o),t=l.test(t)?t.replace(l,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replaceAll(s,'" + ').replaceAll(a,' + "')):t='""',t}const g=/^\s*\{([^}]+)\}\s*$/i,m=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,M=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function w(e){if(!e)return null;let t=m.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=M.exec(e),t?t[2]:null)}const v=Symbol("LabelClassInstance");function I(e){return null!=e&&"object"==typeof e&&v in e}},5757(e,t,n){n.d(t,{B:()=>i,P:()=>r});const r=Symbol("PopupTemplateInstance");function i(e){return null!=e&&"object"==typeof e&&r in e}},98205(e,t,n){n.d(t,{KZ:()=>a,eh:()=>s,gf:()=>o,of:()=>i,uY:()=>r});const r=Symbol("SizeVariableInstance");function i(e){return null!=e&&"object"==typeof e&&r in e}function o(e){return null!=e&&!isNaN(e)&&isFinite(e)}function s(e){return e.valueExpression?"expression":e.field&&"string"==typeof e.field?"field":"unknown"}function a(e,t){const n=t||s(e),r=e.valueUnit||"unknown";return"unknown"===n?"constant":e.stops?"stops":null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?"clamped-linear":"unknown"===r?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?"proportional":"additive":"identity":"real-world-size"}},41366(e,t,n){n.d(t,{K:()=>p,Q:()=>l});var r=n(5482),i=n(66552),o=n(53966),s=n(91429),a=n(93223);const l=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",p=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,n=null!=this.normalizationTotal;return t||n?(e=t&&c||n&&u||null,t&&n&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],n.prototype,"normalizationField",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],n.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],n.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],n.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],n.prototype,"normalizationType",null),n=(0,r.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],n),n}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[709,3090],{69540(e,t,i){i.d(t,{OU:()=>c,Pw:()=>h});var s=i(5482),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(88620),a=i(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},a=new Map;for(const t in i){const o=i[t],l=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==l&&0!==l&&5!==l&&4!==l)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,r.TU)(c,e),null!=c&&null==h)continue;0===l?a.set(t,h):n[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(a.size){const e=(0,l.oY)(u)?.store;if(e)for(const[t,i]of a)e.set(t,i,0)}return u}};return n=(0,s.Cg)([(0,a.$)("esri.core.Clonable")],n),n},h=c(n.A)},7762(e,t,i){i.d(t,{A:()=>k});var s,n=i(5482),r=i(98291),o=i(4576),l=i(65529),a=i(36563),u=i(4718),c=i(53966),h=i(93687),d=i(76030),p=i(56507),f=i(62788),g=i(10107),m=i(7695),y=i(64108),_=i(95488),v=i(12195);class b{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class w{constructor(e,t,i,s,n){this.target=e,this.added=t,this.removed=i,this.start=s,this.deleteCount=n}}const C=new h.A(()=>new b,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function M(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function A(e){return e?e instanceof L?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function S(e){if(e?.length)return e[0]}function I(e,t,i,s){const n=Math.min(e.length-i,t.length-s);let r=0;for(;r<n&&e[i+r]===t[s+r];)r++;return r}function T(e,t,i,s){t&&t.forEach((t,n,r)=>{e.push(t),T(e,i.call(s,t,n,r),i,s)})}const E=new Set,R=new Set,x=new Set,z=new Map;let P=0,L=s=class extends l.nJ{static ofType(e){if(!e)return s;if(z.has(e))return z.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const s=e.typeMap[i].prototype.declaredClass;t?t+=` | ${s}`:t=s}let i=class extends s{};return(0,n.Cg)([(0,m.u)({Type:e,ensureType:"function"==typeof e?(0,p.dp)(e):(0,p.aq)(e)})],i.prototype,"itemType",void 0),i=(0,n.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],i),z.set(e,i),i}static isCollection(e){return null!=e&&e instanceof s}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new _.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:P++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof s?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?c.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,A(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,a.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,a.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return super.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,s=this.on(e,e=>{i()?.call(null,e),s.remove()});return s}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t);return this._splice(i,0,A(e)),this._emitAfterChanges(1),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(u.o8)})}concat(...e){(0,f.gc)(this._observable);const t=e.map(A);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const i=this._splice(0,this.length),s=i.length;for(let n=0;n<s;n++)e.call(t,i[n],n,i);this._emitAfterChanges(2)}destroyAll(){this.drain(M)}destroyMany(e){const t=this.removeMany(e);return t.forEach(M),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);const i=[];return T(i,this,e,t),new s(i)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);const i=this._items.map(e,t);return new s({items:i})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(4))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=S(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=S(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof s?e.toArray():e,i=this._items,n=[],r=t.length;for(let e=0;e<r;e++){const s=t[e],r=i.indexOf(s);if(r>-1){const s=1+I(t,i,e+1,r+1),o=this._splice(r,s);o&&o.length>0&&n.push.apply(n,o),e+=s-1}}return this._emitAfterChanges(2),n}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=S(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const s=(t?2:0)|(i.length?1:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(s),n}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map(t=>(0,v.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const s=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,d._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(o=s.splice(e,t),this.hasEventListener("before-remove")){const t=C.acquire();t.target=this,t.cancellable=!0;for(let i=0,n=o.length;i<n;i++)r=o[i],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(i,1),s.splice(e,0,r),e+=1,i-=1,n-=1);C.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=C.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let i=0;i<t;i++)e.reset(o[i]),this.emit("after-remove",e);C.release(e)}}if(i?.length){if(n){const e=[];for(const t of i){const i=n.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=e===this.length;if(t||r){const n=C.acquire();n.target=this,n.cancellable=!0;const l=C.acquire();l.target=this,l.cancellable=!1;for(const a of i)t?(n.reset(a),this.emit("before-add",n),n.defaultPrevented||(o?s.push(a):s.splice(e++,0,a),this._length=s.length,r&&(l.reset(a),this.emit("after-add",l)))):(o?s.push(a):s.splice(e++,0,a),this._length=s.length,l.reset(a),this.emit("after-add",l));C.release(l),C.release(n)}else{if(o)for(const e of i)s.push(e);else s.splice(e,0,...i);this._length=s.length}}if((i?.length||o?.length)&&this._notifyChangeEvent(i,o),this.hasEventListener("after-splice")){const s=new w(this,i,o,e,t);this.emit("after-splice",s)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=C.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,C.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=C.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),C.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;E.clear(),R.clear(),x.clear();for(const{added:t,removed:i}of e){if(t)if(0===x.size&&0===R.size)for(const e of t)E.add(e);else for(const e of t)R.has(e)?(x.add(e),R.delete(e)):x.has(e)||E.add(e);if(i)if(0===x.size&&0===E.size)for(const e of i)R.add(e);else for(const e of i)E.has(e)?E.delete(e):(x.delete(e),R.add(e))}const i=r.A.acquire();E.forEach(e=>{i.push(e)});const s=r.A.acquire();R.forEach(e=>{s.push(e)});const n=this._items,o=t.items,l=r.A.acquire();if(x.forEach(e=>{o.indexOf(e)!==n.indexOf(e)&&l.push(e)}),t.listeners&&(i.length||s.length||l.length)){const e={target:this,added:i,removed:s,moved:l},n=t.listeners.length;for(let i=0;i<n;i++){const s=t.listeners[i];s.removed||s.callback.call(this,e)}}r.A.release(i),r.A.release(s),r.A.release(l)}E.clear(),R.clear(),x.clear()}};(0,n.Cg)([(0,g.MZ)()],L.prototype,"_updating",void 0),(0,n.Cg)([(0,g.MZ)()],L.prototype,"_length",void 0),(0,n.Cg)([(0,g.MZ)()],L.prototype,"length",null),(0,n.Cg)([(0,g.MZ)()],L.prototype,"items",null),(0,n.Cg)([(0,g.MZ)({readOnly:!0})],L.prototype,"updating",null),L=s=(0,n.Cg)([(0,y.$)("esri.core.Collection")],L);const k=L},4902(e,t,i){i.d(t,{s:()=>o});var s=i(5482),n=i(64108);let r=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+r++})}};return i=(0,s.Cg)([(0,n.$)("esri.core.Identifiable")],i),i};o(class{})},66344(e,t,i){i.d(t,{q:()=>l});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,n,o){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==i&&this._notifyRemove(t,l.entry,l.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._clients.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const n=this._clients.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,l]of this._db)if(0===l.lifetime&&(!s||r.startsWith(s))){const s=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,l,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,r,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class l{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new n(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},7695(e,t,i){function s(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>s})},60999(e,t,i){i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>g,aD:()=>y,jJ:()=>u});var s=i(5482),n=i(69622),r=i(97768),o=i(17676),l=i(10107),a=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function c(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function f(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function g(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,l.MZ)()],m.prototype,"value",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"error",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"finished",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"promise",void 0),(0,s.Cg)([(0,l.MZ)()],m.prototype,"_result",void 0),m=(0,s.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],m);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>g,Vh:()=>m,on:()=>h,pc:()=>y,wB:()=>a,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(17676),l=i(14012);function a(e,t,i={}){return c(e,t,i,p)}function u(e,t,i={}){return c(e,t,i,f)}function c(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,l.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function h(e,t,i,o={}){let l=null,u=null,c=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),i(e)}const p=a(e,(e,i)=>{h(),(0,s.wb)(e)&&(l=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,n.hA)(()=>{p.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let l=null;function a(){l=(0,r.xt)(l)}return new Promise((s,r)=>{l=(0,n.vE)([(0,o.u7)(i,()=>{a(),r((0,o.NK)())}),c(e,e=>{a(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(80559);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},83027(e,t,i){i.d(t,{h:()=>s});const s=i(29953).ho},35982(e,t,i){i.d(t,{B:()=>c});var s=i(4576),n=i(71511),r=i(36563),o=i(53966),l=i(97768),a=i(17676),u=i(83027);class c{constructor(e,t,i,s,n={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,u.h)(e,{...n,schedule:s}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{n.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i=new h(e,t);return this._listeners.push(i),this._connectListener(i),(0,r.hA)(()=>{(0,s.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,l.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,s){if(this._thread){const n=this._transferLists[e],r=n?n(t):[];return this._thread.invoke(e,t,{transferList:r,signal:i,jobPriority:s})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,a.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(d):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,a.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class h{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new n.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function d(){}},54239(e,t,i){i.d(t,{A:()=>m});var s,n=i(5482),r=i(4576),o=i(66552),l=i(25482),a=i(86211),u=i(67076),c=i(91429),h=i(43937),d=i(36005);const p=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=p.jsonValues.slice();(0,r.Xy)(f,"orthometric");const g=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=s=class extends l.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return p.write(e,t,i)}readHeightModel(e,t,i){return p.read(e)||(i?.messages&&i.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return g.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,a.LA)(e)||g.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new s({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,a.k1)(t);return new s({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new s;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n.Cg)([(0,c.MZ)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,n.Cg)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,n.Cg)([(0,d.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,n.Cg)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,n.Cg)([(0,d.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,n.Cg)([(0,d.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,n.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,n.Cg)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=s=(0,n.Cg)([(0,c.$K)("esri.geometry.HeightModelInfo")],m)},159(e,t,i){i.d(t,{A:()=>u});var s,n=i(5482),r=i(69540),o=i(25482),l=i(91429),a=i(99157);let u=s=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new s;for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}};(0,n.Cg)([(0,l.MZ)({type:[a.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=s=(0,n.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,i){i.d(t,{A:()=>a});var s,n=i(5482),r=i(69540),o=i(25482),l=i(91429);let a=s=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new s({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,l.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,i)=>{t[i]=!e}}})],a.prototype,"isInverse",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkt",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkid",void 0),a=s=(0,n.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)},9762(e,t,i){i.r(t),i.d(t,{projectBuffer:()=>n});var s=i(49208);function n(e,t,i,n,r,o,l=Math.floor(e.length/3)){const a=(0,s.jd)(t,r);if(null==a)return!1;if(a===s.pO){if(e===n&&i===o)return!0;const t=i+3*l;for(let s=i,r=o;s<t;s++,r++)n[r]=e[s]??0;return!0}const u=i+3*l;for(let t=i,s=o;t<u;t+=3,s+=3)a(e,t,n,s);return!0}},49208(e,t,i){i.d(t,{Tp:()=>h,jd:()=>c,pO:()=>p,w5:()=>u});var s=i(34727),n=i(86211),r=i(73941),o=i(79258),l=i(34403),a=i(21325);const u={2:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:g,11:m,2:p,4:I},5:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:g,11:m,2:p,4:I},7:{5:null,7:p,9:null,10:p,1:null,6:b,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:p,10:p,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,i,s){const n=e[t]/P,r=z-2*Math.atan(Math.exp(-e[t+1]/P)),o=P+(e[t+2]??0),l=Math.cos(r)*o;i[s]=Math.cos(n)*l,i[s+1]=Math.sin(n)*l,i[s+2]=Math.sin(r)*o},6:null,8:null,0:null,3:p,11:function(e,t,i,s){f(e,t,i,s),m(i,s,i,s)},2:f,4:function(e,t,i,s){f(e,t,i,s),I(i,s,i,s)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,i,s){T(e,t,i,s),w(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){T(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){T(e,t,i,s),m(i,s,i,s)},2:T,4:p},1:{5:S,7:null,9:null,10:S,1:p,6:null,8:null,0:null,3:function(e,t,i,s){S(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){S(e,t,i,s),m(i,s,i,s)},2:S,4:function(e,t,i,s){S(e,t,i,s),I(i,s,i,s)}},6:{5:null,7:A,9:null,10:A,1:null,6:p,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:M,10:M,1:null,6:null,8:p,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:p,3:null,11:null,2:null,4:null},10:{5:p,7:p,9:p,10:p,1:w,6:b,8:v,0:null,3:g,11:m,2:p,4:I},11:{5:y,7:null,9:null,10:y,1:function(e,t,i,s){y(e,t,i,s),w(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){y(e,t,i,s),g(i,s,i,s)},11:p,2:y,4:function(e,t,i,s){y(e,t,i,s),I(i,s,i,s)}}};function c(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(E.source.spatialReference===e&&E.dest.spatialReference===t)return E;const i=d(e,E.source),s=d(t,E.dest);return 0===i&&0===s?(0,a.aI)(e,t)?E.projector=p:E.projector=null:E.projector=u[i][s],E}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,a.oT)(e)?t.spatialReferenceId=2:(0,a.K8)(e)?t.spatialReferenceId=3:(0,a.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,r.q8)(e)?t.spatialReferenceId=7:(0,r.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function p(e,t,i,s){e!==i&&(i[s++]=e[t++],i[s++]=e[t++],i[s]=e[t]??0)}function f(e,t,i,s){i[s]=x*(e[t]/P),i[s+1]=x*(z-2*Math.atan(Math.exp(-e[t+1]/P))),i[s+2]=e[t+2]??0}function g(e,t,i,n){!function(e,t,i,n,r){const o=.4999999*Math.PI,l=(0,s.qE)(R*e[t+1],-o,o),a=Math.sin(l);i[n++]=R*e[t]*r.radius,i[n++]=r.halfSemiMajorAxis*Math.log((1+a)/(1-a)),i[n]=e[t+2]??0}(e,t,i,n,o.$O)}function m(e,t,i,s){i[s]=e[t]*L,i[s+1]=e[t+1]*L,i[s+2]=e[t+2]??0}function y(e,t,i,s){i[s]=e[t]*k,i[s+1]=e[t+1]*k,i[s+2]=e[t+2]??0}function _(e,t,i,s,n){const r=n+(e[t+2]??0),o=R*e[t],l=R*e[t+1],a=Math.cos(l)*r;i[s]=Math.cos(o)*a,i[s+1]=Math.sin(o)*a,i[s+2]=Math.sin(l)*r}function v(e,t,i,s){_(e,t,i,s,o.Sw.radius)}function b(e,t,i,s){_(e,t,i,s,o.sH.radius)}function w(e,t,i,s){_(e,t,i,s,o.$O.radius)}function C(e,t,i,n,r){const o=e[t],l=e[t+1],a=e[t+2]??0,u=Math.sqrt(o*o+l*l+a*a),c=(0,s.YN)(a/(0===u?1:u)),h=Math.atan2(l,o);i[n++]=x*h,i[n++]=x*c,i[n]=u-r}function M(e,t,i,s){C(e,t,i,s,o.Sw.radius)}function A(e,t,i,s){C(e,t,i,s,o.sH.radius)}function S(e,t,i,s){C(e,t,i,s,o.$O.radius)}function I(e,t,i,s){!function(e,t,i,s,n){const r=R*e[t],o=R*e[t+1],l=e[t+2]??0,a=Math.sin(o),u=Math.cos(o),c=n.radius/Math.sqrt(1-n.eccentricitySquared*a*a);i[s++]=(c+l)*u*Math.cos(r),i[s++]=(c+l)*u*Math.sin(r),i[s++]=(c*(1-n.eccentricitySquared)+l)*a}(e,t,i,s,o.$O)}function T(e,t,i,s){const n=l.TP,r=e[t],a=e[t+1],u=e[t+2]??0;let c,h,d,p,f,g,m,y,_,v,b,w,C,M,A,S,I,T,E,R,z;c=Math.abs(u),h=r*r+a*a,d=Math.sqrt(h),p=h+u*u,f=Math.sqrt(p),R=Math.atan2(a,r),g=u*u/p,m=h/p,M=n.a2/f,A=n.a3-n.a4/f,m>.3?(y=c/f*(1+m*(n.a1+M+g*A)/f),E=Math.asin(y),v=y*y,_=Math.sqrt(1-v)):(_=d/f*(1-g*(n.a5-M-m*A)/f),E=Math.acos(_),v=1-_*_,y=Math.sqrt(v)),b=1-o.$O.eccentricitySquared*v,w=o.$O.radius/Math.sqrt(b),C=n.a6*w,M=d-w*_,A=c-C*y,I=_*M+y*A,S=_*A-y*M,T=S/(C/b+I),E+=T,z=I+S*T/2,u<0&&(E=-E),i[s++]=x*R,i[s++]=x*E,i[s]=z}const E={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:p},R=(0,s.kU)(1),x=(0,s.KJ)(1),z=.5*Math.PI,P=o.$O.radius,L=P*Math.PI/180,k=180/(P*Math.PI)},91218(e,t,i){i.r(t),i.d(t,{canProjectWithoutEngine:()=>G,initializeProjection:()=>F,isEqualBaseGCS:()=>K,isLoaded:()=>P,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>k,load:()=>U,project:()=>j,projectAsync:()=>V,projectExtent:()=>ne,projectMany:()=>Z,projectMultipoint:()=>Q,projectOrLoad:()=>q,projectOrLoadMany:()=>$,projectPoint:()=>Y,projectPolygon:()=>ie,projectPolyline:()=>ee,projectWithoutEngine:()=>W,requiresLoad:()=>O,test:()=>H,tryProject:()=>D,unload:()=>B});var s=i(49186),n=i(17676),r=i(62788),o=i(95488),l=i(51850),a=i(21276),u=i(73941),c=i(5443),h=i(91075),d=i(48526),p=i(86738),f=i(39829),g=i(82799),m=i(16930),y=i(98764),_=i(159),v=i(9762),b=i(49208);function w(e,t,i,s,n,r){return C[0]=e,C[1]=t,C[2]=i,(0,v.projectBuffer)(C,s,0,n,r,0)}const C=(0,l.vt)();var M=i(60408),A=i(21325),S=i(52006);let I=null,T=null,E=null,R=null,x={};const z=new o.I;function P(){return!!(T?.isLoaded()&&E?.isLoaded()&&R?.isLoaded())}function L(){return!!P()||((0,r.gc)(z),U(),!1)}function k(e,t){return!e||!t||G(e,t)||L()}function O(e,t){return!G(e,t)&&!P()}async function U(e){null==I&&(I=Promise.all([i.e(3276).then(i.bind(i,83276)).then(e=>(T=e,T.load())),i.e(8377).then(i.bind(i,8377)).then(e=>(E=e,E.load())),i.e(2158).then(i.bind(i,12158)).then(e=>(R=e,R.load()))])),await I,(0,n.Te)(e),z.notify()}function j(e,t,i){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),Z(e,e[0].spatialReference,t,i)):((0,a.f)(e),Z([e],e.spatialReference,t,i)[0])}function Z(e,t,i,s){if(null==t||null==i)return e;if(G(t,i,s))return e.map(e=>W(e,t,i));if(null==s?.geographicTransformation&&(0,u.jA)(t))return Z(e.map(e=>W(e,t,m.A.WGS84)),m.A.WGS84,i,{zConversionDisabled:s?.zConversionDisabled});if(null==s?.geographicTransformation&&(0,u.jA)(i))return Z(e,t,m.A.WGS84).map(e=>W(e,m.A.WGS84,i));if(!P())throw new N;if(!s?.geographicTransformation)if(s?.extendedParams)s={...s,geographicTransformation:R.getTransformation(t,i,s.areaOfInterestExtent)||new _.A};else if(!s?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,i);let n=x[e];n||(n=R.getTransformation(t,i)||new _.A,x[e]=n),s={geographicTransformation:n,zConversionDisabled:s?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof h.A?T.executeMany(e,i,s):E.executeMany(e,i,s)}function D(e,t,i){try{return j(e,t,i)}catch(e){return null}}function q(e,t){const i=$([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function $(e,t,i){if(!P())for(const i of e)if(null!=i&&!(0,A.aI)(i.spatialReference,t)&&(0,A.fn)(i.spatialReference)&&(0,A.fn)(t)&&!G(i.spatialReference,t))return(0,r.gc)(z),{pending:U(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,A.aI)(e.spatialReference,t)?e:(0,A.fn)(e.spatialReference)&&(0,A.fn)(t)?j(e,t,i):null)}}class N extends s.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function B(){I=null,T=null,E=null,R=null,x={}}const H={get loadPromise(){return I}};async function V(e,t,i){if((0,n.Te)(i),!e)return e;const s=$(Array.isArray(e)?e:[e],t,i);if(s.pending)return await s.pending,(0,n.Te)(i),V(e,t,i);const r=s.geometries??[];return Array.isArray(e)?r:r[0]}function G(e,t,i){return!(i?.areaOfInterestExtent||i?.extendedParams||i?.geographicTransformation)&&(!!(0,A.aI)(e,t)||(0,A.fn)(e)&&(0,A.fn)(t)&&!!(0,b.jd)(e,t))}function K(e,t){if((0,A.aI)(e,t))return!0;if(!(0,A.fn)(e)||!(0,A.fn)(t))return!1;const i=(0,A.oT)(e)||(0,A.K8)(e)||(0,A.x1)(e),s=(0,A.oT)(t)||(0,A.K8)(t)||(0,A.x1)(t);return i&&s}async function F(e,t,i,s){if(P())return(0,n.NO)(s);if(Array.isArray(e)){for(const{source:t,dest:i,options:n}of e)if(t&&i&&!G(t,i,n))return U(s)}else if(e&&t&&!G(e,t,i))return U(s);return(0,n.NO)(s)}function W(e,t,i){return e?(0,M.fT)(e)?J(e,t,new p.A,i,0):(0,M.ZC)(e)?re(e,t,new c.A,i,0):(0,M.Bi)(e)?se(e,t,new f.A,i,0):(0,M.Rg)(e)?te(e,t,new g.A,i,0):(0,M.U9)(e)?X(e,t,new d.A,i,0):null:null}function Y(e,t,i=t.spatialReference,s=0){return null!=i&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,i,s)}function J(e,t,i,s,n){ue[0]=e.x,ue[1]=e.y;const r=e.z;return ue[2]=void 0!==r?r:n,(0,v.projectBuffer)(ue,t,0,ue,s,0)?(i.x=ue[0],i.y=ue[1],i.spatialReference=s,void 0!==r||(0,u.xP)(s)?(i.z=ue[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function Q(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=X(e,e.spatialReference,t,i,s)}function X(e,t,i,s,n){const{points:r,hasZ:o,hasM:l}=e,a=[],u=r.length,c=[];for(const e of r)c.push(e[0],e[1],o?e[2]:n);if(!(0,v.projectBuffer)(c,t,0,c,s,0,u))return null;const h=ae(o,s);for(let e=0;e<u;++e){const t=3*e,i=c[t],s=c[t+1];h&&l?a.push([i,s,c[t+2],r[e][3]]):h?a.push([i,s,c[t+2]]):l?a.push([i,s,r[e][2]]):a.push([i,s])}return i.points=a,i.spatialReference=s,i.hasZ=o,i.hasM=l,i}function ee(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=te(e,e.spatialReference,t,i,s)}function te(e,t,i,s,n){const{curvePaths:r,paths:o,hasZ:l,hasM:a}=e;if(!(r?le(r,l??!1,a??!1,t,i.curvePaths=[],s,n):oe(o,l??!1,a??!1,t,i.paths,s,n)))return null;const u=ae(l,s);return i.spatialReference=s,i.hasZ=u,i.hasM=a,i}function ie(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=se(e,e.spatialReference,t,i,s)}function se(e,t,i,s,n){const{curveRings:r,rings:o,hasZ:l,hasM:a}=e;return(r?le(r,l??!1,a??!1,t,i.curveRings=[],s,n):oe(o,l??!1,a??!1,t,i.rings,s,n))?(i.spatialReference=s,i.hasZ=ae(l,s),i.hasM=a,i):null}function ne(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=re(e,e.spatialReference,t,i,s)}function re(e,t,i,s,n){const{xmin:r,ymin:o,xmax:l,ymax:a,hasZ:u,hasM:c}=e;if(!w(r,o,u?e.zmin:n,t,ue,s))return null;const h=ae(u,s);return i.xmin=ue[0],i.ymin=ue[1],h&&(i.zmin=ue[2]),w(l,a,u?e.zmax:n,t,ue,s)?(i.xmax=ue[0],i.ymax=ue[1],h&&(i.zmax=ue[2]),c&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=s,i):null}function oe(e,t,i,s,n,r,o=0){const l=new Array;for(const i of e)for(const e of i)l.push(e[0],e[1],t?e[2]:o);if(!(0,v.projectBuffer)(l,s,0,l,r,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,r);for(const t of e){const e=new Array;for(const s of t){const t=l.slice(a,a+=3);c||t.pop(),i&&t.push(s[u]),e.push(t)}n.push(e)}return!0}function le(e,t,i,s,n,r,o=0){const l=new Array;for(const i of e)for(const e of i){if((0,S.FG)(e))return!1;if((0,S.aO)(e)){const[i,s]=e.c;l.push(i[0],i[1],t?i[2]:o,s[0],s[1],o);continue}if((0,S.n1)(e)){const[i,s,n]=e.b;l.push(i[0],i[1],t?i[2]:o,s[0],s[1],o,n[0],n[1],o);continue}const i=e;l.push(i[0],i[1],t?i[2]:o)}if(!(0,v.projectBuffer)(l,s,0,l,r,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,r);for(const t of e){const e=new Array;for(const s of t){const t=l.slice(a,a+=3);if(c||t.pop(),i&&t.push((0,S.yP)(s)[u]),(0,S.FG)(s))return!1;if((0,S.aO)(s)){const i=l[a++],s=l[a++];++a,e.push({c:[t,[i,s]]});continue}if((0,S.n1)(s)){const i=l[a++],s=l[a++];++a;const n=l[a++],r=l[a++];++a,e.push({b:[t,[i,s],[n,r]]});continue}e.push(t)}n.push(e)}return!0}function ae(e,t){return e||(0,u.xP)(t)||(0,A.aI)(t,y.Y0)}const ue=(0,l.vt)()},98764(e,t,i){i.d(t,{GD:()=>o,Y0:()=>u,lO:()=>c});var s=i(73941),n=i(16930),r=i(21325);const o=new n.A(s.fv),l=new n.A(s.FY),a=new n.A(s.LJ),u=new n.A(s.Ro);function c(e){const t=h.get(e);if(t)return t;let i=o;if(e)if(e===l)i=l;else if(e===a)i=a;else{const t=e.wkid,s=e.latestWkid;if(null!=t||null!=s)(0,r.tl)(t)||(0,r.tl)(s)?i=l:((0,r.ZL)(t)||(0,r.ZL)(s))&&(i=a);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===d?i=l:e===p&&(i=a)}}}return h.set(e,i),i}const h=new Map,d=l.wkt.toUpperCase(),p=a.wkt.toUpperCase()},34403(e,t,i){i.d(t,{TP:()=>o});var s=i(79258);Math.PI;const n=s.$O.radius,r=s.$O.eccentricitySquared,o={a1:n*r,a2:n*r*n*r,a3:n*r*r/2,a4:n*r*n*r*2.5,a5:n*r+n*r*r/2,a6:1-r};s.$O.radius,s.$O.flattening,s.Sw.radius,s.Sw.flattening,s.sH.radius,s.sH.flattening,s.sH.radius},38732(e,t,i){i.r(t),i.d(t,{default:()=>S});var s=i(5482),n=i(11254),r=i(49186),o=i(97768),l=i(25728),a=i(17676),u=i(84952),c=i(91429),h=i(54239),d=i(4146),p=i(89186),f=i(18768),g=i(34287),m=i(8303),y=i(10873),_=i(87378),v=i(35982);class b extends v.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(w.forEach((e,t)=>{e===this&&w.delete(t)}),this.destroy())}}const w=new Map;var C=i(36005);let M=class extends((0,p.f)((0,f.b)((0,g.q)((0,m.A)((0,l.M)(d.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=w.get(e);return t||(null!=e?(t=new b(t=>e.immediate.schedule(t)),w.set(e,t)):(t=new b,w.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new r.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(a.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,s){const o=s?.signal,l={responseType:"array-buffer",signal:o,useQueue:s?.useQueue,priority:s?.priority},a={noDataValue:s?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,t,i,s);const u=await(0,n.A)(this.getTileUrl(e,t,i),l),c=await this._lercDecoder.decode(u.data,a,o);if(!c)throw new r.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new _.A({values:c.pixelData,width:c.width,height:c.height,noDataValue:c.noDataValue})}getTileUrl(e,t,i){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,n=(0,u.x0)({...this.parsedUrl.query,blankTile:!s&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${n?"?"+n:""}`}async queryElevation(e,t){const{query:s}=await i.e(91).then(i.bind(i,90091));return(0,a.Te)(t),s(this,e,t)}async createElevationSampler(e,t){const{createSampler:s}=await i.e(91).then(i.bind(i,90091));return(0,a.Te)(t),s(this,e,t)}_fetchTileAvailability(e,t,i,s){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,s):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,n.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,s.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,s.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,type:h.A})],M.prototype,"heightModelInfo",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,s.Cg)([(0,c.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,s.Cg)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)(y.OZ)],M.prototype,"url",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"version",void 0),(0,s.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,s.Cg)([(0,c.$K)("esri.layers.ElevationLayer")],M);const A=Symbol("default-fetch-tile");M.prototype.fetchTile[A]=!0;const S=M},4146(e,t,i){i.d(t,{A:()=>_});var s=i(5482),n=i(11254),r=i(49186),o=i(65529),l=i(4902),a=i(92474),u=i(53966),c=i(17676),h=i(84952),d=i(91429),p=i(5443),f=i(16930),g=i(92602),m=i(79677);let y=0,_=class extends((0,o.Zt)((0,l.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:s}=await Promise.all([i.e(812),i.e(5613),i.e(909)]).then(i.bind(i,45613));try{return await s(t)}catch(e){const i=t?.portalItem,s=i?.id||"unset",n=i?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+s+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(e,t){return Promise.reject(new r.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new r.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,s.Cg)([(0,d.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,s.Cg)([(0,d.MZ)({type:p.A})],_.prototype,"fullExtent",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,s.Cg)([(0,d.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,s.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,s.Cg)([(0,d.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,s.Cg)([(0,d.MZ)({type:f.A})],_.prototype,"spatialReference",void 0),(0,s.Cg)([(0,d.MZ)({type:String})],_.prototype,"title",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,s.Cg)([(0,d.MZ)()],_.prototype,"url",void 0),(0,s.Cg)([(0,d.MZ)({type:m.A})],_.prototype,"visibilityTimeExtent",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,s.Cg)([(0,d.$K)("esri.layers.Layer")],_)},18768(e,t,i){i.d(t,{b:()=>l});var s=i(5482),n=i(53966),r=i(91429),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,n.A.getLogger(this)))}};return(0,s.Cg)([(0,r.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,r.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISService")],i),i}},8303(e,t,i){i.d(t,{A:()=>w});var s=i(5482),n=i(92602),r=i(70333),o=i(11254),l=i(60999),a=i(49186),u=i(53966),c=i(97768),h=i(17676),d=i(84952),p=i(91429),f=i(77548),g=i(20655),m=i(80812),y=i(41318),_=i(10407),v=i(36005),b=i(43937);const w=e=>{const t=e;let w=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new m.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await i.e(1204).then(i.bind(i,41204));return(0,h.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,h.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!r.id?.findCredential(this.url),n=e===i.id;if(n&&i.portal.user)return this._getUserPrivileges(i,s);let o,l;if(n)o=i.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!o||!(0,d.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(r.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(n?await i.reload():(i=new m.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,s)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const i=(0,_.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,n=g.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(s))return n.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?y.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return i&&s&&!(0,d.ut)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s.Cg)([(0,p.MZ)({type:m.default})],w.prototype,"portalItem",null),(0,s.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],w.prototype,"readPortalItem",null),(0,s.Cg)([(0,b.K)("web-document","portalItem",{itemId:{type:String}})],w.prototype,"writePortalItem",null),(0,s.Cg)([(0,p.MZ)({clonable:!1})],w.prototype,"resourceReferences",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasEditingPrivileges",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasFullEditingPrivileges",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasUpdateItemPrivileges",void 0),w=(0,s.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],w),w},C={credential:null,user:null}},87378(e,t,i){i.d(t,{A:()=>l});var s,n=i(34275),r=i(56507);const o=Symbol("ElevationTileDataClass");class l{static{s=o}constructor({values:e,width:t,height:i,noDataValue:r}){this[s]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,n.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=r}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,s=-1/0,n=!0;for(const r of t)r===e?this._hasNoDataValues=!0:(i=r<i?r:i,s=r>s?r:s,n=!1);n?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=s>-3e38?s:0)}static{this.from=(0,r.qf)(l)}}},77548(e,t,i){i.d(t,{Gh:()=>z,tk:()=>I,BR:()=>S,p2:()=>M,qd:()=>T,wI:()=>A,G$:()=>R,$x:()=>E,Ov:()=>v,cM:()=>d,UC:()=>p,W_:()=>b,Qz:()=>f,OP:()=>x,TU:()=>_,F2:()=>g,XX:()=>y,jy:()=>w});var s=i(70333),n=i(11254),r=i(7762),o=(i(84952),i(36563)),l=i(36708),a=i(4146);const u=new WeakMap;function c(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof a.A)&&("catalog-dynamic-group"===t.type||c(t))},t=>u.set(e,t),l.pc),(0,o.hA)(()=>u.delete(e))]),u.get(e))}function h(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function d(e){return h(e,"knowledge-graph")&&"layers"in e}function p(e){return h(e,"knowledge-graph-sublayer")}function f(e){return h(e,"link-chart")&&"layers"in e}function g(e){return h(e,"subtype-group")&&"sublayers"in e}function m(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}i(16215);const y={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function _(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function v(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function b(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function w(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"oriented-imagery"===e.type}(e)||function(e){return h(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function C(e){const t=e?.type;return"binning"===t||"cluster"===t}function M(e,t){if(!w(e))return;const i=t?.graphic,s=e.featureReduction;if(i){if(i.isAggregate){const e=i.origin;return e&&"featureReductionProvider"in e&&s?C(s)?s:null:void 0}return e}return t?.checkFeatureReduction&&s?C(s)?s:null:e}async function A(e,t){const i=s.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const r=e.toLowerCase().indexOf("/rest/services");if(-1===r)return null;const o=`${e.slice(0,r)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function S(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function I(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function T(e){const t=new r.A;for(const i of e.allLayers.concat(e.allTables))c(i)||m(i)||("charts"in i&&t.push(i),"subtype-group"===i.type&&t.push(...i.sublayers));return t}function E(e,t){return null}function R(e){return null}function x(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function z(e,t){if(!t||!x(e))return;const i=(e.url,null);i&&(e.url=i)}},10407(e,t,i){i.d(t,{It:()=>p,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>l,bK:()=>a,mm:()=>d,sQ:()=>h});var s=i(91218),n=i(16930),r=i(28735);function o(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?o(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,r.ci)(e);const i=n.A.WGS84;return await(0,s.initializeProjection)(t,i),(0,s.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:i,itemControl:s}=e,n=t.user?.privileges;let r=!n||n.includes("features:user:edit"),o=!!i&&!!n?.includes("features:user:fullEdit");const l="update"===s||"admin"===s;return l?o=r=!0:o&&(r=!0),{features:{edit:r,fullEdit:o},content:{updateItem:l}}}},73133(e,t,i){i.d(t,{j:()=>s});const s=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"})},16215(e,t,i){i.d(t,{S:()=>n,Y:()=>s});const s=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&s in e}},79677(e,t,i){i.d(t,{A:()=>d});var s,n=i(5482),r=i(25482),o=i(88930),l=i(91429),a=i(98623),u=i(10184),c=i(36005),h=i(43937);let d=class extends r.o{static{s=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new s({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,s=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===s&&i===n}expandTo(e,t=a.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,new u.A({value:1,unit:e}),t));let n=this.end;if(n){const i=(0,o.lL)(n,new u.A({value:1,unit:e}),t);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new s({start:i,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,l;return n>=t&&n<=i?o=n:t>=n&&t<=r&&(o=t),i>=n&&i<=r?l=i:r>=t&&r<=i&&(l=r),null==o||null==l||isNaN(o)||isNaN(l)?s.empty:new s({start:o===-1/0?null:new Date(o),end:l===1/0?null:new Date(l)})}offset(e,t,i=a.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const n=new s,{start:r,end:l}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,i)),null!=l&&(n.end=(0,o.S1)(l,e,t,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,c.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,h.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,c.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,h.K)("start")],d.prototype,"writeStart",null),d=s=(0,n.Cg)([(0,l.$K)("esri.time.TimeExtent")],d);const p=new d,f=new d({start:void 0,end:void 0})},10184(e,t,i){i.d(t,{A:()=>c});var s=i(5482),n=i(69540),r=i(25482),o=i(88930),l=i(91429),a=i(73133),u=i(93223);let c=class extends((0,n.OU)(r.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,s.Cg)([(0,u.e)(a.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,s.Cg)([(0,l.$K)("esri.time.TimeInterval")],c)},78553(e,t,i){i.d(t,{D:()=>r,p:()=>n});var s=i(56507);function n(e){const t=(0,s.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function r(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[709,3090],{69540(e,t,i){i.d(t,{OU:()=>c,Pw:()=>h});var s=i(5482),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(88620),a=i(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},a=new Map;for(const t in i){const o=i[t],l=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==l&&0!==l&&5!==l&&4!==l)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,r.TU)(c,e),null!=c&&null==h)continue;0===l?a.set(t,h):n[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(a.size){const e=(0,l.oY)(u)?.store;if(e)for(const[t,i]of a)e.set(t,i,0)}return u}};return n=(0,s.Cg)([(0,a.$)("esri.core.Clonable")],n),n},h=c(n.A)},7762(e,t,i){i.d(t,{A:()=>k});var s,n=i(5482),r=i(98291),o=i(4576),l=i(65529),a=i(36563),u=i(4718),c=i(53966),h=i(93687),d=i(76030),p=i(56507),f=i(62788),g=i(10107),m=i(7695),y=i(64108),_=i(95488),v=i(12195);class b{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class w{constructor(e,t,i,s,n){this.target=e,this.added=t,this.removed=i,this.start=s,this.deleteCount=n}}const C=new h.A(()=>new b,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function M(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function A(e){return e?e instanceof L?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function S(e){if(e?.length)return e[0]}function I(e,t,i,s){const n=Math.min(e.length-i,t.length-s);let r=0;for(;r<n&&e[i+r]===t[s+r];)r++;return r}function T(e,t,i,s){t&&t.forEach((t,n,r)=>{e.push(t),T(e,i.call(s,t,n,r),i,s)})}const R=new Set,E=new Set,x=new Set,z=new Map;let P=0,L=s=class extends l.nJ{static ofType(e){if(!e)return s;if(z.has(e))return z.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const s=e.typeMap[i].prototype.declaredClass;t?t+=` | ${s}`:t=s}let i=class extends s{};return(0,n.Cg)([(0,m.u)({Type:e,ensureType:"function"==typeof e?(0,p.dp)(e):(0,p.aq)(e)})],i.prototype,"itemType",void 0),i=(0,n.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],i),z.set(e,i),i}static isCollection(e){return null!=e&&e instanceof s}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new _.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:P++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof s?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?c.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,A(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,a.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,a.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return super.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,s=this.on(e,e=>{i()?.call(null,e),s.remove()});return s}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t);return this._splice(i,0,A(e)),this._emitAfterChanges(1),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(u.o8)})}concat(...e){(0,f.gc)(this._observable);const t=e.map(A);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const i=this._splice(0,this.length),s=i.length;for(let n=0;n<s;n++)e.call(t,i[n],n,i);this._emitAfterChanges(2)}destroyAll(){this.drain(M)}destroyMany(e){const t=this.removeMany(e);return t.forEach(M),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);const i=[];return T(i,this,e,t),new s(i)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);const i=this._items.map(e,t);return new s({items:i})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(4))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=S(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=S(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof s?e.toArray():e,i=this._items,n=[],r=t.length;for(let e=0;e<r;e++){const s=t[e],r=i.indexOf(s);if(r>-1){const s=1+I(t,i,e+1,r+1),o=this._splice(r,s);o&&o.length>0&&n.push.apply(n,o),e+=s-1}}return this._emitAfterChanges(2),n}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=S(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const s=(t?2:0)|(i.length?1:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(s),n}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map(t=>(0,v.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const s=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,d._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(o=s.splice(e,t),this.hasEventListener("before-remove")){const t=C.acquire();t.target=this,t.cancellable=!0;for(let i=0,n=o.length;i<n;i++)r=o[i],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(i,1),s.splice(e,0,r),e+=1,i-=1,n-=1);C.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=C.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let i=0;i<t;i++)e.reset(o[i]),this.emit("after-remove",e);C.release(e)}}if(i?.length){if(n){const e=[];for(const t of i){const i=n.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=e===this.length;if(t||r){const n=C.acquire();n.target=this,n.cancellable=!0;const l=C.acquire();l.target=this,l.cancellable=!1;for(const a of i)t?(n.reset(a),this.emit("before-add",n),n.defaultPrevented||(o?s.push(a):s.splice(e++,0,a),this._length=s.length,r&&(l.reset(a),this.emit("after-add",l)))):(o?s.push(a):s.splice(e++,0,a),this._length=s.length,l.reset(a),this.emit("after-add",l));C.release(l),C.release(n)}else{if(o)for(const e of i)s.push(e);else s.splice(e,0,...i);this._length=s.length}}if((i?.length||o?.length)&&this._notifyChangeEvent(i,o),this.hasEventListener("after-splice")){const s=new w(this,i,o,e,t);this.emit("after-splice",s)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=C.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,C.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=C.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),C.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;R.clear(),E.clear(),x.clear();for(const{added:t,removed:i}of e){if(t)if(0===x.size&&0===E.size)for(const e of t)R.add(e);else for(const e of t)E.has(e)?(x.add(e),E.delete(e)):x.has(e)||R.add(e);if(i)if(0===x.size&&0===R.size)for(const e of i)E.add(e);else for(const e of i)R.has(e)?R.delete(e):(x.delete(e),E.add(e))}const i=r.A.acquire();R.forEach(e=>{i.push(e)});const s=r.A.acquire();E.forEach(e=>{s.push(e)});const n=this._items,o=t.items,l=r.A.acquire();if(x.forEach(e=>{o.indexOf(e)!==n.indexOf(e)&&l.push(e)}),t.listeners&&(i.length||s.length||l.length)){const e={target:this,added:i,removed:s,moved:l},n=t.listeners.length;for(let i=0;i<n;i++){const s=t.listeners[i];s.removed||s.callback.call(this,e)}}r.A.release(i),r.A.release(s),r.A.release(l)}R.clear(),E.clear(),x.clear()}};(0,n.Cg)([(0,g.MZ)()],L.prototype,"_updating",void 0),(0,n.Cg)([(0,g.MZ)()],L.prototype,"_length",void 0),(0,n.Cg)([(0,g.MZ)()],L.prototype,"length",null),(0,n.Cg)([(0,g.MZ)()],L.prototype,"items",null),(0,n.Cg)([(0,g.MZ)({readOnly:!0})],L.prototype,"updating",null),L=s=(0,n.Cg)([(0,y.$)("esri.core.Collection")],L);const k=L},4902(e,t,i){i.d(t,{s:()=>o});var s=i(5482),n=i(64108);let r=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+r++})}};return i=(0,s.Cg)([(0,n.$)("esri.core.Identifiable")],i),i};o(class{})},66344(e,t,i){i.d(t,{q:()=>l});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,n,o){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==i&&this._notifyRemove(t,l.entry,l.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._clients.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const n=this._clients.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,l]of this._db)if(0===l.lifetime&&(!s||r.startsWith(s))){const s=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,l,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,r,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class l{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new n(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},7695(e,t,i){function s(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>s})},60999(e,t,i){i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>g,aD:()=>y,jJ:()=>u});var s=i(5482),n=i(69622),r=i(97768),o=i(17676),l=i(10107),a=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function c(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function f(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function g(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,l.MZ)()],m.prototype,"value",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"error",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"finished",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"promise",void 0),(0,s.Cg)([(0,l.MZ)()],m.prototype,"_result",void 0),m=(0,s.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],m);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>g,Vh:()=>m,on:()=>h,pc:()=>y,wB:()=>a,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(17676),l=i(14012);function a(e,t,i={}){return c(e,t,i,p)}function u(e,t,i={}){return c(e,t,i,f)}function c(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,l.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function h(e,t,i,o={}){let l=null,u=null,c=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),i(e)}const p=a(e,(e,i)=>{h(),(0,s.wb)(e)&&(l=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,n.hA)(()=>{p.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let l=null;function a(){l=(0,r.xt)(l)}return new Promise((s,r)=>{l=(0,n.vE)([(0,o.u7)(i,()=>{a(),r((0,o.NK)())}),c(e,e=>{a(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(80559);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},83027(e,t,i){i.d(t,{h:()=>s});const s=i(29953).ho},35982(e,t,i){i.d(t,{B:()=>c});var s=i(4576),n=i(71511),r=i(36563),o=i(53966),l=i(97768),a=i(17676),u=i(83027);class c{constructor(e,t,i,s,n={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,u.h)(e,{...n,schedule:s}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{n.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i=new h(e,t);return this._listeners.push(i),this._connectListener(i),(0,r.hA)(()=>{(0,s.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,l.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,s){if(this._thread){const n=this._transferLists[e],r=n?n(t):[];return this._thread.invoke(e,t,{transferList:r,signal:i,jobPriority:s})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,a.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(d):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,a.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class h{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new n.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function d(){}},54239(e,t,i){i.d(t,{A:()=>m});var s,n=i(5482),r=i(4576),o=i(66552),l=i(25482),a=i(86211),u=i(67076),c=i(91429),h=i(43937),d=i(36005);const p=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=p.jsonValues.slice();(0,r.Xy)(f,"orthometric");const g=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=s=class extends l.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return p.write(e,t,i)}readHeightModel(e,t,i){return p.read(e)||(i?.messages&&i.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return g.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,a.LA)(e)||g.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new s({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,a.k1)(t);return new s({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new s;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n.Cg)([(0,c.MZ)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,n.Cg)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,n.Cg)([(0,d.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,n.Cg)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,n.Cg)([(0,d.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,n.Cg)([(0,d.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,n.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,n.Cg)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=s=(0,n.Cg)([(0,c.$K)("esri.geometry.HeightModelInfo")],m)},159(e,t,i){i.d(t,{A:()=>u});var s,n=i(5482),r=i(69540),o=i(25482),l=i(91429),a=i(99157);let u=s=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new s;for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}};(0,n.Cg)([(0,l.MZ)({type:[a.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=s=(0,n.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,i){i.d(t,{A:()=>a});var s,n=i(5482),r=i(69540),o=i(25482),l=i(91429);let a=s=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new s({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,l.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,i)=>{t[i]=!e}}})],a.prototype,"isInverse",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkt",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkid",void 0),a=s=(0,n.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)},9762(e,t,i){i.r(t),i.d(t,{projectBuffer:()=>n});var s=i(49208);function n(e,t,i,n,r,o,l=Math.floor(e.length/3)){const a=(0,s.jd)(t,r);if(null==a)return!1;if(a===s.pO){if(e===n&&i===o)return!0;const t=i+3*l;for(let s=i,r=o;s<t;s++,r++)n[r]=e[s]??0;return!0}const u=i+3*l;for(let t=i,s=o;t<u;t+=3,s+=3)a(e,t,n,s);return!0}},49208(e,t,i){i.d(t,{Tp:()=>h,jd:()=>c,pO:()=>p,w5:()=>u});var s=i(34727),n=i(86211),r=i(73941),o=i(79258),l=i(34403),a=i(21325);const u={2:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:g,11:m,2:p,4:I},5:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:g,11:m,2:p,4:I},7:{5:null,7:p,9:null,10:p,1:null,6:b,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:p,10:p,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,i,s){const n=e[t]/P,r=z-2*Math.atan(Math.exp(-e[t+1]/P)),o=P+(e[t+2]??0),l=Math.cos(r)*o;i[s]=Math.cos(n)*l,i[s+1]=Math.sin(n)*l,i[s+2]=Math.sin(r)*o},6:null,8:null,0:null,3:p,11:function(e,t,i,s){f(e,t,i,s),m(i,s,i,s)},2:f,4:function(e,t,i,s){f(e,t,i,s),I(i,s,i,s)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,i,s){T(e,t,i,s),w(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){T(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){T(e,t,i,s),m(i,s,i,s)},2:T,4:p},1:{5:S,7:null,9:null,10:S,1:p,6:null,8:null,0:null,3:function(e,t,i,s){S(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){S(e,t,i,s),m(i,s,i,s)},2:S,4:function(e,t,i,s){S(e,t,i,s),I(i,s,i,s)}},6:{5:null,7:A,9:null,10:A,1:null,6:p,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:M,10:M,1:null,6:null,8:p,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:p,3:null,11:null,2:null,4:null},10:{5:p,7:p,9:p,10:p,1:w,6:b,8:v,0:null,3:g,11:m,2:p,4:I},11:{5:y,7:null,9:null,10:y,1:function(e,t,i,s){y(e,t,i,s),w(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){y(e,t,i,s),g(i,s,i,s)},11:p,2:y,4:function(e,t,i,s){y(e,t,i,s),I(i,s,i,s)}}};function c(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(R.source.spatialReference===e&&R.dest.spatialReference===t)return R;const i=d(e,R.source),s=d(t,R.dest);return 0===i&&0===s?(0,a.aI)(e,t)?R.projector=p:R.projector=null:R.projector=u[i][s],R}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,a.oT)(e)?t.spatialReferenceId=2:(0,a.K8)(e)?t.spatialReferenceId=3:(0,a.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,r.q8)(e)?t.spatialReferenceId=7:(0,r.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function p(e,t,i,s){e!==i&&(i[s++]=e[t++],i[s++]=e[t++],i[s]=e[t]??0)}function f(e,t,i,s){i[s]=x*(e[t]/P),i[s+1]=x*(z-2*Math.atan(Math.exp(-e[t+1]/P))),i[s+2]=e[t+2]??0}function g(e,t,i,n){!function(e,t,i,n,r){const o=.4999999*Math.PI,l=(0,s.qE)(E*e[t+1],-o,o),a=Math.sin(l);i[n++]=E*e[t]*r.radius,i[n++]=r.halfSemiMajorAxis*Math.log((1+a)/(1-a)),i[n]=e[t+2]??0}(e,t,i,n,o.$O)}function m(e,t,i,s){i[s]=e[t]*L,i[s+1]=e[t+1]*L,i[s+2]=e[t+2]??0}function y(e,t,i,s){i[s]=e[t]*k,i[s+1]=e[t+1]*k,i[s+2]=e[t+2]??0}function _(e,t,i,s,n){const r=n+(e[t+2]??0),o=E*e[t],l=E*e[t+1],a=Math.cos(l)*r;i[s]=Math.cos(o)*a,i[s+1]=Math.sin(o)*a,i[s+2]=Math.sin(l)*r}function v(e,t,i,s){_(e,t,i,s,o.Sw.radius)}function b(e,t,i,s){_(e,t,i,s,o.sH.radius)}function w(e,t,i,s){_(e,t,i,s,o.$O.radius)}function C(e,t,i,n,r){const o=e[t],l=e[t+1],a=e[t+2]??0,u=Math.sqrt(o*o+l*l+a*a),c=(0,s.YN)(a/(0===u?1:u)),h=Math.atan2(l,o);i[n++]=x*h,i[n++]=x*c,i[n]=u-r}function M(e,t,i,s){C(e,t,i,s,o.Sw.radius)}function A(e,t,i,s){C(e,t,i,s,o.sH.radius)}function S(e,t,i,s){C(e,t,i,s,o.$O.radius)}function I(e,t,i,s){!function(e,t,i,s,n){const r=E*e[t],o=E*e[t+1],l=e[t+2]??0,a=Math.sin(o),u=Math.cos(o),c=n.radius/Math.sqrt(1-n.eccentricitySquared*a*a);i[s++]=(c+l)*u*Math.cos(r),i[s++]=(c+l)*u*Math.sin(r),i[s++]=(c*(1-n.eccentricitySquared)+l)*a}(e,t,i,s,o.$O)}function T(e,t,i,s){const n=l.TP,r=e[t],a=e[t+1],u=e[t+2]??0;let c,h,d,p,f,g,m,y,_,v,b,w,C,M,A,S,I,T,R,E,z;c=Math.abs(u),h=r*r+a*a,d=Math.sqrt(h),p=h+u*u,f=Math.sqrt(p),E=Math.atan2(a,r),g=u*u/p,m=h/p,M=n.a2/f,A=n.a3-n.a4/f,m>.3?(y=c/f*(1+m*(n.a1+M+g*A)/f),R=Math.asin(y),v=y*y,_=Math.sqrt(1-v)):(_=d/f*(1-g*(n.a5-M-m*A)/f),R=Math.acos(_),v=1-_*_,y=Math.sqrt(v)),b=1-o.$O.eccentricitySquared*v,w=o.$O.radius/Math.sqrt(b),C=n.a6*w,M=d-w*_,A=c-C*y,I=_*M+y*A,S=_*A-y*M,T=S/(C/b+I),R+=T,z=I+S*T/2,u<0&&(R=-R),i[s++]=x*E,i[s++]=x*R,i[s]=z}const R={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:p},E=(0,s.kU)(1),x=(0,s.KJ)(1),z=.5*Math.PI,P=o.$O.radius,L=P*Math.PI/180,k=180/(P*Math.PI)},91218(e,t,i){i.r(t),i.d(t,{canProjectWithoutEngine:()=>G,initializeProjection:()=>F,isEqualBaseGCS:()=>K,isLoaded:()=>P,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>k,load:()=>U,project:()=>j,projectAsync:()=>V,projectExtent:()=>ne,projectMany:()=>Z,projectMultipoint:()=>Q,projectOrLoad:()=>q,projectOrLoadMany:()=>$,projectPoint:()=>Y,projectPolygon:()=>ie,projectPolyline:()=>ee,projectWithoutEngine:()=>W,requiresLoad:()=>O,test:()=>H,tryProject:()=>D,unload:()=>B});var s=i(49186),n=i(17676),r=i(62788),o=i(95488),l=i(51850),a=i(21276),u=i(73941),c=i(5443),h=i(91075),d=i(48526),p=i(86738),f=i(39829),g=i(82799),m=i(16930),y=i(98764),_=i(159),v=i(9762),b=i(49208);function w(e,t,i,s,n,r){return C[0]=e,C[1]=t,C[2]=i,(0,v.projectBuffer)(C,s,0,n,r,0)}const C=(0,l.vt)();var M=i(60408),A=i(21325),S=i(52006);let I=null,T=null,R=null,E=null,x={};const z=new o.I;function P(){return!!(T?.isLoaded()&&R?.isLoaded()&&E?.isLoaded())}function L(){return!!P()||((0,r.gc)(z),U(),!1)}function k(e,t){return!e||!t||G(e,t)||L()}function O(e,t){return!G(e,t)&&!P()}async function U(e){null==I&&(I=Promise.all([i.e(3276).then(i.bind(i,83276)).then(e=>(T=e,T.load())),i.e(8377).then(i.bind(i,8377)).then(e=>(R=e,R.load())),i.e(2158).then(i.bind(i,12158)).then(e=>(E=e,E.load()))])),await I,(0,n.Te)(e),z.notify()}function j(e,t,i){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),Z(e,e[0].spatialReference,t,i)):((0,a.f)(e),Z([e],e.spatialReference,t,i)[0])}function Z(e,t,i,s){if(null==t||null==i)return e;if(G(t,i,s))return e.map(e=>W(e,t,i));if(null==s?.geographicTransformation&&(0,u.jA)(t))return Z(e.map(e=>W(e,t,m.A.WGS84)),m.A.WGS84,i,{zConversionDisabled:s?.zConversionDisabled});if(null==s?.geographicTransformation&&(0,u.jA)(i))return Z(e,t,m.A.WGS84).map(e=>W(e,m.A.WGS84,i));if(!P())throw new N;if(!s?.geographicTransformation)if(s?.extendedParams)s={...s,geographicTransformation:E.getTransformation(t,i,s.areaOfInterestExtent)||new _.A};else if(!s?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,i);let n=x[e];n||(n=E.getTransformation(t,i)||new _.A,x[e]=n),s={geographicTransformation:n,zConversionDisabled:s?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof h.A?T.executeMany(e,i,s):R.executeMany(e,i,s)}function D(e,t,i){try{return j(e,t,i)}catch(e){return null}}function q(e,t){const i=$([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function $(e,t,i){if(!P())for(const i of e)if(null!=i&&!(0,A.aI)(i.spatialReference,t)&&(0,A.fn)(i.spatialReference)&&(0,A.fn)(t)&&!G(i.spatialReference,t))return(0,r.gc)(z),{pending:U(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,A.aI)(e.spatialReference,t)?e:(0,A.fn)(e.spatialReference)&&(0,A.fn)(t)?j(e,t,i):null)}}class N extends s.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function B(){I=null,T=null,R=null,E=null,x={}}const H={get loadPromise(){return I}};async function V(e,t,i){if((0,n.Te)(i),!e)return e;const s=$(Array.isArray(e)?e:[e],t,i);if(s.pending)return await s.pending,(0,n.Te)(i),V(e,t,i);const r=s.geometries??[];return Array.isArray(e)?r:r[0]}function G(e,t,i){return!(i?.areaOfInterestExtent||i?.extendedParams||i?.geographicTransformation)&&(!!(0,A.aI)(e,t)||(0,A.fn)(e)&&(0,A.fn)(t)&&!!(0,b.jd)(e,t))}function K(e,t){if((0,A.aI)(e,t))return!0;if(!(0,A.fn)(e)||!(0,A.fn)(t))return!1;const i=(0,A.oT)(e)||(0,A.K8)(e)||(0,A.x1)(e),s=(0,A.oT)(t)||(0,A.K8)(t)||(0,A.x1)(t);return i&&s}async function F(e,t,i,s){if(P())return(0,n.NO)(s);if(Array.isArray(e)){for(const{source:t,dest:i,options:n}of e)if(t&&i&&!G(t,i,n))return U(s)}else if(e&&t&&!G(e,t,i))return U(s);return(0,n.NO)(s)}function W(e,t,i){return e?(0,M.fT)(e)?J(e,t,new p.A,i,0):(0,M.ZC)(e)?re(e,t,new c.A,i,0):(0,M.Bi)(e)?se(e,t,new f.A,i,0):(0,M.Rg)(e)?te(e,t,new g.A,i,0):(0,M.U9)(e)?X(e,t,new d.A,i,0):null:null}function Y(e,t,i=t.spatialReference,s=0){return null!=i&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,i,s)}function J(e,t,i,s,n){ue[0]=e.x,ue[1]=e.y;const r=e.z;return ue[2]=void 0!==r?r:n,(0,v.projectBuffer)(ue,t,0,ue,s,0)?(i.x=ue[0],i.y=ue[1],i.spatialReference=s,void 0!==r||(0,u.xP)(s)?(i.z=ue[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function Q(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=X(e,e.spatialReference,t,i,s)}function X(e,t,i,s,n){const{points:r,hasZ:o,hasM:l}=e,a=[],u=r.length,c=[];for(const e of r)c.push(e[0],e[1],o?e[2]:n);if(!(0,v.projectBuffer)(c,t,0,c,s,0,u))return null;const h=ae(o,s);for(let e=0;e<u;++e){const t=3*e,i=c[t],s=c[t+1];h&&l?a.push([i,s,c[t+2],r[e][3]]):h?a.push([i,s,c[t+2]]):l?a.push([i,s,r[e][2]]):a.push([i,s])}return i.points=a,i.spatialReference=s,i.hasZ=o,i.hasM=l,i}function ee(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=te(e,e.spatialReference,t,i,s)}function te(e,t,i,s,n){const{curvePaths:r,paths:o,hasZ:l,hasM:a}=e;if(!(r?le(r,l??!1,a??!1,t,i.curvePaths=[],s,n):oe(o,l??!1,a??!1,t,i.paths,s,n)))return null;const u=ae(l,s);return i.spatialReference=s,i.hasZ=u,i.hasM=a,i}function ie(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=se(e,e.spatialReference,t,i,s)}function se(e,t,i,s,n){const{curveRings:r,rings:o,hasZ:l,hasM:a}=e;return(r?le(r,l??!1,a??!1,t,i.curveRings=[],s,n):oe(o,l??!1,a??!1,t,i.rings,s,n))?(i.spatialReference=s,i.hasZ=ae(l,s),i.hasM=a,i):null}function ne(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=re(e,e.spatialReference,t,i,s)}function re(e,t,i,s,n){const{xmin:r,ymin:o,xmax:l,ymax:a,hasZ:u,hasM:c}=e;if(!w(r,o,u?e.zmin:n,t,ue,s))return null;const h=ae(u,s);return i.xmin=ue[0],i.ymin=ue[1],h&&(i.zmin=ue[2]),w(l,a,u?e.zmax:n,t,ue,s)?(i.xmax=ue[0],i.ymax=ue[1],h&&(i.zmax=ue[2]),c&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=s,i):null}function oe(e,t,i,s,n,r,o=0){const l=new Array;for(const i of e)for(const e of i)l.push(e[0],e[1],t?e[2]:o);if(!(0,v.projectBuffer)(l,s,0,l,r,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,r);for(const t of e){const e=new Array;for(const s of t){const t=l.slice(a,a+=3);c||t.pop(),i&&t.push(s[u]),e.push(t)}n.push(e)}return!0}function le(e,t,i,s,n,r,o=0){const l=new Array;for(const i of e)for(const e of i){if((0,S.FG)(e))return!1;if((0,S.aO)(e)){const[i,s]=e.c;l.push(i[0],i[1],t?i[2]:o,s[0],s[1],o);continue}if((0,S.n1)(e)){const[i,s,n]=e.b;l.push(i[0],i[1],t?i[2]:o,s[0],s[1],o,n[0],n[1],o);continue}const i=e;l.push(i[0],i[1],t?i[2]:o)}if(!(0,v.projectBuffer)(l,s,0,l,r,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,r);for(const t of e){const e=new Array;for(const s of t){const t=l.slice(a,a+=3);if(c||t.pop(),i&&t.push((0,S.yP)(s)[u]),(0,S.FG)(s))return!1;if((0,S.aO)(s)){const i=l[a++],s=l[a++];++a,e.push({c:[t,[i,s]]});continue}if((0,S.n1)(s)){const i=l[a++],s=l[a++];++a;const n=l[a++],r=l[a++];++a,e.push({b:[t,[i,s],[n,r]]});continue}e.push(t)}n.push(e)}return!0}function ae(e,t){return e||(0,u.xP)(t)||(0,A.aI)(t,y.Y0)}const ue=(0,l.vt)()},98764(e,t,i){i.d(t,{GD:()=>o,Y0:()=>u,lO:()=>c});var s=i(73941),n=i(16930),r=i(21325);const o=new n.A(s.fv),l=new n.A(s.FY),a=new n.A(s.LJ),u=new n.A(s.Ro);function c(e){const t=h.get(e);if(t)return t;let i=o;if(e)if(e===l)i=l;else if(e===a)i=a;else{const t=e.wkid,s=e.latestWkid;if(null!=t||null!=s)(0,r.tl)(t)||(0,r.tl)(s)?i=l:((0,r.ZL)(t)||(0,r.ZL)(s))&&(i=a);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===d?i=l:e===p&&(i=a)}}}return h.set(e,i),i}const h=new Map,d=l.wkt.toUpperCase(),p=a.wkt.toUpperCase()},34403(e,t,i){i.d(t,{TP:()=>o});var s=i(79258);Math.PI;const n=s.$O.radius,r=s.$O.eccentricitySquared,o={a1:n*r,a2:n*r*n*r,a3:n*r*r/2,a4:n*r*n*r*2.5,a5:n*r+n*r*r/2,a6:1-r};s.$O.radius,s.$O.flattening,s.Sw.radius,s.Sw.flattening,s.sH.radius,s.sH.flattening,s.sH.radius},38732(e,t,i){i.r(t),i.d(t,{default:()=>S});var s=i(5482),n=i(11254),r=i(49186),o=i(97768),l=i(25728),a=i(17676),u=i(84952),c=i(91429),h=i(54239),d=i(4146),p=i(89186),f=i(18768),g=i(34287),m=i(8303),y=i(10873),_=i(87378),v=i(35982);class b extends v.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(w.forEach((e,t)=>{e===this&&w.delete(t)}),this.destroy())}}const w=new Map;var C=i(36005);let M=class extends((0,p.f)((0,f.b)((0,g.q)((0,m.A)((0,l.M)(d.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=w.get(e);return t||(null!=e?(t=new b(t=>e.immediate.schedule(t)),w.set(e,t)):(t=new b,w.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new r.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(a.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,s){const o=s?.signal,l={responseType:"array-buffer",signal:o,useQueue:s?.useQueue,priority:s?.priority},a={noDataValue:s?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,t,i,s);const u=await(0,n.A)(this.getTileUrl(e,t,i),l),c=await this._lercDecoder.decode(u.data,a,o);if(!c)throw new r.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new _.A({values:c.pixelData,width:c.width,height:c.height,noDataValue:c.noDataValue})}getTileUrl(e,t,i){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,n=(0,u.x0)({...this.parsedUrl.query,blankTile:!s&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${n?"?"+n:""}`}async queryElevation(e,t){const{query:s}=await i.e(91).then(i.bind(i,90091));return(0,a.Te)(t),s(this,e,t)}async createElevationSampler(e,t){const{createSampler:s}=await i.e(91).then(i.bind(i,90091));return(0,a.Te)(t),s(this,e,t)}_fetchTileAvailability(e,t,i,s){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,s):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,n.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,s.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,s.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,type:h.A})],M.prototype,"heightModelInfo",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,s.Cg)([(0,c.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,s.Cg)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)(y.OZ)],M.prototype,"url",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"version",void 0),(0,s.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,s.Cg)([(0,c.$K)("esri.layers.ElevationLayer")],M);const A=Symbol("default-fetch-tile");M.prototype.fetchTile[A]=!0;const S=M},4146(e,t,i){i.d(t,{A:()=>_});var s=i(5482),n=i(11254),r=i(49186),o=i(65529),l=i(4902),a=i(92474),u=i(53966),c=i(17676),h=i(84952),d=i(91429),p=i(5443),f=i(16930),g=i(92602),m=i(79677);let y=0,_=class extends((0,o.Zt)((0,l.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:s}=await Promise.all([i.e(812),i.e(5613),i.e(909)]).then(i.bind(i,45613));try{return await s(t)}catch(e){const i=t?.portalItem,s=i?.id||"unset",n=i?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+s+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(e,t){return Promise.reject(new r.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new r.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,s.Cg)([(0,d.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,s.Cg)([(0,d.MZ)({type:p.A})],_.prototype,"fullExtent",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,s.Cg)([(0,d.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,s.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,s.Cg)([(0,d.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,s.Cg)([(0,d.MZ)({type:f.A})],_.prototype,"spatialReference",void 0),(0,s.Cg)([(0,d.MZ)({type:String})],_.prototype,"title",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,s.Cg)([(0,d.MZ)()],_.prototype,"url",void 0),(0,s.Cg)([(0,d.MZ)({type:m.A})],_.prototype,"visibilityTimeExtent",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,s.Cg)([(0,d.$K)("esri.layers.Layer")],_)},18768(e,t,i){i.d(t,{b:()=>l});var s=i(5482),n=i(53966),r=i(91429),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,n.A.getLogger(this)))}};return(0,s.Cg)([(0,r.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,r.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISService")],i),i}},8303(e,t,i){i.d(t,{A:()=>w});var s=i(5482),n=i(92602),r=i(70333),o=i(11254),l=i(60999),a=i(49186),u=i(53966),c=i(97768),h=i(17676),d=i(84952),p=i(91429),f=i(77548),g=i(20655),m=i(80812),y=i(41318),_=i(10407),v=i(36005),b=i(43937);const w=e=>{const t=e;let w=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new m.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await i.e(1204).then(i.bind(i,41204));return(0,h.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,h.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!r.id?.findCredential(this.url),n=e===i.id;if(n&&i.portal.user)return this._getUserPrivileges(i,s);let o,l;if(n)o=i.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!o||!(0,d.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(r.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(n?await i.reload():(i=new m.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,s)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const i=(0,_.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,n=g.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(s))return n.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?y.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return i&&s&&!(0,d.ut)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s.Cg)([(0,p.MZ)({type:m.default})],w.prototype,"portalItem",null),(0,s.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],w.prototype,"readPortalItem",null),(0,s.Cg)([(0,b.K)("web-document","portalItem",{itemId:{type:String}})],w.prototype,"writePortalItem",null),(0,s.Cg)([(0,p.MZ)({clonable:!1})],w.prototype,"resourceReferences",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasEditingPrivileges",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasFullEditingPrivileges",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasUpdateItemPrivileges",void 0),w=(0,s.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],w),w},C={credential:null,user:null}},87378(e,t,i){i.d(t,{A:()=>l});var s,n=i(34275),r=i(56507);const o=Symbol("ElevationTileDataClass");class l{static{s=o}constructor({values:e,width:t,height:i,noDataValue:r}){this[s]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,n.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=r}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,s=-1/0,n=!0;for(const r of t)r===e?this._hasNoDataValues=!0:(i=r<i?r:i,s=r>s?r:s,n=!1);n?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=s>-3e38?s:0)}static{this.from=(0,r.qf)(l)}}},77548(e,t,i){i.d(t,{Gh:()=>z,tk:()=>I,BR:()=>S,p2:()=>M,qd:()=>T,wI:()=>A,G$:()=>E,$x:()=>R,Ov:()=>v,cM:()=>d,UC:()=>p,W_:()=>b,Qz:()=>f,OP:()=>x,TU:()=>_,F2:()=>g,XX:()=>y,jy:()=>w});var s=i(70333),n=i(11254),r=i(7762),o=(i(84952),i(36563)),l=i(36708),a=i(4146);const u=new WeakMap;function c(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof a.A)&&("catalog-dynamic-group"===t.type||c(t))},t=>u.set(e,t),l.pc),(0,o.hA)(()=>u.delete(e))]),u.get(e))}function h(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function d(e){return h(e,"knowledge-graph")&&"layers"in e}function p(e){return h(e,"knowledge-graph-sublayer")}function f(e){return h(e,"link-chart")&&"layers"in e}function g(e){return h(e,"subtype-group")&&"sublayers"in e}function m(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}i(16215);const y={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function _(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function v(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function b(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function w(e){return function(e){return"subtype-sublayer"===e?.type}(e)||function(e){return null!=e&&"object"==typeof e&&"type"in e&&"oriented-imagery"===e.type}(e)||function(e){return h(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function C(e){const t=e?.type;return"binning"===t||"cluster"===t}function M(e,t){if(!w(e))return;const i=t?.graphic,s="featureReduction"in e?e.featureReduction:null;if(i){if(i.isAggregate){const e=i.origin;return e&&"featureReductionProvider"in e&&s?C(s)?s:null:void 0}return e}return t?.checkFeatureReduction&&s?C(s)?s:null:e}async function A(e,t){const i=s.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const r=e.toLowerCase().indexOf("/rest/services");if(-1===r)return null;const o=`${e.slice(0,r)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function S(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function I(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function T(e){const t=new r.A;for(const i of e.allLayers.concat(e.allTables))c(i)||m(i)||("charts"in i&&t.push(i),"subtype-group"===i.type&&t.push(...i.sublayers));return t}function R(e,t){return null}function E(e){return null}function x(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function z(e,t){if(!t||!x(e))return;const i=(e.url,null);i&&(e.url=i)}},10407(e,t,i){i.d(t,{It:()=>p,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>l,bK:()=>a,mm:()=>d,sQ:()=>h});var s=i(91218),n=i(16930),r=i(28735);function o(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?o(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,r.ci)(e);const i=n.A.WGS84;return await(0,s.initializeProjection)(t,i),(0,s.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:i,itemControl:s}=e,n=t.user?.privileges;let r=!n||n.includes("features:user:edit"),o=!!i&&!!n?.includes("features:user:fullEdit");const l="update"===s||"admin"===s;return l?o=r=!0:o&&(r=!0),{features:{edit:r,fullEdit:o},content:{updateItem:l}}}},73133(e,t,i){i.d(t,{j:()=>s});const s=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"})},16215(e,t,i){i.d(t,{S:()=>n,Y:()=>s});const s=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&s in e}},79677(e,t,i){i.d(t,{A:()=>d});var s,n=i(5482),r=i(25482),o=i(88930),l=i(91429),a=i(98623),u=i(10184),c=i(36005),h=i(43937);let d=class extends r.o{static{s=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new s({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,s=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===s&&i===n}expandTo(e,t=a.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,new u.A({value:1,unit:e}),t));let n=this.end;if(n){const i=(0,o.lL)(n,new u.A({value:1,unit:e}),t);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new s({start:i,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,l;return n>=t&&n<=i?o=n:t>=n&&t<=r&&(o=t),i>=n&&i<=r?l=i:r>=t&&r<=i&&(l=r),null==o||null==l||isNaN(o)||isNaN(l)?s.empty:new s({start:o===-1/0?null:new Date(o),end:l===1/0?null:new Date(l)})}offset(e,t,i=a.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const n=new s,{start:r,end:l}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,i)),null!=l&&(n.end=(0,o.S1)(l,e,t,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,c.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,h.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,c.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,h.K)("start")],d.prototype,"writeStart",null),d=s=(0,n.Cg)([(0,l.$K)("esri.time.TimeExtent")],d);const p=new d,f=new d({start:void 0,end:void 0})},10184(e,t,i){i.d(t,{A:()=>c});var s=i(5482),n=i(69540),r=i(25482),o=i(88930),l=i(91429),a=i(73133),u=i(93223);let c=class extends((0,n.OU)(r.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,s.Cg)([(0,u.e)(a.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,s.Cg)([(0,l.$K)("esri.time.TimeInterval")],c)},78553(e,t,i){i.d(t,{D:()=>r,p:()=>n});var s=i(56507);function n(e){const t=(0,s.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function r(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|