@arcgis/core 6.0.0-next.26 → 6.0.0-next.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{6f1d6453184e0a1530ad.js → 00580a68835aac653038.js} +22 -22
- package/assets/esri/core/workers/chunks/0363d29fc665d169ebc4.js +1 -0
- package/assets/esri/core/workers/chunks/037c67ef5c4398d5954d.js +1 -0
- package/assets/esri/core/workers/chunks/07b726a46864501b90a0.js +1 -0
- package/assets/esri/core/workers/chunks/0864da8f8f147016cf1c.js +1 -0
- package/assets/esri/core/workers/chunks/0bd04bcd4b2710838d48.js +1 -0
- package/assets/esri/core/workers/chunks/{768389f7f8dba6080df7.js → 0cc7fba402a93e6d2455.js} +2 -2
- package/assets/esri/core/workers/chunks/0cfdeb53fb7d5532cf01.js +1 -0
- package/assets/esri/core/workers/chunks/112ed86f812e4400a7e0.js +1 -0
- package/assets/esri/core/workers/chunks/177f353ce72133e2eeed.js +1 -0
- package/assets/esri/core/workers/chunks/1dc6f093028530a492e6.js +1 -0
- package/assets/esri/core/workers/chunks/2294254af2c6afb560ee.js +1 -0
- package/assets/esri/core/workers/chunks/23a4806b4cdf7cc32e4d.js +1 -0
- package/assets/esri/core/workers/chunks/2447d2e2a4a3ab8fcf94.js +1 -0
- package/assets/esri/core/workers/chunks/271ae7deccb94112c2df.js +1 -0
- package/assets/esri/core/workers/chunks/2df37a9a95ceebb87a5f.js +1 -0
- package/assets/esri/core/workers/chunks/2e00c155e447e4930442.js +1 -0
- package/assets/esri/core/workers/chunks/2e9a1673b1d51aa082b6.js +1 -0
- package/assets/esri/core/workers/chunks/344f5334ad95c7974349.js +1 -0
- package/assets/esri/core/workers/chunks/348f1def9cd2ddf92e87.js +1 -0
- package/assets/esri/core/workers/chunks/{8e4206068c6953bb7df2.js → 3a47fc97c400fca2c736.js} +1 -1
- package/assets/esri/core/workers/chunks/47c97640ec525676918b.js +1 -0
- package/assets/esri/core/workers/chunks/50763ea061d5fb3f2e49.js +1 -0
- package/assets/esri/core/workers/chunks/518ab22f80c3300bcfff.js +1 -0
- package/assets/esri/core/workers/chunks/58609bf94f72bc4f1952.js +1 -0
- package/assets/esri/core/workers/chunks/586a929bc037e23857af.js +1 -0
- package/assets/esri/core/workers/chunks/58d10e0b35968680fd9f.js +1 -0
- package/assets/esri/core/workers/chunks/59bc55880e6fd8ce20c0.js +1 -0
- package/assets/esri/core/workers/chunks/62a0abcf45a2bd14ecbe.js +1 -0
- package/assets/esri/core/workers/chunks/63c4412c16d8a44a5668.js +1 -0
- package/assets/esri/core/workers/chunks/6b4c3411f63a9ad9354c.js +1 -0
- package/assets/esri/core/workers/chunks/{f528ac5c648ca6a98582.js → 711cfb84659cb4437679.js} +1 -1
- package/assets/esri/core/workers/chunks/77463141652bf1ca6fb2.js +1 -0
- package/assets/esri/core/workers/chunks/7d3f7940815fa5dc244e.js +1 -0
- package/assets/esri/core/workers/chunks/914a0b5d9fef683cdf9c.js +1 -0
- package/assets/esri/core/workers/chunks/96f87c8efd4b11b37686.js +1 -0
- package/assets/esri/core/workers/chunks/97ec46605f16333144b7.js +1 -0
- package/assets/esri/core/workers/chunks/{7b482afb9fd1229f5707.js → 9934e8e19f94e9169eea.js} +1 -1
- package/assets/esri/core/workers/chunks/99f51d5d9da6e9bfc430.js +1 -0
- package/assets/esri/core/workers/chunks/9aebe876b1a2fb075f9c.js +1 -0
- package/assets/esri/core/workers/chunks/9c3db7a7c05fa0e81f0a.js +1 -0
- package/assets/esri/core/workers/chunks/a2cc53ad1a514167e4b8.js +1 -0
- package/assets/esri/core/workers/chunks/a33ba23aee3f8f40200f.js +1 -0
- package/assets/esri/core/workers/chunks/{45ba4aa87a4732198596.js → b13d8f4e4e80ef00b1bd.js} +1 -1
- package/assets/esri/core/workers/chunks/b3801d58c024224917df.js +1 -0
- package/assets/esri/core/workers/chunks/b3aa29589dcfb5b93106.js +1 -0
- package/assets/esri/core/workers/chunks/b3dbcf43f136ba2dadc5.js +1 -0
- package/assets/esri/core/workers/chunks/b9596d862da1ec342cd3.js +1 -0
- package/assets/esri/core/workers/chunks/bc1fcc9c897461e68e29.js +1 -0
- package/assets/esri/core/workers/chunks/{8b4e9fd88c0c313416d4.js → be04f40f8b403befd0ef.js} +1 -1
- package/assets/esri/core/workers/chunks/c29091fe157564cffcf7.js +1 -0
- package/assets/esri/core/workers/chunks/{150e7a7bd5df25693da7.js → c90388932a7825d9d933.js} +1 -1
- package/assets/esri/core/workers/chunks/ca21786e519c914fc9e1.js +1 -0
- package/assets/esri/core/workers/chunks/cdb5c26fed7d9a97db49.js +1 -0
- package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +1 -0
- package/assets/esri/core/workers/chunks/d63e181f0e48bde73395.js +1 -0
- package/assets/esri/core/workers/chunks/d77888c84a8b49478807.js +1 -0
- package/assets/esri/core/workers/chunks/d7f2f1708d2a2668676c.js +1 -0
- package/assets/esri/core/workers/chunks/ec1c4d66142b6efb0e8b.js +1 -0
- package/assets/esri/core/workers/chunks/ef2c3febcceedc44b3ac.js +1 -0
- package/assets/esri/core/workers/chunks/f08a2a262a3b55149396.js +1 -0
- package/assets/esri/core/workers/chunks/f2d56f5c15d5977e1d19.js +1 -0
- package/assets/esri/core/workers/chunks/ffe2077a9df7c838ea27.js +1 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/chunks/GlobalIllumination.glsl.js +15 -30
- package/chunks/RibbonLine.glsl.js +2 -2
- package/config.js +1 -1
- package/core/ReentrantObjectPool.js +1 -1
- package/core/memoryEstimations.js +1 -1
- package/core/workers/workers.js +2 -2
- package/core/workers.d.ts +1 -1
- package/form/elements/inputs.d.ts +126 -25
- package/form/elements/inputs.js +1 -1
- package/form/elements.d.ts +1 -0
- package/geometry/support/Indices.js +1 -1
- package/graphic/MapNotesGraphicOrigin.d.ts +1 -0
- package/kernel.js +1 -1
- package/layers/GeospatialPDFLayer.js +1 -1
- package/layers/MapNotesLayer.d.ts +3 -2
- package/layers/VectorTileLayer.d.ts +10 -1
- package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +2 -1
- package/layers/geospatialPDF/CIM2DLayerview.js +2 -0
- package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/SublayersOwner.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/support/Sublayer.d.ts +2 -2
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/package.json +3 -3
- package/rest/support/AttributeBinsQuery.d.ts +3 -2
- package/rest/support/ImageGPSInfoParameters.d.ts +2 -1
- package/rest/support/OutDistance.d.ts +2 -1
- package/rest/support/Query.d.ts +3 -2
- package/rest/support/TopFeaturesQuery.d.ts +2 -1
- package/rest/support/types.d.ts +10 -1
- package/smartMapping/raster/renderers/flow.d.ts +2 -1
- package/smartMapping/renderers/color.d.ts +11 -8
- package/smartMapping/renderers/location.d.ts +7 -4
- package/smartMapping/renderers/predominance.d.ts +7 -4
- package/smartMapping/renderers/relationship.d.ts +7 -4
- package/smartMapping/renderers/size.d.ts +6 -4
- package/smartMapping/renderers/type.d.ts +7 -4
- package/smartMapping/renderers/types.d.ts +15 -0
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -2
- package/smartMapping/symbology/flow.d.ts +2 -1
- package/smartMapping/symbology/types.d.ts +2 -1
- package/symbols/cim/CIMCursor.js +1 -1
- package/tables/elements.d.ts +1 -0
- package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
- package/views/2d/engine/webgl/textureUtils.js +1 -1
- package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/3d/layers/GeospatialPDFLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayerBase.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicCreationContext.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainData.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TextureFader.js +1 -1
- package/views/3d/terrain/TextureReference.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderInfo.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +25 -25
- 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/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
- package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
- package/views/3d/webgl-engine/lib/DirtyEvents.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/geometryMemoryUtils.js +2 -0
- package/views/VideoView.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/views/selection/types.d.ts +43 -3
- package/views/support/layerViewUtils.js +1 -1
- package/views/support/selectionUtils.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer.js +2 -2
- package/widgets/Print.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +6 -0
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/ItemBase.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +6 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.d.ts +8 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0320cbd825f9a4222042.js +0 -1
- package/assets/esri/core/workers/chunks/067de1910190da228291.js +0 -1
- package/assets/esri/core/workers/chunks/09bd5df07eab80ae7b15.js +0 -1
- package/assets/esri/core/workers/chunks/164e74d586297946a717.js +0 -1
- package/assets/esri/core/workers/chunks/1c0c5cb13c2590aae906.js +0 -1
- package/assets/esri/core/workers/chunks/1c77de1e79860f8d2228.js +0 -1
- package/assets/esri/core/workers/chunks/24dac4970526a4e0ae63.js +0 -1
- package/assets/esri/core/workers/chunks/2acf2952cef69e382a35.js +0 -1
- package/assets/esri/core/workers/chunks/30dcf2cfb31cb70de7df.js +0 -1
- package/assets/esri/core/workers/chunks/371e2ddb88cc6b9a41e8.js +0 -1
- package/assets/esri/core/workers/chunks/42f6194633c2d879c8da.js +0 -1
- package/assets/esri/core/workers/chunks/44f90e75c1dc3d726a95.js +0 -1
- package/assets/esri/core/workers/chunks/4abd3753cd9b80e4d937.js +0 -1
- package/assets/esri/core/workers/chunks/4bb9a5f4ca944d3fc206.js +0 -1
- package/assets/esri/core/workers/chunks/4c389472b8cdb0c55154.js +0 -1
- package/assets/esri/core/workers/chunks/4d93bed14945e3d34d5c.js +0 -1
- package/assets/esri/core/workers/chunks/4e3f651ac76fcd53df2b.js +0 -1
- package/assets/esri/core/workers/chunks/505227797bcf2a1d908d.js +0 -1
- package/assets/esri/core/workers/chunks/58da3f8cf0f7f6a7e4fa.js +0 -1
- package/assets/esri/core/workers/chunks/5a19a9c3e01d3d415188.js +0 -1
- package/assets/esri/core/workers/chunks/5a830bc35adbedd33783.js +0 -1
- package/assets/esri/core/workers/chunks/6db0f8fe1402643fbe1a.js +0 -1
- package/assets/esri/core/workers/chunks/7124ad8dc5ad40dc66f3.js +0 -1
- package/assets/esri/core/workers/chunks/7446d0dfebf93e86c098.js +0 -1
- package/assets/esri/core/workers/chunks/7c631e2947243e2c9bde.js +0 -1
- package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +0 -1
- package/assets/esri/core/workers/chunks/7fb7493f483cd9878bfa.js +0 -1
- package/assets/esri/core/workers/chunks/8e310e9cb9d84ac3ca2f.js +0 -1
- package/assets/esri/core/workers/chunks/950d4578dc450467404c.js +0 -1
- package/assets/esri/core/workers/chunks/99a0a434ea2162166754.js +0 -1
- package/assets/esri/core/workers/chunks/9afc87474cef1fc4fe4a.js +0 -1
- package/assets/esri/core/workers/chunks/9cbde13e536676767900.js +0 -1
- package/assets/esri/core/workers/chunks/9cd3fcb5fca6f9dbbcd8.js +0 -1
- package/assets/esri/core/workers/chunks/a025ee38d402504193df.js +0 -1
- package/assets/esri/core/workers/chunks/a4b822ee45810c4c292a.js +0 -1
- package/assets/esri/core/workers/chunks/a51576d84edca88e41dd.js +0 -1
- package/assets/esri/core/workers/chunks/ac24b4370dc7194a3107.js +0 -1
- package/assets/esri/core/workers/chunks/ace41659a5ca0e5abfc3.js +0 -1
- package/assets/esri/core/workers/chunks/b01804aa6c47a220a603.js +0 -1
- package/assets/esri/core/workers/chunks/b3273f847405799e3362.js +0 -1
- package/assets/esri/core/workers/chunks/ba3d5abff65aefcb8dee.js +0 -1
- package/assets/esri/core/workers/chunks/bca6b469940b7b954123.js +0 -1
- package/assets/esri/core/workers/chunks/c0d7ae314ebfad1e3791.js +0 -1
- package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +0 -1
- package/assets/esri/core/workers/chunks/cd9aa950cb74b09008fe.js +0 -1
- package/assets/esri/core/workers/chunks/e0d9dc97985561320bd4.js +0 -1
- package/assets/esri/core/workers/chunks/e2775b4b753306dc8477.js +0 -1
- package/assets/esri/core/workers/chunks/eaddffcc7004101fc230.js +0 -1
- package/assets/esri/core/workers/chunks/ebbf425af348e6ede814.js +0 -1
- package/assets/esri/core/workers/chunks/efc53007cd2e4991d7d4.js +0 -1
- package/assets/esri/core/workers/chunks/f46e92c67986c8c09bdd.js +0 -1
- package/assets/esri/core/workers/chunks/f8bc474434fd365ab174.js +0 -1
- package/assets/esri/core/workers/chunks/f8d2225f333524ce1d88.js +0 -1
- package/assets/esri/core/workers/chunks/f95a1f878c9c1146180e.js +0 -1
- package/assets/esri/core/workers/chunks/fb37f0848196c28b7fd7.js +0 -1
- /package/assets/esri/core/workers/chunks/{768389f7f8dba6080df7.js.LICENSE.txt → 0cc7fba402a93e6d2455.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2063],{66131(e,t,i){i.d(t,{lY:()=>c,mT:()=>m});var n=i(59534),r=i(799),s=i(3330),o=i(84741),a=i(34747);const l={TimeZoneNotRecognized:"Timezone identifier has not been recognized."};class u extends Error{constructor(e,t){super((0,r.HC)(l[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,u)}}function h(e,t,i){return e<t?e-t:e>i?e-i:0}function d(e,t,i){return e<t?t:e>i?i:e}class c{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,i=1,n=0,r=0,s=0,o=0,l){if(isNaN(e)||isNaN(t)||isNaN(i)||isNaN(n)||isNaN(r)||isNaN(s)||isNaN(o))return null;let u=a.c9.local(e,t).daysInMonth,f=a.c9.fromObject({day:d(i,1,u),year:e,month:d(t,1,12),hour:d(n,0,23),minute:d(r,0,59),second:d(s,0,59),millisecond:d(o,0,999)},{zone:m(l)});return f=f.plus({months:h(t,1,12),days:h(i,1,u),hours:h(n,0,23),minutes:h(r,0,59),seconds:h(s,0,59),milliseconds:h(o,0,999)}),new c(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){let i=m(t);return e.isUnknownTimeZone||i===s.GB.instance?c.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,i):new c(e._date.setZone(i))}static dateJSToArcadeDate(e){return new c(a.c9.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){let i=m(t);return new c(a.c9.fromJSDate(e,{zone:i}))}static unknownEpochToArcadeDate(e){return new c(a.c9.fromMillis(e,{zone:s.GB.instance}))}static unknownDateJSToArcadeDate(e){return new c(a.c9.fromMillis(e.getTime(),{zone:s.GB.instance}))}static epochToArcadeDate(e,t="system"){let i=m(t);return new c(a.c9.fromMillis(e,{zone:i}))}static dateTimeToArcadeDate(e){return new c(e)}clone(){return new c(this._date)}changeTimeZone(e){let t=m(e);return c.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){let i=m(t);return e.zone===s.GB.instance||i===s.GB.instance?c.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,i):new c(e.setZone(i))}static nowToArcadeDate(e){let t=m(e);return new c(a.c9.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new c(a.c9.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===c.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===s.GB.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";let e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new c(this._date.plus(e))}diff(e,t){return this._date.diff(e._date,t)[t]}toISODate(){return this._date.toISODate()}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(e,t){return this._date.toISOTime({suppressMilliseconds:e,includeOffset:t&&!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new c(this._date.toUTC())}toLocal(){return new c(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;let t=a.c9.fromISO(e,{setZone:!0});return new c(t)}}function m(e,t=!0){if(e instanceof a.bo)return e;switch((0,n.B)(e)){case"system":return"system";case"utc":return"UTC";case"unknown":return s.GB.instance}if(/^[+-]?[0-9]{1,2}(:[0-9]{2})?$/.test(e)){let t=a.mQ.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}let i=(0,o.p)(e);if(!i.isValid){if(t)throw new u("TimeZoneNotRecognized");return null}return i}},59534(e,t,i){i.d(t,{B:()=>r,b:()=>s});var n=i(85935);function r(e){return e.toLowerCase().replaceAll(/[\s-]+/g,"")}class s{constructor(e,t){let i=new Map;for(let t of e){let e=r(t);if(i.has(e))throw Error(`${t} already added as ${i.get(e)}`);i.set(e,t)}if(null!=t)for(let[e,n]of t){let t=r(e);if(i.has(t))throw Error(`${e} already associated with ${i.get(t)}`);i.set(t,n)}this._enumMap=i}lookup(e){return this._enumMap.get(r(e))}get(e){let t=this.lookup(e);if(null==t)throw new n.D$("InvalidParameter",null);return t}}},85935(e,t,i){i.d(t,{D$:()=>a,O$:()=>h,i2:()=>d,mT:()=>u,ps:()=>m});var n=i(799);const r={TypeNotAllowedInFeature:"Feature attributes only support dates, numbers, strings, guids.",LogicError:"Logic error - {reason}",CannotCompareDateAndTime:"Cannot compare date or dateonly with timeonly types",NeverReach:"Encountered unreachable logic",AsyncNotEnabled:"Async Arcade must be enabled for this script",ModuleAccessorMustBeString:"Module accessor must be a string",ModuleExportNotFound:"Module has no export with provided identifier",ModulesNotSupported:"Current profile does not support modules",ArrayAccessMustBeNumber:"Array accessor must be a number",FunctionNotFound:"Function not found",FieldNotFound:"Key not found - {key}",CircularModules:"Circular module dependencies are not allowed",Cancelled:"Execution cancelled",UnsupportedHashType:"Type not supported in hash function",IllegalResult:"Value is not a supported return type",PortalRequired:"Portal is required",InvalidParameter:"Invalid parameter",WrongNumberOfParameters:"Call with wrong number of parameters",Unrecognized:"Unrecognized code structure",UnrecognizedType:"Unrecognized type",WrongSpatialReference:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",BooleanConditionRequired:"Conditions must use booleans",NoFunctionInDictionary:"Dictionaries cannot contain functions.",NoFunctionInArray:"Arrays cannot contain functions.",NoFunctionInTemplateLiteral:"Template Literals do not expect functions by value.",KeyAccessorMustBeString:"Accessor must be a string",KeyMustBeString:"Object keys must be a string",Immutable:"Object is immutable",UnexpectedToken:"Unexpected token",MemberOfNull:"Cannot access property of null object",MaximumCallDepth:"Exceeded maximum function depth",OutOfBounds:"Out of bounds",InvalidIdentifier:"Identifier not recognized",CallNonFunction:"Expression is not a function",InvalidMemberAccessKey:"Cannot access value using a key of this type",AssignModuleFunction:"Cannot assign function to module variable",UnsupportUnaryOperator:"Unsupported unary operator",UnsupportedOperator:"Unsupported operator",LogicalExpressionOnlyBoolean:"Logical expressions must be boolean",LogicExpressionOrAnd:"Logical expression can only be combined with || or &&",CannotChangeTimeZoneTime:"Cannot change the timezone of a Time",CannotChangeTimeZoneDateOnly:"Cannot change the timezone of a DateOnly",FeatureSetDoesNotHaveSubtypes:"FeatureSet does not have subtypes"};function s(e){return"object"==typeof e&&"line"in e&&"column"in e&&"number"==typeof e.line&&"number"==typeof e.column}class o extends Error{constructor(e,t){super(l(t)+("object"==typeof e&&e&&"message"in e?e.message:""),{cause:e}),this.loc=t?.loc??null}}class a extends Error{constructor(e,t,i){super("Execution error - "+l(t)+(0,n.HC)(r[e],i)),this.declaredRootClass="esri.arcade.arcadeexecutionerror",this.loc=t?.loc??null}}function l(e){return null==e?.loc?"":`Line ${e.loc.start.line}:${e.loc.start.column}: `}class u extends Error{constructor(e,t,i){super("Compilation error - "+l(t)+(0,n.HC)(r[e],i)),this.declaredRootClass="esri.arcade.arcadecompilationerror",this.loc=t?.loc??null}}class h extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror"}}function d(e,t){return!function(e){if(e instanceof Error&&"loc"in e){let t=e.loc;return null==t||"object"==typeof t&&"start"in t&&null!=t.start&&s(t.start)&&(!("end"in t)||null==t.end||s(t.end))}return!1}(e)||null==e.loc&&null!=t?.loc?new o(e,t):e}const c={UnrecognizedUri:"Unrecognized uri - {uri}",UnsupportedUriProtocol:"Unrecognized uri protocol"};class m extends Error{constructor(e,t){super((0,n.HC)(c[e],t)),this.declaredRootClass="esri.arcade.arcademoduleerror"}}},69540(e,t,i){var n=i(32198),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;let i=e,r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){let t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");let i=t.metadata,n=t.store,r={},l=new Map;for(let t in i){let o=i[t],a=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;let h=this[t],d=null;if("function"==typeof u)d=u(h,e);else if("reference"===u)d=h;else if(d=(0,s.TU)(h,e),null!=h&&null==d)continue;0===a?l.set(t,d):r[t]=d}let u=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){let e=(0,a.oY)(u)?.store;if(e)for(let[t,i]of l)e.set(t,i,0)}return u}};return r=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],r),r},d=h(r.A);i.d(t,["OU",0,h,"Pw",0,d])},66344(e,t,i){i.d(t,{q:()=>a});const n=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{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){return this._db.get(e.id+t)?.size??0}put(e,t,i,r,o){t=e.id+t;let a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,i,r,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return n||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,i,0,0);let l=1+Math.max(o,-4)- -3;this._db.set(t,new s(i,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;let i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let n=i.entry.usedMemory;for(;n>this._maxSize;){let e=this._notifyRemove(t,i.entry,n,1);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}i.size=n,this._size+=n,e.size+=n,this._checkSize()}pop(e,t){t=e.id+t;let 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;let 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){let i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let 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=[];this._db.forEach((e,n)=>{let r=e.lifetime;i[r]=(i[r]||0)+e.size,this._clients.forEach(i=>{let{id:r,name:s}=i;if(n.startsWith(r)){let i=t[s]||0;t[s]=i+e.size}})});let n={};this._clients.forEach(e=>{let i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let r=t[i]||0;t[i]=r,n[i]=Math.round(100*e.hitRate)+"%"}else n[i]="0%"});let r=Object.keys(t);r.sort((e,i)=>t[i]-t[e]),r.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+n[i]);for(let t=i.length-1;t>=0;--t){let n=i[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let 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(let[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,n){let r=this._clients.get(e.split(o)[0])?.removeFunc,s=r?.(t,n,i);return"number"==typeof s?s: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){let i=t??this;if(i.size<=e)return;let n=t?.id,r=!0;for(;r;){r=!1;for(let[s,a]of this._db)if(0===a.lifetime&&(!n||s.startsWith(n))){let n=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,a,n),i.size<=.9*e)return;r||=this._db.has(s)}}for(let[r,s]of this._db)if(!n||r.startsWith(n)){let n=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,s,n),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);let n=this._notifyRemove(e,t.entry,t.size,1);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class s{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new r(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(){}}},60999(e,t,i){i.d(t,{DZ:()=>f,Ke:()=>m,QA:()=>p,Tj:()=>h,UT:()=>y,aD:()=>_,jJ:()=>u});var n=i(32198),r=i(69622),s=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))).map(e=>e.value)}function d(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function m(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return d(await e)}catch(e){return c(e)}}async function f(e){try{return d(await e)}catch(e){return(0,o.QP)(e),c(e)}}function p(e){if(!0===e.ok)return e.value;throw e.error}function y(e,t){return new g(e,t)}let g=class extends r.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,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=d(e),this._cleanup()},e=>{this._result=c(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,a.MZ)()],g.prototype,"value",null),(0,n.Cg)([(0,a.MZ)()],g.prototype,"error",null),(0,n.Cg)([(0,a.MZ)()],g.prototype,"finished",null),(0,n.Cg)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,n.Cg)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},67482(e,t,i){function n(e){return null!==r(e)}function r(e){return function(e){let t=s.exec(e);if(!t?.groups)return null;let i=t.groups,n=+i.year,r=i.month-1,o=+i.day,a=+(i.hours??"0"),l=+(i.minutes??"0"),u=+(i.seconds??"0");if(a>23||l>59||u>59)return null;let h,d=i.ms??"0",c=d?+d.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)h=Date.UTC(n,r,o,a,l,u,c);else{let e=+i.offsetHours,t=+i.offsetMinutes;h=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,r,o,a,l,u,c)}return Number.isNaN(h)?null:h}(e)??function(e){let t=new Date(e),i=t.getTime();return Number.isNaN(i)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?i:null}(e)??function(e){if(!o.test(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}i.d(t,{C:()=>n,_:()=>r});const s=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,o=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(e,t,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(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]]}i.d(t,{o8:()=>r,vt:()=>n});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(e,t,i,n,r,s,o,a,l,u,h,d,c,m,f,p){return[e,t,i,n,r,s,o,a,l,u,h,d,c,m,f,p]}},Symbol.toStringTag,{value:"Module"})),i.d(t,["zK",0,s])},35522(e,t,i){i.d(t,{$A:()=>v,Bw:()=>s,C:()=>o,Cc:()=>C,DI:()=>M,Io:()=>_,Ln:()=>g,Om:()=>x,Qr:()=>d,Re:()=>u,S8:()=>w,T9:()=>p,WQ:()=>l,Z0:()=>I,_S:()=>m,aI:()=>O,ei:()=>F,fw:()=>D,gL:()=>A,hG:()=>S,hZ:()=>a,hs:()=>y,jk:()=>f,lw:()=>h,m3:()=>T,oW:()=>R,t2:()=>E,tn:()=>c,ze:()=>b});var n=i(51850),r=i(34304);function s(e){let t=e[0],i=e[1],n=e[2];return Math.sqrt(t*t+i*i+n*n)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,i,n){return e[0]=t,e[1]=i,e[2]=n,e}function l(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function u(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function h(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function d(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function c(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function m(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function f(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function p(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function y(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function g(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e}function _(e,t){let i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(i*i+n*n+r*r)}function S(e,t){let i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return i*i+n*n+r*r}function T(e){let t=e[0],i=e[1],n=e[2];return t*t+i*i+n*n}function b(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function w(e,t=e){let i=t[0],n=t[1],r=t[2],s=i*i+n*n+r*r;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function x(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function v(e,t,i){let n=t[0],r=t[1],s=t[2],o=i[0],a=i[1],l=i[2];return e[0]=r*l-s*a,e[1]=s*o-n*l,e[2]=n*a-r*o,e}function C(e,t,i,n){let r=t[0],s=t[1],o=t[2];return e[0]=r+n*(i[0]-r),e[1]=s+n*(i[1]-s),e[2]=o+n*(i[2]-o),e}function I(e,t,i){let n=t[0],r=t[1],s=t[2];return e[0]=i[0]*n+i[4]*r+i[8]*s+i[12],e[1]=i[1]*n+i[5]*r+i[9]*s+i[13],e[2]=i[2]*n+i[6]*r+i[10]*s+i[14],e}function F(e,t,i){let n=t[0],r=t[1],s=t[2];return e[0]=n*i[0]+r*i[3]+s*i[6],e[1]=n*i[1]+r*i[4]+s*i[7],e[2]=n*i[2]+r*i[5]+s*i[8],e}function A(e,t,i){return D(e,t,i[0],i[1],i[2],i[3])}function D(e,t,i,n,r,s){let o=t[0],a=t[1],l=t[2],u=n*l-r*a,h=r*o-i*l,d=i*a-n*o,c=n*d-r*h,m=r*u-i*d,f=i*h-n*u,p=2*s;return e[0]=o+u*p+2*c,e[1]=a+h*p+2*m,e[2]=l+d*p+2*f,e}const z=(0,n.vt)(),B=(0,n.vt)();function E(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function O(e,t){if(e===t)return!0;let i=e[0],n=e[1],s=e[2],o=t[0],a=t[1],l=t[2],u=(0,r.FD)();return Math.abs(i-o)<=u*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-a)<=u*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))}function R(e,t,i){let n=i[0]-t[0],r=i[1]-t[1],s=i[2]-t[2],o=n*n+r*r+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=n*o,e[1]=r*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const k=u,N=h,L=d,P=_,Z=S,q=s,U=T;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:l,angle:function(e,t){w(z,e),w(B,t);let i=x(z,B);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(e,t,i,n,r,s){let o=1-s,a=o*o,l=s*s,u=a*o,h=3*s*a,d=3*l*o,c=l*s;return e[0]=t[0]*u+i[0]*h+n[0]*d+r[0]*c,e[1]=t[1]*u+i[1]*h+n[1]*d+r[1]*c,e[2]=t[2]*u+i[2]*h+n[2]*d+r[2]*c,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,i=1){return e[0]=Math.min(Math.max(e[0],t),i),e[1]=Math.min(Math.max(e[1],t),i),e[2]=Math.min(Math.max(e[2],t),i),e},copy:o,cross:v,crossAndNormalize:function(e,t,i){let n=t[0],r=t[1],s=t[2],o=i[0],a=i[1],l=i[2],u=r*l-s*a,h=s*o-n*l,d=n*a-r*o,c=Math.sqrt(u*u+h*h+d*d);return e[0]=u/c,e[1]=h/c,e[2]=d/c,e},direction:R,dist:P,distance:_,div:L,divide:d,dot:x,equals:O,exactEquals:E,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,i,n,r,s){let o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),h=o*(3-2*s);return e[0]=t[0]*a+i[0]*l+n[0]*u+r[0]*h,e[1]=t[1]*a+i[1]*l+n[1]*u+r[1]*h,e[2]=t[2]*a+i[2]*l+n[2]*u+r[2]*h,e},inverse:M,len:q,length:s,lerp:C,max:p,min:f,mul:N,multiply:h,negate:b,normalize:w,random:function(e,t=1){let i=r.Ov,n=2*i()*Math.PI,s=2*i()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(n)*o,e[1]=Math.sin(n)*o,e[2]=s*t,e},rotateX:function(e,t,i,n){let r=[],s=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],s[0]=r[0],s[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),s[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2],e},rotateY:function(e,t,i,n){let r=[],s=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],s[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),s[1]=r[1],s[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2],e},rotateZ:function(e,t,i,n){let r=[],s=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],s[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),s[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),s[2]=r[2],e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[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:y,scaleAndAdd:g,scaleTo:function(e,t){return y(e,e,t/q(e))},set:a,sign:m,sqrDist:Z,sqrLen:U,squaredDistance:S,squaredLength:T,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:k,subtract:u,transformMat3:F,transformMat4:I,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:A,transformQuatValues:D},Symbol.toStringTag,{value:"Module"})),i.d(t,["Il",0,q,"jb",0,k,"lo",0,Z,"uE",0,U])},75503(e,t,i){i.d(t,{wq:()=>a});var n=i(4576),r=i(21818),s=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=m,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),M.prune(),w.prune(),x.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data,n=this._toBBox;if(S(e,i))for(b.clear();i;){for(let r=0,s=i.children.length;r<s;r++){let s=i.children[r],o=i.leaf?n(s):s;S(e,o)&&(i.leaf?t(s):_(e,o)?l(s,t):b.push(s))}i=b.pop()}}collides(e){let t=this._data,i=this._toBBox;if(!S(e,t))return!1;for(b.clear();t;){for(let n=0,r=t.children.length;n<r;n++){let r=t.children[n],s=t.leaf?i(r):r;if(S(e,s)){if(t.leaf||_(e,s))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){let e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,i=this._data,s=null,o=0,a=!1,l=this._toBBox(e);for(w.clear(),x.clear();i||w.length>0;){if(i||(i=w.pop(),s=w.data[w.length-1],o=x.pop()??0,a=!0),i.leaf&&(t=(0,n.qh)(i.children,(0,r.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),w.push(i),this._condense(w),this;a||i.leaf||!_(i,l)?s?(o++,i=s.children[o],a=!1):i=null:(w.push(i),x.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,n){let r=i-t+1,s=this._maxEntries;if(r<=s){let n=new I(e.slice(t,i+1));return u(n,this._toBBox),n}n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(n-1)));let o=new F([]);o.height=n;let a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));T(e,t,i,l,this._compareMinX);for(let r=t;r<=i;r+=l){let t=Math.min(r+l-1,i);T(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){let r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,n-1))}}return u(o,this._toBBox),o}_insert(e,t,i){let n=this._toBBox,r=i?e:n(e);w.clear();let s=function(e,t,i,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==i;){let i,n=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){let o=t.children[s],a=f(o),l=y(e,o)-a;l<r?(r=l,n=a<n?a:n,i=o):l===r&&a<n&&(n=a,i=o)}t=i||t.children[0]}return t}(r,this._data,t,w);for(s.children.push(e),d(s,r);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,i){for(let n=i;n>=0;n--)d(t.data[n],e)}(r,w,t)}_split(e,t){let i=e.data[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);let s=this._chooseSplitIndex(i,r,n);if(!s)return;let o=i.children.splice(s,i.children.length-s),a=i.leaf?new I(o):new F(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let n,r,s;n=r=1/0;for(let o=t;o<=i-t;o++){let t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=g(t,a),u=f(t)+f(a);l<n?(n=l,s=o,r=u<r?u:r):l===n&&u<r&&(r=u,s=o)}return s}_chooseSplitAxis(e,t,i){let n=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:m;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);let r=this._toBBox,s=h(e,0,t,r),o=h(e,i-t,i,r),a=p(s)+p(o);for(let n=t;n<i-t;n++){let t=e.children[n];d(s,e.leaf?r(t):t),a+=p(s)}for(let n=i-t-1;n>=t;n--){let t=e.children[n];d(o,e.leaf?r(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){let i=e.data[t];if(0===i.children.length)if(t>0){let r=e.data[t-1],s=r.children;s.splice((0,n.qh)(s,i,s.length,r.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(M.clear();i;){if(!0===i.leaf)for(let e of i.children)t((0,r.z)(e));else M.pushArray(i.children);i=M.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,n,r){r||=new I([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<i;o++)s=e.children[o],d(r,e.leaf?n(s):s);return r}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function m(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){let i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,s-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function S(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function T(e,t,i,n,r){let s=[t,i];for(;s.length;){let t=s.pop(),i=s.pop();if(t-i<=n)continue;let a=i+Math.ceil((t-i)/n/2)*n;(0,o.q)(e,a,i,t,r),s.push(i,a,a,t)}}const b=new s.A,M=new s.A,w=new s.A,x=new s.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class I extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,i){i.d(t,{Qf:()=>l,Qh:()=>o,lM:()=>s,ro:()=>u,rq:()=>h});var n=i(44208),r=i(34275);function s(e){if(!e)return 0;let t=d;for(let i in e)e.hasOwnProperty(i)&&(t+=a(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return h(e,8);let i=c;for(let n=0;n<t;n++)i+=a(e[n]);return i}(e);let t=d;for(let i in e)e.hasOwnProperty(i)&&(t+=a(e[i]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):d;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,r.iu)(e)?e.byteLength+f:Array.isArray(e)?h(e,t):0:0}function h(e,t){return c+e.length*t}const d=32,c=16,m=(0,n.A)("ios")||!(0,n.A)("chrome")&&!(0,n.A)("opr")?8:4,f=145;i.d(t,["JY",0,m])},36708(e,t,i){i.d(t,{C_:()=>c,on:()=>d,wB:()=>l,z7:()=>u});var n=i(37955),r=i(36563),s=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,m)}function u(e,t,i={}){return h(e,t,i,f)}function h(e,t,i={},n){let r=null,o=i.once?(e,i)=>{n(e)&&((0,s.xt)(r),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){let t=e();o(t,t)}return r}function d(e,t,i,o={}){let a=null,u=null,h=null;function d(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,s.xt)(h),i(e)}let m=l(e,(e,i)=>{d(),(0,n.wb)(e)&&(a=e,u=(0,n.on)(e,t,c),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{m.remove(),d()}),h}function c(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());let n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((n,s)=>{a=(0,r.vE)([(0,o.u7)(i,()=>{l(),s((0,o.NK)())}),h(e,e=>{l(),n(e)},{sync:!1,once:!0},t??m)])})}(e,f,t)}function m(e){return!0}function f(e){return!!e}i(80559),i.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},44794(e,t,i){i.d(t,{v:()=>a});var n=i(4718),r=i(62788),s=i(95488);class o{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=n.gh){return new o(e,t)}},44729(e,t,i){i.d(t,{n:()=>l});var n=i(66131),r=i(73444),s=i(34747);function o(e){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="";for(let i of e.match(/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g)||[])switch(i){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?t+=`'${i.slice(1,-1)}'`:t+=`'${i}'`}return t}const a="esri.core.sql.dateonly";class l{constructor(e,t,i){this._year=e,this._month=t,this._day=i,this.declaredRootClass=a}static isDateOnly(e){return"object"==typeof e&&!!e&&"declaredRootClass"in e&&e.declaredRootClass===a}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return l.isDateOnly(e)&&e.day===this.day&&e.month===this.month&&e.year===this.year}compare(e){return this.year===e.year?this.month===e.month?this.day-e.day:this.month-e.month:this.year-e.year}clone(){return new l(this._year,this._month,this._day)}toDateTime(e){return s.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,n.mT)(e)})}toDateTimeLuxon(e){return s.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,n.mT)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null,t=!0){if(null===e||""===e)return this.toString();if(t&&(e=o(e)),!e)return"";let i=this.toDateTime("unknown");return n.lY.dateTimeToArcadeDate(i).toFormat(e,{locale:(0,r.JK)(),numberingSystem:"latn"})}toArcadeDate(){let e=this.toDateTime("unknown");return n.lY.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(e,t){return l.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return s.c9.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){let t=s.c9.fromMillis(e,{zone:s.mQ.utcInstance});return t.isValid?l.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){let t=s.c9.fromSeconds(e,{zone:s.mQ.utcInstance});return t.isValid?l.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;let t=e.indexOf("-");if(t<0)return null;let i=e.indexOf("-",t+1);return i<0?null:new l(parseInt(e.slice(0,t),10),parseInt(e.slice(t+1,i),10),parseInt(e.slice(i+1),10))}static fromParts(e,t,i){let n=new l(e,t,i);return!1===n.isValid?null:n}static fromDateJS(e){return l.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return l.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e||null===e)return null;let i=[];if(t)(t=o(t))&&i.push(t);else if(null===t||""===t){let t=s.c9.fromISO(e,{setZone:!0});return t.isValid?l.fromParts(t.year,t.month,t.day):null}for(let n of i){let i=s.c9.fromFormat(e,t??n);if(i.isValid)return new l(i.year,i.month,i.day)}return null}static fromNow(e="system"){let t=s.c9.fromJSDate(new Date).setZone((0,n.mT)(e));return new l(t.year,t.month,t.day)}}},15032(e,t,i){i.d(t,{k:()=>l});var n=i(73444),r=i(54218),s=i(34747);function o(e){if(!e)return"";let t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g,i="";for(let n of e.match(t)||[])switch(n){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":i+=n;break;case"A":case"a":i+="a";break;default:i+=`'${n}'`}return i}const a="esri.core.sql.timeonly";class l{constructor(e,t,i,n){this._hour=e,this._minute=t,this._second=i,this._millisecond=n,this.declaredRootClass=a}static isTimeOnly(e){return"object"==typeof e&&!!e&&"declaredRootClass"in e&&e.declaredRootClass===a}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return l.isTimeOnly(e)&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new l(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,r.Fq)(this.hour)&&(0,r.Fq)(this.minute)&&(0,r.Fq)(this.second)&&(0,r.Fq)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=o(e))?s.c9.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,n.JK)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,i,n){let r=new l(e,t,i,n);return r.isValid()?r:null}static fromReader(e){if(!e)return null;let t=e.indexOf(":");if(t<0)return null;let i=e.indexOf(":",t+1);return i<0?null:new l(parseInt(e.slice(0,t),10),parseInt(e.slice(t+1,i),10),parseInt(e.slice(i+1),10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;let t=Math.floor(e/1e3%60),i=Math.floor(e/6e4%60),n=Math.floor(e/36e5%24),r=Math.floor(e%1e3);return new l(n,i,t,r)}static fromDateJS(e){return new l(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new l(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e||null===e)return null;let i=[];t?(t=o(t))&&i.push(t):(null===t||""===t)&&(i.push("HH:mm:ss"),i.push("HH:mm:ss.SSS"),i.push("hh:mm:ss a"),i.push("hh:mm:ss.SSS a"),i.push("HH:mm"),i.push("hh:mm a"),i.push("H:mm"),i.push("h:mm a"),i.push("H:mm:ss"),i.push("h:mm:ss a"),i.push("H:mm:ss.SSS"),i.push("h:mm:ss.SSS a"));for(let t of i){let i=s.c9.fromFormat(e,t);if(i.isValid)return new l(i.hour,i.minute,i.second,i.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return l.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return s.c9.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}},88930(e,t,i){i.d(t,{S1:()=>a,VW:()=>l,lL:()=>u,rb:()=>h,t:()=>d});var n=i(97770),r=(i(98623),i(34747));const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function a(e,t,i,s="system"){if("unknown"===i)return e;let o=new r.oh((0,n.wj)(s)),a=r.c9.fromJSDate(e,{zone:o}),l="decades"===i||"centuries"===i?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(i);return"decades"===i&&(t*=10),"centuries"===i&&(t*=100),a.plus({[l]:t}).toJSDate()}function l(e,t,i="milliseconds"){let n=e.getTime(),r=d(t,i,"milliseconds");return new Date(n+r)}function u(e,t,i="system"){let{unit:s}=t,o=Math.max(1,Math.trunc(t.value)),a=new r.oh((0,n.wj)(i)),l=r.c9.fromJSDate(e,{zone:a}),u=e=>e-e%o;switch(s){case"milliseconds":return l.startOf("second").plus({millisecond:u(l.millisecond)}).toJSDate();case"seconds":return l.startOf("minute").plus({second:u(l.second)}).toJSDate();case"minutes":return l.startOf("hour").plus({minute:u(l.minute)}).toJSDate();case"hours":return l.startOf("day").plus({hour:u(l.hour)}).toJSDate();case"days":return l.startOf("month").plus({day:u(l.day-1)}).toJSDate();case"weeks":{let e=l.startOf("year").startOf("week"),t=Math.floor(l.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return l.startOf("year").plus({month:u(l.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=l.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*o,i=e.year-e.year%t;return e.set({year:i}).toJSDate()}case"unknown":return e}}function h(e){let t=s.exec(e);if(!t)return null;let{hh:i,mm:n,ss:r,ms:a}=t.groups;return Number(i)*o.hours+Number(n)*o.minutes+Number(r||0)*o.seconds+Number(a||0)}function d(e,t,i){return 0===e?0:e*o[t]/o[i]}},48526(e,t,i){i.d(t,{A:()=>y});var n,r=i(32198),s=i(4576),o=i(4718),a=i(91429),l=i(5443),u=i(91075),h=i(86738),d=i(16930),c=i(90634),m=i(47610),f=i(56993),p=i(43937);let y=n=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:i,hasZ:n,spatialReference:r}=e;switch(t??=[],t?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=d.A.WGS84,{...e,hasM:i,hasZ:n,points:t,spatialReference:r}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let e=(0,c.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){let{points:e,spatialReference:t,hasM:i,hasZ:r}=this;return new n({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:i,hasZ:r})}equals(e){if(this===e)return!0;if(null==e)return!1;let t=this.spatialReference,i=e.spatialReference;return!(null!=t!=(null!=i)||null!=t&&null!=i&&!t.equals(i))&&(0,s.aI)(this.points,e.points,m.v6)}addPoint(e){return(0,f.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;let t=this.points[e],i={x:t[0],y:t[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=t[2],n=3),this.hasM&&(i.m=t[n]),new h.A(i)}removePoint(e){if(!this._validateInputs(e))return null;let t=new h.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)&&((0,f.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points")),this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,r.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,r.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],y.prototype,"points",void 0),(0,r.Cg)([(0,p.K)("points")],y.prototype,"writePoints",null),y=n=(0,r.Cg)([(0,a.$K)("esri.geometry.Multipoint")],y),y.prototype.toJSON.isDefaultToJSON=!0},82799(e,t,i){i.d(t,{A:()=>f});var n,r=i(32198),s=i(4718),o=i(91429),a=i(5443),l=i(91075),u=i(86738),h=i(16930),d=i(90634),c=i(56993),m=i(43937);let f=n=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:i,hasZ:n,spatialReference:r}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=h.A.WGS84,{...e,hasM:i,hasZ:n,paths:t,spatialReference:r}}(e)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(e,t){t.curvePaths=(0,s.o8)(e)}get extent(){let e=(0,d.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,s.o8)(this.paths)}addPath(e){if(!e)return;let t=this.paths,i=t.length;if(function(e){return!Array.isArray(e[0])}(e)){let n=[];for(let t=0,i=e.length;t<i;t++)n[t]=e[t].toArray();t[i]=n}else t[i]=e.slice();return this.notifyChange("paths"),this}clone(){let e=new n;return e.spatialReference=this.spatialReference,e.paths=(0,s.o8)(this.paths),e.curvePaths=(0,s.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;let i=this.paths[e][t],n=this.hasZ,r=this.hasM;return n&&!r?new u.A(i[0],i[1],i[2],void 0,this.spatialReference):r&&!n?new u.A(i[0],i[1],void 0,i[2],this.spatialReference):n&&r?new u.A(i[0],i[1],i[2],i[3],this.spatialReference):new u.A(i[0],i[1],this.spatialReference)}insertPoint(e,t,i){return this._validateInputs(e,t,!0)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e].splice(t,0,i),this.notifyChange("paths")),this}removePath(e){if(!this._validateInputs(e,null))return null;let t=this.paths.splice(e,1)[0],i=this.spatialReference,n=t.map(e=>new u.A(e,i));return this.notifyChange("paths"),n}removePoint(e,t){if(!this._validateInputs(e,t))return null;let i=new u.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(e,t,i){return this._validateInputs(e,t)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e][t]=i,this.notifyChange("paths")),this}_validateInputs(e,t,i=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){let n=this.paths[e];if(i&&(t<0||t>n.length)||!i&&(t<0||t>=n.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],f.prototype,"curvePaths",void 0),(0,r.Cg)([(0,m.K)("curvePaths")],f.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],f.prototype,"paths",void 0),(0,r.Cg)([(0,m.K)("paths")],f.prototype,"writePaths",null),f=n=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],f),f.prototype.toJSON.isDefaultToJSON=!0},4197(e,t,i){i.d(t,{Vj:()=>h,cj:()=>u,jh:()=>s,l5:()=>a,yH:()=>l});var n=i(34275),r=i(9093);function s(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function o(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=1024?Array.from(e):new Float64Array(e)}function a(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e,t){if(0===t.length)return o(e);if(0===e.length)return o(t);let i=s(e.length+t.length);for(let t=0;t<e.length;++t)i[t]=e[t];for(let n=0;n<t.length;++n)i[e.length+n]=t[n];return i}function u(e){return[...e]}function h(e){let t=(0,r.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},70328(e,t,i){i.d(t,{BI:()=>I,C:()=>o,DC:()=>c,Ej:()=>S,Ie:()=>v,Jt:()=>C,Lu:()=>b,Ne:()=>M,RF:()=>d,TF:()=>g,VL:()=>f,aI:()=>A,fA:()=>a,gE:()=>u,gX:()=>_,hZ:()=>x,iT:()=>m,is:()=>F,pg:()=>T,uJ:()=>y,vI:()=>w,vY:()=>l,vt:()=>s,w1:()=>h,yr:()=>p}),i(35522);var n=i(5443),r=(i(19419),i(4197));function s(e=z){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t){for(let i=0;i<6;i++)e[i]=t[i];return e}function a(e,t,i,n,r,o,a=s()){return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=r,a[5]=o,a}function l(e,t=s()){return function(e,t,i,n=s()){return x(n,D),function(e,t,i=0,n=t.length/3){let r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)r=Math.min(r,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),o=Math.min(o,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(n,e,t,i),n}(e,0,e.length/3,t)}function u(e,t=(0,r.jh)(24)){let[i,n,s,o,a,l]=e;return t[0]=i,t[1]=n,t[2]=s,t[3]=i,t[4]=n,t[5]=l,t[6]=i,t[7]=a,t[8]=s,t[9]=i,t[10]=a,t[11]=l,t[12]=o,t[13]=n,t[14]=s,t[15]=o,t[16]=n,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new n.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new n.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function d(e,t,i=e){i[0]=Math.min(e[0],t[0]),i[1]=Math.min(e[1],t[1]),i[2]=Math.min(e[2],t[2]),i[3]=Math.max(e[3],t[3]),i[4]=Math.max(e[4],t[4]),i[5]=Math.max(e[5],t[5])}function c(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 m(e,[t,i,n]){!function(e,t,i,n){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.min(e[2],n),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],i),e[5]=Math.max(e[5],n)}(e,t,i,n)}function f(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function y(e){return e[2]>=e[5]?0:e[5]-e[2]}function g(e){let t=f(e),i=y(e),n=p(e);return t*t+i*i+n*n}function _(e,t=[0,0,0]){return t[0]=e[0]+f(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+y(e)/2,t}function S(e,t=[0,0,0]){return t[0]=f(e),t[1]=p(e),t[2]=y(e),t}function T(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function b(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function M(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function w(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function x(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 v(e){return e?x(e,D):s(D)}function C(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function I(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=-1/0,e[3]=n,e[4]=r,e[5]=1/0,e}function F(e){return 6===e.length}function A(e,t,i){if(null==e||null==t)return e===t;if(!F(e)||!F(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const D=[1/0,1/0,1/0,-1/0,-1/0,-1/0],z=[0,0,0,0,0,0];s(),i.d(t,["qv",0,D,"v_",0,z])},60408(e,t,i){function n(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function s(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?s(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":n(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function d(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>r,W0:()=>d,ZC:()=>n,fT:()=>s,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>h,xD:()=>c});var n=i(5443),r=i(91075),s=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function h(e){return null==e?null:e instanceof r.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?s.A.fromJSON(e):(0,u.ZC)(e)?n.A.fromJSON(e):null}const d={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:s.A,esriGeometryMultiPatch:a.A};function c(e){return e&&d[e]||null}},97770(e,t,i){i.d(t,{Ey:()=>D,F8:()=>A,J2:()=>v,Yq:()=>I,_m:()=>C,iS:()=>F,wj:()=>z});var n=i(66552),r=i(73444),s=i(98623),o=i(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},h={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},f={hour:"numeric",minute:"numeric"},p={...f,second:"numeric"},y={hourCycle:"h23"},g={...f,...y},_={...p,...y},S={"short-date":h,"short-date-short-time":{...h,...f},"short-date-short-time-24":{...h,...g},"short-date-long-time":{...h,...p},"short-date-long-time-24":{...h,..._},"short-date-le":h,"short-date-le-short-time":{...h,...f},"short-date-le-short-time-24":{...h,...g},"short-date-le-long-time":{...h,...p},"short-date-le-long-time-24":{...h,..._},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...f},"long-month-day-year-short-time-24":{...d,...g},"long-month-day-year-long-time":{...d,...p},"long-month-day-year-long-time-24":{...d,..._},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...f},"day-short-month-year-short-time-24":{...c,...g},"day-short-month-year-long-time":{...c,...p},"day-short-month-year-long-time-24":{...c,..._},"long-date":m,"long-date-short-time":{...m,...f},"long-date-short-time-24":{...m,...g},"long-date-long-time":{...m,...p},"long-date-long-time-24":{...m,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":f,"long-time":p},T=(0,n.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),b={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function M(){let e=(0,r.lR)();return(e&&b[e])??(0,r.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(b.bs="sr-Latn-CS");let w=new WeakMap;const x=S["short-date-short-time"];function v(e){return S[e]}function C(e){let{dateStyle:t,timeStyle:i,hour12:n,year:r,month:s}=e,o={};return t?o.dateStyle=t:r&&(o.year=r,o.month=s||void 0),i&&!o.year&&(o.timeStyle=i,o.hour12="auto"===n?void 0:"always"===n),o}function I(e,t=x){return function(e){let t=w.get(e);if(!t){let i=M(),n=z(e.timeZone??"system"),r={...e,timeZone:n};t=new Intl.DateTimeFormat(i,r),w.set(e,t)}return t}(t).format(e)}function F(e,t=x){return I(new Date(e),{...t,...u,...l})}function A(e,t=x){return I(new Date(`1970-01-01T${e}Z`),{...t,...u,...a})}function D(e,t=x){let i=o.c9.fromISO(e,{setZone:!0});if(!i.isValid)return e;if(t.timeZone)return I(i.toJSDate(),t);let n=0===i.offset?"UTC":t.timeZone,r={...t,timeZone:n};return i.toLocaleString(r,{locale:M()})}function z(e){switch(e){case"system":return s.N;case s.L:return"UTC";default:return e}}(0,r.Ml)(()=>{w=new WeakMap}),i.d(t,["_v",0,T])},73444(e,t,i){i.d(t,{JK:()=>l,Ml:()=>y,QC:()=>d,lR:()=>h,oQ:()=>f});var n=i(36563);let r;i(44208);const s=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){let e=o?.getAttribute("lang"),t=globalThis.navigator?.language;return s??e??t??"en"}function l(){return void 0===r&&(r=a()),r}const u=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function h(e=l()){return c(e)?.language}function d(e=l()){let t=c(e);return t?.language&&t?.extlang?e.replace(`${t.language}-`,""):e}function c(e=l()){return u.exec(e)?.groups}const m=[];function f(e){return m.push(e),(0,n.hA)(()=>{m.splice(m.indexOf(e),1)})}new Map;const p=[];function y(e){return p.push(e),(0,n.hA)(()=>p.splice(p.indexOf(e),1))}function g(){let e=a();r!==e&&([...p].forEach(t=>t(e)),r=e,[...m].forEach(t=>t(e)))}globalThis.addEventListener?.("languagechange",g),o&&new MutationObserver(()=>{g()}).observe(o,{attributeFilter:["lang"]})},6518(e,t,i){i.d(t,{F:()=>a});var n=i(44208),r=i(75503),s=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,n.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((i,n)=>{e[t++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let e=(0,s.Ie)();for(let t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>m});var n=i(4576),r=i(49186),s=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),h=i(6518),d=i(37730);const c=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;let[t,i,n,r]=this.fullBounds;return{xmin:t,ymin:i,xmax:n,ymax:r,spatialReference:e}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(e){let t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let i of e){let e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;let t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));let i,n=this._featuresById.get(t);n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),e.geometry?.coords?.length?(i=(0,u.jQ)(i??(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(t,null),this._featuresById.set(t,e))}_upsert(e){let t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;let i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:s}=e;for(let e in s)i.attributes[e]=s[e];return n&&(i.geometry=n,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){var n=i(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new n.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};i.d(t,["T",0,r])},71202(e,t,i){i.r(t),i.d(t,{default:()=>T});var n=i(56507),r=i(60999),s=i(49186),o=i(53966),a=i(17676),l=i(60408),u=i(21325),h=i(90708),d=i(83221),c=i(31464),m=i(75752),f=i(85113),p=i(64714),y=i(82832),g=i(95466),_=i(98453),S=i(30524);i(98623);class T{constructor(){this._featureIdInfo=null,this._queryEngine=null,this._snapshotFeatures=async e=>{let t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};let i=[],[n]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),r=(0,f.BM)(n,{geometryType:e.geometryType}),o=e.fields||r.fields||[],a=null==e.hasZ?r.hasZ:e.hasZ,l=r.geometryType,h=!l,c=e.objectIdField||r.objectIdFieldName||"__OBJECTID",T=e.spatialReference||u.KK,b=e.timeInfo;o===r.fields&&r.unknownFields.length>0&&i.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:r.unknownFields}});let M=new g.A(o),w=M.dateFields.length>0,x=M.get(c);x?("esriFieldTypeString"!==x.type&&(x.type="esriFieldTypeOID"),x.editable=!1,x.nullable=!1,c=x.name):(x={alias:c,name:c,type:"string"===r.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(x));let v={};for(let e of o){if(e.name??=e.alias,e.alias??=e.name,!e.name)throw new s.A("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!_.m.jsonValues.includes(e.type))throw new s.A("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==x.name){let t=(0,S.lD)(e);void 0!==t&&(v[e.name]=t)}e.length??=(0,S._b)(e)}if(b){if(b.startTimeField){let e=M.get(b.startTimeField);e?(b.startTimeField=e.name,e.type="esriFieldTypeDate",w=!0):b.startTimeField=null}if(b.endTimeField){let e=M.get(b.endTimeField);e?(b.endTimeField=e.name,e.type="esriFieldTypeDate",w=!0):b.endTimeField=null}if(b.trackIdField){let e=M.get(b.trackIdField);e?b.trackIdField=e.name:(b.trackIdField=null,i.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:b}}))}!b.startTimeField&&!b.endTimeField&&(i.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:b}}),b=null)}let C=l?(0,p.F0)(l):void 0,I=w?{timeZoneIANA:"UTC"}:null,F={warnings:i,featureErrors:[],layerDefinition:{...h?y.Xn:y.CI,drawingInfo:C??void 0,templates:(0,p.e2)(v),extent:void 0,geometryType:l,objectIdField:c,fields:o,hasZ:!!a,timeInfo:b,dateFieldsTimeReference:I}};this._featureIdInfo={type:"object-id",fieldName:c},this._queryEngine=new m.do({fieldsIndex:g.A.fromLayerJSON({fields:o,timeInfo:b,dateFieldsTimeReference:I}),geometryType:l,hasM:!1,hasZ:a,featureIdInfo:this._featureIdInfo,spatialReference:T,timeInfo:b,featureStore:new d.A({geometryType:l,hasM:!1,hasZ:a})});let A=this._queryEngine.fieldsIndex.requiredFields.indexOf(x);A>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(A,1),this._createDefaultAttributes=(0,p.Vx)(v,c);let D=this._createFeatures(n);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,D);let z=this._normalizeFeatures(D,F.featureErrors);this._queryEngine.featureStore.addMany(z);let{fullExtent:B,timeExtent:E}=await this._queryEngine.fetchRecomputedExtents();if(F.layerDefinition.extent=B,E){let{start:e,end:t}=E;F.layerDefinition.timeInfo.timeExtent=[e,t]}return F}async applyEdits(e){let{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,y.$1)(t,i),(0,c.Nk)(e.adds,t),(0,c.Nk)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);let t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)},e=>{this._queryEngine.featureStore.clear(),(0,a.zf)(e)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new s.A("geojson-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();let{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}_createFeatures(e){if(null==e)return[];let{geometryType:t,hasZ:i}=this._queryEngine,n=this._featureIdInfo.fieldName,r=(0,f.bd)(e,{geometryType:t,hasZ:i,objectIdField:n});if(!(0,u.aI)(this._queryEngine.spatialReference,u.KK))for(let e of r)null!=e.geometry&&(e.geometry=(0,h.Ux)((0,c.Cv)((0,h.zv)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),u.KK,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){let{url:t,customParameters:i}=this._loadOptions,r=(await(0,n.A)(t??"",{responseType:"json",query:{...i},signal:e})).data;return(0,f.sO)(r),r}_normalizeFeatures(e,t){let{fieldsIndex:i}=this._queryEngine,n=[],r=this._featureIdInfo.fieldName;for(let s of e){let e=this._createDefaultAttributes(),o=(0,y.MB)(i,e,s.attributes,!0);o?t?.push(o):(this._assignObjectId(e,s.attributes,!0),s.attributes=e,s.objectId=e[r],n.push(s))}return n}async _applyEdits(e){let{adds:t,updates:i,deletes:n}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),i?.length&&this._applyUpdateEdits(r,i),n?.length){for(let e of n)r.deleteResults.push((0,y.bP)(e));this._queryEngine.featureStore.removeManyById(n)}let{fullExtent:s,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:s,timeExtent:o,featureEditResults:r}}_applyAddEdits(e,t){let{addResults:i}=e,{geometryType:n,hasM:r,hasZ:s,spatialReference:o,featureStore:a,fieldsIndex:u}=this._queryEngine,d=this._featureIdInfo.fieldName,m=[];for(let r of t){if(r.geometry&&n!==(0,l.$B)(r.geometry)){i.push((0,y.Yx)("Incorrect geometry type."));continue}let t=this._createDefaultAttributes(),s=(0,y.MB)(u,t,r.attributes);if(s)i.push(s);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){let t=r.attributes[d];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){let e=r.geometry.spatialReference??o;r.geometry=(0,c.Cv)((0,y.CR)(r.geometry,e),e,o)}m.push(r),i.push((0,y.bP)(r.attributes[d]))}}a.addMany((0,h.Di)([],m,n,s,r,this._featureIdInfo))}_applyUpdateEdits({updateResults:e},t){let{geometryType:i,hasM:n,hasZ:r,spatialReference:s,featureStore:o,fieldsIndex:a}=this._queryEngine,u=this._featureIdInfo.fieldName;for(let d of t){let{attributes:t,geometry:m}=d,f=t?.[u];if(null==f){e.push((0,y.Yx)(`Identifier field ${u} missing`));continue}if(!o.has(f)){e.push((0,y.Yx)(`Feature with object id ${f} missing`));continue}let p=(0,h.oN)(o.getFeature(f),i,r,n);if(null!=m){if(i!==(0,l.$B)(m)){e.push((0,y.Yx)("Incorrect geometry type."));continue}let t=m.spatialReference??s;p.geometry=(0,c.Cv)((0,y.CR)(m,t),t,s)}if(t){let i=(0,y.MB)(a,p.attributes,t);if(i){e.push(i);continue}}o.add((0,h.E2)(p,i,r,n,this._featureIdInfo)),e.push((0,y.bP)(f))}}_createObjectIdGenerator(e,t){let i=this._featureIdInfo.fieldName,n=e.fieldsIndex.get(i);if("esriFieldTypeString"===n.type)return()=>n.name+"-"+Date.now().toString(16);let r=-1/0;for(let e of t)e.objectId&&(r=Math.max(r,e.objectId));return r=Math.max(0,r)+1,()=>r++}_assignObjectId(e,t,i=!1){let n=this._featureIdInfo.fieldName;e[n]=i&&n in t?t[n]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,c.Nk)(u.KK,e)}catch{throw new s.A("geojson-layer","Projection not supported")}}}},85113(e,t,i){i.d(t,{BM:()=>v,bd:()=>C,sO:()=>x,xD:()=>d});var n=i(67482),r=i(49186),s=i(21325),o=i(90708),a=i(43334),l=i(92722),u=i(30524);const h={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function d(e){return h[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(let t of e.features)t&&(yield t)}}function*m(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(let t of e.coordinates)yield*t;break;case"MultiPolygon":for(let t of e.coordinates)for(let e of t)yield*e}}function f(e){for(let t of e)if(t.length>2)return!0;return!1}function p(e){let t=0;for(let i=0;i<e.length;i++){let n=e[i],r=e[(i+1)%e.length];t+=n[0]*r[1]-r[0]*n[1]}return t<=0}function y(e){let t=e[0],i=e[e.length-1];(t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2])&&e.push(t)}function g(e,t){let{coordinates:i,type:n}=e,r=t.hasZ??!1;switch(n){case"Point":return new l.A([],[...i],r,!1);case"LineString":return(0,o.Ap)({paths:[i],hasZ:!0},r,!1);case"MultiLineString":return(0,o.Ap)({paths:i,hasZ:!0},r,!1);case"MultiPoint":return(0,o.PR)({points:i,hasZ:!0},r,!1);case"Polygon":case"MultiPolygon":{let e=new l.A([],[],r,!1);for(let t of"Polygon"===n?[i]:i){_(e,t[0],r);for(let i=1;i<t.length;i++)S(e,t[i],r)}return e}}}function _(e,t,i){y(t),function(e){return!p(e)}(t)?b(e,t,i):T(e,t,i)}function S(e,t,i){y(t),function(e){return p(e)}(t)?b(e,t,i):T(e,t,i)}function T(e,t,i){for(let n of t)M(e,n,i);e.lengths.push(t.length)}function b(e,t,i){for(let n=t.length-1;n>=0;n--)M(e,t[n],i);e.lengths.push(t.length)}function M(e,[t,i,n],r){e.coords.push(t,i),r&&e.coords.push(n||0)}function w(e){switch(typeof e){case"string":return(0,n.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function x(e,t=4326){if(!e)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});let{crs:i}=e;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,s.oT)({wkid:t})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${t})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function v(e,t={}){let i,n=[],r=new Set,s=new Set,o=!1,a=null,l=!1,{geometryType:h=null}=t;for(let t of c(e)){let{geometry:e,properties:c,id:p}=t;if((!e||(h||=d(e.type),d(e.type)===h))&&(o||=f(m(e)),l||(l=null!=p,l&&(i=typeof p,c&&(a=Object.keys(c).filter(e=>c[e]===p)))),c&&a&&l&&null!=p&&(a.length>1?a=a.filter(e=>c[e]===p):1===a.length&&(a=c[a[0]]===p?a:[])),c))for(let e in c){if(r.has(e))continue;let t=w(c[e]);if("unknown"===t){s.add(e);continue}s.delete(e),r.add(e);let i=(0,u.rS)(e);i&&n.push({name:i,alias:e,type:t})}}let p=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(p)for(let e of n)if(e.name===p&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:h,hasZ:o,objectIdFieldName:p,objectIdFieldType:i,unknownFields:Array.from(s)}}function C(e,t){return Array.from(function*(e,t={}){let{geometryType:i,objectIdField:n}=t;for(let r of e){let{geometry:e,properties:s,id:o}=r;if(e&&d(e.type)!==i)continue;let l,u=s||{};n&&(l=u[n],null!=o&&!l&&(u[n]=l=o)),yield new a.Om(e&&g(e,t),u,null,l)}}(c(e),t))}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>h,e2:()=>c,f:()=>p});var n=i(44208),r=i(4718),s=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function h(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let i="";t&&(i+=`this${d(t)} = null;`);for(let t in e)i+=`this${d(t)} = ${JSON.stringify(e[t])};`;let n=Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new n}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}const m={...s.F,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!1,supportsDistance:!1,supportsExtent:!1,supportsQuantization:!1,supportsQueryGeometry:!1,supportsDisjointSpatialRelationship:!1},f={...s.P,supportedStatistics:{...s.P.supportedStatistics,envelope:!1,centroid:!1,convexHull:!1}};function p(e,t,i=!1){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i?m:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i?f:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832(e,t,i){i.d(t,{$1:()=>_,CR:()=>g,MB:()=>f,Yx:()=>h,bP:()=>c});var n=i(67482),r=i(18370),s=i(60408),o=i(21325),a=i(30524);class l{constructor(e){this.description=e,this.code=null}}class u{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new l(e)}}function h(e){return new u(e)}class d{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new d(e)}const m=new Set;function f(e,t,i,n=!1){m.clear();for(let r in i){let s=e.get(r);if(!s)continue;let o=p(s,i[r]);if(m.add(s.name),s&&(n||s.editable)){let e=(0,a.CJ)(s,o);if(e)return h((0,a.uo)(e,s,o));t[s.name]=o}}for(let t of e.requiredFields??[])if(!m.has(t.name))return h(`missing required field "${t.name}"`);return null}function p(e,t){let i=t;return(0,a.WA)(e)&&"string"==typeof t?i=(0,a.XT)(t):(0,a.yM)(e)&&null!=t&&"string"!=typeof t?i=String(t):(0,a.vE)(e)&&"string"==typeof t&&(i=(0,n._)(t)),(0,a.WX)(i)}const y=(0,r.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(3456)]).then(()=>i(3637)));function g(e,t){if(!(0,s.Bi)(e)&&!(0,s.Rg)(e)||!(0,o.fn)(t))return e;let i=y.module;if(null==i)throw TypeError("simplify operator not loaded");return i.simplifyExecute({...e,spatialReference:t})??e}async function _(e,t){(0,o.fn)(e)&&("esriGeometryPolygon"===t||"esriGeometryPolyline"===t)&&await y.getImportPromise()}const S={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]},T={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentsCountOnly:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:["EnvelopeAggregate","CentroidAggregate","ConvexHullAggregate"],supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0},queryBinsCapabilities:S},b={...T,supportsCoordinatesQuantization:!1,supportsReturningQueryGeometry:!1,advancedQueryCapabilities:{...T.advancedQueryCapabilities,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:[],supportsReturningGeometryCentroid:!1,supportsQueryWithDistance:!1,supportsReturningQueryExtent:!1,supportsDisjointSpatialRel:!1},queryBinsCapabilities:{...S,supportedStatisticTypes:S.supportedStatisticTypes.filter(e=>"EnvelopeAggregate"!==e&&"CentroidAggregate"!==e&&"ConvexHullAggregate"!==e)}};i.d(t,["CI",0,T,"Xn",0,b])},95466(e,t,i){i.d(t,{A:()=>u});var n=i(49186),r=i(53966),s=i(12195),o=i(30524),a=i(98623),l=i(56400);class u{static fromJSON(e){return new u(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new u(e.fields??[],d(e))}static fromLayerJSON(e){return new u(e.fields??[],d(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;let i=[];for(let e of this.fields){let t=e?.name,n=(0,o.GZ)(t);if(t&&n){let r=(0,o.NF)(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(n,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),!(0,o.te)(e)&&!(0,o.Xz)(e)&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(let e of this.fields)(0,o.te)(e)||(0,o.Xz)(e)||e.nullable||void 0!==(0,o.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){return(0,o.Vb)({fieldName:e,fieldsMap:this._fieldsMap,normalizedFieldsMap:this._normalizedFieldsMap})}getTimeZone(e){let t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),"UTC"):h.has(t.type)?a.L:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,s.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function d(e){let t=new Map;if(!e.fields)return t;let i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:r}=e,s=(n?"startField"in n?n.startField:n.startTimeField:"")??"",u=(n?"endField"in n?n.endField:n.endTimeField:"")??"",d=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.ZS)(e.dateFieldsTimeReference):null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??d:r.dateFieldsTimeReference?(0,l.ZS)(r.dateFieldsTimeReference):d??"UTC":null,m=n?function(e){return"timeZone"in e}(n)?n.timeZone??d:n.timeReference?(0,l.ZS)(n.timeReference):d:null,f=new Map([[(0,o.NF)(r?.creationDateField??""),c],[(0,o.NF)(r?.editDateField??""),c],[(0,o.NF)(s),m],[(0,o.NF)(u),m]]);for(let{name:n,type:r}of e.fields)if(h.has(r))t.set(n,a.L);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(n,null);else if(i)t.set(n,a.L);else{let e=f.get((0,o.NF)(n??""))??d;t.set(n,e)}return t}},98453(e,t,i){const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"});i.d(t,["m",0,n])},93470(e,t,i){const n=[252,146,31,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n};i.d(t,["Cb",0,r,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,n,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,s])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[124,7870,8768],{56512(e,t,i){function r(e){let t,i,r=[],s=!1;return function(...l){return s&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(l,r)||(i=e.apply(this,l),t=this,r=l,s=!0),i}}i.d(t,{B:()=>r})},69397(e,t,i){i.d(t,{Qf:()=>o,Qh:()=>n,lM:()=>l,ro:()=>u,rq:()=>h});var r=i(44208),s=i(34275);function l(e){if(!e)return 0;let t=p;for(let i in e)e.hasOwnProperty(i)&&(t+=a(e[i],!1));return t}function n(e){if(!e)return 0;if("number"==typeof e[0])return o(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return h(e,8);let i=c;for(let r=0;r<t;r++)i+=a(e[r]);return i}(e);let t=p;for(let i in e)e.hasOwnProperty(i)&&(t+=a(e[i]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?n(e):p;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,s.iu)(e)?e.byteLength+f:Array.isArray(e)?h(e,t):0:0}function h(e,t){return c+e.length*t}const p=32,c=16,d=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,f=145;i.d(t,["JY",0,d])},5359(e,t,i){i.d(t,{Z:()=>s});const r=Symbol("isImageryTileGraphicOrigin");function s(e){return!!e&&r in e}i.d(t,["H",0,r])},90124(e,t,i){i.r(t),i.d(t,{default:()=>Q});var r,s=i(32198),l=i(40124),n=i(69540),a=i(49186),o=i(53966),u=i(97768),h=i(25728),p=i(17676),c=i(36708),d=i(91429),f=i(78888),m=i(41910),g=i(60950),y=i(89808),v=i(99959),w=i(5359);class b extends v.A{get[(r=w.H,g.ym)](){return this.layer}get[y.Q](){return this.layer}get[m.e7](){return this.layer}constructor(e){super(),this[r]=!0,this.type="imagery-tile",this.layer=e}get id(){return this.layer.id}}var A=i(4146),_=i(18768),C=i(63074),S=i(69208),R=i(34287),M=i(8303),O=i(72545),x=i(56551),I=i(54310),T=i(25036),P=i(82935),N=i(82806),z=i(7548),F=i(23636),Z=i(1003),D=i(99235),J=i(10873),j=i(20437),L=i(74797),$=i(22796),V=i(69409);const q={instance:null,refCount:0,connectionPromise:null};async function E(){if(q.refCount++,q.instance)return q.instance;if(!q.connectionPromise){let e=new V.A;q.connectionPromise=e.initialize().then(()=>{q.instance=e})}return await q.connectionPromise,q.instance}function k(){q.refCount--,q.refCount>0||(q.instance?.destroy(),q.instance=null,q.connectionPromise=null,q.refCount=0)}var U=i(87045),W=i(24212),G=i(30291),H=i(88625),B=i(59923);let K=class extends((0,C.dM)((0,T.j)((0,R.q)((0,M.A)((0,x.H)((0,S.d)((0,N.b)((0,O.G)((0,P.e)((0,_.b)((0,I.J)((0,h.M)((0,n.OU)(A.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new b(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,p.sg)(async(e,t,r)=>{let{save:s,saveAs:l}=await i.e(9838).then(()=>i(59838));switch(e){case 0:return s(this,t);case 1:return l(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(p.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=(0,u.xt)(this._releaseWorkerHandle)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[(0,L.rZ)("Pixel Value"),(0,L.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){let t=(0,L.jC)(i);e.push(...t)}let r=t?.dataType,s=t?.multidimensionalInfo;if(("vector-magdir"===r||"vector-uv"===r)&&null!=s){let t=s.variables[0].unit?.trim(),i=(0,L.DV)(t),r=(0,L.y6)();e.push(i,r)}if(s){let t=(0,L.AL)(s);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){let{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==L.F_.rawServicePixelValue)),r=(0,G.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:s}=this.raster;return r?.fieldInfos&&s&&(0,L.h4)(r.fieldInfos,s),r}async generateRasterInfo(e,t){let i=(0,f.PZ)($.A,e);if(await this.load(),!i||"none"===i.functionName?.toLowerCase())return this.serviceRasterInfo;try{let{rasterInfo:e}=await this._openFunctionRaster(i,t);return e}catch(e){throw e instanceof a.A?e:new a.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsExportMapTiles(){let e=this._primaryRasters[0]??this.raster,t="RasterTileServer"===e?.datasetFormat,i=!!this.sourceJSON?.exportTilesAllowed,r=this.sourceJSON?.datasetFormat?.toLowerCase(),s=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&"Raster"===e?.tileType&&("cache/jpegplus"===r||"cache/jpegpng"===r);return t&&i&&("Map"===e?.tileType||s)}supportsWrite(){let e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){return this.supportsWrite()?super.write(e,t):((0,B.U4)(t,this),null)}async hasDataChanged(){try{let e=this._primaryRasters[0]??this.raster,{dataChanged:t,updates:i}=await e.refresh();return t&&(this.serviceRasterInfo!==e.rasterInfo&&this._set("serviceRasterInfo",e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),i&&this.read(i,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0})),t}catch{return!1}}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,z.qg)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{let{url:t,rasterFunction:i,source:r}=this;if(!t&&!r)throw new a.A("imagery-tile-layer:open","missing url or source parameter");r?await this._openFromSource(r,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}let i=this.raster.rasterInfo;if(!i)throw new a.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){let e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||=this.raster.datasetName,"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,c.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,z.pb)(e),this.url||=this._primaryRasters[0].url}async _openFromUrlWithRasterFunction(e,t,i){let r,s=[e];t&&(0,D.UD)(t.toJSON(),s),s.some(e=>X(e,this.ioConfig))&&(r=await E(),this._releaseWorkerHandle={remove:()=>k()});let l=await Promise.all(s.map(e=>Z.default.open({url:e,rasterInfo:1===s.length?this.serviceRasterInfo:void 0,sourceJSON:1===s.length?this.sourceJSON:void 0,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:r,signal:i}))),n=l.findIndex(e=>null==e);if(n>-1)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${s[n]}`);return this._primaryRasters=l,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){let i;X(e,this.ioConfig)&&(i=await E(),this._releaseWorkerHandle={remove:()=>k()});let r=await Z.default.open({url:e,rasterInfo:this.serviceRasterInfo,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:i,signal:t});if(null==r)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[r],this.raster=r}async _openFromSource(e,t){let i="the tiled imagery data source is not supported",r="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!r)throw new a.A("imagery-tile-layer:open",i);"MEMORY"===r&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});let s=await Z.default.open({url:"",source:e,datasetFormat:r,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==s)throw new a.A("imagery-tile-layer:open",i);this._primaryRasters=[s],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=s}async _openFunctionRaster(e,t){let i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>i[e.url]=e);let r=(0,D.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),s=new F.A({rasterFunction:r});return await s.open(t),s}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof a.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){(0,W.XF)(o.A.getLogger(this),(0,W.$7)("ImageryTile layers","relative-to-scene",e)),(0,W.XF)(o.A.getLogger(this),(0,W.tW)("ImageryTile layers",e))}};(0,s.Cg)([(0,d.MZ)({clonable:!1})],K.prototype,"_primaryRasters",void 0),(0,s.Cg)([(0,d.MZ)({clonable:!1})],K.prototype,"_releaseWorkerHandle",void 0),(0,s.Cg)([(0,d.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],K.prototype,"charts",void 0),(0,s.Cg)([(0,d.MZ)({type:H.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],K.prototype,"elevationInfo",null),(0,s.Cg)([(0,d.MZ)({type:U.A})],K.prototype,"tileInfo",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0,clonable:!1})],K.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,d.MZ)(J.fV)],K.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],K.prototype,"isReference",void 0),(0,s.Cg)([(0,d.MZ)({type:["show","hide"]})],K.prototype,"listMode",void 0),(0,s.Cg)([(0,d.MZ)({json:{read:!0,write:!0}})],K.prototype,"blendMode",void 0),(0,s.Cg)([(0,d.MZ)({type:$.A,json:{name:"renderingRule",write:!0}})],K.prototype,"rasterFunction",void 0),(0,s.Cg)([(0,d.MZ)()],K.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],K.prototype,"version",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],K.prototype,"type",void 0),(0,s.Cg)([(0,d.MZ)({type:["ArcGISTiledImageServiceLayer"]})],K.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],K.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:l.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],K.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],K.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,d.MZ)(J.PY)],K.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0,type:[j.A]})],K.prototype,"fields",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0,type:[j.A]})],K.prototype,"rasterFields",null),(0,s.Cg)([(0,d.MZ)({constructOnly:!0})],K.prototype,"source",void 0),K=(0,s.Cg)([(0,d.$K)("esri.layers.ImageryTileLayer")],K);const Q=K;function X(e,t){let{tileGeneration:i}=t??{};return"immediate"===i||/\.(png|gif|bmp)$/i.test(e)}},18768(e,t,i){var r=i(32198),s=i(53966),l=i(91429),n=i(60694);i.d(t,["b",0,e=>{let t=e,i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,n.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,n.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,l.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISService")],i),i}])},56551(e,t,i){i.d(t,{H:()=>p});var r=i(32198),s=i(91429),l=i(69540),n=i(25482),a=i(78888),o=i(94359),u=i(93223);let h=class extends((0,l.OU)(n.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],h.prototype,"method",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"value",void 0),(0,r.Cg)([(0,s.MZ)({type:[a.jz],json:{write:{isRequired:!0}}})],h.prototype,"bandIds",void 0),(0,r.Cg)([(0,s.MZ)({types:o.uy,json:{write:!0,origins:{"web-scene":{types:o.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],h.prototype,"renderer",void 0),h=(0,r.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],h);const p=e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,r.Cg)([(0,s.MZ)({type:[h],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},91806(e,t,i){i.d(t,{A:()=>o});var r,s=i(32198),l=i(25482),n=i(91429),a=i(78888);let o=class extends l.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s.Cg)([(0,n.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"cols",void 0),(0,s.Cg)([(0,n.MZ)({type:a.jz,json:{write:!0}})],o.prototype,"level",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],o.prototype,"levelValue",void 0),(0,s.Cg)([(0,n.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"origin",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],o.prototype,"resolution",void 0),(0,s.Cg)([(0,n.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"rows",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],o.prototype,"scale",void 0),o=r=(0,s.Cg)([(0,n.$K)("esri.layers.support.LOD")],o)},87045(e,t,i){i.d(t,{A:()=>w});var r,s=i(32198),l=i(66552),n=i(25482),a=i(86211),o=i(91429),u=i(78888),h=i(86738),p=i(16930),c=i(21325),d=i(28735),f=i(91806),m=i(72802),g=i(36005),y=i(43937);const v=new l.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",JPEGPlus:"jpgplus",pbf:"pbf"});let w=class extends n.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:l=p.A.WebMercator,numLODs:n=24}=e;if(!(0,c.fn)(l)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new f.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=n-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new h.A(0,0,l),size:[s,s],spatialReference:l})}let o=(0,c.Vp)(l),u=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):o?new h.A({x:o.origin[0],y:o.origin[1],spatialReference:l}):new h.A({x:0,y:0,spatialReference:l}),d=1/(39.37*(0,a.GA)(l)*96),m=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*d;m.push(new f.A({level:e,scale:t,resolution:r}))}else{let e=(0,c.EA)(l)?512/s*591657527.5917094:256/s*591657527.591555,i=Math.ceil(n/t);m.push(new f.A({level:0,scale:e,resolution:e*d}));for(let r=1;r<i;r++){let i=e/2**t,s=i*d;m.push(new f.A({level:r,scale:i,resolution:s})),e=i}}return new r({dpi:96,lods:m,origin:u,size:[s,s],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,c.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],s=t[r+1];if(i<=e)return r;if(s===e)return r+1;if(i>e&&s<e)return r+Math.log(i/e)/Math.log(i/s)}return r}tileAt(e,t,i,r){let s,l,n=this.lodAt(e);if(!n)return null;if("number"==typeof t)s=t,l=i;else if((0,c.aI)(t.spatialReference,this.spatialReference))s=t.x,l=t.y,r=i;else{let e=(0,d.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,l=e.y,r=i}let a=n.resolution*this.size[0],o=n.resolution*this.size[1];return r??=new m.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-l)/o+.001),r.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,s=i.resolution*this.size[0]/2**r,l=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+l,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,s=r*this.size[0],l=r*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+s,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],s=this.lods.length-t;for(let e=0;e<s;e++){let r=e+t,{scale:s,resolution:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new f.A({level:e,scale:s,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,s.Cg)([(0,o.MZ)({type:h.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,s.Cg)([(0,g.w)("origin")],w.prototype,"readOrigin",null),(0,s.Cg)([(0,o.MZ)({type:[f.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,s.Cg)([(0,o.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,s.Cg)([(0,g.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,s.Cg)([(0,y.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],w.prototype,"writeSize",null),(0,s.Cg)([(0,o.MZ)({type:p.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=r=(0,s.Cg)([(0,o.$K)("esri.layers.support.TileInfo")],w)},72802(e,t,i){i.d(t,{U:()=>s});var r=i(19419);class s{constructor(e,t,i,s=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=s}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new s(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>_});var r,s=i(32198),l=i(56507),n=i(69622),a=i(49186),o=i(36563),u=(i(44208),i(66344)),h=i(15142),p=i(17676),c=i(36708),d=i(76030),f=i(84952),m=i(91429),g=i(72802),y=i(4718),v=i(69397);class w{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);let{location:t,data:i}=e;this.location=Object.freeze((0,y.o8)(t));let r=this.location.width,s=this.location.height,l=!0,n=!0,o=function(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Uint32Array(e)}(Math.ceil(r*s/32)),u=0;for(let e=0;e<i.length;e++){let t=e%32;i[e]?(n=!1,o[u]|=1<<t):l=!1,31===t&&++u}n?(this._availability="unavailable",this.byteSize=40):l?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;let i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,l=this._availability;return s<0||s>l.length?"unknown":l[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){let i=e.service.request||l.A,{row:r,col:s,width:n,height:o}=e,u={query:{f:"json"}};return t=t?{...u,...t}:u,i(function(e){let t;if(e.service.tileServers?.length){let i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;let i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:n,height:o},valid:!0,data:Array(n*o).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==n||e.location.height!==o))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:n,height:o}});return w.fromJSON(e)})}static fromJSON(e){return Object.freeze(new w(e))}}function b(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function A(e,t,i){return new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let _=class extends n.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=l.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2097152),this.addHandles((0,c.wB)(()=>{let{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),c.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";let r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(A(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof w){let s=r.getAvailability(t,i);if("unavailable"===s)throw A(e,t,i);return s}if((0,p.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;let l=this.layer.tileInfo;l.updateTileInfo(r);let n=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,p.zf)(e))throw e;if(l.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,l){if(!this._prefetchingEnabled)return;let n=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(n))return;let a=new AbortController;l.then(()=>a.abort(),()=>a.abort());let u=!1,h=(0,o.hA)(()=>{u||(u=!0,a.abort())});if(this.addHandles(h,n),await(0,d.md)(10,a.signal).catch(()=>{}),u||(u=!0,this.removeHandles(n)),(0,p.G4)(a))return;let c=new g.U(e,t,i),f={...s,signal:a.signal},m=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&m.upsampleTile(c);++e){let e=this.fetchAvailability(c.level,c.row,c.col,f);r._prefetches.push(e);let t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));let s=this._tmpTilemapDefinition,l=this._tilemapFromCache(e,t,i,s);if(l)return Promise.resolve(l);let n=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,p.u7)(n,()=>t((0,p.NK)()));let i=b(s),l=this._pendingTilemapRequests[i];if(!l){l=w.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));let e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=l,l.then(e,e)}l.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;let{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,f.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;let s=b(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],_.prototype,"layer",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],_.prototype,"minLOD",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],_.prototype,"maxLOD",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],_.prototype,"request",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],_.prototype,"size",void 0),_=r=(0,s.Cg)([(0,m.$K)("esri.layers.support.TilemapCache")],_)},82371(e,t,i){i.d(t,{E9:()=>f,Tw:()=>c,X6:()=>d});var r=i(56507),s=i(5443),l=i(86738),n=i(16930),a=i(87186),o=i(20223),u=i(2272),h=i(22671);async function p(e,t,i){let p=(0,u.Dl)(e),{rasterFunction:c,sourceJSON:d}=t||{},f=c?JSON.stringify(c.rasterFunctionDefinition||c):null,m=(0,u.lF)({...p.query,renderingRule:f,f:"json"}),g=(0,u.jV)(m,i);e=p.path;let y=d||await(0,r.A)(e,g).then(e=>e.data),{currentVersion:v}=y,w=y.hasRasterAttributeTable?(0,r.A)(`${e}/rasterAttributeTable`,g):null,b=y.hasColormap?(0,r.A)(`${e}/colormap`,g):null,A=y.hasHistograms?(0,r.A)(`${e}/histograms`,g):null,_=v>=10.3?(0,r.A)(`${e}/keyProperties`,g):null,C=y.hasMultidimensions?(0,r.A)(`${e}/multidimensionalInfo`,g):null,S=(c?v>=10.91:v>=10.81)?(0,r.A)(`${e}/statistics`,g):null,R=await Promise.allSettled([w,b,A,_,C,S]),M=s.A.fromJSON(y.extent),O=Math.ceil(M.width/y.pixelSizeX-.1),x=Math.ceil(M.height/y.pixelSizeY-.1),I=n.A.fromJSON(y.spatialReference||y.extent.spatialReference),T="fulfilled"===R[0].status?R[0].value?.data:null,P=T?.features?.length?h.A.fromJSON(T):null,N="fulfilled"===R[1].status?R[1].value?.data.colormap:null,z=N?.length?N:null,F="fulfilled"===R[2].status?R[2].value?.data.histograms:null,Z=F?.[0]?.counts?.length?F:null,D="fulfilled"===R[3].status?R[3].value?.data??{}:{},J="fulfilled"===R[4].status?R[4].value?.data.multidimensionalInfo:null,j=J?.variables?.length?J:null;var L;(L=j)&&L.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"===e.name&&!e.recurring&&!e.unit&&(e.unit="ISO8601")})});let $=function(e,t){let i=null;t&&t.length===e.bandCount&&(i=t.map(e=>{let t=e.covariances?.trim(),i=t?t.split(",").map(Number):void 0;return{avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum,covariances:i}}));let r=e.minValues?.length===e.bandCount?e.minValues.map((t,i)=>({min:t,max:e.maxValues[i],avg:e.meanValues[i],stddev:e.stdvValues[i]})):null;return null==r||null==i||i.some((e,t)=>e.min!==r[t]?.min||e.max!==r[t]?.max||e.avg!==r[t]?.avg||e.stddev!==r[t]?.stddev)?r:i}(y,"fulfilled"===R[5].status?R[5].value?.data.statistics:null),{defaultVariable:V,serviceDataType:q}=y;V&&V!==D.DefaultVariable&&(D.DefaultVariable=V),q?.includes("esriImageServiceDataTypeVector")&&!q.includes(D.DataType)&&(D.DataType=q.replace("esriImageServiceDataType",""));let E=y.noDataValue;y.noDataValues?.length&&y.noDataValues.some(e=>e!==E)&&(E=y.noDataValues);let k=y.transposeInfo?new o.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new l.A({x:y.extent.xmin,y:y.extent.ymax,spatialReference:I}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(O,x))/Math.LN2-8)),transposeInfo:y.transposeInfo}):void 0;return new a.A({width:O,height:x,bandCount:y.bandCount,extent:s.A.fromJSON(y.extent),spatialReference:I,pixelSize:new l.A({x:y.pixelSizeX,y:y.pixelSizeY,spatialReference:I}),pixelType:y.pixelType.toLowerCase(),statistics:$,attributeTable:P,colormap:z,histograms:Z,keyProperties:D,noDataValue:E,multidimensionalInfo:j,storageInfo:k})}function c(e,t,i){return p(e,{sourceJSON:t},i)}function d(e,t,i){return p(e,{rasterFunction:t},i)}function f(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>p,jV:()=>o,lF:()=>h});var r=i(92602),s=i(70333),l=i(4718),n=i(84952),a=i(926);function o(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,n.An)(e):(0,l.o8)(e)}function h(e,t,i){let r={};for(let s in e){if("declaredClass"===s)continue;let l=e[s];if(null!=l&&"function"!=typeof l)if(Array.isArray(l))r[s]=l.map(e=>h(e));else if("object"==typeof l)if(l.toJSON){let e=l.toJSON(i?.[s]);r[s]=t?e:JSON.stringify(e)}else r[s]=t?l:JSON.stringify(l);else r[s]=l}return r}async function p(e,t,l){return function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??s.id?.findCredential(e)?.token:null}(e,t)||(!s.id&&r.A.request.useIdentity&&await Promise.all([i.e(6361),i.e(6475),i.e(3713)]).then(()=>i(50148)),(await s.id.getCredential(e,l))?.token)}},24212(e,t,i){i.d(t,{$7:()=>o,B:()=>a,M7:()=>p,XF:()=>h,tW:()=>u,w7:()=>n});var r=i(56512),s=i(86211),l=i(16271);function n(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?c:d}(e).mode}(null==e||(e.hasZ??!1),t)}function a(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function o(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function u(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function h(e,t){t&&e.warn(".elevationInfo=",t)}function p(e){return(e?.offset??0)*(0,l.Ao)(e?.unit)}(0,r.B)((e,t,i)=>{if(!e||"decimal-degrees"===t)return 0;let r="unknown"!==t&&t?t:"meters",l=(0,s.mq)(i);return l?(0,s.oU)(e,r,l):0});const c={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2309,3299],{14690(e,t,r){r.r(t),r.d(t,{constructFromFlatGeometry:()=>a});var n=r(95213),i=r(88885);function a({type:e,vertexCount:t,vertexXY:r,vertexZ:a,vertexM:o,partCount:l,partOffsets:m,partFlags:u,segmentFlags:d,segmentIndices:c,segmentParams:h,segmentCountArc:_,segmentCountBezier:f}){let p=new s[e];if(p instanceof n.P)return p.setXYCoords(r[0],r[1]),a&&p.setZ(a[0]),o&&p.setM(o[0]),p;let k=new n.A({fromArray:r});if(p.setAttributeStreamRef(0,k),a){let e=new n.A({fromArray:a});p.setAttributeStreamRef(1,e)}if(o){let e=new n.A({fromArray:o});p.setAttributeStreamRef(2,e)}if(p instanceof i.M)return p.resizeNoInit(t),p;{let e=l+1,t=new n.a({fromArray:m,size:e}),r=new n.b({fromArray:u,size:e});p.setPathStreamRef(t),p.setPathFlagsStreamRef(r)}if(null==d)return p.resizeImpl(t),p;let b=new n.b({fromArray:d}),y=new n.a({fromArray:c}),g=new n.A({fromArray:h});return p.setSegmentData(y,g,b,h.length),p.incCurveType(4,_),p.incCurveType(2,f),p.modifyCurveCounter(_+f),p.resizeImpl(t),p}const s={point:n.P,multipoint:i.M,polyline:i.a,polygon:i.P}},90293(e,t,r){r(55537),r(83661),r(88885),r(95213);var n=r(39117),i=r(86211),a=r(21325);(0,n.l)()||(0,n.m)(e=>{let t,r;"number"==typeof e?t=e:r=e;let n,s,o={wkid:t,wkt:r};if(r){n=(0,i.x1)(r);let e=(0,a.EA)(o);if(!n&&!e)throw Error(`Unsupported WKT type: ${r}`)}else n=!(0,a.EA)(o);return s=t&&i.yD.has(t)?Math.PI/200:n?(0,i.Ao)(o):Math.PI/180,{isPCS:n,metersOrRadiansPerUnit:s,semiMajor:0,wkidOrWkt:e}})},83299(e,t,r){r.r(t),r.d(t,{fromGeometries:()=>W,fromGeometry:()=>X,fromGeometryToGXGeometry:()=>Y,fromGeometryToGXGeometryUsingImportOperator:()=>L,fromSpatialReference:()=>q,getSpatialReference:()=>M,toGeometry:()=>K,toSpatialReference:()=>Z});var n=r(14690),i=r(55537),a=r(83661),s=r(39117),o=r(95213),l=r(88885),m=r(87992),u=r(16930),d=(r(90293),r(60408));function c(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){let e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function h(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){let e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=NaN),e}return{value:{m_token:4,m_value:null},done:!0}}class _{m_iteratorStack;m_nextFlatToken;m_currentToken=0;m_currentValue;m_options;createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:c}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:h}}constructor(e,t){this.m_options=t?{...t}:{strict:!0};let r=e;this.m_iteratorStack=[r instanceof Array?this.createJSONArrayIterator(r):this.createJSONObjectIterator(r)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,a.aL)()&&this.m_currentValue<=(0,a.i)()?8:7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,i.d)("unrecognized json element type")}(0,i.d)("unrecognized json element type")}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,i.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}isError(){return 0}}class f{m_buffer=null;m_view=null;m_sz=0;m_offset=0;m_bOwnsBuffer=!0;m_bLittleEndian=!0;m_element;m_elementBytes;m_elementView;m_elementDouble;m_elementFloat;m_elementInt64;m_elementInt32;m_elementInt16;constructor(e){if(this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz){if(this.m_sz=e.sz,e.buffer)return this.m_sz<0&&(0,i.r)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0===e.offset?0:e.offset,this.m_view=void 0===e.offset?new DataView(this.m_buffer):new DataView(e.buffer,e.offset,e.sz),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0);this.m_sz<0&&(0,i.r)("size out of range"),this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))}else e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,e.move.m_bOwnsBuffer=!0):(0,i.d)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===f.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===f.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return+!!this.m_bLittleEndian}getView(){return this.m_view||(0,i.q)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,i.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function p(e){let t=!1;for(;3!==e.nextToken();){let r=e.currentString();e.nextToken(),"uwkid"===r?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function k(e){let t=!1,r=!1,n=!1,i=!1,a=!1,o=!1,l=!1,m=!1,u=!1,d=!1,c=!1,h=!1,_=!1,f=!1,k=!1,b=!1,y=!1,g=-1,T=-1,N=-1,v=-1,x=0,S=0,w=0,A=0,C=0,D=0,F=0,j=0,I=0,O=0,z="",P="",G=null;for(;3!==e.nextToken();){let s=e.currentString();e.nextToken(),"wkid"===s?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===s?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"wkt"===s?a||(a=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===s?a||6===e.currentToken()&&(P=e.currentString()):"vcsWkid"===s?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"latestVcsWkid"===s?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===s?l||(l=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===s?m||(m=!0,o=!0,S=e.currentDoubleValue()):"mTolerance"===s?u||(u=!0,o=!0,w=e.currentDoubleValue()):"falseX"===s?d||(d=!0,o=!0,F=e.currentDoubleValue()):"falseY"===s?c||(c=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===s?h||(h=!0,o=!0,I=e.currentDoubleValue()):"falseM"===s?_||(_=!0,o=!0,O=e.currentDoubleValue()):"xyUnits"===s?f||(f=!0,o=!0,A=e.currentDoubleValue()):"zUnits"===s?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===s?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===s?y||(y=!0,G=p(e)):e.skipChildren()}v<=0&&N>0&&(v=N),N<=0&&v>0&&(N=v);let E=null,B=!0;if(0!==z.length&&(B=!1,(0,s.q)(z)&&(E=(0,s.b)(z))),!E&&0!==P.length&&(B=!1,(0,s.q)(P)&&(E=(0,s.b)(P))),!E&&T>0&&(B=!1,(0,s.p)(T)&&(v<=0||(0,s.a_)())&&(E=(0,s.c)(T,v))),!E&&g>0&&(B=!1,(0,s.p)(g)&&(N<=0||(0,s.a_)())&&(E=(0,s.c)(g,N))),B&&(E=(0,s.e)(G)),o&&E){let e=new s.a;E.queryPrecisionDescriptorWithoutFalseXY(e),l&&e.setTolerance(0,x),m&&e.setTolerance(1,S),u&&e.setTolerance(2,w),f&&d&&c&&e.setGridParams(F,j,A),k&&h&&e.setZParams(I,C),b&&_&&e.setMParams(O,D),E=(0,s.f)(E,e)}return E}function b(e,t,r,n){2!==n.currentToken()&&(0,i.b)("failed to parse multipath: array of array of vertices is expected");let s=e?new l.P:new l.a,m=s,u=(0,o.a0)(0),d=(0,o.a2)(2,0),c=(0,o.a1)(0),h=null,_=null,f=null,p=null,k=null,b=0,y=0,g=0,N=new l.S,w=a.P.getNAN(),A=0,C=0,D=+!!e;for(;4!==n.nextToken();){2!==n.currentToken()&&(0,i.b)("failed to parse multipath: ring/path array is expected");let r=2,s=0,F=!0,j=0,I=0,O=a.P.getNAN(),z=(0,a.c)(4,NaN),P=(0,a.c)(4,NaN),G=!1;for(n.nextToken();4!==n.currentToken();){if(t&&1===n.currentToken())F&&(0,i.b)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,o.a1)(A-1,1),p=(0,o.a0)(A-1,-1),k=(0,o.a2)(0)),G=!0,r=1,({segFlag:g,toPointSz:j}=S(N,z,w,n));else{for(G=!1,2!==n.currentToken()&&(0,i.b)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),j=0;4!==n.nextToken();)4===j&&(0,i.b)("failed to parse multipath: each vertex array has to have at most 4 elements"),z[j++]=T(n);j<2&&(0,i.b)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,o.a6)(z[0],z[1])||(0,i.b)("failed to parse multipath: x and y must be finite")}n.nextToken();do{if(d.size()===2*A&&d.resize(v(A)),d.writePoint2D(2*A,O.setCoords(z[0],z[1])),h&&h.size()===A&&h.resize(x(A)),j>2?(h||=(0,o.a2)(A+1,NaN),h.write(A,z[2])):h&&h.write(A,NaN),_&&_.size()===A&&_.resize(x(A)),j>3?(_||=(0,o.a2)(A+1,NaN),_.write(A,z[3])):_&&_.write(A,NaN),F)C++,u.add(A),c.add(D),F=!1,I=j,(0,a.f)(P,z,0,0,I);else if(null!==f)if(G){let e=(0,l.a9)(g),t=k.size();k.resize(t+e),f.add(g),p.add(b),N.get().writeInBufferStream(k,b),b+=e,m.incCurveType(g,1),y++}else f.add(1),p.add(-1);A++,s++,w.setCoords(z[0],z[1])}while(s<r&&4===n.currentToken())}0!==s&&(e&&s>r&&j===I&&0===(0,a.aM)(z,P,j)?(A--,s--):null!==f&&(f.add(1),p.add(-1)))}return A&&(u.resize(C),c.resize(C),A>0&&(u.add(A),c.add(0)),m.setAttributeStreamRef(0,d),m.setPathFlagsStreamRef(c),m.setPathStreamRef(u),null!==f&&(m.updateCurveCounter(y),m.setSegmentData(p,k,f,b)),m.notifyModifiedFlags(65535)),{geometry:s,as:h,bs:_}}function y(e,t){2!==t.currentToken()&&(0,i.b)("failed to parse multipoint: array of vertices is expected");let r=0,n=new l.M,s=(0,o.a2)(2,0),m=0,u=(0,a.c)(4,NaN),d=new a.P,c=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,i.b)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,i.b)("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[m++]=T(t);m<2&&(0,i.b)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,o.a6)(u[0],u[1])||(0,i.b)("failed to parse multipoint: x and y must be finite"),s.size()===2*r&&s.resize(v(r)),s.writePoint2D(2*r,d.setCoords(u[0],u[1])),c&&c.size()===r&&c.resize(x(r)),m>2?(c||=(0,o.a2)(r+1,NaN),c.write(r,u[2])):c&&c.write(r,NaN),h&&h.size()===r&&h.resize(x(r)),m>3?(h||=(0,o.a2)(r+1,NaN),h.write(r,u[3])):h&&h.write(r,NaN),r++}if(r){let e=n.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(r),e.notifyModifiedFlags(65535)}return{geometry:n,as:c,bs:h}}function g(e,t){2!==t.currentToken()&&(0,i.b)("failed to parse array of IDs: array of array of integers is expected");let r=(0,o.a7)(2,0),n=0,a=-1;for(;4!==t.nextToken();){let e=n;r.size()===n&&r.resize(x(n)),n++;let s=0;for(-1===a?a=+(2===t.currentToken()):1===a&&2!==t.currentToken()&&(0,i.b)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(r.size()===n&&r.resize(x(n)),r.write(n,N(t)),s++,n++);4!==t.nextToken();)r.size()===n&&r.resize(x(n)),r.write(n,N(t)),s++,n++;if(r.write(e,s),0===a)break}return r.resize(n),r}function T(e){let t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return NaN;{let t=e.currentDoubleValue();return Number.isNaN(t)?NaN:t}}function N(e){return e.currentInt32Value()}function v(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function x(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function S(e,t,r,n,s){let o={segFlag:0,toPointSz:0},m=n.currentToken();m=n.nextToken();let u=n.currentString(),d=u[0];for((1!==u.length||"a"!==d&&"b"!==d&&"c"!==d&&"n"!==d&&"q"!==d)&&(0,i.b)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for curve parameters"),m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for to point"),o.toPointSz=0;4!==n.nextToken();)4===o.toPointSz&&(0,i.b)("failed to parse curve: vertex array cannot have more than 4 elements"),t[o.toPointSz++]=T(n);o.toPointSz<2&&(0,i.b)("failed to parse curve: vertex array must have at least 2 elements");let c=a.P.construct(t[0],t[1]),h=a.P.getNAN(),_=-1,p=-1,k=!1,b=NaN,y=NaN,g=NaN,N=[a.P.getNAN(),a.P.getNAN(),a.P.getNAN()],v=a.P.getNAN();if("a"===d){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for center point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for center point"),h.setCoords(e,t),m=n.nextToken(),_=n.currentInt32Value(),m=n.nextToken(),p=n.currentInt32Value(),m=n.nextToken(),4===m?k=!0:(k=!1,b=T(n),m=n.nextToken(),y=T(n),m=n.nextToken(),g=T(n),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters")),o.segFlag=4}else if("b"===d){for(let e=0;e<2;e++){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,r)}m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=2}else if("n"===d){{m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[0].setCoords(e,t)}m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);N[1].setCoords(e,t),N[2].setCoords(r,r),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=8}else if("q"===d){for(let e=0;e<1;e++){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,r)}m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=16}else{m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for interior point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for interior point"),v.setCoords(e,t),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=4}return m=n.nextToken(),3!==m&&(0,i.b)("failed to parse curve: end object is expected for curve"),"a"===d?(e.createEllipticArc(),k?w(e.get(),r,c,h,!0,_,p):function(e,t,r,n,i,a,s,o,m){e.dropAllAttributes();let u=new f({sz:44,buffer:new ArrayBuffer(44)}),d=0;u.writeDouble(d,n.x),d+=8,u.writeDouble(d,n.y),d+=8,u.writeDouble(d,s),d+=8,u.writeDouble(d,o),d+=8,u.writeDouble(d,m),d+=8;let c=0;a||(c|=2048),i&&(c|=4096),u.writeInt32(d,c),d+=4,function(e,t,r,n){e.m_bits=0,e.m_center.x=n.readDouble(0),e.m_center.y=n.readDouble(8),e.m_rotation=n.readDouble(16),e.m_semiMajorAxis=n.readDouble(24),e.m_minorMajorRatio=n.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y;let i=n.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i),o=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(r)?(s=!1,a=!0):a&&t.equals(r)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,l.a8)(e,NaN,o,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,r,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,o,e.m_center),e.setProjectionBehavior(1),(0,l.a6)(e)}(e,t,r,u)}(e.get(),r,c,h,_,p,b,y,g)):"b"===d?(e.createCubicBezier(),function(e,t,r,n){e.dropAllAttributes();let s=new f({sz:32,buffer:new ArrayBuffer(32)}),o=0;s.writeDouble(o,n[0].x),o+=8,s.writeDouble(o,n[0].y),o+=8,s.writeDouble(o,n[1].x),o+=8,s.writeDouble(o,n[1].y),o+=8,function(e,t,r,n){(0,i.g)(32<=n.size()),e.m_cp=(0,a.d)(a.P,2),e.m_cp[0].x=n.readDouble(0),e.m_cp[0].y=n.readDouble(8),e.m_cp[1].x=n.readDouble(16),e.m_cp[1].y=n.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y}(e,t,r,s)}(e.get(),r,c,N)):"n"===d?(e.createQuadraticRationalBezier(),function(e,t,r,n,i,a,s){e.dropAllAttributes();let o=new f({sz:40,buffer:new ArrayBuffer(40)}),l=0;o.writeDouble(l,n.x),l+=8,o.writeDouble(l,n.y),l+=8,o.writeDouble(l,i),l+=8,o.writeDouble(l,a),l+=8,o.writeDouble(l,s),l+=8,function(e,t,r,n){e.m_cp.x=n.readDouble(0),e.m_cp.y=n.readDouble(8),e.m_weights[0]=n.readDouble(16),e.m_weights[1]=n.readDouble(24),e.m_weights[2]=n.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y}(e,t,r,o)}(e.get(),r,c,N[0],N[1].x,N[1].y,N[2].x)):"q"===d?(e.createQuadraticBezier(),e.get().construct(r,N[0],c)):(e.createEllipticArc(),w(e.get(),r,c,v,!1,-1,-1)),o}function w(e,t,r,n,s,o,m){e.dropAllAttributes();let u=new f({sz:20,buffer:new ArrayBuffer(20)}),d=0;u.writeDouble(d,n.x),d+=8,u.writeDouble(d,n.y),d+=8;let c=0;s?(m||(c|=8),o&&(c|=16)):c|=128,u.writeInt32(d,c),d+=4,function(e,t,r,n){0>=n.size()&&(0,i.r)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(r);let s=a.P.getNAN();s.x=n.readDouble(0),s.y=n.readDouble(8);let o=n.readInt32(16);if(1&o)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),!1;let m=!!(64&o),u=!!(128&o),d=!!(32&o),c=!!(8&o),h=!!(16&o),_=t.equals(r);m&&!_&&(m=!1,d=!0),d&&_&&(m=!0,d=!1,s.setCoords(0,0)),m||(u?d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,r,s),_&&c===e.isClockwise()&&e.reverse()):d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),e.queryCoord2D(.5,e.m_interior)):(0,l.a7)(e,t,r,s,c,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,l.a8)(e,NaN,c,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,l.a6)(e)}(e,t,r,u)}function A(e,t,r,n,a){let s=e.getGeometryType();if(s===i.G.enumEllipticArc)return function(e,t,r,n,a){(0,i.g)(!(0,l.a5)(e));let s=e.getEndXY(),o=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!r,u=NaN,d=NaN;if(o&&(u=e.getEndAttributeAsDbl(1,0)),m&&(d=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return D(o,m,s.x,s.y,u,d,n,a),!0;let c=0===e.projectionBehavior(),h=!!c&&e.isClosed();if(c&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a),F(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(c){a.startObject(),a.addFieldName("a"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a),F(e.m_center.x+0,e.m_center.y+0,17,a);let t=!e.isMajor();a.addInt32(+!!t);let r=e.isClockwise();a.addInt32(+!!r),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a);let t=e;F(t.m_center.x,t.m_center.y,17,a);let r=!t.isMajor();a.addInt32(+!!r);let i=t.isClockwise();a.addInt32(+!!i),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,r,n,a);if(s===i.G.enumBezier)return C(e,t,r,n,a);if(s===i.G.enumRationalBezier2)return function(e,t,r,n,i){let a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!r,l=NaN,m=NaN;s&&(l=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),D(s,o,a.x,a.y,l,m,n,i),F(e.m_cp.x,e.m_cp.y,n,i);let u=n;return i.addDouble(e.m_weights[0],u),i.addDouble(e.m_weights[1],u),i.addDouble(e.m_weights[2],u),i.endArray(),i.endObject(),!1}(e,t,r,n,a);if(s===i.G.enumBezier2){let i=new l.I;return i.constructFromQuadraticSegment(e),C(i,t,r,n,a)}(0,i.a)("")}function C(e,t,r,n,i){let a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!r,l=NaN,m=NaN;return s&&(l=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),D(s,o,a.x,a.y,l,m,n,i),F(e.m_cp[0].x,e.m_cp[0].y,n,i),F(e.m_cp[1].x,e.m_cp[1].y,n,i),i.endArray(),i.endObject(),!1}function D(e,t,r,n,i,a,s,o){o.startArray(),o.addDouble(r,s),o.addDouble(n,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function F(e,t,r,n){n.startArray(),n.addDouble(e,r),n.addDouble(t,r),n.endArray()}function j(e,t,r,n){let a=r.getImpl(),s=!!(2&t),m=!!(4&t),u=!!(8&t),d=a.hasAttribute(1)&&!s,c=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!u,_=a.hasNonLinearSegments();d&&(n.addFieldName("hasZ"),n.addBool(!0)),c&&(n.addFieldName("hasM"),n.addBool(!0)),e?_?n.addFieldName("curveRings"):n.addFieldName("rings"):_?n.addFieldName("curvePaths"):n.addFieldName("paths");let f=null,p=[];if(r.isEmpty())n.startArray(),n.endArray();else{let e=17-(31&t>>13);n.startArray();let u=r.getPathCount(),k=0,b=a.getAttributeStreamRef(0),y=null,g=null,T=null,N=new l.S,v=null,x=null,S=null;_&&(v=a.getSegmentFlagsStreamRef(),x=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),d&&(y=a.getAttributeStreamRef(1)),c&&(g=a.getAttributeStreamRef(2)),h&&(T=a.getAttributeStreamRef(3),f=(0,o.X)(3,0));for(let t=0;t<u;t++){n.startArray(),h&&p.push(0);let a=r.getPathEnd(t);if(k===a){n.endArray();continue}let o=r.isClosedPath(t),l=b.read(2*k),u=b.read(2*k+1),_=d?y.read(k):NaN,w=c?g.read(k):NaN,C=h?T.read(k):0;I(d,c,l,u,_,w,e,n);let D=1;h&&(f.add(C),p[p.length-1]++);let F=l,j=u,O=_,z=w,P=C,G=!1,E=0,B=NaN,R=NaN,V=0;for(let t=k+1,r=k,M=o?a+1:a;t<M;t++,r++){let o,k,M=null===v?1:31&v.read(r);if(t<a?(o=b.read(2*t),k=b.read(2*t+1),d&&(B=y.read(t)),c&&(R=g.read(t)),h&&(V=T.read(t))):(o=F,k=j,B=O,R=z,V=P),1!==M){G=!0,4===M?N.createEllipticArc():2===M?N.createCubicBezier():16===M?N.createQuadraticBezier():8===M?N.createQuadraticRationalBezier():(0,i.a)("JSON export.unsupported curve");let t=N.get(),a=x.read(r);t.setStartXYCoords(l,u),t.setEndXYCoords(o,k),d&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),c&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,R)),t.readFromBufferStream(S,a),A(N.get(),s,m,e,n)&&E++}else I(d,c,o,k,B,R,e,n);h&&(f.add(V),p[p.length-1]++),D++,l=o,u=k,_=B,w=R,C=V}G&&0===E||(D<2&&E<1&&(I(d,c,l,u,_,w,e,n),D++,h&&(f.add(C),p[p.length-1]++)),o&&D<3&&E<2&&(I(d,c,F,j,O,z,e,n),D++,l=F,u=j,_=O,w=z,C=P,h&&(f.add(P),p[p.length-1]++))),n.endArray(),k=a}n.endArray()}if(h){n.addFieldName("ids"),n.startArray();let e=0;for(let t=0,r=p.length;t<r;++t){let r=p[t];(0,i.g)(0===r||null!==f&&e+r<=f.size()),n.startArray();for(let t=0;t<r;++t)n.addInt32(f.read(e)),e++;n.endArray()}n.endArray()}}function I(e,t,r,n,i,a,s,o){o.startArray(),o.addDouble(r,s),o.addDouble(n,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const O=92,z=102,P=117,G=48;class E{m_jsonString;m_endToken;m_startToken;m_currentTokenType;m_bHasEscapes;m_functionStack=[];m_pushPositions=[];m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0});m_prepSubstr;m_getCurrentSubstr;m_stepOverChar;m_peekChar;m_get;m_increment;m_eof;constructor(e){void 0===e?(this.m_startToken=2**53-1,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,i.a)("streaming json parsing not yet impl"):(0,i.d)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){let t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,i.a)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=2**53-1,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,i.a)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,i.g)(0),""}childrenAsString(){return(0,i.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e)}else if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e)}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,i.b)("invalid token")}toUTF8_(e,t){let r=0,n=e;for(;t.charCodeAt(n)===O&&t.charCodeAt(n+1)===P;)r++,n+=6;n=e;let i=new Uint8Array(r),a=0;for(;t.charCodeAt(n)===O&&t.charCodeAt(n+1)===P;)i[a++]=Number.parseInt(t.slice(n+2,n+6),16),n+=6;return{u8s:this.m_utf8Decoder.decode(i),end:n}}unquoteCurrentString_(){let e="",t=1,r=this.m_endToken-this.m_startToken-1,n=0,i=this.m_getCurrentSubstr();for(let a=t;a<r;a++)if(i.charCodeAt(a)!==O)n++;else{switch(n>0&&(e+=i.slice(t,t+n)),i.charCodeAt(++a)){case 34:e+='"';break;case P:{let{u8s:t,end:r}=this.toUTF8_(a-1,i);a=r-1,e+=t;break}case O:e+="\\";break;case 47:e+="/";break;case 98:e+="\b";break;case z:e+="\f";break;case 110:e+="\n";break;case 114:e+="\r";break;case 116:e+="\t"}t=a+1,n=0}return n>0&&(e+=i.slice(t,t+n)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,i.b)("invalid token"),10===this.m_currentTokenType)return NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return NaN;e=e.slice(1),t-=2,0===t&&(0,i.b)("invalid token")}let r=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(r)&&(0,i.b)("invalid token");else if(Number.isNaN(r))return NaN;return r}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,i.b)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,i.b)("invalid token"));let r=parseInt(e);return Number.isNaN(r)&&(0,i.b)("invalid token"),r}currentInt64Value(){return(0,i.g)(0),0n}currentBoolValue(){return(0,i.g)(0),!1}isError(){return 0}JSONString(){return(0,i.g)(0),""}pushPosition(){return(0,i.g)(0),!1}popPosition(){return(0,i.g)(0),!1}skipCStyleComments_(){(0,i.g)(0)}skipCppStyleComments_(){(0,i.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),42===e?this.skipCStyleComments_():47===e?this.skipCppStyleComments_():(0,i.b)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,i.b)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,i.b)("invalid token"),t=this.m_peekChar();47===t?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return 93===this.m_peekChar()&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return 125===this.m_peekChar()&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token");let e=this.m_peekChar();for(;34!==e;){let t=e===O;if(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,34===e||e===O||47===e||98===e||e===z||110===e||114===e||116===e)this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar();else if(e===P)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),e>=G&&e<=57||e>=97&&e<=z||e>=65&&e<=70||(0,i.b)("invalid token");else(0,i.b)("invalid token")}this.m_stepOverChar()}comma_(){return 44===this.m_peekChar()&&(this.m_increment(),!0)}colon_(){return 58===this.m_peekChar()&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,i.b)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,34!==this.m_peekChar()&&(0,i.b)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,i.b)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,i.b)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()===G?this.m_stepOverChar():this.digits_()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar()}while(e>=G&&e<=57)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),e>=G&&e<=57||(0,i.b)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),(43===e||45===e)&&(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar()),e>=G&&e<=57||(0,i.b)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(45===t&&(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),t=this.m_peekChar(),e=!0,t>=G&&t<=57||(0,i.b)("invalid token")),this.int_(),t=this.m_peekChar(),46===t)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),(101===t||69===t)&&this.exp_();else if(101===t||69===t)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;let r=this.m_endToken-this.m_startToken-t;if(r<10)this.m_currentTokenType=8;else if(10===r){let r=this.m_getCurrentSubstr();this.m_currentTokenType=e?r.slice(t)<="2147483648"?8:9:r.slice(t)<="2147483647"?8:9}else if(r<19)this.m_currentTokenType=9;else if(19===r){let r=this.m_getCurrentSubstr();this.m_currentTokenType=e?r.slice(t)<="9223372036854775808"?9:7:r.slice(t)<="9223372036854775807"?9:7}else this.m_currentTokenType=7}}valueNull_(){let{s:e,bDone:t}=this.m_get(5);t&&(0,i.b)("invalid token"),"null"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=10}valueTrue_(){let{s:e,bDone:t}=this.m_get(5);t&&(0,i.b)("invalid token"),"true"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=11}valueFalse_(){let{s:e,bDone:t}=this.m_get(6);t&&(0,i.b)("invalid token"),"false"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=12}valueNan_(){let{s:e,bDone:t}=this.m_get(4);t&&(0,i.b)("invalid token"),"NaN"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;let e=this.m_peekChar();123===e?this.valueStartObject_():91===e?this.valueStartArray_():34===e?this.valueString_():45===e||e>=G&&e<=57?this.valueNumber_():110===e?this.valueNull_():116===e?this.valueTrue_():e===z?this.valueFalse_():78===e?this.valueNan_():(0,i.b)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());let e=this.m_peekChar();123!==e&&91!==e&&(0,i.b)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const B=new class{m_pendingKey=null;m_acceptedObject=null;m_currentObject=[];reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){let e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){let e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,i.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},R=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,a,o){!function(e,t,r,n){if(t||r){if(n.startObject(),null!==t)switch(t.getGeometryType()){case i.G.enumPolygon:j(!0,e,t,n);break;case i.G.enumPolyline:j(!1,e,t,n);break;case i.G.enumMultiPoint:!function(e,t,r){let n=t.getImpl(),a=n.hasAttribute(1)&&!(2&e),s=n.hasAttribute(2)&&!(4&e),o=n.hasAttribute(3)&&!(8&e);a&&(r.addFieldName("hasZ"),r.addBool(!0)),s&&(r.addFieldName("hasM"),r.addBool(!0)),r.addFieldName("points");let l=t.getPointCount();if(t.isEmpty())r.startArray(),r.endArray();else{let t=17-(31&e>>13);r.startArray();let i=n.getAttributeStreamRef(0),o=null,m=null;a&&(o=n.getAttributeStreamRef(1)),s&&(m=n.getAttributeStreamRef(2));for(let e=0;e<l;e++){let n=i.read(2*e),l=i.read(2*e+1),u=NaN,d=NaN;a&&(u=o.read(e)),s&&(d=m.read(e)),I(a,s,n,l,u,d,t,r)}r.endArray()}if(o){let e=null;n.isEmpty()||(e=n.getAttributeStreamRef(3)),(0,i.g)(0===l||null!==e&&e.size()>=l),r.addFieldName("ids"),r.startArray();for(let t=0;t<l;t++)r.addInt32(e.read(t));r.endArray()}}(e,t,n);break;case i.G.enumPoint:!function(e,t,r){let n=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return r.addFieldName("x"),r.addNull(),r.addFieldName("y"),r.addNull(),n&&(r.addFieldName("z"),r.addNull()),i&&(r.addFieldName("m"),r.addNull()),void(a&&(r.addFieldName("id"),r.addInt32(0)));let s=17-(31&e>>13);r.addFieldName("x"),r.addDouble(t.getX(),s),r.addFieldName("y"),r.addDouble(t.getY(),s),n&&(r.addFieldName("z"),r.addDouble(t.getZ(),s)),i&&(r.addFieldName("m"),r.addDouble(t.getM(),s)),a&&(r.addFieldName("id"),r.addInt32(t.getID()))}(e,t,n);break;case i.G.enumEnvelope:!function(e,t,r){let n=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return r.addFieldName("xmin"),r.addNull(),r.addFieldName("ymin"),r.addNull(),r.addFieldName("xmax"),r.addNull(),r.addFieldName("ymax"),r.addNull(),n&&(r.addFieldName("zmin"),r.addNull(),r.addFieldName("zmax"),r.addNull()),i&&(r.addFieldName("mmin"),r.addNull(),r.addFieldName("mmax"),r.addNull()),void(a&&(r.addFieldName("idmin"),r.addInt32(0),r.addFieldName("idmax"),r.addInt32(0)));let s=17-(31&e>>13);if(r.addFieldName("xmin"),r.addDouble(t.getXMin(),s),r.addFieldName("ymin"),r.addDouble(t.getYMin(),s),r.addFieldName("xmax"),r.addDouble(t.getXMax(),s),r.addFieldName("ymax"),r.addDouble(t.getYMax(),s),n){let e=t.queryInterval(1,0);r.addFieldName("zmin"),r.addDouble(e.vmin,s),r.addFieldName("zmax"),r.addDouble(e.vmax,s)}if(i){let e=t.queryInterval(2,0);r.addFieldName("mmin"),r.addDouble(e.vmin,s),r.addFieldName("mmax"),r.addDouble(e.vmax,s)}if(a){let e=t.queryInterval(3,0);r.addFieldName("idmin"),r.addInt32(e.vmin),r.addFieldName("idmax"),r.addInt32(e.vmax)}}(e,t,n);break;case i.G.enumMultipatch:(0,i.g)(0);break;default:(0,i.d)("exportToJSON")}null!==r&&(n.addFieldName("spatialReference"),function(e,t,r){r.startObject();let n=0;t.isCustomWkid()||(n=t.getOldID());let a=0,o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(a=o.getOldID()),a<=0&&(n=0)),n>0){r.addFieldName("wkid"),r.addInt32(n);let e=t.getLatestID();if(e>0&&e!==n&&(r.addFieldName("latestWkid"),r.addInt32(e)),a>0){r.addFieldName("vcsWkid"),r.addInt32(a);let e=t.getLatestVerticalID();e!==a&&(r.addFieldName("latestVcsWkid"),r.addInt32(e))}}if(0===t.getCoordinateSystemType())r.addFieldName("wkid"),r.addNull(),null!==t.getUnit()&&(r.addFieldName("unit"),function(e,t,r){r.startObject();let n=t.getID();n<=0&&(0,i.b)("cannot export unit that has no valid WKID"),r.addFieldName("uwkid"),r.addInt32(n),r.endObject()}(0,t.getUnit(),r));else if(n<=0||1&e){let n="";64&e&&(n=t.getText2(),r.addFieldName("wkt2"),r.addString(n));let i=t.getText();i!==n&&(r.addFieldName("wkt"),r.addString(i))}if(16&e){let e=new s.a;t.queryPrecisionDescriptor(e),r.addFieldName("xyTolerance"),r.addDouble(e.getTolerance(0)),r.addFieldName("zTolerance"),r.addDouble(e.getTolerance(1)),r.addFieldName("mTolerance"),r.addDouble(e.getTolerance(2)),r.addFieldName("falseX"),r.addDouble(e.getFalseX()),r.addFieldName("falseY"),r.addDouble(e.getFalseY()),r.addFieldName("xyUnits"),r.addDouble(e.getGridUnitsXY()),r.addFieldName("falseZ"),r.addDouble(e.getFalseZ()),r.addFieldName("zUnits"),r.addDouble(e.getGridUnitsZ()),r.addFieldName("falseM"),r.addDouble(e.getFalseM()),r.addFieldName("mUnits"),r.addDouble(e.getGridUnitsM())}r.endObject()}(e,r,n)),n.endObject()}}(e,t,r,n)}exportSpatialReference(e,t,r,n){(0,i.g)(0)}exportProjectionTransformation(e,t,r,n){(0,i.g)(0)}exportDatumTransformation(e,t,r,n){(0,i.g)(0)}static geometryTypeToString(e){return(0,i.g)(0),""}},V=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,a,m,u){let d;"string"==typeof r?(d=new E({jsonString:r}),d.nextToken()):d=r,1!==d.currentToken()&&(0,i.b)("failed to import map geometry: start of object is expected");let c=function(e,t,r,n,a){let s=!1,m=!1,u=!1,d=!1,c=!1,h=!1,_=!1,f=!1,p=!1,v=!1,x=!1,S=!1,w=!1,A=!1,C=!1,D=!1,F=!1,j=!1,I=!1,O=!1,z=!1,P=!1,G=!1,E=!1,B=NaN,R=NaN,V=NaN,M=NaN,U=0,W=NaN,X=NaN,Y=NaN,L=NaN,q=NaN,K=NaN,Z=NaN,J=NaN,H=0,Q=0,$=!1,ee=!1,te=null,re=null,ne=null,ie=null,ae=null;for(;3!==r.nextToken();){let t=r.currentString();if(r.nextToken(),"spatialReference"===t){if(a&&!s){s=!0,1===r.currentToken()?ie=k(r):10!==r.currentToken()&&(0,i.b)("failed to parse spatial reference: object or null is expected");continue}}else if(n)if("hasZ"===t){if(!m){m=!0,$=11===r.currentToken();continue}}else if("hasM"===t){if(!u){u=!0,ee=11===r.currentToken();continue}}else if("rings"===t){if(!(c||h||e!==i.G.enumUnknown&&e!==i.G.enumPolygon)){c=!0,({geometry:ae,as:te,bs:re}=b(!0,!1,0,r));continue}}else if("curveRings"===t){if(!h&&(e===i.G.enumUnknown||e===i.G.enumPolygon)){h=!0,({geometry:ae,as:te,bs:re}=b(!0,!0,0,r));continue}}else if("paths"===t){if(!(_||f||e!==i.G.enumUnknown&&e!==i.G.enumPolyline)){_=!0,({geometry:ae,as:te,bs:re}=b(!1,!1,0,r));continue}}else if("curvePaths"===t){if(!f&&(e===i.G.enumUnknown||e===i.G.enumPolyline)){f=!0,({geometry:ae,as:te,bs:re}=b(!1,!0,0,r));continue}}else if("points"===t){if(!p&&(e===i.G.enumUnknown||e===i.G.enumMultiPoint)){p=!0,({geometry:ae,as:te,bs:re}=y(0,r));continue}}else if("ids"===t){if(!d){d=!0,ne=g(0,r);continue}}else if("x"===t){if(!v&&(e===i.G.enumUnknown||e===i.G.enumPoint)){v=!0,B=T(r);continue}}else if("y"===t){if(!x&&(e===i.G.enumUnknown||e===i.G.enumPoint)){x=!0,R=T(r);continue}}else if("z"===t){if(!S&&(e===i.G.enumUnknown||e===i.G.enumPoint)){S=!0,V=T(r);continue}}else if("m"===t){if(!w&&(e===i.G.enumUnknown||e===i.G.enumPoint)){w=!0,M=T(r);continue}}else if("id"===t){if(!A&&(e===i.G.enumUnknown||e===i.G.enumPoint)){A=!0,U=N(r);continue}}else if("xmin"===t){if(!C&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){C=!0,W=T(r);continue}}else if("ymin"===t){if(!D&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){D=!0,X=T(r);continue}}else if("mmin"===t){if(!z&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){z=!0,Z=T(r);continue}}else if("zmin"===t){if(!I&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){I=!0,q=T(r);continue}}else if("idmin"===t){if(!G&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){G=!0,H=N(r);continue}}else if("xmax"===t){if(!F&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){F=!0,Y=T(r);continue}}else if("ymax"===t){if(!j&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){j=!0,L=T(r);continue}}else if("mmax"===t){if(!P&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){P=!0,J=T(r);continue}}else if("zmax"===t){if(!O&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){O=!0,K=T(r);continue}}else if("idmax"===t){if(!E&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){E=!0,Q=N(r);continue}}else"materials"===t&&(0,i.g)(0);r.skipChildren()}if(c||h||_||f||p){let e=null,t=null,r=ae;$&&(ae.addAttribute(1),e=te,e||=(0,o.a2)(r.getPointCount(),NaN)),ee&&(ae.addAttribute(2),t=$?re:te),null!=ne&&ae.addAttribute(3),$&&null!=e&&r.setAttributeStreamRef(1,e),ee&&null!=t&&r.setAttributeStreamRef(2,t),null!=ne&&function(e,t){if(e.isEmpty())return;let r=(0,o.a7)(2,0),n=e.getGeometryType(),a=0;n===l.M.type?a=1:n===l.a.type||n===l.P.type?a=e.getPathCount():(0,i.d)("not implemented"),r.resize(e.getPointCount(),0);let s=0;for(let o=0;o<a;++o){let a=t.read(s);s++;let m=s+a,u=0,d=0;n===l.M.type?u=e.getPointCount():n===l.a.type||n===l.P.type?(u=e.getPathSize(o),d=e.getPathStart(o)):(0,i.d)("not implemented");for(let e=0,n=Math.min(a,u);e<n;++e)r.write(d,t.read(s)),s++,d++;s=m}e.getImpl().setAttributeStreamRef(3,r)}(r,ne)}else if(v||x||w||S||A){(0,o.a5)(B,R)||(0,i.b)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(R)||Number.isNaN(B))&&(B=NaN,R=NaN);let e=new o.P({x:B,y:R});S&&e.setZ(V),w&&e.setM(M),A&&e.setID(U),ae=e}else if(C||D||F||j||I||O||z||P||G||E){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(L))&&(W=NaN);let e=new o.E({xmin:W,ymin:X,xmax:Y,ymax:L});I&&O&&e.setInterval(1,0,q,K),z&&P&&e.setInterval(2,0,Z,J),G&&E&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,d,n,a);return new s.a$(c)}importSpatialReference(e){let t=k(e);return null===t&&(0,i.d)("failed to import spatial reference"),t}importProjectionTransformation(e,t){return(0,i.g)(0),{}}importDatumTransformation(e,t){return(0,i.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,i.b)("string_to_geometry_type"),e.endsWith("point")?i.G.enumPoint:e.endsWith("envelope")?i.G.enumEnvelope:e.endsWith("multipoint")?i.G.enumMultiPoint:e.endsWith("polyline")?i.G.enumPolyline:e.endsWith("polygon")?i.G.enumPolygon:void(0,i.b)("string_to_geometry_type")}};function M(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function U(e,t=!1){if(!t&&((0,d.fT)(e)||(0,d.U9)(e)||(0,d.Rg)(e)||(0,d.Bi)(e))){let t=new s.a$;return t.setGeometry((0,n.constructFromFlatGeometry)((0,m.ME)(e))),t}let r=new _(e,{strict:!1});return r.nextToken(),V.execute(0,i.G.enumUnknown,r,!0,!1)}function W(e){let t=null;return[e.map(e=>{if(null==t){let r=X(e);return t=r.getSpatialReference(),r.getGeometry()}return Y(e)}),t]}function X(e){let t=U(e),r=q(e.spatialReference);return r&&t.setSpatialReference(r),t}function Y(e){return U(e).getGeometry()}function L(e){return U(e,!0).getGeometry()}function q(e){if(null==e||!e.wkid&&!e.latestWkid&&!e.wkt&&!e.wkt2)return null;let t=!1;if(e instanceof u.A){let{wkt2:r}=e;e=e.toJSON(),e.wkt2??=r,t=!0}(e.latestVcsWkid||e.vcsWkid)&&(t||(e={...e}),delete e?.latestVcsWkid,delete e?.vcsWkid);let r=new _(e,{strict:!1});r.nextToken();let n=V.importSpatialReference(r);return 0===n.getCoordinateSystemType()?null:n}function K(e,t){if(e instanceof s.a$&&(t=e.getSpatialReference(),e=e.getGeometry()),null==e||e.isEmpty())return null;let r;switch(e.getGeometryType()){case i.G.enumPoint:case i.G.enumMultiPoint:case i.G.enumPolyline:case i.G.enumPolygon:r=(0,m.MY)(e)}if(r){let e=(0,m.gh)(r);return e.spatialReference=Z(t),e.spatialReference??delete e.spatialReference,e}return B.reset(),R.execute(0,e,t??null,B),B.getObject()}function Z(e){return null==e||0===e.getCoordinateSystemType()?null:(B.reset(),R.execute(0,null,e,B),B.getObject().spatialReference)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3299,4690],{14690(e,t,r){r.r(t),r.d(t,{constructFromFlatGeometry:()=>a});var n=r(95213),i=r(88885);function a({type:e,vertexCount:t,vertexXY:r,vertexZ:a,vertexM:o,partCount:l,partOffsets:m,partFlags:u,segmentFlags:d,segmentIndices:c,segmentParams:h,segmentCountArc:_,segmentCountBezier:f}){let p=new s[e];if(p instanceof n.P)return p.setXYCoords(r[0],r[1]),a&&p.setZ(a[0]),o&&p.setM(o[0]),p;let k=new n.A({fromArray:r});if(p.setAttributeStreamRef(0,k),a){let e=new n.A({fromArray:a});p.setAttributeStreamRef(1,e)}if(o){let e=new n.A({fromArray:o});p.setAttributeStreamRef(2,e)}if(p instanceof i.M)return p.resizeNoInit(t),p;{let e=l+1,t=new n.a({fromArray:m,size:e}),r=new n.b({fromArray:u,size:e});p.setPathStreamRef(t),p.setPathFlagsStreamRef(r)}if(null==d)return p.resizeImpl(t),p;let b=new n.b({fromArray:d}),y=new n.a({fromArray:c}),g=new n.A({fromArray:h});return p.setSegmentData(y,g,b,h.length),p.incCurveType(4,_),p.incCurveType(2,f),p.modifyCurveCounter(_+f),p.resizeImpl(t),p}const s={point:n.P,multipoint:i.M,polyline:i.a,polygon:i.P}},90293(e,t,r){r(55537),r(83661),r(88885),r(95213);var n=r(39117),i=r(86211),a=r(21325);(0,n.l)()||(0,n.m)(e=>{let t,r;"number"==typeof e?t=e:r=e;let n,s,o={wkid:t,wkt:r};if(r){n=(0,i.x1)(r);let e=(0,a.EA)(o);if(!n&&!e)throw Error(`Unsupported WKT type: ${r}`)}else n=!(0,a.EA)(o);return s=t&&i.yD.has(t)?Math.PI/200:n?(0,i.Ao)(o):Math.PI/180,{isPCS:n,metersOrRadiansPerUnit:s,semiMajor:0,wkidOrWkt:e}})},83299(e,t,r){r.r(t),r.d(t,{fromGeometries:()=>W,fromGeometry:()=>X,fromGeometryToGXGeometry:()=>Y,fromGeometryToGXGeometryUsingImportOperator:()=>L,fromSpatialReference:()=>q,getSpatialReference:()=>M,toGeometry:()=>K,toSpatialReference:()=>Z});var n=r(14690),i=r(55537),a=r(83661),s=r(39117),o=r(95213),l=r(88885),m=r(87992),u=r(16930),d=(r(90293),r(60408));function c(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){let e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function h(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){let e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=NaN),e}return{value:{m_token:4,m_value:null},done:!0}}class _{m_iteratorStack;m_nextFlatToken;m_currentToken=0;m_currentValue;m_options;createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:c}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:h}}constructor(e,t){this.m_options=t?{...t}:{strict:!0};let r=e;this.m_iteratorStack=[r instanceof Array?this.createJSONArrayIterator(r):this.createJSONObjectIterator(r)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,a.aL)()&&this.m_currentValue<=(0,a.i)()?8:7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,i.d)("unrecognized json element type")}(0,i.d)("unrecognized json element type")}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,i.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}isError(){return 0}}class f{m_buffer=null;m_view=null;m_sz=0;m_offset=0;m_bOwnsBuffer=!0;m_bLittleEndian=!0;m_element;m_elementBytes;m_elementView;m_elementDouble;m_elementFloat;m_elementInt64;m_elementInt32;m_elementInt16;constructor(e){if(this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz){if(this.m_sz=e.sz,e.buffer)return this.m_sz<0&&(0,i.r)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0===e.offset?0:e.offset,this.m_view=void 0===e.offset?new DataView(this.m_buffer):new DataView(e.buffer,e.offset,e.sz),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0);this.m_sz<0&&(0,i.r)("size out of range"),this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))}else e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,e.move.m_bOwnsBuffer=!0):(0,i.d)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===f.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===f.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return+!!this.m_bLittleEndian}getView(){return this.m_view||(0,i.q)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,i.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function p(e){let t=!1;for(;3!==e.nextToken();){let r=e.currentString();e.nextToken(),"uwkid"===r?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function k(e){let t=!1,r=!1,n=!1,i=!1,a=!1,o=!1,l=!1,m=!1,u=!1,d=!1,c=!1,h=!1,_=!1,f=!1,k=!1,b=!1,y=!1,g=-1,T=-1,N=-1,v=-1,x=0,S=0,w=0,A=0,C=0,D=0,F=0,j=0,I=0,O=0,z="",P="",G=null;for(;3!==e.nextToken();){let s=e.currentString();e.nextToken(),"wkid"===s?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===s?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"wkt"===s?a||(a=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===s?a||6===e.currentToken()&&(P=e.currentString()):"vcsWkid"===s?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"latestVcsWkid"===s?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===s?l||(l=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===s?m||(m=!0,o=!0,S=e.currentDoubleValue()):"mTolerance"===s?u||(u=!0,o=!0,w=e.currentDoubleValue()):"falseX"===s?d||(d=!0,o=!0,F=e.currentDoubleValue()):"falseY"===s?c||(c=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===s?h||(h=!0,o=!0,I=e.currentDoubleValue()):"falseM"===s?_||(_=!0,o=!0,O=e.currentDoubleValue()):"xyUnits"===s?f||(f=!0,o=!0,A=e.currentDoubleValue()):"zUnits"===s?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===s?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===s?y||(y=!0,G=p(e)):e.skipChildren()}v<=0&&N>0&&(v=N),N<=0&&v>0&&(N=v);let E=null,B=!0;if(0!==z.length&&(B=!1,(0,s.q)(z)&&(E=(0,s.b)(z))),!E&&0!==P.length&&(B=!1,(0,s.q)(P)&&(E=(0,s.b)(P))),!E&&T>0&&(B=!1,(0,s.p)(T)&&(v<=0||(0,s.a_)())&&(E=(0,s.c)(T,v))),!E&&g>0&&(B=!1,(0,s.p)(g)&&(N<=0||(0,s.a_)())&&(E=(0,s.c)(g,N))),B&&(E=(0,s.e)(G)),o&&E){let e=new s.a;E.queryPrecisionDescriptorWithoutFalseXY(e),l&&e.setTolerance(0,x),m&&e.setTolerance(1,S),u&&e.setTolerance(2,w),f&&d&&c&&e.setGridParams(F,j,A),k&&h&&e.setZParams(I,C),b&&_&&e.setMParams(O,D),E=(0,s.f)(E,e)}return E}function b(e,t,r,n){2!==n.currentToken()&&(0,i.b)("failed to parse multipath: array of array of vertices is expected");let s=e?new l.P:new l.a,m=s,u=(0,o.a0)(0),d=(0,o.a2)(2,0),c=(0,o.a1)(0),h=null,_=null,f=null,p=null,k=null,b=0,y=0,g=0,N=new l.S,w=a.P.getNAN(),A=0,C=0,D=+!!e;for(;4!==n.nextToken();){2!==n.currentToken()&&(0,i.b)("failed to parse multipath: ring/path array is expected");let r=2,s=0,F=!0,j=0,I=0,O=a.P.getNAN(),z=(0,a.c)(4,NaN),P=(0,a.c)(4,NaN),G=!1;for(n.nextToken();4!==n.currentToken();){if(t&&1===n.currentToken())F&&(0,i.b)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,o.a1)(A-1,1),p=(0,o.a0)(A-1,-1),k=(0,o.a2)(0)),G=!0,r=1,({segFlag:g,toPointSz:j}=S(N,z,w,n));else{for(G=!1,2!==n.currentToken()&&(0,i.b)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),j=0;4!==n.nextToken();)4===j&&(0,i.b)("failed to parse multipath: each vertex array has to have at most 4 elements"),z[j++]=T(n);j<2&&(0,i.b)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,o.a6)(z[0],z[1])||(0,i.b)("failed to parse multipath: x and y must be finite")}n.nextToken();do{if(d.size()===2*A&&d.resize(v(A)),d.writePoint2D(2*A,O.setCoords(z[0],z[1])),h&&h.size()===A&&h.resize(x(A)),j>2?(h||=(0,o.a2)(A+1,NaN),h.write(A,z[2])):h&&h.write(A,NaN),_&&_.size()===A&&_.resize(x(A)),j>3?(_||=(0,o.a2)(A+1,NaN),_.write(A,z[3])):_&&_.write(A,NaN),F)C++,u.add(A),c.add(D),F=!1,I=j,(0,a.f)(P,z,0,0,I);else if(null!==f)if(G){let e=(0,l.a9)(g),t=k.size();k.resize(t+e),f.add(g),p.add(b),N.get().writeInBufferStream(k,b),b+=e,m.incCurveType(g,1),y++}else f.add(1),p.add(-1);A++,s++,w.setCoords(z[0],z[1])}while(s<r&&4===n.currentToken())}0!==s&&(e&&s>r&&j===I&&0===(0,a.aM)(z,P,j)?(A--,s--):null!==f&&(f.add(1),p.add(-1)))}return A&&(u.resize(C),c.resize(C),A>0&&(u.add(A),c.add(0)),m.setAttributeStreamRef(0,d),m.setPathFlagsStreamRef(c),m.setPathStreamRef(u),null!==f&&(m.updateCurveCounter(y),m.setSegmentData(p,k,f,b)),m.notifyModifiedFlags(65535)),{geometry:s,as:h,bs:_}}function y(e,t){2!==t.currentToken()&&(0,i.b)("failed to parse multipoint: array of vertices is expected");let r=0,n=new l.M,s=(0,o.a2)(2,0),m=0,u=(0,a.c)(4,NaN),d=new a.P,c=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,i.b)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,i.b)("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[m++]=T(t);m<2&&(0,i.b)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,o.a6)(u[0],u[1])||(0,i.b)("failed to parse multipoint: x and y must be finite"),s.size()===2*r&&s.resize(v(r)),s.writePoint2D(2*r,d.setCoords(u[0],u[1])),c&&c.size()===r&&c.resize(x(r)),m>2?(c||=(0,o.a2)(r+1,NaN),c.write(r,u[2])):c&&c.write(r,NaN),h&&h.size()===r&&h.resize(x(r)),m>3?(h||=(0,o.a2)(r+1,NaN),h.write(r,u[3])):h&&h.write(r,NaN),r++}if(r){let e=n.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(r),e.notifyModifiedFlags(65535)}return{geometry:n,as:c,bs:h}}function g(e,t){2!==t.currentToken()&&(0,i.b)("failed to parse array of IDs: array of array of integers is expected");let r=(0,o.a7)(2,0),n=0,a=-1;for(;4!==t.nextToken();){let e=n;r.size()===n&&r.resize(x(n)),n++;let s=0;for(-1===a?a=+(2===t.currentToken()):1===a&&2!==t.currentToken()&&(0,i.b)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(r.size()===n&&r.resize(x(n)),r.write(n,N(t)),s++,n++);4!==t.nextToken();)r.size()===n&&r.resize(x(n)),r.write(n,N(t)),s++,n++;if(r.write(e,s),0===a)break}return r.resize(n),r}function T(e){let t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return NaN;{let t=e.currentDoubleValue();return Number.isNaN(t)?NaN:t}}function N(e){return e.currentInt32Value()}function v(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function x(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function S(e,t,r,n,s){let o={segFlag:0,toPointSz:0},m=n.currentToken();m=n.nextToken();let u=n.currentString(),d=u[0];for((1!==u.length||"a"!==d&&"b"!==d&&"c"!==d&&"n"!==d&&"q"!==d)&&(0,i.b)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for curve parameters"),m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for to point"),o.toPointSz=0;4!==n.nextToken();)4===o.toPointSz&&(0,i.b)("failed to parse curve: vertex array cannot have more than 4 elements"),t[o.toPointSz++]=T(n);o.toPointSz<2&&(0,i.b)("failed to parse curve: vertex array must have at least 2 elements");let c=a.P.construct(t[0],t[1]),h=a.P.getNAN(),_=-1,p=-1,k=!1,b=NaN,y=NaN,g=NaN,N=[a.P.getNAN(),a.P.getNAN(),a.P.getNAN()],v=a.P.getNAN();if("a"===d){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for center point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for center point"),h.setCoords(e,t),m=n.nextToken(),_=n.currentInt32Value(),m=n.nextToken(),p=n.currentInt32Value(),m=n.nextToken(),4===m?k=!0:(k=!1,b=T(n),m=n.nextToken(),y=T(n),m=n.nextToken(),g=T(n),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters")),o.segFlag=4}else if("b"===d){for(let e=0;e<2;e++){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,r)}m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=2}else if("n"===d){{m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[0].setCoords(e,t)}m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);N[1].setCoords(e,t),N[2].setCoords(r,r),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=8}else if("q"===d){for(let e=0;e<1;e++){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,r)}m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=16}else{m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for interior point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for interior point"),v.setCoords(e,t),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=4}return m=n.nextToken(),3!==m&&(0,i.b)("failed to parse curve: end object is expected for curve"),"a"===d?(e.createEllipticArc(),k?w(e.get(),r,c,h,!0,_,p):function(e,t,r,n,i,a,s,o,m){e.dropAllAttributes();let u=new f({sz:44,buffer:new ArrayBuffer(44)}),d=0;u.writeDouble(d,n.x),d+=8,u.writeDouble(d,n.y),d+=8,u.writeDouble(d,s),d+=8,u.writeDouble(d,o),d+=8,u.writeDouble(d,m),d+=8;let c=0;a||(c|=2048),i&&(c|=4096),u.writeInt32(d,c),d+=4,function(e,t,r,n){e.m_bits=0,e.m_center.x=n.readDouble(0),e.m_center.y=n.readDouble(8),e.m_rotation=n.readDouble(16),e.m_semiMajorAxis=n.readDouble(24),e.m_minorMajorRatio=n.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y;let i=n.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i),o=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(r)?(s=!1,a=!0):a&&t.equals(r)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,l.a8)(e,NaN,o,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,r,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,o,e.m_center),e.setProjectionBehavior(1),(0,l.a6)(e)}(e,t,r,u)}(e.get(),r,c,h,_,p,b,y,g)):"b"===d?(e.createCubicBezier(),function(e,t,r,n){e.dropAllAttributes();let s=new f({sz:32,buffer:new ArrayBuffer(32)}),o=0;s.writeDouble(o,n[0].x),o+=8,s.writeDouble(o,n[0].y),o+=8,s.writeDouble(o,n[1].x),o+=8,s.writeDouble(o,n[1].y),o+=8,function(e,t,r,n){(0,i.g)(32<=n.size()),e.m_cp=(0,a.d)(a.P,2),e.m_cp[0].x=n.readDouble(0),e.m_cp[0].y=n.readDouble(8),e.m_cp[1].x=n.readDouble(16),e.m_cp[1].y=n.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y}(e,t,r,s)}(e.get(),r,c,N)):"n"===d?(e.createQuadraticRationalBezier(),function(e,t,r,n,i,a,s){e.dropAllAttributes();let o=new f({sz:40,buffer:new ArrayBuffer(40)}),l=0;o.writeDouble(l,n.x),l+=8,o.writeDouble(l,n.y),l+=8,o.writeDouble(l,i),l+=8,o.writeDouble(l,a),l+=8,o.writeDouble(l,s),l+=8,function(e,t,r,n){e.m_cp.x=n.readDouble(0),e.m_cp.y=n.readDouble(8),e.m_weights[0]=n.readDouble(16),e.m_weights[1]=n.readDouble(24),e.m_weights[2]=n.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y}(e,t,r,o)}(e.get(),r,c,N[0],N[1].x,N[1].y,N[2].x)):"q"===d?(e.createQuadraticBezier(),e.get().construct(r,N[0],c)):(e.createEllipticArc(),w(e.get(),r,c,v,!1,-1,-1)),o}function w(e,t,r,n,s,o,m){e.dropAllAttributes();let u=new f({sz:20,buffer:new ArrayBuffer(20)}),d=0;u.writeDouble(d,n.x),d+=8,u.writeDouble(d,n.y),d+=8;let c=0;s?(m||(c|=8),o&&(c|=16)):c|=128,u.writeInt32(d,c),d+=4,function(e,t,r,n){0>=n.size()&&(0,i.r)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(r);let s=a.P.getNAN();s.x=n.readDouble(0),s.y=n.readDouble(8);let o=n.readInt32(16);if(1&o)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),!1;let m=!!(64&o),u=!!(128&o),d=!!(32&o),c=!!(8&o),h=!!(16&o),_=t.equals(r);m&&!_&&(m=!1,d=!0),d&&_&&(m=!0,d=!1,s.setCoords(0,0)),m||(u?d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,r,s),_&&c===e.isClockwise()&&e.reverse()):d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),e.queryCoord2D(.5,e.m_interior)):(0,l.a7)(e,t,r,s,c,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,l.a8)(e,NaN,c,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,l.a6)(e)}(e,t,r,u)}function A(e,t,r,n,a){let s=e.getGeometryType();if(s===i.G.enumEllipticArc)return function(e,t,r,n,a){(0,i.g)(!(0,l.a5)(e));let s=e.getEndXY(),o=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!r,u=NaN,d=NaN;if(o&&(u=e.getEndAttributeAsDbl(1,0)),m&&(d=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return D(o,m,s.x,s.y,u,d,n,a),!0;let c=0===e.projectionBehavior(),h=!!c&&e.isClosed();if(c&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a),F(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(c){a.startObject(),a.addFieldName("a"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a),F(e.m_center.x+0,e.m_center.y+0,17,a);let t=!e.isMajor();a.addInt32(+!!t);let r=e.isClockwise();a.addInt32(+!!r),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a);let t=e;F(t.m_center.x,t.m_center.y,17,a);let r=!t.isMajor();a.addInt32(+!!r);let i=t.isClockwise();a.addInt32(+!!i),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,r,n,a);if(s===i.G.enumBezier)return C(e,t,r,n,a);if(s===i.G.enumRationalBezier2)return function(e,t,r,n,i){let a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!r,l=NaN,m=NaN;s&&(l=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),D(s,o,a.x,a.y,l,m,n,i),F(e.m_cp.x,e.m_cp.y,n,i);let u=n;return i.addDouble(e.m_weights[0],u),i.addDouble(e.m_weights[1],u),i.addDouble(e.m_weights[2],u),i.endArray(),i.endObject(),!1}(e,t,r,n,a);if(s===i.G.enumBezier2){let i=new l.I;return i.constructFromQuadraticSegment(e),C(i,t,r,n,a)}(0,i.a)("")}function C(e,t,r,n,i){let a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!r,l=NaN,m=NaN;return s&&(l=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),D(s,o,a.x,a.y,l,m,n,i),F(e.m_cp[0].x,e.m_cp[0].y,n,i),F(e.m_cp[1].x,e.m_cp[1].y,n,i),i.endArray(),i.endObject(),!1}function D(e,t,r,n,i,a,s,o){o.startArray(),o.addDouble(r,s),o.addDouble(n,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function F(e,t,r,n){n.startArray(),n.addDouble(e,r),n.addDouble(t,r),n.endArray()}function j(e,t,r,n){let a=r.getImpl(),s=!!(2&t),m=!!(4&t),u=!!(8&t),d=a.hasAttribute(1)&&!s,c=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!u,_=a.hasNonLinearSegments();d&&(n.addFieldName("hasZ"),n.addBool(!0)),c&&(n.addFieldName("hasM"),n.addBool(!0)),e?_?n.addFieldName("curveRings"):n.addFieldName("rings"):_?n.addFieldName("curvePaths"):n.addFieldName("paths");let f=null,p=[];if(r.isEmpty())n.startArray(),n.endArray();else{let e=17-(31&t>>13);n.startArray();let u=r.getPathCount(),k=0,b=a.getAttributeStreamRef(0),y=null,g=null,T=null,N=new l.S,v=null,x=null,S=null;_&&(v=a.getSegmentFlagsStreamRef(),x=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),d&&(y=a.getAttributeStreamRef(1)),c&&(g=a.getAttributeStreamRef(2)),h&&(T=a.getAttributeStreamRef(3),f=(0,o.X)(3,0));for(let t=0;t<u;t++){n.startArray(),h&&p.push(0);let a=r.getPathEnd(t);if(k===a){n.endArray();continue}let o=r.isClosedPath(t),l=b.read(2*k),u=b.read(2*k+1),_=d?y.read(k):NaN,w=c?g.read(k):NaN,C=h?T.read(k):0;I(d,c,l,u,_,w,e,n);let D=1;h&&(f.add(C),p[p.length-1]++);let F=l,j=u,O=_,z=w,P=C,G=!1,E=0,B=NaN,R=NaN,V=0;for(let t=k+1,r=k,M=o?a+1:a;t<M;t++,r++){let o,k,M=null===v?1:31&v.read(r);if(t<a?(o=b.read(2*t),k=b.read(2*t+1),d&&(B=y.read(t)),c&&(R=g.read(t)),h&&(V=T.read(t))):(o=F,k=j,B=O,R=z,V=P),1!==M){G=!0,4===M?N.createEllipticArc():2===M?N.createCubicBezier():16===M?N.createQuadraticBezier():8===M?N.createQuadraticRationalBezier():(0,i.a)("JSON export.unsupported curve");let t=N.get(),a=x.read(r);t.setStartXYCoords(l,u),t.setEndXYCoords(o,k),d&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),c&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,R)),t.readFromBufferStream(S,a),A(N.get(),s,m,e,n)&&E++}else I(d,c,o,k,B,R,e,n);h&&(f.add(V),p[p.length-1]++),D++,l=o,u=k,_=B,w=R,C=V}G&&0===E||(D<2&&E<1&&(I(d,c,l,u,_,w,e,n),D++,h&&(f.add(C),p[p.length-1]++)),o&&D<3&&E<2&&(I(d,c,F,j,O,z,e,n),D++,l=F,u=j,_=O,w=z,C=P,h&&(f.add(P),p[p.length-1]++))),n.endArray(),k=a}n.endArray()}if(h){n.addFieldName("ids"),n.startArray();let e=0;for(let t=0,r=p.length;t<r;++t){let r=p[t];(0,i.g)(0===r||null!==f&&e+r<=f.size()),n.startArray();for(let t=0;t<r;++t)n.addInt32(f.read(e)),e++;n.endArray()}n.endArray()}}function I(e,t,r,n,i,a,s,o){o.startArray(),o.addDouble(r,s),o.addDouble(n,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const O=92,z=102,P=117,G=48;class E{m_jsonString;m_endToken;m_startToken;m_currentTokenType;m_bHasEscapes;m_functionStack=[];m_pushPositions=[];m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0});m_prepSubstr;m_getCurrentSubstr;m_stepOverChar;m_peekChar;m_get;m_increment;m_eof;constructor(e){void 0===e?(this.m_startToken=2**53-1,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,i.a)("streaming json parsing not yet impl"):(0,i.d)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){let t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,i.a)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=2**53-1,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,i.a)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,i.g)(0),""}childrenAsString(){return(0,i.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e)}else if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e)}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,i.b)("invalid token")}toUTF8_(e,t){let r=0,n=e;for(;t.charCodeAt(n)===O&&t.charCodeAt(n+1)===P;)r++,n+=6;n=e;let i=new Uint8Array(r),a=0;for(;t.charCodeAt(n)===O&&t.charCodeAt(n+1)===P;)i[a++]=Number.parseInt(t.slice(n+2,n+6),16),n+=6;return{u8s:this.m_utf8Decoder.decode(i),end:n}}unquoteCurrentString_(){let e="",t=1,r=this.m_endToken-this.m_startToken-1,n=0,i=this.m_getCurrentSubstr();for(let a=t;a<r;a++)if(i.charCodeAt(a)!==O)n++;else{switch(n>0&&(e+=i.slice(t,t+n)),i.charCodeAt(++a)){case 34:e+='"';break;case P:{let{u8s:t,end:r}=this.toUTF8_(a-1,i);a=r-1,e+=t;break}case O:e+="\\";break;case 47:e+="/";break;case 98:e+="\b";break;case z:e+="\f";break;case 110:e+="\n";break;case 114:e+="\r";break;case 116:e+="\t"}t=a+1,n=0}return n>0&&(e+=i.slice(t,t+n)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,i.b)("invalid token"),10===this.m_currentTokenType)return NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return NaN;e=e.slice(1),t-=2,0===t&&(0,i.b)("invalid token")}let r=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(r)&&(0,i.b)("invalid token");else if(Number.isNaN(r))return NaN;return r}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,i.b)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,i.b)("invalid token"));let r=parseInt(e);return Number.isNaN(r)&&(0,i.b)("invalid token"),r}currentInt64Value(){return(0,i.g)(0),0n}currentBoolValue(){return(0,i.g)(0),!1}isError(){return 0}JSONString(){return(0,i.g)(0),""}pushPosition(){return(0,i.g)(0),!1}popPosition(){return(0,i.g)(0),!1}skipCStyleComments_(){(0,i.g)(0)}skipCppStyleComments_(){(0,i.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),42===e?this.skipCStyleComments_():47===e?this.skipCppStyleComments_():(0,i.b)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,i.b)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,i.b)("invalid token"),t=this.m_peekChar();47===t?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return 93===this.m_peekChar()&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return 125===this.m_peekChar()&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token");let e=this.m_peekChar();for(;34!==e;){let t=e===O;if(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,34===e||e===O||47===e||98===e||e===z||110===e||114===e||116===e)this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar();else if(e===P)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),e>=G&&e<=57||e>=97&&e<=z||e>=65&&e<=70||(0,i.b)("invalid token");else(0,i.b)("invalid token")}this.m_stepOverChar()}comma_(){return 44===this.m_peekChar()&&(this.m_increment(),!0)}colon_(){return 58===this.m_peekChar()&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,i.b)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,34!==this.m_peekChar()&&(0,i.b)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,i.b)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,i.b)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()===G?this.m_stepOverChar():this.digits_()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar()}while(e>=G&&e<=57)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),e>=G&&e<=57||(0,i.b)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),(43===e||45===e)&&(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar()),e>=G&&e<=57||(0,i.b)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(45===t&&(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),t=this.m_peekChar(),e=!0,t>=G&&t<=57||(0,i.b)("invalid token")),this.int_(),t=this.m_peekChar(),46===t)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),(101===t||69===t)&&this.exp_();else if(101===t||69===t)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;let r=this.m_endToken-this.m_startToken-t;if(r<10)this.m_currentTokenType=8;else if(10===r){let r=this.m_getCurrentSubstr();this.m_currentTokenType=e?r.slice(t)<="2147483648"?8:9:r.slice(t)<="2147483647"?8:9}else if(r<19)this.m_currentTokenType=9;else if(19===r){let r=this.m_getCurrentSubstr();this.m_currentTokenType=e?r.slice(t)<="9223372036854775808"?9:7:r.slice(t)<="9223372036854775807"?9:7}else this.m_currentTokenType=7}}valueNull_(){let{s:e,bDone:t}=this.m_get(5);t&&(0,i.b)("invalid token"),"null"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=10}valueTrue_(){let{s:e,bDone:t}=this.m_get(5);t&&(0,i.b)("invalid token"),"true"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=11}valueFalse_(){let{s:e,bDone:t}=this.m_get(6);t&&(0,i.b)("invalid token"),"false"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=12}valueNan_(){let{s:e,bDone:t}=this.m_get(4);t&&(0,i.b)("invalid token"),"NaN"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;let e=this.m_peekChar();123===e?this.valueStartObject_():91===e?this.valueStartArray_():34===e?this.valueString_():45===e||e>=G&&e<=57?this.valueNumber_():110===e?this.valueNull_():116===e?this.valueTrue_():e===z?this.valueFalse_():78===e?this.valueNan_():(0,i.b)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());let e=this.m_peekChar();123!==e&&91!==e&&(0,i.b)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const B=new class{m_pendingKey=null;m_acceptedObject=null;m_currentObject=[];reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){let e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){let e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,i.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},R=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,a,o){!function(e,t,r,n){if(t||r){if(n.startObject(),null!==t)switch(t.getGeometryType()){case i.G.enumPolygon:j(!0,e,t,n);break;case i.G.enumPolyline:j(!1,e,t,n);break;case i.G.enumMultiPoint:!function(e,t,r){let n=t.getImpl(),a=n.hasAttribute(1)&&!(2&e),s=n.hasAttribute(2)&&!(4&e),o=n.hasAttribute(3)&&!(8&e);a&&(r.addFieldName("hasZ"),r.addBool(!0)),s&&(r.addFieldName("hasM"),r.addBool(!0)),r.addFieldName("points");let l=t.getPointCount();if(t.isEmpty())r.startArray(),r.endArray();else{let t=17-(31&e>>13);r.startArray();let i=n.getAttributeStreamRef(0),o=null,m=null;a&&(o=n.getAttributeStreamRef(1)),s&&(m=n.getAttributeStreamRef(2));for(let e=0;e<l;e++){let n=i.read(2*e),l=i.read(2*e+1),u=NaN,d=NaN;a&&(u=o.read(e)),s&&(d=m.read(e)),I(a,s,n,l,u,d,t,r)}r.endArray()}if(o){let e=null;n.isEmpty()||(e=n.getAttributeStreamRef(3)),(0,i.g)(0===l||null!==e&&e.size()>=l),r.addFieldName("ids"),r.startArray();for(let t=0;t<l;t++)r.addInt32(e.read(t));r.endArray()}}(e,t,n);break;case i.G.enumPoint:!function(e,t,r){let n=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return r.addFieldName("x"),r.addNull(),r.addFieldName("y"),r.addNull(),n&&(r.addFieldName("z"),r.addNull()),i&&(r.addFieldName("m"),r.addNull()),void(a&&(r.addFieldName("id"),r.addInt32(0)));let s=17-(31&e>>13);r.addFieldName("x"),r.addDouble(t.getX(),s),r.addFieldName("y"),r.addDouble(t.getY(),s),n&&(r.addFieldName("z"),r.addDouble(t.getZ(),s)),i&&(r.addFieldName("m"),r.addDouble(t.getM(),s)),a&&(r.addFieldName("id"),r.addInt32(t.getID()))}(e,t,n);break;case i.G.enumEnvelope:!function(e,t,r){let n=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return r.addFieldName("xmin"),r.addNull(),r.addFieldName("ymin"),r.addNull(),r.addFieldName("xmax"),r.addNull(),r.addFieldName("ymax"),r.addNull(),n&&(r.addFieldName("zmin"),r.addNull(),r.addFieldName("zmax"),r.addNull()),i&&(r.addFieldName("mmin"),r.addNull(),r.addFieldName("mmax"),r.addNull()),void(a&&(r.addFieldName("idmin"),r.addInt32(0),r.addFieldName("idmax"),r.addInt32(0)));let s=17-(31&e>>13);if(r.addFieldName("xmin"),r.addDouble(t.getXMin(),s),r.addFieldName("ymin"),r.addDouble(t.getYMin(),s),r.addFieldName("xmax"),r.addDouble(t.getXMax(),s),r.addFieldName("ymax"),r.addDouble(t.getYMax(),s),n){let e=t.queryInterval(1,0);r.addFieldName("zmin"),r.addDouble(e.vmin,s),r.addFieldName("zmax"),r.addDouble(e.vmax,s)}if(i){let e=t.queryInterval(2,0);r.addFieldName("mmin"),r.addDouble(e.vmin,s),r.addFieldName("mmax"),r.addDouble(e.vmax,s)}if(a){let e=t.queryInterval(3,0);r.addFieldName("idmin"),r.addInt32(e.vmin),r.addFieldName("idmax"),r.addInt32(e.vmax)}}(e,t,n);break;case i.G.enumMultipatch:(0,i.g)(0);break;default:(0,i.d)("exportToJSON")}null!==r&&(n.addFieldName("spatialReference"),function(e,t,r){r.startObject();let n=0;t.isCustomWkid()||(n=t.getOldID());let a=0,o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(a=o.getOldID()),a<=0&&(n=0)),n>0){r.addFieldName("wkid"),r.addInt32(n);let e=t.getLatestID();if(e>0&&e!==n&&(r.addFieldName("latestWkid"),r.addInt32(e)),a>0){r.addFieldName("vcsWkid"),r.addInt32(a);let e=t.getLatestVerticalID();e!==a&&(r.addFieldName("latestVcsWkid"),r.addInt32(e))}}if(0===t.getCoordinateSystemType())r.addFieldName("wkid"),r.addNull(),null!==t.getUnit()&&(r.addFieldName("unit"),function(e,t,r){r.startObject();let n=t.getID();n<=0&&(0,i.b)("cannot export unit that has no valid WKID"),r.addFieldName("uwkid"),r.addInt32(n),r.endObject()}(0,t.getUnit(),r));else if(n<=0||1&e){let n="";64&e&&(n=t.getText2(),r.addFieldName("wkt2"),r.addString(n));let i=t.getText();i!==n&&(r.addFieldName("wkt"),r.addString(i))}if(16&e){let e=new s.a;t.queryPrecisionDescriptor(e),r.addFieldName("xyTolerance"),r.addDouble(e.getTolerance(0)),r.addFieldName("zTolerance"),r.addDouble(e.getTolerance(1)),r.addFieldName("mTolerance"),r.addDouble(e.getTolerance(2)),r.addFieldName("falseX"),r.addDouble(e.getFalseX()),r.addFieldName("falseY"),r.addDouble(e.getFalseY()),r.addFieldName("xyUnits"),r.addDouble(e.getGridUnitsXY()),r.addFieldName("falseZ"),r.addDouble(e.getFalseZ()),r.addFieldName("zUnits"),r.addDouble(e.getGridUnitsZ()),r.addFieldName("falseM"),r.addDouble(e.getFalseM()),r.addFieldName("mUnits"),r.addDouble(e.getGridUnitsM())}r.endObject()}(e,r,n)),n.endObject()}}(e,t,r,n)}exportSpatialReference(e,t,r,n){(0,i.g)(0)}exportProjectionTransformation(e,t,r,n){(0,i.g)(0)}exportDatumTransformation(e,t,r,n){(0,i.g)(0)}static geometryTypeToString(e){return(0,i.g)(0),""}},V=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,a,m,u){let d;"string"==typeof r?(d=new E({jsonString:r}),d.nextToken()):d=r,1!==d.currentToken()&&(0,i.b)("failed to import map geometry: start of object is expected");let c=function(e,t,r,n,a){let s=!1,m=!1,u=!1,d=!1,c=!1,h=!1,_=!1,f=!1,p=!1,v=!1,x=!1,S=!1,w=!1,A=!1,C=!1,D=!1,F=!1,j=!1,I=!1,O=!1,z=!1,P=!1,G=!1,E=!1,B=NaN,R=NaN,V=NaN,M=NaN,U=0,W=NaN,X=NaN,Y=NaN,L=NaN,q=NaN,K=NaN,Z=NaN,J=NaN,H=0,Q=0,$=!1,ee=!1,te=null,re=null,ne=null,ie=null,ae=null;for(;3!==r.nextToken();){let t=r.currentString();if(r.nextToken(),"spatialReference"===t){if(a&&!s){s=!0,1===r.currentToken()?ie=k(r):10!==r.currentToken()&&(0,i.b)("failed to parse spatial reference: object or null is expected");continue}}else if(n)if("hasZ"===t){if(!m){m=!0,$=11===r.currentToken();continue}}else if("hasM"===t){if(!u){u=!0,ee=11===r.currentToken();continue}}else if("rings"===t){if(!(c||h||e!==i.G.enumUnknown&&e!==i.G.enumPolygon)){c=!0,({geometry:ae,as:te,bs:re}=b(!0,!1,0,r));continue}}else if("curveRings"===t){if(!h&&(e===i.G.enumUnknown||e===i.G.enumPolygon)){h=!0,({geometry:ae,as:te,bs:re}=b(!0,!0,0,r));continue}}else if("paths"===t){if(!(_||f||e!==i.G.enumUnknown&&e!==i.G.enumPolyline)){_=!0,({geometry:ae,as:te,bs:re}=b(!1,!1,0,r));continue}}else if("curvePaths"===t){if(!f&&(e===i.G.enumUnknown||e===i.G.enumPolyline)){f=!0,({geometry:ae,as:te,bs:re}=b(!1,!0,0,r));continue}}else if("points"===t){if(!p&&(e===i.G.enumUnknown||e===i.G.enumMultiPoint)){p=!0,({geometry:ae,as:te,bs:re}=y(0,r));continue}}else if("ids"===t){if(!d){d=!0,ne=g(0,r);continue}}else if("x"===t){if(!v&&(e===i.G.enumUnknown||e===i.G.enumPoint)){v=!0,B=T(r);continue}}else if("y"===t){if(!x&&(e===i.G.enumUnknown||e===i.G.enumPoint)){x=!0,R=T(r);continue}}else if("z"===t){if(!S&&(e===i.G.enumUnknown||e===i.G.enumPoint)){S=!0,V=T(r);continue}}else if("m"===t){if(!w&&(e===i.G.enumUnknown||e===i.G.enumPoint)){w=!0,M=T(r);continue}}else if("id"===t){if(!A&&(e===i.G.enumUnknown||e===i.G.enumPoint)){A=!0,U=N(r);continue}}else if("xmin"===t){if(!C&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){C=!0,W=T(r);continue}}else if("ymin"===t){if(!D&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){D=!0,X=T(r);continue}}else if("mmin"===t){if(!z&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){z=!0,Z=T(r);continue}}else if("zmin"===t){if(!I&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){I=!0,q=T(r);continue}}else if("idmin"===t){if(!G&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){G=!0,H=N(r);continue}}else if("xmax"===t){if(!F&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){F=!0,Y=T(r);continue}}else if("ymax"===t){if(!j&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){j=!0,L=T(r);continue}}else if("mmax"===t){if(!P&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){P=!0,J=T(r);continue}}else if("zmax"===t){if(!O&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){O=!0,K=T(r);continue}}else if("idmax"===t){if(!E&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){E=!0,Q=N(r);continue}}else"materials"===t&&(0,i.g)(0);r.skipChildren()}if(c||h||_||f||p){let e=null,t=null,r=ae;$&&(ae.addAttribute(1),e=te,e||=(0,o.a2)(r.getPointCount(),NaN)),ee&&(ae.addAttribute(2),t=$?re:te),null!=ne&&ae.addAttribute(3),$&&null!=e&&r.setAttributeStreamRef(1,e),ee&&null!=t&&r.setAttributeStreamRef(2,t),null!=ne&&function(e,t){if(e.isEmpty())return;let r=(0,o.a7)(2,0),n=e.getGeometryType(),a=0;n===l.M.type?a=1:n===l.a.type||n===l.P.type?a=e.getPathCount():(0,i.d)("not implemented"),r.resize(e.getPointCount(),0);let s=0;for(let o=0;o<a;++o){let a=t.read(s);s++;let m=s+a,u=0,d=0;n===l.M.type?u=e.getPointCount():n===l.a.type||n===l.P.type?(u=e.getPathSize(o),d=e.getPathStart(o)):(0,i.d)("not implemented");for(let e=0,n=Math.min(a,u);e<n;++e)r.write(d,t.read(s)),s++,d++;s=m}e.getImpl().setAttributeStreamRef(3,r)}(r,ne)}else if(v||x||w||S||A){(0,o.a5)(B,R)||(0,i.b)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(R)||Number.isNaN(B))&&(B=NaN,R=NaN);let e=new o.P({x:B,y:R});S&&e.setZ(V),w&&e.setM(M),A&&e.setID(U),ae=e}else if(C||D||F||j||I||O||z||P||G||E){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(L))&&(W=NaN);let e=new o.E({xmin:W,ymin:X,xmax:Y,ymax:L});I&&O&&e.setInterval(1,0,q,K),z&&P&&e.setInterval(2,0,Z,J),G&&E&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,d,n,a);return new s.a$(c)}importSpatialReference(e){let t=k(e);return null===t&&(0,i.d)("failed to import spatial reference"),t}importProjectionTransformation(e,t){return(0,i.g)(0),{}}importDatumTransformation(e,t){return(0,i.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,i.b)("string_to_geometry_type"),e.endsWith("point")?i.G.enumPoint:e.endsWith("envelope")?i.G.enumEnvelope:e.endsWith("multipoint")?i.G.enumMultiPoint:e.endsWith("polyline")?i.G.enumPolyline:e.endsWith("polygon")?i.G.enumPolygon:void(0,i.b)("string_to_geometry_type")}};function M(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function U(e,t=!1){if(!t&&((0,d.fT)(e)||(0,d.U9)(e)||(0,d.Rg)(e)||(0,d.Bi)(e))){let t=new s.a$;return t.setGeometry((0,n.constructFromFlatGeometry)((0,m.ME)(e))),t}let r=new _(e,{strict:!1});return r.nextToken(),V.execute(0,i.G.enumUnknown,r,!0,!1)}function W(e){let t=null;return[e.map(e=>{if(null==t){let r=X(e);return t=r.getSpatialReference(),r.getGeometry()}return Y(e)}),t]}function X(e){let t=U(e),r=q(e.spatialReference);return r&&t.setSpatialReference(r),t}function Y(e){return U(e).getGeometry()}function L(e){return U(e,!0).getGeometry()}function q(e){if(null==e||!e.wkid&&!e.latestWkid&&!e.wkt&&!e.wkt2)return null;let t=!1;if(e instanceof u.A){let{wkt2:r}=e;e=e.toJSON(),e.wkt2??=r,t=!0}(e.latestVcsWkid||e.vcsWkid)&&(t||(e={...e}),delete e?.latestVcsWkid,delete e?.vcsWkid);let r=new _(e,{strict:!1});r.nextToken();let n=V.importSpatialReference(r);return 0===n.getCoordinateSystemType()?null:n}function K(e,t){if(e instanceof s.a$&&(t=e.getSpatialReference(),e=e.getGeometry()),null==e||e.isEmpty())return null;let r;switch(e.getGeometryType()){case i.G.enumPoint:case i.G.enumMultiPoint:case i.G.enumPolyline:case i.G.enumPolygon:r=(0,m.MY)(e)}if(r){let e=(0,m.gh)(r);return e.spatialReference=Z(t),e.spatialReference??delete e.spatialReference,e}return B.reset(),R.execute(0,e,t??null,B),B.getObject()}function Z(e){return null==e||0===e.getCoordinateSystemType()?null:(B.reset(),R.execute(0,null,e,B),B.getObject().spatialReference)}}}]);
|