@arcgis/core 4.28.0-next.20230621 → 4.28.0-next.20230623

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.
Files changed (249) hide show
  1. package/Basemap.js +1 -1
  2. package/arcade/ArcadeModuleResolver.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/arcadeCompiler.js +1 -1
  5. package/arcade/arcadeTimeUtils.js +1 -1
  6. package/arcade/featureset/actions/GroupBy.js +1 -1
  7. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  8. package/arcade/featureset/support/sqlUtils.js +1 -1
  9. package/arcade/functions/date.js +1 -1
  10. package/arcade/functions/geomasync.js +1 -1
  11. package/arcade/functions/geometry.js +1 -1
  12. package/arcade/functions/geomsync.js +1 -1
  13. package/arcade/functions/string.js +1 -1
  14. package/arcade/languageUtils.js +1 -1
  15. package/assets/esri/core/workers/RemoteClient.js +1 -1
  16. package/assets/esri/core/workers/chunks/0380e9f61b6f3ca85139.js +1 -0
  17. package/assets/esri/core/workers/chunks/0bd95f46a0a9005a19f9.js +1 -0
  18. package/assets/esri/core/workers/chunks/0c621046b7211cdde980.js +1 -0
  19. package/assets/esri/core/workers/chunks/0e0267739728e5413f1d.js +1 -0
  20. package/assets/esri/core/workers/chunks/{39079bcfd35ed73c4e34.js → 156e801a3262f0ac79c0.js} +1 -1
  21. package/assets/esri/core/workers/chunks/19b4f02fb2392d964582.js +1 -0
  22. package/assets/esri/core/workers/chunks/1ae75f5282e983f6d768.js +1 -0
  23. package/assets/esri/core/workers/chunks/2179b3e9e532ca8ef982.js +1 -0
  24. package/assets/esri/core/workers/chunks/21aaa7fa0e5482670010.js +1 -0
  25. package/assets/esri/core/workers/chunks/26212a08ea383547335b.js +1 -0
  26. package/assets/esri/core/workers/chunks/{2420ec029236ab31d908.js → 2882a55a971af1f7858b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/294285f2822c101326ec.js +1 -0
  28. package/assets/esri/core/workers/chunks/29f9a380610e4fd98a7c.js +1 -0
  29. package/assets/esri/core/workers/chunks/303238fc2fcdbb277981.js +1 -0
  30. package/assets/esri/core/workers/chunks/{3db8ae98799c752afe60.js → 34958516e604d487c625.js} +1 -1
  31. package/assets/esri/core/workers/chunks/3bee743f4c9370045a5d.js +1 -0
  32. package/assets/esri/core/workers/chunks/{8e08968505483dc58e00.js → 40ee4e0a5000a08c3abd.js} +1 -1
  33. package/assets/esri/core/workers/chunks/4128e45e17c9e5280e11.js +1 -0
  34. package/assets/esri/core/workers/chunks/4f88c4d1d2103843aca8.js +1 -0
  35. package/assets/esri/core/workers/chunks/505792ce8cbbddd2e815.js +1 -0
  36. package/assets/esri/core/workers/chunks/{3d42fa4ab5f8632d690a.js → 5237b3938be0d4bc6045.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{57077e608f20d3a931e8.js → 570e94f4fbefc856d303.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{4b235d1b6a72773cd4f4.js → 57bb8516fa998a0fba78.js} +1 -1
  39. package/assets/esri/core/workers/chunks/57bf3ff01d738cedc292.js +1 -0
  40. package/assets/esri/core/workers/chunks/{1e9e68312cd865358260.js → 60486acc5dacf73f851a.js} +1 -1
  41. package/assets/esri/core/workers/chunks/6208f2dfa9dfd3bca000.js +1 -0
  42. package/assets/esri/core/workers/chunks/64008bde5d3ffd9f2499.js +1 -0
  43. package/assets/esri/core/workers/chunks/69f51a7768bf51c9e346.js +1 -0
  44. package/assets/esri/core/workers/chunks/719f741a0e45c3e694ba.js +1 -0
  45. package/assets/esri/core/workers/chunks/{cfe379a78a983373b3ac.js → 7304f45f5622a68253e4.js} +1 -1
  46. package/assets/esri/core/workers/chunks/733b70d6e5c466a67e9c.js +1 -0
  47. package/assets/esri/core/workers/chunks/7694521b44681d52b713.js +1 -0
  48. package/assets/esri/core/workers/chunks/840fd05ceaa038c476d6.js +1 -0
  49. package/assets/esri/core/workers/chunks/89f7fd2ab92aa14fe0c0.js +1 -0
  50. package/assets/esri/core/workers/chunks/8a6f29f2ebd59783bb1b.js +1 -0
  51. package/assets/esri/core/workers/chunks/9d487b7817ccf5bceff6.js +1 -0
  52. package/assets/esri/core/workers/chunks/{42b6315e21c4c1345ba5.js → 9f5337a80963e0b3c009.js} +1 -1
  53. package/assets/esri/core/workers/chunks/a0face18b3ea567999ef.js +1 -0
  54. package/assets/esri/core/workers/chunks/b773c8854e98384ac8ac.js +1 -0
  55. package/assets/esri/core/workers/chunks/{fb44d872b9dbadcf8ccf.js → b9ef05c22bc3e395bcb3.js} +1 -1
  56. package/assets/esri/core/workers/chunks/bc5e34200776cfc83d5b.js +1 -0
  57. package/assets/esri/core/workers/chunks/{cfc3dcca2b69d20d5375.js → c0b9cc091efd5db827de.js} +1 -1
  58. package/assets/esri/core/workers/chunks/c9f5e949830196ad9458.js +1 -0
  59. package/assets/esri/core/workers/chunks/{036301f545aba2b8e485.js → cc15e28a99694120556d.js} +1 -1
  60. package/assets/esri/core/workers/chunks/ce7f575a6c2053c7ca17.js +1 -0
  61. package/assets/esri/core/workers/chunks/ce9c99cee3d1a3963e7c.js +1 -0
  62. package/assets/esri/core/workers/chunks/cf9a87b53ea74bae6a37.js +1 -0
  63. package/assets/esri/core/workers/chunks/d16850b98a53ade0de10.js +1 -0
  64. package/assets/esri/core/workers/chunks/d24f7ef6eca8c91b90b4.js +1 -0
  65. package/assets/esri/core/workers/chunks/dbd86e4b7983873cbe7c.js +1 -0
  66. package/assets/esri/core/workers/chunks/{3c3f65913006b84b2289.js → de20572d334abd4a7d82.js} +1 -1
  67. package/assets/esri/core/workers/chunks/e009e7f074a572894f48.js +1 -0
  68. package/assets/esri/core/workers/chunks/{cb004c492e22c50f9bfa.js → f3eb89cff63e00f036c6.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{b2a423d9ce8bb784267c.js → f53f20c7100092823487.js} +1 -1
  70. package/assets/esri/core/workers/chunks/f6040205c50e2795a1a0.js +1 -0
  71. package/assets/esri/core/workers/chunks/{915734255a79bff3ef0f.js → fcd54e9e64c2864f183c.js} +1 -1
  72. package/assets/esri/t9n/common.json +1 -1
  73. package/assets/esri/t9n/common_en.json +1 -1
  74. package/assets/esri/themes/base/_core.scss +6 -2
  75. package/assets/esri/themes/base/_mixins.scss +0 -147
  76. package/assets/esri/themes/base/widgets/_AreaMeasurement2D.scss +0 -8
  77. package/assets/esri/themes/base/widgets/_AreaMeasurement3D.scss +0 -8
  78. package/assets/esri/themes/base/widgets/_DirectLineMeasurement3D.scss +0 -1
  79. package/assets/esri/themes/base/widgets/_DistanceMeasurement2D.scss +0 -1
  80. package/assets/esri/themes/base/widgets/_MeasurementWidgetContent.scss +67 -0
  81. package/assets/esri/themes/base/widgets/_Slice.scss +17 -54
  82. package/assets/esri/themes/base/widgets/_UnitSelect.scss +14 -0
  83. package/assets/esri/themes/dark/main.css +1 -1
  84. package/assets/esri/themes/light/main.css +1 -1
  85. package/assets/esri/themes/light/view.css +1 -1
  86. package/assets/esri/widgets/AreaMeasurement2D/t9n/AreaMeasurement2D.json +1 -1
  87. package/assets/esri/widgets/AreaMeasurement2D/t9n/AreaMeasurement2D_en.json +1 -1
  88. package/assets/esri/widgets/AreaMeasurement3D/t9n/AreaMeasurement3D.json +1 -1
  89. package/assets/esri/widgets/AreaMeasurement3D/t9n/AreaMeasurement3D_en.json +1 -1
  90. package/assets/esri/widgets/DirectLineMeasurement3D/t9n/DirectLineMeasurement3D.json +1 -1
  91. package/assets/esri/widgets/DirectLineMeasurement3D/t9n/DirectLineMeasurement3D_en.json +1 -1
  92. package/assets/esri/widgets/DistanceMeasurement2D/t9n/DistanceMeasurement2D.json +1 -1
  93. package/assets/esri/widgets/DistanceMeasurement2D/t9n/DistanceMeasurement2D_en.json +1 -1
  94. package/chunks/HUDMaterial.glsl.js +39 -39
  95. package/chunks/HighlightBlur.glsl.js +2 -2
  96. package/chunks/ShadowHighlight.glsl.js +1 -1
  97. package/chunks/arcade.js +1 -1
  98. package/chunks/languageUtils.js +1 -1
  99. package/core/HandleOwner.js +1 -1
  100. package/core/promiseUtils.js +1 -1
  101. package/core/support/{WatchUpdatingTracking.js → UpdatingHandles.js} +1 -1
  102. package/core/workers/workerFactory.js +1 -1
  103. package/geometry/projection.js +1 -1
  104. package/interfaces.d.ts +270 -5
  105. package/kernel.js +1 -1
  106. package/layers/Layer.js +1 -1
  107. package/layers/LinkChartLayer.d.ts +4 -0
  108. package/layers/LinkChartLayer.js +1 -1
  109. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  110. package/layers/mixins/PortalLayer.js +1 -1
  111. package/layers/support/TileInfoTilemapCache.js +1 -1
  112. package/package.json +1 -1
  113. package/support/revision.js +1 -1
  114. package/symbols/cim/cimAnalyzer.js +1 -1
  115. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  116. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  117. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  118. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  119. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  120. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  121. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  122. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  123. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  124. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  125. package/views/3d/environment/CloudsGenerator.js +1 -1
  126. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  127. package/views/3d/environment/Precipitation.js +1 -1
  128. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  129. package/views/3d/environment/Stars.js +1 -1
  130. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  131. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  132. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  133. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  134. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  135. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  136. package/views/3d/layers/I3SMeshView3D.js +1 -1
  137. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  138. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  139. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  140. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  141. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  142. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  143. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  144. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  145. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  146. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  147. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  148. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  149. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  150. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  151. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  152. package/views/3d/layers/graphics/Labeler.js +1 -1
  153. package/views/3d/layers/graphics/labelPlacement.js +1 -1
  154. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  155. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  156. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  157. package/views/3d/state/ViewState.js +1 -1
  158. package/views/3d/state/ViewStateManager.js +1 -1
  159. package/views/3d/support/DisplayQualityProfile.js +1 -1
  160. package/views/3d/support/MemoryController.js +1 -1
  161. package/views/3d/support/SceneViewPerformanceInfo.js +1 -1
  162. package/views/3d/support/cameraUtils.js +1 -1
  163. package/views/3d/support/viewpointUtils.js +1 -1
  164. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  165. package/views/3d/terrain/OverlayManager.js +1 -1
  166. package/views/3d/terrain/OverlayRenderer.js +1 -1
  167. package/views/3d/terrain/TerrainSurface.js +1 -1
  168. package/views/3d/webgl-engine/Stage.js +1 -1
  169. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  170. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +6 -7
  171. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  172. package/views/3d/webgl-engine/lib/Highlight.js +1 -1
  173. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  174. package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
  175. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  176. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  177. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  178. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  179. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  180. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  181. package/views/LayerViewManager.js +1 -1
  182. package/views/ToolViewManager.js +1 -1
  183. package/views/draw/DrawOperation.js +1 -1
  184. package/views/draw/PointDrawAction.js +1 -1
  185. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  186. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  187. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  188. package/views/interactive/snapping/featureSources/I3SSnappingSource.js +1 -1
  189. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  190. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  191. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  192. package/views/layers/LayerView.js +1 -1
  193. package/views/overlay/ViewOverlay.js +1 -1
  194. package/views/webgl/Texture.js +1 -1
  195. package/widgets/AreaMeasurement2D.js +1 -1
  196. package/widgets/AreaMeasurement3D.js +1 -1
  197. package/widgets/DirectLineMeasurement3D.js +1 -1
  198. package/widgets/DistanceMeasurement2D.js +1 -1
  199. package/widgets/Editor/EditorViewModel.js +1 -1
  200. package/widgets/Editor/Workflow.js +1 -1
  201. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  202. package/widgets/FeatureForm/FieldInput.js +1 -1
  203. package/widgets/FeatureForm/FormExpressionArcadeExecutor.js +1 -1
  204. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  205. package/widgets/OrientedImageryViewer.js +1 -1
  206. package/widgets/Slice.js +1 -1
  207. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  208. package/widgets/support/MeasurementWidgetContent.js +5 -0
  209. package/widgets/support/UnitSelect.js +5 -0
  210. package/assets/esri/core/workers/chunks/0254165377538522c830.js +0 -1
  211. package/assets/esri/core/workers/chunks/07f16ea775b39a1a4a7b.js +0 -1
  212. package/assets/esri/core/workers/chunks/170c72126d10b1fdb2b0.js +0 -1
  213. package/assets/esri/core/workers/chunks/1bbc868d2430103951eb.js +0 -1
  214. package/assets/esri/core/workers/chunks/1d2ef88a8d028adef102.js +0 -1
  215. package/assets/esri/core/workers/chunks/2ef70c9b2484a11b7435.js +0 -1
  216. package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +0 -1
  217. package/assets/esri/core/workers/chunks/3b3d676b609c47a77164.js +0 -1
  218. package/assets/esri/core/workers/chunks/3d9a8cb638cf9b8ca4b3.js +0 -1
  219. package/assets/esri/core/workers/chunks/42f3421740a5479559dc.js +0 -1
  220. package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +0 -1
  221. package/assets/esri/core/workers/chunks/52315f93a6f0ad59bd90.js +0 -1
  222. package/assets/esri/core/workers/chunks/5bb96e602d7cecbecf54.js +0 -1
  223. package/assets/esri/core/workers/chunks/63322229183f1d4eaa70.js +0 -1
  224. package/assets/esri/core/workers/chunks/642510b0371311ff8e16.js +0 -1
  225. package/assets/esri/core/workers/chunks/6995ace1d25d67c98d0e.js +0 -1
  226. package/assets/esri/core/workers/chunks/7e4013f8c31c9a9438c6.js +0 -1
  227. package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +0 -1
  228. package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +0 -1
  229. package/assets/esri/core/workers/chunks/95ff92d7caa34664d58f.js +0 -1
  230. package/assets/esri/core/workers/chunks/9e570cd4a48c30c83ae6.js +0 -1
  231. package/assets/esri/core/workers/chunks/a9e9297267614c4c4f3b.js +0 -1
  232. package/assets/esri/core/workers/chunks/b052463ffb7cb32306dc.js +0 -1
  233. package/assets/esri/core/workers/chunks/b31974524932e638df8c.js +0 -1
  234. package/assets/esri/core/workers/chunks/b75b4b132dbd9cb9d372.js +0 -1
  235. package/assets/esri/core/workers/chunks/c1dfbda75abc748a6ca4.js +0 -1
  236. package/assets/esri/core/workers/chunks/c8702e53a8ad6cf6ab85.js +0 -1
  237. package/assets/esri/core/workers/chunks/c90416e7bf29eb1d4536.js +0 -1
  238. package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +0 -1
  239. package/assets/esri/core/workers/chunks/d0e2b42dca51711f2c6f.js +0 -1
  240. package/assets/esri/core/workers/chunks/d2a127f7bb0e2ba14a13.js +0 -1
  241. package/assets/esri/core/workers/chunks/df96824a6f76bad1370c.js +0 -1
  242. package/assets/esri/core/workers/chunks/e097f41bbfac00250477.js +0 -1
  243. package/assets/esri/core/workers/chunks/e3243d120a23a9b48392.js +0 -1
  244. package/assets/esri/core/workers/chunks/e55f80b774e090a0aa04.js +0 -1
  245. package/assets/esri/core/workers/chunks/e668c7e2e61aae6ca6e0.js +0 -1
  246. package/assets/esri/core/workers/chunks/ef900614353505afb210.js +0 -1
  247. package/assets/esri/core/workers/chunks/f0299d93a95f40ea7cf7.js +0 -1
  248. package/assets/esri/core/workers/chunks/f23b95d7e51a144ad065.js +0 -1
  249. package/assets/esri/core/workers/chunks/f263e73a25fae4beffae.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6122,3172,1900,4727,9880],{99880:(e,t,r)=>{r.d(t,{V:()=>u});var n=r(68773),o=(r(3172),r(20102)),a=r(92604),i=r(81271);const s=a.Z.getLogger("esri.assets");function u(e){if(!n.default.assetsPath)throw s.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(n.default.assetsPath,e)}},46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,n,o,a,i,s,u){return[e,t,r,n,o,a,i,s,u]}function a(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>a,c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:n,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},52138:(e,t,r)=>{r.d(t,{A:()=>m,a:()=>u,d:()=>p,e:()=>d,f:()=>h,g:()=>g,h:()=>M,i:()=>i,j:()=>T,k:()=>f,m:()=>l,s:()=>a,t:()=>s,w:()=>c,y:()=>v,z:()=>O});var n=r(65617),o=r(46851);function a(e,t,r,n,o,a,i,s,u,l,c,f,d,h,p,m,b){return e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=a,e[5]=i,e[6]=s,e[7]=u,e[8]=l,e[9]=c,e[10]=f,e[11]=d,e[12]=h,e[13]=p,e[14]=m,e[15]=b,e}function i(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function s(e,t){if(e===t){const r=t[1],n=t[2],o=t[3],a=t[6],i=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=o,e[13]=i,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function u(e,t){const r=t[0],n=t[1],o=t[2],a=t[3],i=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],m=t[13],b=t[14],y=t[15],g=r*s-n*i,w=r*u-o*i,M=r*l-a*i,T=n*u-o*s,O=n*l-a*s,v=o*l-a*u,I=c*m-f*p,C=c*b-d*p,A=c*y-h*p,S=f*b-d*m,E=f*y-h*m,U=d*y-h*b;let N=g*U-w*E+M*S+T*A-O*C+v*I;return N?(N=1/N,e[0]=(s*U-u*E+l*S)*N,e[1]=(o*E-n*U-a*S)*N,e[2]=(m*v-b*O+y*T)*N,e[3]=(d*O-f*v-h*T)*N,e[4]=(u*A-i*U-l*C)*N,e[5]=(r*U-o*A+a*C)*N,e[6]=(b*M-p*v-y*w)*N,e[7]=(c*v-d*M+h*w)*N,e[8]=(i*E-s*A+l*I)*N,e[9]=(n*A-r*E-a*I)*N,e[10]=(p*O-m*M+y*g)*N,e[11]=(f*M-c*O-h*g)*N,e[12]=(s*C-i*S-u*I)*N,e[13]=(r*S-n*C+o*I)*N,e[14]=(m*w-p*T-b*g)*N,e[15]=(c*T-f*w+d*g)*N,e):null}function l(e,t,r){const n=t[0],o=t[1],a=t[2],i=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],m=t[12],b=t[13],y=t[14],g=t[15];let w=r[0],M=r[1],T=r[2],O=r[3];return e[0]=w*n+M*s+T*f+O*m,e[1]=w*o+M*u+T*d+O*b,e[2]=w*a+M*l+T*h+O*y,e[3]=w*i+M*c+T*p+O*g,w=r[4],M=r[5],T=r[6],O=r[7],e[4]=w*n+M*s+T*f+O*m,e[5]=w*o+M*u+T*d+O*b,e[6]=w*a+M*l+T*h+O*y,e[7]=w*i+M*c+T*p+O*g,w=r[8],M=r[9],T=r[10],O=r[11],e[8]=w*n+M*s+T*f+O*m,e[9]=w*o+M*u+T*d+O*b,e[10]=w*a+M*l+T*h+O*y,e[11]=w*i+M*c+T*p+O*g,w=r[12],M=r[13],T=r[14],O=r[15],e[12]=w*n+M*s+T*f+O*m,e[13]=w*o+M*u+T*d+O*b,e[14]=w*a+M*l+T*h+O*y,e[15]=w*i+M*c+T*p+O*g,e}function c(e,t,r){const n=r[0],o=r[1],a=r[2];if(t===e)e[12]=t[0]*n+t[4]*o+t[8]*a+t[12],e[13]=t[1]*n+t[5]*o+t[9]*a+t[13],e[14]=t[2]*n+t[6]*o+t[10]*a+t[14],e[15]=t[3]*n+t[7]*o+t[11]*a+t[15];else{const r=t[0],i=t[1],s=t[2],u=t[3],l=t[4],c=t[5],f=t[6],d=t[7],h=t[8],p=t[9],m=t[10],b=t[11];e[0]=r,e[1]=i,e[2]=s,e[3]=u,e[4]=l,e[5]=c,e[6]=f,e[7]=d,e[8]=h,e[9]=p,e[10]=m,e[11]=b,e[12]=r*n+l*o+h*a+t[12],e[13]=i*n+c*o+p*a+t[13],e[14]=s*n+f*o+m*a+t[14],e[15]=u*n+d*o+b*a+t[15]}return e}function f(e,t,r){const n=r[0],o=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*o,e[5]=t[5]*o,e[6]=t[6]*o,e[7]=t[7]*o,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function d(e,t,r,n){let a,i,s,u,l,c,f,d,h,p,m,b,y,g,w,M,T,O,v,I,C,A,S,E,U=n[0],N=n[1],x=n[2],L=Math.sqrt(U*U+N*N+x*x);return L<(0,o.g)()?null:(L=1/L,U*=L,N*=L,x*=L,a=Math.sin(r),i=Math.cos(r),s=1-i,u=t[0],l=t[1],c=t[2],f=t[3],d=t[4],h=t[5],p=t[6],m=t[7],b=t[8],y=t[9],g=t[10],w=t[11],M=U*U*s+i,T=N*U*s+x*a,O=x*U*s-N*a,v=U*N*s-x*a,I=N*N*s+i,C=x*N*s+U*a,A=U*x*s+N*a,S=N*x*s-U*a,E=x*x*s+i,e[0]=u*M+d*T+b*O,e[1]=l*M+h*T+y*O,e[2]=c*M+p*T+g*O,e[3]=f*M+m*T+w*O,e[4]=u*v+d*I+b*C,e[5]=l*v+h*I+y*C,e[6]=c*v+p*I+g*C,e[7]=f*v+m*I+w*C,e[8]=u*A+d*S+b*E,e[9]=l*A+h*S+y*E,e[10]=c*A+p*S+g*E,e[11]=f*A+m*S+w*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function h(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function p(e,t,r){if(0===t)return i(e);let n,a,s,u=r[0],l=r[1],c=r[2],f=Math.sqrt(u*u+l*l+c*c);return f<(0,o.g)()?null:(f=1/f,u*=f,l*=f,c*=f,n=Math.sin(t),a=Math.cos(t),s=1-a,e[0]=u*u*s+a,e[1]=l*u*s+c*n,e[2]=c*u*s-l*n,e[3]=0,e[4]=u*l*s-c*n,e[5]=l*l*s+a,e[6]=c*l*s+u*n,e[7]=0,e[8]=u*c*s+l*n,e[9]=l*c*s-u*n,e[10]=c*c*s+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function m(e,t){const r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function b(e,t,r){const n=t[0],o=t[1],a=t[2],i=t[3],s=n+n,u=o+o,l=a+a,c=n*s,f=n*u,d=n*l,h=o*u,p=o*l,m=a*l,b=i*s,y=i*u,g=i*l;return e[0]=1-(h+m),e[1]=f+g,e[2]=d-y,e[3]=0,e[4]=f-g,e[5]=1-(c+m),e[6]=p+b,e[7]=0,e[8]=d+y,e[9]=p-b,e[10]=1-(c+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}const y=(0,n.c)();function g(e,t,r,n){const o=t[0],a=t[1],i=t[2],s=t[3],u=o+o,l=a+a,c=i+i,f=o*u,d=o*l,h=o*c,p=a*l,m=a*c,b=i*c,y=s*u,g=s*l,w=s*c,M=n[0],T=n[1],O=n[2];return e[0]=(1-(p+b))*M,e[1]=(d+w)*M,e[2]=(h-g)*M,e[3]=0,e[4]=(d-w)*T,e[5]=(1-(f+b))*T,e[6]=(m+y)*T,e[7]=0,e[8]=(h+g)*O,e[9]=(m-y)*O,e[10]=(1-(f+p))*O,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function w(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function M(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[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function T(e,t){if(e===t)return!0;const r=e[0],n=e[1],a=e[2],i=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],d=e[9],h=e[10],p=e[11],m=e[12],b=e[13],y=e[14],g=e[15],w=t[0],M=t[1],T=t[2],O=t[3],v=t[4],I=t[5],C=t[6],A=t[7],S=t[8],E=t[9],U=t[10],N=t[11],x=t[12],L=t[13],F=t[14],R=t[15],q=(0,o.g)();return Math.abs(r-w)<=q*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(n-M)<=q*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(a-T)<=q*Math.max(1,Math.abs(a),Math.abs(T))&&Math.abs(i-O)<=q*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(s-v)<=q*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-I)<=q*Math.max(1,Math.abs(u),Math.abs(I))&&Math.abs(l-C)<=q*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(c-A)<=q*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(f-S)<=q*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(d-E)<=q*Math.max(1,Math.abs(d),Math.abs(E))&&Math.abs(h-U)<=q*Math.max(1,Math.abs(h),Math.abs(U))&&Math.abs(p-N)<=q*Math.max(1,Math.abs(p),Math.abs(N))&&Math.abs(m-x)<=q*Math.max(1,Math.abs(m),Math.abs(x))&&Math.abs(b-L)<=q*Math.max(1,Math.abs(b),Math.abs(L))&&Math.abs(y-F)<=q*Math.max(1,Math.abs(y),Math.abs(F))&&Math.abs(g-R)<=q*Math.max(1,Math.abs(g),Math.abs(R))}function O(e){const t=(0,o.g)(),r=e[0],n=e[1],a=e[2],i=e[4],s=e[5],u=e[6],l=e[8],c=e[9],f=e[10];return Math.abs(1-(r*r+i*i+l*l))<=t&&Math.abs(1-(n*n+s*s+c*c))<=t&&Math.abs(1-(a*a+u*u+f*f))<=t}function v(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[8]&&0===e[9]&&1===e[10]}const I=l,C=w;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},adjoint:function(e,t){const r=t[0],n=t[1],o=t[2],a=t[3],i=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],m=t[13],b=t[14],y=t[15];return e[0]=s*(d*y-h*b)-f*(u*y-l*b)+m*(u*h-l*d),e[1]=-(n*(d*y-h*b)-f*(o*y-a*b)+m*(o*h-a*d)),e[2]=n*(u*y-l*b)-s*(o*y-a*b)+m*(o*l-a*u),e[3]=-(n*(u*h-l*d)-s*(o*h-a*d)+f*(o*l-a*u)),e[4]=-(i*(d*y-h*b)-c*(u*y-l*b)+p*(u*h-l*d)),e[5]=r*(d*y-h*b)-c*(o*y-a*b)+p*(o*h-a*d),e[6]=-(r*(u*y-l*b)-i*(o*y-a*b)+p*(o*l-a*u)),e[7]=r*(u*h-l*d)-i*(o*h-a*d)+c*(o*l-a*u),e[8]=i*(f*y-h*m)-c*(s*y-l*m)+p*(s*h-l*f),e[9]=-(r*(f*y-h*m)-c*(n*y-a*m)+p*(n*h-a*f)),e[10]=r*(s*y-l*m)-i*(n*y-a*m)+p*(n*l-a*s),e[11]=-(r*(s*h-l*f)-i*(n*h-a*f)+c*(n*l-a*s)),e[12]=-(i*(f*b-d*m)-c*(s*b-u*m)+p*(s*d-u*f)),e[13]=r*(f*b-d*m)-c*(n*b-o*m)+p*(n*d-o*f),e[14]=-(r*(s*b-u*m)-i*(n*b-o*m)+p*(n*u-o*s)),e[15]=r*(s*d-u*f)-i*(n*d-o*f)+c*(n*u-o*s),e},copy:function(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[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},determinant:function(e){const t=e[0],r=e[1],n=e[2],o=e[3],a=e[4],i=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=e[10],d=e[11],h=e[12],p=e[13],m=e[14],b=e[15];return(t*i-r*a)*(f*b-d*m)-(t*s-n*a)*(c*b-d*p)+(t*u-o*a)*(c*m-f*p)+(r*s-n*i)*(l*b-d*h)-(r*u-o*i)*(l*m-f*h)+(n*u-o*s)*(l*p-c*h)},equals:T,exactEquals:M,frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)},fromQuat:function(e,t){const r=t[0],n=t[1],o=t[2],a=t[3],i=r+r,s=n+n,u=o+o,l=r*i,c=n*i,f=n*s,d=o*i,h=o*s,p=o*u,m=a*i,b=a*s,y=a*u;return e[0]=1-f-p,e[1]=c+y,e[2]=d-b,e[3]=0,e[4]=c-y,e[5]=1-l-p,e[6]=h+m,e[7]=0,e[8]=d+b,e[9]=h-m,e[10]=1-l-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromQuat2:function(e,t){const r=y,n=-t[0],o=-t[1],a=-t[2],i=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=n*n+o*o+a*a+i*i;return f>0?(r[0]=2*(s*i+c*n+u*a-l*o)/f,r[1]=2*(u*i+c*o+l*n-s*a)/f,r[2]=2*(l*i+c*a+s*o-u*n)/f):(r[0]=2*(s*i+c*n+u*a-l*o),r[1]=2*(u*i+c*o+l*n-s*a),r[2]=2*(l*i+c*a+s*o-u*n)),b(e,t,r),e},fromRotation:p,fromRotationTranslation:b,fromRotationTranslationScale:g,fromRotationTranslationScaleOrigin:function(e,t,r,n,o){const a=t[0],i=t[1],s=t[2],u=t[3],l=a+a,c=i+i,f=s+s,d=a*l,h=a*c,p=a*f,m=i*c,b=i*f,y=s*f,g=u*l,w=u*c,M=u*f,T=n[0],O=n[1],v=n[2],I=o[0],C=o[1],A=o[2],S=(1-(m+y))*T,E=(h+M)*T,U=(p-w)*T,N=(h-M)*O,x=(1-(d+y))*O,L=(b+g)*O,F=(p+w)*v,R=(b-g)*v,q=(1-(d+m))*v;return e[0]=S,e[1]=E,e[2]=U,e[3]=0,e[4]=N,e[5]=x,e[6]=L,e[7]=0,e[8]=F,e[9]=R,e[10]=q,e[11]=0,e[12]=r[0]+I-(S*I+N*C+F*A),e[13]=r[1]+C-(E*I+x*C+R*A),e[14]=r[2]+A-(U*I+L*C+q*A),e[15]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromTranslation:h,fromXRotation:m,fromYRotation:function(e,t){const r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromZRotation:function(e,t){const r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,o,a,i){const s=1/(r-t),u=1/(o-n),l=1/(a-i);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*u,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(o+n)*u,e[10]=(i+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*a*2*l,e[15]=0,e},getRotation:function(e,t){const r=t[0]+t[5]+t[10];let n=0;return r>0?(n=2*Math.sqrt(r+1),e[3]=.25*n,e[0]=(t[6]-t[9])/n,e[1]=(t[8]-t[2])/n,e[2]=(t[1]-t[4])/n):t[0]>t[5]&&t[0]>t[10]?(n=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/n,e[0]=.25*n,e[1]=(t[1]+t[4])/n,e[2]=(t[8]+t[2])/n):t[5]>t[10]?(n=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/n,e[0]=(t[1]+t[4])/n,e[1]=.25*n,e[2]=(t[6]+t[9])/n):(n=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/n,e[0]=(t[8]+t[2])/n,e[1]=(t[6]+t[9])/n,e[2]=.25*n),e},getScaling:function(e,t){const r=t[0],n=t[1],o=t[2],a=t[4],i=t[5],s=t[6],u=t[8],l=t[9],c=t[10];return e[0]=Math.sqrt(r*r+n*n+o*o),e[1]=Math.sqrt(a*a+i*i+s*s),e[2]=Math.sqrt(u*u+l*l+c*c),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},hasIdentityRotation:v,identity:i,invert:u,invertOrIdentity:function(e,t){return u(e,t)||i(e),e},isOrthoNormal:O,lookAt:function(e,t,r,n){const a=t[0],s=t[1],u=t[2];let l=a-r[0],c=s-r[1],f=u-r[2];const d=(0,o.g)();if(Math.abs(l)<d&&Math.abs(c)<d&&Math.abs(f)<d)return void i(e);let h=1/Math.sqrt(l*l+c*c+f*f);l*=h,c*=h,f*=h;const p=n[0],m=n[1],b=n[2];let y=m*f-b*c,g=b*l-p*f,w=p*c-m*l;h=Math.sqrt(y*y+g*g+w*w),h?(h=1/h,y*=h,g*=h,w*=h):(y=0,g=0,w=0);let M=c*w-f*g,T=f*y-l*w,O=l*g-c*y;h=Math.sqrt(M*M+T*T+O*O),h?(h=1/h,M*=h,T*=h,O*=h):(M=0,T=0,O=0),e[0]=y,e[1]=M,e[2]=l,e[3]=0,e[4]=g,e[5]=T,e[6]=c,e[7]=0,e[8]=w,e[9]=O,e[10]=f,e[11]=0,e[12]=-(y*a+g*s+w*u),e[13]=-(M*a+T*s+O*u),e[14]=-(l*a+c*s+f*u),e[15]=1},mul:I,multiply:l,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},ortho:function(e,t,r,n,o,a,i){const s=1/(t-r),u=1/(n-o),l=1/(a-i);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+r)*s,e[13]=(o+n)*u,e[14]=(i+a)*l,e[15]=1,e},perspective:function(e,t,r,n,o){const a=1/Math.tan(t/2);let i;return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=o&&o!==1/0?(i=1/(n-o),e[10]=(o+n)*i,e[14]=2*o*n*i):(e[10]=-1,e[14]=-2*n),e},perspectiveFromFieldOfView:function(e,t,r,n){const o=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),i=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),u=2/(i+s),l=2/(o+a);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(i-s)*u*.5,e[9]=(o-a)*l*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},rotate:d,rotateX:function(e,t,r){const n=Math.sin(r),o=Math.cos(r),a=t[4],i=t[5],s=t[6],u=t[7],l=t[8],c=t[9],f=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*o+l*n,e[5]=i*o+c*n,e[6]=s*o+f*n,e[7]=u*o+d*n,e[8]=l*o-a*n,e[9]=c*o-i*n,e[10]=f*o-s*n,e[11]=d*o-u*n,e},rotateY:function(e,t,r){const n=Math.sin(r),o=Math.cos(r),a=t[0],i=t[1],s=t[2],u=t[3],l=t[8],c=t[9],f=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*o-l*n,e[1]=i*o-c*n,e[2]=s*o-f*n,e[3]=u*o-d*n,e[8]=a*n+l*o,e[9]=i*n+c*o,e[10]=s*n+f*o,e[11]=u*n+d*o,e},rotateZ:function(e,t,r){const n=Math.sin(r),o=Math.cos(r),a=t[0],i=t[1],s=t[2],u=t[3],l=t[4],c=t[5],f=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*o+l*n,e[1]=i*o+c*n,e[2]=s*o+f*n,e[3]=u*o+d*n,e[4]=l*o-a*n,e[5]=c*o-i*n,e[6]=f*o-s*n,e[7]=d*o-u*n,e},scale:f,set:a,str:function(e){return"mat4("+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]+")"},sub:C,subtract:w,targetTo:function(e,t,r,n){const o=t[0],a=t[1],i=t[2],s=n[0],u=n[1],l=n[2];let c=o-r[0],f=a-r[1],d=i-r[2],h=c*c+f*f+d*d;h>0&&(h=1/Math.sqrt(h),c*=h,f*=h,d*=h);let p=u*d-l*f,m=l*c-s*d,b=s*f-u*c;return h=p*p+m*m+b*b,h>0&&(h=1/Math.sqrt(h),p*=h,m*=h,b*=h),e[0]=p,e[1]=m,e[2]=b,e[3]=0,e[4]=f*b-d*m,e[5]=d*p-c*b,e[6]=c*m-f*p,e[7]=0,e[8]=c,e[9]=f,e[10]=d,e[11]=0,e[12]=o,e[13]=a,e[14]=i,e[15]=1,e},translate:c,transpose:s},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{a:()=>h,c:()=>b,g:()=>c,j:()=>E,k:()=>m,m:()=>f,s:()=>l});var n=r(46521),o=r(94961),a=r(65617),i=r(46851),s=r(17896),u=r(98766);function l(e,t,r){r*=.5;const n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>(0,i.g)()?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function f(e,t,r){const n=t[0],o=t[1],a=t[2],i=t[3],s=r[0],u=r[1],l=r[2],c=r[3];return e[0]=n*c+i*s+o*l-a*u,e[1]=o*c+i*u+a*s-n*l,e[2]=a*c+i*l+n*u-o*s,e[3]=i*c-n*s-o*u-a*l,e}function d(e,t,r,n){const o=t[0],a=t[1],s=t[2],u=t[3];let l,c,f,d,h,p=r[0],m=r[1],b=r[2],y=r[3];return c=o*p+a*m+s*b+u*y,c<0&&(c=-c,p=-p,m=-m,b=-b,y=-y),1-c>(0,i.g)()?(l=Math.acos(c),f=Math.sin(l),d=Math.sin((1-n)*l)/f,h=Math.sin(n*l)/f):(d=1-n,h=n),e[0]=d*o+h*p,e[1]=d*a+h*m,e[2]=d*s+h*b,e[3]=d*u+h*y,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function p(e,t){const r=t[0]+t[4]+t[8];let n;if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*a+a]+1),e[r]=.5*n,n=.5/n,e[3]=(t[3*o+a]-t[3*a+o])*n,e[o]=(t[3*o+r]+t[3*r+o])*n,e[a]=(t[3*a+r]+t[3*r+a])*n}return e}function m(e,t,r,n){const o=.5*Math.PI/180;t*=o,r*=o,n*=o;const a=Math.sin(t),i=Math.cos(t),s=Math.sin(r),u=Math.cos(r),l=Math.sin(n),c=Math.cos(n);return e[0]=a*u*c-i*s*l,e[1]=i*s*c+a*u*l,e[2]=i*u*l-a*s*c,e[3]=i*u*c+a*s*l,e}const b=u.c,y=u.s,g=u.a,w=f,M=u.b,T=u.d,O=u.l,v=u.e,I=v,C=u.f,A=C,S=u.n,E=u.g,U=u.h,N=(0,a.c)(),x=(0,a.f)(1,0,0),L=(0,a.f)(0,1,0),F=(0,o.a)(),R=(0,o.a)(),q=(0,n.c)();Object.freeze(Object.defineProperty({__proto__:null,add:g,calculateW:function(e,t){const r=t[0],n=t[1],o=t[2];return e[0]=r,e[1]=n,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-o*o)),e},conjugate:h,copy:b,dot:T,equals:U,exactEquals:E,fromEuler:m,fromMat3:p,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],n=t[1],o=t[2],a=t[3],i=r*r+n*n+o*o+a*a,s=i?1/i:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-o*s,e[3]=a*s,e},len:I,length:v,lerp:O,mul:w,multiply:f,normalize:S,random:function(e){const t=i.R,r=t(),n=t(),o=t(),a=Math.sqrt(1-r),s=Math.sqrt(r);return e[0]=a*Math.sin(2*Math.PI*n),e[1]=a*Math.cos(2*Math.PI*n),e[2]=s*Math.sin(2*Math.PI*o),e[3]=s*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const n=t[0],o=t[1],a=t[2],i=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+i*s,e[1]=o*u+a*s,e[2]=a*u-o*s,e[3]=i*u-n*s,e},rotateY:function(e,t,r){r*=.5;const n=t[0],o=t[1],a=t[2],i=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u-a*s,e[1]=o*u+i*s,e[2]=a*u+n*s,e[3]=i*u-o*s,e},rotateZ:function(e,t,r){r*=.5;const n=t[0],o=t[1],a=t[2],i=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*s,e[1]=o*u-n*s,e[2]=a*u+i*s,e[3]=i*u-a*s,e},rotationTo:function(e,t,r){const n=(0,s.e)(t,r);return n<-.999999?((0,s.f)(N,x,t),(0,s.B)(N)<1e-6&&(0,s.f)(N,L,t),(0,s.n)(N,N),l(e,N,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,s.f)(N,t,r),e[0]=N[0],e[1]=N[1],e[2]=N[2],e[3]=1+n,S(e,e))},scale:M,set:y,setAxes:function(e,t,r,n){const o=q;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=n[0],o[4]=n[1],o[7]=n[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],S(e,p(e,o))},setAxisAngle:l,slerp:d,sqlerp:function(e,t,r,n,o,a){return d(F,t,o,a),d(R,r,n,a),d(e,F,R,2*a*(1-a)),e},sqrLen:A,squaredLength:C,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},37140:(e,t,r)=>{function n(){const e=new Float32Array(4);return e[3]=1,e}function o(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}r.d(t,{a:()=>o,b:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:o,create:n,createView:function(e,t){return new Float32Array(e,t,4)},fromValues:function(e,t,r,n){const o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function n(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function a(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>i,a:()=>n,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:n,createView:a,fromValues:function(e,t,r,n){return[e,t,r,n]}},Symbol.toStringTag,{value:"Module"}))},72119:(e,t,r)=>{function n(){return new Float32Array(3)}function o(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function i(){return n()}function s(){return a(1,1,1)}function u(){return a(1,0,0)}function l(){return a(0,1,0)}function c(){return a(0,0,1)}r.d(t,{a:()=>o,b:()=>n,f:()=>a});const f=i(),d=s(),h=u(),p=l(),m=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:h,UNIT_Y:p,UNIT_Z:m,ZEROS:f,clone:o,create:n,createView:function(e,t){return new Float32Array(e,t,3)},fromValues:a,ones:s,unitX:u,unitY:l,unitZ:c,zeros:i},Symbol.toStringTag,{value:"Module"}))},10661:(e,t,r)=>{r.d(t,{s:()=>o});var n=r(42100);class o extends n.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},60437:(e,t,r)=>{r.d(t,{Gv:()=>g,HH:()=>i,JR:()=>p,TC:()=>s,Tn:()=>f,Ue:()=>o,al:()=>a,bZ:()=>m,cS:()=>h,dp:()=>l,fS:()=>y,is:()=>b,op:()=>c,pp:()=>u,t8:()=>d});var n=r(6570);function o(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,r,n,a,i,s=o()){return s[0]=e,s[1]=t,s[2]=r,s[3]=n,s[4]=a,s[5]=i,s}function i(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function s(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function u(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function l(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(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 h(e){return e?d(e,g):o(g)}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,n,o){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function y(e,t,r){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];o()},1231:(e,t,r)=>{r.d(t,{Z:()=>b});var n,o=r(43697),a=r(35454),i=r(96674),s=r(5600),u=r(75215),l=(r(67676),r(80442),r(36030)),c=r(71715),f=r(52011),d=r(72729),h=r(86719);const p=new a.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=n=class extends i.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?p.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"description",void 0),(0,o._)([(0,c.r)("description")],m.prototype,"readDescription",null),(0,o._)([(0,s.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],m.prototype,"domain",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,o._)([(0,s.Cb)({type:u.z8,json:{write:!0}})],m.prototype,"length",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,o._)([(0,l.J)(h.v)],m.prototype,"type",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"valueType",void 0),(0,o._)([(0,c.r)("valueType",["description"])],m.prototype,"readValueType",null),(0,o._)([(0,s.Cb)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=n=(0,o._)([(0,f.j)("esri.layers.support.Field")],m);const b=m},72729:(e,t,r)=>{r.d(t,{im:()=>I,V5:()=>v}),r(80442);var n,o=r(43697),a=r(22974),i=r(5600),s=(r(75215),r(36030)),u=r(52011),l=r(96674);r(67676);let c=n=class extends l.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,i.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=n=(0,o._)([(0,u.j)("esri.layers.support.CodedValue")],c);const f=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends l.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,s.J)(f)],d.prototype,"type",void 0),d=(0,o._)([(0,u.j)("esri.layers.support.Domain")],d);const h=d;var p;let m=p=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new p({codedValues:(0,a.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,i.Cb)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,o._)([(0,s.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=p=(0,o._)([(0,u.j)("esri.layers.support.CodedValueDomain")],m);const b=m;var y;r(92604),r(20102);let g=y=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new y}};(0,o._)([(0,s.J)({inherited:"inherited"})],g.prototype,"type",void 0),g=y=(0,o._)([(0,u.j)("esri.layers.support.InheritedDomain")],g);const w=g;var M;let T=M=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new M({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,i.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],T.prototype,"maxValue",void 0),(0,o._)([(0,i.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],T.prototype,"minValue",void 0),(0,o._)([(0,s.J)({range:"range"})],T.prototype,"type",void 0),T=M=(0,o._)([(0,u.j)("esri.layers.support.RangeDomain")],T);const O=T,v={key:"type",base:h,typeMap:{range:T,"coded-value":b,inherited:w}};function I(e){if(!e||!e.type)return null;switch(e.type){case"range":return O.fromJSON(e);case"codedValue":return b.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).X)({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"})},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n=r(68773),o=r(40330),a=r(20102),i=r(80442),s=r(22974),u=r(95330),l=r(81271),c=r(19745),f=r(71058),d=r(85958);async function h(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,l.u0)(t.query.toString().replaceAll("+"," ")));const s=(0,l.HK)(e),c=(0,l.jc)(e);c||s||(e=(0,l.Fv)(e));const y={url:e,requestOptions:{...t}};let g=(0,l.oh)(e);if(g){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(e){r=v("request:interceptor",e,t)}if((n instanceof Error||n instanceof a.Z)&&(r=v("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(g,y);if(null!=e)return{data:e,getHeader:M,httpStatus:200,requestOptions:y.requestOptions,url:y.url};g.after||g.error||(g=null)}if(e=y.url,"image"===(t=y.requestOptions).responseType&&((0,i.Z)("host-webworker")||(0,i.Z)("host-node")))throw v("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),y);if("head"===t.method){if(t.body)throw v("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),y);if(s||c)throw v("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),y)}if(await async function(){(0,i.Z)("host-webworker")?p||(p=await r.e(9884).then(r.bind(r,29884))):h._abortableFetch||(h._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const w=new AbortController;(0,u.fu)(t,(()=>w.abort()));const T={controller:w,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:g,params:y,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},O=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,a=e.controller.signal,i=r.body;let s=null,l=null;if(b&&"HTMLFormElement"in globalThis&&(i instanceof FormData?s=i:i instanceof HTMLFormElement&&(s=new FormData(i))),"string"==typeof i&&(l=i),e.fetchOptions={cache:r.cacheBust&&!("polyfill"in h._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:a},(s||l)&&(e.fetchOptions.body=s||l),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||s?.get("token")),!e.hasToken&&n.default.apiKey&&(0,f.r)(t)&&(r.query||(r.query={}),r.query.token=n.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!C(t)&&!(0,u.Hc)(a)){let n;"immediate"===r.authMode?(await I(),n=await o.id.getCredential(t,{signal:a}),e.credential=n):"no-prompt"===r.authMode?(await I(),n=await o.id.getCredential(t,{prompt:!1,signal:a}).catch((()=>{})),e.credential=n):o.id&&(n=o.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[t,r]=await A(e)}while(!await E(e,t,r))}catch(r){const n=v("request:server",r,e.params,t);throw n.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(n),n}const a=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,l.kl)(a)){const e=(0,l.P$)(a,!0);e&&m.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(r.authorizedCrossOriginNoCorsDomains)}const i=e.credential;if(i&&o.id){const e=o.id.findServerInfo(i.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,i.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):M,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(T);return g?.after?.(O),O}let p;const m=n.default.request,b="FormData"in globalThis,y=[499,498,403,401],g=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],M=()=>null,T=Symbol();function O(e){const t=(0,l.P$)(e);return!t||t.endsWith(".arcgis.com")||h._corsServers.includes(t)||(0,l.kl)(t)}function v(e,t,r,n){let o="Error";const i={url:r.url,requestOptions:r.requestOptions,getHeader:M,ssl:!1};if(t instanceof a.Z)return t.details?(t.details=(0,s.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=i,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n?.status,a=t.message;a&&(o=a),e&&(i.getHeader=e),i.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,i.subCode=t.subcode,i.messageCode=t.messageCode,"string"==typeof t.details?i.messages=[t.details]:i.messages=t.details,i.raw=T in t?t[T]:t}return(0,u.D_)(t)?(0,u.zE)():new a.Z(e,o,i)}async function I(){o.id||await Promise.all([r.e(7126),r.e(6261),r.e(9255),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function C(e){return w.some((t=>t.test(e)))}async function A(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions??{},a=(0,l.jc)(t)||(0,l.HK)(t),s=r.responseType||"json",f=a?0:null!=r.timeout?r.timeout:m.timeout;let p=!1;if(!a){e.useSSL&&(t=(0,l.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,l.ZN)(t,"request.preventCache",Date.now()));let a={...r.query};e.credentialToken&&(a.token=e.credentialToken);let s=(0,l.B7)(a);(0,i.Z)("esri-url-encodes-apostrophe")&&(s=s.replaceAll("'","%27"));const u=t.length+1+s.length;let f;p="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||u>m.maxUrlLength;const h=r.useProxy||!!(0,l.ed)(t);if(h){const e=(0,l.b7)(t);f=e.path,!p&&f.length+1+u>m.maxUrlLength&&(p=!0),e.query&&(a={...e.query,...a})}if("HEAD"===n.method&&(p||h)){if(p){if(u>m.maxUrlLength)throw v("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw v("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(h)throw v("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,l.fl)(t,a):(n.body=(0,l.B7)(a),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,l.fl)(t,a),h&&(e.useProxy=!0,t=`${f}?${t}`),a.token&&b&&n.body instanceof FormData&&!(0,c.P)(t)&&n.body.set("token",a.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,l.D6)(t,(0,l.TI)()))if((0,l.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",(0,d.jH)(t)&&await(0,d.jz)(p?(0,l.fl)(t,a):t))}let y,g,w=0,M=!1;f>0&&(w=setTimeout((()=>{M=!0,e.controller.abort()}),f));try{if("native-request-init"===r.responseType)g=n,g.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!a&&!e.useProxy&&m.proxyUrl&&!O(t)){if(y=await h._abortableFetch(t,n),e.useProxy||function(e){const t=(0,l.P$)(e);t&&!h._corsServers.includes(t)&&h._corsServers.push(t)}(t),"native"===r.responseType)g=y;else if("HEAD"!==n.method)if(y.ok){switch(s){case"array-buffer":g=await y.arrayBuffer();break;case"blob":case"image":g=await y.blob();break;default:g=await y.text()}if(w&&(clearTimeout(w),w=0),"json"===s||"xml"===s||"document"===s)if(g)switch(s){case"json":g=JSON.parse(g);break;case"xml":g=S(g,"application/xml");break;case"document":g=S(g,"text/html")}else g=null;if(g){if("array-buffer"===s||"blob"===s){const e=y.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&g["blob"===s?"size":"byteLength"]<=750)try{const e=await new Response(g).json();e.error&&(g=e)}catch{}}"image"===s&&g instanceof Blob&&(g=await U(URL.createObjectURL(g),e,!0))}}else{g=await y.text();try{g=JSON.parse(g)}catch{}}}else g=await U(t,e)}catch(n){if("AbortError"===n.name){if(M)throw(0,d.Tf)();throw(0,u.zE)("Request canceled")}if(!(!y&&n instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||O(t))throw n;e.redoRequest=!0,(0,l.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,l.P$)(t)??""})}finally{w&&clearTimeout(w)}return[y,g]}function S(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function E(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let a,i;if(r&&(r.error?a=r.error:"error"===r.status&&Array.isArray(r.messages)&&(a={...r},a[T]=r,a.details=r.messages)),!a&&!t.ok)throw a=new Error(`Unable to load ${t.url} status: ${t.status}`),a[T]=r,a;let s,u=null;a&&(i=Number(a.code),u=a.hasOwnProperty("subcode")?Number(a.subcode):null,s=a.messageCode,s=s?.toUpperCase());const l=n.authMode;if(403===i&&(4===u||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==l||498===i)&&void 0!==i&&y.includes(i)&&!C(e.params.url)&&(403!==i||s&&!g.includes(s)&&(null==u||2===u&&e.credentialToken))){await I();try{const t=await o.id.getCredential(e.params.url,{error:v("request:server",a,e.params),prompt:"no-prompt"!==l,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===l)return e.credential=void 0,e.credentialToken=void 0,!1;a=t}}if(a)throw a;return!0}function U(e,t,r=!1){const n=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=m.priority,o.src=e,(0,d.fY)(o,e,r,n)}h._abortableFetch=null,h._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>a});var n=r(81271);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function a(e){const t=(0,n.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>f,Tf:()=>c,fY:()=>s,jH:()=>d,jz:()=>h});var n=r(68773),o=r(80442),a=r(95330),i=r(81271);function s(e,t,r=!1,n){return new Promise(((i,s)=>{if((0,a.Hc)(n))return void s(u());let l=()=>{d(),s(new Error(`Unable to load ${t}`))},c=()=>{const t=e;d(),i(t)},f=()=>{if(!e)return;const t=e;d(),t.src="",s(u())};const d=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",c)),l=null,c=null,e=null,null!=n&&n.removeEventListener("abort",f),f=null,r&&URL.revokeObjectURL(t)};null!=n&&n.addEventListener("abort",f),(0,o.Z)("esri-image-decode")?e.decode().then(c,l):(e.addEventListener("error",l),e.addEventListener("load",c))}))}function u(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const l="Timeout exceeded";function c(){return new Error(l)}function f(e){n.default.request.crossOriginNoCorsDomains||(n.default.request.crossOriginNoCorsDomains={});const t=n.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,i.P$)(r)??""]=0:(t[(0,i.P$)("http://"+r)??""]=0,t[(0,i.P$)("https://"+r)??""]=0)}function d(e){const t=n.default.request.crossOriginNoCorsDomains;if(t){let r=(0,i.P$)(e);if(r)return r=r.toLowerCase(),!(0,i.D6)(r,(0,i.TI)())&&t[r]<Date.now()-36e5}return!1}async function h(e){const t=n.default.request.crossOriginNoCorsDomains,r=(0,i.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const o=(0,i.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},90447:(e,t,r)=>{r.r(t),r.d(t,{default:()=>O});var n=r(67676),o=r(1533),a=r(51305),i=r(37140),s=r(17896),u=r(72119),l=r(44547),c=r(82971),f=(r(80442),r(23030)),d=r(14008),h=r(46329),p=r(91891),m=r(25683);function b(e,t,r){return null!=e&&e.attributeInfo.useElevation?t?function(e,t){const r=new Float64Array(t);for(let n=0;n<t;n++)r[n]=e[3*n+2];return r}(t,r):null:null!=e&&e.attributeInfo.storageInfo?(0,p.qM)(e.attributeInfo.storageInfo,e.buffer,r):null}function y(e,t,r,n,o){const a=e.length/3;let i=0;for(let s=0;s<a;s++){let a=!0;for(let e=0;e<n.length&&a;e++){const{filterJSON:t}=n[e],r=o[e].values[s];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(r)===e&&(a=!1);break}case"pointCloudBitfieldFilter":{const e=w(t.requiredSetBits),n=w(t.requiredClearBits);(r&e)===e&&0==(r&n)||(a=!1);break}case"pointCloudReturnFilter":{const e=15&r,n=r>>>4&15,o=n>1,i=1===e,s=e===n;let u=!1;for(const e of t.includedReturns)if("last"===e&&s||"firstOfMany"===e&&i&&o||"lastOfMany"===e&&s&&o||"single"===e&&!o){u=!0;break}u||(a=!1);break}}}a&&(r[i]=s,e[3*i]=e[3*s],e[3*i+1]=e[3*s+1],e[3*i+2]=e[3*s+2],t[3*i]=t[3*s],t[3*i+1]=t[3*s+1],t[3*i+2]=t[3*s+2],i++)}return i}function g(e){switch(e){default:case null:case"none":return e=>e;case"low-four-bit":return e=>15&e;case"high-four-bit":return e=>(240&e)>>4;case"absolute-value":return e=>Math.abs(e);case"modulo-ten":return e=>e%10}}function w(e){let t=0;for(const r of e||[])t|=1<<r;return t}class M{transform(e){const t=this._transform(e),r=[t.points.buffer,t.rgb.buffer];null!=t.pointIdFilterMap&&r.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.eP)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&r.push(e.values.buffer);return Promise.resolve({result:t,transferList:r})}_transform(e){const t=function(e,t){if(null==e.encoding||""===e.encoding){const r=(0,p.W7)(t,e);if(null==r.vertexAttributes.position)return;const n=(0,p.I_)(t,r.vertexAttributes.position),o=r.header.fields,a=[o.offsetX,o.offsetY,o.offsetZ],i=[o.scaleX,o.scaleY,o.scaleZ],s=n.length/3,u=new Float64Array(3*s);for(let e=0;e<s;e++)u[3*e]=n[3*e]*i[0]+a[0],u[3*e+1]=n[3*e+1]*i[1]+a[1],u[3*e+2]=n[3*e+2]*i[2]+a[2];return u}if("lepcc-xyz"===e.encoding)return(0,m.Gi)(t).result}(e.schema,e.geometryBuffer);let r=t.length/3,o=null;const a=new Array,i=b(e.primaryAttributeData,t,r);null!=e.primaryAttributeData&&i&&a.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:i});const s=b(e.modulationAttributeData,t,r);null!=e.modulationAttributeData&&s&&a.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:s});let u=function(e,t,r,n){const{rendererJSON:o,isRGBRenderer:a}=e;let i=null,s=null;if(t&&a)i=t;else if(t&&"pointCloudUniqueValueRenderer"===o?.type){s=h.Z.fromJSON(o);const e=s.colorUniqueValueInfos;i=new Uint8Array(3*n);const r=g(s.fieldTransformType);for(let o=0;o<n;o++){const n=(r?r(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(n)){i[3*o]=e[t].color.r,i[3*o+1]=e[t].color.g,i[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o?.type){s=d.Z.fromJSON(o);const e=s.stops;i=new Uint8Array(3*n);const r=g(s.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o],a=e.length-1;if(n<e[0].value)i[3*o]=e[0].color.r,i[3*o+1]=e[0].color.g,i[3*o+2]=e[0].color.b;else if(n>=e[a].value)i[3*o]=e[a].color.r,i[3*o+1]=e[a].color.g,i[3*o+2]=e[a].color.b;else for(let t=1;t<e.length;t++)if(n<e[t].value){const r=(n-e[t-1].value)/(e[t].value-e[t-1].value);i[3*o]=e[t].color.r*r+e[t-1].color.r*(1-r),i[3*o+1]=e[t].color.g*r+e[t-1].color.g*(1-r),i[3*o+2]=e[t].color.b*r+e[t-1].color.b*(1-r);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o?.type){s=f.Z.fromJSON(o);const e=s.colorClassBreakInfos;i=new Uint8Array(3*n);const r=g(s.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o];for(let t=0;t<e.length;t++)if(n>=e[t].minValue&&n<=e[t].maxValue){i[3*o]=e[t].color.r,i[3*o+1]=e[t].color.g,i[3*o+2]=e[t].color.b;break}}}else i=new Uint8Array(3*n).fill(255);if(r&&s&&s.colorModulation){const e=s.colorModulation.minValue,t=s.colorModulation.maxValue,o=.3;for(let a=0;a<n;a++){const n=r[a],s=n>=t?1:n<=e?o:o+(1-o)*(n-e)/(t-e);i[3*a]=s*i[3*a],i[3*a+1]=s*i[3*a+1],i[3*a+2]=s*i[3*a+2]}}return i}(e.rendererInfo,i,s,r);if(e.filterInfo&&e.filterInfo.length>0&&null!=e.filterAttributesData){const i=e.filterAttributesData.filter(n.pC).map((e=>{const n=b(e,t,r),o={attributeInfo:e.attributeInfo,values:n};return a.push(o),o}));o=new Uint32Array(r),r=y(t,u,o,e.filterInfo,i)}for(const n of e.userAttributesData){const e=b(n,t,r);a.push({attributeInfo:n.attributeInfo,values:e})}3*r<u.length&&(u=new Uint8Array(u.buffer.slice(0,3*r))),this._applyElevationOffsetInPlace(t,r,e.elevationOffset);const l=this._transformCoordinates(t,r,e.obb,c.Z.fromJSON(e.inSR),c.Z.fromJSON(e.outSR));return{obb:e.obb,points:l,rgb:u,attributes:a,pointIdFilterMap:o}}_transformCoordinates(e,t,r,n,o){if(!(0,l.projectBuffer)(e,n,0,e,o,0,t))throw new Error("Can't reproject");const i=(0,u.f)(r.center[0],r.center[1],r.center[2]),c=(0,u.b)(),f=(0,u.b)();(0,a.a)(T,r.quaternion);const d=new Float32Array(3*t);for(let n=0;n<t;n++)c[0]=e[3*n]-i[0],c[1]=e[3*n+1]-i[1],c[2]=e[3*n+2]-i[2],(0,s.y)(f,c,T),r.halfSize[0]=Math.max(r.halfSize[0],Math.abs(f[0])),r.halfSize[1]=Math.max(r.halfSize[1],Math.abs(f[1])),r.halfSize[2]=Math.max(r.halfSize[2],Math.abs(f[2])),d[3*n]=c[0],d[3*n+1]=c[1],d[3*n+2]=c[2];return d}_applyElevationOffsetInPlace(e,t,r){if(0!==r)for(let n=0;n<t;n++)e[3*n+2]+=r}}const T=(0,i.b)();function O(){return new M}},91891:(e,t,r)=>{r.d(t,{I_:()=>d,W7:()=>m,qM:()=>y});var n=r(20102),o=r(22974),a=r(92604),i=r(25683),s=r(35065);const u=a.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function l(e,t,r){let o="",a=0;for(;a<r;){const i=e[t+a];if(i<128)o+=String.fromCharCode(i),a++;else if(i>=192&&i<224){if(a+1>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const s=(31&i)<<6|63&e[t+a+1];o+=String.fromCharCode(s),a+=2}else if(i>=224&&i<240){if(a+2>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(15&i)<<12|(63&e[t+a+1])<<6|63&e[t+a+2];o+=String.fromCharCode(s),a+=3}else{if(!(i>=240&&i<248))throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(a+3>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(7&i)<<18|(63&e[t+a+1])<<12|(63&e[t+a+2])<<6|63&e[t+a+3];if(s>=65536){const e=55296+(s-65536>>10),t=56320+(1023&s);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(s);a+=4}}}return o}function c(e,t){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let o=0;o<t.length;o++){const a=t[o],i=a.valueType||a.type,s=w[i];r.fields[a.property]=s(e,n),n+=g[i].BYTES_PER_ELEMENT}return r.byteCount=n,r}function f(e,t,r){const o=[];let a,i,s=0;for(i=0;i<e;i+=1){if(a=t[i],a>0){if(o.push(l(r,s,a-1)),0!==r[s+a-1])throw new n.Z("string-array-error","Invalid string array: missing null termination.")}else o.push(null);s+=a}return o}function d(e,t){return new(0,g[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function h(e,t,r){const a=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:r}},i={header:a,byteOffset:a.byteCount,byteCount:0,entries:Object.create(null)};let s=a.byteCount;for(let e=0;e<t.ordering.length;e++){const r=t.ordering[e],u=(0,o.d9)(t[r]);if(u.count=a.fields.count??0,"String"===u.valueType){if(u.byteOffset=s,u.byteCount=a.fields[r+"ByteCount"],"UTF-8"!==u.encoding)throw new n.Z("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new n.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!M(u.valueType))throw new n.Z("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const e=T(u.valueType);s+=s%e!=0?e-s%e:0,u.byteOffset=s,u.byteCount=e*u.valuesPerElement*u.count}}s+=u.byteCount??0,i.entries[r]=u}return i.byteCount=s-i.byteOffset,i}function p(e,t,r){if(t!==e&&u.error(`Invalid ${r} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new n.Z("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function m(e,t){const r=c(e,t&&t.header);let n=r.byteCount;const o={isDraco:!1,header:r,byteOffset:r.byteCount,byteCount:0,vertexAttributes:{}},a=r.fields,i=null!=a.vertexCount?a.vertexCount:a.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const r={...t.vertexAttributes[e],byteOffset:n,count:i},a=b[e]||"_"+e;o.vertexAttributes[a]=r,n+=T(r.valueType)*r.valuesPerElement*i}const s=a.faceCount;if(t.faces&&s){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const r={...t.faces[e],byteOffset:n,count:s};o.faces[e]=r,n+=T(r.valueType)*r.valuesPerElement*s}}const u=a.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&u){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const r={...t.featureAttributes[e],byteOffset:n,count:u};o.featureAttributes[e]=r,n+=("UInt64"===r.valueType?8:T(r.valueType))*r.valuesPerElement*u}}return p(n,e.byteLength,"geometry"),o.byteCount=n-o.byteOffset,o}const b={position:s.T.POSITION,normal:s.T.NORMAL,color:s.T.COLOR,uv0:s.T.UV0,region:s.T.UVREGION};function y(e,t,r){if("lepcc-rgb"===e.encoding)return(0,i.IT)(t);if("lepcc-intensity"===e.encoding)return(0,i.ti)(t);if(null!=e.encoding&&""!==e.encoding)throw new n.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(u.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(u.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const o=h(t,e,r);p(o.byteOffset+o.byteCount,t.byteLength,"attribute");const a=o.entries.attributeValues||o.entries.objectIds;if(a){if("String"===a.valueType){const e=o.entries.attributeByteCounts,r=d(t,e),n=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,a);return a.timeEncoding?function(e,t,r){return f(e,t,r).map((e=>{const t=e?Date.parse(e):null;return t&&!Number.isNaN(t)?t:null}))}(e.count,r,n):f(e.count,r,n)}return d(t,a)}throw new n.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const g={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function M(e){return g.hasOwnProperty(e)}function T(e){return M(e)?g[e].BYTES_PER_ELEMENT:0}},25683:(e,t,r)=>{r.d(t,{Gi:()=>l,IT:()=>p,ti:()=>y});var n=r(20102);const o=!0,a={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function i(e,t,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,r+a.identifierOffset,a.identifierLength)),version:t.getUint16(r+a.versionOffset,o),checksum:t.getUint32(r+a.checksumOffset,o)}}const s={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(e,t){return{sizeLo:e.getUint32(t+s.sizeLo,o),sizeHi:e.getUint32(t+s.sizeHi,o),minX:e.getFloat64(t+s.minX,o),minY:e.getFloat64(t+s.minY,o),minZ:e.getFloat64(t+s.minZ,o),maxX:e.getFloat64(t+s.maxX,o),maxY:e.getFloat64(t+s.maxY,o),maxZ:e.getFloat64(t+s.maxZ,o),errorX:e.getFloat64(t+s.errorX,o),errorY:e.getFloat64(t+s.errorY,o),errorZ:e.getFloat64(t+s.errorZ,o),count:e.getUint32(t+s.count,o),reserved:e.getUint32(t+s.reserved,o)}}function l(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:l}=i(e,t,r);if(r+=a.byteCount,"LEPCC "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(l>1)throw new n.Z("lepcc-decode-error","Unknown version");const f=u(t,r);if(r+=s.byteCount,f.sizeHi*2**32+f.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),h=[],p=[],m=[],b=[];if(r=c(e,r,h),r=c(e,r,p),r=c(e,r,m),r=c(e,r,b),r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad length");let y=0,g=0;for(let e=0;e<h.length;e++){g+=h[e];let t=0;for(let r=0;r<p[e];r++){t+=m[y];const e=b[y];d[3*y]=Math.min(f.maxX,f.minX+2*f.errorX*t),d[3*y+1]=Math.min(f.maxY,f.minY+2*f.errorY*g),d[3*y+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*e),y++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function c(e,t,r){const n=[];t=f(e,t,n);const o=[];for(let a=0;a<n.length;a++){o.length=0,t=f(e,t,o);for(let e=0;e<o.length;e++)r.push(o[e]+n[a])}return t}function f(e,t,r){const a=new DataView(e,t),i=a.getUint8(0),s=31&i,u=!!(32&i),l=(192&i)>>6;let c=0;if(0===l)c=a.getUint32(1,o),t+=5;else if(1===l)c=a.getUint16(1,o),t+=3;else{if(2!==l)throw new n.Z("lepcc-decode-error","Bad count type");c=a.getUint8(1),t+=2}if(u)throw new n.Z("lepcc-decode-error","LUT not implemented");const f=Math.ceil(c*s/8),d=new Uint8Array(e,t,f);let h=0,p=0,m=0;const b=-1>>>32-s;for(let e=0;e<c;e++){for(;p<s;)h|=d[m]<<p,p+=8,m+=1;r[e]=h&b,h>>>=s,p-=s,p+s>32&&(h|=d[m-1]>>8-p)}return t+m}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function p(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:s}=i(e,t,r);if(r+=a.byteCount,"ClusterRGB"!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(s>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=h(t,r);if(r+=d.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+r!==e.byteLength||u.colorMapCount>256)throw new n.Z("lepcc-decode-error","Bad count");const t=new Uint8Array(e,r,3*u.colorMapCount),o=new Uint8Array(e,r+3*u.colorMapCount,u.count),a=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++){const r=o[e];a[3*e]=t[3*r],a[3*e+1]=t[3*r+1],a[3*e+2]=t[3*r+2]}return a}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+r!==e.byteLength||0!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");return new Uint8Array(e,r).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(r+3!==e.byteLength||1!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");const o=t.getUint8(r),a=t.getUint8(r+1),i=t.getUint8(r+2),s=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++)s[3*e]=o,s[3*e+1]=a,s[3*e+2]=i;return s}throw new n.Z("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const m={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function b(e,t){return{sizeLo:e.getUint32(t+m.sizeLo,o),sizeHi:e.getUint32(t+m.sizeHi,o),count:e.getUint32(t+m.count,o),scaleFactor:e.getUint16(t+m.scaleFactor,o),bitsPerPoint:e.getUint8(t+m.bitsPerPoint),reserved:e.getUint8(t+m.reserved)}}function y(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:s}=i(e,t,r);if(r+=a.byteCount,"Intensity "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(s>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=b(t,r);if(r+=m.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const l=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint8Array(e,r,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint16Array(e,r,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else{const t=[];if(f(e,r,t)!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}return l}},35065:(e,t,r)=>{var n;r.d(t,{T:()=>n}),function(e){e.POSITION="position",e.NORMAL="normal",e.NORMALCOMPRESSED="normalCompressed",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.INSTANCEMODELORIGINHI="instanceModelOriginHi",e.INSTANCEMODELORIGINLO="instanceModelOriginLo",e.INSTANCEMODEL="instanceModel",e.INSTANCEMODELNORMAL="instanceModelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude",e.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",e.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(n||(n={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4166],{16453:(e,t,r)=>{r.d(t,{R:()=>_,w:()=>m});var s=r(43697),i=r(92036),o=r(41103),n=r(22974),a=r(31263);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.d9)(e),a.s3.DEFAULTS)}));for(let r=a.s3.SERVICE;r<a.kk;r++){const s=this._originStores[r];s&&s.forEach(((s,i)=>{e&&e.has(i)||t.set(i,(0,n.d9)(s),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.s3.USER){let s=this._originStores[r];if(s||(s=new Map,this._originStores[r]=s),s.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const s=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),s!==t}return!1}delete(e,t=a.s3.USER){const r=this._originStores[t];if(!r)return;const s=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return s}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],s=r&&r.get(e),i=this._values.get(e);return this._values.set(e,s),this._propertyOriginMap.set(e,t),i!==s}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(50549),p=r(1153),h=r(52011);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.vw)(this),r=t.store,s=new l;t.store=s,(0,o.M)(t,r,s)}read(e,t){(0,u.i)(this,e,t)}getAtOrigin(e,t){const r=c(this),s=(0,a.M9)(t);if("string"==typeof e)return r.get(e,s);const i={};return e.forEach((e=>{i[e]=r.get(e,s)})),i}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return c(this).originOf(e)}revert(e,t){const r=c(this),s=(0,a.M9)(t),i=(0,p.vw)(this);let o;o="string"==typeof e?"*"===e?r.keys(s):[e]:e,o.forEach((e=>{i.invalidate(e),r.revert(e,s),i.commit(e)}))}};return t=(0,s._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function c(e){return(0,p.vw)(e).store}let g=class extends(d(i.Z)){};g=(0,s._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],g);var f=r(76169);const y=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.M9)(t))}write(e,t){return(0,f.c)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.vw)(this).setAtOrigin(e,t,(0,a.M9)(r))}removeOrigin(e){const t=v(this),r=(0,a.M9)(e),s=t.keys(r);for(const e of s)t.originOf(e)===r&&t.set(e,t.get(e,r),a.s3.USER)}updateOrigin(e,t){const r=v(this),s=(0,a.M9)(t),i=this.get(e);for(let t=s+1;t<a.kk;++t)r.delete(e,t);r.set(e,i,s)}toJSON(e){return this.write({},e)}};return t=(0,s._)([(0,h.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,p.vw)(e).store}const _=e=>{let t=class extends(y(d(e))){constructor(...e){super(...e)}};return t=(0,s._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],t),t};let m=class extends(_(i.Z)){};m=(0,s._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],m)},44166:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var s=r(43697),i=r(20102),o=r(16453),n=r(1654),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),u=r(87085),p=r(16859);let h=class extends((0,p.I)((0,o.R)(u.Z))){constructor(e){super(e),this.resourceInfo=null,this.type="unknown"}initialize(){this.addResolvingPromise(new Promise(((e,t)=>{(0,n.Os)((()=>{const e=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let r="Unknown layer type";e&&(r+=" "+e),t(new i.Z("layer:unknown-layer-type",r,{layerType:e}))}))})))}read(e,t){super.read({resourceInfo:e},t)}write(e,t){return null}};(0,s._)([(0,a.Cb)({readOnly:!0})],h.prototype,"resourceInfo",void 0),(0,s._)([(0,a.Cb)({type:["show","hide"]})],h.prototype,"listMode",void 0),(0,s._)([(0,a.Cb)({json:{read:!1},readOnly:!0,value:"unknown"})],h.prototype,"type",void 0),h=(0,s._)([(0,l.j)("esri.layers.UnknownLayer")],h);const d=h},16859:(e,t,r)=>{r.d(t,{I:()=>I});var s=r(43697),i=r(68773),o=r(40330),n=r(3172),a=r(66643),l=r(20102),u=r(92604),p=r(95330),h=r(81271),d=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),g=r(52011),f=r(30556),y=r(84230),v=r(48522),_=r(15235),m=r(86082),w=r(14661);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:s}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===r.id;if(s&&r.portal.user)return(0,w.Ss)(r);let i,n;if(s)i=r.portal.url;else try{i=await(0,y.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!i||!(0,h.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await r.reload():(r=new _.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,w.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=O.credential===t?O.user:await this._fetchEditingUser(e);return O.credential=t,O.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=v.Z.getDefault();if(i&&i.loaded&&(0,h.Fv)(i.restUrl)===(0,h.Fv)(s))return i.user;const l=`${s}/community/self`,u=null!=e?e.signal:null,p=await(0,a.q6)((0,n.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?m.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return r&&s&&!(0,h.tm)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,d.Cb)({type:_.default})],t.prototype,"portalItem",null),(0,s._)([(0,c.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,g.j)("esri.layers.mixins.PortalLayer")],t),t},O={credential:null,user:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[223],{91303:(e,t,i)=>{var l;i.d(t,{Y:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},17287:(e,t,i)=>{i.d(t,{Y:()=>n});var l=i(43697),r=i(92604),s=i(5600),a=(i(75215),i(67676),i(80442),i(52011)),o=i(66677);const n=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Nm)(e,r.Z.getLogger(this)))}};return(0,l._)([(0,s.Cb)()],t.prototype,"title",null),(0,l._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,l._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>b});var l=i(43697),r=i(68773),s=i(40330),a=i(3172),o=i(66643),n=i(20102),h=i(92604),c=i(95330),p=i(81271),u=i(5600),d=(i(75215),i(67676),i(80442),i(71715)),f=i(52011),m=i(30556),v=i(84230),y=i(48522),g=i(15235),w=i(86082),_=i(14661);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:l}=await i.e(8062).then(i.bind(i,18062));return(0,c.k_)(t),await l({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!r.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:l},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",l),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const l=e===i.id;if(l&&i.portal.user)return(0,_.Ss)(i);let r,a;if(l)r=i.portal.url;else try{r=await(0,v.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!r||!(0,p.Zo)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await i.reload():(i=new g.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return(0,_.Ss)(i)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const l=`${i.owningSystemUrl}/sharing/rest`,r=y.Z.getDefault();if(r&&r.loaded&&(0,p.Fv)(r.restUrl)===(0,p.Fv)(l))return r.user;const n=`${l}/community/self`,h=null!=e?e.signal:null,c=await(0,o.q6)((0,a.default)(n,{authMode:"no-prompt",query:{f:"json"},signal:h}));return c.ok?w.default.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,l=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||y.Z.getDefault());return i&&l&&!(0,p.tm)(l.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,l._)([(0,u.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,l._)([(0,d.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,l._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,l._)([(0,u.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,l._)([(0,u.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,l._)([(0,u.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,l._)([(0,u.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,l._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},39450:(e,t,i)=>{i.d(t,{Z:()=>c});var l,r=i(43697),s=i(96674),a=i(5600),o=i(75215),n=(i(67676),i(80442),i(52011));let h=l=class extends s.wq{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 l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,a.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,r._)([(0,a.Cb)({type:o.z8,json:{write:!0}})],h.prototype,"level",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,r._)([(0,a.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,r._)([(0,a.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=l=(0,r._)([(0,n.j)("esri.layers.support.LOD")],h);const c=h},11145:(e,t,i)=>{i.d(t,{Z:()=>P});var l,r=i(43697),s=i(35454),a=i(96674),o=i(67900),n=i(5600),h=i(75215),c=(i(67676),i(80442),i(71715)),p=i(52011),u=i(30556),d=i(94139),f=i(82971),m=i(24470),v=i(8744),y=i(40488),g=i(39450),w=i(43077);const _=new s.X({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",pbf:"pbf"});let b=l=class extends a.wq{static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:s=f.Z.WebMercator,numLODs:a=24}=e;if(!(0,v.JY)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new g.Z({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=a-1;i>=0;i--)e.unshift(new g.Z({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new d.Z(0,0,s),size:[r,r],spatialReference:s})}const n=(0,v.C5)(s),h=e.origin?new d.Z({x:e.origin.x,y:e.origin.y,spatialReference:s}):new d.Z(n?{x:n.origin[0],y:n.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),c=1/(39.37*(0,o.c9)(s)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*c;p.push(new g.Z({level:e,scale:t,resolution:l}))}else{let e=(0,v.sT)(s)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(a/t);p.push(new g.Z({level:0,scale:e,resolution:e*c}));for(let l=1;l<i;l++){const i=e/2**t,r=i*c;p.push(new g.Z({level:l,scale:i,resolution:r})),e=i}}return new l({dpi:96,lods:p,origin:h,size:[r,r],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,v.C5)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return d.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e}))),this._set("scales",l),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){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],r=t[l+1];if(i<=e)return l;if(r===e)return l+1;if(i>e&&r<e)return l+Math.log(i/e)/Math.log(i/r)}return l}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,l){const r=this.lodAt(e);if(!r)return null;let s,a;if("number"==typeof t)s=t,a=i;else if((0,v.fS)(t.spatialReference,this.spatialReference))s=t.x,a=t.y,l=i;else{const e=(0,y.iV)(t,this.spatialReference);if(null==e)return null;s=e.x,a=e.y,l=i}const o=r.resolution*this.size[0],n=r.resolution*this.size[1];return l||(l=new w.f(null,0,0,0,(0,m.Ue)())),l.level=e,l.row=Math.floor((this.origin.y-a)/n+.001),l.col=Math.floor((s-this.origin.x)/o+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const r=e.level-i.level,s=i.resolution*this.size[0]/2**r,a=i.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.Ue)()),e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*a,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+a}upsampleTile(e){const 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){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,r=l*this.size[0],s=l*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+r,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],r=this.lods.length;for(let e=0;e<r;e++){const l=this.lods[e],r=l.resolution*t;i.push(new g.Z({level:l.level,scale:l.scale,resolution:r}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var I,O;(0,r._)([(0,n.Cb)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,r._)([(0,n.Cb)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,r._)([(0,n.Cb)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,r._)([(0,n.Cb)({readOnly:!0})],b.prototype,"isWrappable",null),(0,r._)([(0,n.Cb)({type:d.Z,json:{write:!0}})],b.prototype,"origin",void 0),(0,r._)([(0,c.r)("origin")],b.prototype,"readOrigin",null),(0,r._)([(0,n.Cb)({type:[g.Z],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,r._)([(0,n.Cb)({readOnly:!0})],b.prototype,"scales",void 0),(0,r._)([(0,n.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,r._)([(0,c.r)("size",["rows","cols"])],b.prototype,"readSize",null),(0,r._)([(0,u.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],b.prototype,"writeSize",null),(0,r._)([(0,n.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=l=(0,r._)([(0,p.j)("esri.layers.support.TileInfo")],b),(O=(I=b||(b={})).ExtrapolateOptions||(I.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO";const P=b},43077:(e,t,i)=>{i.d(t,{f:()=>l});class l{constructor(e,t,i,l,r=void 0){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=r}}},28589:(e,t,i)=>{i.d(t,{y:()=>P});var l,r=i(43697),s=i(3172),a=i(92036),o=i(91303),n=i(20102),h=i(50758),c=i(13867),p=i(44553),u=i(95330),d=i(17445),f=i(1654),m=i(81271),v=i(5600),y=(i(75215),i(67676)),g=(i(80442),i(52011)),w=i(43077),_=i(22974),b=i(1533);class I{constructor(e){this._validateJSON(e);const{location:t,data:i}=e;this.location=Object.freeze((0,_.d9)(t));const l=this.location.width,r=this.location.height;let s=!0,a=!0;const o=function(e,t=!1){return e<=b.DB?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*r/32));let n=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[n]|=1<<t):s=!1,31===t&&++n}a?(this._availability="unavailable",this.byteSize=40):s?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,b.Xw)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,r=i>>5,s=this._availability;return r<0||r>s.length?"unknown":s[r]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||s.default,{row:l,col:r,width:a,height:o}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){const 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}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:l,left:r,width:a,height:o},valid:!0,data:(0,y.a9)(a*o,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==l||e.location.left!==r||e.location.width!==a||e.location.height!==o))throw new n.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:r,width:a,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}_validateJSON(e){if(!e||!e.location)throw new n.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new n.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new n.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new n.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new n.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function O(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let P=l=class extends a.Z{constructor(e){super(e),this._pendingTilemapRequests={},this.request=s.default,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.z(2*o.Y.MEGABYTES),this.addHandles([(0,d.YP)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),d.nn)])}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}fetchTilemap(e,t,i,l){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new n.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,r);if(s)return Promise.resolve(s);const a=l&&l.signal;return l={...l,signal:null},new Promise(((e,t)=>{(0,u.fu)(a,(()=>t((0,u.zE)())));const i=O(r);let s=this._pendingTilemapRequests[i];if(!s){s=I.fromDefinition(r,l).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>delete this._pendingTilemapRequests[i];this._pendingTilemapRequests[i]=s,s.then(e,e)}s.then(e,t)}))}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(new n.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):this.fetchTilemap(e,t,i,l).catch((e=>e)).then((l=>{if(l instanceof I){const r=l.getAvailability(t,i);if("unavailable"===r)throw new n.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return r}if((0,u.D_)(l))throw l;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,l,r){l.level=e,l.row=t,l.col=i;const s=this.layer.tileInfo;s.updateTileInfo(l);const a=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,u.D_)(e))throw e;if(s.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,r,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,s,a){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const n=new AbortController;a.then((()=>n.abort()),(()=>n.abort()));let c=!1;const p=(0,h.kB)((()=>{c||(c=!0,n.abort())}));if(this.addHandles(p,o),await(0,f.MU)(10,n.signal).catch((()=>{})),c||(c=!0,this.removeHandles(o)),(0,u.Hc)(n))return;const d=new w.f(e,t,i,r),m={...s,signal:n.signal},v=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&v.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,m);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.B7)({...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,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const r=O(l);return this._tilemapCache.get(r)}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,l)=>!!e._tilemapFromCache(t,i,l,e._tmpTilemapDefinition)}}};P._maxPrefetch=4,P._prefetches=new p.Z({initialSize:l._maxPrefetch}),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"layer",void 0),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"minLOD",void 0),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"maxLOD",void 0),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"request",void 0),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"size",void 0),P=l=(0,r._)([(0,g.j)("esri.layers.support.TilemapCache")],P)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(e,t,s)=>{s.d(t,{Z:()=>y});var r,i=s(43697),l=s(96674),o=s(35463),n=s(5600),a=(s(75215),s(67676),s(80442),s(71715)),u=s(52011),h=s(30556);let c=r=class extends l.wq{static get allTime(){return p}static get empty(){return d}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,r=null!=e.start?e.start.getTime():e.start,i=null!=e.end?e.end.getTime():e.end;return t===r&&s===i}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,o.JE)(t,e));let s=this.end;if(s){const t=(0,o.JE)(s,e);s=s.getTime()===t.getTime()?t:(0,o.Nm)(t,1,e)}return new r({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;if(i>=t&&i<=s?o=i:t>=i&&t<=l&&(o=t),s>=i&&s<=l?n=s:l>=t&&l<=s&&(n=l),null!=o&&null!=n&&!isNaN(o)&&!isNaN(n)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=n===1/0?null:new Date(n),e}return r.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:i,end:l}=this;return null!=i&&(s.start=(0,o.Nm)(i,e,t)),null!=l&&(s.end=(0,o.Nm)(l,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:s})}};(0,i._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,i._)([(0,h.c)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,i._)([(0,h.c)("start")],c.prototype,"writeStart",null),c=r=(0,i._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,d=new c({start:void 0,end:void 0}),y=c},13867:(e,t,s)=>{s.d(t,{z:()=>i});var r=s(69801);class i{constructor(e,t){this._storage=new r.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,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(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>n,Xq:()=>o});var r,i,l=s(44553);(i=r||(r={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,s,r=0){this._storage.put(this,e,t,s,r)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.Z,this._users=new l.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,s,i,l){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,r.ALL)),i>this._maxSize)return void this._notifyRemove(t,s,r.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn("Refusing to cache entry with invalid size "+i);const n=1+Math.max(l,-3)- -3;this._db.set(t,{entry:s,size:i,lifetime:n,lives:n}),this._size+=i,e.size+=i,this._checkSizeLimits()}updateSize(e,t,s,i){t=e.id+t;const l=this._db.get(t);if(l&&l.entry===s){for(this._size-=l.size,e.size-=l.size;i>this._maxSize;){const e=this._notifyRemove(t,s,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}l.size=i,this._size+=i,e.size+=i,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,r)=>{const i=e.lifetime;s[i]=(s[i]||0)+e.size,this._users.forAll((s=>{const{id:i,name:l}=s;if(r.startsWith(i)){const s=t[l]||0;t[l]=s+e.size}}))}));const r={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[s]||0;t[s]=i,r[s]=Math.round(100*e.hitRate)+"%"}else r[s]="0%"}));const i=Object.keys(t);i.sort(((e,s)=>t[s]-t[e])),i.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+r[s]));for(let t=s.length-1;t>=0;--t){const r=s[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let r;return this._removeFuncs.some((i=>{if(e.startsWith(i[0])){const e=i[1](t,s);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,s]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,s,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,r.SOME);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},17445:(e,t,s)=>{s.d(t,{N1:()=>p,YP:()=>a,Z_:()=>m,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g});var r=s(91460),i=s(50758),l=s(70586),o=s(95330),n=s(26258);function a(e,t,s={}){return h(e,t,s,d)}function u(e,t,s={}){return h(e,t,s,y)}function h(e,t,s={},r){let i=null;const o=s.once?(e,s)=>{r(e)&&((0,l.hw)(i),t(e,s))}:(e,s)=>{r(e)&&t(e,s)};if(i=(0,n.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return i}function c(e,t,s,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(e){o.once&&o.once&&(0,l.hw)(h),s(e)}const d=a(e,((e,s)=>{c(),(0,r.vT)(e)&&(n=e,u=(0,r.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,i.kB)((()=>{d.remove(),c()})),h}function p(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let n=null;function a(){n=(0,l.hw)(n)}return new Promise(((r,l)=>{n=(0,i.AL)([(0,o.fu)(s,(()=>{a(),l((0,o.zE)())})),h(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??d)])}))}(e,y,t)}function d(e){return!0}function y(e){return!!e}s(87538);const m={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,s)=>{s.d(t,{JE:()=>o,Nm:()=>l,rJ:()=>n}),s(80442);const r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function l(e,t,s){const r=new Date(e.getTime());if(t&&s){const e=i[s],{getter:l,setter:o,multiplier:n}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(r.getFullYear(),r.getMonth()+t);r.getDate()>e&&r.setDate(e)}r[o](r[l]()+t*n)}return r}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function n(e,t,s){return 0===e?0:e*r[t]/r[s]}},94756:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ce});var r=s(43697),i=s(3172),l=s(66643),o=s(20102),n=s(22974),a=s(16453),u=s(95330),h=s(81271),c=s(5600),p=(s(75215),s(71715)),d=s(52011),y=s(30556),m=s(6570),f=s(82971),g=s(87085),_=s(54295),w=s(46486),v=s(17287),S=s(71612),A=s(17017),x=s(38009),b=s(16859),T=s(72965);let E=null;var I=s(92604),R=s(1533);class z{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:s,data:r,json:i}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(i);if(!l||0===l.length||!r)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=t,this.height=s;const n=Math.max(this._maxTextureSize,4096);if(t>n||s>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw I.Z.getLogger("esri.layers.support.SpriteSource").error(e),new o.Z("SpriteSource",e)}let a;for(let e=0;e<r.length;e+=4)a=r[e+3]/255,r[e]=r[e]*a,r[e+1]=r[e+1]*a,r[e+2]=r[e+2]*a;this.image=r}async _getSpriteData(e,t){if("image"===e.type){let t,s;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.Z("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,s=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.Z("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,s=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,R.eP)(t.data)||(0,R.KZ)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:s}:{...L(t),json:s}}const s=(0,h.mN)(this.baseURL),r=s.query?"?"+(0,h.B7)(s.query):"",l=this._isRetina?"@2x":"",n=`${s.path}${l}.${this._spriteImageFormat}${r}`,a=`${s.path}${l}.json${r}`,[u,c]=await Promise.all([(0,i.default)(a,t),(0,i.default)(n,{responseType:"image",...t})]);return{...L(c.data),json:u.data}}}function L(e){const t=document.createElement("canvas"),s=t.getContext("2d");t.width=e.width,t.height=e.height,s.drawImage(e,0,0,e.width,e.height);const r=s.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(r.data)}}var C=s(11145),D=s(28589),O=s(55415);class U{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this.url).then((e=>e.data.index))),this._tileIndexPromise}async dataKey(e,t){const s=await this.fetchTileIndex();return(0,u.k_)(t),this._getIndexedDataKey(s,e)}_getIndexedDataKey(e,t){const s=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let r=t;for(;0!==r.level;)r=new O.Z(r.level-1,r.row>>1,r.col>>1,r.world),s.push(r);let i,l,o=e,n=s.pop();if(1===o)return n;for(;s.length;)if(i=s.pop(),l=(1&i.col)+((1&i.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=i;break}n=i,o=o[l]}return n}}var M=s(70586);class F{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,M.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this._tileIndexUrl,{query:{...e?.query}}).then((e=>e.data.index))),this._tileIndexPromise}dataKey(e,t){const{level:s,row:r,col:i}=e,l=new O.Z(e);return this._tilemap.fetchAvailabilityUpsample(s,r,i,l,t).then((()=>(l.world=e.world,l))).catch((e=>{if((0,u.D_)(e))throw e;return null}))}}var P=s(30175);class B{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const t=this._abortOptions;return t.push(e),(0,u.fu)(e,(()=>{t.every((e=>(0,u.Hc)(e)))&&this._abortController.abort()})),this._promise.then((e=>(0,n.d9)(e)))}async _makeRequest(e,t){const{data:s}=await(0,i.default)(e,{responseType:"array-buffer",signal:t});return s}}const k=new Map;function N(e,t){return(0,P.s1)(k,e,(()=>new B(e))).getData(t).then((t=>(k.delete(e),t))).catch((t=>{throw k.delete(e),t}))}class j{constructor(e,t,s){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.name=e,this.sourceUrl=t;const r=(0,h.mN)(this.sourceUrl),i=(0,n.d9)(s),l=i.tiles;if(r)for(let e=0;e<l.length;e++){const t=(0,h.mN)(l[e]);t&&((0,h.YP)(t.path)||(t.path=(0,h.v_)(r.path,t.path)),l[e]=(0,h.fl)(t.path,{...r.query,...t.query}))}this.tileServers=l;const o=s.capabilities&&s.capabilities.split(",").map((e=>e.toLowerCase().trim())),a=!0===s?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&s.hasOwnProperty("maxExportTilesCount")?s.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=C.Z.fromJSON(i.tileInfo);const p=s.tileMap?(0,h.fl)((0,h.v_)(r.path,s.tileMap),r.query??{}):null;u?(this.type="vector-tile",this.tilemap=new F(new D.y({layer:{parsedUrl:r,tileInfo:this.tileInfo},minLOD:i.minLOD??this.tileInfo.lods[0].level,maxLOD:i.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new U(p)),this.fullExtent=m.Z.fromJSON(s.fullExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return await(this.tilemap?.dataKey(e,t))??e}requestTile(e,t,s,r){return function(e,t,s,r,i){const l=(0,h.mN)(e),o=l.query;if(o)for(const[e,i]of Object.entries(o))switch(i){case"{x}":o[e]=r.toString();break;case"{y}":o[e]=s.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return N((0,h.fl)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,s.toString()).replaceAll(/\{x\}/gi,r.toString()),{...l.query}),i)}(this.tileServers[t%this.tileServers.length],e,t,s,r)}isCompatibleWith(e){const t=this.tileInfo,s=e.tileInfo;if(!t.spatialReference.equals(s.spatialReference))return!1;if(!t.origin.equals(s.origin))return!1;if(Math.round(t.dpi)!==Math.round(s.dpi))return!1;const r=t.lods,i=s.lods,l=Math.min(r.length,i.length);for(let e=0;e<l;e++){const t=r[e],s=i[e];if(t.level!==s.level||Math.round(t.scale)!==Math.round(s.scale))return!1}return!0}}function W(...e){let t;for(const s of e)if(null!=s)if((0,h.oC)(s)){if(t){const e=t.split("://")[0];t=e+":"+s.trim()}}else t=(0,h.YP)(s)?s:(0,h.v_)(t,s);return t?(0,h.Qj)(t):void 0}async function G(e,t,s,r,l){let o,n,a;if((0,u.k_)(l),"string"==typeof s){const e=(0,h.Fv)(s);a=await(0,i.default)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=s&&(a={data:s},o=s.jsonUrl||null,n=r);const c=a?.data;if(Z(c))return e.styleUrl=o||null,async function(e,t,s,r){const i=s?(0,h.Yd)(s):(0,h.L)();e.styleBase=i,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const s=t.sources.esri;s.url?await G(e,"esri",W(i,s.url),void 0,r):l.push(G(e,"esri",s,i,r))}for(const s of Object.keys(t.sources))"esri"!==s&&"vector"===t.sources[s].type&&(t.sources[s].url?l.push(G(e,s,W(i,t.sources[s].url),void 0,r)):t.sources[s].tiles&&l.push(G(e,s,t.sources[s],i,r)));await Promise.all(l)}(e,c,n,l);if(!Z(c))return e.sourceUrl?q(e,c,n,!1,t,l):(e.sourceUrl=o||null,q(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function Z(e){return!!e&&"sources"in e&&!!e.sources}async function q(e,t,s,r,i,l){const o=s?(0,h.Qj)(s)+"/":(0,h.L)(),n=function(e){if(e.hasOwnProperty("tileInfo"))return e;const t={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let s=78271.51696400007,r=295828763.7957775;const i=[],l=e.hasOwnProperty("minzoom")?+e.minzoom:0,o=e.hasOwnProperty("maxzoom")?+e.maxzoom:22;for(let e=0;e<=o;e++)e>=l&&i.push({level:e,scale:r,resolution:s}),s/=2,r/=2;return{capabilities:"TilesOnly",initialExtent:t,fullExtent:t,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:i,spatialReference:{wkid:102100}}}}(t),a=new j(i,(0,h.fl)(o,l?.query??{}),n);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(a))return;null!=a.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(a.fullExtent):t.fullExtent=a.fullExtent.clone()),t.tileInfo&&a.tileInfo&&t.tileInfo.lods.length<a.tileInfo.lods.length&&(t.tileInfo=a.tileInfo)}if(r&&(e.sourceBase=o,e.source=t,e.validatedSource=n,e.primarySourceName=i),e.sourceNameToSource[i]=a,!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?G(e,"",W(o,t.defaultStyles,"root.json"),void 0,l):G(e,"",t.defaultStyles,W(o,"root.json"),l)}}var Y=s(33516),$=s(19745),H=s(25929),K=s(94139),V=s(39450);const Q=1e-6;function J(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const s=e.origin,r=t.origin;if(Math.abs(s.x-r.x)>=Q||Math.abs(s.y-r.y)>=Q)return!1;let i,l;e.lods[0].scale>t.lods[0].scale?(i=e,l=t):(l=e,i=t);for(let e=i.lods[0].scale;e>=l.lods[l.lods.length-1].scale-Q;e/=2)if(Math.abs(e-l.lods[0].scale)<Q)return!0;return!1}function X(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const s=e.size[0],r=e.format,i=e.dpi,l=new K.Z({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,m=0;for(;d>c;)p.push(new V.Z({level:m,resolution:y,scale:d})),m++,d/=2,y/=2;return new C.Z({size:[s,s],dpi:i,format:r||"pbf",origin:l,lods:p,spatialReference:o})}var ee=s(51785),te=s(7575);let se,re;function ie(e){const t=(0,te.Sh)(e);for(;t.length>1;){const e=le(t.shift());if(e.available)return e}return le(t.shift())}function le(e){switch(e){case te.zO.WEBGL1:return se||(se=function(){const e=new ne,t=ue(te.zO.WEBGL1,e);return null==t||(e.supportsElementIndexUint=null!==t.getExtension("OES_element_index_uint"),e.supportsStandardDerivatives=null!==t.getExtension("OES_standard_derivatives"),e.supportsInstancedArrays=null!==t.getExtension("ANGLE_instanced_arrays"),e.supportsTextureFloat=null!==t.getExtension("OES_texture_float"),e.supportsTextureHalfFloat=null!==t.getExtension("OES_texture_half_float"),e.supportsColorBufferFloat=null!==t.getExtension("WEBGL_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=null!==t.getExtension("EXT_color_buffer_half_float")),e}()),se;case te.zO.WEBGL2:return re||(re=function(){const e=new ae,t=ue(te.zO.WEBGL2,e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}()),re}}class oe{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class ne extends oe{constructor(){super(...arguments),this.type=te.zO.WEBGL1}}class ae extends oe{constructor(){super(...arguments),this.type=te.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function ue(e,t){if(e===te.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||e===te.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const s=document.createElement("canvas");if(!s)return null;let r=(0,te.kr)(s,e,{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=(0,te.kr)(s,e),null!=r&&(t.majorPerformanceCaveat=!0)),null==r)return r;if(e===te.zO.WEBGL1){const e=r.getParameter(r.VERSION),s=e?.match(/^WebGL\s+([\d.]*)/);if(s){const e=parseFloat(s[1]);t.available=e>=.94}}else t.available=!0;t.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return i&&(t.supportsHighPrecisionFragment=i.precision>0),r}let he=class extends((0,S.h)((0,T.M)((0,w.Z)((0,v.Y)((0,x.q)((0,b.I)((0,A.N)((0,_.V)((0,a.R)(g.Z)))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.style=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.tilemapCache=null,this.type="vector-tile",this.url=null,this.showCollisionBoxes="none",this.path=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.r9).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,i.default)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:t},(0,Y.h)(this.portalItem))})).catch(u.r9).then((()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e&&e.serviceUrl&&(0,h.mN)(e.serviceUrl);if(!t)return null;const s=this._getDefaultAttribution(t.path);return s?(0,h.fl)(s,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.oC)(e)&&(e=`https:${e}`);const s=(0,$.a)(e);t.styleUrl=(0,H.e)(e,s)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new C.Z;if(e.length>1)for(let s=0;s<e.length;s++)J(t,e[s].tileInfo)&&(t=X(t,e[s].tileInfo));return t}readTilemapCache(e,t){const s=t.capabilities?.includes("Tilemap");return s?new D.y({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const s=ie("2d").maxTextureSize,r=this.currentStyleInfo?.spriteUrl?(0,h.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new z({type:"url",spriteUrl:r,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},s);await i.load(t),this._spriteSourceMap.set(e,i)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const s=ie("2d").maxTextureSize,r=e.spriteUrl,i=r?(0,h.fl)(r,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===e.type)return null;const l=new z(e,s);try{await l.load(t);const s=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(s,l),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.r9)(e)}return null}async loadStyle(e,t){const s=e||this.style||this.url;return this._loadingTask&&"string"==typeof s&&this.url===s||(this._loadingTask?.abort(),this._loadingTask=(0,l.vr)((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(s,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.d9)(this.styleRepository.getPaintProperties(e))}setPaintProperties(e,t){const s=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const r=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:s||r})}getStyleLayer(e){return(0,n.d9)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,n.d9)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,s){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const s=await async function(e,t){const s={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,i]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await G(s,"esri",e,i,t),{layerDefinition:s.validatedSource,url:r,serviceUrl:s.sourceUrl,style:s.style,styleUrl:s.styleUrl,spriteUrl:s.style.sprite&&W(s.styleBase,s.style.sprite),spriteFormat:s.spriteFormat,glyphsUrl:s.style.glyphs&&W(s.styleBase,s.style.glyphs),sourceNameToSource:s.sourceNameToSource,primarySourceName:s.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===s.spriteFormat&&(await function(e){if(E)return E;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return E=new Promise((e=>{const s=new Image;s.onload=()=>{s.onload=s.onerror=null,e(s.width>0&&s.height>0)},s.onerror=()=>{s.onload=s.onerror=null,e(!1)},s.src="data:image/webp;base64,"+t.lossy})),E}()||(s.spriteFormat="png")),this._set("currentStyleInfo",{...s}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",s.sourceNameToSource),this._set("primarySource",s.sourceNameToSource[s.primarySourceName]),this._set("styleRepository",new ee.Z(s.style)),this.read(s.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),s=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!t)return;const r=t[2]&&t[2].toLowerCase();if(!r)return;const i=t[1]||"";for(const e of s)if(e.toLowerCase().includes(r))return(0,h.Fv)(`//static.arcgis.com/attribution/Vector${i}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"attributionDataUrl",null),(0,r._)([(0,c.Cb)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,r._)([(0,c.Cb)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,r._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"currentStyleInfo",void 0),(0,r._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:m.Z})],he.prototype,"fullExtent",null),(0,r._)([(0,c.Cb)()],he.prototype,"style",void 0),(0,r._)([(0,c.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],he.prototype,"isReference",void 0),(0,r._)([(0,c.Cb)({type:["VectorTileLayer"]})],he.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"parsedUrl",null),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"serviceUrl",null),(0,r._)([(0,c.Cb)({type:f.Z,readOnly:!0})],he.prototype,"spatialReference",null),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"styleRepository",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"sourceNameToSource",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"primarySource",void 0),(0,r._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],he.prototype,"styleUrl",null),(0,r._)([(0,y.c)(["portal-item","web-document"],"styleUrl")],he.prototype,"writeStyleUrl",null),(0,r._)([(0,c.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:C.Z})],he.prototype,"tileInfo",null),(0,r._)([(0,c.Cb)()],he.prototype,"tilemapCache",void 0),(0,r._)([(0,p.r)("service","tilemapCache",["capabilities","tileInfo"])],he.prototype,"readTilemapCache",null),(0,r._)([(0,c.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],he.prototype,"type",void 0),(0,r._)([(0,c.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],he.prototype,"url",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"version",void 0),(0,r._)([(0,p.r)("version",["version","currentVersion"])],he.prototype,"readVersion",null),(0,r._)([(0,c.Cb)({type:String})],he.prototype,"showCollisionBoxes",void 0),(0,r._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),he=(0,r._)([(0,d.j)("esri.layers.VectorTileLayer")],he);const ce=he},54295:(e,t,s)=>{s.d(t,{V:()=>o});var r=s(43697),i=s(5600),l=(s(75215),s(67676),s(80442),s(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],t),t}},46486:(e,t,s)=>{s.d(t,{Z:()=>c});var r=s(43697),i=(s(66577),s(5600)),l=(s(75215),s(67676),s(80442),s(71715)),o=s(52011),n=s(11145),a=s(42238),u=s(28589),h=s(82971);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,s){const r=t.capabilities?.includes("Tilemap");let{minLOD:i,maxLOD:l,minScale:o,maxScale:h}=t;if(null==i&&null==l&&0!==o&&0!==h){const e=e=>Math.round(1e4*e)/1e4;o=e(o||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const s of t.tileInfo.lods){const t=e(s.scale);i=t>=o?s.level:i,l=t>=h?s.level:l}}if(r)return new u.y({layer:this,minLOD:i,maxLOD:l});if(t.tileInfo){const e=new n.Z;return e.read(t.tileInfo,s),new a.Z(e,i,l)}return null}};return(0,r._)([(0,i.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,i.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,l.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,i.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,l.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,i.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,i.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,r._)([(0,i.Cb)({type:n.Z})],t.prototype,"tileInfo",void 0),(0,r._)([(0,i.Cb)()],t.prototype,"tilemapCache",void 0),(0,r._)([(0,l.r)("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),(0,r._)([(0,i.Cb)()],t.prototype,"version",void 0),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},17017:(e,t,s)=>{s.d(t,{N:()=>o});var r=s(43697),i=s(5600),l=(s(75215),s(67676),s(80442),s(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,l.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},42238:(e,t,s)=>{s.d(t,{Z:()=>l});var r=s(20102),i=s(95330);class l{constructor(e,t=0,s=e.lods.length-1){this.tileInfo=e,this.minLOD=t,this.maxLOD=s}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,s){const r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?s>=r.cols[0]&&s<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,s,l){await(0,i.Yn)(l);const o=this.getAvailability(e,t,s);if("unavailable"===o)throw new r.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:s});return o}async fetchAvailabilityUpsample(e,t,s,r,l){await(0,i.Yn)(l),r.level=e,r.row=t,r.col=s;const o=this.tileInfo;return o.updateTileInfo(r),this.fetchAvailability(e,t,s,l).catch((e=>{if((0,i.D_)(e))throw e;if(o.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e}))}}},33516:(e,t,s)=>{s.d(t,{Y:()=>o,h:()=>l});var r=s(81271),i=s(48522);function l(e){return{origin:"portal-item",url:(0,r.mN)(e.itemUrl),portal:e.portal||i.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,r.mN)(e.itemUrl):null,portal:e.portal||i.Z.getDefault(),portalItem:e}}},55415:(e,t,s)=>{s.d(t,{Z:()=>i});var r=s(71143);class i{static getId(e,t,s,r){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${s}/${r}`}constructor(e,t,s,r){this.set(e,t,s,r)}get key(){return this}get id(){return this.toString()}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,s=63&this.level;return(3&this.world)<<30|t<<22|e<<8|s}acquire(e,t,s,r){this.set(e,t,s,r)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,s,r){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,s,r,i]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(s),this.col=parseFloat(r),this.world=parseFloat(i)}else this.level=+e,this.row=+t,this.col=+s,this.world=+r||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const e=this.level+1,t=this.row<<1,s=this.col<<1,r=this.world;return[new i(e,t,s,r),new i(e,t,s+1,r),new i(e,t+1,s,r),new i(e,t+1,s+1,r)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}i.pool=new r.Z(i,null,null,25,50)},7575:(e,t,s)=>{s.d(t,{Sh:()=>o,kr:()=>l,zO:()=>r});var r,i=s(80442);function l(e,t,s={}){const i=t===r.WEBGL1?["webgl","experimental-webgl","webkit-3d","moz-webgl"]:["webgl2"];for(const t of i){const r=e.getContext(t,s);if(r)return r}return null}function o(e){if("3d"===e)return[r.WEBGL2];const t=(0,i.Z)("esri-force-webgl");return t===r.WEBGL1||t===r.WEBGL2?[t]:(0,i.Z)("mac")&&(0,i.Z)("chrome")?[r.WEBGL1,r.WEBGL2]:[r.WEBGL2,r.WEBGL1]}!function(e){e[e.WEBGL1=1]="WEBGL1",e[e.WEBGL2=2]="WEBGL2"}(r||(r={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(e,t,s)=>{s.d(t,{Z:()=>y});var r,i=s(43697),l=s(96674),o=s(35463),n=s(5600),a=(s(75215),s(67676),s(80442),s(71715)),u=s(52011),h=s(30556);let c=r=class extends l.wq{static get allTime(){return p}static get empty(){return d}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,r=null!=e.start?e.start.getTime():e.start,i=null!=e.end?e.end.getTime():e.end;return t===r&&s===i}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,o.JE)(t,e));let s=this.end;if(s){const t=(0,o.JE)(s,e);s=s.getTime()===t.getTime()?t:(0,o.Nm)(t,1,e)}return new r({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;if(i>=t&&i<=s?o=i:t>=i&&t<=l&&(o=t),s>=i&&s<=l?n=s:l>=t&&l<=s&&(n=l),null!=o&&null!=n&&!isNaN(o)&&!isNaN(n)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=n===1/0?null:new Date(n),e}return r.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:i,end:l}=this;return null!=i&&(s.start=(0,o.Nm)(i,e,t)),null!=l&&(s.end=(0,o.Nm)(l,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:s})}};(0,i._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,i._)([(0,h.c)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,i._)([(0,h.c)("start")],c.prototype,"writeStart",null),c=r=(0,i._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,d=new c({start:void 0,end:void 0}),y=c},13867:(e,t,s)=>{s.d(t,{z:()=>i});var r=s(69801);class i{constructor(e,t){this._storage=new r.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,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(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>n,Xq:()=>o});var r,i,l=s(44553);(i=r||(r={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,s,r=0){this._storage.put(this,e,t,s,r)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.Z,this._users=new l.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,s,i,l){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,r.ALL)),i>this._maxSize)return void this._notifyRemove(t,s,r.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn("Refusing to cache entry with invalid size "+i);const n=1+Math.max(l,-3)- -3;this._db.set(t,{entry:s,size:i,lifetime:n,lives:n}),this._size+=i,e.size+=i,this._checkSizeLimits()}updateSize(e,t,s,i){t=e.id+t;const l=this._db.get(t);if(l&&l.entry===s){for(this._size-=l.size,e.size-=l.size;i>this._maxSize;){const e=this._notifyRemove(t,s,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}l.size=i,this._size+=i,e.size+=i,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,r)=>{const i=e.lifetime;s[i]=(s[i]||0)+e.size,this._users.forAll((s=>{const{id:i,name:l}=s;if(r.startsWith(i)){const s=t[l]||0;t[l]=s+e.size}}))}));const r={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[s]||0;t[s]=i,r[s]=Math.round(100*e.hitRate)+"%"}else r[s]="0%"}));const i=Object.keys(t);i.sort(((e,s)=>t[s]-t[e])),i.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+r[s]));for(let t=s.length-1;t>=0;--t){const r=s[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let r;return this._removeFuncs.some((i=>{if(e.startsWith(i[0])){const e=i[1](t,s);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,s]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,s,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,r.SOME);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},17445:(e,t,s)=>{s.d(t,{N1:()=>p,YP:()=>a,Z_:()=>m,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g});var r=s(91460),i=s(50758),l=s(70586),o=s(95330),n=s(26258);function a(e,t,s={}){return h(e,t,s,d)}function u(e,t,s={}){return h(e,t,s,y)}function h(e,t,s={},r){let i=null;const o=s.once?(e,s)=>{r(e)&&((0,l.hw)(i),t(e,s))}:(e,s)=>{r(e)&&t(e,s)};if(i=(0,n.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return i}function c(e,t,s,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(e){o.once&&o.once&&(0,l.hw)(h),s(e)}const d=a(e,((e,s)=>{c(),(0,r.vT)(e)&&(n=e,u=(0,r.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,i.kB)((()=>{d.remove(),c()})),h}function p(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let n=null;function a(){n=(0,l.hw)(n)}return new Promise(((r,l)=>{n=(0,i.AL)([(0,o.fu)(s,(()=>{a(),l((0,o.zE)())})),h(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??d)])}))}(e,y,t)}function d(e){return!0}function y(e){return!!e}s(87538);const m={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,s)=>{s.d(t,{JE:()=>o,Nm:()=>l,rJ:()=>n}),s(80442);const r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function l(e,t,s){const r=new Date(e.getTime());if(t&&s){const e=i[s],{getter:l,setter:o,multiplier:n}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(r.getFullYear(),r.getMonth()+t);r.getDate()>e&&r.setDate(e)}r[o](r[l]()+t*n)}return r}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function n(e,t,s){return 0===e?0:e*r[t]/r[s]}},94756:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ce});var r=s(43697),i=s(3172),l=s(66643),o=s(20102),n=s(22974),a=s(16453),u=s(95330),h=s(81271),c=s(5600),p=(s(75215),s(71715)),d=s(52011),y=s(30556),m=s(6570),f=s(82971),g=s(87085),_=s(54295),w=s(46486),v=s(17287),S=s(71612),A=s(17017),x=s(38009),b=s(16859),T=s(72965);let E=null;var I=s(92604),R=s(1533);class L{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:s,data:r,json:i}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(i);if(!l||0===l.length||!r)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=t,this.height=s;const n=Math.max(this._maxTextureSize,4096);if(t>n||s>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw I.Z.getLogger("esri.layers.support.SpriteSource").error(e),new o.Z("SpriteSource",e)}let a;for(let e=0;e<r.length;e+=4)a=r[e+3]/255,r[e]=r[e]*a,r[e+1]=r[e+1]*a,r[e+2]=r[e+2]*a;this.image=r}async _getSpriteData(e,t){if("image"===e.type){let t,s;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.Z("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,s=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.Z("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,s=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,R.eP)(t.data)||(0,R.KZ)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:s}:{...z(t),json:s}}const s=(0,h.mN)(this.baseURL),r=s.query?"?"+(0,h.B7)(s.query):"",l=this._isRetina?"@2x":"",n=`${s.path}${l}.${this._spriteImageFormat}${r}`,a=`${s.path}${l}.json${r}`,[u,c]=await Promise.all([(0,i.default)(a,t),(0,i.default)(n,{responseType:"image",...t})]);return{...z(c.data),json:u.data}}}function z(e){const t=document.createElement("canvas"),s=t.getContext("2d");t.width=e.width,t.height=e.height,s.drawImage(e,0,0,e.width,e.height);const r=s.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(r.data)}}var D=s(11145),C=s(28589),O=s(55415);class U{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this.url).then((e=>e.data.index))),this._tileIndexPromise}async dataKey(e,t){const s=await this.fetchTileIndex();return(0,u.k_)(t),this._getIndexedDataKey(s,e)}_getIndexedDataKey(e,t){const s=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let r=t;for(;0!==r.level;)r=new O.Z(r.level-1,r.row>>1,r.col>>1,r.world),s.push(r);let i,l,o=e,n=s.pop();if(1===o)return n;for(;s.length;)if(i=s.pop(),l=(1&i.col)+((1&i.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=i;break}n=i,o=o[l]}return n}}var M=s(70586);class F{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,M.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this._tileIndexUrl,{query:{...e?.query}}).then((e=>e.data.index))),this._tileIndexPromise}dataKey(e,t){const{level:s,row:r,col:i}=e,l=new O.Z(e);return this._tilemap.fetchAvailabilityUpsample(s,r,i,l,t).then((()=>(l.world=e.world,l))).catch((e=>{if((0,u.D_)(e))throw e;return null}))}}var P=s(30175);class B{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const t=this._abortOptions;return t.push(e),(0,u.fu)(e,(()=>{t.every((e=>(0,u.Hc)(e)))&&this._abortController.abort()})),this._promise.then((e=>(0,n.d9)(e)))}async _makeRequest(e,t){const{data:s}=await(0,i.default)(e,{responseType:"array-buffer",signal:t});return s}}const k=new Map;function N(e,t){return(0,P.s1)(k,e,(()=>new B(e))).getData(t).then((t=>(k.delete(e),t))).catch((t=>{throw k.delete(e),t}))}class j{constructor(e,t,s){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.name=e,this.sourceUrl=t;const r=(0,h.mN)(this.sourceUrl),i=(0,n.d9)(s),l=i.tiles;if(r)for(let e=0;e<l.length;e++){const t=(0,h.mN)(l[e]);t&&((0,h.YP)(t.path)||(t.path=(0,h.v_)(r.path,t.path)),l[e]=(0,h.fl)(t.path,{...r.query,...t.query}))}this.tileServers=l;const o=s.capabilities&&s.capabilities.split(",").map((e=>e.toLowerCase().trim())),a=!0===s?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&s.hasOwnProperty("maxExportTilesCount")?s.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=D.Z.fromJSON(i.tileInfo);const p=s.tileMap?(0,h.fl)((0,h.v_)(r.path,s.tileMap),r.query??{}):null;u?(this.type="vector-tile",this.tilemap=new F(new C.y({layer:{parsedUrl:r,tileInfo:this.tileInfo},minLOD:i.minLOD??this.tileInfo.lods[0].level,maxLOD:i.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new U(p)),this.fullExtent=m.Z.fromJSON(s.fullExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return await(this.tilemap?.dataKey(e,t))??e}requestTile(e,t,s,r){return function(e,t,s,r,i){const l=(0,h.mN)(e),o=l.query;if(o)for(const[e,i]of Object.entries(o))switch(i){case"{x}":o[e]=r.toString();break;case"{y}":o[e]=s.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return N((0,h.fl)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,s.toString()).replaceAll(/\{x\}/gi,r.toString()),{...l.query}),i)}(this.tileServers[t%this.tileServers.length],e,t,s,r)}isCompatibleWith(e){const t=this.tileInfo,s=e.tileInfo;if(!t.spatialReference.equals(s.spatialReference))return!1;if(!t.origin.equals(s.origin))return!1;if(Math.round(t.dpi)!==Math.round(s.dpi))return!1;const r=t.lods,i=s.lods,l=Math.min(r.length,i.length);for(let e=0;e<l;e++){const t=r[e],s=i[e];if(t.level!==s.level||Math.round(t.scale)!==Math.round(s.scale))return!1}return!0}}function W(...e){let t;for(const s of e)if(null!=s)if((0,h.oC)(s)){if(t){const e=t.split("://")[0];t=e+":"+s.trim()}}else t=(0,h.YP)(s)?s:(0,h.v_)(t,s);return t?(0,h.Qj)(t):void 0}async function G(e,t,s,r,l){let o,n,a;if((0,u.k_)(l),"string"==typeof s){const e=(0,h.Fv)(s);a=await(0,i.default)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=s&&(a={data:s},o=s.jsonUrl||null,n=r);const c=a?.data;if(Z(c))return e.styleUrl=o||null,async function(e,t,s,r){const i=s?(0,h.Yd)(s):(0,h.L)();e.styleBase=i,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const s=t.sources.esri;s.url?await G(e,"esri",W(i,s.url),void 0,r):l.push(G(e,"esri",s,i,r))}for(const s of Object.keys(t.sources))"esri"!==s&&"vector"===t.sources[s].type&&(t.sources[s].url?l.push(G(e,s,W(i,t.sources[s].url),void 0,r)):t.sources[s].tiles&&l.push(G(e,s,t.sources[s],i,r)));await Promise.all(l)}(e,c,n,l);if(!Z(c))return e.sourceUrl?q(e,c,n,!1,t,l):(e.sourceUrl=o||null,q(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function Z(e){return!!e&&"sources"in e&&!!e.sources}async function q(e,t,s,r,i,l){const o=s?(0,h.Qj)(s)+"/":(0,h.L)(),n=function(e){if(e.hasOwnProperty("tileInfo"))return e;const t={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let s=78271.51696400007,r=295828763.7957775;const i=[],l=e.hasOwnProperty("minzoom")?+e.minzoom:0,o=e.hasOwnProperty("maxzoom")?+e.maxzoom:22;for(let e=0;e<=o;e++)e>=l&&i.push({level:e,scale:r,resolution:s}),s/=2,r/=2;return{capabilities:"TilesOnly",initialExtent:t,fullExtent:t,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:i,spatialReference:{wkid:102100}}}}(t),a=new j(i,(0,h.fl)(o,l?.query??{}),n);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(a))return;null!=a.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(a.fullExtent):t.fullExtent=a.fullExtent.clone()),t.tileInfo&&a.tileInfo&&t.tileInfo.lods.length<a.tileInfo.lods.length&&(t.tileInfo=a.tileInfo)}if(r&&(e.sourceBase=o,e.source=t,e.validatedSource=n,e.primarySourceName=i),e.sourceNameToSource[i]=a,!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?G(e,"",W(o,t.defaultStyles,"root.json"),void 0,l):G(e,"",t.defaultStyles,W(o,"root.json"),l)}}var Y=s(33516),$=s(19745),H=s(25929),K=s(94139),V=s(39450);const Q=1e-6;function J(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const s=e.origin,r=t.origin;if(Math.abs(s.x-r.x)>=Q||Math.abs(s.y-r.y)>=Q)return!1;let i,l;e.lods[0].scale>t.lods[0].scale?(i=e,l=t):(l=e,i=t);for(let e=i.lods[0].scale;e>=l.lods[l.lods.length-1].scale-Q;e/=2)if(Math.abs(e-l.lods[0].scale)<Q)return!0;return!1}function X(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const s=e.size[0],r=e.format,i=e.dpi,l=new K.Z({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,m=0;for(;d>c;)p.push(new V.Z({level:m,resolution:y,scale:d})),m++,d/=2,y/=2;return new D.Z({size:[s,s],dpi:i,format:r||"pbf",origin:l,lods:p,spatialReference:o})}var ee=s(51785),te=s(7575);let se,re;function ie(e){const t=(0,te.Sh)(e);for(;t.length>1;){const e=le(t.shift());if(e.available)return e}return le(t.shift())}function le(e){switch(e){case te.zO.WEBGL1:return se||(se=function(){const e=new ne,t=ue(te.zO.WEBGL1,e);return null==t||(e.supportsElementIndexUint=null!==t.getExtension("OES_element_index_uint"),e.supportsStandardDerivatives=null!==t.getExtension("OES_standard_derivatives"),e.supportsInstancedArrays=null!==t.getExtension("ANGLE_instanced_arrays"),e.supportsTextureFloat=null!==t.getExtension("OES_texture_float"),e.supportsTextureHalfFloat=null!==t.getExtension("OES_texture_half_float"),e.supportsColorBufferFloat=null!==t.getExtension("WEBGL_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=null!==t.getExtension("EXT_color_buffer_half_float")),e}()),se;case te.zO.WEBGL2:return re||(re=function(){const e=new ae,t=ue(te.zO.WEBGL2,e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}()),re}}class oe{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class ne extends oe{constructor(){super(...arguments),this.type=te.zO.WEBGL1}}class ae extends oe{constructor(){super(...arguments),this.type=te.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function ue(e,t){if(e===te.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||e===te.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const s=document.createElement("canvas");if(!s)return null;let r=(0,te.kr)(s,e,{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=(0,te.kr)(s,e),null!=r&&(t.majorPerformanceCaveat=!0)),null==r)return r;if(e===te.zO.WEBGL1){const e=r.getParameter(r.VERSION),s=e?.match(/^WebGL\s+([\d.]*)/);if(s){const e=parseFloat(s[1]);t.available=e>=.94}}else t.available=!0;t.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return i&&(t.supportsHighPrecisionFragment=i.precision>0),r}let he=class extends((0,S.h)((0,T.M)((0,w.Z)((0,v.Y)((0,x.q)((0,b.I)((0,A.N)((0,_.V)((0,a.R)(g.Z)))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.style=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.tilemapCache=null,this.type="vector-tile",this.url=null,this.showCollisionBoxes="none",this.path=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.r9).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,i.default)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:t},(0,Y.h)(this.portalItem))})).catch(u.r9).then((()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e&&e.serviceUrl&&(0,h.mN)(e.serviceUrl);if(!t)return null;const s=this._getDefaultAttribution(t.path);return s?(0,h.fl)(s,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.oC)(e)&&(e=`https:${e}`);const s=(0,$.a)(e);t.styleUrl=(0,H.e)(e,s)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new D.Z;if(e.length>1)for(let s=0;s<e.length;s++)J(t,e[s].tileInfo)&&(t=X(t,e[s].tileInfo));return t}readTilemapCache(e,t){const s=t.capabilities?.includes("Tilemap");return s?new C.y({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const s=ie("2d").maxTextureSize,r=this.currentStyleInfo?.spriteUrl?(0,h.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new L({type:"url",spriteUrl:r,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},s);await i.load(t),this._spriteSourceMap.set(e,i)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const s=ie("2d").maxTextureSize,r=e.spriteUrl,i=r?(0,h.fl)(r,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===e.type)return null;const l=new L(e,s);try{await l.load(t);const s=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(s,l),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.r9)(e)}return null}async loadStyle(e,t){const s=e||this.style||this.url;return this._loadingTask&&"string"==typeof s&&this.url===s||(this._loadingTask?.abort(),this._loadingTask=(0,l.vr)((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(s,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.d9)(this.styleRepository.getPaintProperties(e))}setPaintProperties(e,t){const s=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const r=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:s||r})}getStyleLayer(e){return(0,n.d9)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,n.d9)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,s){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const s=await async function(e,t){const s={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,i]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await G(s,"esri",e,i,t),{layerDefinition:s.validatedSource,url:r,serviceUrl:s.sourceUrl,style:s.style,styleUrl:s.styleUrl,spriteUrl:s.style.sprite&&W(s.styleBase,s.style.sprite),spriteFormat:s.spriteFormat,glyphsUrl:s.style.glyphs&&W(s.styleBase,s.style.glyphs),sourceNameToSource:s.sourceNameToSource,primarySourceName:s.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===s.spriteFormat&&(await function(e){if(E)return E;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return E=new Promise((e=>{const s=new Image;s.onload=()=>{s.onload=s.onerror=null,e(s.width>0&&s.height>0)},s.onerror=()=>{s.onload=s.onerror=null,e(!1)},s.src="data:image/webp;base64,"+t.lossy})),E}()||(s.spriteFormat="png")),this._set("currentStyleInfo",{...s}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",s.sourceNameToSource),this._set("primarySource",s.sourceNameToSource[s.primarySourceName]),this._set("styleRepository",new ee.Z(s.style)),this.read(s.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),s=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!t)return;const r=t[2]&&t[2].toLowerCase();if(!r)return;const i=t[1]||"";for(const e of s)if(e.toLowerCase().includes(r))return(0,h.Fv)(`//static.arcgis.com/attribution/Vector${i}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"attributionDataUrl",null),(0,r._)([(0,c.Cb)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,r._)([(0,c.Cb)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,r._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"currentStyleInfo",void 0),(0,r._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:m.Z})],he.prototype,"fullExtent",null),(0,r._)([(0,c.Cb)()],he.prototype,"style",void 0),(0,r._)([(0,c.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],he.prototype,"isReference",void 0),(0,r._)([(0,c.Cb)({type:["VectorTileLayer"]})],he.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"parsedUrl",null),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"serviceUrl",null),(0,r._)([(0,c.Cb)({type:f.Z,readOnly:!0})],he.prototype,"spatialReference",null),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"styleRepository",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"sourceNameToSource",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"primarySource",void 0),(0,r._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],he.prototype,"styleUrl",null),(0,r._)([(0,y.c)(["portal-item","web-document"],"styleUrl")],he.prototype,"writeStyleUrl",null),(0,r._)([(0,c.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:D.Z})],he.prototype,"tileInfo",null),(0,r._)([(0,c.Cb)()],he.prototype,"tilemapCache",void 0),(0,r._)([(0,p.r)("service","tilemapCache",["capabilities","tileInfo"])],he.prototype,"readTilemapCache",null),(0,r._)([(0,c.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],he.prototype,"type",void 0),(0,r._)([(0,c.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],he.prototype,"url",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],he.prototype,"version",void 0),(0,r._)([(0,p.r)("version",["version","currentVersion"])],he.prototype,"readVersion",null),(0,r._)([(0,c.Cb)({type:String})],he.prototype,"showCollisionBoxes",void 0),(0,r._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),he=(0,r._)([(0,d.j)("esri.layers.VectorTileLayer")],he);const ce=he},54295:(e,t,s)=>{s.d(t,{V:()=>o});var r=s(43697),i=s(5600),l=(s(75215),s(67676),s(80442),s(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],t),t}},46486:(e,t,s)=>{s.d(t,{Z:()=>c});var r=s(43697),i=(s(66577),s(5600)),l=(s(75215),s(67676),s(80442),s(71715)),o=s(52011),n=s(11145),a=s(42238),u=s(28589),h=s(82971);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,s){const r=t.capabilities?.includes("Tilemap");let{minLOD:i,maxLOD:l,minScale:o,maxScale:h}=t;if(null==i&&null==l&&0!==o&&0!==h){const e=e=>Math.round(1e4*e)/1e4;o=e(o||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const s of t.tileInfo.lods){const t=e(s.scale);i=t>=o?s.level:i,l=t>=h?s.level:l}}if(r)return new u.y({layer:this,minLOD:i,maxLOD:l});if(t.tileInfo){const e=new n.Z;return e.read(t.tileInfo,s),new a.Z(e,i,l)}return null}};return(0,r._)([(0,i.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,i.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,l.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,i.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,l.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,i.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,i.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,r._)([(0,i.Cb)({type:n.Z})],t.prototype,"tileInfo",void 0),(0,r._)([(0,i.Cb)()],t.prototype,"tilemapCache",void 0),(0,r._)([(0,l.r)("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),(0,r._)([(0,i.Cb)()],t.prototype,"version",void 0),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},17017:(e,t,s)=>{s.d(t,{N:()=>o});var r=s(43697),i=s(5600),l=(s(75215),s(67676),s(80442),s(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,l.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},42238:(e,t,s)=>{s.d(t,{Z:()=>l});var r=s(20102),i=s(95330);class l{constructor(e,t=0,s=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=s,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(s)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,s){const r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?s>=r.cols[0]&&s<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,s,l){await(0,i.Yn)(l);const o=this.getAvailability(e,t,s);if("unavailable"===o)throw new r.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:s});return o}async fetchAvailabilityUpsample(e,t,s,r,l){await(0,i.Yn)(l),r.level=e,r.row=t,r.col=s;const o=this.tileInfo;return o.updateTileInfo(r),this.fetchAvailability(e,t,s,l).catch((e=>{if((0,i.D_)(e))throw e;if(o.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e}))}}},33516:(e,t,s)=>{s.d(t,{Y:()=>o,h:()=>l});var r=s(81271),i=s(48522);function l(e){return{origin:"portal-item",url:(0,r.mN)(e.itemUrl),portal:e.portal||i.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,r.mN)(e.itemUrl):null,portal:e.portal||i.Z.getDefault(),portalItem:e}}},55415:(e,t,s)=>{s.d(t,{Z:()=>i});var r=s(71143);class i{static getId(e,t,s,r){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${s}/${r}`}constructor(e,t,s,r){this.set(e,t,s,r)}get key(){return this}get id(){return this.toString()}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,s=63&this.level;return(3&this.world)<<30|t<<22|e<<8|s}acquire(e,t,s,r){this.set(e,t,s,r)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,s,r){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,s,r,i]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(s),this.col=parseFloat(r),this.world=parseFloat(i)}else this.level=+e,this.row=+t,this.col=+s,this.world=+r||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const e=this.level+1,t=this.row<<1,s=this.col<<1,r=this.world;return[new i(e,t,s,r),new i(e,t,s+1,r),new i(e,t+1,s,r),new i(e,t+1,s+1,r)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}i.pool=new r.Z(i,null,null,25,50)},7575:(e,t,s)=>{s.d(t,{Sh:()=>o,kr:()=>l,zO:()=>r});var r,i=s(80442);function l(e,t,s={}){const i=t===r.WEBGL1?["webgl","experimental-webgl","webkit-3d","moz-webgl"]:["webgl2"];for(const t of i){const r=e.getContext(t,s);if(r)return r}return null}function o(e){if("3d"===e)return[r.WEBGL2];const t=(0,i.Z)("esri-force-webgl");return t===r.WEBGL1||t===r.WEBGL2?[t]:(0,i.Z)("mac")&&(0,i.Z)("chrome")?[r.WEBGL1,r.WEBGL2]:[r.WEBGL2,r.WEBGL1]}!function(e){e[e.WEBGL1=1]="WEBGL1",e[e.WEBGL2=2]="WEBGL2"}(r||(r={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4547],{83305:(e,t,n)=>{n.d(t,{e:()=>E,f:()=>P,g:()=>u,h:()=>p,i:()=>l,j:()=>N,l:()=>_,p:()=>G});var r=n(99880),o=n(80442);let s,i=null;function l(){return!!i}function _(){return s||(s=n.e(6774).then(n.bind(n,66774)).then((e=>e.p)).then((({default:e})=>e({locateFile:e=>(0,r.V)(`esri/geometry/support/${e}`)}))).then((e=>{T(e)})),s)}var u,P,E,c;!function(e){function t(e,t,n){i.ensureCache.prepare();const r=d(n),o=n===r,s=i.ensureFloat64(r),l=i._pe_geog_to_proj(i.getPointer(e),t,s);return l&&L(n,t,s,o),l}function n(e,t,n){return r(e,t,n,0)}function r(e,t,n,r){i.ensureCache.prepare();const o=d(n),s=n===o,l=i.ensureFloat64(o),_=i._pe_proj_to_geog_center(i.getPointer(e),t,l,r);return _&&L(n,t,l,s),_}e.geogToProj=t,e.projGeog=function(e,r,o,s){switch(s){case P.PE_TRANSFORM_P_TO_G:return n(e,r,o);case P.PE_TRANSFORM_G_TO_P:return t(e,r,o)}return 0},e.projToGeog=n,e.projToGeogCenter=r}(u||(u={})),(c=P||(P={})).init=function(){c.PE_BUFFER_MAX=i.PeDefs.prototype.PE_BUFFER_MAX,c.PE_NAME_MAX=i.PeDefs.prototype.PE_NAME_MAX,c.PE_MGRS_MAX=i.PeDefs.prototype.PE_MGRS_MAX,c.PE_USNG_MAX=i.PeDefs.prototype.PE_USNG_MAX,c.PE_DD_MAX=i.PeDefs.prototype.PE_DD_MAX,c.PE_DDM_MAX=i.PeDefs.prototype.PE_DDM_MAX,c.PE_DMS_MAX=i.PeDefs.prototype.PE_DMS_MAX,c.PE_UTM_MAX=i.PeDefs.prototype.PE_UTM_MAX,c.PE_PARM_MAX=i.PeDefs.prototype.PE_PARM_MAX,c.PE_TYPE_NONE=i.PeDefs.prototype.PE_TYPE_NONE,c.PE_TYPE_GEOGCS=i.PeDefs.prototype.PE_TYPE_GEOGCS,c.PE_TYPE_PROJCS=i.PeDefs.prototype.PE_TYPE_PROJCS,c.PE_TYPE_GEOGTRAN=i.PeDefs.prototype.PE_TYPE_GEOGTRAN,c.PE_TYPE_COORDSYS=i.PeDefs.prototype.PE_TYPE_COORDSYS,c.PE_TYPE_UNIT=i.PeDefs.prototype.PE_TYPE_UNIT,c.PE_TYPE_LINUNIT=i.PeDefs.prototype.PE_TYPE_LINUNIT,c.PE_STR_OPTS_NONE=i.PeDefs.prototype.PE_STR_OPTS_NONE,c.PE_STR_AUTH_NONE=i.PeDefs.prototype.PE_STR_AUTH_NONE,c.PE_STR_AUTH_TOP=i.PeDefs.prototype.PE_STR_AUTH_TOP,c.PE_STR_NAME_CANON=i.PeDefs.prototype.PE_STR_NAME_CANON,c.PE_PARM_X0=i.PeDefs.prototype.PE_PARM_X0,c.PE_PARM_ND=i.PeDefs.prototype.PE_PARM_ND,c.PE_TRANSFORM_1_TO_2=i.PeDefs.prototype.PE_TRANSFORM_1_TO_2,c.PE_TRANSFORM_2_TO_1=i.PeDefs.prototype.PE_TRANSFORM_2_TO_1,c.PE_TRANSFORM_P_TO_G=i.PeDefs.prototype.PE_TRANSFORM_P_TO_G,c.PE_TRANSFORM_G_TO_P=i.PeDefs.prototype.PE_TRANSFORM_G_TO_P,c.PE_HORIZON_RECT=i.PeDefs.prototype.PE_HORIZON_RECT,c.PE_HORIZON_POLY=i.PeDefs.prototype.PE_HORIZON_POLY,c.PE_HORIZON_LINE=i.PeDefs.prototype.PE_HORIZON_LINE,c.PE_HORIZON_DELTA=i.PeDefs.prototype.PE_HORIZON_DELTA},function(e){const t={},n={},r=e=>{if(e){const t=e.getType();switch(t){case P.PE_TYPE_GEOGCS:e=i.castObject(e,i.PeGeogcs);break;case P.PE_TYPE_PROJCS:e=i.castObject(e,i.PeProjcs);break;case P.PE_TYPE_GEOGTRAN:e=i.castObject(e,i.PeGeogtran);break;default:t&P.PE_TYPE_UNIT&&(e=i.castObject(e,i.PeUnit))}}return e};function o(e,n){let o=null,s=t[e];if(s||(s={},t[e]=s),s.hasOwnProperty(String(n)))o=s[n];else{const t=i.PeFactory.prototype.factoryByType(e,n);i.compare(t,i.NULL)||(o=t,s[n]=o)}return o=r(o),o}e.initialize=function(){i.PeFactory.prototype.initialize(null)},e.coordsys=function(e){return o(P.PE_TYPE_COORDSYS,e)},e.factoryByType=o,e.fromString=function(e,t){let o=null,s=n[e];if(s||(s={},n[e]=s),s.hasOwnProperty(t))o=s[t];else{const n=i.PeFactory.prototype.fromString(e,t);i.compare(n,i.NULL)||(o=n,s[t]=o)}return o=r(o),o},e.geogcs=function(e){return o(P.PE_TYPE_GEOGCS,e)},e.geogtran=function(e){return o(P.PE_TYPE_GEOGTRAN,e)},e.getCode=function(e){return i.PeFactory.prototype.getCode(e)},e.projcs=function(e){return o(P.PE_TYPE_PROJCS,e)},e.unit=function(e){return o(P.PE_TYPE_UNIT,e)}}(E||(E={}));let a=null;var f,S,p,A,C,R,O,N,M;function T(e){function t(e,t,n){e[t]=n(e[t])}i=e,P.init(),f.init(),C.init(),O.init(),N.init(),a=class extends i.PeGCSExtent{destroy(){i.destroy(this)}};const n=[i.PeDatum,i.PeGeogcs,i.PeGeogtran,i.PeObject,i.PeParameter,i.PePrimem,i.PeProjcs,i.PeSpheroid,i.PeUnit];for(const e of n)t(e.prototype,"getName",(e=>function(){return e.call(this,new Array(P.PE_NAME_MAX))}));for(const e of[i.PeGeogtran,i.PeProjcs])t(e.prototype,"getParameters",(e=>function(){const t=new Array(P.PE_PARM_MAX);let n=e.call(this);for(let e=0;e<t.length;e++){const r=i.getValue(n,"*");t[e]=r?i.wrapPointer(r,i.PeParameter):null,n+=Int32Array.BYTES_PER_ELEMENT}return t}));t(i.PeHorizon.prototype,"getCoord",(e=>function(){const t=this.getSize();if(!t)return null;const n=[];return L(n,t,e.call(this)),n})),t(i.PeGTlistExtendedEntry.prototype,"getEntries",(e=>{const t=i._pe_getPeGTlistExtendedGTsSize();return function(){let n=null;const r=e.call(this);if(!i.compare(r,i.NULL)){n=[r];const e=this.getSteps();if(e>1){const o=i.getPointer(r);for(let r=1;r<e;r++)n.push(i.wrapPointer(o+t*r,i.PeGTlistExtendedGTs))}}return n}}));const r=i._pe_getPeHorizonSize(),o=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let n=null;const o=e.call(this);if(!i.compare(o,i.NULL)){n=[o];const e=o.getNump();if(e>1){const t=i.getPointer(o);for(let o=1;o<e;o++)n.push(i.wrapPointer(t+r*o,i.PeHorizon))}}return t.set(e,n),n};t(i.PeProjcs.prototype,"horizonGcsGenerate",o),t(i.PeProjcs.prototype,"horizonPcsGenerate",o),i.PeObject.prototype.toString=function(e=P.PE_STR_OPTS_NONE){i.ensureCache.prepare();const t=i.getPointer(this),n=i.ensureInt8(new Array(P.PE_BUFFER_MAX));return i.UTF8ToString(i._pe_object_to_string_ext(t,e,n))}}function g(e){if(!e)return;const t=i.getClass(e);if(!t)return;const n=i.getCache(t);if(!n)return;const r=i.getPointer(e);r&&delete n[r]}function h(e,t){const n=[],r=new Array(t);for(let t=0;t<e;t++)n.push(i.ensureInt8(r));return n}function d(e){let t;return Array.isArray(e[0])?(t=[],e.forEach((e=>{t.push(e[0],e[1])}))):t=e,t}function L(e,t,n,r=!1){if(r)for(let r=0;r<2*t;r++)e[r]=i.getValue(n+r*Float64Array.BYTES_PER_ELEMENT,"double");else{const r=0===e.length;for(let o=0;o<t;o++)r&&(e[o]=new Array(2)),e[o][0]=i.getValue(n,"double"),e[o][1]=i.getValue(n+Float64Array.BYTES_PER_ELEMENT,"double"),n+=2*Float64Array.BYTES_PER_ELEMENT}}!function(e){let t;e.init=function(){e.PE_GTLIST_OPTS_COMMON=i.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=i._pe_getPeGTlistExtendedEntrySize()},e.getGTlist=function(e,n,r,o,s,l){let _=null;const u=new i.PeInteger(l);try{const P=i.PeGTlistExtended.prototype.getGTlist(e,n,r,o,s,u);if((l=u.val)&&(_=[P],l>1)){const e=i.getPointer(P);for(let n=1;n<l;n++)_.push(i.wrapPointer(e+t*n,i.PeGTlistExtendedEntry))}}finally{i.destroy(u)}return _}}(f||(f={})),function(e){e.destroy=function(e){if(e&&e.length){for(const t of e)g(t),t.getEntries().forEach((e=>{g(e);const t=e.getGeogtran();g(t),t.getParameters().forEach(g),[t.getGeogcs1(),t.getGeogcs2()].forEach((e=>{g(e);const t=e.getDatum();g(t),g(t.getSpheroid()),g(e.getPrimem()),g(e.getUnit())}))}));i.PeGTlistExtendedEntry.prototype.Delete(e[0])}}}(S||(S={})),function(e){e.geogToGeog=function(e,t,n,r,o){i.ensureCache.prepare();const s=d(n),l=n===s,_=i.ensureFloat64(s);let u=0;r&&(u=i.ensureFloat64(r));const P=i._pe_geog_to_geog(i.getPointer(e),t,_,u,o);return P&&L(n,t,_,l),P}}(p||(p={})),function(e){const t=(e,t,n,r,o,s)=>{let l,_;switch(i.ensureCache.prepare(),e){case"dd":l=i._pe_geog_to_dd,_=P.PE_DD_MAX;break;case"ddm":l=i._pe_geog_to_ddm,_=P.PE_DDM_MAX;break;case"dms":l=i._pe_geog_to_dms,_=P.PE_DMS_MAX}let u=0;t&&(u=i.getPointer(t));const E=d(r),c=i.ensureFloat64(E),a=h(n,_),f=l(u,n,c,o,i.ensureInt32(a));if(f)for(let e=0;e<n;e++)s[e]=i.UTF8ToString(a[e]);return f},n=(e,t,n,r,o)=>{let s;switch(i.ensureCache.prepare(),e){case"dd":s=i._pe_dd_to_geog;break;case"ddm":s=i._pe_ddm_to_geog;break;case"dms":s=i._pe_dms_to_geog}let l=0;t&&(l=i.getPointer(t));const _=r.map((e=>i.ensureString(e))),u=i.ensureInt32(_),P=i.ensureFloat64(new Array(2*n)),E=s(l,n,u,P);return E&&L(o,n,P),E};e.geogToDms=function(e,n,r,o,s){return t("dms",e,n,r,o,s)},e.dmsToGeog=function(e,t,r,o){return n("dms",e,t,r,o)},e.geogToDdm=function(e,n,r,o,s){return t("ddm",e,n,r,o,s)},e.ddmToGeog=function(e,t,r,o){return n("ddm",e,t,r,o)},e.geogToDd=function(e,n,r,o,s){return t("dd",e,n,r,o,s)},e.ddToGeog=function(e,t,r,o){return n("dd",e,t,r,o)}}(A||(A={})),function(e){e.init=function(){e.PE_MGRS_STYLE_NEW=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=i.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=i.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES},e.geogToMgrsExtended=function(e,t,n,r,o,s,l){i.ensureCache.prepare();let _=0;e&&(_=i.getPointer(e));const u=d(n),E=i.ensureFloat64(u),c=h(t,P.PE_MGRS_MAX),a=i.ensureInt32(c),f=i._pe_geog_to_mgrs_extended(_,t,E,r,o,s,a);if(f)for(let e=0;e<t;e++)l[e]=i.UTF8ToString(c[e]);return f},e.mgrsToGeogExtended=function(e,t,n,r,o){i.ensureCache.prepare();let s=0;e&&(s=i.getPointer(e));const l=n.map((e=>i.ensureString(e))),_=i.ensureInt32(l),u=i.ensureFloat64(new Array(2*t)),P=i._pe_mgrs_to_geog_extended(s,t,_,r,u);return P&&L(o,t,u),P}}(C||(C={})),function(e){e.geogToUsng=function(e,t,n,r,o,s,l){i.ensureCache.prepare();let _=0;e&&(_=i.getPointer(e));const u=d(n),E=i.ensureFloat64(u),c=h(t,P.PE_MGRS_MAX),a=i.ensureInt32(c),f=i._pe_geog_to_usng(_,t,E,r,o,s,a);if(f)for(let e=0;e<t;e++)l[e]=i.UTF8ToString(c[e]);return f},e.usngToGeog=function(e,t,n,r){i.ensureCache.prepare();let o=0;e&&(o=i.getPointer(e));const s=n.map((e=>i.ensureString(e))),l=i.ensureInt32(s),_=i.ensureFloat64(new Array(2*t)),u=i._pe_usng_to_geog(o,t,l,_);return u&&L(r,t,_),u}}(R||(R={})),function(e){e.init=function(){e.PE_UTM_OPTS_NONE=i.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=i.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=i.PeNotationUtm.prototype.PE_UTM_OPTS_NS},e.geogToUtm=function(e,t,n,r,o){i.ensureCache.prepare();let s=0;e&&(s=i.getPointer(e));const l=d(n),_=i.ensureFloat64(l),u=h(t,P.PE_UTM_MAX),E=i.ensureInt32(u),c=i._pe_geog_to_utm(s,t,_,r,E);if(c)for(let e=0;e<t;e++)o[e]=i.UTF8ToString(u[e]);return c},e.utmToGeog=function(e,t,n,r,o){i.ensureCache.prepare();let s=0;e&&(s=i.getPointer(e));const l=n.map((e=>i.ensureString(e))),_=i.ensureInt32(l),u=i.ensureFloat64(new Array(2*t)),P=i._pe_utm_to_geog(s,t,_,r,u);return P&&L(o,t,u),P}}(O||(O={})),function(e){const t=new Map;e.init=function(){e.PE_PCSINFO_OPTION_NONE=i.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=i.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=i.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=i.PePCSInfo.prototype.PE_POLE_POINT},e.generate=function(n,r=e.PE_PCSINFO_OPTION_DOMAIN){let o=null,s=null;return t.has(n)&&(s=t.get(n),s[r]&&(o=s[r])),o||(o=i.PePCSInfo.prototype.generate(n,r),s||(s=[],t.set(n,s)),s[r]=o),o}}(N||(N={})),function(e){e.versionString=function(){return i.PeVersion.prototype.version_string()}}(M||(M={}));const G=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return u},get PeDefs(){return P},get PeFactory(){return E},get PeGCSExtent(){return a},get PeGTTransformations(){return p},get PeGTlistExtended(){return f},get PeGTlistExtendedEntry(){return S},get PeNotationDms(){return A},get PeNotationMgrs(){return C},get PeNotationUsng(){return R},get PeNotationUtm(){return O},get PePCSInfo(){return N},get PeVersion(){return M},_init:T,get _pe(){return i},isLoaded:l,isSupported:function(){return!!(0,o.Z)("esri-wasm")},load:_},Symbol.toStringTag,{value:"Module"}))},44547:(e,t,n)=>{n.d(t,{Up:()=>v,Bm:()=>K,initializeProjection:()=>B,kR:()=>m,zD:()=>F,iV:()=>W,projectBuffer:()=>z,oj:()=>w,dz:()=>U,JY:()=>D,KC:()=>x,Wt:()=>Y});var r=n(20102),o=n(22021),s=n(95330),i=n(67900),l=n(58971),_=n(10661),u=n(52138),P=(n(17896),n(65617)),E=n(2109),c=n(6570),a=n(65091),f=n(83305),S=n(94139),p=n(38913),A=n(58901),C=(n(24470),n(68441));Math.PI;const R=C.sv.radius,O=C.sv.eccentricitySquared,N={a1:R*O,a2:R*O*R*O,a3:R*O*O/2,a4:R*O*R*O*2.5,a5:R*O+R*O*O/2,a6:1-O};C.sv.radius,C.sv.flattening,C.Z1.radius,C.Z1.flattening,C.yr.radius,C.yr.flattening,C.yr.radius;var M=n(18571),T=n(8744),g=n(56726),h=n(69285);n(24335);let d=null,L=null,G=null,y={};const I=new _.s;function m(){return!!d&&(0,f.i)()}function F(e){return null==G&&(G=Promise.all([(0,f.l)(),Promise.all([n.e(5837),n.e(5732)]).then(n.bind(n,45837)).then((e=>e.g)),n.e(819).then(n.bind(n,80819))])),G.then((([,t,{hydratedAdapter:n}])=>{(0,s.k_)(e),L=n,d=t.default,d._enableProjection(f.p),I.notify()}))}function W(e,t,n=null,r=null){return Array.isArray(e)?0===e.length?[]:w(L,e,e[0].spatialReference,t,n,r):w(L,[e],e.spatialReference,t,n,r)[0]}function w(e,t,n,r,o=null,s=null){if(null==n||null==r)return t;if(v(n,r,o))return t.map((e=>function(e,t,n){return e?"x"in e?function(e,t,n,r,o){he[0]=e.x,he[1]=e.y;const s=e.z;return he[2]=void 0!==s?s:o,z(he,t,0,he,r,0,1)?(n.x=he[0],n.y=he[1],n.spatialReference=r,void 0===s?(n.z=void 0,n.hasZ=!1):(n.z=he[2],n.hasZ=!0),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}(e,t,new S.Z,n,0):"xmin"in e?function(e,t,n,r,o){const{xmin:s,ymin:i,xmax:l,ymax:_,hasZ:u,hasM:P}=e;return Z(s,i,u?e.zmin:o,t,he,r)?(n.xmin=he[0],n.ymin=he[1],u&&(n.zmin=he[2]),Z(l,_,u?e.zmax:o,t,he,r)?(n.xmax=he[0],n.ymax=he[1],u&&(n.zmax=he[2]),P&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null):null}(e,t,new c.Z,n,0):"rings"in e?j(e,t,new p.Z,n,0):"paths"in e?function(e,t,n,r,o){const{paths:s,hasZ:i,hasM:l}=e,_=[];return b(s,i??!1,l??!1,t,_,r,o)?(n.paths=_,n.spatialReference=r,n.hasZ=i,n.hasM=l,n):null}(e,t,new A.Z,n,0):"points"in e?function(e,t,n,r,o){const{points:s,hasZ:i,hasM:l}=e,_=[],u=s.length,P=[];for(const e of s)P.push(e[0],e[1],i?e[2]:o);if(!z(P,t,0,P,r,0,u))return null;for(let e=0;e<u;++e){const t=3*e,n=P[t],r=P[t+1];i&&l?_.push([n,r,P[t+2],s[e][3]]):i?_.push([n,r,P[t+2]]):l?_.push([n,r,s[e][2]]):_.push([n,r])}return n.points=_,n.spatialReference=r,n.hasZ=i,n.hasM=l,n}(e,t,new a.Z,n,0):null:null}(e,n,r)));if(null==o){const e=M.Z.cacheKey(n,r);void 0!==y[e]?o=y[e]:(null==(o=function(e,t,n=null){if(null==e||null==t)return null;if(null==d||null==L)throw new H;const r=d._getTransformation(L,e,t,n,n?.spatialReference);return null!==r?M.Z.fromGE(r):null}(n,r,void 0))&&(o=new M.Z),y[e]=o)}if(null==d||null==e)throw new H;return null!=s?d._project(e,t,n,r,o,s):d._project(e,t,n,r,o)}function U(e,t){const n=D([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function D(e,t){if(!m())for(const n of e)if(null!=n&&!(0,T.fS)(n.spatialReference,t)&&(0,T.JY)(n.spatialReference)&&(0,T.JY)(t)&&!v(n.spatialReference,t))return(0,l.it)(I),{pending:F(),geometries:null};return{pending:null,geometries:e.map((e=>null==e?null:(0,T.fS)(e.spatialReference,t)?e:(0,T.JY)(e.spatialReference)&&(0,T.JY)(t)?function(e,t){try{const n=W(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const r=(0,h.k)(n.type,e.spatialReference,t);return null!=r&&r(n),n}catch(e){if(!(e instanceof H))throw e;return null}}(e,t):null))}}class H extends r.Z{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}var k;function v(e,t,n){return!n&&(!!(0,T.fS)(e,t)||(0,T.JY)(e)&&(0,T.JY)(t)&&!!Se(e,t,Re))}async function B(e,t,n,r){if(m())return(0,s.Yn)(r);if(Array.isArray(e)){for(const{source:t,dest:n,geographicTransformation:o}of e)if(!v(t,n,o))return F(r)}else if(!v(e,t,n))return F(r);return(0,s.Yn)(r)}function Y(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=j(e,e.spatialReference,t,n,r)}function j(e,t,n,r,o){const{rings:s,hasZ:i,hasM:l}=e,_=[];return b(s,i??!1,l??!1,t,_,r,o)?(n.rings=_,n.spatialReference=r,n.hasZ=i,n.hasM=l,n):null}function x(e,t,n,r=0){he[0]=e.x,he[1]=e.y;const o=e.z;return he[2]=void 0!==o?o:r,z(he,e.spatialReference,0,t,n,0,1)}function Z(e,t,n,r,o,s){return Me[0]=e,Me[1]=t,Me[2]=n,z(Me,r,0,o,s,0,1)}function z(e,t,n,r,o,s,i=1){const l=Se(t,o,Re);if(null==l)return!1;if(l===V){if(e===r&&n===s)return!0;const t=n+3*i;for(let o=n,i=s;o<t;o++,i++)r[i]=e[o];return!0}const _=n+3*i;for(let t=n,o=s;t<_;t+=3,o+=3)l(e,t,r,o);return!0}function b(e,t,n,r,o,s,i=0){const l=new Array;for(const n of e)for(const e of n)l.push(e[0],e[1],t?e[2]:i);if(!z(l,r,0,l,s,0,l.length/3))return!1;let _=0;o.length=0;for(const r of e){const e=new Array;for(const o of r)t&&n?e.push([l[_++],l[_++],l[_++],o[3]]):t?e.push([l[_++],l[_++],l[_++]]):n?(e.push([l[_++],l[_++],o[2]]),_++):(e.push([l[_++],l[_++]]),_++);o.push(e)}return!0}function K(e,t,n,r){if(null==e||null==r)return!1;const o=q(e,Ae),s=q(r,Ce);if(o===s&&!X(s)&&(o!==k.UNKNOWN||(0,T.fS)(e,r)))return(0,u.f)(n,t),!0;if(X(s)){const e=fe[o][k.LON_LAT],r=fe[k.LON_LAT][s];return null!=e&&null!=r&&(e(t,0,Te,0),r(Te,0,ge,0),J(Oe*Te[0],Oe*Te[1],n),n[12]=ge[0],n[13]=ge[1],n[14]=ge[2],!0)}if((s===k.WEB_MERCATOR||s===k.PLATE_CARREE)&&(o===k.WGS84||o===k.CGCS2000&&s===k.PLATE_CARREE||o===k.SPHERICAL_ECEF||o===k.WEB_MERCATOR)){const e=fe[o][k.LON_LAT],r=fe[k.LON_LAT][s];return null!=e&&null!=r&&(e(t,0,Te,0),r(Te,0,ge,0),o===k.SPHERICAL_ECEF?function(e,t,n){J(e,t,n),(0,u.t)(n,n)}(Oe*Te[0],Oe*Te[1],n):(0,u.i)(n),n[12]=ge[0],n[13]=ge[1],n[14]=ge[2],!0)}return!1}function X(e){return e===k.SPHERICAL_ECEF||e===k.SPHERICAL_MARS_PCPF||e===k.SPHERICAL_MOON_PCPF}function J(e,t,n){const r=Math.sin(e),o=Math.cos(e),s=Math.sin(t),i=Math.cos(t),l=n;return l[0]=-r,l[4]=-s*o,l[8]=i*o,l[12]=0,l[1]=o,l[5]=-s*r,l[9]=i*r,l[13]=0,l[2]=0,l[6]=i,l[10]=s,l[14]=0,l[3]=0,l[7]=0,l[11]=0,l[15]=1,l}function q(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.c9)(e,1)),e.wkt===E.kU.wkt?t.spatialReferenceId=k.SPHERICAL_ECEF:(0,T.oR)(e)?t.spatialReferenceId=k.WGS84:(0,T.sS)(e)?t.spatialReferenceId=k.WEB_MERCATOR:(0,T.QM)(e)?t.spatialReferenceId=k.PLATE_CARREE:e.wkt===E.pn.wkt?t.spatialReferenceId=k.WGS84_ECEF:e.wkid===g.W.CGCS2000?t.spatialReferenceId=k.CGCS2000:e.wkt===E.JL.wkt?t.spatialReferenceId=k.SPHERICAL_MARS_PCPF:e.wkt===E.mM.wkt?t.spatialReferenceId=k.SPHERICAL_MOON_PCPF:(0,T.BZ)(e)?t.spatialReferenceId=k.GCSMARS2000:(0,T.V2)(e)?t.spatialReferenceId=k.GCSMOON2000:t.spatialReferenceId=k.UNKNOWN):k.UNKNOWN}function V(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t])}function Q(e,t,n,r){n[r++]=Ne*(e[t++]/C.sv.radius),n[r++]=Ne*(Math.PI/2-2*Math.atan(Math.exp(-e[t++]/C.sv.radius))),n[r]=e[t]}function $(e,t,n,r){!function(e,t,n,r,s){const i=.4999999*Math.PI,l=(0,o.uZ)(Oe*e[t+1],-i,i),_=Math.sin(l);n[r++]=Oe*e[t]*s.radius,n[r++]=s.halfSemiMajorAxis*Math.log((1+_)/(1-_)),n[r]=e[t+2]}(e,t,n,r,C.sv)}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",e[e.WGS84=2]="WGS84",e[e.WEB_MERCATOR=3]="WEB_MERCATOR",e[e.WGS84_ECEF=4]="WGS84_ECEF",e[e.CGCS2000=5]="CGCS2000",e[e.WGS84_COMPARABLE_LON_LAT=6]="WGS84_COMPARABLE_LON_LAT",e[e.SPHERICAL_MARS_PCPF=7]="SPHERICAL_MARS_PCPF",e[e.GCSMARS2000=8]="GCSMARS2000",e[e.SPHERICAL_MOON_PCPF=9]="SPHERICAL_MOON_PCPF",e[e.GCSMOON2000=10]="GCSMOON2000",e[e.LON_LAT=11]="LON_LAT",e[e.PLATE_CARREE=12]="PLATE_CARREE"}(k||(k={}));const ee=C.sv.radius*Math.PI/180,te=180/(C.sv.radius*Math.PI);function ne(e,t,n,r){n[r]=e[t]*ee,n[r+1]=e[t+1]*ee,n[r+2]=e[t+2]}function re(e,t,n,r){n[r]=e[t]*te,n[r+1]=e[t+1]*te,n[r+2]=e[t+2]}function oe(e,t,n,r,o){const s=o+e[t+2],i=Oe*e[t+1],l=Oe*e[t],_=Math.cos(i);n[r++]=Math.cos(l)*_*s,n[r++]=Math.sin(l)*_*s,n[r]=Math.sin(i)*s}function se(e,t,n,r){oe(e,t,n,r,C.Z1.radius)}function ie(e,t,n,r){oe(e,t,n,r,C.yr.radius)}function le(e,t,n,r){oe(e,t,n,r,C.sv.radius)}function _e(e,t,n,r,s){const i=e[t],l=e[t+1],_=e[t+2],u=Math.sqrt(i*i+l*l+_*_),P=(0,o.Kt)(_/(0===u?1:u)),E=Math.atan2(l,i);n[r++]=Ne*E,n[r++]=Ne*P,n[r]=u-s}function ue(e,t,n,r){_e(e,t,n,r,C.Z1.radius)}function Pe(e,t,n,r){_e(e,t,n,r,C.yr.radius)}function Ee(e,t,n,r){_e(e,t,n,r,C.sv.radius)}function ce(e,t,n,r){!function(e,t,n,r,o){const s=Oe*e[t],i=Oe*e[t+1],l=e[t+2],_=Math.sin(i),u=Math.cos(i),P=o.radius/Math.sqrt(1-o.eccentricitySquared*_*_);n[r++]=(P+l)*u*Math.cos(s),n[r++]=(P+l)*u*Math.sin(s),n[r++]=(P*(1-o.eccentricitySquared)+l)*_}(e,t,n,r,C.sv)}function ae(e,t,n,r){const o=N,s=e[t],i=e[t+1],l=e[t+2];let _,u,P,E,c,a,f,S,p,A,R,O,M,T,g,h,d,L,G,y,I;_=Math.abs(l),u=s*s+i*i,P=Math.sqrt(u),E=u+l*l,c=Math.sqrt(E),y=Math.atan2(i,s),a=l*l/E,f=u/E,T=o.a2/c,g=o.a3-o.a4/c,f>.3?(S=_/c*(1+f*(o.a1+T+a*g)/c),G=Math.asin(S),A=S*S,p=Math.sqrt(1-A)):(p=P/c*(1-a*(o.a5-T-f*g)/c),G=Math.acos(p),A=1-p*p,S=Math.sqrt(A)),R=1-C.sv.eccentricitySquared*A,O=C.sv.radius/Math.sqrt(R),M=o.a6*O,T=P-O*p,g=_-M*S,d=p*T+S*g,h=p*g-S*T,L=h/(M/R+d),G+=L,I=d+h*L/2,l<0&&(G=-G),n[r++]=Ne*y,n[r++]=Ne*G,n[r]=I}const fe={[k.WGS84]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:V,[k.SPHERICAL_ECEF]:le,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:$,[k.PLATE_CARREE]:ne,[k.WGS84]:V,[k.WGS84_ECEF]:ce},[k.CGCS2000]:{[k.CGCS2000]:V,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:V,[k.SPHERICAL_ECEF]:le,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:ne,[k.WGS84]:null,[k.WGS84_ECEF]:ce},[k.GCSMARS2000]:{[k.CGCS2000]:null,[k.GCSMARS2000]:V,[k.GCSMOON2000]:null,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:ie,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.GCSMOON2000]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:V,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:se,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.WEB_MERCATOR]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:Q,[k.WGS84_COMPARABLE_LON_LAT]:Q,[k.SPHERICAL_ECEF]:function(e,t,n,r){Q(e,t,n,r),le(n,r,n,r)},[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:V,[k.PLATE_CARREE]:function(e,t,n,r){Q(e,t,n,r),ne(n,r,n,r)},[k.WGS84]:Q,[k.WGS84_ECEF]:function(e,t,n,r){Q(e,t,n,r),ce(n,r,n,r)}},[k.WGS84_ECEF]:{[k.CGCS2000]:ae,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:ae,[k.WGS84_COMPARABLE_LON_LAT]:ae,[k.SPHERICAL_ECEF]:function(e,t,n,r){ae(e,t,n,r),le(n,r,n,r)},[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:function(e,t,n,r){ae(e,t,n,r),$(n,r,n,r)},[k.PLATE_CARREE]:function(e,t,n,r){ae(e,t,n,r),ne(n,r,n,r)},[k.WGS84]:ae,[k.WGS84_ECEF]:V},[k.SPHERICAL_ECEF]:{[k.CGCS2000]:Ee,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:Ee,[k.WGS84_COMPARABLE_LON_LAT]:Ee,[k.SPHERICAL_ECEF]:V,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:function(e,t,n,r){Ee(e,t,n,r),$(n,r,n,r)},[k.PLATE_CARREE]:function(e,t,n,r){Ee(e,t,n,r),ne(n,r,n,r)},[k.WGS84]:Ee,[k.WGS84_ECEF]:function(e,t,n,r){Ee(e,t,n,r),ce(n,r,n,r)}},[k.SPHERICAL_MARS_PCPF]:{[k.CGCS2000]:null,[k.GCSMARS2000]:Pe,[k.GCSMOON2000]:null,[k.LON_LAT]:Pe,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:V,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.SPHERICAL_MOON_PCPF]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:ue,[k.LON_LAT]:ue,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:V,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.UNKNOWN]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:null,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:V,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.LON_LAT]:{[k.CGCS2000]:V,[k.GCSMARS2000]:V,[k.GCSMOON2000]:V,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:V,[k.SPHERICAL_ECEF]:le,[k.SPHERICAL_MARS_PCPF]:ie,[k.SPHERICAL_MOON_PCPF]:se,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:$,[k.PLATE_CARREE]:ne,[k.WGS84]:V,[k.WGS84_ECEF]:ce},[k.WGS84_COMPARABLE_LON_LAT]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:V,[k.SPHERICAL_ECEF]:le,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:ne,[k.WGS84]:V,[k.WGS84_ECEF]:ce},[k.PLATE_CARREE]:{[k.CGCS2000]:re,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:re,[k.WGS84_COMPARABLE_LON_LAT]:re,[k.SPHERICAL_ECEF]:function(e,t,n,r){re(e,t,n,r),le(n,r,n,r)},[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:function(e,t,n,r){re(e,t,n,r),$(n,r,n,r)},[k.PLATE_CARREE]:V,[k.WGS84]:re,[k.WGS84_ECEF]:function(e,t,n,r){re(e,t,n,r),ce(n,r,n,r)}}};function Se(e,t,n=pe()){return null==e||null==t?null:function(e,t,n){if(null==e||null==t||n.source.spatialReference===e&&n.dest.spatialReference===t)return n;const r=q(e,n.source),o=q(t,n.dest);return r===k.UNKNOWN&&o===k.UNKNOWN?(0,T.fS)(e,t)?n.projector=V:n.projector=null:n.projector=fe[r][o],n}(e,t,n).projector}function pe(){return{source:{spatialReference:null,spatialReferenceId:k.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:k.UNKNOWN,metersPerUnit:1},projector:V}}const Ae={spatialReference:null,spatialReferenceId:k.UNKNOWN},Ce={spatialReference:null,spatialReferenceId:k.UNKNOWN},Re=pe(),Oe=(pe(),(0,o.Vl)(1)),Ne=(0,o.BV)(1),Me=(0,P.c)(),Te=(0,P.c)(),ge=(0,P.c)(),he=(0,P.c)();(0,P.c)()},18571:(e,t,n)=>{n.d(t,{Z:()=>s});let r=0;class o{static fromGE(e){const t=new o;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=r++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=r++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=r++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=r++}getInverse(){const e=new o;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class s{static cacheKey(e,t){return[void 0!==e.wkid&&null!==e.wkid?e.wkid.toString():"-1",void 0!==e.wkt&&null!==e.wkt?e.wkt.toString():"",void 0!==t.wkid&&null!==t.wkid?t.wkid.toString():"-1",void 0!==t.wkt&&null!==t.wkt?t.wkt.toString():""].join(",")}static fromGE(e){const t=new s;let n="";for(const r of e.steps){const e=o.fromGE(r);t.steps.push(e),n+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=n,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e&&e.steps)for(const t of e.steps)t instanceof o?this.steps.push(t):this.steps.push(new o({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new s;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,n){this._cachedProjection[s.cacheKey(e,t)]=n}getCachedGeTransformation(e,t){let n="";for(const e of this.steps)n+=e.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const r=this._cachedProjection[s.cacheKey(e,t)];return void 0===r?null:r}}},69285:(e,t,n)=>{n.d(t,{k:()=>s});var r=n(67900),o=n(8744);function s(e,t,n){if(null==t||null==n||n.vcsWkid||(0,o.fS)(t,n))return null;const s=(0,r._R)(t)/(0,r._R)(n);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,s);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return null}}},24335:(e,t,n)=>{n.d(t,{Wh:()=>r,Pj:()=>o}),n(80442),n(1533),n(82971),n(60437),n(24470),n(82397),n(86973),n(1231),n(8744);class r{constructor(e,t,n){this.uid=e,this.geometry=t,this.attributes=n,this.visible=!0,this.objectId=null,this.centroid=null}}class o{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}}}]);