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

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 (261) hide show
  1. package/Color.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/arcade/arcadeCompiler.js +1 -1
  4. package/arcade/featureSetUtils.js +1 -1
  5. package/arcade/featureset/actions/Top.js +1 -1
  6. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  7. package/arcade/featureset/support/FeatureSet.js +1 -1
  8. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  9. package/arcade/functions/convertdirection.js +1 -1
  10. package/arcade/functions/featuresetbase.js +1 -1
  11. package/arcade/functions/geomasync.js +1 -1
  12. package/arcade/functions/geomsync.js +1 -1
  13. package/arcade/lib/comment-handler.js +1 -1
  14. package/arcade/lib/parser.js +1 -1
  15. package/arcade/lib/scanner.js +1 -1
  16. package/assets/esri/core/workers/RemoteClient.js +1 -1
  17. package/assets/esri/core/workers/chunks/{75c28da8d0b02d612d69.js → 040b3fc9c9c0736dd893.js} +1 -1
  18. package/assets/esri/core/workers/chunks/0652f6a8d5221e978033.js +1 -0
  19. package/assets/esri/core/workers/chunks/{c13b332afdb3f6be1ec9.js → 092fda62b6f62c2e4869.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{57e0ad037188bd2997e7.js → 0af18a96cbd4e2d35436.js} +1 -1
  21. package/assets/esri/core/workers/chunks/0b5eeec0f66c87a46a0c.js +1 -0
  22. package/assets/esri/core/workers/chunks/{68e568b67b6fb34393db.js → 0cad2b991d0d0fd07846.js} +1 -1
  23. package/assets/esri/core/workers/chunks/0dccbc6c2559fdc0c2ad.js +1 -0
  24. package/assets/esri/core/workers/chunks/256a82f6f6e1405fbcc6.js +1 -0
  25. package/assets/esri/core/workers/chunks/{bb9213899049e1db90da.js → 2c57c9bd71637c5bed8a.js} +1 -1
  26. package/assets/esri/core/workers/chunks/2cdbabcbfe32286ec78d.js +1 -0
  27. package/assets/esri/core/workers/chunks/{2b1c83453a862e01954b.js → 2d9d80b2d0042a9c09fb.js} +1 -1
  28. package/assets/esri/core/workers/chunks/2f9aec2238ff6cb99e09.js +1 -0
  29. package/assets/esri/core/workers/chunks/{7dbd3e6406fb3e3a1a8f.js → 3cf748c025f3936c1cb2.js} +1 -1
  30. package/assets/esri/core/workers/chunks/4481d1103363434f16da.js +1 -0
  31. package/assets/esri/core/workers/chunks/5ae325e6a795c72eac6c.js +1 -0
  32. package/assets/esri/core/workers/chunks/5e4dde2886a1027b4b96.js +1 -0
  33. package/assets/esri/core/workers/chunks/730eb7e5f617fdab4f10.js +1 -0
  34. package/assets/esri/core/workers/chunks/{5a2e6bed9431cf4f42b1.js → 740dc67038f554431f1b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{09178454bda15bb7929a.js → 7fbdfd1527582c52f9b6.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{1c026947505a9ff94a53.js → 807742f38885fa90b4fe.js} +1 -1
  37. package/assets/esri/core/workers/chunks/82dfbc175b52c7a10475.js +1 -0
  38. package/assets/esri/core/workers/chunks/870a05451e074b58f19a.js +1 -0
  39. package/assets/esri/core/workers/chunks/8c5a8c1dfb086069bb06.js +1 -0
  40. package/assets/esri/core/workers/chunks/99a5a434e0bad48c7a5c.js +1 -0
  41. package/assets/esri/core/workers/chunks/9a5916c66dad91d01d5b.js +1 -0
  42. package/assets/esri/core/workers/chunks/9c133fd8c1fbd0295b86.js +1 -0
  43. package/assets/esri/core/workers/chunks/9cddb504079d396779ea.js +1 -0
  44. package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +1 -0
  45. package/assets/esri/core/workers/chunks/{9548aa449fe3a300c015.js → a4fa40dc77e116c954ac.js} +1 -1
  46. package/assets/esri/core/workers/chunks/a54ec9929a7db879d5db.js +1 -0
  47. package/assets/esri/core/workers/chunks/afc5b84693757fda2bc8.js +1 -0
  48. package/assets/esri/core/workers/chunks/{591b5c277cfd3a4101a4.js → b08f2a4aa94087c6c367.js} +1 -1
  49. package/assets/esri/core/workers/chunks/c0e12f6a7bb2360e4c21.js +1 -0
  50. package/assets/esri/core/workers/chunks/c8e656cd470a17f538e9.js +1 -0
  51. package/assets/esri/core/workers/chunks/d0e203405f95e14b1399.js +1 -0
  52. package/assets/esri/core/workers/chunks/{ec72f492f24e67e008ae.js → d8e58dc14d3495f0830c.js} +1 -1
  53. package/assets/esri/core/workers/chunks/ddc393a012588f799f42.js +1 -0
  54. package/assets/esri/core/workers/chunks/de3baa85b1639c25458d.js +1 -0
  55. package/assets/esri/core/workers/chunks/e66cea26064ba8353af0.js +1 -0
  56. package/assets/esri/core/workers/chunks/ea478f2f4a19463e13fd.js +1 -0
  57. package/assets/esri/core/workers/chunks/eba197e45507f56f3ed0.js +1 -0
  58. package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +1 -0
  59. package/assets/esri/core/workers/chunks/ef9a9a7d66d818720e20.js +1 -0
  60. package/assets/esri/core/workers/chunks/f3b458f55236566c940b.js +1 -0
  61. package/assets/esri/core/workers/chunks/fd0a91b9e0216cc269c3.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a4fe220a912b1f428e49.js → fdd6403a8390d629392b.js} +1 -1
  63. package/assets/esri/themes/base/widgets/_Directions.scss +13 -7
  64. package/assets/esri/themes/dark/main.css +1 -1
  65. package/assets/esri/themes/light/main.css +1 -1
  66. package/assets/esri/themes/light/view.css +1 -1
  67. package/chunks/array.js +1 -1
  68. package/core/Collection.js +1 -1
  69. package/core/accessorSupport/decorators/subclass.js +1 -1
  70. package/core/accessorSupport/ensureType.js +1 -1
  71. package/core/accessorSupport/get.js +1 -1
  72. package/core/accessorSupport/tracking.js +1 -1
  73. package/core/accessorSupport/utils.js +1 -1
  74. package/core/libs/rbush/PooledRBush.js +1 -1
  75. package/core/urlUtils.js +1 -1
  76. package/geometry/GeometryCursor.js +1 -1
  77. package/geometry/support/TileClipper.js +1 -1
  78. package/geometry/support/geodesicUtils.js +1 -1
  79. package/interfaces.d.ts +7 -1
  80. package/layers/LinkChartLayer.js +1 -1
  81. package/layers/VectorTileLayer.js +1 -1
  82. package/layers/VoxelLayer.js +1 -1
  83. package/layers/WCSLayer.js +1 -1
  84. package/layers/effects/EffectView.js +1 -1
  85. package/layers/graphics/sources/geojson/geojson.js +1 -1
  86. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  87. package/layers/mixins/ArcGISCachedService.js +1 -1
  88. package/layers/support/ElevationQuery.js +1 -1
  89. package/layers/support/MultidimensionalSubset.js +1 -1
  90. package/layers/support/TileInfo.js +1 -1
  91. package/layers/support/TileInfoTilemapCache.js +1 -1
  92. package/layers/support/TilemapCache.js +1 -1
  93. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  94. package/layers/support/rasterDatasets/pamParser.js +1 -1
  95. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  96. package/layers/support/rasterFormats/Raw.js +1 -1
  97. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  98. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  99. package/layers/support/rasterFunctions/colormaps.js +1 -1
  100. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  101. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  102. package/layers/video/VideoController.js +1 -1
  103. package/layers/voxel/VoxelDimension.js +1 -1
  104. package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
  105. package/layers/voxel/VoxelVolume.js +1 -1
  106. package/package.json +1 -1
  107. package/renderers/support/RasterSymbolizer.js +1 -1
  108. package/renderers/support/colorRampUtils.js +1 -1
  109. package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
  110. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  111. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  112. package/rest/support/generateRendererUtils.js +1 -1
  113. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  114. package/smartMapping/renderers/color.js +1 -1
  115. package/smartMapping/renderers/support/utils.js +1 -1
  116. package/smartMapping/renderers/type.js +1 -1
  117. package/smartMapping/renderers/univariateColorSize.js +1 -1
  118. package/smartMapping/support/adapters/support/utils.js +1 -1
  119. package/statistics/utils.js +1 -1
  120. package/support/revision.js +1 -1
  121. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  122. package/symbols/cim/GeometryWalker.js +1 -1
  123. package/symbols/cim/cimAnalyzer.js +1 -1
  124. package/symbols/cim/effects/EffectArrow.js +1 -1
  125. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  126. package/symbols/support/symbolUtils.js +1 -1
  127. package/views/2d/constraints/ZoomConstraint.js +1 -1
  128. package/views/2d/engine/flow/dataUtils.js +1 -1
  129. package/views/2d/engine/flow/utils.js +1 -1
  130. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  131. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  132. package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
  133. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  134. package/views/2d/engine/vectorTiles/tileInfoUtils.js +1 -1
  135. package/views/2d/engine/webgl/TurboLine.js +1 -1
  136. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  137. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  138. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  139. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  140. package/views/2d/layers/BaseLayerView2D.js +1 -1
  141. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  142. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  143. package/views/2d/layers/MediaLayerView2D.js +1 -1
  144. package/views/2d/layers/TileLayerView2D.js +1 -1
  145. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  146. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  147. package/views/2d/layers/features/support/rendererUtils.js +1 -1
  148. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  149. package/views/2d/layers/support/vectorTileDebugUtils.js +5 -0
  150. package/views/2d/tiling/TileInfoView.js +1 -1
  151. package/views/2d/tiling/TileInfoViewPOT.js +1 -1
  152. package/views/2d/tiling/TileQueue.js +1 -1
  153. package/views/2d/tiling.js +1 -1
  154. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  155. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  156. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  157. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  158. package/views/3d/layers/TiledLayerView3D.js +1 -1
  159. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  160. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  161. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  162. package/views/3d/layers/support/featureReference.js +1 -1
  163. package/views/3d/support/LaserLineRenderer.js +1 -1
  164. package/views/3d/terrain/Overlay.js +1 -1
  165. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  166. package/views/3d/terrain/OverlayRenderTarget.js +1 -1
  167. package/views/3d/terrain/OverlayRenderer.js +1 -1
  168. package/views/3d/terrain/TerrainRenderer.js +1 -1
  169. package/views/3d/terrain/TileCompositor.js +1 -1
  170. package/views/3d/terrain/TileRenderer.js +1 -1
  171. package/views/3d/terrain/TilingScheme.js +1 -1
  172. package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
  173. package/views/3d/webgl-engine/core/shaderModules/interfaces.js +1 -1
  174. package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
  175. package/views/3d/webgl-engine/effects/SmaaRenderPass.js +1 -1
  176. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  177. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  178. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  179. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  180. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  181. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  182. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  183. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  184. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  185. package/views/3d/webgl-engine/parts/requireUtils.js +1 -1
  186. package/views/MapView.js +1 -1
  187. package/views/animation/pointToPoint/Path.js +1 -1
  188. package/views/draw/DrawOperation.js +1 -1
  189. package/views/draw/support/Reshape.js +1 -1
  190. package/views/draw/support/createUtils.js +1 -1
  191. package/views/interactive/SegmentLabels.js +1 -1
  192. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  193. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  194. package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
  195. package/views/layers/GroupLayerView.js +1 -1
  196. package/views/webgl/ProgramCache.js +1 -1
  197. package/webscene/spec-certification/api.js +1 -1
  198. package/webscene/spec-certification/spec.js +1 -1
  199. package/webscene/spec-certification/utils.js +1 -1
  200. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
  201. package/widgets/BuildingExplorer/BuildingPhase.js +1 -1
  202. package/widgets/BuildingExplorer/support/validation.js +1 -1
  203. package/widgets/Directions/support/resources.js +1 -1
  204. package/widgets/Directions.js +1 -1
  205. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  206. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  207. package/widgets/FeatureForm/FieldInput.js +1 -1
  208. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  209. package/widgets/FeatureForm.js +1 -1
  210. package/widgets/Features.js +1 -1
  211. package/widgets/Histogram/HistogramViewModel.js +1 -1
  212. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
  213. package/widgets/Legend/styles/Card.js +1 -1
  214. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  215. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  216. package/widgets/Legend/support/colorRampUtils.js +1 -1
  217. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  218. package/widgets/Legend/support/utils.js +1 -1
  219. package/widgets/Popup.js +1 -1
  220. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  221. package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
  222. package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
  223. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  224. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  225. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.js +1 -1
  226. package/widgets/smartMapping/SizeSlider.js +1 -1
  227. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.js +1 -1
  228. package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
  229. package/assets/esri/core/workers/chunks/0210f4c2e1f3ed13041b.js +0 -1
  230. package/assets/esri/core/workers/chunks/07bb40162d97d098bc19.js +0 -1
  231. package/assets/esri/core/workers/chunks/0a18317566c1fcb68422.js +0 -1
  232. package/assets/esri/core/workers/chunks/0de65e03db8c611af9fb.js +0 -1
  233. package/assets/esri/core/workers/chunks/1a60d23a92bcf91dbb22.js +0 -1
  234. package/assets/esri/core/workers/chunks/205a0b34b698d5329854.js +0 -1
  235. package/assets/esri/core/workers/chunks/25211d5904ee9d5f4a9d.js +0 -1
  236. package/assets/esri/core/workers/chunks/26b12d1ea713c1e07701.js +0 -1
  237. package/assets/esri/core/workers/chunks/2bfa7ee324c32a56b0d3.js +0 -1
  238. package/assets/esri/core/workers/chunks/4510a17839405146130b.js +0 -1
  239. package/assets/esri/core/workers/chunks/524156c3f5383c2dd0e3.js +0 -1
  240. package/assets/esri/core/workers/chunks/59666ecb7c2c1f5a13b2.js +0 -1
  241. package/assets/esri/core/workers/chunks/5c005c9514354c77ec27.js +0 -1
  242. package/assets/esri/core/workers/chunks/620ec5c75561183d3d73.js +0 -1
  243. package/assets/esri/core/workers/chunks/68512670816f59c0e6a5.js +0 -1
  244. package/assets/esri/core/workers/chunks/6c7374ebc18b46b3480a.js +0 -1
  245. package/assets/esri/core/workers/chunks/75ba2af92da232067adb.js +0 -1
  246. package/assets/esri/core/workers/chunks/7c1f0598a016516dcec3.js +0 -1
  247. package/assets/esri/core/workers/chunks/8dcec8d1b670d2b7ea2b.js +0 -1
  248. package/assets/esri/core/workers/chunks/8e07dfb6fc2673b640cb.js +0 -1
  249. package/assets/esri/core/workers/chunks/9050b167355588b7003d.js +0 -1
  250. package/assets/esri/core/workers/chunks/9230d68799f0b0b9ef36.js +0 -1
  251. package/assets/esri/core/workers/chunks/af4083f2aad5f5d49dde.js +0 -1
  252. package/assets/esri/core/workers/chunks/b0a57718a0765d1c8df0.js +0 -1
  253. package/assets/esri/core/workers/chunks/b431b81a7bf45dd527da.js +0 -1
  254. package/assets/esri/core/workers/chunks/bda311ad48efdb265939.js +0 -1
  255. package/assets/esri/core/workers/chunks/d5cce09fbe16cbb8fee4.js +0 -1
  256. package/assets/esri/core/workers/chunks/da547c3cabe4a89c3ce6.js +0 -1
  257. package/assets/esri/core/workers/chunks/dd295fa57b45b7ec4ec5.js +0 -1
  258. package/assets/esri/core/workers/chunks/f553b464e969d45bf451.js +0 -1
  259. package/assets/esri/core/workers/chunks/f5865294983eb160de8c.js +0 -1
  260. package/assets/esri/core/workers/chunks/fdb7b1fbdb6fe091ad83.js +0 -1
  261. package/views/2d/tiling/PagedTileQueue.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9805,5732],{22303:(t,e,r)=>{r.d(e,{Z:()=>c});var i,n,s=r(35270),a=r(22021),o=r(75215);function l(t){return(0,a.uZ)((0,o.vU)(t),0,255)}function u(t,e,r){return t=Number(t),isNaN(t)?r:t<e?e:t>r?r:t}class h{static blendColors(t,e,r,i=new h){return i.r=Math.round(t.r+(e.r-t.r)*r),i.g=Math.round(t.g+(e.g-t.g)*r),i.b=Math.round(t.b+(e.b-t.b)*r),i.a=t.a+(e.a-t.a)*r,i._sanitize()}static fromRgb(t,e){const r=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const t=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===t.length||"rgba"===i&&4===t.length){if("%"===t[0].at(-1)){const r=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(r[3]=parseFloat(t[3])),h.fromArray(r,e)}return h.fromArray(t.map((t=>parseFloat(t))),e)}if("hsl"===i&&3===t.length||"hsla"===i&&4===t.length)return h.fromArray((0,s.B7)(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3])),e)}return null}static fromHex(t,e=new h){if(4!==t.length&&7!==t.length||"#"!==t[0])return null;const r=4===t.length?4:8,i=(1<<r)-1;let n=Number("0x"+t.substr(1));return isNaN(n)?null:(["b","g","r"].forEach((t=>{const s=n&i;n>>=r,e[t]=4===r?17*s:s})),e.a=1,e)}static fromArray(t,e=new h){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const r=(0,s.St)(t)?(0,s.h$)(t):null;return r&&h.fromArray(r,e)||h.fromRgb(t,e)||h.fromHex(t,e)}static fromJSON(t){return null!=t?new h([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?h.fromString(t,this):Array.isArray(t)?h.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return`#${t.length<2?"0"+t:t}${e.length<2?"0"+e:e}${r.length<2?"0"+r:r}`}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=h.AlphaMode.ALWAYS){const e=l(this.r),r=l(this.g),i=l(this.b);return t===h.AlphaMode.ALWAYS||1!==this.a?[e,r,i,l(255*this.a)]:[e,r,i]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(t,e,r,i){this.r=t,this.g=e,this.b=r,this.a=i}}h.prototype.declaredClass="esri.Color",i=h||(h={}),(n=i.AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const c=h},5732:(t,e,r)=>{r.d(e,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},88669:(t,e,r)=>{function i(){return[0,0,0,0]}function n(t,e,r,i){return[t,e,r,i]}function s(t,e){return new Float64Array(t,e,4)}function a(){return n(1,1,1,1)}function o(){return n(1,0,0,0)}function l(){return n(0,1,0,0)}function u(){return n(0,0,1,0)}function h(){return n(0,0,0,1)}r.d(e,{a:()=>s,c:()=>i,f:()=>n});const c=a(),p=o(),y=l(),f=u(),_=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_W:_,UNIT_X:p,UNIT_Y:y,UNIT_Z:f,ZEROS:[0,0,0,0],clone:function(t){return[t[0],t[1],t[2],t[3]]},create:i,createView:s,fromArray:function(t,e=[0,0,0,0]){const r=Math.min(4,t.length);for(let i=0;i<r;++i)e[i]=t[i];return e},fromValues:n,ones:a,unitW:h,unitX:o,unitY:l,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},3892:(t,e,r)=>{function i(t){return"h"in t&&"s"in t&&"v"in t}function n(t){return"l"in t&&"a"in t&&"b"in t}function s(t){return"l"in t&&"c"in t&&"h"in t}r.d(e,{Y3:()=>_,_Y:()=>f,sJ:()=>m,xr:()=>y}),r(22303),r(88669);const a=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],o=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(t,e){const r=[];let i,n;if(t[0].length!==e.length)throw new Error("dimensions do not match");const s=t.length,a=t[0].length;let o=0;for(i=0;i<s;i++){for(o=0,n=0;n<a;n++)o+=t[i][n]*e[n];r.push(o)}return r}function u(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=l(a,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function h(t){const e=l(o,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function c(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function p(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(t){return function(t){return"r"in t&&"g"in t&&"b"in t}(t)?t:s(t)?function(t){return h(p(function(t){const e=t.l,r=t.c,i=t.h;return{l:e,a:r*Math.cos(i),b:r*Math.sin(i)}}(t)))}(t):n(t)?function(t){return h(p(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?h(t):i(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,i=t.v/100*255,n=i*r,s=n*(1-Math.abs(e%2-1));let a;switch(Math.floor(e)){case 0:a={r:n,g:s,b:0};break;case 1:a={r:s,g:n,b:0};break;case 2:a={r:0,g:n,b:s};break;case 3:a={r:0,g:s,b:n};break;case 4:a={r:s,g:0,b:n};break;case 5:case 6:a={r:n,g:0,b:s};break;default:a={r:0,g:0,b:0}}return a.r=Math.round(a.r+i-n),a.g=Math.round(a.g+i-n),a.b=Math.round(a.b+i-n),a}(t):t}function f(t){return i(t)?t:function(t){const e=t.r,r=t.g,i=t.b,n=Math.max(e,r,i),s=n-Math.min(e,r,i);let a=n,o=0===s?0:n===e?(r-i)/s%6:n===r?(i-e)/s+2:(e-r)/s+4,l=0===s?0:s/a;return o<0&&(o+=6),o*=60,l*=100,a*=100/255,{h:o,s:l,v:a}}(y(t))}function _(t){return n(t)?t:function(t){return c(u(t))}(y(t))}function m(t){return s(t)?t:function(t){return function(t){const e=t.l,r=t.a,i=t.b,n=Math.sqrt(r*r+i*i);let s=Math.atan2(i,r);return s=s>0?s:s+2*Math.PI,{l:e,c:n,h:s}}(c(u(t)))}(y(t))}},59255:(t,e,r)=>{var i,n,s;r.d(e,{E9:()=>a,I6:()=>u,Vl:()=>i,bN:()=>l}),(s=i||(i={}))[s.Unknown=0]="Unknown",s[s.Point=1]="Point",s[s.LineString=2]="LineString",s[s.Polygon=3]="Polygon";class a{constructor(t,e){this.x=t,this.y=e}clone(){return new a(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return null!=t&&t.x===this.x&&t.y===this.y}setCoords(t,e){this.x=t,this.y=e}normalize(){const t=this.x,e=this.y,r=Math.sqrt(t*t+e*e);this.x/=r,this.y/=r}rightPerpendicular(){const t=this.x;this.x=this.y,this.y=-t}move(t,e){this.x+=t,this.y+=e}assign(t){this.x=t.x,this.y=t.y}assignAdd(t,e){this.x=t.x+e.x,this.y=t.y+e.y}assignSub(t,e){this.x=t.x-e.x,this.y=t.y-e.y}rotate(t,e){const r=this.x,i=this.y;this.x=r*t-i*e,this.y=r*e+i*t}scale(t){this.x*=t,this.y*=t}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}static distance(t,e){const r=e.x-t.x,i=e.y-t.y;return Math.sqrt(r*r+i*i)}static add(t,e){return new a(t.x+e.x,t.y+e.y)}static sub(t,e){return new a(t.x-e.x,t.y-e.y)}}class o{constructor(t,e,r){this.ratio=t,this.x=e,this.y=r}}class l{constructor(t,e,r,i=8,n=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=i,this._pixelMargin=n,this._tileSize=512*i,this._dz=t,this._yPos=e,this._xPos=r}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;const r=t>>this._dz;e>r&&(e=r),this._margin=e,this._xmin=r*this._xPos-e,this._ymin=r*this._yPos-e,this._xmax=this._xmin+r+2*e,this._ymax=this._ymin+r+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new a(t,e),this._firstPt=new a(t,e),this._dist=0}lineTo(t,e){const r=this._isIn(t,e),i=new a(t,e),n=a.distance(this._prevPt,i);let s,l,u,h,c,p,y,f;if(r)this._prevIsIn?this._lineTo(t,e,!0):(s=this._prevPt,l=i,u=this._intersect(l,s),this._start=this._dist+n*(1-this._r),this._lineTo(u.x,u.y,!0),this._lineTo(l.x,l.y,!0));else if(this._prevIsIn)l=this._prevPt,s=i,u=this._intersect(l,s),this._lineTo(u.x,u.y,!0),this._lineTo(s.x,s.y,!1);else{const t=this._prevPt,e=i;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{const r=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(h=(this._xmin-t.x)/(e.x-t.x),f=t.y+h*(e.y-t.y),f<=this._ymin?p=!1:f>=this._ymax?p=!0:r.push(new o(h,this._xmin,f))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(h=(this._xmax-t.x)/(e.x-t.x),f=t.y+h*(e.y-t.y),f<=this._ymin?p=!1:f>=this._ymax?p=!0:r.push(new o(h,this._xmax,f))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(h=(this._ymin-t.y)/(e.y-t.y),y=t.x+h*(e.x-t.x),y<=this._xmin?c=!1:y>=this._xmax?c=!0:r.push(new o(h,y,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(h=(this._ymax-t.y)/(e.y-t.y),y=t.x+h*(e.x-t.x),y<=this._xmin?c=!1:y>=this._xmax?c=!0:r.push(new o(h,y,this._ymax))),0===r.length)c?p?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):p?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(r.length>1&&r[0].ratio>r[1].ratio)this._start=this._dist+n*r[1].ratio,this._lineTo(r[1].x,r[1].y,!0),this._lineTo(r[0].x,r[0].y,!0);else{this._start=this._dist+n*r[0].ratio;for(let t=0;t<r.length;t++)this._lineTo(r[t].x,r[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=n,this._prevIsIn=r,this._prevPt=i}close(){if(this._line.length>2){const t=this._firstPt,e=this._prevPt;t.x===e.x&&t.y===e.y||this.lineTo(t.x,t.y);const r=this._line;let i=r.length;for(;i>=4&&(r[0].x===r[1].x&&r[0].x===r[i-2].x||r[0].y===r[1].y&&r[0].y===r[i-2].y);)r.pop(),r[0].x=r[i-2].x,r[0].y=r[i-2].y,--i}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(this._type===i.Polygon&&t&&h.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(this._type!==i.LineString)throw new Error("Only valid for lines");this._pushLine();const t=this._lines,e=t.length;if(0===e)return null;const r=[];for(let i=0;i<e;i++)r.push({line:t[i],start:this._starts[i]||0});return r}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let r,i,n;if(e.x>=this._xmin&&e.x<=this._xmax)i=e.y<=this._ymin?this._ymin:this._ymax,n=(i-t.y)/(e.y-t.y),r=t.x+n*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)r=e.x<=this._xmin?this._xmin:this._xmax,n=(r-t.x)/(e.x-t.x),i=t.y+n*(e.y-t.y);else{i=e.y<=this._ymin?this._ymin:this._ymax,r=e.x<=this._xmin?this._xmin:this._xmax;const s=(r-t.x)/(e.x-t.x),a=(i-t.y)/(e.y-t.y);s<a?(n=s,i=t.y+s*(e.y-t.y)):(n=a,r=t.x+a*(e.x-t.x))}return this._r=n,new a(r,i)}_pushLine(){this._line&&(this._type===i.Point?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===i.LineString?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===i.Polygon&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,r){this._type!==i.Polygon?r&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new a(t,e))):(r||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new a(t,e)),this._isH=!1,this._isV=!1)}_lineTo(t,e,r){let n,s;if(this._type!==i.Polygon)if(r){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(n=this._line.at(-1),n.equals(t,e)))return;this._line.push(new a(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(r||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){n=this._line.at(-1);const r=n.x===t,i=n.y===e;if(r&&i)return;this._isH&&r||this._isV&&i?(n.x=t,n.y=e,s=this._line.at(-2),s.x===t&&s.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(s=this._line.at(-2),this._isH=s.x===t,this._isV=s.y===e)):(this._isH=s.x===t,this._isV=s.y===e)):(this._line.push(new a(t,e)),this._isH=r,this._isV=i)}else this._line.push(new a(t,e))}}class u{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];const r=this._ratio;this._line.push(new a(t*r,e*r))}lineTo(t,e){const r=this._ratio;this._line.push(new a(t*r,e*r))}close(){const t=this._line;t&&!t[0].isEqual(t.at(-1))&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}!function(t){t[t.sideLeft=0]="sideLeft",t[t.sideRight=1]="sideRight",t[t.sideTop=2]="sideTop",t[t.sideBottom=3]="sideBottom"}(n||(n={}));class h{static simplify(t,e,r){if(!r)return;const i=-e,s=t+e,a=-e,o=t+e,l=[],u=[],c=r.length;for(let t=0;t<c;++t){const e=r[t];if(!e||e.length<2)continue;let h,c=e[0];const p=e.length;for(let r=1;r<p;++r)h=e[r],c.x===h.x&&(c.x<=i&&(c.y>h.y?(l.push(t),l.push(r),l.push(n.sideLeft),l.push(-1)):(u.push(t),u.push(r),u.push(n.sideLeft),u.push(-1))),c.x>=s&&(c.y<h.y?(l.push(t),l.push(r),l.push(n.sideRight),l.push(-1)):(u.push(t),u.push(r),u.push(n.sideRight),u.push(-1)))),c.y===h.y&&(c.y<=a&&(c.x<h.x?(l.push(t),l.push(r),l.push(n.sideTop),l.push(-1)):(u.push(t),u.push(r),u.push(n.sideTop),u.push(-1))),c.y>=o&&(c.x>h.x?(l.push(t),l.push(r),l.push(n.sideBottom),l.push(-1)):(u.push(t),u.push(r),u.push(n.sideBottom),u.push(-1)))),c=h}if(0===l.length||0===u.length)return;h.fillParent(r,u,l),h.fillParent(r,l,u);const p=[];h.calcDeltas(p,u,l),h.calcDeltas(p,l,u),h.addDeltas(p,r)}static fillParent(t,e,r){const i=r.length,s=e.length;for(let a=0;a<s;a+=4){const s=e[a],o=e[a+1],l=e[a+2],u=t[s][o-1],h=t[s][o];let p=8092,y=-1;for(let e=0;e<i;e+=4){if(r[e+2]!==l)continue;const i=r[e],s=r[e+1],a=t[i][s-1],o=t[i][s];switch(l){case n.sideLeft:case n.sideRight:if(c(u.y,a.y,o.y)&&c(h.y,a.y,o.y)){const t=Math.abs(o.y-a.y);t<p&&(p=t,y=e)}break;case n.sideTop:case n.sideBottom:if(c(u.x,a.x,o.x)&&c(h.x,a.x,o.x)){const t=Math.abs(o.x-a.x);t<p&&(p=t,y=e)}}}e[a+3]=y}}static calcDeltas(t,e,r){const i=e.length;for(let n=0;n<i;n+=4){const i=[],s=h.calcDelta(n,e,r,i);t.push(e[n]),t.push(e[n+1]),t.push(e[n+2]),t.push(s)}}static calcDelta(t,e,r,i){const n=e[t+3];if(-1===n)return 0;const s=i.length;return s>1&&i[s-2]===n?0:(i.push(n),h.calcDelta(n,r,e,i)+1)}static addDeltas(t,e){const r=t.length;let i=0;for(let e=0;e<r;e+=4){const r=t[e+3];r>i&&(i=r)}for(let s=0;s<r;s+=4){const r=e[t[s]],a=t[s+1],o=i-t[s+3];switch(t[s+2]){case n.sideLeft:r[a-1].x-=o,r[a].x-=o,1===a&&(r.at(-1).x-=o),a===r.length-1&&(r[0].x-=o);break;case n.sideRight:r[a-1].x+=o,r[a].x+=o,1===a&&(r.at(-1).x+=o),a===r.length-1&&(r[0].x+=o);break;case n.sideTop:r[a-1].y-=o,r[a].y-=o,1===a&&(r.at(-1).y-=o),a===r.length-1&&(r[0].y-=o);break;case n.sideBottom:r[a-1].y+=o,r[a].y+=o,1===a&&(r.at(-1).y+=o),a===r.length-1&&(r[0].y+=o)}}}}const c=(t,e,r)=>t>=e&&t<=r||t>=r&&t<=e},31363:(t,e,r)=>{r.d(e,{B1:()=>i,DQ:()=>u,DT:()=>o,JJ:()=>n,Or:()=>h,_U:()=>s,k3:()=>c,sX:()=>p});const i=Number.POSITIVE_INFINITY,n=Math.PI,s=2*n,a=128/n,o=n/180,l=1/Math.LN2;function u(t,e){return(t%=e)>=0?t:t+e}function h(t){return u(t*a,256)}function c(t){return Math.log(t)*l}function p(t,e,r){return t*(1-r)+e*r}},26084:(t,e,r)=>{r.d(e,{Z:()=>i});class i{constructor(t){this._array=[],t<=0&&console.error("strideInBytes must be positive!"),this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}static i1616to32(t,e){return 65535&t|e<<16}static i8888to32(t,e,r,i){return 255&t|(255&e)<<8|(255&r)<<16|i<<24}static i8816to32(t,e,r){return 255&t|(255&e)<<8|r<<16}}},4215:(t,e,r)=>{var i,n,s;r.d(e,{Fr:()=>s,_K:()=>n,al:()=>i}),function(t){t[t.FILL=1]="FILL",t[t.LINE=2]="LINE",t[t.SYMBOL=3]="SYMBOL",t[t.CIRCLE=4]="CIRCLE"}(i||(i={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.FILL=1]="FILL",t[t.OUTLINE=2]="OUTLINE",t[t.LINE=3]="LINE",t[t.ICON=4]="ICON",t[t.CIRCLE=5]="CIRCLE",t[t.TEXT=6]="TEXT",t[t.TILEINFO=7]="TILEINFO"}(n||(n={})),function(t){t[t.PAINTER_CHANGED=0]="PAINTER_CHANGED",t[t.LAYOUT_CHANGED=1]="LAYOUT_CHANGED",t[t.LAYER_CHANGED=2]="LAYER_CHANGED",t[t.LAYER_REMOVED=3]="LAYER_REMOVED",t[t.SPRITES_CHANGED=4]="SPRITES_CHANGED"}(s||(s={}))},21315:(t,e,r)=>{r.d(e,{R:()=>s,_5:()=>u,aF:()=>a,f2:()=>f,fR:()=>i,nR:()=>l,r1:()=>c,vL:()=>o});var i,n,s,a,o,l,u,h,c,p,y=r(95648);(p=i||(i={}))[p.BACKGROUND=0]="BACKGROUND",p[p.FILL=1]="FILL",p[p.LINE=2]="LINE",p[p.SYMBOL=3]="SYMBOL",p[p.CIRCLE=4]="CIRCLE",function(t){t[t.VISIBLE=0]="VISIBLE",t[t.NONE=1]="NONE"}(n||(n={})),function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE",t[t.LINE_CENTER=2]="LINE_CENTER"}(s||(s={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT",t[t.AUTO=2]="AUTO"}(a||(a={})),function(t){t[t.AUTO=0]="AUTO",t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(o||(o={})),function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=3]="TOP",t[t.BOTTOM=4]="BOTTOM",t[t.TOP_LEFT=5]="TOP_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_LEFT=7]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(l||(l={})),function(t){t[t.NONE=0]="NONE",t[t.UPPERCASE=1]="UPPERCASE",t[t.LOWERCASE=2]="LOWERCASE"}(u||(u={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT"}(h||(h={})),function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(c||(c={}));class f{}f.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:n.VISIBLE}},f.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:n.VISIBLE}},f.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:n.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:y.RL.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:y.AH.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}},f.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:n.VISIBLE},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:s.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:a.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:o.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:a.AUTO},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:u.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[c.HORIZONTAL]}},f.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:n.VISIBLE}},f.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}},f.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP}},f.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP},"line-width":{type:"number",minimum:0,default:1}},f.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP}},f.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}},f.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP}}},7333:(t,e,r)=>{r.d(e,{Et:()=>Lt,sj:()=>Ut,Le:()=>Pt,_L:()=>Bt,gf:()=>St,jG:()=>Ot,nj:()=>Gt});var i,n,s=r(4215),a=r(26084);!function(t){t[t.R8_SIGNED=0]="R8_SIGNED",t[t.R8_UNSIGNED=1]="R8_UNSIGNED",t[t.R16_SIGNED=2]="R16_SIGNED",t[t.R16_UNSIGNED=3]="R16_UNSIGNED",t[t.R8G8_SIGNED=4]="R8G8_SIGNED",t[t.R8G8_UNSIGNED=5]="R8G8_UNSIGNED",t[t.R16G16_SIGNED=6]="R16G16_SIGNED",t[t.R16G16_UNSIGNED=7]="R16G16_UNSIGNED",t[t.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED",t[t.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED",t[t.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR",t[t.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY",t[t.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"}(i||(i={})),function(t){t[t.UNIFORM=0]="UNIFORM",t[t.DATA_DRIVEN=1]="DATA_DRIVEN",t[t.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN",t[t.UNUSED=3]="UNUSED"}(n||(n={}));var o=r(35371),l=r(21968);class u{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layoutInfo||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layoutInfo||this._buildAttributesInfo(),this._layoutInfo}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,r,i,n){const s=this.getUniforms();for(const a of s){const{name:s,type:o,getValue:l}=a,u=l(r,e,i,n);if(null!==u)switch(o){case"float":t.setUniform1f(s,u);break;case"vec2":t.setUniform2fv(s,u);break;case"vec4":t.setUniform4fv(s,u)}}}encodeAttributes(t,e,r,n){const s=this.attributesInfo(),a=this.getEncodingInfos(),o=[];let l=0,u=0;for(const h of Object.keys(a)){const c=a[h],{type:p,precisionFactor:y,isLayout:f}=s[h],_=f?r.getLayoutProperty(h):r.getPaintProperty(h),m=_.interpolator?.getInterpolationRange(e);let g=0;for(const r of c){const{offset:s,bufferElementsToAdd:a}=r;if(a>0){for(let t=0;t<a;t++)o.push(0);l+=u,u=r.bufferElementsToAdd}const h=n??_.getValue(m?m[g]:e,t);switch(p){case i.R8_SIGNED:case i.R8_UNSIGNED:o[l]|=this._encodeByte(h*(y||1),8*s);break;case i.R16_SIGNED:case i.R16_UNSIGNED:o[l]|=this._encodeShort(h*(y||1),8*s);break;case i.R8G8_SIGNED:case i.R8G8_UNSIGNED:o[l]|=this._encodeByte(h*(y||1),8*s),o[l]|=this._encodeByte(h*(y||1),8*s+8);break;case i.R16G16_SIGNED:case i.R16G16_UNSIGNED:o[l]|=this._encodeShort(h*(y||1),8*s),o[l]|=this._encodeShort(h*(y||1),8*s+16);break;case i.R8G8B8A8_SIGNED:case i.R8G8B8A8_UNSIGNED:o[l]|=this._encodeByte(h*(y||1),8*s),o[l]|=this._encodeByte(h*(y||1),8*s+8),o[l]|=this._encodeByte(h*(y||1),8*s+16),o[l]|=this._encodeByte(h*(y||1),8*s+24);break;case i.R8G8B8A8_COLOR:o[l]=this._encodeColor(h);break;case i.R16G16B16A16_DASHARRAY:case i.R16G16B16A16_PATTERN:this._encodePattern(l,o,h);break;default:throw new Error("Unsupported encoding type")}g++}}return o}getAtributeState(t){let e=0;const r=3+2*t;return e|=this._bit(r),e|=this._bit(r+1)<<1,e}_buildAttributesInfo(){const t=[],e={},r={};let i=-1;const s=this.attributesInfo(),a=this.attributes();let l=-1;for(const o of a){l++;const a=this.getAtributeState(l);if(a===n.UNIFORM||a===n.UNUSED)continue;const h=s[o],c=[];e[o]=c;const p=h.type;for(let e=0;e<a;e++){const{dataType:e,bytesPerElement:n,count:s,normalized:a}=u._encodingInfo[p],o=n*s,l=`${e}-${!0===a}`;let h=r[l],y=0;if(!h||h.count+s>4)i++,h={dataIndex:i,count:0,offset:0},4!==s&&(r[l]=h),t.push({location:-1,name:"a_data_"+i,count:s,type:e,normalized:a}),y=Math.ceil(Math.max(o/4,1));else{const e=t[h.dataIndex];e.count+=s,y=Math.ceil(Math.max(e.count*n/4,1))-Math.ceil(Math.max(h.offset/4,1))}c.push({dataIndex:h.dataIndex,offset:h.offset,bufferElementsToAdd:y}),h.offset+=o,h.count+=s}}for(const e of t)switch(e.type){case o.g.BYTE:case o.g.UNSIGNED_BYTE:e.count=4;break;case o.g.SHORT:case o.g.UNSIGNED_SHORT:e.count+=e.count%2}this._buildVertexBufferLayout(t);let h=0;const c=this._layoutInfo.geometry;for(const t of c)this._locations.set(t.name,h++);const p=this._layoutInfo.opacity;if(p)for(const t of p)this._locations.set(t.name,h++);this._buildShaderInfo(t,e),this._propertyEncodingInfo=e}_buildVertexBufferLayout(t){const e={},r=this.geometryInfo();let i=r[0].stride;if(0===t.length)e.geometry=r;else{const n=[];let s=i;for(const e of t)i+=h(e.type)*e.count;for(const t of r)n.push(new l.G(t.name,t.count,t.type,t.offset,i,t.normalized));for(const e of t)n.push(new l.G(e.name,e.count,e.type,s,i,e.normalized)),s+=h(e.type)*e.count;e.geometry=n}this.opacityInfo()&&(e.opacity=this.opacityInfo()),this._layoutInfo=e,this._stride=i}_buildShaderInfo(t,e){let r="\n",s="\n";const a=[];for(const e of t)r+=`attribute ${this._getType(e.count)} ${e.name};\n`;const o=this.attributes(),l=this.attributesInfo();let h=-1;for(const t of o){h++;const{name:o,type:p,precisionFactor:y,isLayout:f}=l[t],_=y&&1!==y?" * "+1/y:"",{bytesPerElement:m,count:g}=u._encodingInfo[p],d=t=>`a_data_${t.dataIndex}${c(g,t.offset,m)}`;switch(this.getAtributeState(h)){case n.UNIFORM:{const e=this._getType(g),n=`u_${o}`;a.push({name:n,type:e,getValue:(e,r,n,s)=>{const a=f?e.getLayoutValue(t,r):e.getPaintValue(t,r);if(p===i.R16G16B16A16_DASHARRAY){const t=e.getDashKey(a,e.getLayoutValue("line-cap",r)),i=s.getMosaicItemPosition(t,!1);if(null==i)return null;const{tl:n,br:o}=i;return[n[0],o[1],o[0],n[1]]}if(p===i.R16G16B16A16_PATTERN){const e=s.getMosaicItemPosition(a,!t.includes("line-"));if(null==e)return null;const{tl:r,br:i}=e;return[r[0],i[1],i[0],r[1]]}if(p===i.R8G8B8A8_COLOR){const t=a[3];return[t*a[0],t*a[1],t*a[2],t]}return a}}),r+=`uniform ${e} ${n};\n`,s+=`${e} ${o} = ${n};\n`}break;case n.DATA_DRIVEN:{const r=d(e[t][0]);s+=`${this._getType(g)} ${o} = ${r}${_};\n`}break;case n.INTERPOLATED_DATA_DRIVEN:{const i=`u_t_${o}`;a.push({name:i,type:"float",getValue:(e,r,i,n)=>(f?e.getLayoutProperty(t):e.getPaintProperty(t)).interpolator.interpolationUniformValue(i,r)}),r+=`uniform float ${i};\n`;const n=d(e[t][0]),l=d(e[t][1]);s+=`${this._getType(g)} ${o} = mix(${n}${_}, ${l}${_}, ${i});\n`}}}this._shaderHeader=r,this._shaderMain=s,this._uniforms=a}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(t){const e=255*t[3];return a.Z.i8888to32(t[0]*e,t[1]*e,t[2]*e,e)}_encodePattern(t,e,r){if(!r||!r.rect)return;const i=r.rect,n=r.width,s=r.height;e[t]=this._encodeShort(i.x+2,0),e[t]|=this._encodeShort(i.y+2+s,16),e[t+1]=this._encodeShort(i.x+2+n,0),e[t+1]|=this._encodeShort(i.y+2,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}u._encodingInfo={[i.R8_SIGNED]:{dataType:o.g.BYTE,bytesPerElement:1,count:1,normalized:!1},[i.R8_UNSIGNED]:{dataType:o.g.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},[i.R16_SIGNED]:{dataType:o.g.SHORT,bytesPerElement:2,count:1,normalized:!1},[i.R16_UNSIGNED]:{dataType:o.g.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},[i.R8G8_SIGNED]:{dataType:o.g.BYTE,bytesPerElement:1,count:2,normalized:!1},[i.R8G8_UNSIGNED]:{dataType:o.g.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},[i.R16G16_SIGNED]:{dataType:o.g.SHORT,bytesPerElement:2,count:2,normalized:!1},[i.R16G16_UNSIGNED]:{dataType:o.g.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},[i.R8G8B8A8_SIGNED]:{dataType:o.g.BYTE,bytesPerElement:1,count:4,normalized:!1},[i.R8G8B8A8_UNSIGNED]:{dataType:o.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},[i.R8G8B8A8_COLOR]:{dataType:o.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},[i.R16G16B16A16_DASHARRAY]:{dataType:o.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},[i.R16G16B16A16_PATTERN]:{dataType:o.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}};const h=t=>{switch(t){case o.g.FLOAT:case o.g.INT:case o.g.UNSIGNED_INT:return 4;case o.g.SHORT:case o.g.UNSIGNED_SHORT:return 2;case o.g.BYTE:case o.g.UNSIGNED_BYTE:return 1}},c=(t,e,r)=>{const i=e/r;if(1===t)switch(i){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(i){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(i){case 0:return".xyz";case 1:return".yzw"}return""};class p extends u{constructor(t){super(t)}geometryInfo(){return p.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return p.ATTRIBUTES}attributesInfo(){return p.ATTRIBUTES_INFO}}p.ATTRIBUTES=[],p.GEOMETRY_LAYOUT=[new l.G("a_pos",2,o.g.BYTE,0,2)],p.ATTRIBUTES_INFO={};class y extends u{constructor(t){super(t)}geometryInfo(){return y.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return y.ATTRIBUTES}attributesInfo(){return y.ATTRIBUTES_INFO}}y.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"],y.GEOMETRY_LAYOUT=[new l.G("a_pos",2,o.g.SHORT,0,4)],y.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:i.R8_UNSIGNED},"circle-color":{name:"color",type:i.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:i.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:i.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:i.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:i.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:i.R8_UNSIGNED,precisionFactor:32}};class f extends u{constructor(t){super(t)}geometryInfo(){return f.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return f.ATTRIBUTES}attributesInfo(){return f.ATTRIBUTES_INFO}}f.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"],f.GEOMETRY_LAYOUT=[new l.G("a_pos",2,o.g.SHORT,0,4)],f.ATTRIBUTES_INFO={"fill-color":{name:"color",type:i.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:i.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:i.R16G16B16A16_PATTERN,isOptional:!0}};class _ extends u{constructor(t,e){super(t),this._usefillColor=e}geometryInfo(){return _.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this._usefillColor?_.ATTRIBUTES_FILL:_.ATTRIBUTES_OUTLINE}attributesInfo(){return this._usefillColor?_.ATTRIBUTES_INFO_FILL:_.ATTRIBUTES_INFO_OUTLINE}}_.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"],_.ATTRIBUTES_FILL=["fill-color","fill-opacity"],_.GEOMETRY_LAYOUT=[new l.G("a_pos",2,o.g.SHORT,0,8),new l.G("a_offset",2,o.g.BYTE,4,8),new l.G("a_xnormal",2,o.g.BYTE,6,8)],_.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:i.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:i.R8_UNSIGNED,precisionFactor:100}},_.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:i.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:i.R8_UNSIGNED,precisionFactor:100}};class m extends u{constructor(t){super(t)}geometryInfo(){return m.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return m.ATTRIBUTES}attributesInfo(){return m.ATTRIBUTES_INFO}}m.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"],m.GEOMETRY_LAYOUT=[new l.G("a_pos",2,o.g.SHORT,0,16),new l.G("a_extrude_offset",4,o.g.BYTE,4,16),new l.G("a_dir_normal",4,o.g.BYTE,8,16),new l.G("a_accumulatedDistance",2,o.g.UNSIGNED_SHORT,12,16)],m.ATTRIBUTES_INFO={"line-width":{name:"width",type:i.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:i.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:i.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:i.R8G8B8A8_COLOR},"line-opacity":{name:"opacity",type:i.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:i.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:i.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:i.R16G16B16A16_DASHARRAY,isOptional:!0}};const g=[new l.G("a_pos",2,o.g.SHORT,0,16),new l.G("a_vertexOffset",2,o.g.SHORT,4,16),new l.G("a_texAngleRange",4,o.g.UNSIGNED_BYTE,8,16),new l.G("a_levelInfo",4,o.g.UNSIGNED_BYTE,12,16)],d=[new l.G("a_opacityInfo",1,o.g.UNSIGNED_BYTE,0,1)];class x extends u{constructor(t){super(t)}geometryInfo(){return g}opacityInfo(){return d}attributes(){return x.ATTRIBUTES}attributesInfo(){return x.ATTRIBUTES_INFO}}x.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"],x.ATTRIBUTES_INFO={"icon-color":{name:"color",type:i.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:i.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:i.R8G8B8A8_COLOR},"icon-halo-width":{name:"halo_width",type:i.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:i.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:i.R8_UNSIGNED,precisionFactor:32,isLayout:!0}};class b extends u{constructor(t){super(t)}geometryInfo(){return g}opacityInfo(){return d}attributes(){return b.ATTRIBUTES}attributesInfo(){return b.ATTRIBUTES_INFO}}b.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"],b.ATTRIBUTES_INFO={"text-color":{name:"color",type:i.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:i.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:i.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:i.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:i.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:i.R8_UNSIGNED,isLayout:!0}};var E=r(22303),T=r(3892),w=r(59255);function I(t,e,r,i){const n=3*t,s=3*(r-t)-n,a=1-n-s,o=3*e,l=3*(i-e)-o,u=1-o-l;function h(t){return((a*t+s)*t+n)*t}function c(t){return(3*a*t+2*s)*t+n}return function(t,e=1e-6){return function(t){return((u*t+l)*t+o)*t}(function(t,e){let r,i,n,s,a,o;for(n=t,o=0;o<8;o++){if(s=h(n)-t,Math.abs(s)<e)return n;if(a=c(n),Math.abs(a)<1e-6)break;n-=s/a}if(r=0,i=1,n=t,n<r)return r;if(n>i)return i;for(;r<i;){if(s=h(n),Math.abs(s-t)<e)return n;t>s?r=n:i=n,n=.5*(i-r)+r}return n}(t,e))}}const v={};v.ease=I(.25,.1,.25,1),v.linear=I(0,0,1,1),v.easeIn=v["ease-in"]=I(.42,0,1,1),v.easeOut=v["ease-out"]=I(0,0,.58,1),v.easeInOut=v["ease-in-out"]=I(.42,0,.58,1);var R=r(31363);const N={kind:"null"},D={kind:"number"},A={kind:"string"},L={kind:"boolean"},P={kind:"color"},S={kind:"object"},O={kind:"value"};function U(t,e){return{kind:"array",itemType:t,n:e}}const B=[N,D,A,L,P,S,U(O)];function G(t){if("array"===t.kind){const e=G(t.itemType);return"number"==typeof t.n?`array<${e}, ${t.n}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}function M(t){if(null===t)return N;if("string"==typeof t)return A;if("boolean"==typeof t)return L;if("number"==typeof t)return D;if(t instanceof E.Z)return P;if(Array.isArray(t)){let e;for(const r of t){const t=M(r);if(e){if(e!==t){e=O;break}}else e=t}return U(e||O,t.length)}return"object"==typeof t?S:O}function k(t,e){if("array"===e.kind)return"array"===t.kind&&(0===t.n&&"value"===t.itemType.kind||k(t.itemType,e.itemType))&&("number"!=typeof e.n||e.n===t.n);if("value"===e.kind)for(const e of B)if(k(t,e))return!0;return e.kind===t.kind}function F(t){if(null===t)return"";const e=typeof t;return"string"===e?t:"number"===e||"boolean"===e?String(t):t instanceof E.Z?t.toString():JSON.stringify(t)}class C{constructor(t){this._parent=t,this._vars={}}add(t,e){this._vars[t]=e}get(t){return this._vars[t]?this._vars[t]:this._parent?this._parent.get(t):null}}class z{constructor(){this.type=O}static parse(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new z}evaluate(t,e){return t?.id}}class V{constructor(){this.type=A}static parse(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new V}evaluate(t,e){if(!t)return null;switch(t.type){case w.Vl.Point:return"Point";case w.Vl.LineString:return"LineString";case w.Vl.Polygon:return"Polygon";default:return null}}}class ${constructor(){this.type=S}static parse(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new $}evaluate(t,e){return t?.values}}class Y{constructor(){this.type=D}static parse(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new Y}evaluate(t,e){return e}}class H{constructor(t,e,r){this._lhs=t,this._rhs=e,this._compare=r,this.type=L}static parse(t,e,r){if(3!==t.length&&4!==t.length)throw new Error(`"${t[0]}" expects 2 or 3 arguments`);if(4===t.length)throw new Error(`"${t[0]}" collator not supported`);return new H(Tt(t[1],e),Tt(t[2],e),r)}evaluate(t,e){return this._compare(this._lhs.evaluate(t,e),this._rhs.evaluate(t,e))}}class Z{constructor(t){this._arg=t,this.type=L}static parse(t,e){if(2!==t.length)throw new Error('"!" expects 1 argument');return new Z(Tt(t[1],e))}evaluate(t,e){return!this._arg.evaluate(t,e)}}class j{constructor(t){this._args=t,this.type=L}static parse(t,e){const r=[];for(let i=1;i<t.length;i++)r.push(Tt(t[i],e));return new j(r)}evaluate(t,e){for(const r of this._args)if(!r.evaluate(t,e))return!1;return!0}}class K{constructor(t){this._args=t,this.type=L}static parse(t,e){const r=[];for(let i=1;i<t.length;i++)r.push(Tt(t[i],e));return new K(r)}evaluate(t,e){for(const r of this._args)if(r.evaluate(t,e))return!0;return!1}}class q{constructor(t){this._args=t,this.type=L}static parse(t,e){const r=[];for(let i=1;i<t.length;i++)r.push(Tt(t[i],e));return new q(r)}evaluate(t,e){for(const r of this._args)if(r.evaluate(t,e))return!1;return!0}}class W{constructor(t,e,r){this.type=t,this._args=e,this._fallback=r}static parse(t,e,r){if(t.length<4)throw new Error('"case" expects at least 3 arguments');if(t.length%2==1)throw new Error('"case" expects an odd number of arguments');let i;const n=[];for(let s=1;s<t.length-1;s+=2){const a=Tt(t[s],e),o=Tt(t[s+1],e,r);i||(i=o.type),n.push({condition:a,output:o})}const s=Tt(t.at(-1),e,r);return i||(i=s.type),new W(i,n,s)}evaluate(t,e){for(const r of this._args)if(r.condition.evaluate(t,e))return r.output.evaluate(t,e);return this._fallback.evaluate(t,e)}}class X{constructor(t,e){this.type=t,this._args=e}static parse(t,e){if(t.length<2)throw new Error('"coalesce" expects at least 1 argument');let r;const i=[];for(let n=1;n<t.length;n++){const s=Tt(t[n],e);r||(r=s.type),i.push(s)}return new X(r,i)}evaluate(t,e){for(const r of this._args){const i=r.evaluate(t,e);if(null!==i)return i}return null}}class J{constructor(t,e,r,i,n){this.type=t,this._input=e,this._labels=r,this._outputs=i,this._fallback=n}static parse(t,e){if(t.length<3)throw new Error('"match" expects at least 3 arguments');if(t.length%2==0)throw new Error('"case" expects an even number of arguments');let r;const i=Tt(t[1],e),n=[],s={};let a;for(let i=2;i<t.length-1;i+=2){let o=t[i];Array.isArray(o)||(o=[o]);for(const t of o){const e=typeof t;if("string"!==e&&"number"!==e)throw new Error('"match" requires string or number literal as labels');if(a){if(e!==a)throw new Error('"match" requires labels to have the same type')}else a=e;s[t]=n.length}const l=Tt(t[i+1],e);r||(r=l.type),n.push(l)}return new J(r,i,s,n,Tt(t.at(-1),e))}evaluate(t,e){const r=this._input.evaluate(t,e);return(this._outputs[this._labels[r]]||this._fallback).evaluate(t,e)}}class Q{constructor(t,e,r,i,n){this._operator=t,this.type=e,this.interpolation=r,this.input=i,this._stops=n}static parse(t,e,r){const i=t[0];if(t.length<5)throw new Error(`"${i}" expects at least 4 arguments`);const n=t[1];if(!Array.isArray(n)||0===n.length)throw new Error(`"${n}" is not a valid interpolation`);switch(n[0]){case"linear":if(1!==n.length)throw new Error("Linear interpolation cannot have parameters");break;case"exponential":if(2!==n.length||"number"!=typeof n[1])throw new Error("Exponential interpolation requires one numeric argument");break;case"cubic-bezier":if(5!==n.length)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1");for(let t=1;t<5;t++){const e=n[t];if("number"!=typeof e||e<0||e>1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error(`"${t[0]}" unknown interpolation type "${n[0]}"`)}if(t.length%2!=1)throw new Error(`"${i}" expects an even number of arguments`);const s=Tt(t[2],e,D);let a;"interpolate-hcl"===i||"interpolate-lab"===i?a=P:r&&"value"!==r.kind&&(a=r);const o=[];for(let r=3;r<t.length;r+=2){const n=t[r];if("number"!=typeof n)throw new Error(`"${i}" requires stop inputs as literal numbers`);if(o.length&&o.at(-1)[0]>=n)throw new Error(`"${i}" requires strictly ascending stop inputs`);const s=Tt(t[r+1],e,a);a||(a=s.type),o.push([n,s])}if(a&&a!==P&&a!==D&&("array"!==a.kind||a.itemType!==D))throw new Error(`"${i}" cannot interpolate type ${G(a)}`);return new Q(i,a,n,s,o)}evaluate(t,e){const r=this._stops;if(1===r.length)return r[0][1].evaluate(t,e);const i=this.input.evaluate(t,e);if(i<=r[0][0])return r[0][1].evaluate(t,e);const n=r.at(-1);if(i>=n[0])return n[1].evaluate(t,e);let s=0;for(;++s<r.length&&!(i<r[s][0]););const a=r[s-1][0],o=r[s][0],l=Q.interpolationRatio(this.interpolation,i,a,o),u=r[s-1][1].evaluate(t,e),h=r[s][1].evaluate(t,e);if("interpolate"===this._operator){if("array"===this.type.kind&&Array.isArray(u)&&Array.isArray(h))return u.map(((t,e)=>(0,R.sX)(t,h[e],l)));if("color"===this.type.kind&&u instanceof E.Z&&h instanceof E.Z){const t=new E.Z(u),e=new E.Z(h);return new E.Z([(0,R.sX)(t.r,e.r,l),(0,R.sX)(t.g,e.g,l),(0,R.sX)(t.b,e.b,l),(0,R.sX)(t.a,e.a,l)])}if("number"===this.type.kind&&"number"==typeof u&&"number"==typeof h)return(0,R.sX)(u,h,l);throw new Error(`"${this._operator}" cannot interpolate type ${G(this.type)}`)}if("interpolate-hcl"===this._operator){const t=(0,T.sJ)(u),e=(0,T.sJ)(h),r=e.h-t.h,i=(0,T.xr)({h:t.h+l*(r>180||r<-180?r-360*Math.round(r/360):r),c:(0,R.sX)(t.c,e.c,l),l:(0,R.sX)(t.l,e.l,l)});return new E.Z({a:(0,R.sX)(u.a,h.a,l),...i})}if("interpolate-lab"===this._operator){const t=(0,T.Y3)(u),e=(0,T.Y3)(h),r=(0,T.xr)({l:(0,R.sX)(t.l,e.l,l),a:(0,R.sX)(t.a,e.a,l),b:(0,R.sX)(t.b,e.b,l)});return new E.Z({a:(0,R.sX)(u.a,h.a,l),...r})}throw new Error(`Unexpected operator "${this._operator}"`)}interpolationUniformValue(t,e){const r=this._stops;if(1===r.length)return 0;if(t>=r.at(-1)[0])return 0;let i=0;for(;++i<r.length&&!(t<r[i][0]););const n=r[i-1][0],s=r[i][0];return Q.interpolationRatio(this.interpolation,e,n,s)}getInterpolationRange(t){const e=this._stops;if(1===e.length){const t=e[0][0];return[t,t]}const r=e.at(-1)[0];if(t>=r)return[r,r];let i=0;for(;++i<e.length&&!(t<e[i][0]););return[e[i-1][0],e[i][0]]}static interpolationRatio(t,e,r,i){let n=0;return"linear"===t[0]?n=Q._exponentialInterpolationRatio(e,1,r,i):"exponential"===t[0]?n=Q._exponentialInterpolationRatio(e,t[1],r,i):"cubic-bezier"===t[0]&&(n=I(t[1],t[2],t[3],t[4])(Q._exponentialInterpolationRatio(e,1,r,i),1e-5)),n<0?n=0:n>1&&(n=1),n}static _exponentialInterpolationRatio(t,e,r,i){const n=i-r;if(0===n)return 0;const s=t-r;return 1===e?s/n:(e**s-1)/(e**n-1)}}class tt{constructor(t,e,r){this.type=t,this._input=e,this._stops=r}static parse(t,e){if(t.length<5)throw new Error('"step" expects at least 4 arguments');if(t.length%2!=1)throw new Error('"step" expects an even number of arguments');const r=Tt(t[1],e,D);let i;const n=[];n.push([-1/0,Tt(t[2],e)]);for(let r=3;r<t.length;r+=2){const s=t[r];if("number"!=typeof s)throw new Error('"step" requires stop inputs as literal numbers');if(n.length&&n.at(-1)[0]>=s)throw new Error('"step" requires strictly ascending stop inputs');const a=Tt(t[r+1],e);i||(i=a.type),n.push([s,a])}return new tt(i,r,n)}evaluate(t,e){const r=this._stops;if(1===r.length)return r[0][1].evaluate(t,e);const i=this._input.evaluate(t,e);let n=0;for(;++n<r.length&&!(i<r[n][0]););return this._stops[n-1][1].evaluate(t,e)}}class et{constructor(t,e){this.type=t,this._output=e}static parse(t,e,r){if(t.length<4)throw new Error('"let" expects at least 3 arguments');if(t.length%2==1)throw new Error('"let" expects an odd number of arguments');const i=new C(e);for(let r=1;r<t.length-1;r+=2){const n=t[r];if("string"!=typeof n)throw new Error(`"let" requires a string to define variable names - found ${n}`);i.add(n,Tt(t[r+1],e))}const n=Tt(t.at(-1),i,r);return new et(n.type,n)}evaluate(t,e){return this._output.evaluate(t,e)}}class rt{constructor(t,e){this.type=t,this.output=e}static parse(t,e,r){if(2!==t.length||"string"!=typeof t[1])throw new Error('"var" requires just one literal string argument');const i=e.get(t[1]);if(!i)throw new Error(`${t[1]} must be defined before being used in a "var" expression`);return new rt(r||O,i)}evaluate(t,e){return this.output.evaluate(t,e)}}class it{constructor(t,e,r){this.type=t,this._index=e,this._array=r}static parse(t,e){if(3!==t.length)throw new Error('"at" expects 2 arguments');const r=Tt(t[1],e,D),i=Tt(t[2],e);return new it(i.type.itemType,r,i)}evaluate(t,e){const r=this._index.evaluate(t,e),i=this._array.evaluate(t,e);if(r<0||r>=i.length)throw new Error('"at" index out of bounds');if(r!==Math.floor(r))throw new Error('"at" index must be an integer');return i[r]}}class nt{constructor(t,e){this._key=t,this._obj=e,this.type=O}static parse(t,e){let r,i;switch(t.length){case 2:return r=Tt(t[1],e),new nt(r);case 3:return r=Tt(t[1],e),i=Tt(t[2],e),new nt(r,i);default:throw new Error('"get" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?this._obj.evaluate(t,e)[r]:t?.values[r]}}class st{constructor(t,e){this._key=t,this._obj=e,this.type=L}static parse(t,e){let r,i;switch(t.length){case 2:return r=Tt(t[1],e),new st(r);case 3:return r=Tt(t[1],e),i=Tt(t[2],e),new st(r,i);default:throw new Error('"has" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?r in this._obj.evaluate(t,e):!!t?.values[r]}}class at{constructor(t,e){this._key=t,this._vals=e,this.type=L}static parse(t,e){if(3!==t.length)throw new Error('"in" expects 2 arguments');return new at(Tt(t[1],e),Tt(t[2],e))}evaluate(t,e){const r=this._key.evaluate(t,e);return this._vals.evaluate(t,e).includes(r)}}class ot{constructor(t,e,r){this._item=t,this._array=e,this._from=r,this.type=D}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');const r=Tt(t[1],e),i=Tt(t[2],e);if(4===t.length){const n=Tt(t[3],e,D);return new ot(r,i,n)}return new ot(r,i)}evaluate(t,e){const r=this._item.evaluate(t,e),i=this._array.evaluate(t,e);if(this._from){const n=this._from.evaluate(t,e);if(n!==Math.floor(n))throw new Error('"index-of" index must be an integer');return i.indexOf(r,n)}return i.indexOf(r)}}class lt{constructor(t){this._arg=t,this.type=D}static parse(t,e){if(2!==t.length)throw new Error('"length" expects 2 arguments');const r=Tt(t[1],e);return new lt(r)}evaluate(t,e){const r=this._arg.evaluate(t,e);if("string"==typeof r)return r.length;if(Array.isArray(r))return r.length;throw new Error('"length" expects string or array')}}class ut{constructor(t,e,r,i){this.type=t,this._array=e,this._from=r,this._to=i}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');const r=Tt(t[1],e),i=Tt(t[2],e,D);if(i.type!==D)throw new Error('"slice" index must return a number');if(4===t.length){const n=Tt(t[3],e,D);if(n.type!==D)throw new Error('"slice" index must return a number');return new ut(r.type,r,i,n)}return new ut(r.type,r,i)}evaluate(t,e){const r=this._array.evaluate(t,e);if(!Array.isArray(r)&&"string"!=typeof r)throw new Error('"slice" input must be an array or a string');const i=this._from.evaluate(t,e);if(i<0||i>=r.length)throw new Error('"slice" index out of bounds');if(i!==Math.floor(i))throw new Error('"slice" index must be an integer');if(this._to){const n=this._to.evaluate(t,e);if(n<0||n>=r.length)throw new Error('"slice" index out of bounds');if(n!==Math.floor(n))throw new Error('"slice" index must be an integer');return r.slice(i,n)}return r.slice(i)}}class ht{constructor(){this.type=L}static parse(t){if(1!==t.length)throw new Error('"has-id" expects no arguments');return new ht}evaluate(t,e){return t&&void 0!==t.id}}class ct{constructor(t,e){this._args=t,this._calculate=e,this.type=D}static parse(t,e,r){const i=t.slice(1).map((t=>Tt(t,e)));return new ct(i,r)}evaluate(t,e){let r;return this._args&&(r=this._args.map((r=>r.evaluate(t,e)))),this._calculate(r)}}class pt{constructor(t,e){this._args=t,this._calculate=e,this.type=D}static parse(t,e){const r=t.slice(1).map((t=>Tt(t,e)));return new pt(r,pt.ops[t[0]])}evaluate(t,e){let r;return this._args&&(r=this._args.map((r=>r.evaluate(t,e)))),this._calculate(r)}}pt.ops={abs:t=>Math.abs(t[0]),acos:t=>Math.acos(t[0]),asin:t=>Math.asin(t[0]),atan:t=>Math.atan(t[0]),ceil:t=>Math.ceil(t[0]),cos:t=>Math.cos(t[0]),e:()=>Math.E,floor:t=>Math.floor(t[0]),ln:t=>Math.log(t[0]),ln2:()=>Math.LN2,log10:t=>Math.log(t[0])/Math.LN10,log2:t=>Math.log(t[0])/Math.LN2,max:t=>Math.max(...t),min:t=>Math.min(...t),pi:()=>Math.PI,round:t=>Math.round(t[0]),sin:t=>Math.sin(t[0]),sqrt:t=>Math.sqrt(t[0]),tan:t=>Math.tan(t[0])};class yt{constructor(t){this._args=t,this.type=A}static parse(t,e){return new yt(t.slice(1).map((t=>Tt(t,e))))}evaluate(t,e){return this._args.map((r=>r.evaluate(t,e))).join("")}}class ft{constructor(t,e){this._arg=t,this._calculate=e,this.type=A}static parse(t,e){if(2!==t.length)throw new Error(`${t[0]} expects 1 argument`);const r=Tt(t[1],e);return new ft(r,ft.ops[t[0]])}evaluate(t,e){return this._calculate(this._arg.evaluate(t,e))}}ft.ops={downcase:t=>t.toLowerCase(),upcase:t=>t.toUpperCase()};class _t{constructor(t){this._args=t,this.type=P}static parse(t,e){if(4!==t.length)throw new Error('"rgb" expects 3 arguments');const r=t.slice(1).map((t=>Tt(t,e)));return new _t(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),i=this._validate(this._args[1].evaluate(t,e)),n=this._validate(this._args[2].evaluate(t,e));return new E.Z({r,g:i,b:n})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}}class mt{constructor(t){this._args=t,this.type=P}static parse(t,e){if(5!==t.length)throw new Error('"rgba" expects 4 arguments');const r=t.slice(1).map((t=>Tt(t,e)));return new mt(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),i=this._validate(this._args[1].evaluate(t,e)),n=this._validate(this._args[2].evaluate(t,e)),s=this._validateAlpha(this._args[3].evaluate(t,e));return new E.Z({r,g:i,b:n,a:s})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}_validateAlpha(t){if("number"!=typeof t||t<0||t>1)throw new Error(`${t}: invalid alpha color component`);return t}}class gt{constructor(t){this._color=t,this.type=U(D,4)}static parse(t,e){if(2!==t.length)throw new Error('"to-rgba" expects 1 argument');const r=Tt(t[1],e);return new gt(r)}evaluate(t,e){return new E.Z(this._color.evaluate(t,e)).toRgba()}}class dt{constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0];if(t.length<2)throw new Error(`${r} expects at least one argument`);let i,n=1;if("array"===r){if(t.length>2){switch(t[1]){case"string":i=A;break;case"number":i=D;break;case"boolean":i=L;break;default:throw new Error('"array" type argument must be string, number or boolean')}n++}else i=O;let e;if(t.length>3){if(e=t[2],null!==e&&("number"!=typeof e||e<0||e!==Math.floor(e)))throw new Error('"array" length argument must be a positive integer literal');n++}i=U(i,e)}else switch(r){case"string":i=A;break;case"number":i=D;break;case"boolean":i=L;break;case"object":i=S}const s=[];for(;n<t.length;n++){const r=Tt(t[n],e);s.push(r)}return new dt(i,s)}evaluate(t,e){let r;for(const i of this._args){const n=i.evaluate(t,e);if(r=M(n),k(r,this.type))return n}throw new Error(`Expected ${G(this.type)} but got ${G(r)}`)}}class xt{constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0],i=xt.types[r];if(i===L||i===A){if(2!==t.length)throw new Error(`${r} expects one argument`)}else if(t.length<2)throw new Error(`${r} expects at least one argument`);const n=[];for(let r=1;r<t.length;r++){const i=Tt(t[r],e);n.push(i)}return new xt(i,n)}evaluate(t,e){if(this.type===L)return Boolean(this._args[0].evaluate(t,e));if(this.type===A)return F(this._args[0].evaluate(t,e));if(this.type===D){for(const r of this._args){const i=Number(r.evaluate(t,e));if(!isNaN(i))return i}return null}if(this.type===P){for(const r of this._args)try{const i=xt.toColor(r.evaluate(t,e));if(i instanceof E.Z)return i}catch{}return null}}static toBoolean(t){return Boolean(t)}static toString(t){return F(t)}static toNumber(t){const e=Number(t);if(isNaN(e))throw new Error(`"${t}" is not a number`);return e}static toColor(t){if(t instanceof E.Z)return t;if("string"==typeof t){const e=E.Z.fromString(t);if(e)return e;throw new Error(`"${t}" is not a color`)}if(Array.isArray(t))return E.Z.fromArray(t);throw new Error(`"${t}" is not a color`)}}xt.types={"to-boolean":L,"to-color":P,"to-number":D,"to-string":A};class bt{constructor(t){this._val=t,this.type=M(t)}static parse(t){if(2!==t.length)throw new Error('"literal" expects 1 argument');return new bt(t[1])}evaluate(t,e){return this._val}}class Et{constructor(t){this._arg=t,this.type=A}static parse(t,e){if(2!==t.length)throw new Error('"typeof" expects 1 argument');return new Et(Tt(t[1],e))}evaluate(t,e){return G(M(this._arg.evaluate(t,e)))}}function Tt(t,e,r){const i=typeof t;if("string"===i||"boolean"===i||"number"===i||null===t){if(r)switch(r.kind){case"string":"string"!==i&&(t=xt.toString(t));break;case"number":"number"!==i&&(t=xt.toNumber(t));break;case"color":t=xt.toColor(t)}t=["literal",t]}if(!Array.isArray(t)||0===t.length)throw new Error("Expression must be a non empty array");const n=t[0];if("string"!=typeof n)throw new Error("First element of expression must be a string");const s=wt[n];if(void 0===s)throw new Error(`Invalid expression operator "${n}"`);if(!s)throw new Error(`Unimplemented expression operator "${n}"`);return s.parse(t,e,r)}const wt={array:dt,boolean:dt,collator:null,format:null,image:null,literal:bt,number:dt,"number-format":null,object:dt,string:dt,"to-boolean":xt,"to-color":xt,"to-number":xt,"to-string":xt,typeof:Et,accumulated:null,"feature-state":null,"geometry-type":V,id:z,"line-progress":null,properties:$,at:it,get:nt,has:st,in:at,"index-of":ot,length:lt,slice:ut,"!":Z,"!=":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t!==e))}},"<":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t<e))}},"<=":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t<=e))}},"==":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t===e))}},">":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t>e))}},">=":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t>=e))}},all:j,any:K,case:W,coalesce:X,match:J,within:null,interpolate:Q,"interpolate-hcl":Q,"interpolate-lab":Q,step:tt,let:et,var:rt,concat:yt,downcase:ft,"is-supported-script":null,"resolved-locale":null,upcase:ft,rgb:_t,rgba:mt,"to-rgba":gt,"-":class extends ct{static parse(t,e){switch(t.length){case 2:return ct.parse(t,e,(t=>-t[0]));case 3:return ct.parse(t,e,(t=>t[0]-t[1]));default:throw new Error('"-" expects 1 or 2 arguments')}}},"*":class extends ct{static parse(t,e){return ct.parse(t,e,(t=>{let e=1;for(const r of t)e*=r;return e}))}},"/":class extends ct{static parse(t,e){if(3===t.length)return ct.parse(t,e,(t=>t[0]/t[1]));throw new Error('"/" expects 2 arguments')}},"%":class extends ct{static parse(t,e){if(3===t.length)return ct.parse(t,e,(t=>t[0]%t[1]));throw new Error('"%" expects 2 arguments')}},"^":class extends ct{static parse(t,e){if(3===t.length)return ct.parse(t,e,(t=>t[0]**t[1]));throw new Error('"^" expects 1 or 2 arguments')}},"+":class extends ct{static parse(t,e){return ct.parse(t,e,(t=>{let e=0;for(const r of t)e+=r;return e}))}},abs:pt,acos:pt,asin:pt,atan:pt,ceil:pt,cos:pt,e:pt,floor:pt,ln:pt,ln2:pt,log10:pt,log2:pt,max:pt,min:pt,pi:pt,round:pt,sin:pt,sqrt:pt,tan:pt,zoom:Y,"heatmap-density":null,"has-id":ht,none:q};class It{constructor(t){this._expression=t}filter(t,e){if(!this._expression)return!0;try{return this._expression.evaluate(t,e)}catch(t){return console.log(t.message),!0}}static createFilter(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{const e=Tt(t,null,L);return new It(e)}catch(t){return console.log(t.message),null}}static isLegacyFilter(t){if(!Array.isArray(t))return!0;if(0===t.length)return!0;switch(t[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return 3===t.length&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"in":return t.length>=3&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"!in":case"none":case"!has":return!0;case"any":case"all":for(let e=1;e<t.length;e++)if(this.isLegacyFilter(t[e]))return!0;return!1;case"has":return 2===t.length&&("$id"===t[1]||"$type"===t[1]);default:return!1}}static convertLegacyFilter(t){if(!Array.isArray(t)||0===t.length)return!0;const e=t[0];if(1===t.length)return"any"!==e;switch(e){case"==":return It.convertComparison("==",t[1],t[2]);case"!=":return It.negate(It.convertComparison("==",t[1],t[2]));case">":case"<":case">=":case"<=":return It.convertComparison(e,t[1],t[2]);case"in":return It.convertIn(t[1],t.slice(2));case"!in":return It.negate(It.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return It.convertCombining(e,t.slice(1));case"has":return It.convertHas(t[1]);case"!has":return It.negate(It.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}static convertComparison(t,e,r){switch(e){case"$type":return[t,["geometry-type"],r];case"$id":return[t,["id"],r];default:return[t,["get",e],r]}}static convertIn(t,e){switch(t){case"$type":return["in",["geometry-type"],["literal",e]];case"$id":return["in",["id"],["literal",e]];default:return["in",["get",t],["literal",e]]}}static convertHas(t){switch(t){case"$type":return!0;case"$id":return["has-id"];default:return["has",t]}}static convertCombining(t,e){return[t].concat(e.map(this.convertLegacyFilter))}static negate(t){return["!",t]}}var vt=r(21315);class Rt{constructor(t,e){let r;switch(this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r="number"===t.value;break;default:r=!1}if(null==e&&(e=t.default),Array.isArray(e)&&e.length>0&&wt[e[0]]){const r={number:D,color:P,string:A,boolean:L,enum:A};try{const i=Tt(e,null,"array"===t.type?U(r[t.value]||O,t.length):r[t.type]);this.getValue=this._buildExpression(i,t),this.isDataDriven=!0,i instanceof Q&&i.input instanceof Y&&(this.interpolator=i)}catch(e){console.log(e.message),this.getValue=this._buildSimple(t.default)}return}r&&"interval"===e.type&&(r=!1);const i=e&&e.stops&&e.stops.length>0;if(i)for(const r of e.stops)r[1]=this._validate(r[1],t);if(this.isDataDriven=!!e&&!!e.property,this.isDataDriven)if(void 0!==e.default&&(e.default=this._validate(e.default,t)),i)switch(e.type){case"identity":this.getValue=this._buildIdentity(e,t);break;case"categorical":this.getValue=this._buildCategorical(e,t);break;default:this.getValue=r?this._buildInterpolate(e,t):this._buildInterval(e,t)}else this.getValue=this._buildIdentity(e,t);else i?this.getValue=r?this._buildZoomInterpolate(e):this._buildZoomInterval(e):(e=this._validate(e,t),this.getValue=this._buildSimple(e))}_validate(t,e){if("number"===e.type){if(null!=e.minimum&&t<e.minimum)return e.minimum;if(null!=e.maximum&&t>e.maximum)return e.maximum}else"color"===e.type?t=Rt._parseColor(t):"enum"===e.type?"string"==typeof t&&(t=e.values.indexOf(t)):"array"===e.type&&"enum"===e.value?t=t.map((t=>"string"==typeof t?e.values.indexOf(t):t)):"string"===e.type&&(t=F(t));return t}_buildSimple(t){return()=>t}_buildExpression(t,e){return(r,i)=>{try{const n=t.evaluate(i,r);return void 0===n?e.default:this._validate(n,e)}catch(t){return console.log(t.message),e.default}}}_buildIdentity(t,e){return(r,i)=>{let n;return i&&(n=i.values[t.property]),void 0!==n&&(n=this._validate(n,e)),null!=n?n:void 0!==t.default?t.default:e.default}}_buildCategorical(t,e){return(r,i)=>{let n;return i&&(n=i.values[t.property]),n=this._categorical(n,t.stops),void 0!==n?n:void 0!==t.default?t.default:e.default}}_buildInterval(t,e){return(r,i)=>{let n;return i&&(n=i.values[t.property]),"number"==typeof n?this._interval(n,t.stops):void 0!==t.default?t.default:e.default}}_buildInterpolate(t,e){return(r,i)=>{let n;return i&&(n=i.values[t.property]),"number"==typeof n?this._interpolate(n,t.stops,t.base||1):void 0!==t.default?t.default:e.default}}_buildZoomInterpolate(t){return e=>this._interpolate(e,t.stops,t.base||1)}_buildZoomInterval(t){return e=>this._interval(e,t.stops)}_categorical(t,e){const r=e.length;for(let i=0;i<r;i++)if(e[i][0]===t)return e[i][1]}_interval(t,e){const r=e.length;let i=0;for(let n=0;n<r&&e[n][0]<=t;n++)i=n;return e[i][1]}_interpolate(t,e,r){let i,n;const s=e.length;for(let r=0;r<s;r++){const s=e[r];if(!(s[0]<=t)){n=s;break}i=s}if(i&&n){const e=n[0]-i[0],s=t-i[0],a=1===r?s/e:(r**s-1)/(r**e-1);if(Array.isArray(i[1])){const t=i[1],e=n[1],r=[];for(let i=0;i<t.length;i++)r.push((0,R.sX)(t[i],e[i],a));return r}return(0,R.sX)(i[1],n[1],a)}return i?i[1]:n?n[1]:void 0}static _isEmpty(t){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}static _parseColor(t){return Array.isArray(t)?t:("string"==typeof t&&(t=new E.Z(t)),t instanceof E.Z&&!this._isEmpty(t)?E.Z.toUnitRGBA(t):void 0)}}var Nt,Dt=r(16534);!function(t){t[t.BUTT=0]="BUTT",t[t.ROUND=1]="ROUND",t[t.SQUARE=2]="SQUARE",t[t.UNKNOWN=4]="UNKNOWN"}(Nt||(Nt={}));class At{constructor(t,e,r,i){switch(this.type=t,this.typeName=e.type,this.id=e.id,this.source=e.source,this.sourceLayer=e["source-layer"],this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.filter=e.filter,this.layout=e.layout,this.paint=e.paint,this.z=r,this.uid=i,t){case vt.fR.BACKGROUND:this._layoutDefinition=vt.f2.backgroundLayoutDefinition,this._paintDefinition=vt.f2.backgroundPaintDefinition;break;case vt.fR.FILL:this._layoutDefinition=vt.f2.fillLayoutDefinition,this._paintDefinition=vt.f2.fillPaintDefinition;break;case vt.fR.LINE:this._layoutDefinition=vt.f2.lineLayoutDefinition,this._paintDefinition=vt.f2.linePaintDefinition;break;case vt.fR.SYMBOL:this._layoutDefinition=vt.f2.symbolLayoutDefinition,this._paintDefinition=vt.f2.symbolPaintDefinition;break;case vt.fR.CIRCLE:this._layoutDefinition=vt.f2.circleLayoutDefinition,this._paintDefinition=vt.f2.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout),this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=It.createFilter(this.filter)}getLayoutProperty(t){return this._layoutProperties[t]}getPaintProperty(t){return this._paintProperties[t]}getLayoutValue(t,e,r){let i;const n=this._layoutProperties[t];return n&&(i=n.getValue(e,r)),void 0===i&&(i=this._layoutDefinition[t].default),i}getPaintValue(t,e,r){let i;const n=this._paintProperties[t];return n&&(i=n.getValue(e,r)),void 0===i&&(i=this._paintDefinition[t].default),i}isPainterDataDriven(){const t=this._paintProperties;if(t)for(const e in t)if(t[e].isDataDriven)return!0;return!1}_parseLayout(t){const e={};for(const r in t){const i=this._layoutDefinition[r];i&&(e[r]=new Rt(i,t[r]))}return e}_parsePaint(t){const e={};for(const r in t){const i=this._paintDefinition[r];i&&(e[r]=new Rt(i,t[r]))}return e}computeAttributesKey(t,e,r,i){let n=0,s=0;for(const t of e){let e=3;if(!t||t!==i){const i=r[t],{isLayout:n,isOptional:s}=i,a=n?this.getLayoutProperty(t):this.getPaintProperty(t);e=a?.interpolator?2:a?.isDataDriven?1:s&&!a?3:0}s|=e<<n,n+=2}return s<<3|t}}class Lt extends At{constructor(t,e,r,i){super(t,e,r,i),this.backgroundMaterial=new p(this.computeAttributesKey(s._K.BACKGROUND,p.ATTRIBUTES,p.ATTRIBUTES_INFO))}}class Pt extends At{constructor(t,e,r,i){super(t,e,r,i);const n=this.getPaintProperty("fill-color"),a=this.getPaintProperty("fill-opacity"),o=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=n?.isDataDriven,this.hasDataDrivenOpacity=a?.isDataDriven,this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||o?.isDataDriven;const l=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!l,this.hasDataDrivenOutlineColor=l?.isDataDriven,this.hasDataDrivenOutline=l?l.isDataDriven:!!n&&n.isDataDriven,this.hasDataDrivenOutline=(l?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity,this.fillMaterial=new f(this.computeAttributesKey(s._K.FILL,f.ATTRIBUTES,f.ATTRIBUTES_INFO)),this.outlineMaterial=new _(this.computeAttributesKey(s._K.OUTLINE,this.outlineUsesFillColor?_.ATTRIBUTES_FILL:_.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?_.ATTRIBUTES_INFO_FILL:_.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}}class St extends At{constructor(t,e,r,i){super(t,e,r,i);const n=this.getPaintProperty("line-pattern");if(this.lineMaterial=new m(this.computeAttributesKey(s._K.LINE,m.ATTRIBUTES,m.ATTRIBUTES_INFO,n?"line-dasharray":"")),this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven,this.canUseThinTessellation=!1,!this.hasDataDrivenLine){const t=this.getPaintProperty("line-width");if(!t||"number"==typeof t&&.5*t<Dt.tQ){const t=this.getPaintProperty("line-offset");(!t||"number"==typeof t&&0===t)&&(this.canUseThinTessellation=!0)}}}getDashKey(t,e){let r;switch(e){case Nt.BUTT:r="Butt";break;case Nt.ROUND:r="Round";break;case Nt.SQUARE:r="Square";break;default:r="Butt"}return`dasharray-[${t.toString()}]-${r}`}}class Ot extends At{constructor(t,e,r,i){super(t,e,r,i),this.iconMaterial=new x(this.computeAttributesKey(s._K.ICON,x.ATTRIBUTES,x.ATTRIBUTES_INFO)),this.textMaterial=new b(this.computeAttributesKey(s._K.TEXT,b.ATTRIBUTES,b.ATTRIBUTES_INFO)),this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven,this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven||this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class Ut extends At{constructor(t,e,r,i){super(t,e,r,i),this.circleMaterial=new y(this.computeAttributesKey(s._K.CIRCLE,y.ATTRIBUTES,y.ATTRIBUTES_INFO))}}class Bt{constructor(t,e,r){let i;this.allowOverlap=t.getLayoutValue("icon-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("icon-ignore-placement",e),this.keepUpright=t.getLayoutValue("icon-keep-upright",e),this.optional=t.getLayoutValue("icon-optional",e),this.rotationAlignment=t.getLayoutValue("icon-rotation-alignment",e),this.rotationAlignment===vt.aF.AUTO&&(this.rotationAlignment=r?vt.aF.MAP:vt.aF.VIEWPORT),i=t.getLayoutProperty("icon-anchor"),i?.isDataDriven?this._anchorProp=i:this.anchor=t.getLayoutValue("icon-anchor",e),i=t.getLayoutProperty("icon-offset"),i?.isDataDriven?this._offsetProp=i:this.offset=t.getLayoutValue("icon-offset",e),i=t.getLayoutProperty("icon-padding"),i?.isDataDriven?this._paddingProp=i:this.padding=t.getLayoutValue("icon-padding",e),i=t.getLayoutProperty("icon-rotate"),i?.isDataDriven?this._rotateProp=i:this.rotate=t.getLayoutValue("icon-rotate",e),i=t.getLayoutProperty("icon-size"),i?.isDataDriven?this._sizeProp=i:this.size=t.getLayoutValue("icon-size",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e))}}class Gt{constructor(t,e,r){let i;this.allowOverlap=t.getLayoutValue("text-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("text-ignore-placement",e),this.keepUpright=t.getLayoutValue("text-keep-upright",e),this.optional=t.getLayoutValue("text-optional",e),this.rotationAlignment=t.getLayoutValue("text-rotation-alignment",e),this.rotationAlignment===vt.aF.AUTO&&(this.rotationAlignment=r?vt.aF.MAP:vt.aF.VIEWPORT),i=t.getLayoutProperty("text-anchor"),i?.isDataDriven?this._anchorProp=i:this.anchor=t.getLayoutValue("text-anchor",e),i=t.getLayoutProperty("text-justify"),i?.isDataDriven?this._justifyProp=i:this.justify=t.getLayoutValue("text-justify",e),i=t.getLayoutProperty("text-letter-spacing"),i?.isDataDriven?this._letterSpacingProp=i:this.letterSpacing=t.getLayoutValue("text-letter-spacing",e),i=t.getLayoutProperty("text-line-height"),i?.isDataDriven?this._lineHeightProp=i:this.lineHeight=t.getLayoutValue("text-line-height",e),i=t.getLayoutProperty("text-max-angle"),i?.isDataDriven?this._maxAngleProp=i:this.maxAngle=t.getLayoutValue("text-max-angle",e),i=t.getLayoutProperty("text-max-width"),i?.isDataDriven?this._maxWidthProp=i:this.maxWidth=t.getLayoutValue("text-max-width",e),i=t.getLayoutProperty("text-offset"),i?.isDataDriven?this._offsetProp=i:this.offset=t.getLayoutValue("text-offset",e),i=t.getLayoutProperty("text-padding"),i?.isDataDriven?this._paddingProp=i:this.padding=t.getLayoutValue("text-padding",e),i=t.getLayoutProperty("text-rotate"),i?.isDataDriven?this._rotateProp=i:this.rotate=t.getLayoutValue("text-rotate",e),i=t.getLayoutProperty("text-size"),i?.isDataDriven?this._sizeProp=i:this.size=t.getLayoutValue("text-size",e),i=t.getLayoutProperty("text-writing-mode"),i?.isDataDriven?this._writingModeProp=i:this.writingMode=t.getLayoutValue("text-writing-mode",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._justifyProp&&(this.justify=this._justifyProp.getValue(t,e)),this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(t,e)),this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(t,e)),this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(t,e)),this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e)),this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(t,e))}}},51785:(t,e,r)=>{r.d(e,{Z:()=>s});var i=r(21315),n=r(7333);class s{constructor(t){if(this._style=t,this.backgroundBucketIds=[],this._uidToLayer=new Map,this._layerByName={},this._runningId=0,t.layers||(t.layers=[]),this.version=parseFloat(t.version),this.layers=t.layers.map(((t,e,r)=>this._create(t,e,r))).filter((t=>!!t)),this.layers){let t;for(let e=0;e<this.layers.length;e++)t=this.layers[e],this._layerByName[t.id]=t,this._uidToLayer.set(t.uid,t),t.type===i.fR.BACKGROUND&&this.backgroundBucketIds.push(t.id)}this._identifyRefLayers()}isPainterDataDriven(t){const e=this._layerByName[t];return!!e&&e.isPainterDataDriven()}getStyleLayerId(t){return t>=this.layers.length?null:this.layers[t].id}getStyleLayerByUID(t){return this._uidToLayer.get(t)??null}getStyleLayerIndex(t){const e=this._layerByName[t];return e?this.layers.indexOf(e):-1}setStyleLayer(t,e){if(!t||!t.id)return;const r=this._style;null!=e&&e>=this.layers.length&&(e=this.layers.length-1);let i,n=!0;const a=this._layerByName[t.id];if(a){const o=this.layers.indexOf(a);e||(e=o),e===o?(n=!1,i=s._recreateLayer(t,a),this.layers[e]=i,r.layers[e]=t):(this.layers.splice(o,1),r.layers.splice(o,1),i=this._create(t,e,this.layers),this.layers.splice(e,0,i),r.layers.splice(e,0,t))}else i=this._create(t,e,this.layers),!e||e>=this.layers.length?(this.layers.push(i),r.layers.push(t)):(this.layers.splice(e,0,i),r.layers.splice(e,0,t));this._layerByName[t.id]=i,this._uidToLayer.set(i.uid,i),n&&this._recomputeZValues(),this._identifyRefLayers()}getStyleLayer(t){const e=this._layerByName[t];return e?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(t){const e=this._layerByName[t];if(e){delete this._layerByName[t],this._uidToLayer.delete(e.uid);const r=this.layers.indexOf(e);this.layers.splice(r,1),this._style.layers.splice(r,1),this._recomputeZValues(),this._identifyRefLayers()}}getLayerById(t){return this._layerByName[t]}getLayoutProperties(t){const e=this._layerByName[t];return e?e.layout:null}getPaintProperties(t){const e=this._layerByName[t];return e?e.paint:null}setPaintProperties(t,e){const r=this._layerByName[t];if(!r)return;const i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:e},n=s._recreateLayer(i,r),a=this.layers.indexOf(r);this.layers[a]=n,this._style.layers[a].paint=e,this._layerByName[r.id]=n,this._uidToLayer.set(r.uid,n)}setLayoutProperties(t,e){const r=this._layerByName[t];if(!r)return;const i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:e,paint:r.paint},n=s._recreateLayer(i,r),a=this.layers.indexOf(r);this.layers[a]=n,this._style.layers[a].layout=e,this._layerByName[r.id]=n,this._uidToLayer.set(r.uid,n)}setStyleLayerVisibility(t,e){const r=this._layerByName[t];if(!r)return;const i=r.layout||{};i.visibility=e;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:i,paint:r.paint},a=s._recreateLayer(n,r),o=this.layers.indexOf(r);this.layers[o]=a,this._style.layers[o].layout=i,this._layerByName[r.id]=a,this._uidToLayer.set(r.uid,a)}getStyleLayerVisibility(t){const e=this._layerByName[t];if(!e)return"none";const r=e.layout;return r?.visibility??"visible"}_recomputeZValues(){const t=this.layers,e=1/(t.length+1);for(let r=0;r<t.length;r++)t[r].z=1-(1+r)*e}_identifyRefLayers(){const t=[],e=[];let r=0;for(const n of this.layers){const s=n.layout;if(n.type===i.fR.FILL){const e=n;let i=n.source+"|"+n.sourceLayer;i+="|"+(s?.visibility??""),i+="|"+n.minzoom,i+="|"+n.maxzoom,i+="|"+JSON.stringify(n.filter),(e.hasDataDrivenFill||e.hasDataDrivenOutline)&&(i+="|"+r),t.push({key:i,layer:n})}else if(n.type===i.fR.LINE){const t=n,i=n.paint,a=null!=i&&(null!=i["line-pattern"]||null!=i["line-dasharray"]);let o=n.source+"|"+n.sourceLayer;o+="|"+(s?.visibility??""),o+="|"+n.minzoom,o+="|"+n.maxzoom,o+="|"+JSON.stringify(n.filter),o+="|"+(void 0!==s?s["line-cap"]:""),o+="|"+(void 0!==s?s["line-join"]:""),(t.hasDataDrivenLine||a)&&(o+="|"+r),e.push({key:o,layer:n})}++r}this._assignRefLayers(t),this._assignRefLayers(e)}_assignRefLayers(t){let e,r;t.sort(((t,e)=>t.key<e.key?-1:t.key>e.key?1:0));const n=t.length;for(let s=0;s<n;s++){const a=t[s];if(a.key===e)a.layer.refLayerId=r;else if(e=a.key,r=a.layer.id,a.layer.type===i.fR.FILL){if(!a.layer.getPaintProperty("fill-outline-color"))for(let i=s+1;i<n;i++){const n=t[i];if(n.key!==e)break;if(n.layer.getPaintProperty("fill-outline-color")){t[s]=n,t[i]=a,r=n.layer.id;break}}}else if(a.layer.type===i.fR.LINE){let i=a.layer;for(let o=s+1;o<n;o++){const n=t[o];if(n.key!==e)break;const l=n.layer;(i.canUseThinTessellation&&!l.canUseThinTessellation||!i.canUseThinTessellation&&(l.getPaintProperty("line-pattern")||l.getPaintProperty("line-dasharray")))&&(i=l,t[s]=n,t[o]=a,r=n.layer.id)}}}}_create(t,e,r){const s=1-(1+e)*(1/(r.length+1)),a=this._runningId++;switch(t.type){case"background":return new n.Et(i.fR.BACKGROUND,t,s,a);case"fill":return new n.Le(i.fR.FILL,t,s,a);case"line":return new n.gf(i.fR.LINE,t,s,a);case"symbol":return new n.jG(i.fR.SYMBOL,t,s,a);case"raster":return console.warn(`Unsupported vector tile raster layer ${t.id}`),null;case"circle":return new n.sj(i.fR.CIRCLE,t,s,a)}return null}static _recreateLayer(t,e){switch(t.type){case"background":return new n.Et(i.fR.BACKGROUND,t,e.z,e.uid);case"fill":return new n.Le(i.fR.FILL,t,e.z,e.uid);case"line":return new n.gf(i.fR.LINE,t,e.z,e.uid);case"symbol":return new n.jG(i.fR.SYMBOL,t,e.z,e.uid);case"raster":return console.warn(`Unsupported vector tile raster layer ${t.id}`),null;case"circle":return new n.sj(i.fR.CIRCLE,t,e.z,e.uid)}return null}}},21968:(t,e,r)=>{r.d(e,{G:()=>i});class i{constructor(t,e,r,i,n,s=!1,a=0){this.name=t,this.count=e,this.type=r,this.offset=i,this.stride=n,this.normalized=s,this.divisor=a}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5245,9880],{53073:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(75148),a=n(59987),s=n(91136),i=n(90961),l=n(90658),u=n(8667);class o extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new i.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===l.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?l.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(null===e.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":return(0,u.kK)((0,l.SV)(this._relationGeom),(0,l.SV)(e.geometry));case"esriSpatialRelIntersects":return(0,u.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,u.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,u.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,u.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,u.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,u.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,u.LV)(this._relationGeom,e.geometry,this._relationString??"")}}async _fetchAndRefineFeatures(e,t,n){const r=new i.Z([],e,!1,null),a=Math.min(t,e.length);await(this._parent?._getFeatures(r,-1,a,n)),this._checkCancelled(n);const s=[];for(let t=0;t<a;t++){const n=this._parent._featureFromCache(e[t]);s.push(await this.executeSpatialRelationTest(n))}for(let n=0;n<t;n++)!0===s[n]?this._idstates[e[n]]=l.dj.InFeatureSet:this._idstates[e[n]]=l.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,n,r,a){await this._ensureLoaded();const s=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,a);let l;return this._checkCancelled(a),l=null!==t?new i.Z(s._candidates.slice(0).concat(s._known.slice(0)),[],s._ordered,this._clonePageDefinition(s.pagesDefinition)):new i.Z(s._candidates.slice(0),s._known.slice(0),s._ordered,this._clonePageDefinition(s.pagesDefinition)),l}async _stat(e,t,n,r,a,s,i){if(""!==n)return{calculated:!1};const l=await this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,a,s,i);return!1===l.calculated?null===a&&""===n&&null===r?this._manualStat(e,t,s,i):{calculated:!1}:l}async _canDoAggregates(e,t,n,r,a){return""===n&&null===r&&null!==this._parent&&this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,a)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,i,l){if(null===this._parent)throw new a.EN(a.H9.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,i,l)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(59987),a=n(91136),s=n(90961),i=n(90658);class l extends a.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=i.Bj.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return i.dj.NotInFeatureSet}async _getFeature(){throw new r.EN(r.H9.NeverReach)}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new r.EN(r.H9.NeverReach)}async _getFilteredSet(){return new s.Z([],[],!1,null)}_stat(e,t,n,r,a,s,i){return this._manualStat(e,t,s,i)}async _canDoAggregates(){return!1}}},91136:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(85839),a=n(48039),s=n(59987);class i{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise(((r,a)=>{this._parent._getSet(this._progress).then((s=>{const i=s._known;let l=i.length-1;if("GETPAGES"===i.at(-1)&&(l-=1),this._lastId+e>l&&i.length>0&&"GETPAGES"===i.at(-1))return void this._parent._expandPagedSet(s,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,a)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}));const u=s._candidates;if(l>=this._lastId+e||0===u.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=i.length)break;n[t]=i[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))}this._parent._refineSetBlock(s,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,a)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise(((t,n)=>{this._parent._getSet(this._progress).then((r=>{const a=r._known;this._lastId<a.length-1?"GETPAGES"===a[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,a[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(-1!==this._parent._totalCount)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&"GETPAGES"===e._known.at(-1))return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if("GETPAGES"===e._known.at(-1))return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}var l=n(90961),u=n(90658),o=n(95002),c=n(95330),h=n(41534),d=n(8667),f=n(82971),_=n(99514);class p{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=u.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.typeIdField=null,this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,this._dateFieldIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return!0===this._parent?.loaded?(this._initialiseFeatureSet(),this):(await(this._parent?.load()),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new f.Z({wkid:4326}),this.geometryType=u.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new _.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!=e&&e.aborted)throw new s.EN(s.H9.Cancelled)}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,a){return null!==this._parent&&this._parent._canDoAggregates(e,t,n,r,a)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,a,i,l){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,a,i,l)}async _getAgregagtePhysicalPage(e,t,n){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===u.Bj.NotEvaluated){if(null!==a.Z.applicationCache){const e=a.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.Z.applicationCache&&a.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.Z.applicationCache&&a.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:u.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:u.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:u.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.testwhere))return t.thetype;return u.Bj.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new s.EN(s.H9.NotImplemented)}isTable(){return this._parent?.isTable()??!1}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return u.dj.Unknown}_getSet(e){throw new s.EN(s.H9.NotImplemented)}async _getFeature(e,t,n){if(this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);throw new s.EN(s.H9.MissingFeatures)}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new l.Z([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,a){throw new s.EN(s.H9.NotImplemented)}async _refineSetBlock(e,t,n){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let a=r-e._candidates.length;if(0===e._candidates.length)return e;if(a>=t)return e;if(await this._refineIfParentKnown(e,t-a,n),this._checkCancelled(n),this._refineKnowns(e,t-a),a=r-e._candidates.length,a<t&&e._candidates.length>0){const r=t-a,s=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(s,s.length>r?r:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-a),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const a=[];t=this._maxQueryRate();for(let s=0;s<e._candidates.length&&"GETPAGES"!==e._candidates[s];s++){let i=!1;const l=this._candidateIdTransform(e._candidates[s]);l!==e._candidates[s]&&(i=!0);const o=this._isInFeatureSet(l);if(o===u.dj.InFeatureSet)!0===i?e._known.includes(l)||(e._known.push(l),n+=1):(e._known.push(e._candidates[s]),n+=1),null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(a.push(r),r={start:s,end:s});else if(o===u.dj.NotInFeatureSet)null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(a.push(r),r={start:s,end:s}),n+=1;else if(o===u.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&a.push(r);for(let t=a.length-1;t>=0;t--)e._candidates.splice(a[t].start,a[t].end-a[t].start+1)}_refineIfParentKnown(e,t,n){const r=new l.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}async _expandPagedSet(e,t,n,r,a){if(null===this._parent)throw new s.EN(s.H9.NotImplemented);return this._parent._expandPagedSet(e,t,n,r,a)}async _expandPagedSetFeatureSet(e,t,n,r,a){if(e._known.length>0&&"GETPAGES"===e._known.at(-1)&&(r=1),0===r&&e._candidates.length>0&&"GETPAGES"===e._candidates.at(-1)&&(r=2),0===r)return"finished";const s=await this._getPage(e,r,a);return n+s<t?this._expandPagedSet(e,t,n+s,0,a):"success"}async _getPage(e,t,n){const r=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){r.length=r.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&r.push("GETPAGES"),t}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let a=await this._stat(e,t,"",null,null,n,r);return!1===a.calculated&&(a=await this._manualStat(e,t,n,r)),a.result}async _manualStat(e,t,n,r){let a=null;switch(e.toLowerCase()){case"count":return a=await(0,o.QX)(this,r),{calculated:!0,result:a};case"distinct":return a=await(0,o.EB)(this,t,n,r),{calculated:!0,result:a};case"avg":case"mean":return a=await(0,o.J6)(this,t,r),{calculated:!0,result:a};case"stdev":return a=await(0,o.m)(this,t,r),{calculated:!0,result:a};case"variance":return a=await(0,o.CA)(this,t,r),{calculated:!0,result:a};case"sum":return a=await(0,o.Sm)(this,t,r),{calculated:!0,result:a};case"min":return a=await(0,o.VV)(this,t,r),{calculated:!0,result:a};case"max":return a=await(0,o.Fp)(this,t,r),{calculated:!0,result:a};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,a,s,i){const l=await this._parent._stat(e,t,n,r,a,s,i);return!1===l.calculated?null===a&&""===n&&null===r?this._manualStat(e,t,s,i):{calculated:!1}:l}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return new Promise(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((a=>{try{null!==a&&null!==a.geometry&&e.push(a.geometry),e.length>30||null===a&&e.length>1?(0,d.G0)(e).then((s=>{try{null===a?n(s):(e=[s],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===a?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new i(this,e)}intersection(e,t=!1){return p._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return p._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return p._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return p._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return p._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return p._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return p._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return p._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return p._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return p._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return p._featuresetFunctions.relate.bind(this)(e,t)}within(e){return p._featuresetFunctions.within.bind(this)(e)}touches(e){return p._featuresetFunctions.touches.bind(this)(e)}top(e){return p._featuresetFunctions.top.bind(this)(e)}crosses(e){return p._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return p._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return p._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return p._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return p._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return p._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise(((r,a)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,a,0)}))}_reduceImpl(e,t,n,r,a,s,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._reduceImpl(e,t,n,r,a,s,i)}));e.next().then((l=>{try{if(null===l)a(n);else{const u=t(n,l,r,this);(0,c.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,r+1,a,s,i)}),s):this._reduceImpl(e,t,u,r+1,a,s,i)}}catch(e){s(e)}}),s)}catch(e){s(e)}}removeField(e){return p._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return p._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,u.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,d.Y4)(n.geometry,r).then((t=>e+t)):(0,d.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,u.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,d.kQ)(n.geometry,r).then((t=>e+t)):(0,d.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}async distinct(e,t=1e3,n=null,r){await this.load();const a=h.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(a,n),this.calculateStatistic("distinct",a,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=h.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=h.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=h.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=h.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=h.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=h.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",h.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))}_defaultTracker(e){return e??{aborted:!1}}forEach(e,t){return new Promise(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,r,a,s){try{if(++s>1e3)return void setTimeout((()=>{s=0,this._forEachImpl(e,t,n,r,a,s)}),0);e.next().then((i=>{try{if(null===i)r(n);else{const l=t(i);null==l?this._forEachImpl(e,t,n,r,a,s):(0,c.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,r,a,s)}catch(e){a(e)}}),a):this._forEachImpl(e,t,n,r,a,s)}}catch(e){a(e)}}),a)}catch(e){a(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,u.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,n,r,a){return this._parent.queryAttachments(e,t,n,r,a)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,u.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===u.q2[this.geometryType]?"esriGeometryNull":u.q2[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];await this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t);const n=this.schema();return n.features=e,n.spatialReference=this.spatialReference.toJSON(),JSON.stringify(n)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const n=[];await this.reduce(((e,r)=>{const a={geometry:r.geometry?!0===t?.keepGeometryType?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==a.geometry&&a.geometry.spatialReference&&!0!==t?.keepGeometryType&&delete a.geometry.spatialReference,n.push(a),1}),0,e);const r=this.schema();return r.features=n,r.spatialReference=!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON(),r}get dateTimeReferenceFieldIndex(){return null===this._dateFieldIndex&&(this._dateFieldIndex=r.nu.create(this.getFieldsIndex(),this)),this._dateFieldIndex}fieldTimeZone(e){return this.dateTimeReferenceFieldIndex.fieldTimeZone(e)}get preferredTimeReference(){return this._parent?.preferredTimeReference??null}get dateFieldsTimeReference(){return this._parent?.dateFieldsTimeReference??null}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}}p._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>h,DT:()=>m,TE:()=>E,XF:()=>o,bB:()=>c,fz:()=>f,hq:()=>I,mA:()=>_,oX:()=>p,vR:()=>g,y5:()=>T,zR:()=>u});var r=n(48853),a=(n(85839),n(59987)),s=n(90658),i=n(41534),l=n(17126);function u(e,t){return d(e?.parseTree,t,e?.parameters)}function o(e,t,n){return d(e,t,n)}function c(e,t,n,r){return i.WhereClause.create(d(e.parseTree,s.Bj.Standardised,e.parameters,t,n),r)}function h(e,t,n="AND"){return i.WhereClause.create("(("+u(e,s.Bj.Standardised)+")"+n+"("+u(t,s.Bj.Standardised)+"))",e.fieldsIndex)}function d(e,t,n,r=null,i=null,l=null){let u,o,c,h;switch(e.type){case"interval":return E(d(e.value,t,n,r,i,l),e.qualifier,e.op);case"case-expression":{let a=" CASE ";"simple"===e.format&&(a+=d(e.operand,t,n,r,i,l));for(let s=0;s<e.clauses.length;s++)a+=" WHEN "+d(e.clauses[s].operand,t,n,r,i,l)+" THEN "+d(e.clauses[s].value,t,n,r,i,l);return null!==e.else&&(a+=" ELSE "+d(e.else,t,n,r,i,l)),a+=" END ",a}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replaceAll("'","''")+"'";if((0,s.J_)(r))return p(r,t,l);if((0,s.NP)(r))return _(r,t,l);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replaceAll("'","''")+"'"):(0,s.J_)(r[n])?e.push(p(r[n],t,l)):(0,s.NP)(r[n])?e.push(_(r[n],t,l)):e.push(r[n].toString());return e}return r.toString()}case"expression-list":o=[];for(const a of e.value)o.push(d(a,t,n,r,i,l));return o;case"unary-expression":return" ( NOT "+d(e.expr,t,n,r,i,l)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+d(e.left,t,n,r,i,l)+" AND "+d(e.right,t,n,r,i,l)+") ";case"OR":return" ("+d(e.left,t,n,r,i,l)+" OR "+d(e.right,t,n,r,i,l)+") ";case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+d(e.left,t,n,r,i,l)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+d(e.left,t,n,r,i,l)+" IS NOT NULL )";case"IN":return u=[],"expression-list"===e.right.type?(u=d(e.right,t,n,r,i)," ("+d(e.left,t,n,r,i,l)+" IN ("+u.join(",")+")) "):(h=d(e.right,t,n,r,i,l),h instanceof Array?" ("+d(e.left,t,n,r,i,l)+" IN ("+h.join(",")+")) ":" ("+d(e.left,t,n,r,i,l)+" IN ("+h+")) ");case"NOT IN":return u=[],"expression-list"===e.right.type?(u=d(e.right,t,n,r,i)," ("+d(e.left,t,n,r,i,l)+" NOT IN ("+u.join(",")+")) "):(h=d(e.right,t,n,r,i,l),h instanceof Array?" ("+d(e.left,t,n,r,i,l)+" NOT IN ("+h.join(",")+")) ":" ("+d(e.left,t,n,r,i,l)+" NOT IN ("+h+")) ");case"BETWEEN":return c=d(e.right,t,n,r,i,l)," ("+d(e.left,t,n,r,i,l)+" BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"NOTBETWEEN":return c=d(e.right,t,n,r,i,l)," ("+d(e.left,t,n,r,i,l)+" NOT BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"LIKE":return""!==e.escape?" ("+d(e.left,t,n,r,i,l)+" LIKE "+d(e.right,t,n,r,i,l)+" ESCAPE '"+e.escape+"') ":" ("+d(e.left,t,n,r,i,l)+" LIKE "+d(e.right,t,n,r,i,l)+") ";case"NOT LIKE":return""!==e.escape?" ("+d(e.left,t,n,r,i,l)+" NOT LIKE "+d(e.right,t,n,r,i,l)+" ESCAPE '"+e.escape+"') ":" ("+d(e.left,t,n,r,i,l)+" NOT LIKE "+d(e.right,t,n,r,i,l)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+d(e.left,t,n,r,i,l)+" "+e.operator+" "+d(e.right,t,n,r,i,l)+") ";case"||":return" ("+d(e.left,t,n,r,i,l)+" "+(t===s.Bj.SqlServer?"+":e.operator)+" "+d(e.right,t,n,r,i,l)+") "}throw new a.eS(a.f.UnsupportedOperator,{operator:e.operator});case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":case"date":return p(e.value,t,l);case"number":return e.value.toString();case"current-time":return g("date"===e.mode,t);case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+i+")":e.column;case"data-type":return e.value;case"function":{const a=d(e.args,t,n,r,i,l);return f(e.name,a,t)}}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}function f(e,t,n){switch(e.toLowerCase().trim()){case"cos":case"sin":case"tan":case"cosh":case"tanh":case"sinh":case"acos":case"asin":case"atan":case"floor":case"log10":case"log":case"abs":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]})`;case"ceiling":case"ceil":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:"ceiling"});switch(n){case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"mod":case"power":case"nullif":if(2!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]},${t[1]})`;case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new a.eS(a.f.InvalidFunctionParameters,{function:"round"});case"truncate":if(t.length<1||t.length>2)throw new a.eS(a.f.InvalidFunctionParameters,{function:"truncate"});return n===s.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:"char_length"});switch(n){case s.Bj.SqlServer:return"LEN("+t[0]+")";case s.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"coalesce":case"concat":{if(t.length<1)throw new a.eS(a.f.InvalidFunctionParameters,{function:e.toLowerCase()});let n=e.toUpperCase().trim()+"(";for(let e=0;e<t.length;e++)0!==e&&(n+=","),n+=t[e];return n+=")",n}case"lower":case"lcase":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:"lower"});return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:"upper"});return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case s.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case s.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replaceAll("'","")+" FROM "+t[1]+")";case"cast":{let e="";switch(n){case s.Bj.Oracle:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case s.Bj.Postgres:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE PRECISION";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case s.Bj.SqlServer:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="DATETIME";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;default:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`}}}throw new a.eS(a.f.InvalidFunctionParameters,{function:e})}function _(e,t,n,a){n?.outputTimeReference&&(e=r.iG.arcadeDateAndZoneToArcadeDate(e,n?.outputTimeReference));const i=e.toDateTime(),l=0===i.hour&&0===i.minute&&0===i.second&&0===i.millisecond;switch(t){case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:return l?`date '${i.toFormat("yyyy-LL-dd")}'`:`date '${i.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.Oracle:return l?`TO_DATE('${i.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${i.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case s.Bj.SqlServer:return`'${i.toFormat(l?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.PGDB:return`#${i.toFormat(l?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case s.Bj.Postgres:return`TIMESTAMP '${i.toFormat(l?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${i.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function p(e,t,n,r){let a=(0,s.J_)(e)?l.ou.fromJSDate(e):l.ou.fromSQL(e);const i=0===a.hour&&0===a.minute&&0===a.second&&0===a.millisecond;switch(n?.inputTimeReference&&(a=l.ou.fromObject({day:a.day,year:a.year,month:a.month,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond},{zone:n.inputTimeReference})),n?.outputTimeReference&&(a=a.setZone(n.outputTimeReference)),t){case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:return i?`date '${a.toFormat("yyyy-LL-dd")}'`:`date '${a.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.Oracle:return i?`TO_DATE('${a.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${a.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case s.Bj.SqlServer:return`'${a.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.PGDB:return`#${a.toFormat(i?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case s.Bj.Postgres:return`TIMESTAMP '${a.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${a.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function g(e,t){switch(t){case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:case s.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case s.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case s.Bj.PGDB:case s.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function m(e,t,n={}){const r={},a={},s={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"guid",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",guid:"guid",globalid:"guid",string:"string"};for(const e of t){const t=e.type?s[e.type]:void 0;r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=s[n[e]];a[e.toLowerCase()]=void 0===t?"":t}switch(y(r,e.parseTree,e.parameters,a)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string";case"global-id":case"guid":return"guid"}return""}function y(e,t,n,r){let i;switch(t.type){case"interval":return"integer";case"case-expression":{const a=[];if("simple"===t.format){for(let s=0;s<t.clauses.length;s++)a.push(y(e,t.clauses[s].value,n,r));null!==t.else&&a.push(y(e,t.else,n,r))}else{for(let s=0;s<t.clauses.length;s++)a.push(y(e,t.else,n,r));null!==t.else&&a.push(y(e,t.else,n,r))}return w(a)}case"parameter":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if((0,s.J_)(e))return"date";if((0,s.NP)(e))return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const a=[];for(const s of t.value)a.push(y(e,s,n,r));return a}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return"boolean";case"*":case"-":case"+":case"/":return w([y(e,t.left,n,r),y(e,t.right,n,r)]);case"||":return"string";default:throw new a.eS(a.f.UnsupportedOperator,{operator:t.operator})}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current-time":return"date";case"column-reference":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"cast":switch(t.args?.value[1]?.value.type??""){case"integer":case"smallint":return"integer";case"real":case"float":return"double";case"date":case"timestamp":return"date";case"varchar":return"string";default:return""}case"position":case"extract":case"char_length":case"mod":return"integer";case"round":if(i=y(e,t.args,n,r),i instanceof Array){if(i.length<=0)return"double";i=i[0]}return i;case"sign":return"integer";case"ceiling":case"floor":case"abs":return i=y(e,t.args,n,r),i instanceof Array&&(i=w(i)),"integer"===i||"double"===i?i:"double";case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"cosh":case"sinh":case"tanh":case"power":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string";case"truncate":return"double";case"nullif":case"coalesce":return i=y(e,t.args,n,r),i instanceof Array?i.length>0?i[0]:"":i}return""}throw new a.eS(a.f.UnsupportedSyntax,{node:t.type})}const S={boolean:1,string:2,integer:3,double:4,date:5};function w(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||S[t]<S[n]?n:t);return t}return""}function I(e,t){return b(e.parseTree,t)}function T(e){return"column-reference"===e?.parseTree.type}function b(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return b(e.operand,t)||b(e.value,t);case"case-expression":for(const n of e.clauses)if(b(n,t))return!0;return!("simple"!==e.format||!b(e.operand,t))||!(null===e.else||!b(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"string":case"number":return!1;case"expression-list":for(const n of e.value)if(b(n,t))return!0;return!1;case"unary-expression":return b(e.expr,t);case"binary-expression":return b(e.left,t)||b(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return b(e.args,t)}return!1}function F(e){let t="";return t+=e.period.toUpperCase(),t}function E(e,t,n){let r="";return r="interval-period"===t.type?F(t):F(t.start)+" TO "+F(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{CA:()=>p,EB:()=>w,Fp:()=>f,J6:()=>_,QX:()=>y,Sm:()=>m,VV:()=>d,g3:()=>c,m:()=>g,tj:()=>h});var r=n(59987),a=n(90658),s=n(36515);function i(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function l(e){const t=i(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function u(e){const t=i(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function c(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function h(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],r={},s=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,a.hj)(t)||(0,a.HD)(t))void 0===r[t]&&(n.push(t),r[t]=1);else{let e=!1;for(let n=0;n<s.length;n++)!0===(0,a.tt)(s[n],t)&&(e=!0);!1===e&&(s.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return i(t);case"min":return Math.min.apply(Math,t);case"sum":return o(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(l(t));case"var":case"variance":return l(t);case"count":return t.length}return 0}async function d(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.min.apply(Math,r)}async function f(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.max.apply(Math,r)}async function _(e,t,n){let r="";t&&!(0,s.y5)(t)&&(r=(0,s.DT)(t,e.fields));const a=await S(e,t,n,!0);if(0===a.length)return null;const l=i(a);return null===l?l:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(l):l}async function p(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:u(r)}async function g(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.sqrt(u(r))}async function m(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:o(r)}async function y(e,t){return e.iterator(t).count()}async function S(e,t,n,a=!1){const s=e.iterator(n),i=[],l={ticker:0};let u=await s.next();for(;null!==u;){if(l.ticker++,n.aborted)throw new r.EN(r.H9.Cancelled);l.ticker%100==0&&(l.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t?.calculateValue(u);null===e?!1===a&&(i[i.length]=e):i[i.length]=e,u=await s.next()}return i}async function w(e,t,n=1e3,a=null){const s=e.iterator(a),i=[],l={},u={ticker:0};let o=await s.next();for(;null!==o;){if(u.ticker++,a&&a.aborted)throw new r.EN(r.H9.Cancelled);u.ticker%100==0&&(u.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t?.calculateValue(o);if(null!=e&&void 0===l[e]&&(i.push(e),l[e]=1),i.length>=n&&-1!==n)return i;o=await s.next()}return i}},99880:(e,t,n)=>{n.d(t,{V:()=>u});var r=n(68773),a=(n(3172),n(20102)),s=n(92604),i=n(17452);const l=s.Z.getLogger("esri.assets");function u(e){if(!r.default.assetsPath)throw l.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new a.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.default.assetsPath,e)}},10661:(e,t,n)=>{n.d(t,{s:()=>a});var r=n(42100);class a extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},8667:(e,t,n)=>{n.d(t,{CJ:()=>j,Cz:()=>O,D$:()=>B,ED:()=>w,FH:()=>x,G0:()=>D,Gg:()=>b,JI:()=>E,LV:()=>T,Nm:()=>I,Sp:()=>A,TE:()=>p,U1:()=>k,W4:()=>y,Y4:()=>U,_L:()=>P,cv:()=>N,e5:()=>v,f3:()=>L,fS:()=>g,j2:()=>G,jU:()=>_,kK:()=>m,kQ:()=>H,og:()=>F,oq:()=>h,r3:()=>f,rd:()=>C,sz:()=>M,uh:()=>S,wf:()=>R,z7:()=>d}),n(66577);var r=n(56569),a=n(94139),s=n(33955);function i(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function l(e){return e?Array.isArray(e)?e.map(l):e.toJSON?e.toJSON():e:e}function u(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let o;async function c(e,t){return(await async function(){return o||(o=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),o}()).invoke("executeGEOperation",{operation:e,parameters:l(t)})}async function h(e,t){return u(await c("clip",[i(e),e,t]))}async function d(e,t){return u(await c("cut",[i(e),e,t]))}function f(e,t){return c("contains",[i(e),e,t])}function _(e,t){return c("crosses",[i(e),e,t])}function p(e,t,n){return c("distance",[i(e),e,t,n])}function g(e,t){return c("equals",[i(e),e,t])}function m(e,t){return c("intersects",[i(e),e,t])}function y(e,t){return c("touches",[i(e),e,t])}function S(e,t){return c("within",[i(e),e,t])}function w(e,t){return c("disjoint",[i(e),e,t])}function I(e,t){return c("overlaps",[i(e),e,t])}function T(e,t,n){return c("relate",[i(e),e,t,n])}function b(e){return c("isSimple",[i(e),e])}async function F(e){return u(await c("simplify",[i(e),e]))}async function E(e,t=!1){return u(await c("convexHull",[i(e),e,t]))}async function v(e,t){return u(await c("difference",[i(e),e,t]))}async function A(e,t){return u(await c("symmetricDifference",[i(e),e,t]))}async function R(e,t){return u(await c("intersect",[i(e),e,t]))}async function D(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return u(await c("union",[i(n),n]))}async function N(e,t,n,r,a,s){return u(await c("offset",[i(e),e,t,n,r,a,s]))}async function L(e,t,n,r=!1){const a=[i(e),e,t,n,r];return u(await c("buffer",a))}async function C(e,t,n,r,a,s){const l=[i(e),e,t,n,r,a,s];return u(await c("geodesicBuffer",l))}async function x(e,t,n=!0){const r=await c("nearestCoordinate",[i(e),e,t,n]);return{...r,coordinate:a.Z.fromJSON(r.coordinate)}}async function P(e,t){const n=await c("nearestVertex",[i(e),e,t]);return{...n,coordinate:a.Z.fromJSON(n.coordinate)}}async function k(e,t,n){if(null==e)throw new Z;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new Z;const a=e.constructor.fromJSON(await c("rotate",[r,e,t,n]));return a.spatialReference=r,a}async function B(e,t,n,r){return u(await c("generalize",[i(e),e,t,n,r]))}async function O(e,t,n){return u(await c("densify",[i(e),e,t,n]))}async function G(e,t,n,r=0){return u(await c("geodesicDensify",[i(e),e,t,n,r]))}function j(e,t){return c("planarArea",[i(e),e,t])}function M(e,t){return c("planarLength",[i(e),e,t])}function U(e,t,n){return c("geodesicArea",[i(e),e,t,n])}function H(e,t,n){return c("geodesicLength",[i(e),e,t,n])}class Z extends Error{constructor(){super("Illegal Argument Exception")}}},94443:(e,t,n)=>{n.d(t,{ME:()=>_,Su:()=>p,tz:()=>f});var r=n(20102),a=n(50758),s=n(95330),i=n(70171);const l=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,u={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function o(e){return e in u}Object.keys(u);const c=[],h=new Map;function d(e){for(const t of h.keys())g(e.pattern,t)&&h.delete(t)}function f(e){return c.includes(e)||(d(e),c.unshift(e)),(0,a.kB)((()=>{const t=c.indexOf(e);t>-1&&(c.splice(t,1),d(e))}))}async function _(e){const t=(0,i.Kd)();h.has(e)||h.set(e,async function(e,t){const n=[];for(const r of c)if(g(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=h.get(e);return n&&await m.add(n),n}function p(e){if(!l.test(e))return null;const t=l.exec(e);if(null===t)return null;const[,n,r]=t,a=n+(r?"-"+r.toUpperCase():"");return o(a)?a:o(n)?n:null}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,i.Ze)((()=>{h.clear()}));const m=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7096,5732,9880],{99880:(t,e,s)=>{s.d(e,{V:()=>l});var i=s(68773),n=(s(3172),s(20102)),r=s(92604),o=s(17452);const a=r.Z.getLogger("esri.assets");function l(t){if(!i.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(i.default.assetsPath,t)}},5732:(t,e,s)=>{s.d(e,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},52138:(t,e,s)=>{s.d(e,{A:()=>p,a:()=>l,d:()=>m,e:()=>d,f:()=>f,g:()=>y,h:()=>x,i:()=>o,j:()=>v,k:()=>u,m:()=>h,s:()=>r,t:()=>a,w:()=>c,y:()=>S,z:()=>M});var i=s(65617),n=s(46851);function r(t,e,s,i,n,r,o,a,l,h,c,u,d,f,m,p,_){return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t[9]=c,t[10]=u,t[11]=d,t[12]=f,t[13]=m,t[14]=p,t[15]=_,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e){if(t===e){const s=e[1],i=e[2],n=e[3],r=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=s,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[11]=e[14],t[12]=n,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15],y=s*a-i*o,b=s*l-n*o,x=s*h-r*o,v=i*l-n*a,M=i*h-r*a,S=n*h-r*l,w=c*p-u*m,I=c*_-d*m,E=c*g-f*m,B=u*_-d*p,A=u*g-f*p,C=d*g-f*_;let z=y*C-b*A+x*B+v*E-M*I+S*w;return z?(z=1/z,t[0]=(a*C-l*A+h*B)*z,t[1]=(n*A-i*C-r*B)*z,t[2]=(p*S-_*M+g*v)*z,t[3]=(d*M-u*S-f*v)*z,t[4]=(l*E-o*C-h*I)*z,t[5]=(s*C-n*E+r*I)*z,t[6]=(_*x-m*S-g*b)*z,t[7]=(c*S-d*x+f*b)*z,t[8]=(o*A-a*E+h*w)*z,t[9]=(i*E-s*A-r*w)*z,t[10]=(m*M-p*x+g*y)*z,t[11]=(u*x-c*M-f*y)*z,t[12]=(a*I-o*B-l*w)*z,t[13]=(s*B-i*I+n*w)*z,t[14]=(p*b-m*v-_*y)*z,t[15]=(c*v-u*b+d*y)*z,t):null}function h(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=e[9],f=e[10],m=e[11],p=e[12],_=e[13],g=e[14],y=e[15];let b=s[0],x=s[1],v=s[2],M=s[3];return t[0]=b*i+x*a+v*u+M*p,t[1]=b*n+x*l+v*d+M*_,t[2]=b*r+x*h+v*f+M*g,t[3]=b*o+x*c+v*m+M*y,b=s[4],x=s[5],v=s[6],M=s[7],t[4]=b*i+x*a+v*u+M*p,t[5]=b*n+x*l+v*d+M*_,t[6]=b*r+x*h+v*f+M*g,t[7]=b*o+x*c+v*m+M*y,b=s[8],x=s[9],v=s[10],M=s[11],t[8]=b*i+x*a+v*u+M*p,t[9]=b*n+x*l+v*d+M*_,t[10]=b*r+x*h+v*f+M*g,t[11]=b*o+x*c+v*m+M*y,b=s[12],x=s[13],v=s[14],M=s[15],t[12]=b*i+x*a+v*u+M*p,t[13]=b*n+x*l+v*d+M*_,t[14]=b*r+x*h+v*f+M*g,t[15]=b*o+x*c+v*m+M*y,t}function c(t,e,s){const i=s[0],n=s[1],r=s[2];if(e===t)t[12]=e[0]*i+e[4]*n+e[8]*r+e[12],t[13]=e[1]*i+e[5]*n+e[9]*r+e[13],t[14]=e[2]*i+e[6]*n+e[10]*r+e[14],t[15]=e[3]*i+e[7]*n+e[11]*r+e[15];else{const s=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7],f=e[8],m=e[9],p=e[10],_=e[11];t[0]=s,t[1]=o,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=p,t[11]=_,t[12]=s*i+h*n+f*r+e[12],t[13]=o*i+c*n+m*r+e[13],t[14]=a*i+u*n+p*r+e[14],t[15]=l*i+d*n+_*r+e[15]}return t}function u(t,e,s){const i=s[0],n=s[1],r=s[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,s,i){let r,o,a,l,h,c,u,d,f,m,p,_,g,y,b,x,v,M,S,w,I,E,B,A,C=i[0],z=i[1],F=i[2],O=Math.sqrt(C*C+z*z+F*F);return O<(0,n.g)()?null:(O=1/O,C*=O,z*=O,F*=O,r=Math.sin(s),o=Math.cos(s),a=1-o,l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],f=e[5],m=e[6],p=e[7],_=e[8],g=e[9],y=e[10],b=e[11],x=C*C*a+o,v=z*C*a+F*r,M=F*C*a-z*r,S=C*z*a-F*r,w=z*z*a+o,I=F*z*a+C*r,E=C*F*a+z*r,B=z*F*a-C*r,A=F*F*a+o,t[0]=l*x+d*v+_*M,t[1]=h*x+f*v+g*M,t[2]=c*x+m*v+y*M,t[3]=u*x+p*v+b*M,t[4]=l*S+d*w+_*I,t[5]=h*S+f*w+g*I,t[6]=c*S+m*w+y*I,t[7]=u*S+p*w+b*I,t[8]=l*E+d*B+_*A,t[9]=h*E+f*B+g*A,t[10]=c*E+m*B+y*A,t[11]=u*E+p*B+b*A,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function m(t,e,s){if(0===e)return o(t);let i,r,a,l=s[0],h=s[1],c=s[2],u=Math.sqrt(l*l+h*h+c*c);return u<(0,n.g)()?null:(u=1/u,l*=u,h*=u,c*=u,i=Math.sin(e),r=Math.cos(e),a=1-r,t[0]=l*l*a+r,t[1]=h*l*a+c*i,t[2]=c*l*a-h*i,t[3]=0,t[4]=l*h*a-c*i,t[5]=h*h*a+r,t[6]=c*h*a+l*i,t[7]=0,t[8]=l*c*a+h*i,t[9]=h*c*a-l*i,t[10]=c*c*a+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function p(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=s,t[7]=0,t[8]=0,t[9]=-s,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=i+i,l=n+n,h=r+r,c=i*a,u=i*l,d=i*h,f=n*l,m=n*h,p=r*h,_=o*a,g=o*l,y=o*h;return t[0]=1-(f+p),t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-(c+p),t[6]=m+_,t[7]=0,t[8]=d+g,t[9]=m-_,t[10]=1-(c+f),t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}const g=(0,i.c)();function y(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=e[3],l=n+n,h=r+r,c=o+o,u=n*l,d=n*h,f=n*c,m=r*h,p=r*c,_=o*c,g=a*l,y=a*h,b=a*c,x=i[0],v=i[1],M=i[2];return t[0]=(1-(m+_))*x,t[1]=(d+b)*x,t[2]=(f-y)*x,t[3]=0,t[4]=(d-b)*v,t[5]=(1-(u+_))*v,t[6]=(p+g)*v,t[7]=0,t[8]=(f+y)*M,t[9]=(p-g)*M,t[10]=(1-(u+m))*M,t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}function b(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t[2]=e[2]-s[2],t[3]=e[3]-s[3],t[4]=e[4]-s[4],t[5]=e[5]-s[5],t[6]=e[6]-s[6],t[7]=e[7]-s[7],t[8]=e[8]-s[8],t[9]=e[9]-s[9],t[10]=e[10]-s[10],t[11]=e[11]-s[11],t[12]=e[12]-s[12],t[13]=e[13]-s[13],t[14]=e[14]-s[14],t[15]=e[15]-s[15],t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function v(t,e){if(t===e)return!0;const s=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=t[9],f=t[10],m=t[11],p=t[12],_=t[13],g=t[14],y=t[15],b=e[0],x=e[1],v=e[2],M=e[3],S=e[4],w=e[5],I=e[6],E=e[7],B=e[8],A=e[9],C=e[10],z=e[11],F=e[12],O=e[13],N=e[14],R=e[15],Z=(0,n.g)();return Math.abs(s-b)<=Z*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(i-x)<=Z*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-M)<=Z*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-S)<=Z*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(l-w)<=Z*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(h-I)<=Z*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(c-E)<=Z*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-B)<=Z*Math.max(1,Math.abs(u),Math.abs(B))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(f-C)<=Z*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(m-z)<=Z*Math.max(1,Math.abs(m),Math.abs(z))&&Math.abs(p-F)<=Z*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(_-O)<=Z*Math.max(1,Math.abs(_),Math.abs(O))&&Math.abs(g-N)<=Z*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(y-R)<=Z*Math.max(1,Math.abs(y),Math.abs(R))}function M(t){const e=(0,n.g)(),s=t[0],i=t[1],r=t[2],o=t[4],a=t[5],l=t[6],h=t[8],c=t[9],u=t[10];return Math.abs(1-(s*s+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}function S(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const w=h,I=b;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t[2]=e[2]+s[2],t[3]=e[3]+s[3],t[4]=e[4]+s[4],t[5]=e[5]+s[5],t[6]=e[6]+s[6],t[7]=e[7]+s[7],t[8]=e[8]+s[8],t[9]=e[9]+s[9],t[10]=e[10]+s[10],t[11]=e[11]+s[11],t[12]=e[12]+s[12],t[13]=e[13]+s[13],t[14]=e[14]+s[14],t[15]=e[15]+s[15],t},adjoint:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15];return t[0]=a*(d*g-f*_)-u*(l*g-h*_)+p*(l*f-h*d),t[1]=-(i*(d*g-f*_)-u*(n*g-r*_)+p*(n*f-r*d)),t[2]=i*(l*g-h*_)-a*(n*g-r*_)+p*(n*h-r*l),t[3]=-(i*(l*f-h*d)-a*(n*f-r*d)+u*(n*h-r*l)),t[4]=-(o*(d*g-f*_)-c*(l*g-h*_)+m*(l*f-h*d)),t[5]=s*(d*g-f*_)-c*(n*g-r*_)+m*(n*f-r*d),t[6]=-(s*(l*g-h*_)-o*(n*g-r*_)+m*(n*h-r*l)),t[7]=s*(l*f-h*d)-o*(n*f-r*d)+c*(n*h-r*l),t[8]=o*(u*g-f*p)-c*(a*g-h*p)+m*(a*f-h*u),t[9]=-(s*(u*g-f*p)-c*(i*g-r*p)+m*(i*f-r*u)),t[10]=s*(a*g-h*p)-o*(i*g-r*p)+m*(i*h-r*a),t[11]=-(s*(a*f-h*u)-o*(i*f-r*u)+c*(i*h-r*a)),t[12]=-(o*(u*_-d*p)-c*(a*_-l*p)+m*(a*d-l*u)),t[13]=s*(u*_-d*p)-c*(i*_-n*p)+m*(i*d-n*u),t[14]=-(s*(a*_-l*p)-o*(i*_-n*p)+m*(i*l-n*a)),t[15]=s*(a*d-l*u)-o*(i*d-n*u)+c*(i*l-n*a),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],s=t[1],i=t[2],n=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8],c=t[9],u=t[10],d=t[11],f=t[12],m=t[13],p=t[14],_=t[15];return(e*o-s*r)*(u*_-d*p)-(e*a-i*r)*(c*_-d*m)+(e*l-n*r)*(c*p-u*m)+(s*a-i*o)*(h*_-d*f)-(s*l-n*o)*(h*p-u*f)+(i*l-n*a)*(h*m-c*f)},equals:v,exactEquals:x,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=s+s,a=i+i,l=n+n,h=s*o,c=i*o,u=i*a,d=n*o,f=n*a,m=n*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-m,t[1]=c+g,t[2]=d-_,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=f+p,t[7]=0,t[8]=d+_,t[9]=f-p,t[10]=1-h-u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const s=g,i=-e[0],n=-e[1],r=-e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=i*i+n*n+r*r+o*o;return u>0?(s[0]=2*(a*o+c*i+l*r-h*n)/u,s[1]=2*(l*o+c*n+h*i-a*r)/u,s[2]=2*(h*o+c*r+a*n-l*i)/u):(s[0]=2*(a*o+c*i+l*r-h*n),s[1]=2*(l*o+c*n+h*i-a*r),s[2]=2*(h*o+c*r+a*n-l*i)),_(t,e,s),t},fromRotation:m,fromRotationTranslation:_,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(t,e,s,i,n){const r=e[0],o=e[1],a=e[2],l=e[3],h=r+r,c=o+o,u=a+a,d=r*h,f=r*c,m=r*u,p=o*c,_=o*u,g=a*u,y=l*h,b=l*c,x=l*u,v=i[0],M=i[1],S=i[2],w=n[0],I=n[1],E=n[2],B=(1-(p+g))*v,A=(f+x)*v,C=(m-b)*v,z=(f-x)*M,F=(1-(d+g))*M,O=(_+y)*M,N=(m+b)*S,R=(_-y)*S,Z=(1-(d+p))*S;return t[0]=B,t[1]=A,t[2]=C,t[3]=0,t[4]=z,t[5]=F,t[6]=O,t[7]=0,t[8]=N,t[9]=R,t[10]=Z,t[11]=0,t[12]=s[0]+w-(B*w+z*I+N*E),t[13]=s[1]+I-(A*w+F*I+R*E),t[14]=s[2]+E-(C*w+O*I+Z*E),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:f,fromXRotation:p,fromYRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=0,t[2]=-s,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=s,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=s,t[2]=0,t[3]=0,t[4]=-s,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,s,i,n,r,o){const a=1/(s-e),l=1/(n-i),h=1/(r-o);return t[0]=2*r*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*r*l,t[6]=0,t[7]=0,t[8]=(s+e)*a,t[9]=(n+i)*l,t[10]=(o+r)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*r*2*h,t[15]=0,t},getRotation:function(t,e){const s=e[0]+e[5]+e[10];let i=0;return s>0?(i=2*Math.sqrt(s+1),t[3]=.25*i,t[0]=(e[6]-e[9])/i,t[1]=(e[8]-e[2])/i,t[2]=(e[1]-e[4])/i):e[0]>e[5]&&e[0]>e[10]?(i=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/i,t[0]=.25*i,t[1]=(e[1]+e[4])/i,t[2]=(e[8]+e[2])/i):e[5]>e[10]?(i=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/i,t[0]=(e[1]+e[4])/i,t[1]=.25*i,t[2]=(e[6]+e[9])/i):(i=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/i,t[0]=(e[8]+e[2])/i,t[1]=(e[6]+e[9])/i,t[2]=.25*i),t},getScaling:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(s*s+i*i+n*n),t[1]=Math.sqrt(r*r+o*o+a*a),t[2]=Math.sqrt(l*l+h*h+c*c),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:S,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:M,lookAt:function(t,e,s,i){const r=e[0],a=e[1],l=e[2];let h=r-s[0],c=a-s[1],u=l-s[2];const d=(0,n.g)();if(Math.abs(h)<d&&Math.abs(c)<d&&Math.abs(u)<d)return void o(t);let f=1/Math.sqrt(h*h+c*c+u*u);h*=f,c*=f,u*=f;const m=i[0],p=i[1],_=i[2];let g=p*u-_*c,y=_*h-m*u,b=m*c-p*h;f=Math.sqrt(g*g+y*y+b*b),f?(f=1/f,g*=f,y*=f,b*=f):(g=0,y=0,b=0);let x=c*b-u*y,v=u*g-h*b,M=h*y-c*g;f=Math.sqrt(x*x+v*v+M*M),f?(f=1/f,x*=f,v*=f,M*=f):(x=0,v=0,M=0),t[0]=g,t[1]=x,t[2]=h,t[3]=0,t[4]=y,t[5]=v,t[6]=c,t[7]=0,t[8]=b,t[9]=M,t[10]=u,t[11]=0,t[12]=-(g*r+y*a+b*l),t[13]=-(x*r+v*a+M*l),t[14]=-(h*r+c*a+u*l),t[15]=1},mul:w,multiply:h,multiplyScalar:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12]*s,t[13]=e[13]*s,t[14]=e[14]*s,t[15]=e[15]*s,t},multiplyScalarAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t[2]=e[2]+s[2]*i,t[3]=e[3]+s[3]*i,t[4]=e[4]+s[4]*i,t[5]=e[5]+s[5]*i,t[6]=e[6]+s[6]*i,t[7]=e[7]+s[7]*i,t[8]=e[8]+s[8]*i,t[9]=e[9]+s[9]*i,t[10]=e[10]+s[10]*i,t[11]=e[11]+s[11]*i,t[12]=e[12]+s[12]*i,t[13]=e[13]+s[13]*i,t[14]=e[14]+s[14]*i,t[15]=e[15]+s[15]*i,t},ortho:function(t,e,s,i,n,r,o){const a=1/(e-s),l=1/(i-n),h=1/(r-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+s)*a,t[13]=(n+i)*l,t[14]=(o+r)*h,t[15]=1,t},perspective:function(t,e,s,i,n){const r=1/Math.tan(e/2);let o;return t[0]=r/s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(o=1/(i-n),t[10]=(n+i)*o,t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},perspectiveFromFieldOfView:function(t,e,s,i){const n=Math.tan(e.upDegrees*Math.PI/180),r=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+a),h=2/(n+r);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(o-a)*l*.5,t[9]=(n-r)*h*.5,t[10]=i/(s-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s/(s-i),t[15]=0,t},rotate:d,rotateX:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[4],o=e[5],a=e[6],l=e[7],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=r*n+h*i,t[5]=o*n+c*i,t[6]=a*n+u*i,t[7]=l*n+d*i,t[8]=h*n-r*i,t[9]=c*n-o*i,t[10]=u*n-a*i,t[11]=d*n-l*i,t},rotateY:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n-h*i,t[1]=o*n-c*i,t[2]=a*n-u*i,t[3]=l*n-d*i,t[8]=r*i+h*n,t[9]=o*i+c*n,t[10]=a*i+u*n,t[11]=l*i+d*n,t},rotateZ:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n+h*i,t[1]=o*n+c*i,t[2]=a*n+u*i,t[3]=l*n+d*i,t[4]=h*n-r*i,t[5]=c*n-o*i,t[6]=u*n-a*i,t[7]=d*n-l*i,t},scale:u,set:r,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:b,targetTo:function(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=i[0],l=i[1],h=i[2];let c=n-s[0],u=r-s[1],d=o-s[2],f=c*c+u*u+d*d;f>0&&(f=1/Math.sqrt(f),c*=f,u*=f,d*=f);let m=l*d-h*u,p=h*c-a*d,_=a*u-l*c;return f=m*m+p*p+_*_,f>0&&(f=1/Math.sqrt(f),m*=f,p*=f,_*=f),t[0]=m,t[1]=p,t[2]=_,t[3]=0,t[4]=u*_-d*p,t[5]=d*m-c*_,t[6]=c*p-u*m,t[7]=0,t[8]=c,t[9]=u,t[10]=d,t[11]=0,t[12]=n,t[13]=r,t[14]=o,t[15]=1,t},translate:c,transpose:a},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,s)=>{s.d(e,{Z:()=>z});var i,n=s(43697),r=s(3894),o=s(32448),a=s(50758),l=s(22974),h=s(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(i||(i={}));var c,u=s(1654),d=s(75215),f=s(58971),m=s(5600),p=s(52421),_=s(52011),g=s(10661);class y{constructor(t,e,s,i,n){this.target=t,this.added=e,this.removed=s,this.start=i,this.deleteCount=n}}const b=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1}));function x(t){return t?t instanceof C?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function v(t){if(t&&t.length)return t[0]}function M(t,e,s,i){const n=Math.min(t.length-s,e.length-i);let r=0;for(;r<n&&t[s+r]===e[i+r];)r++;return r}function S(t,e,s,i){e&&e.forEach(((e,n,r)=>{t.push(e),S(t,s.call(i,e,n,r),s,i)}))}const w=new Set,I=new Set,E=new Set,B=new Map;let A=0,C=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:A++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,x(t)),this._emitAfterChanges(i.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,s={removed:!1,callback:e};return t.push(s),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),(0,a.kB)((()=>{s.removed=!0,t.splice(t.indexOf(s),1)}))}return this._emitter.on(t,e)}once(t,e){return this.on(t,e)}add(t,e){if((0,f.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e??null);return this._splice(s,0,[t]),this._emitAfterChanges(i.ADD),this}addMany(t,e=this._items.length){if((0,f.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e);return this._splice(s,0,x(t)),this._emitAfterChanges(i.ADD),this}at(t){return(0,f.it)(this._observable),this._items.at(t)}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(l.d9)})}concat(...t){(0,f.it)(this._observable);const e=t.map(x);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),n=s.length;for(let i=0;i<n;i++)t.call(e,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(t,e){return(0,f.it)(this._observable),this._items.every(t,e)}filter(t,e){let s;return(0,f.it)(this._observable),s=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:s})}find(t,e){return(0,f.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,f.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,f.it)(this._observable);const s=[];return S(s,this,t,e),new c(s)}forEach(t,e){return(0,f.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,f.it)(this._observable),this._items[t]}getNextIndex(t){(0,f.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,f.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,f.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,f.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,f.it)(this._observable);const s=this._items.map(t,e);return new c({items:s})}reorder(t,e=this.length-1){(0,f.it)(this._observable);const s=this.indexOf(t);if(-1!==s){if(e<0?e=0:e>=this.length&&(e=this.length-1),s!==e){if(this._emitBeforeChanges(i.MOVE))return t;this._splice(s,1),this._splice(e,0,[t]),this._emitAfterChanges(i.MOVE)}return t}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),t}push(...t){return(0,f.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(i.ADD)),this.length}reduce(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(t,e):s.reduce(t)}reduceRight(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(t,e):s.reduceRight(t)}remove(t){return(0,f.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,f.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(i.REMOVE))return;const e=v(this._splice(t,1));return this._emitAfterChanges(i.REMOVE),e}removeMany(t){if((0,f.it)(this._observable),!t||!t.length||this._emitBeforeChanges(i.REMOVE))return[];const e=t instanceof c?t.toArray():t,s=this._items,n=[],r=e.length;for(let t=0;t<r;t++){const i=e[t],r=s.indexOf(i);if(r>-1){const i=1+M(e,s,t+1,r+1),o=this._splice(r,i);o&&o.length>0&&n.push.apply(n,o),t+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),t}slice(t=0,e=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,f.it)(this._observable),this._items.some(t,e)}sort(t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(i.MOVE),this}splice(t,e,...s){(0,f.it)(this._observable);const n=(e?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(t,e,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...t){return(0,f.it)(this._observable),!t.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,t),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,s){const i=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),t<0&&(t+=this.length),e){if(o=i.splice(t,e),this.hasEventListener("before-remove")){const e=b.acquire();e.target=this,e.cancellable=!0;for(let s=0,n=o.length;s<n;s++)r=o[s],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(s,1),i.splice(t,0,r),t+=1,s-=1,n-=1);b.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=b.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let s=0;s<e;s++)t.reset(o[s]),this.emit("after-remove",t);b.release(t)}}if(s&&s.length){if(n){const t=[];for(const e of s){const s=n.ensureType(e);null==s&&null!=e||t.push(s)}s=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const n=b.acquire();n.target=this,n.cancellable=!0;const a=b.acquire();a.target=this,a.cancellable=!1;for(const l of s)e?(n.reset(l),this.emit("before-add",n),n.defaultPrevented||(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),a.reset(l),this.emit("after-add",a));b.release(a),b.release(n)}else{if(o)for(const t of s)i.push(t);else i.splice(t,0,...s);this._set("length",i.length)}}if((s&&s.length||o&&o.length)&&this._notifyChangeEvent(s,o),this.hasEventListener("after-splice")){const i=new y(this,s,o,t,e);this.emit("after-splice",i)}return o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=t,this.emit("before-changes",s),e=s.defaultPrevented,b.release(s)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=b.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),b.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications.at(-1)?.changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;w.clear(),I.clear(),E.clear();for(const{added:e,removed:s}of t){if(e)if(0===E.size&&0===I.size)for(const t of e)w.add(t);else for(const t of e)I.has(t)?(E.add(t),I.delete(t)):E.has(t)||w.add(t);if(s)if(0===E.size&&0===w.size)for(const t of s)I.add(t);else for(const t of s)w.has(t)?w.delete(t):(E.delete(t),I.add(t))}const s=r.Z.acquire();w.forEach((t=>{s.push(t)}));const i=r.Z.acquire();I.forEach((t=>{i.push(t)}));const n=this._items,o=e.items,a=r.Z.acquire();if(E.forEach((t=>{o.indexOf(t)!==n.indexOf(t)&&a.push(t)})),e.listeners&&(s.length||i.length||a.length)){const t={target:this,added:s,removed:i,moved:a},n=e.listeners.length;for(let s=0;s<n;s++){const i=e.listeners[s];i.removed||i.callback.call(this,t)}}r.Z.release(s),r.Z.release(i),r.Z.release(a)}w.clear(),I.clear(),E.clear()}};C.ofType=t=>{if(!t)return c;if(B.has(t))return B.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const s in t.typeMap){const i=t.typeMap[s].prototype.declaredClass;e?e+=` | ${i}`:e=i}let s=class extends c{};return(0,n._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,_.j)(`esri.core.Collection<${e}>`)],s),B.set(t,s),s},(0,n._)([(0,m.Cb)()],C.prototype,"length",void 0),(0,n._)([(0,m.Cb)()],C.prototype,"items",null),C=c=(0,n._)([(0,_.j)("esri.core.Collection")],C);const z=C},32448:(t,e,s)=>{s.d(e,{Z:()=>l});var i=s(43697),n=s(92036),r=s(50758),o=s(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}}!function(t){class e{constructor(t=null){this._target=t,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(t,e){const s=this._listenersMap&&this._listenersMap.get(t);if(!s)return!1;const i=this._target||this;return[...s].forEach((t=>{t.call(i,e)})),s.length>0}on(t,e){if(Array.isArray(t)){const s=t.map((t=>this.on(t,e)));return(0,r.AL)(s)}if(t.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(t)||[];return s.push(e),this._listenersMap.set(t,s),(0,r.kB)((()=>{const s=this._listenersMap&&this._listenersMap.get(t)||[],i=s.indexOf(e);i>=0&&s.splice(i,1)}))}once(t,e){const s=this.on(t,(t=>{s.remove(),e.call(null,t)}));return s}hasEventListener(t){const e=this._listenersMap&&this._listenersMap.get(t);return null!=e&&e.length>0}}t.EventEmitter=e,t.EventedMixin=t=>{let s=class extends t{constructor(){super(...arguments),this._emitter=new e}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};return s=(0,i._)([(0,o.j)("esri.core.Evented")],s),s};let s=class extends n.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};s=(0,i._)([(0,o.j)("esri.core.Evented")],s),t.EventedAccessor=s}(a||(a={}));const l=a},13867:(t,e,s)=>{s.d(e,{z:()=>n});var i=s(69801);class n{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,s)=>{s.d(e,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(t,e,s){this.name=t,this._storage=e,this.id=l+++":",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(t,e,s,i=0){this._storage.put(this,t,e,s,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,s){this._storage.updateSize(this,t,e,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,s,n,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==s&&this._notifyRemove(e,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(e,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return void console.warn("Refusing to cache entry with invalid size "+n);const a=1+Math.max(r,-3)- -3;this._db.set(e,{entry:s,size:n,lifetime:a,lives:a}),this._size+=n,t.size+=n,this._checkSizeLimits()}updateSize(t,e,s,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===s){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,s,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach(((t,i)=>{const n=t.lifetime;s[n]=(s[n]||0)+t.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=e[r]||0;e[r]=s+t.size}}))}));const i={};this._users.forAll((t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[s]||0;e[s]=n,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(e);n.sort(((t,s)=>e[s]-e[t])),n.forEach((s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]));for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s){let i;return this._removeFuncs.some((n=>{if(t.startsWith(n[0])){const t=n[1](e,s);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,s]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,s,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,s=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const n=this._notifyRemove(t,e.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let l=0},52421:(t,e,s)=>{function i(t){return(e,s)=>{e[s]=t}}s.d(e,{c:()=>i})},10661:(t,e,s)=>{s.d(e,{s:()=>n});var i=s(42100);class n extends i.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},66643:(t,e,s)=>{s.d(e,{Ed:()=>h,UI:()=>c,mt:()=>m,q6:()=>f,vr:()=>p});var i=s(43697),n=s(92036),r=s(70586),o=s(95330),a=s(5600),l=s(52011);function h(t,e,s){return(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))}async function c(t,e,s){return(await(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))).map((t=>t.value))}function u(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return u(await t)}catch(t){return d(t)}}async function m(t){try{return u(await t)}catch(t){return(0,o.r9)(t),d(t)}}function p(t,e){return new _(t,e)}let _=class extends n.Z{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=t(s),this.promise.then((t=>{this._result=u(t),this._cleanup()}),(t=>{this._result=d(t),this._cleanup()})),this._abortHandle=(0,o.fu)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],_.prototype,"value",null),(0,i._)([(0,a.Cb)()],_.prototype,"error",null),(0,i._)([(0,a.Cb)()],_.prototype,"finished",null),(0,i._)([(0,a.Cb)()],_.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],_.prototype,"_result",void 0),_=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],_)},24133:(t,e,s)=>{s.d(e,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=u,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),b.prune(),x.prune(),v.prune(),M.prune()}all(t){this._all(this._data,t)}search(t,e){let s=this._data;const i=this._toBBox;if(g(t,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;g(t,o)&&(s.leaf?e(r):_(t,o)?this._all(r,e):b.push(r))}s=b.pop()}}collides(t){let e=this._data;const s=this._toBBox;if(!g(t,e))return!1;for(b.clear();e;){for(let i=0,n=e.children.length;i<n;i++){const n=e.children[i],r=e.leaf?s(n):n;if(g(t,r)){if(e.leaf||_(t,r))return!0;b.push(n)}}e=b.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,s=t.length;e<s;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(t){if(!t)return this;let e,s,n=this._data,r=0,o=!1;const a=this._toBBox(t);for(v.clear(),M.clear();n||v.length>0;){if(n||(n=v.pop(),e=v.data.at(-1),r=M.pop()??0,o=!0),n.leaf&&(s=(0,i.cq)(n.children,t,n.children.length,n.indexHint),-1!==s))return n.children.splice(s,1),v.push(n),this._condense(v),this;o||n.leaf||!_(n,a)?e?(r++,n=e.children[r],o=!1):n=null:(v.push(n),M.push(r),r=0,e=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let s=t;for(x.clear();s;){if(!0===s.leaf)for(const t of s.children)e(t);else x.pushArray(s.children);s=x.pop()??null}}_build(t,e,s,i){const n=s-e+1;let r=this._maxEntries;if(n<=r){const i=new I(t.slice(e,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new E([]);o.height=i;const l=Math.ceil(n/r),h=l*Math.ceil(Math.sqrt(r));y(t,e,s,h,this._compareMinX);for(let n=e;n<=s;n+=h){const e=Math.min(n+h-1,s);y(t,n,e,l,this._compareMinY);for(let s=n;s<=e;s+=l){const n=Math.min(s+l-1,e);o.children.push(this._build(t,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(t,e,s,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=d(o),l=m(t,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}e=s||e.children[0]}return e}_insert(t,e,s){const i=this._toBBox,n=s?t:i(t);v.clear();const r=this._chooseSubtree(n,this._data,e,v);for(r.children.push(t),h(r,n);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(n,v,e)}_split(t,e){const s=t.data[e],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new I(o):new E(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(s,l)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,s){let i,n,r;i=n=1/0;for(let o=e;o<=s-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,s,this._toBBox),h=p(e,a),c=d(e)+d(a);h<i?(i=h,r=o,n=c<n?c:n):h===i&&c<n&&(n=c,r=o)}return r}_chooseSplitAxis(t,e,s){const i=t.leaf?this._compareMinX:c,n=t.leaf?this._compareMinY:u;this._allDistMargin(t,e,s,i)<this._allDistMargin(t,e,s,n)&&t.children.sort(i)}_allDistMargin(t,e,s,i){t.children.sort(i);const n=this._toBBox,r=l(t,0,e,n),o=l(t,s-e,s,n);let a=f(r)+f(o);for(let i=e;i<s-e;i++){const e=t.children[i];h(r,t.leaf?n(e):e),a+=f(r)}for(let i=s-e-1;i>=e;i--){const e=t.children[i];h(o,t.leaf?n(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,s){for(let i=s;i>=0;i--)h(e.data[i],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const s=t.data[e];if(0===s.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<s;o++)r=t.children[o],h(n,t.leaf?i(r):r);return n}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){const s=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t,e,s,i,n){const o=[e,s];for(;o.length;){const e=o.pop(),s=o.pop();if(e-s<=i)continue;const a=s+Math.ceil((e-s)/i/2)*i;(0,r.q)(t,a,s,e,n),o.push(s,a,a,e)}}const b=new n.Z,x=new n.Z,v=new n.Z,M=new n.Z({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class w extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class I extends w{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends w{constructor(t){super(),this.children=t,this.leaf=!1}}},14808:(t,e,s)=>{s.d(e,{Qc:()=>c,WU:()=>a,lt:()=>h});var i=s(19153),n=s(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(t=(0,n.Kd)()){let e=(t=t.toLowerCase())in r;if(!e){const s=t.split("-");s.length>1&&s[0]in r&&(t=s[0],e=!0),e||(t="en")}const[s,i,o="#,##0.###"]=r[t];return{decimal:s,group:i,pattern:o}}function a(t,e){const s=o((e={...e}).locale);e.customs=s;const i=e.pattern||s.pattern;return isNaN(t)||Math.abs(t)===1/0?null:function(t,e,s){const i=(s=s||{}).customs.group,n=s.customs.decimal,r=e.split(";"),o=r[0];if((e=r[t<0?1:0]||"-"+o).includes("%"))t*=100;else if(e.includes("‰"))t*=1e3;else{if(e.includes("¤"))throw new Error("currency notation not supported");if(e.includes("E"))throw new Error("exponential notation not supported")}const a=l,h=o.match(a);if(!h)throw new Error("unable to find a number expression in pattern: "+e);return!1===s.fractional&&(s.places=0),e.replace(a,function(t,e,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const i=e.split("."),n="string"==typeof s.places&&s.places.indexOf(",");let r=s.places;n?r=s.places.substring(n+1):+r>=0||(r=(i[1]||[]).length),s.round<0||(t=Number(t.toFixed(Number(r))));const o=String(Math.abs(t)).split("."),a=o[1]||"";if(i[1]||s.places){n&&(s.places=s.places.substring(0,n));const t=void 0!==s.places?s.places:i[1]&&i[1].lastIndexOf("0")+1;+t>a.length&&(o[1]=a.padEnd(Number(t),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=i[0].replace(",","");let h=l.indexOf("0");-1!==h&&(h=l.length-h,h>o[0].length&&(o[0]=o[0].padStart(h,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-h)));let c,u,d=i[0].lastIndexOf(",");if(-1!==d){c=i[0].length-d-1;const t=i[0].substr(0,d);d=t.lastIndexOf(","),-1!==d&&(u=t.length-d-1)}const f=[];for(let t=o[0];t;){const e=t.length-c;f.push(e>0?t.substr(e):t),t=e>0?t.slice(0,e):"",u&&(c=u,u=void 0)}return o[0]=f.reverse().join(s.group||","),o.join(s.decimal||".")}(t,h[0],{decimal:n,group:i,places:s.places,round:s.round}))}(t,i,e)}const l=/[#0,]*[#0](?:\.0*#*)?/;function h(t){const e=o((t=t||{}).locale),s=t.pattern||e.pattern,n=e.group,r=e.decimal;let a=1;if(s.includes("%"))a/=100;else if(s.includes("‰"))a/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const h=s.split(";");1===h.length&&h.push("-"+h[0]);const c=d(h,(e=>(e="(?:"+(0,i.Qs)(e,".")+")").replace(l,(e=>{const s={signed:!1,separator:t.strict?n:[n,""],fractional:t.fractional,decimal:r,exponent:!1},i=e.split(".");let o=t.places;1===i.length&&1!==a&&(i[1]="###"),1===i.length||0===o?s.fractional=!1:(void 0===o&&(o=t.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==t.fractional&&(s.fractional=!0),!t.places&&+o<i[1].length&&(o+=","+i[1].length),s.places=o);const l=i[0].split(",");return l.length>1&&(s.groupSize=l.pop().length,l.length>1&&(s.groupSize2=l.pop().length)),"("+function(t){"places"in(t=t||{})||(t.places=1/0),"string"!=typeof t.decimal&&(t.decimal="."),"fractional"in t&&!/^0/.test(String(t.places))||(t.fractional=[!0,!1]),"exponent"in t||(t.exponent=[!0,!1]),"eSigned"in t||(t.eSigned=[!0,!1]);const e=u(t),s=d(t.fractional,(e=>{let s="";return e&&0!==t.places&&(s="\\"+t.decimal,t.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+t.places+"}"),s}),!0);let i=e+s;return s&&(i="(?:(?:"+i+")|(?:"+s+"))"),i+d(t.exponent,(e=>e?"([eE]"+u({signed:t.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function c(t,e){const s=h(e),i=new RegExp("^"+s.regexp+"$").exec(t);if(!i)return NaN;let n=i[1];if(!i[1]){if(!i[2])return NaN;n=i[2],s.factor*=-1}return n=n.replaceAll(new RegExp("["+s.group+"\\s\\xa0]","g"),"").replace(s.decimal,"."),Number(n)*s.factor}function u(t){return"signed"in(t=t||{})||(t.signed=[!0,!1]),"separator"in t?"groupSize"in t||(t.groupSize=3):t.separator="",d(t.signed,(t=>t?"[-+]":""),!0)+d(t.separator,(e=>{if(!e)return"(?:\\d+)";" "===(e=(0,i.Qs)(e))?e="\\s":" "===e&&(e="\\s\\xa0");const s=t.groupSize,n=t.groupSize2;if(n){const t="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+e+"]\\d{"+n+"})*["+e+"]\\d{"+s+"})";return s-n>0?"(?:"+t+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":t}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+e+"]\\d{"+s+"})*)"}),!0)}const d=(t,e,s)=>{if(!(t instanceof Array))return e(t);const i=[];for(let s=0;s<t.length;s++)i.push(e(t[s]));return f(i.join("|"),Boolean(s))},f=(t,e)=>"("+(e?"?:":"")+t+")"},17445:(t,e,s)=>{s.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(t,e,s={}){return c(t,e,s,f)}function h(t,e,s={}){return c(t,e,s,m)}function c(t,e,s={},i){let n=null;const o=s.once?(t,s)=>{i(t)&&((0,r.hw)(n),e(t,s))}:(t,s)=>{i(t)&&e(t,s)};if(n=(0,a.aQ)(t,o,s.sync,s.equals),s.initial){const e=t();o(e,e)}return n}function u(t,e,s,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),s(t)}const f=l(t,((t,s)=>{u(),(0,i.vT)(t)&&(a=t,h=(0,i.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,n.kB)((()=>{f.remove(),u()})),c}function d(t,e){return function(t,e,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??f)])}))}(t,m,e)}function f(t){return!0}function m(t){return!!t}s(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},16306:(t,e,s)=>{s.d(e,{aX:()=>M});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),l=s(73913),h=s(8744),c=s(40488),u=(s(66577),s(3172)),d=s(33955),f=s(11282),m=s(17452);async function p(t,e,s){const i="string"==typeof t?(0,m.mN)(t):t,n=e[0].spatialReference,r=(0,d.Ji)(e[0]),o={...s,query:{...i.query,f:"json",sr:n.wkid??JSON.stringify(n),geometries:JSON.stringify((l=e,{geometryType:(0,d.Ji)(l[0]),geometries:l.map((t=>t.toJSON()))}))}},{data:a}=await(0,u.Z)(i.path+"/simplify",o);var l;return function(t,e,s){const i=(0,d.q9)(e);return t.map((t=>{const e=i.fromJSON(t);return e.spatialReference=s,e}))}(a.geometries,r,n)}const _=r.Z.getLogger("esri.geometry.support.normalizeUtils");function g(t){return"polygon"===t[0].type}function y(t){return"polyline"===t[0].type}function b(t,e,s){if(e){const e=function(t,e){if(!(t instanceof a.Z||t instanceof o.Z)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw _.error(t),new n.Z(t)}const s=(0,l.x3)(t),i=[];for(const t of s){const s=[];i.push(s),s.push([t[0][0],t[0][1]]);for(let i=0;i<t.length-1;i++){const n=t[i][0],r=t[i][1],o=t[i+1][0],a=t[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),h=(a-r)/l,c=(o-n)/l,u=l/e;if(u>1){for(let t=1;t<=u-1;t++){const i=t*e,o=c*i+n,a=h*i+r;s.push([o,a])}const t=(l+Math.floor(u-1)*e)/2,i=c*t+n,o=h*t+r;s.push([i,o])}s.push([o,a])}}return function(t){return"polygon"===t.type}(t)?new o.Z({rings:i,spatialReference:t.spatialReference}):new a.Z({paths:i,spatialReference:t.spatialReference})}(t,1e6);t=(0,c.Sx)(e,!0)}return s&&(t=(0,l.Sy)(t,s)),t}function x(t,e,s){if(Array.isArray(t)){const i=t[0];if(i>e){const s=(0,l.XZ)(i,e);t[0]=i+s*(-2*e)}else if(i<s){const e=(0,l.XZ)(i,s);t[0]=i+e*(-2*s)}}else{const i=t.x;if(i>e){const s=(0,l.XZ)(i,e);t=t.clone().offset(s*(-2*e),0)}else if(i<s){const e=(0,l.XZ)(i,s);t=t.clone().offset(e*(-2*s),0)}}return t}function v(t,e){let s=-1;for(let i=0;i<e.cutIndexes.length;i++){const n=e.cutIndexes[i],r=e.geometries[i],o=(0,l.x3)(r);for(let t=0;t<o.length;t++){const e=o[t];e.some((s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const i=e[t][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.XZ)(s,180);for(let s=0;s<e.length;s++){const e=r.getPoint(t,s);r.setPoint(t,s,e.clone().offset(i,0))}return!0}}))}if(n===s){if(g(t))for(const e of(0,l.x3)(r))t[n]=t[n].addRing(e);else if(y(t))for(const e of(0,l.x3)(r))t[n]=t[n].addPath(e)}else s=n,t[n]=r}return t}async function M(t,e,s){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&_.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??i.default.geometryServiceUrl;let r,m,g,y,S,w,I,E,B=0;const A=[],C=[];for(const e of t)if(null!=e)if(r||(r=e.spatialReference,m=(0,h.C5)(r),g=r.isWebMercator,w=g?102100:4326,y=l.UZ[w].maxX,S=l.UZ[w].minX,I=l.UZ[w].plus180Line,E=l.UZ[w].minus180Line),m)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(x(e.clone(),y,S));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map((t=>x(t,y,S))),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,m);C.push(t.rings?new o.Z(t):t)}else if(e.extent){const t=e.extent,s=(0,l.XZ)(t.xmin,S)*(2*y);let i=0===s?e.clone():(0,l.Sy)(e.clone(),s);t.offset(s,0),t.intersects(I)&&t.xmax!==y?(B=t.xmax>B?t.xmax:B,i=b(i,g),A.push(i),C.push("cut")):t.intersects(E)&&t.xmin!==S?(B=t.xmax*(2*y)>B?t.xmax*(2*y):B,i=b(i,g,360),A.push(i),C.push("cut")):C.push(i)}else C.push(e.clone());else C.push(e);else C.push(e);let z=(0,l.XZ)(B,y),F=-90;const O=z,N=new a.Z;for(;z>0;){const t=360*z-180;N.addPath([[t,F],[t,-1*F]]),F*=-1,z--}if(A.length>0&&O>0){const e=v(A,await async function(t,e,s,i){const n=(0,f.en)(t),r=e[0].spatialReference,o={...i,query:{...n.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,d.Ji)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},a=await(0,u.Z)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((t=>{const e=(0,d.im)(t);return e.spatialReference=r,e}))}}(n,A,N,s)),i=[],r=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)r.push(n);else{const n=e.shift(),o=t[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(g?(0,c.$)(n):n)}}if(!i.length)return r;const o=await p(n,i,s),a=[];for(let t=0;t<r.length;t++){const e=r[t];"simplify"!==e?a.push(e):a.push(g?(0,c.$)(o.shift()):o.shift())}return a}const R=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)R.push(e);else{const t=A.shift();R.push(!0===g?(0,c.$)(t):t)}}return R}},73913:(t,e,s)=>{s.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const s=h(t);for(const t of s)for(const s of t)s[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},70171:(t,e,s)=>{s.d(e,{G3:()=>l,Kd:()=>a,Ze:()=>d,qe:()=>c});var i=s(50758);let n;const r=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return r??globalThis.navigator?.language??"en"}function a(){return void 0===n&&(n=o()),n}function l(t=a()){const e=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(t);return e?.[1].toLowerCase()}const h=[];function c(t){return h.push(t),(0,i.kB)((()=>h.splice(h.indexOf(t),1)))}const u=[];function d(t){return u.push(t),(0,i.kB)((()=>h.splice(u.indexOf(t),1)))}globalThis.addEventListener?.("languagechange",(function(){const t=o();n!==t&&(n=t,[...u].forEach((e=>{e.call(null,t)})),[...h].forEach((e=>{e.call(null,t)})))}))},37549:(t,e,s)=>{s.d(e,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((s,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,s){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,s)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(t,e,s)=>{s.d(e,{Z:()=>_});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),h=s(37549),c=s(29730),u=s(70272),d=s(5428);const f={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new u.u_(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,c.Y)(new d.Z,t.geometry,e.hasZ,e.hasM)),t.centroid)};var m=s(11490);const p=(0,o.Ue)();class _{constructor(t){this.geometryInfo=t,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,s,i,n]=this.fullBounds;return{xmin:e,ymin:s,xmax:i,ymax:n,spatialReference:(0,m.S2)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const s of t){const t=this._boundsStore.get(s.objectId);t&&e((0,o.JR)(p,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,s)=>{this._markedIds.has(s)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:t}));const s=this._featuresById.get(e);let n;if(this._markedIds.add(e),s?(t.displayId=s.displayId,n=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),null==t.geometry||!t.geometry.coords||!t.geometry.coords.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);n=(0,l.$)(null!=n?n:(0,a.Ue)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(e,n),this._featuresById.set(e,t)}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},27793:(t,e,s)=>{s.r(e),s.d(e,{default:()=>J}),s(66577);var i=s(3172),n=s(66643),r=s(20102),o=s(92604),a=s(95330),l=s(17452),h=s(44547),c=s(37455),u=s(8744),d=s(40488),f=s(70272),m=s(5428),p=s(57191),_=s(37427),g=s(64106),y=s(14808),b=s(35671);const x=/^\s*"([\S\s]*)"\s*$/,v=/""/g,M="\n",S=[","," ",";","|","\t"];function*w(t,e,s){let i=0;for(;i<=t.length;){const n=t.indexOf(e,i),r=t.substring(i,n>-1?n:void 0);i+=r.length+e.length,s&&!r.trim()||(yield r)}}function I(t){const e=t.includes("\r\n")?"\r\n":M;return w(t,e,!0)}function E(t,e){return w(t,e,!1)}function B(t,e,s){t=t.trim(),e=e?.trim();const i=[],n=Array.from(new Set([s?.delimiter,...S])).filter((t=>null!=t));for(const s of n){const n=z(t,s).length,r=z(e,s).length??n;n>1&&i.push({weight:Math.min(n,r),delimiter:s})}const r=i.sort((({weight:t},{weight:e})=>e-t)).map((({delimiter:t})=>t));for(const e of r){const i=O(C(t,e).names,s?.longitudeField,s?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:e,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*A(t,e,s,i=(()=>Object.create(null))){const n=I(t);n.next();let r="",o="",a=0,l=i(),h=0;t:for(const t of n){const n=E(t,s);for(const t of n)if(r+=o+t,o="",a+=F(t),a%2==0){if(a>0){const t=x.exec(r);if(!t){l=i(),h=0,r="",a=0;continue t}l[e[h]]=t[1].replaceAll(v,'"'),h++}else l[e[h]]=r,h++;r="",a=0}else o=s;0===a?(yield l,l=i(),h=0):o=M}}function C(t,e){const s=z(t,e).filter((t=>null!=t)),i=s.map((t=>(0,b.q6)(t)));for(let t=i.length-1;t>=0;t--)i[t]||(i.splice(t,1),s.splice(t,1));return{names:i,aliases:s}}function z(t,e){if(!t?.length)return[];const s=[];let i="",n="",r=0;const o=E(t,e);for(const t of o)if(i+=n+t,n="",r+=F(t),r%2==0){if(r>0){const t=x.exec(i);t&&s.push(t[1].replaceAll(v,'"'))}else s.push(i);i="",r=0}else n=e;return s}function F(t){let e=0,s=0;for(s=t.indexOf('"',s);s>=0;)e++,s=t.indexOf('"',s+1);return e}function O(t,e,s){e=(0,b.q6)(e)?.toLowerCase(),s=(0,b.q6)(s)?.toLowerCase();const i=t.map((t=>t.toLowerCase())),n=e?t[i.indexOf(e)]:null,r=s?t[i.indexOf(s)]:null;return{longitudeFieldName:n||t[i.indexOf(X.find((t=>i.includes(t))))],latitudeFieldName:r||t[i.indexOf(D.find((t=>i.includes(t))))]}}function N(t,e,s,i,n){const r=[],o=A(t,s,e),a=[];for(const t of o){if(10===a.length)break;a.push(t)}for(let t=0;t<s.length;t++){const e=s[t],o=i[t];if(e===n.longitudeFieldName||e===n.latitudeFieldName)r.push({name:e,type:"esriFieldTypeDouble",alias:o});else{let t,s;switch(R(a.map((t=>t[e])))){case"integer":t="esriFieldTypeInteger";break;case"double":t="esriFieldTypeDouble";break;case"date":t="esriFieldTypeDate",s=36;break;default:t="esriFieldTypeString",s=255}r.push({name:e,type:t,alias:o,length:s})}}return r}function R(t){if(!t.length)return"string";const e=/[^+-.,0-9]/;return t.map((t=>{let s=!1;if(""!==t){if(e.test(t))s=!0;else{let e=T(t);if(!isNaN(e))return/[.,]/.test(t)||!Number.isInteger(e)||e>214783647||e<-214783648?"double":"integer";if(t.includes("E")){if(e=Number(t),!isNaN(e))return"double";if(t.includes(",")){if(t=t.replace(",","."),e=Number(t),!isNaN(e))return"double";s=!0}else s=!0}else s=!0}return s?/^[-]?\d*[.,]?\d*$/.test(t)?"string":Z(new Date(t),t)?"date":"string":"string"}})).reduce(((t,e)=>void 0===t?e:void 0===e?t:t===e?e:"string"===t||"string"===e?"string":"double"===t||"double"===e?"double":void 0))}function Z(t,e){if(!t||"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))return!1;let s=!0;if(!q&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,i=0;for(;!e&&i<=t.length;)e=!L.test(t[i]),i++;s=!e}}return s}const T=function(){const t=(0,y.lt)(),e=new RegExp("^"+t.regexp+"$"),s=new RegExp("["+t.group+"\\s\\xa0]","g"),i=t.factor;return n=>{const r=e.exec(n);if(t.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],t.factor*=-1}return o=o.replace(s,"").replace(t.decimal,"."),+o*t.factor}}(),L=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,q=Number.isNaN(new Date("technology 10").getTime()),D=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],X=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var k=s(25278),j=s(99514),Y=s(82971);const P=(0,k.bU)("esriGeometryPoint"),V=["csv"],U=[0,0];class ${constructor(t,e){this.x=t,this.y=e}}class J{constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(t,e={}){this._loadOptions=t;const[s]=await Promise.all([this._fetch(e.signal),this._checkProjection(t?.parsingOptions?.spatialReference)]),i=function(t,e){const s=e.parsingOptions||{},i={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},n=i.layerDefinition={name:(0,l.vt)(e.url,V)||"csv",drawingInfo:P,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:s.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:s.spatialReference||{wkid:4326}}},o=I(t),a=o.next().value?.trim(),h=o.next().value?.trim();if(!a)throw new r.Z("csv-layer:empty-csv","CSV is empty",{csv:t});const{delimiter:c,locationInfo:u}=B(a,h,s);if(!c)throw new r.Z("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:h,parsingOptions:s});if(!u)throw new r.Z("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:h,parsingOptions:s});i.locationInfo=u,i.delimiter=c;const{names:d,aliases:f}=C(a,c),m=N(t,i.delimiter,d,f,i.locationInfo);if(s.fields?.length){const t=new j.Z(s.fields);for(const e of m){const s=t.get(e.name);s&&Object.assign(e,s)}}if(!m.some((t=>"esriFieldTypeOID"===t.type&&(n.objectIdField=t.name,!0)))){const t={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=t.name,m.unshift(t)}n.fields=m;const p=new j.Z(n.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=p.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=p.get(i.locationInfo.longitudeFieldName).name),n.timeInfo){const t=n.timeInfo;if(t.startTimeField){const e=p.get(t.startTimeField);e?(t.startTimeField=e.name,e.type="esriFieldTypeDate"):t.startTimeField=null}if(t.endTimeField){const e=p.get(t.endTimeField);e?(t.endTimeField=e.name,e.type="esriFieldTypeDate"):t.endTimeField=null}if(t.trackIdField){const e=p.get(t.trackIdField);t.trackIdField=e?e.name:null}t.startTimeField||t.endTimeField||(n.timeInfo=null)}return i}(s,t);this._locationInfo=i.locationInfo,this._delimiter=i.delimiter,this._queryEngine=this._createQueryEngine(i);const n=await this._createFeatures(s);this._queryEngine.featureStore.addMany(n);const{fullExtent:o,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=o,a){const{start:t,end:e}=a;i.layerDefinition.timeInfo.timeExtent=[t,e]}return i}async applyEdits(){throw new r.Z("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,n.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),t&&this._queryEngine.featureStore.addMany(t)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.D_)(t)||o.Z.getLogger("esri.layers.CSVLayer").error(new r.Z("csv-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:s}=this._loadOptions;if(!e)throw new r.Z("csv-layer:invalid-source","url not defined");const n=(0,l.mN)(e);return(await(0,i.Z)(n.path,{query:{...n.query,...s},responseType:"text",signal:t})).data}_createQueryEngine(t){const{objectIdField:e,fields:s,extent:i,timeInfo:n}=t.layerDefinition,r=new p.Z({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new g.q({fields:s,geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:e,spatialReference:i.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(t){const{latitudeFieldName:e,longitudeFieldName:s}=this._locationInfo,{objectIdField:i,fieldsIndex:n,spatialReference:r}=this._queryEngine;let o=[];const a=[],l=n.fields.filter((t=>t.name!==i)).map((t=>t.name));let p=0;const _={};for(const t of n.fields)if("esriFieldTypeOID"!==t.type&&"esriFieldTypeGlobalID"!==t.type){const e=(0,b.os)(t);void 0!==e&&(_[t.name]=e)}const g=A(t,l,this._delimiter,(0,k.Dm)(_,i));for(const t of g){const r=this._parseCoordinateValue(t[e]),l=this._parseCoordinateValue(t[s]);if(null!=l&&null!=r&&!isNaN(r)&&!isNaN(l)){t[e]=r,t[s]=l;for(const i in t)if(i!==e&&i!==s)if(n.isDateField(i)){const e=new Date(t[i]);t[i]=Z(e,t[i])?e.getTime():null}else if(n.isNumericField(i)){const e=T(t[i]);isNaN(e)?t[i]=null:t[i]=e}t[i]=p,p++,o.push(new $(l,r)),a.push(t)}}if(!(0,u.fS)({wkid:4326},r))if((0,u.sS)(r))for(const t of o)[t.x,t.y]=(0,d.hG)(t.x,t.y,U);else o=(0,h.oj)(c.N,o,Y.Z.WGS84,r,null,null);const y=[];for(let t=0;t<o.length;t++){const{x:e,y:s}=o[t],n=a[t];n[i]=t+1,y.push(new f.u_(new m.Z([],[e,s]),n,null,n[i]))}return y}_parseCoordinateValue(t){if(null==t||""===t)return null;let e=T(t);return(isNaN(e)||Math.abs(e)>181)&&(e=parseFloat(t)),e}async _checkProjection(t){try{await(0,_._W)(u.Zn,t)}catch{throw new r.Z("csv-layer:projection-not-supported","Projection not supported")}}}},25278:(t,e,s)=>{s.d(e,{Dm:()=>c,Hq:()=>u,MS:()=>d,bU:()=>a});var i=s(80442),n=s(22974),r=s(61159),o=s(58333);function a(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?o.I4:"esriGeometryPolyline"===t?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function c(t,e){if((0,i.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let s=`this.${e} = null;`;for(const e in t)s+=`this${l.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[e]:null,...t})}}function u(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},11282:(t,e,s)=>{s.d(e,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,n.mN)(t):(0,i.d9)(t)}function a(t,e,s){const i={};for(const n in t){if("declaredClass"===n)continue;const r=t[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let t=0;t<r.length;t++)i[n][t]=a(r[t])}else if("object"==typeof r)if(r.toJSON){const t=r.toJSON(s&&s[n]);i[n]=e?t:JSON.stringify(t)}else i[n]=e?r:JSON.stringify(r);else i[n]=r}return i}s(71058)},58333:(t,e,s)=>{s.d(e,{ET:()=>r,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>c,qP:()=>a,wW:()=>h});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);