@arcgis/core 4.31.0-next.20240919 → 4.31.0-next.20240921

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 (283) hide show
  1. package/WebDocument2D.js +1 -1
  2. package/WebLinkChart.js +1 -1
  3. package/WebMap.js +1 -1
  4. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  5. package/arcade/featureset/actions/Adapted.js +1 -1
  6. package/arcade/featureset/support/StatsField.js +1 -1
  7. package/arcade/featureset/support/errorsupport.js +1 -1
  8. package/arcade/featureset/support/sqlUtils.js +1 -1
  9. package/arcade/functions/maths.js +1 -1
  10. package/assets/esri/core/workers/RemoteClient.js +1 -1
  11. package/assets/esri/core/workers/chunks/{d9d8606f0a7c82b42755.js → 093a1ee161cb6a840283.js} +1 -1
  12. package/assets/esri/core/workers/chunks/2020b99675caabf5ac87.js +1 -0
  13. package/assets/esri/core/workers/chunks/24d45530fe47b3114daf.js +1 -0
  14. package/assets/esri/core/workers/chunks/35f92652df2561845d47.js +1 -0
  15. package/assets/esri/core/workers/chunks/42b92b4c2c9fd2b15f60.js +2 -0
  16. package/assets/esri/core/workers/chunks/{ba561e03df67894e437f.js.LICENSE.txt → 42b92b4c2c9fd2b15f60.js.LICENSE.txt} +1 -1
  17. package/assets/esri/core/workers/chunks/65b1d7fa57d4c764efe8.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b99d380cce485e65c990.js → 6cda92678ffeeaea0330.js} +1 -1
  19. package/assets/esri/core/workers/chunks/736e0c5cb9010ca818d8.js +1 -0
  20. package/assets/esri/core/workers/chunks/757b83799555958e059c.js +1 -0
  21. package/assets/esri/core/workers/chunks/76d8192015ce46dbf92a.js +1 -0
  22. package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +1 -0
  23. package/assets/esri/core/workers/chunks/884cd0bd036c65567929.js +1 -0
  24. package/assets/esri/core/workers/chunks/95ea77a7d63c9d7ed78b.js +1 -0
  25. package/assets/esri/core/workers/chunks/{da3a4eb3fbb9dd509b4b.js → 98e872da08203455a5b6.js} +1 -1
  26. package/assets/esri/core/workers/chunks/ad4fa125e09cc0047f5b.js +1 -0
  27. package/assets/esri/core/workers/chunks/bb5a18dd1e6a71905668.js +2 -0
  28. package/assets/esri/core/workers/chunks/bf406a46515d5dfebe06.js +1 -0
  29. package/assets/esri/core/workers/chunks/d9c34e07627d93d4670b.js +1 -0
  30. package/assets/esri/core/workers/chunks/e1e9a7695e48e34a69bd.js +1 -0
  31. package/assets/esri/core/workers/chunks/e4f1464ed269c301b4ee.js +1 -0
  32. package/assets/esri/core/workers/chunks/{072029d05ccb56979523.js → e611141692355a1ba2b2.js} +1 -1
  33. package/assets/esri/core/workers/chunks/f41e8d0d6f5e81289179.js +1 -0
  34. package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +1 -0
  35. package/assets/esri/core/workers/chunks/{5ca8e767cc03e1425338.js → f9e90a2fda559ca68848.js} +1 -1
  36. package/assets/esri/themes/base/_functions.scss +6 -2
  37. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +4 -0
  38. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +6 -0
  39. package/assets/esri/themes/dark/main.css +1 -1
  40. package/assets/esri/themes/light/main.css +1 -1
  41. package/assets/esri/themes/light/view.css +1 -1
  42. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
  43. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
  44. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
  45. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
  46. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
  47. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
  48. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
  49. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
  50. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
  51. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
  52. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
  53. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
  54. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
  55. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
  56. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
  57. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
  58. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
  59. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
  60. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
  61. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
  62. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
  63. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
  64. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
  65. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nb.json +1 -1
  66. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
  67. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
  68. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
  69. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
  70. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
  71. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
  72. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
  73. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
  74. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
  75. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
  76. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
  77. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
  78. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
  79. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
  80. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
  81. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
  82. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
  83. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  84. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  85. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  86. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  87. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  88. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  89. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  90. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  91. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  92. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  93. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  94. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  95. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  96. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  97. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  98. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  99. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  100. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  101. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  102. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  103. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  104. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  105. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  106. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nb.json +1 -1
  107. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  108. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  109. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  110. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  111. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  112. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  113. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  114. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  115. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  116. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  117. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  118. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  119. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  120. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  121. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  122. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  123. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  124. package/chunks/Bufferer-93RDFIRm.js +5 -0
  125. package/chunks/Centroid-DZi-eb9F.js +1 -1
  126. package/chunks/ComponentShader.glsl.js +10 -13
  127. package/chunks/Distance2DCalculator-De7WFGFq.js +5 -0
  128. package/chunks/GeodeticDistanceCalculator-CN7xMqrJ.js +5 -0
  129. package/chunks/LineSeries.js +1 -1
  130. package/chunks/{OITCompositing.glsl.js → OITBlend.glsl.js} +1 -1
  131. package/chunks/OperatorGeneralize.js +1 -1
  132. package/chunks/OperatorGeodesicBuffer.js +1 -1
  133. package/chunks/OperatorGeodeticArea.js +1 -1
  134. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  135. package/chunks/OperatorGeodeticDistance.js +1 -1
  136. package/chunks/OperatorGeodeticLength.js +1 -1
  137. package/chunks/OperatorProximity.js +1 -1
  138. package/chunks/OperatorShapePreservingLength.js +5 -0
  139. package/chunks/Polyline.js +1 -1
  140. package/chunks/Theme.js +1 -1
  141. package/chunks/Tick.js +1 -1
  142. package/chunks/tslib.es6.js +1 -1
  143. package/core/mathUtils.js +1 -1
  144. package/core/sql/AggregateFunctions.js +1 -1
  145. package/core/sql/SqlInterval.js +1 -1
  146. package/core/sql/StandardizedFunctions.js +1 -1
  147. package/core/sql/WhereClause.js +1 -1
  148. package/core/sql/WhereGrammar.js +1 -1
  149. package/core/sql/errorSupport.js +5 -0
  150. package/core/sql/sqlArithmeticUtils.js +1 -1
  151. package/core/sql/sqlCompareUtils.js +1 -1
  152. package/core/sql/sqlDateParsingUtils.js +1 -1
  153. package/geometry/operators/areaOperator.js +5 -0
  154. package/geometry/operators/containsOperator.js +1 -1
  155. package/geometry/operators/crossesOperator.js +1 -1
  156. package/geometry/operators/disjointOperator.js +1 -1
  157. package/geometry/operators/distanceOperator.js +1 -1
  158. package/geometry/operators/equalsOperator.js +1 -1
  159. package/geometry/operators/geodeticDensifyOperator.js +5 -0
  160. package/geometry/operators/graphicBufferOperator.js +5 -0
  161. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  162. package/geometry/operators/gx/operatorBuffer.js +1 -1
  163. package/geometry/operators/gx/operatorClip.js +1 -1
  164. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  165. package/geometry/operators/gx/operatorCut.js +1 -1
  166. package/geometry/operators/gx/operatorDifference.js +1 -1
  167. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  168. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  169. package/geometry/operators/gx/{operatorGeodeticDensifyByLength.js → operatorGeodeticDensify.js} +1 -1
  170. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  171. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  172. package/geometry/operators/gx/operatorGraphicBuffer.js +5 -0
  173. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  174. package/geometry/operators/gx/operatorIntersection.js +1 -1
  175. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  176. package/geometry/operators/gx/operatorOffset.js +1 -1
  177. package/geometry/operators/gx/operatorSimplify.js +1 -1
  178. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  179. package/geometry/operators/gx/operatorUnion.js +1 -1
  180. package/geometry/operators/intersectsOperator.js +1 -1
  181. package/geometry/operators/isNearOperator.js +1 -1
  182. package/geometry/operators/lengthOperator.js +5 -0
  183. package/geometry/operators/overlapsOperator.js +1 -1
  184. package/geometry/operators/proximityOperator.d.ts +4 -0
  185. package/geometry/operators/proximityOperator.js +1 -1
  186. package/geometry/operators/relateOperator.js +1 -1
  187. package/geometry/operators/reshapeOperator.js +1 -1
  188. package/geometry/operators/touchesOperator.js +1 -1
  189. package/geometry/operators/withinOperator.js +1 -1
  190. package/interfaces.d.ts +310 -28
  191. package/layers/mixins/ArcGISMapService.js +1 -1
  192. package/layers/support/ControlPointsGeoreference.js +1 -1
  193. package/layers/support/MediaElementBase.js +1 -1
  194. package/layers/support/mediaUtils.js +1 -1
  195. package/linkChart/LinkChartProperties.js +1 -1
  196. package/linkChart/utils.js +1 -1
  197. package/package.json +2 -2
  198. package/portal/schemas/definitions.js +1 -1
  199. package/support/revision.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  201. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  202. package/views/2d/layers/LayerView2D.js +1 -1
  203. package/views/2d/support/highlightGroupUtils.js +1 -1
  204. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  205. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  206. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  207. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  208. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  209. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  210. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  211. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +5 -0
  212. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +5 -0
  213. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +5 -0
  214. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  215. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  216. package/views/LinkChartView.js +1 -1
  217. package/views/MapView.js +1 -1
  218. package/views/View.js +1 -1
  219. package/views/View2D.js +1 -1
  220. package/views/draw/DrawGraphicTool.js +1 -1
  221. package/views/draw/support/Box.js +1 -1
  222. package/views/draw/support/Reshape.js +1 -1
  223. package/views/interactive/Tooltip.d.ts +4 -0
  224. package/views/interactive/Tooltip.js +5 -0
  225. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  226. package/webdoc/widgets/TimeSlider.js +1 -1
  227. package/webmap/InitialViewProperties.js +1 -1
  228. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  229. package/widgets/BasemapGallery.js +1 -1
  230. package/widgets/BasemapLayerList/css.js +1 -1
  231. package/widgets/BasemapLayerList.js +1 -1
  232. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  233. package/widgets/BatchAttributeForm/templates/BatchAttributeFormElementTemplate.js +1 -1
  234. package/widgets/BatchAttributeForm/templates/BatchAttributeFormTemplate.js +1 -1
  235. package/widgets/BatchAttributeForm/templates/BatchFieldElementTemplate.js +1 -1
  236. package/widgets/BatchAttributeForm/templates/batchAttributeFormTemplateUtils.js +1 -1
  237. package/widgets/CatalogLayerList.js +1 -1
  238. package/widgets/Feature/FeatureMedia/pieChart.js +1 -1
  239. package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
  240. package/widgets/FeatureForm/FieldInput.js +1 -1
  241. package/widgets/LayerList/LayerListItem.js +1 -1
  242. package/widgets/LayerList/LayerListViewModel.js +1 -1
  243. package/widgets/LayerList.js +1 -1
  244. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  245. package/widgets/OrientedImageryViewer/adapters/OrientedImageryViewerViewModelAdapter2D.js +1 -1
  246. package/widgets/OrientedImageryViewer/adapters/OrientedImageryViewerViewModelAdapter3D.js +1 -1
  247. package/widgets/OrientedImageryViewer/constants.js +1 -1
  248. package/widgets/OrientedImageryViewer/css.js +1 -1
  249. package/widgets/OrientedImageryViewer/utils.js +1 -1
  250. package/widgets/OrientedImageryViewer.js +1 -1
  251. package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
  252. package/widgets/Sketch/SketchViewModel.js +1 -1
  253. package/widgets/Sketch.js +1 -1
  254. package/widgets/support/SnappingControls.js +1 -1
  255. package/assets/esri/core/workers/chunks/0cfa9665dab31e5235a8.js +0 -1
  256. package/assets/esri/core/workers/chunks/22fb5687932019304225.js +0 -1
  257. package/assets/esri/core/workers/chunks/3b3c8362359a82c66793.js +0 -1
  258. package/assets/esri/core/workers/chunks/3cb1de0b9bf9a25112e0.js +0 -1
  259. package/assets/esri/core/workers/chunks/59833b27d8413b6d9312.js +0 -1
  260. package/assets/esri/core/workers/chunks/5e43cb91bbe20f2d32e3.js +0 -1
  261. package/assets/esri/core/workers/chunks/67df47efb9a9dfeafee2.js +0 -1
  262. package/assets/esri/core/workers/chunks/6be62448e33baabe028c.js +0 -1
  263. package/assets/esri/core/workers/chunks/6d668f7696f280ec9588.js +0 -1
  264. package/assets/esri/core/workers/chunks/74edde71352e1f578a3b.js +0 -1
  265. package/assets/esri/core/workers/chunks/907e74abb4a85a76e3b5.js +0 -1
  266. package/assets/esri/core/workers/chunks/941fe04f47059074c05b.js +0 -2
  267. package/assets/esri/core/workers/chunks/a0005bc65f79e83f26ee.js +0 -1
  268. package/assets/esri/core/workers/chunks/a6560ff77be29344bc50.js +0 -1
  269. package/assets/esri/core/workers/chunks/a6c3c1827d2e8bbfcd9e.js +0 -1
  270. package/assets/esri/core/workers/chunks/ba561e03df67894e437f.js +0 -2
  271. package/assets/esri/core/workers/chunks/df9daac7ea581e9e5ca4.js +0 -1
  272. package/assets/esri/core/workers/chunks/ea51a7c32f716f4f1a34.js +0 -1
  273. package/assets/esri/core/workers/chunks/ef7dcb8758e7f21d30bc.js +0 -1
  274. package/chunks/Distance2DCalculator-BzAEa8Xe.js +0 -5
  275. package/chunks/GeodeticDistanceCalculator-BS_KY66f.js +0 -5
  276. package/chunks/OperatorShapePreservingDensify.js +0 -5
  277. package/geometry/operators/geodeticDensifyByLengthOperator.js +0 -5
  278. package/geometry/operators/gx/operatorShapePreservingDensify.js +0 -5
  279. package/geometry/operators/shapePreservingDensifyOperator.js +0 -5
  280. package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +0 -5
  281. package/views/3d/webgl-engine/shaders/OITCompositingTechnique.js +0 -5
  282. package/views/interactive/tooltip/Tooltip.js +0 -5
  283. /package/assets/esri/core/workers/chunks/{941fe04f47059074c05b.js.LICENSE.txt → bb5a18dd1e6a71905668.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7087],{34727:(e,t,n)=>{n.d(t,{$8:()=>w,Cc:()=>s,Io:()=>p,KJ:()=>u,Sp:()=>c,XM:()=>f,YN:()=>m,cU:()=>a,hs:()=>l,kU:()=>o,or:()=>M,pF:()=>V,pq:()=>B,qE:()=>r});const i=new Float32Array(1);function a(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function r(e,t,n){return Math.min(Math.max(e,t),n)}function s(e,t,n){return e+(t-e)*n}function l(e,t,n,i,a){return s(i,a,(e-t)/(n-t))}function o(e){return e*Math.PI/180}function u(e){return 180*e/Math.PI}function f(e){return Math.acos(r(e,-1,1))}function m(e){return Math.asin(r(e,-1,1))}function c(e,t,n=1e-6){return e===t||!(!Number.isFinite(e)||!Number.isFinite(t))&&(e>t?e-t:t-e)<=n}const h=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function d(e){return h.setFloat64(0,e),h.getBigInt64(0)}const g=BigInt("1000000"),k=x(1);function x(e){const t=d(e=Math.abs(e)),n=function(e){return h.setBigInt64(0,e),h.getFloat64(0)}(t<=g?g:t-g);return Math.abs(e-n)}function p(e,t,n=k){if(e===t)return!0;if(!Number.isFinite(e)||!Number.isFinite(t))return!1;if(null!=n&&x(Math.min(Math.abs(e),Math.abs(t)))<n)return Math.abs(e-t)<=n;const i=d(e),a=d(t);return i<0==a<0&&!((i<a?a-i:i-a)>g)}function w(e){return y(Math.max(-B,Math.min(e,B)))}function y(e){return i[0]=e,i[0]}function M(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],i=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(c(t,1)&&c(n,1)&&c(i,1))}const B=y(34028234663852886e22);function V(e,t,n){if(void 0===n||0==+n)return Math[e](t);if(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!=0)return NaN;let i=t.toString().split("e");return i=(t=Math[e](+(i[0]+"e"+(i[1]?+i[1]-n:-n)))).toString().split("e"),+(i[0]+"e"+(i[1]?+i[1]+n:n))}},57087:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var i=n(34727),a={};a.defaultNoDataValue=(0,i.$8)(-1/0),a.decode=function(e,t){var n=(t=t||{}).encodedMaskData||null===t.encodedMaskData,u=o(e,t.inputOffset||0,n),f=null!=t.noDataValue?(0,i.$8)(t.noDataValue):a.defaultNoDataValue,m=r(u,t.pixelType||Float32Array,t.encodedMaskData,f,t.returnMask),c={width:u.width,height:u.height,pixelData:m.resultPixels,minValue:u.pixels.minValue,maxValue:u.pixels.maxValue,noDataValue:f};return m.resultMask&&(c.maskData=m.resultMask),t.returnEncodedMask&&u.mask&&(c.encodedMaskData=u.mask.bitset?u.mask.bitset:null),t.returnFileInfo&&(c.fileInfo=s(u,f),t.computeUsedBitDepths&&(c.fileInfo.bitDepths=l(u))),c};var r=function(e,t,n,i,a){var r,s,l=0,o=e.pixels.numBlocksX,f=e.pixels.numBlocksY,m=Math.floor(e.width/o),c=Math.floor(e.height/f),h=2*e.maxZError;n=n||(e.mask?e.mask.bitset:null),r=new t(e.width*e.height),a&&n&&(s=new Uint8Array(e.width*e.height));for(var d,g,k=new Float32Array(m*c),x=0;x<=f;x++){var p=x!==f?c:e.height%f;if(0!==p)for(var w=0;w<=o;w++){var y=w!==o?m:e.width%o;if(0!==y){var M,B,V,v,b=x*e.width*c+w*m,U=e.width-y,D=e.pixels.blocks[l];if(D.encoding<2?(0===D.encoding?M=D.rawData:(u(D.stuffedData,D.bitsPerPixel,D.numValidPixels,D.offset,h,k,e.pixels.maxValue),M=k),B=0):V=2===D.encoding?0:D.offset,n)for(g=0;g<p;g++){for(7&b&&(v=n[b>>3],v<<=7&b),d=0;d<y;d++)7&b||(v=n[b>>3]),128&v?(s&&(s[b]=1),r[b++]=D.encoding<2?M[B++]:V):(s&&(s[b]=0),r[b++]=i),v<<=1;b+=U}else if(D.encoding<2)for(g=0;g<p;g++){for(d=0;d<y;d++)r[b++]=M[B++];b+=U}else for(g=0;g<p;g++)if(r.fill)r.fill(V,b,b+y),b+=y+U;else{for(d=0;d<y;d++)r[b++]=V;b+=U}if(1===D.encoding&&B!==D.numValidPixels)throw"Block and Mask do not match";l++}}}return{resultPixels:r,resultMask:s}},s=function(e,t){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,minValue:e.pixels.minValue,noDataValue:t}}},l=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,n={},i=0;i<t;i++){var a=e.pixels.blocks[i];0===a.encoding?n.float32=!0:1===a.encoding?n[a.bitsPerPixel]=!0:n[0]=!0}return Object.keys(n)},o=function(e,t,n){var i={},a=new Uint8Array(e,t,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,a),"CntZImage"!=i.fileIdentifierString.trim())throw"Unexpected file identifier string: "+i.fileIdentifierString;t+=10;var r=new DataView(e,t,24);if(i.fileVersion=r.getInt32(0,!0),i.imageType=r.getInt32(4,!0),i.height=r.getUint32(8,!0),i.width=r.getUint32(12,!0),i.maxZError=r.getFloat64(16,!0),t+=24,!n)if(r=new DataView(e,t,16),i.mask={},i.mask.numBlocksY=r.getUint32(0,!0),i.mask.numBlocksX=r.getUint32(4,!0),i.mask.numBytes=r.getUint32(8,!0),i.mask.maxValue=r.getFloat32(12,!0),t+=16,i.mask.numBytes>0){var s=new Uint8Array(Math.ceil(i.width*i.height/8)),l=(r=new DataView(e,t,i.mask.numBytes)).getInt16(0,!0),o=2,u=0;do{if(l>0)for(;l--;)s[u++]=r.getUint8(o++);else{var f=r.getUint8(o++);for(l=-l;l--;)s[u++]=f}l=r.getInt16(o,!0),o+=2}while(o<i.mask.numBytes);if(-32768!==l||u<s.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=s,t+=i.mask.numBytes}else i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue||(s=new Uint8Array(Math.ceil(i.width*i.height/8)),i.mask.bitset=s);r=new DataView(e,t,16),i.pixels={},i.pixels.numBlocksY=r.getUint32(0,!0),i.pixels.numBlocksX=r.getUint32(4,!0),i.pixels.numBytes=r.getUint32(8,!0),i.pixels.maxValue=r.getFloat32(12,!0),t+=16;var m=i.pixels.numBlocksX,c=i.pixels.numBlocksY,h=m+(i.width%m>0?1:0),d=c+(i.height%c>0?1:0);i.pixels.blocks=new Array(h*d);for(var g=1e9,k=0,x=0;x<d;x++)for(var p=0;p<h;p++){var w=0,y=e.byteLength-t;r=new DataView(e,t,Math.min(10,y));var M={};i.pixels.blocks[k++]=M;var B=r.getUint8(0);if(w++,M.encoding=63&B,M.encoding>3)throw"Invalid block encoding ("+M.encoding+")";if(2!==M.encoding){if(0!==B&&2!==B){if(B>>=6,M.offsetType=B,2===B)M.offset=r.getInt8(1),w++;else if(1===B)M.offset=r.getInt16(1,!0),w+=2;else{if(0!==B)throw"Invalid block offset type";M.offset=r.getFloat32(1,!0),w+=4}if(g=Math.min(M.offset,g),1===M.encoding)if(B=r.getUint8(w),w++,M.bitsPerPixel=63&B,B>>=6,M.numValidPixelsType=B,2===B)M.numValidPixels=r.getUint8(w),w++;else if(1===B)M.numValidPixels=r.getUint16(w,!0),w+=2;else{if(0!==B)throw"Invalid valid pixel count type";M.numValidPixels=r.getUint32(w,!0),w+=4}}var V;if(t+=w,3!=M.encoding)if(0===M.encoding){var v=(i.pixels.numBytes-1)/4;if(v!==Math.floor(v))throw"uncompressed block has invalid length";V=new ArrayBuffer(4*v),new Uint8Array(V).set(new Uint8Array(e,t,4*v));for(var b=new Float32Array(V),U=0;U<b.length;U++)g=Math.min(g,b[U]);M.rawData=b,t+=4*v}else if(1===M.encoding){var D=Math.ceil(M.numValidPixels*M.bitsPerPixel/8),I=Math.ceil(D/4);V=new ArrayBuffer(4*I),new Uint8Array(V).set(new Uint8Array(e,t,D)),M.stuffedData=new Uint32Array(V),t+=D}}else t++,g=Math.min(g,0)}return i.pixels.minValue=g,i.eofOffset=t,i},u=function(e,t,n,i,a,r,s){var l,o,u,f=(1<<t)-1,m=0,c=0,h=Math.ceil((s-i)/a),d=4*e.length-Math.ceil(t*n/8);for(e[e.length-1]<<=8*d,l=0;l<n;l++){if(0===c&&(u=e[m++],c=32),c>=t)o=u>>>c-t&f,c-=t;else{var g=t-c;o=(u&f)<<g&f,o+=(u=e[m++])>>>(c=32-g)}r[l]=o<h?i+o*a:s}return r};const f=a.decode;class m{_decode(e){const t=f(e.buffer,e.options);return Promise.resolve({result:t,transferList:[t.pixelData.buffer]})}}function c(){return new m}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7899,3069],{11006:(e,t,n)=>{function r(e,t,n,r,o){i(e,t,n||0,r||e.length-1,o||s)}function i(e,t,n,r,s){for(;r>n;){if(r-n>600){var a=r-n+1,l=t-n+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);i(e,t,Math.max(n,Math.floor(t-l*u/a+h)),Math.min(r,Math.floor(t+(a-l)*u/a+h)),s)}var d=e[t],p=n,m=r;for(o(e,n,t),s(e[r],d)>0&&o(e,n,r);p<m;){for(o(e,p,m),p++,m--;s(e[p],d)<0;)p++;for(;s(e[m],d)>0;)m--}0===s(e[n],d)?o(e,n,m):o(e,++m,r),m<=t&&(n=m+1),t<=m&&(r=m-1)}}function o(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function s(e,t){return e<t?-1:e>t?1:0}n.d(t,{q:()=>r})},38954:(e,t,n)=>{n.d(t,{A:()=>p,B:()=>u,C:()=>f,D:()=>h,E:()=>B,F:()=>U,G:()=>D,a:()=>a,b:()=>A,c:()=>s,e:()=>R,f:()=>c,g:()=>l,h:()=>P,i:()=>w,j:()=>y,k:()=>x,l:()=>S,m:()=>o,n:()=>b,o:()=>I,p:()=>_,q:()=>v,r:()=>g,s:()=>M,t:()=>L,u:()=>O,v:()=>d,w:()=>N,x:()=>$,y:()=>m,z:()=>G});var r=n(51850),i=n(34304);function o(e){const t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function c(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function u(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function m(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function f(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function y(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function g(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function _(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function M(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function v(e){const t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function x(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function w(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t){const n=t[0],r=t[1],i=t[2];let o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}function S(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function A(e,t,n){const r=t[0],i=t[1],o=t[2],s=n[0],a=n[1],l=n[2];return e[0]=i*l-o*a,e[1]=o*s-r*l,e[2]=r*a-i*s,e}function I(e,t,n,r){const i=t[0],o=t[1],s=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=s+r*(n[2]-s),e}function P(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12],e[1]=n[1]*r+n[5]*i+n[9]*o+n[13],e[2]=n[2]*r+n[6]*i+n[10]*o+n[14],e}function L(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function O(e,t,n){const r=n[0],i=n[1],o=n[2],s=n[3],a=t[0],l=t[1],c=t[2],u=i*c-o*l,h=o*a-r*c,d=r*l-i*a,p=i*d-o*h,m=o*u-r*d,f=r*h-i*u,y=2*s;return e[0]=a+u*y+2*p,e[1]=l+h*y+2*m,e[2]=c+d*y+2*f,e}const T=(0,r.vt)(),E=(0,r.vt)();function R(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function B(e,t,n){const r=n[0]-t[0],i=n[1]-t[1],o=n[2]-t[2];let s=r*r+i*i+o*o;return s>0?(s=1/Math.sqrt(s),e[0]=r*s,e[1]=i*s,e[2]=o*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const G=c,C=u,j=h,U=_,N=M,D=o,$=v;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){b(T,e),b(E,t);const n=S(T,E);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,r,i,o){const s=1-o,a=s*s,l=o*o,c=a*s,u=3*o*a,h=3*l*s,d=l*o;return e[0]=t[0]*c+n[0]*u+r[0]*h+i[0]*d,e[1]=t[1]*c+n[1]*u+r[1]*h+i[1]*d,e[2]=t[2]*c+n[2]*u+r[2]*h+i[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:s,cross:A,crossAndNormalize:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=n[0],a=n[1],l=n[2],c=i*l-o*a,u=o*s-r*l,h=r*a-i*s,d=Math.sqrt(c*c+u*u+h*h);return e[0]=c/d,e[1]=u/d,e[2]=h/d,e},direction:B,dist:U,distance:_,div:j,divide:h,dot:S,equals:function(e,t){if(e===t)return!0;const n=e[0],r=e[1],o=e[2],s=t[0],a=t[1],l=t[2],c=(0,i.FD)();return Math.abs(n-s)<=c*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-a)<=c*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(o-l)<=c*Math.max(1,Math.abs(o),Math.abs(l))},exactEquals:R,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,i,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,c=s*(o-1),u=s*(3-2*o);return e[0]=t[0]*a+n[0]*l+r[0]*c+i[0]*u,e[1]=t[1]*a+n[1]*l+r[1]*c+i[1]*u,e[2]=t[2]*a+n[2]*l+r[2]*c+i[2]*u,e},inverse:w,len:D,length:o,lerp:I,max:f,min:m,mul:C,multiply:u,negate:x,normalize:b,random:function(e,t=1){const n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*t;return e[0]=Math.cos(r)*s,e[1]=Math.sin(r)*s,e[2]=o*t,e},rotateX:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateY:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateZ:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:y,scaleAndAdd:g,set:a,sign:p,sqrDist:N,sqrLen:$,squaredDistance:M,squaredLength:v,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:G,subtract:c,transformMat3:L,transformMat4:P,transformQuat:O},Symbol.toStringTag,{value:"Module"}))},69540:(e,t,n)=>{n.d(t,{O:()=>u,P:()=>h});var r=n(90237),i=n(69622),o=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(35666),l=n(88620),c=n(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,n=e.store,r={},i=new Map;for(const e in t){const s=t[e],l=n?.originOf(e),c=s.clonable;if(s.readOnly||!1===c||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,o.TU)(u),null!=u&&null==h||(l===a.Gr.DEFAULTS?i.set(e,h):r[e]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(i.size){const e=(0,l.oY)(c)?.store;if(e)for(const[t,n]of i)e.set(t,n,a.Gr.DEFAULTS)}return c}};return t=(0,r._)([(0,c.$)("esri.core.Clonable")],t),t};let h=class extends(u(i.A)){};h=(0,r._)([(0,c.$)("esri.core.Clonable")],h)},4902:(e,t,n)=>{n.d(t,{PH:()=>a,sA:()=>s});var r=n(90237),i=n(40608);let o=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(s(class{})){};l=(0,r._)([(0,i.$)("esri.core.Identifiable")],l)},92071:(e,t,n)=>{n.d(t,{P:()=>M,L:()=>v});var r=n(90237),i=n(69622),o=n(76953),s=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach(((e,n)=>{t.set(n,(0,s.o8)(e),a.Gr.DEFAULTS)}));for(let n=a.Gr.SERVICE;n<a.AU;n++){const r=this._originStores[n];r&&r.forEach(((r,i)=>{e&&e.has(i)||t.set(i,(0,s.o8)(r),n)}))}return t}get(e,t){const n=void 0===t?this._values:this._originStores[t];return n?n.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,n=a.Gr.USER){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),r!==t}return!1}delete(e,t=a.Gr.USER){const n=this._originStores[t];if(!n)return;const r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let n=t-1;n>=0;n--){const t=this._originStores[n];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,n);break}}}return r}has(e,t){const n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const n=this._originStores[t],r=n?.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var c=n(45917),u=n(88620),h=n(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),n=t.store,r=new l;t.store=r,(0,o.k)(t,n,r)}read(e,t){(0,c.L)(this,e,t)}getAtOrigin(e,t){const n=p(this),r=(0,a.aB)(t);if("string"==typeof e)return n.get(e,r);const i={};return e.forEach((e=>{i[e]=n.get(e,r)})),i}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const n=p(this),r=(0,a.aB)(t),i=(0,u.oY)(this);let o;o="string"==typeof e?"*"===e?n.keys(r):[e]:e,o.forEach((e=>{i.invalidate(e),n.revert(e,r),i.commit(e)}))}};return t=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function p(e){return(0,u.oY)(e).store}let m=class extends(d(i.A)){};m=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var f=n(16649),y=n(49422);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return _(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,y.M)(this,e=e||{},t),e}setAtOrigin(e,t,n){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(n))}removeOrigin(e){const t=_(this),n=(0,a.aB)(e),r=t.keys(n);for(const e of r)t.originOf(e)===n&&t.set(e,t.get(e,n),a.Gr.USER)}updateOrigin(e,t){const n=_(this),r=(0,a.aB)(t),i=(0,f.Jt)(this,e);for(let t=r+1;t<a.AU;++t)n.delete(e,t);n.set(e,i,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function _(e){return(0,u.oY)(e).store}const M=e=>{let t=class extends(g(d(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],t),t};let v=class extends(M(i.A)){};v=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],v)},43668:(e,t,n)=>{n.d(t,{M5:()=>h,eV:()=>u});var r=n(78888),i=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.zf)(e))throw new i.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},29242:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,n,r,i,o,s,a,l){return[e,t,n,r,i,o,s,a,l]}n.d(t,{fA:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:i},Symbol.toStringTag,{value:"Module"}))},48163:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(){return i(1,1)}function s(){return i(1,0)}function a(){return i(0,1)}n.d(t,{Un:()=>l,fA:()=>i,vt:()=>r});const l=o(),c=s(),u=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:function(e,t){return new Float64Array(e,t,2)},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:o,unitX:s,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},77690:(e,t,n)=>{n.d(t,{B8:()=>a,Ge:()=>d,I0:()=>h,KC:()=>l,hZ:()=>o,hs:()=>u,lw:()=>c,mg:()=>s,z0:()=>i});var r=n(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function o(e,t,n,r,i,o,s,a,l,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c,e}function s(e,t){if(e===t){const n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function a(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=u*s-a*c,d=-u*o+a*l,p=c*o-s*l;let m=n*h+r*d+i*p;return m?(m=1/m,e[0]=h*m,e[1]=(-u*r+i*c)*m,e[2]=(a*r-i*s)*m,e[3]=d*m,e[4]=(u*n-i*l)*m,e[5]=(-a*n+i*o)*m,e[6]=p*m,e[7]=(-c*n+r*l)*m,e[8]=(s*n-r*o)*m,e):null}function l(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e[0]=s*u-a*c,e[1]=i*c-r*u,e[2]=r*a-i*s,e[3]=a*l-o*u,e[4]=n*u-i*l,e[5]=i*o-n*a,e[6]=o*c-s*l,e[7]=r*l-n*c,e[8]=n*s-r*o,e}function c(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=n[0],p=n[1],m=n[2],f=n[3],y=n[4],g=n[5],_=n[6],M=n[7],v=n[8];return e[0]=d*r+p*s+m*c,e[1]=d*i+p*a+m*u,e[2]=d*o+p*l+m*h,e[3]=f*r+y*s+g*c,e[4]=f*i+y*a+g*u,e[5]=f*o+y*l+g*h,e[6]=_*r+M*s+v*c,e[7]=_*i+M*a+v*u,e[8]=_*o+M*l+v*h,e}function u(e,t,n){const r=n[0],i=n[1],o=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=o*t[6],e[7]=o*t[7],e[8]=o*t[8],e}function h(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=n+n,a=r+r,l=i+i,c=n*s,u=r*s,h=r*a,d=i*s,p=i*a,m=i*l,f=o*s,y=o*a,g=o*l;return e[0]=1-h-m,e[3]=u-g,e[6]=d+y,e[1]=u+g,e[4]=1-c-m,e[7]=p-f,e[2]=d-y,e[5]=p+f,e[8]=1-c-h,e}function d(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],p=t[11],m=t[12],f=t[13],y=t[14],g=t[15],_=n*a-r*s,M=n*l-i*s,v=n*c-o*s,x=r*l-i*a,w=r*c-o*a,b=i*c-o*l,S=u*f-h*m,A=u*y-d*m,I=u*g-p*m,P=h*y-d*f,L=h*g-p*f,O=d*g-p*y;let T=_*O-M*L+v*P+x*I-w*A+b*S;return T?(T=1/T,e[0]=(a*O-l*L+c*P)*T,e[1]=(l*I-s*O-c*A)*T,e[2]=(s*L-a*I+c*S)*T,e[3]=(i*L-r*O-o*P)*T,e[4]=(n*O-i*I+o*A)*T,e[5]=(r*I-n*L-o*S)*T,e[6]=(f*b-y*w+g*x)*T,e[7]=(y*v-m*b-g*M)*T,e[8]=(m*w-f*v+g*_)*T,e):null}function p(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}const m=c,f=p;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:l,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:function(e){const t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*(c*o-s*l)+n*(-c*i+s*a)+r*(l*i-o*a)},equals:function(e,t){const n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=t[0],p=t[1],m=t[2],f=t[3],y=t[4],g=t[5],_=t[6],M=t[7],v=t[8],x=(0,r.FD)();return Math.abs(n-d)<=x*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-p)<=x*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-m)<=x*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-f)<=x*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(a-y)<=x*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(l-g)<=x*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(c-_)<=x*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-M)<=x*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(h-v)<=x*Math.max(1,Math.abs(h),Math.abs(v))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:i,fromQuat:h,fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:a,isOrthoNormal:function(e){const t=(0,r.FD)(),n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8];return Math.abs(1-(n*n+s*s+c*c))<=t&&Math.abs(1-(i*i+a*a+u*u))<=t&&Math.abs(1-(o*o+l*l+h*h))<=t},mul:m,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:d,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],i=t[2],o=t[4],s=t[5],a=t[6],l=t[8],c=t[9],u=t[10],h=u*s-a*c,d=-u*o+a*l,p=c*o-s*l,m=n*h+r*d+i*p;if(!m)return null;const f=1/m;return e[0]=h*f,e[1]=(-u*r+i*c)*f,e[2]=(a*r-i*s)*f,e[3]=d*f,e[4]=(u*n-i*l)*f,e[5]=(-a*n+i*o)*f,e[6]=p*f,e[7]=(-c*n+r*l)*f,e[8]=(s*n-r*o)*f,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=Math.sin(n),p=Math.cos(n);return e[0]=p*r+d*s,e[1]=p*i+d*a,e[2]=p*o+d*l,e[3]=p*s-d*r,e[4]=p*a-d*i,e[5]=p*l-d*o,e[6]=c,e[7]=u,e[8]=h,e},scale:u,scaleByVec2:function(e,t,n){const r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e},set:o,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:f,subtract:p,translate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=n[0],p=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=d*r+p*s+c,e[7]=d*i+p*a+u,e[8]=d*o+p*l+h,e},transpose:s},Symbol.toStringTag,{value:"Module"}))},37585:(e,t,n)=>{n.d(t,{C:()=>i,Cc:()=>y,Io:()=>h,S8:()=>f,WQ:()=>s,e$:()=>_,hZ:()=>o,hs:()=>u,jb:()=>x,l0:()=>g,t2:()=>M});var r=n(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e}function o(e,t,n){return e[0]=t,e[1]=n,e}function s(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function a(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function u(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function h(e,t){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function d(e,t){const n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function p(e){const t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function m(e){const t=e[0],n=e[1];return t*t+n*n}function f(e,t){const n=t[0],r=t[1];let i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e}function y(e,t,n,r){const i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}function g(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function _(e,t,n,r){const i=t[0]-n[0],o=t[1]-n[1],s=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*s+n[0],e[1]=i*s+o*a+n[1],e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]}const v=p,x=a,w=l,b=c,S=h,A=d,I=m;Object.freeze(Object.defineProperty({__proto__:null,add:s,angle:function(e,t){const n=e[0],r=e[1],i=t[0],o=t[1];let s=n*n+r*r;s>0&&(s=1/Math.sqrt(s));let a=i*i+o*o;a>0&&(a=1/Math.sqrt(a));const l=(n*i+r*o)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},copy:i,cross:function(e,t,n){const r=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=r,e},dist:S,distance:h,div:b,divide:c,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},equals:function(e,t){const n=e[0],i=e[1],o=t[0],s=t[1],a=(0,r.FD)();return Math.abs(n-o)<=a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=a*Math.max(1,Math.abs(i),Math.abs(s))},exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},len:v,length:p,lerp:y,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},mul:w,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},normalize:f,projectAndScale:function(e,t,n,r,i){let o=t[0]-n[0],s=t[1]-n[1];const a=(r[0]*o+r[1]*s)*(i-1);return o=r[0]*a,s=r[1]*a,e[0]=t[0]+o,e[1]=t[1]+s,e},random:function(e,t=1){const n=2*(0,r.Ov)()*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e},rotate:_,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:u,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e},set:o,sqrDist:A,sqrLen:I,squaredDistance:d,squaredLength:m,str:function(e){return"vec2("+e[0]+", "+e[1]+")"},sub:x,subtract:a,transformMat2:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e},transformMat2d:g,transformMat3:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e},transformMat4:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,n)=>{n.d(t,{E:()=>S,w:()=>s});var r=n(4576),i=(n(44208),n(3694)),o=n(11006);class s{constructor(e=9,t){this._compareMinX=h,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),v.prune(),x.prune(),w.prune(),b.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(_(e,n))for(v.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;_(e,s)&&(n.leaf?t(o):g(e,s)?a(o,t):v.push(o))}n=v.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(v.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(_(e,o)){if(t.leaf||g(e,o))return!0;v.push(i)}}t=v.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,n=this._data,i=null,o=0,s=!1;const a=this._toBBox(e);for(w.clear(),b.clear();n||w.length>0;){if(n||(n=w.pop(),i=w.data[w.length-1],o=b.pop()??0,s=!0),n.leaf&&(t=(0,r.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),w.push(n),this._condense(w),this;s||n.leaf||!g(n,a)?i?(o++,n=i.children[o],s=!1):n=null:(w.push(n),b.push(o),o=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new I(e.slice(t,n+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new P([]);s.height=r;const a=Math.ceil(i/o),c=a*Math.ceil(Math.sqrt(o));M(e,t,n,c,this._compareMinX);for(let i=t;i<=n;i+=c){const t=Math.min(i+c-1,n);M(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);s.children.push(this._build(e,n,i,r-1))}}return l(s,this._toBBox),s}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);w.clear();const o=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=p(s),l=f(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}(i,this._data,t,w);for(o.children.push(e),u(o,i);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)u(t.data[r],e)}(i,w,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new I(s):new P(s);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=c(e,0,s,this._toBBox),a=c(e,s,n,this._toBBox),l=y(t,a),u=p(t)+p(a);l<r?(r=l,o=s,i=u<i?u:i):l===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=c(e,0,t,i),s=c(e,n-t,n,i);let a=m(o)+m(s);for(let r=t;r<n-t;r++){const t=e.children[r];u(o,e.leaf?i(t):t),a+=m(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];u(s,e.leaf?i(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(x.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else x.pushArray(n.children);n=x.pop()??null}}function l(e,t){c(e,0,e.children.length,t,e)}function c(e,t,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],u(i,e.leaf?r(o):o);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function M(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const v=new i.A,x=new i.A,w=new i.A,b=new i.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class I extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,n)=>{n.d(t,{C_:()=>d,OH:()=>f,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>c}),n(60999),n(5503);var r=n(37955),i=n(36563),o=n(97768),s=n(74887),a=n(14012);function l(e,t,n={}){return u(e,t,n,p)}function c(e,t,n={}){return u(e,t,n,m)}function u(e,t,n={},r){let i=null;const s=n.once?(e,n)=>{r(e)&&((0,o.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,a.Cn)(e,s,n.sync,n.equals),n.initial){const t=e();s(t,t)}return i}function h(e,t,n,s={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),s.onListenerRemove?.(a),a=null,c=null)}function d(e){s.once&&s.once&&(0,o.xt)(u),n(e)}const p=l(e,((e,n)=>{h(),(0,r.wb)(e)&&(a=e,c=(0,r.on)(e,t,d),s.onListenerAdd?.(e))}),{sync:s.sync,initial:!0});return u=(0,i.hA)((()=>{p.remove(),h()})),u}function d(e,t){return function(e,t,n){if((0,s.G4)(n))return Promise.reject((0,s.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,o.xt)(a)}return new Promise(((r,o)=>{a=(0,i.vE)([(0,s.u7)(n,(()=>{l(),o((0,s.NK)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??p)])}))}(e,m,t)}function p(e){return!0}function m(e){return!!e}n(80559);const f={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},13069:(e,t,n)=>{n.d(t,{lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}},80754:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,o.Bi)(e)?e.rings:e.paths}},4146:(e,t,n)=>{n.d(t,{A:()=>v});var r=n(90237),i=(n(59456),n(78888)),o=n(49186),s=n(65529),a=n(4902),l=n(92474),c=n(53966),u=n(74887),h=n(84952),d=n(10107),p=(n(44208),n(87811),n(40608)),m=n(92602),f=n(79677),y=n(5443),g=n(16930);let _=0,M=class extends(s.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await n.e(5613).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,d.M)({type:String})],M.prototype,"attributionDataUrl",void 0),(0,r._)([(0,d.M)({readOnly:!0})],M.prototype,"effectiveVisible",null),(0,r._)([(0,d.M)({type:y.A})],M.prototype,"fullExtent",void 0),(0,r._)([(0,d.M)({readOnly:!0})],M.prototype,"hasAttributionData",null),(0,r._)([(0,d.M)({type:String,clonable:!1})],M.prototype,"id",void 0),(0,r._)([(0,d.M)({type:Boolean,nonNullable:!0})],M.prototype,"legendEnabled",void 0),(0,r._)([(0,d.M)({type:["show","hide","hide-children"]})],M.prototype,"listMode",void 0),(0,r._)([(0,d.M)({type:Number,range:{min:0,max:1},nonNullable:!0})],M.prototype,"opacity",void 0),(0,r._)([(0,d.M)({clonable:!1})],M.prototype,"parent",void 0),(0,r._)([(0,d.M)({readOnly:!0})],M.prototype,"parsedUrl",null),(0,r._)([(0,d.M)({type:Boolean,readOnly:!0})],M.prototype,"persistenceEnabled",void 0),(0,r._)([(0,d.M)({type:Boolean})],M.prototype,"popupEnabled",void 0),(0,r._)([(0,d.M)({type:Boolean})],M.prototype,"attributionVisible",void 0),(0,r._)([(0,d.M)({type:g.A})],M.prototype,"spatialReference",void 0),(0,r._)([(0,d.M)({type:String})],M.prototype,"title",void 0),(0,r._)([(0,d.M)({readOnly:!0,json:{read:!1}})],M.prototype,"type",void 0),(0,r._)([(0,d.M)()],M.prototype,"url",void 0),(0,r._)([(0,d.M)({type:f.A})],M.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,d.M)({type:Boolean,nonNullable:!0})],M.prototype,"visible",void 0),M=(0,r._)([(0,p.$)("esri.layers.Layer")],M);const v=M},87899:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ft});var r=n(90237),i=n(5503),o=n(49186),s=n(53966),a=n(92071),l=n(74887),c=n(10107),u=n(79901),h=(n(87811),n(44208),n(36005)),d=n(40608),p=n(43937),m=n(35666),f=n(4146),y=n(63074),g=n(16131),_=n(8303),M=n(25036),v=n(69540),x=n(25482),w=n(77690),b=n(29242),S=n(37585),A=n(38954);const I=(0,n(51850).vt)(),P=(0,b.vt)(),L=(0,b.vt)(),O=(0,b.vt)();function T(e,t,n){return(0,A.a)(I,t[0],t[1],1),(0,A.t)(I,I,(0,w.mg)(P,n)),0===I[2]?(0,S.hZ)(e,I[0],I[1]):(0,S.hZ)(e,I[0]/I[2],I[1]/I[2])}function E(e,t,n){return R(L,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),R(O,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,w.lw)(e,(0,w.KC)(L,L),O),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function R(e,t,n,r,i,o,s,a,l){(0,w.hZ)(e,t,r,o,n,i,s,1,1,1),(0,A.a)(I,a,l,1),(0,w.KC)(P,e);const[c,u,h]=(0,A.t)(I,I,(0,w.mg)(P,P));return(0,w.hZ)(P,c,0,0,0,u,0,0,0,h),(0,w.lw)(e,P,e)}var B=n(90629),G=n(48163),C=n(86738),j=n(39829),U=n(57251),N=n(16930);let D=class extends v.P{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:r}=(0,U.projectOrLoad)(e,t);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};D=(0,r._)([(0,d.$)("esri.layers.support.GeoreferenceBase")],D);const $=D,Y=(0,b.vt)(),X=(0,G.vt)();let V=class extends x.oY{};(0,r._)([(0,c.M)({type:Number,json:{write:!0}})],V.prototype,"x",void 0),(0,r._)([(0,c.M)({type:Number,json:{write:!0}})],V.prototype,"y",void 0),V=(0,r._)([(0,d.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],V);let q=class extends v.P{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,r._)([(0,c.M)()],q.prototype,"sourcePoint",void 0),(0,r._)([(0,c.M)({type:C.A})],q.prototype,"mapPoint",void 0),q=(0,r._)([(0,d.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],q);let F=class extends((0,x.Te)($)){constructor(e){super(e),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(e,t){const n=N.A.fromJSON(t.spatialReference),r=(0,b.fA)(...t.coefficients,1);return e.map((e=>((0,S.hZ)(X,e.x,e.y),T(X,X,r),{sourcePoint:e,mapPoint:new C.A({x:X[0],y:X[1],spatialReference:n})})))}writeControlPoints(e,t,n,r){if(null!=this.transform)null!=e&&H(e[0])&&(t.controlPoints=e.map((e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}})),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8));else{const e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:r?.layer,georeference:this});r?.messages?r.messages.push(e):s.A.getLogger(this).error(e.name,e.message)}}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform(Y);if(null==e||!H(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,r){const i=(0,G.fA)(0,n),o=(0,G.fA)(0,0),s=(0,G.fA)(t,0),a=(0,G.fA)(t,n);return T(i,i,e),T(o,o,e),T(s,s,e),T(a,a,e),new j.A({rings:[[i,o,s,a,i]],spatialReference:r})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!H(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:r}=this,{rings:[[i,o,s,a]]}=e,l={sourcePoint:(0,B.tc)(0,r),mapPoint:new C.A({x:i[0],y:i[1],spatialReference:t})},c={sourcePoint:(0,B.tc)(0,0),mapPoint:new C.A({x:o[0],y:o[1],spatialReference:t})},u={sourcePoint:(0,B.tc)(n,0),mapPoint:new C.A({x:s[0],y:s[1],spatialReference:t})},h={sourcePoint:(0,B.tc)(n,r),mapPoint:new C.A({x:a[0],y:a[1],spatialReference:t})};H(l)&&H(c)&&H(u)&&H(h)&&(re(Y,l,c,u,h),this.controlPoints=this.controlPoints.map((({sourcePoint:e})=>((0,S.hZ)(X,e.x,e.y),T(X,X,Y),{sourcePoint:e,mapPoint:new C.A({x:X[0],y:X[1],spatialReference:t})}))))}get inverseTransform(){return null==this.transform?null:(0,w.B8)((0,b.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!H(this.controlPoints[0]))return null;(0,S.hZ)(X,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return T(X,X,this.transform),new C.A({x:X[0],y:X[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!H(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,U.projectOrLoad)(e,t).geometry)?null:((0,S.hZ)(X,e.x,e.y),T(X,X,this.inverseTransform),(0,B.tc)(X[0],X[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:r}=this;if(!(null!=t&&n>0&&r>0))return null;const[i,o,s,a]=t;if(!H(i))return null;const l=i.mapPoint.spatialReference,c=this._projectControlPoint(o,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!H(c.controlPoint))return null;null==e&&(e=(0,b.vt)());let d=null;return d=H(u.controlPoint)&&H(h.controlPoint)?re(e,i,c.controlPoint,u.controlPoint,h.controlPoint):H(u.controlPoint)?function(e,t,n,r){return ne(z,J,t),ne(W,Z,n),ne(k,Q,r),(0,S.Cc)(K,z,W,.5),(0,S.e$)(K,k,K,Math.PI),(0,S.Cc)(ee,J,Z,.5),(0,S.e$)(ee,Q,ee,Math.PI),ae(e,z,W,k,K,J,Z,Q,ee)}(e,i,c.controlPoint,u.controlPoint):function(e,t,n){return ne(z,J,t),ne(W,Z,n),(0,S.e$)(k,W,z,te),(0,S.e$)(K,z,W,te),(0,S.e$)(Q,Z,J,-te),(0,S.e$)(ee,J,Z,-te),ae(e,z,W,k,K,J,Z,Q,ee)}(e,i,c.controlPoint),d.every((e=>0===e))?null:d}_projectControlPoint(e,t){if(!H(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:r}=e,{geometry:i,pending:o}=(0,U.projectOrLoad)(r,t);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:r.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function H(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,r._)([(0,c.M)({type:[q],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[V]},coefficients:{type:[Number]},spatialReference:{type:N.A}}}}})],F.prototype,"controlPoints",void 0),(0,r._)([(0,h.w)("controlPoints")],F.prototype,"readControlPoints",null),(0,r._)([(0,p.K)("controlPoints")],F.prototype,"writeControlPoints",null),(0,r._)([(0,c.M)({clonable:!1})],F.prototype,"coords",null),(0,r._)([(0,c.M)({type:Number,nonNullable:!0,json:{write:!0}})],F.prototype,"height",void 0),(0,r._)([(0,c.M)({readOnly:!0})],F.prototype,"inverseTransform",null),(0,r._)([(0,c.M)({readOnly:!0})],F.prototype,"transform",null),(0,r._)([(0,c.M)({type:Number,nonNullable:!0,json:{write:!0}})],F.prototype,"width",void 0),F=(0,r._)([(0,d.$)("esri.layers.support.ControlPointsGeoreference")],F);const z=(0,G.vt)(),W=(0,G.vt)(),k=(0,G.vt)(),K=(0,G.vt)(),J=(0,G.vt)(),Z=(0,G.vt)(),Q=(0,G.vt)(),ee=(0,G.vt)(),te=Math.PI/2;function ne(e,t,n){(0,S.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,S.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function re(e,t,n,r,i){return ne(z,J,t),ne(W,Z,n),ne(k,Q,r),ne(K,ee,i),ae(e,z,W,k,K,J,Z,Q,ee)}const ie=new Array(8).fill(0),oe=new Array(8).fill(0);function se(e,t,n,r,i){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=r[0],e[5]=r[1],e[6]=i[0],e[7]=i[1],e}function ae(e,t,n,r,i,o,s,a,l){return E(e,se(ie,t,n,r,i),se(oe,o,s,a,l))}const le=F;var ce=n(78888),ue=n(43668),he=n(84952),de=n(13069),pe=n(4902),me=n(92474),fe=(n(59456),n(21325));const ye=(0,G.vt)();let ge=class extends ${constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:r}=this;if(null==e||null==t||null==n||null==r)return null;const i=e.spatialReference;return t=this.projectOrWarn(t,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==t||null==n||null==r?null:new j.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[r,i,o,s]]}=e;this.bottomLeft=new C.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new C.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new C.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new C.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==e||null==t||null==n||null==r||null==i)return null;const o=t.spatialReference;e=e.normalize();const s=(0,U.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,S.hZ)(ye,s.x,s.y);const a=E((0,b.vt)(),[t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return T(ye,ye,a),(0,B.tc)(ye[0],ye[1])}};(0,r._)([(0,c.M)({clonable:!1})],ge.prototype,"coords",null),(0,r._)([(0,c.M)({type:C.A})],ge.prototype,"bottomLeft",void 0),(0,r._)([(0,c.M)({type:C.A})],ge.prototype,"bottomRight",void 0),(0,r._)([(0,c.M)({type:C.A})],ge.prototype,"topLeft",void 0),(0,r._)([(0,c.M)({type:C.A})],ge.prototype,"topRight",void 0),ge=(0,r._)([(0,d.$)("esri.layers.support.CornersGeoreference")],ge);const _e=ge;var Me=n(34727),ve=n(34304),xe=n(5443);let we=class extends ${constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:r,spatialReference:i}=this.extent;let o;if(this.rotation){const{x:i,y:s}=this.extent.center,a=be(i,s,this.rotation);o=[a(e,t),a(e,r),a(n,r),a(n,t)],o.push(o[0])}else o=[[e,t],[e,r],[n,r],[n,t],[e,t]];return new j.A({rings:[o],spatialReference:i})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=e,a=(0,Me.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),l=be(o,s,-a),[c,u]=l(n[0],n[1]),[h,d]=l(i[0],i[1]);this.extent=new xe.A({xmin:c,ymin:u,xmax:h,ymax:d,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:r,ymin:i,xmax:o,ymax:s,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,U.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=be(a.x,a.y,-n)(u,h)),(0,B.tc)((0,Me.hs)(u,r,o,0,1),(0,Me.hs)(h,s,i,0,1))}};function be(e,t,n){const r=(0,ve.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-e)+o*(r-t)+e,i*(r-t)-o*(n-e)+t]}function Se(e,t){const n=(0,m.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>m.Gr.PORTAL_ITEM}function Ae(e,t,n){return{enabled:!Se(n?.layer,n?.origin),ignoreOrigin:!0}}(0,r._)([(0,c.M)({clonable:!1})],we.prototype,"coords",null),(0,r._)([(0,c.M)({type:xe.A})],we.prototype,"extent",void 0),(0,r._)([(0,c.M)({type:Number})],we.prototype,"rotation",void 0),we=(0,r._)([(0,d.$)("esri.layers.support.ExtentAndRotationGeoreference")],we);const Ie={json:{name:"url",type:String,write:{overridePolicy:Ae}}},Pe={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:Ae}}},Le={types:{key:"type",base:$,typeMap:{"control-points":le,corners:_e,"extent-and-rotation":we}},json:{types:{key:"type",base:$,typeMap:{"control-points":le}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};let Oe=class extends((0,pe.PH)((0,a.P)(me.A))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return le.fromJSON(e)}writeGeoreference(e,t,n,r){const i=r?.resources?.pendingOperations,a=()=>{const i=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:r}=e;if(5!==r?.rings[0]?.length)return null;const[i,o,s,a]=r.rings[0],{spatialReference:l}=r;return new le({controlPoints:[{mapPoint:new C.A({x:i[0],y:i[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,n)},{mapPoint:new C.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,0)},{mapPoint:new C.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,0)},{mapPoint:new C.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,n)}],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==i.controlPoints?.length&&r?.messages)return void r.messages.push(new o.A("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));t[n]=i.write({},r)}};if("control-points"!==e.type&&!this.loaded&&i)return t[n]={},void i.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:r}=this;if(null==e||null==t||0===n||0===r)return null;const i=t.toSourceNormalized(e);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r._)([(0,c.M)(Le)],Oe.prototype,"georeference",void 0),(0,r._)([(0,h.w)("georeference")],Oe.prototype,"readGeoreference",null),(0,r._)([(0,p.K)("georeference")],Oe.prototype,"writeGeoreference",null),(0,r._)([(0,c.M)({json:{read:!1,write:!1}})],Oe.prototype,"opacity",void 0),Oe=(0,r._)([(0,d.$)("esri.layers.support.MediaElementBase")],Oe);const Te=Oe;var Ee=n(85648),Re=n(97159);let Be=class extends Te{constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,ue.M5)(e).then((e=>{this._set("content",e)}));this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then((()=>{this._set("content",e)}));this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Re.f)(t.url,n)}writeImage(e,t,n,r){if(null==e)return;const i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof e&&(t[n]=(0,Re.t)(e,r)));const s=function(e){return"string"==typeof e&&!(0,he.DB)(e)&&!(0,he.w8)(e)}(e)?e:null;if(s){if(null==(0,Re.i)(s))return void(t[n]=s);const e=(0,Re.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Re.M.NO);if(i&&e&&!(0,he.oP)(e))return o.toKeep.push({resource:i.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,he.DB)(e)?(0,he.N9)(e):(await(0,ce.A)(e,{responseType:"blob"})).data:new Promise((t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=t,r.height=n,e instanceof HTMLImageElement?i.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&i.putImageData(e,0,0),r}(e).toBlob(t)))}(e).then((e=>{const r=function(e,t){const n=(0,de.lk)(),r=`${(0,he.fj)("media",n)}.${(0,Ee.n)({type:"blob",blob:e})}`;return t.resourceFromPath(r)}(e,i);t[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})})))}};(0,r._)([(0,c.M)()],Be.prototype,"animationOptions",void 0),(0,r._)([(0,c.M)({readOnly:!0})],Be.prototype,"content",void 0),(0,r._)([(0,c.M)({readOnly:!0})],Be.prototype,"contentWidth",null),(0,r._)([(0,c.M)({readOnly:!0})],Be.prototype,"contentHeight",null),(0,r._)([(0,c.M)(Ie)],Be.prototype,"image",void 0),(0,r._)([(0,h.w)("image",["url"])],Be.prototype,"readImage",null),(0,r._)([(0,p.K)("image")],Be.prototype,"writeImage",null),(0,r._)([(0,c.M)(Pe)],Be.prototype,"type",void 0),Be=(0,r._)([(0,d.$)("esri.layers.support.ImageElement")],Be);const Ge=Be;var Ce=n(62885),je=n(65529),Ue=n(61893),Ne=n(36708),De=n(19419),$e=n(12176),Ye=n(6518),Xe=n(69622),Ve=n(537),qe=n(95108),Fe=n(65864),He=n(80754);function ze(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,He.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,He.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,He.kd)(r,t);e.x+=n*(-2*t)}else if(r<n){const t=(0,He.kd)(r,n);e.x+=t*(-2*n)}}return e}function We(e,t){const n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=ke(e.xmin,t),{x:d,frameId:p}=ke(e.xmax,t),m=u===d&&a>0;if(a>2*c){const e={xmin:o<s?u:d,ymin:r,xmax:c,ymax:i},t={xmin:l,ymin:r,xmax:o<s?d:u,ymax:i},a={xmin:0,ymin:r,xmax:c,ymax:i},m={xmin:l,ymin:r,xmax:0,ymax:i},f=[],y=[];Ke(e,a)&&f.push(h),Ke(e,m)&&y.push(h),Ke(t,a)&&f.push(p),Ke(t,m)&&y.push(p);for(let e=h+1;e<p;e++)f.push(e),y.push(e);n.push(new Qe(e,[h]),new Qe(t,[p]),new Qe(a,f),new Qe(m,y))}else u>d||m?n.push(new Qe({xmin:u,ymin:r,xmax:c,ymax:i},[h]),new Qe({xmin:l,ymin:r,xmax:d,ymax:i},[p])):n.push(new Qe({xmin:u,ymin:r,xmax:d,ymax:i},[h]));return n}function ke(e,t){const[n,r]=t.valid,i=2*r;let o,s=0;return e>r?(o=Math.ceil(Math.abs(e-r)/i),e-=o*i,s=o):e<n&&(o=Math.ceil(Math.abs(e-n)/i),e+=o*i,s=-o),{x:e,frameId:s}}function Ke(e,t){const{xmin:n,ymin:r,xmax:i,ymax:o}=t;return Je(e,n,r)&&Je(e,n,o)&&Je(e,i,o)&&Je(e,i,r)}function Je(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function Ze(e,t,n=!0){const r=!(0,Fe.Rg)(e);if(r&&(0,qe.m3)(e),n)return(new tt).cut(e,t);const i=r?e.rings:e.paths,o=r?4:2,s=i.length,a=-2*t;for(let e=0;e<s;e++){const t=i[e];if(t&&t.length>=o){const e=[];for(const n of t)e.push([n[0]+a,n[1]]);i.push(e)}}return r?e.rings=i:e.paths=i,e}class Qe{constructor(e,t){this.extent=e,this.frameIds=t}}const et=(0,De.vt)();class tt{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const r=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=r;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide==-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(nt(this._lineIn,n<=0?e:this._xCut,t),nt(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function nt(e,t,n){const r=e.length;r>1&&e[r-1][0]===t&&e[r-2][0]===t?e[r-1][1]=n:e.push([t,n])}let rt=class extends Xe.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,De.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,U.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return j.A.fromJSON(function(e,t){if(null==e)return null;const n=e.spatialReference,r=(0,fe.Vp)(n),i=(0,x.Wj)(e)?e.toJSON():e;if(!r)return i;const o=(0,fe.K8)(n)?102100:4326,s=He.j7[o].maxX,a=He.j7[o].minX;if((0,Fe.fT)(i))return ze(i,s,a);if((0,Fe.U9)(i))return i.points=i.points.map((e=>ze(e,s,a))),i;if((0,Fe.ZC)(i))return function(e,t){if(!t)return e;const n=We(e,t).map((e=>e.extent));return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}}(i,r);if((0,Fe.Bi)(i)||(0,Fe.Rg)(i)){const e=(0,Ve.Rg)(et,i),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},r=(0,He.kd)(n.xmin,a)*(2*s),o=0===r?i:(0,He.kS)(i,r);return n.xmin+=r,n.xmax+=r,n.xmax>s?Ze(o,s,t):n.xmin<a?Ze(o,a,t):o}return i}(this.coords,!0))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,De.VY)(e):null}};(0,r._)([(0,c.M)()],rt.prototype,"spatialReference",void 0),(0,r._)([(0,c.M)()],rt.prototype,"element",void 0),(0,r._)([(0,c.M)()],rt.prototype,"bounds",null),(0,r._)([(0,c.M)()],rt.prototype,"coords",null),(0,r._)([(0,c.M)()],rt.prototype,"normalizedCoords",null),(0,r._)([(0,c.M)()],rt.prototype,"normalizedBounds",null),rt=(0,r._)([(0,d.$)("esri.layers.support.MediaElementView")],rt);var it=n(37955);let ot=class extends Te{constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video"}load(){const e=this.video;if("string"==typeof e){const t=document.createElement("video");t.src=e,t.crossOrigin="anonymous",t.autoplay=!0,t.muted=!0,t.loop=!0,t.playsInline=!0,this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)})))}else e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)}))):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e})));return Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,n,r){if(!e)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source is missing")));const i=function(e){return"string"==typeof e&&!(0,he.DB)(e)&&!(0,he.w8)(e)}(e)?e:null;if(!i)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source must be an absolute url")));!(0,he.oP)(i)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(i);const s=(0,he.s2)(i);(0,Re.i)(s)?r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source cannot be an item resource")):t[n]=s}_loadVideo(e){return new Promise(((t,n)=>{const r=(0,it.Oo)(e,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,n):t()}));this.addHandles(r,"canplay"),"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",e.src?.includes("blob:")||(e.src=e.src))}))}};(0,r._)([(0,c.M)()],ot.prototype,"autoplay",void 0),(0,r._)([(0,c.M)({readOnly:!0})],ot.prototype,"content",void 0),(0,r._)([(0,c.M)({readOnly:!0})],ot.prototype,"contentWidth",null),(0,r._)([(0,c.M)({readOnly:!0})],ot.prototype,"contentHeight",null),(0,r._)([(0,c.M)(Ie)],ot.prototype,"video",null),(0,r._)([(0,p.K)("video")],ot.prototype,"writeVideo",null),(0,r._)([(0,c.M)(Pe)],ot.prototype,"type",void 0),ot=(0,r._)([(0,d.$)("esri.layers.support.VideoElement")],ot);const st=ot,at={key:"type",defaultKeyValue:"image",base:Te,typeMap:{image:Ge,video:st}},lt=i.A.ofType(at);let ct=class extends(me.A.LoadableMixin((0,Ue.g)(je.A.EventedAccessor))){constructor(e){super(e),this._index=new Ye.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new rt({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const r=(0,Ne.wB)((()=>e.coords),(()=>this._updateIndexForElement(e,!1)));this._updateIndexForElement(e,!0),this.addHandles(r,e)}this._elementsIndexes.clear(),this.elements.forEach(((e,t)=>this._elementsIndexes.set(e,t))),this.emit("refresh")},this.elements=new lt}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find((e=>null!=e.georeference?.coords));this._set("spatialReference",e?e.georeference.coords.spatialReference:N.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",(0,Ce.V)(e,this._get("elements"),lt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new xe.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,U.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,fe.aI)(e.spatialReference,this.spatialReference)?e:(0,U.project)(e,this.spatialReference);if(!n)return[];const r=n.normalize(),i=[];for(const e of r)this._index.forEachInBounds((0,De.VY)(e),(({normalizedCoords:t,element:n})=>{null!=t&&(0,$e.fA)(e,t)&&i.push(n)}));return i.sort(((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t))),i}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,r=this._index.has(e),i=null!=n;this._index.delete(e),i&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(r!==i?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,r._)([(0,c.M)()],ct.prototype,"elements",null),(0,r._)([(0,c.M)({readOnly:!0})],ct.prototype,"fullExtent",null),(0,r._)([(0,c.M)()],ct.prototype,"spatialReference",null),ct=(0,r._)([(0,d.$)("esri.layers.support.LocalMediaElementSource")],ct);const ut=ct;var ht=n(92935);function dt(e){return"object"==typeof e&&null!=e&&"type"in e}function pt(e){return dt(e)&&("image"===e.type||"video"===e.type)}let mt=class extends((0,y.dM)((0,M.j)((0,g.q)((0,_.A)((0,a.P)(f.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)((async(e,t,r)=>{const{save:i,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(e){case ht.X.SAVE:return i(this,t);case ht.X.SAVE_AS:return o(this,r,t)}})),this.source=new ut}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const r=dt(t)?new ut({elements:new i.A([t])}):t;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(e),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new ut({elements:new i.A(e)}):e instanceof i.A?new ut({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const r=this._createSource(t);return r?.read(t,n),r}writeSource(e,t,n,r){if(e&&e instanceof ut){const t=e.elements.length;if(1!==t)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}pt(e)?e.write(t,r):r?.messages&&(e?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(ht.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ht.X.SAVE_AS,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Ge;case"video":return new st}return null}_getSourceOverride(e,t){if(dt(e)&&this.originIdOf("source")===m.Gr.PORTAL_ITEM&&t&&(this.originIdOf("georeference")===m.Gr.WEB_MAP||this.originIdOf("georeference")===m.Gr.WEB_SCENE)){const n=e.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:t},{origin:"web-map"}),r.read({georeference:t},{origin:"web-scene"}),r}return null}};(0,r._)([(0,c.M)({readOnly:!0})],mt.prototype,"effectiveSource",void 0),(0,r._)([(0,c.M)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],mt.prototype,"georeference",void 0),(0,r._)([(0,h.w)("web-document","georeference")],mt.prototype,"readGeoreference",null),(0,r._)([(0,c.M)({type:String})],mt.prototype,"copyright",void 0),(0,r._)([(0,c.M)({readOnly:!0})],mt.prototype,"fullExtent",null),(0,r._)([(0,c.M)({type:["MediaLayer"]})],mt.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.M)({type:["show","hide"]})],mt.prototype,"listMode",void 0),(0,r._)([(0,c.M)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:le}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Se(this,n?.origin)&&pt(e)&&!!e.georeference&&e.originIdOf("georeference")>m.Gr.PORTAL_ITEM}}}}})],mt.prototype,"source",null),(0,r._)([(0,u.w)("source")],mt.prototype,"castSource",null),(0,r._)([(0,h.w)("source",["url"])],mt.prototype,"readSource",null),(0,r._)([(0,p.K)("source")],mt.prototype,"writeSource",null),(0,r._)([(0,c.M)()],mt.prototype,"spatialReference",void 0),(0,r._)([(0,c.M)({readOnly:!0})],mt.prototype,"type",void 0),mt=(0,r._)([(0,d.$)("esri.layers.MediaLayer")],mt);const ft=mt},6518:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(44208),i=n(75503),o=n(19419);const s={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 i.w(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,r)=>{e[t++]=r})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},16131:(e,t,n)=>{n.d(t,{q:()=>v});var r=n(90237),i=n(49186),o=n(84952),s=n(10107),a=n(56507),l=(n(87811),n(44208),n(36005)),c=n(40608),u=n(43937),h=n(89317),d=n(45917),p=n(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},y={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},g={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":f,"web-map/tables":y,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":f,"link-chart/tables":y,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var _=n(10873),M=n(79677);const v=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,n){return"Group Layer"===n?.portalItem?.type?void 0:e}writeListMode(e,t,n,r){(r&&"ground"===r.layerContainerType||e&&(0,p.R)(this,n,{},r))&&(t[n]=e)}writeOperationalLayerType(e,t,n,r){e&&"tables"!==r?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?M.A.fromArray(e):null}writeTimeExtent(e,t,n,r){e&&"tables"!==r.layerContainerType&&(e.isEmpty?r?.messages&&r.messages.push(new i.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[n]=e.toArray())}read(e,t){t&&(t.layer=this),(0,d.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,n=g[e];let r=!!n?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new i.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const n=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof i.A&&"web-document-write:property-required"===e.name)).length;return(0,o.w8)(n?.url)?(t?.messages?.push(new i.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:n}beforeSave(){}};return(0,r._)([(0,s.M)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,r._)([(0,s.M)(_.C1)],t.prototype,"listMode",void 0),(0,r._)([(0,u.K)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,s.M)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:h.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,s.M)(_.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,s.M)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,r._)([(0,s.M)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,u.K)("title"),(0,u.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,s.M)({type:M.A,json:{origins:{"web-scene":{write:{layerContainerTypes:h.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,r._)([(0,u.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[a.jz,a.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,r._)([(0,s.M)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:h.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,r._)([(0,c.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(90237),i=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),c=n(53966),u=n(97768),h=n(74887),d=n(84952),p=n(10107),m=(n(44208),n(87811),n(36005)),f=n(40608),y=n(43937),g=n(83531),_=n(20655),M=n(80812),v=n(41318),x=n(10407);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new M.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([n.e(5356),n.e(1204)]).then(n.bind(n,41204));return(0,h.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===n.id;if(r&&n.portal.user)return(0,x.It)(n);let i,s;if(r)i=n.portal.url;else try{i=await(0,g.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!i||!(0,d.b8)(i,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,l=!1,c=!1;if(!s)return{features:{edit:a,fullEdit:l},content:{updateItem:c}};try{if(r?await n.reload():(n=new M.default({id:e,portal:{url:i}}),await n.load(t)),n.portal.user)return(0,x.It)(n)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:c}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const n=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(r))return i.user;const l=`${r}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?v.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return n&&r&&!(0,d.ut)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.M)({type:M.default})],t.prototype,"portalItem",null),(0,r._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.M)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},85648:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(84952);function i(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,r.Zo)(e);return l[t]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)o[l[e]]=e},79677:(e,t,n)=>{n.d(t,{A:()=>p});var r,i=n(90237),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),c=n(40608),u=n(43937),h=n(56400);let d=r=class extends o.oY{static get allTime(){return m}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.lL)(n,e,t));let i=this.end;if(i){const n=(0,s.lL)(i,e,t);i=i.getTime()===n.getTime()?n:(0,s.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,a;return i>=t&&i<=n?s=i:t>=i&&t<=o&&(s=t),n>=i&&n<=o?a=n:o>=t&&o<=n&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?r.empty:new r({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(e,t,n=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,e,t,n)),null!=a&&(i.end=(0,s.S1)(a,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i._)([(0,a.M)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,a.M)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,a.M)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,a.M)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.K)("start")],d.prototype,"writeStart",null),d=r=(0,i._)([(0,c.$)("esri.time.TimeExtent")],d);const p=d,m=new d,f=new d({start:void 0,end:void 0})},92935:(e,t,n)=>{var r;n.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2980,1053],{11053:(e,n,t)=>{t.d(n,{c:()=>r,g:()=>i});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},82980:(e,n,t)=>{t.r(n),t.d(n,{i:()=>f});var r,i,o,a=t(11053),u={exports:{}};r=u,i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,o=function(e={}){var n,t,r=void 0!==e?e:{};r.ready=new Promise(((e,r)=>{n=e,t=r}));var o=Object.assign({},r),a="object"==typeof window,u="function"==typeof importScripts;"object"==typeof process&&"object"==typeof process.versions&&process.versions.node;var c,f="";(a||u)&&(u?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),i&&(f=i),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u&&(c=e=>{var n=new XMLHttpRequest;return n.open("GET",e,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)}));var s,l,d=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);Object.assign(r,o),o=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(s=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&x("no native wasm support detected");var h,v,m,g,y,_,w,b,A,T=!1;function C(){var e=l.buffer;r.HEAP8=h=new Int8Array(e),r.HEAP16=m=new Int16Array(e),r.HEAP32=y=new Int32Array(e),r.HEAPU8=v=new Uint8Array(e),r.HEAPU16=g=new Uint16Array(e),r.HEAPU32=_=new Uint32Array(e),r.HEAPF32=w=new Float32Array(e),r.HEAPF64=b=new Float64Array(e)}var P=[],k=[],E=[];function W(e){P.unshift(e)}function j(e){E.unshift(e)}var R,F=0,S=null;function x(e){r.onAbort&&r.onAbort(e),p(e="Aborted("+e+")"),T=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw t(n),n}function U(e){return e.startsWith("data:application/octet-stream;base64,")}function I(e){try{if(e==R&&s)return new Uint8Array(s);if(c)return c(e);throw"both async and sync fetching of the wasm failed"}catch(e){x(e)}}function O(e,n,t){return function(e){return s||!a&&!u||"function"!=typeof fetch?Promise.resolve().then((()=>I(e))):fetch(e,{credentials:"same-origin"}).then((n=>{if(!n.ok)throw"failed to load wasm binary file at '"+e+"'";return n.arrayBuffer()})).catch((()=>I(e)))}(e).then((e=>WebAssembly.instantiate(e,n))).then((e=>e)).then(t,(e=>{p("failed to asynchronously prepare wasm: "+e),x(e)}))}function z(e){for(;e.length>0;)e.shift()(r)}U(R="i3s.wasm")||(R=function(e){return r.locateFile?r.locateFile(e,f):f+e}(R));var D=[];function M(e){var n=D[e];return n||(e>=D.length&&(D.length=e+1),D[e]=n=A.get(e)),n}function V(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,h[this.ptr+12|0]=e},this.get_caught=function(){return 0!=h[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,h[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=h[this.ptr+13|0]},this.init=function(e,n){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(n)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Se(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var H={};function B(e){for(;e.length;){var n=e.pop();e.pop()(n)}}function q(e){return this.fromWireType(y[e>>2])}var N={},L={},G={};function X(e,n){var t=function(e,n){return e=function(e){if(void 0===e)return"_unknown";var n=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return n>=48&&n<=57?"_"+e:e}(e),{[e]:function(){return n.apply(this,arguments)}}[e]}(n,(function(e){this.name=n,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var Z=void 0;function $(e){throw new Z(e)}function J(e,n,t){function r(n){var r=t(n);r.length!==e.length&&$("Mismatched type converter count");for(var i=0;i<e.length;++i)te(e[i],r[i])}e.forEach((function(e){G[e]=n}));var i=new Array(n.length),o=[],a=0;n.forEach(((e,n)=>{L.hasOwnProperty(e)?i[n]=L[e]:(o.push(e),N.hasOwnProperty(e)||(N[e]=[]),N[e].push((()=>{i[n]=L[e],++a===o.length&&r(i)})))})),0===o.length&&r(i)}function K(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var Q=void 0;function Y(e){for(var n="",t=e;v[t];)n+=Q[v[t++]];return n}var ee=void 0;function ne(e){throw new ee(e)}function te(e,n,t={}){if(!("argPackAdvance"in n))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=n.name;if(e||ne('type "'+r+'" must have a positive integer typeid pointer'),L.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ne("Cannot register type '"+r+"' twice")}if(L[e]=n,delete G[e],N.hasOwnProperty(e)){var i=N[e];delete N[e],i.forEach((e=>e()))}}var re=new function(){this.allocated=[void 0],this.freelist=[],this.get=function(e){return this.allocated[e]},this.allocate=function(e){let n=this.freelist.pop()||this.allocated.length;return this.allocated[n]=e,n},this.free=function(e){this.allocated[e]=void 0,this.freelist.push(e)}};function ie(e){e>=re.reserved&&0==--re.get(e).refcount&&re.free(e)}var oe=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return re.allocate({refcount:1,value:e})}};function ae(e,n){switch(n){case 2:return function(e){return this.fromWireType(w[e>>2])};case 3:return function(e){return this.fromWireType(b[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function ue(e,n,t){r.hasOwnProperty(e)?((void 0===t||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[t])&&ne("Cannot register public name '"+e+"' twice"),function(e,n,t){if(void 0===e[n].overloadTable){var r=e[n];e[n]=function(){return e[n].overloadTable.hasOwnProperty(arguments.length)||ne("Function '"+t+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[n].overloadTable+")!"),e[n].overloadTable[arguments.length].apply(this,arguments)},e[n].overloadTable=[],e[n].overloadTable[r.argCount]=r}}(r,e,e),r.hasOwnProperty(t)&&ne("Cannot register multiple overloads of a function with the same number of arguments ("+t+")!"),r[e].overloadTable[t]=n):(r[e]=n,void 0!==t&&(r[e].numArguments=t))}function ce(e,n,t){r.hasOwnProperty(e)||$("Replacing nonexistant public symbol"),void 0!==r[e].overloadTable&&void 0!==t?r[e].overloadTable[t]=n:(r[e]=n,r[e].argCount=t)}function fe(e,n){var t=(e=Y(e)).includes("j")?function(e,n){var t=[];return function(){return t.length=0,Object.assign(t,arguments),function(e,n,t){return e.includes("j")?function(e,n,t){var i=r["dynCall_"+e];return t&&t.length?i.apply(null,[n].concat(t)):i.call(null,n)}(e,n,t):M(n).apply(null,t)}(e,n,t)}}(e,n):M(n);return"function"!=typeof t&&ne("unknown function pointer with signature "+e+": "+n),t}var se=void 0;function le(e){var n=Re(e),t=Y(n);return je(n),t}function de(e,n,t){switch(n){case 0:return t?function(e){return h[e]}:function(e){return v[e]};case 1:return t?function(e){return m[e>>1]}:function(e){return g[e>>1]};case 2:return t?function(e){return y[e>>2]}:function(e){return _[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var pe="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function he(e,n,t){for(var r=n+t,i=n;e[i]&&!(i>=r);)++i;if(i-n>16&&e.buffer&&pe)return pe.decode(e.subarray(n,i));for(var o="";n<i;){var a=e[n++];if(128&a){var u=63&e[n++];if(192!=(224&a)){var c=63&e[n++];if((a=224==(240&a)?(15&a)<<12|u<<6|c:(7&a)<<18|u<<12|c<<6|63&e[n++])<65536)o+=String.fromCharCode(a);else{var f=a-65536;o+=String.fromCharCode(55296|f>>10,56320|1023&f)}}else o+=String.fromCharCode((31&a)<<6|u)}else o+=String.fromCharCode(a)}return o}function ve(e,n){return e?he(v,e,n):""}var me="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ge(e,n){for(var t=e,r=t>>1,i=r+n/2;!(r>=i)&&g[r];)++r;if((t=r<<1)-e>32&&me)return me.decode(v.subarray(e,t));for(var o="",a=0;!(a>=n/2);++a){var u=m[e+2*a>>1];if(0==u)break;o+=String.fromCharCode(u)}return o}function ye(e,n,t){if(void 0===t&&(t=2147483647),t<2)return 0;for(var r=n,i=(t-=2)<2*e.length?t/2:e.length,o=0;o<i;++o){var a=e.charCodeAt(o);m[n>>1]=a,n+=2}return m[n>>1]=0,n-r}function _e(e){return 2*e.length}function we(e,n){for(var t=0,r="";!(t>=n/4);){var i=y[e+4*t>>2];if(0==i)break;if(++t,i>=65536){var o=i-65536;r+=String.fromCharCode(55296|o>>10,56320|1023&o)}else r+=String.fromCharCode(i)}return r}function be(e,n,t){if(void 0===t&&(t=2147483647),t<4)return 0;for(var r=n,i=r+t-4,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),y[n>>2]=a,(n+=4)+4>i)break}return y[n>>2]=0,n-r}function Ae(e){for(var n=0,t=0;t<e.length;++t){var r=e.charCodeAt(t);r>=55296&&r<=57343&&++t,n+=4}return n}var Te={};function Ce(e){var n=l.buffer;try{return l.grow(e-n.byteLength+65535>>>16),C(),1}catch(e){}}var Pe=[null,[],[]];function ke(e,n){var t=Pe[e];0===n||10===n?((1===e?d:p)(he(t,0)),t.length=0):t.push(n)}Z=r.InternalError=X(Error,"InternalError"),function(){for(var e=new Array(256),n=0;n<256;++n)e[n]=String.fromCharCode(n);Q=e}(),ee=r.BindingError=X(Error,"BindingError"),re.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),re.reserved=re.allocated.length,r.count_emval_handles=function(){for(var e=0,n=re.reserved;n<re.allocated.length;++n)void 0!==re.allocated[n]&&++e;return e},se=r.UnboundTypeError=X(Error,"UnboundTypeError");var Ee={__call_sighandler:function(e,n){M(e)(n)},__cxa_throw:function(e,n,t){throw new V(e).init(n,t),e},_embind_finalize_value_object:function(e){var n=H[e];delete H[e];var t=n.rawConstructor,r=n.rawDestructor,i=n.fields;J([e],i.map((e=>e.getterReturnType)).concat(i.map((e=>e.setterArgumentType))),(e=>{var o={};return i.forEach(((n,t)=>{var r=n.fieldName,a=e[t],u=n.getter,c=n.getterContext,f=e[t+i.length],s=n.setter,l=n.setterContext;o[r]={read:e=>a.fromWireType(u(c,e)),write:(e,n)=>{var t=[];s(l,e,f.toWireType(t,n)),B(t)}}})),[{name:n.name,fromWireType:function(e){var n={};for(var t in o)n[t]=o[t].read(e);return r(e),n},toWireType:function(e,n){for(var i in o)if(!(i in n))throw new TypeError('Missing field: "'+i+'"');var a=t();for(i in o)o[i].write(a,n[i]);return null!==e&&e.push(r,a),a},argPackAdvance:8,readValueFromPointer:q,destructorFunction:r}]}))},_embind_register_bigint:function(e,n,t,r,i){},_embind_register_bool:function(e,n,t,r,i){var o=K(t);te(e,{name:n=Y(n),fromWireType:function(e){return!!e},toWireType:function(e,n){return n?r:i},argPackAdvance:8,readValueFromPointer:function(e){var r;if(1===t)r=h;else if(2===t)r=m;else{if(4!==t)throw new TypeError("Unknown boolean type size: "+n);r=y}return this.fromWireType(r[e>>o])},destructorFunction:null})},_embind_register_emval:function(e,n){te(e,{name:n=Y(n),fromWireType:function(e){var n=(e=>(e||ne("Cannot use deleted val. handle = "+e),re.get(e).value))(e);return ie(e),n},toWireType:function(e,n){return oe(n)},argPackAdvance:8,readValueFromPointer:q,destructorFunction:null})},_embind_register_float:function(e,n,t){var r=K(t);te(e,{name:n=Y(n),fromWireType:function(e){return e},toWireType:function(e,n){return n},argPackAdvance:8,readValueFromPointer:ae(n,r),destructorFunction:null})},_embind_register_function:function(e,n,t,r,i,o,a){var u=function(e,n){for(var t=[],r=0;r<e;r++)t.push(_[n+4*r>>2]);return t}(n,t);e=Y(e),i=fe(r,i),ue(e,(function(){!function(e,n){var t=[],r={};throw n.forEach((function e(n){r[n]||L[n]||(G[n]?G[n].forEach(e):(t.push(n),r[n]=!0))})),new se(e+": "+t.map(le).join([", "]))}("Cannot call "+e+" due to unbound types",u)}),n-1),J([],u,(function(t){var r=[t[0],null].concat(t.slice(1));return ce(e,function(e,n,t,r,i){var o=n.length;o<2&&ne("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==n[1]&&!1,u=!1,c=1;c<n.length;++c)if(null!==n[c]&&void 0===n[c].destructorFunction){u=!0;break}var f="void"!==n[0].name,s=o-2,l=new Array(s),d=[],p=[];return function(){var t;arguments.length!==s&&ne("function "+e+" called with "+arguments.length+" arguments, expected "+s+" args!"),p.length=0,d.length=a?2:1,d[0]=i,a&&(t=n[1].toWireType(p,this),d[1]=t);for(var o=0;o<s;++o)l[o]=n[o+2].toWireType(p,arguments[o]),d.push(l[o]);return function(e){if(u)B(p);else for(var r=a?1:2;r<n.length;r++){var i=1===r?t:l[r-2];null!==n[r].destructorFunction&&n[r].destructorFunction(i)}if(f)return n[0].fromWireType(e)}(r.apply(null,d))}}(e,r,0,i,o),n-1),[]}))},_embind_register_integer:function(e,n,t,r,i){n=Y(n);var o=K(t),a=e=>e;if(0===r){var u=32-8*t;a=e=>e<<u>>>u}var c=n.includes("unsigned");te(e,{name:n,fromWireType:a,toWireType:c?function(e,n){return this.name,n>>>0}:function(e,n){return this.name,n},argPackAdvance:8,readValueFromPointer:de(n,o,0!==r),destructorFunction:null})},_embind_register_memory_view:function(e,n,t){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][n];function i(e){var n=_,t=n[e>>=2],i=n[e+1];return new r(n.buffer,i,t)}te(e,{name:t=Y(t),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(e,n){var t="std::string"===(n=Y(n));te(e,{name:n,fromWireType:function(e){var n,r=_[e>>2],i=e+4;if(t)for(var o=i,a=0;a<=r;++a){var u=i+a;if(a==r||0==v[u]){var c=ve(o,u-o);void 0===n?n=c:(n+=String.fromCharCode(0),n+=c),o=u+1}}else{var f=new Array(r);for(a=0;a<r;++a)f[a]=String.fromCharCode(v[i+a]);n=f.join("")}return je(e),n},toWireType:function(e,n){var r;n instanceof ArrayBuffer&&(n=new Uint8Array(n));var i="string"==typeof n;i||n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Int8Array||ne("Cannot pass non-string to std::string"),r=t&&i?function(e){for(var n=0,t=0;t<e.length;++t){var r=e.charCodeAt(t);r<=127?n++:r<=2047?n+=2:r>=55296&&r<=57343?(n+=4,++t):n+=3}return n}(n):n.length;var o=We(4+r+1),a=o+4;if(_[o>>2]=r,t&&i)!function(e,n,t){!function(e,n,t,r){if(!(r>0))return 0;for(var i=t+r-1,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(t>=i)break;n[t++]=a}else if(a<=2047){if(t+1>=i)break;n[t++]=192|a>>6,n[t++]=128|63&a}else if(a<=65535){if(t+2>=i)break;n[t++]=224|a>>12,n[t++]=128|a>>6&63,n[t++]=128|63&a}else{if(t+3>=i)break;n[t++]=240|a>>18,n[t++]=128|a>>12&63,n[t++]=128|a>>6&63,n[t++]=128|63&a}}n[t]=0}(e,v,n,t)}(n,a,r+1);else if(i)for(var u=0;u<r;++u){var c=n.charCodeAt(u);c>255&&(je(a),ne("String has UTF-16 code units that do not fit in 8 bits")),v[a+u]=c}else for(u=0;u<r;++u)v[a+u]=n[u];return null!==e&&e.push(je,o),o},argPackAdvance:8,readValueFromPointer:q,destructorFunction:function(e){je(e)}})},_embind_register_std_wstring:function(e,n,t){var r,i,o,a,u;t=Y(t),2===n?(r=ge,i=ye,a=_e,o=()=>g,u=1):4===n&&(r=we,i=be,a=Ae,o=()=>_,u=2),te(e,{name:t,fromWireType:function(e){for(var t,i=_[e>>2],a=o(),c=e+4,f=0;f<=i;++f){var s=e+4+f*n;if(f==i||0==a[s>>u]){var l=r(c,s-c);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),c=s+n}}return je(e),t},toWireType:function(e,r){"string"!=typeof r&&ne("Cannot pass non-string to C++ string type "+t);var o=a(r),c=We(4+o+n);return _[c>>2]=o>>u,i(r,c+4,o+n),null!==e&&e.push(je,c),c},argPackAdvance:8,readValueFromPointer:q,destructorFunction:function(e){je(e)}})},_embind_register_value_object:function(e,n,t,r,i,o){H[e]={name:Y(n),rawConstructor:fe(t,r),rawDestructor:fe(i,o),fields:[]}},_embind_register_value_object_field:function(e,n,t,r,i,o,a,u,c,f){H[e].fields.push({fieldName:Y(n),getterReturnType:t,getter:fe(r,i),getterContext:o,setterArgumentType:a,setter:fe(u,c),setterContext:f})},_embind_register_void:function(e,n){te(e,{isVoid:!0,name:n=Y(n),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,n){}})},_emval_decref:ie,_emval_incref:function(e){e>4&&(re.get(e).refcount+=1)},_emval_new_cstring:function(e){return oe(function(e){var n=Te[e];return void 0===n?Y(e):n}(e))},_emval_take_value:function(e,n){var t=(e=function(e){var n=L[e];return void 0===n&&ne("_emval_take_value has unknown type "+le(e)),n}(e)).readValueFromPointer(n);return oe(t)},abort:function(){x("")},emscripten_memcpy_big:function(e,n,t){v.copyWithin(e,n,n+t)},emscripten_resize_heap:function(e){var n=v.length,t=2147483648;if((e>>>=0)>t)return!1;let r=(e,n)=>e+(n-e%n)%n;for(var i=1;i<=4;i*=2){var o=n*(1+.2/i);if(o=Math.min(o,e+100663296),Ce(Math.min(t,r(Math.max(e,o),65536))))return!0}return!1},fd_close:function(e){return 52},fd_seek:function(e,n,t,r,i){return 70},fd_write:function(e,n,t,r){for(var i=0,o=0;o<t;o++){var a=_[n>>2],u=_[n+4>>2];n+=8;for(var c=0;c<u;c++)ke(e,v[a+c]);i+=u}return _[r>>2]=i,0}};!function(){var e={env:Ee,wasi_snapshot_preview1:Ee};function n(e,n){var t=e.exports;return r.asm=t,l=r.asm.memory,C(),A=r.asm.__indirect_function_table,function(e){k.unshift(e)}(r.asm.__wasm_call_ctors),function(){if(F--,r.monitorRunDependencies&&r.monitorRunDependencies(F),0==F&&S){var e=S;S=null,e()}}(),t}if(F++,r.monitorRunDependencies&&r.monitorRunDependencies(F),r.instantiateWasm)try{return r.instantiateWasm(e,n)}catch(e){p("Module.instantiateWasm callback failed with error: "+e),t(e)}(function(e,n,t,r){return e||"function"!=typeof WebAssembly.instantiateStreaming||U(n)||"function"!=typeof fetch?O(n,t,r):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(r,(function(e){return p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),O(n,t,r)}))))})(s,R,e,(function(e){n(e.instance)})).catch(t)}();var We=function(){return(We=r.asm.malloc).apply(null,arguments)},je=function(){return(je=r.asm.free).apply(null,arguments)},Re=function(){return(Re=r.asm.__getTypeName).apply(null,arguments)};r.__embind_initialize_bindings=function(){return(r.__embind_initialize_bindings=r.asm._embind_initialize_bindings).apply(null,arguments)};var Fe,Se=function(){return(Se=r.asm.__cxa_is_pointer_type).apply(null,arguments)};function xe(){function e(){Fe||(Fe=!0,r.calledRun=!0,T||(z(k),n(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)j(r.postRun.shift());z(E)}()))}F>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)W(r.preRun.shift());z(P)}(),F>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e()))}if(r.dynCall_vij=function(){return(r.dynCall_vij=r.asm.dynCall_vij).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},S=function e(){Fe||xe(),Fe||(S=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return xe(),e.ready},r.exports=o;const c=(0,a.g)(u.exports),f=Object.freeze(Object.defineProperty({__proto__:null,default:c},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9379,7136],{55359:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(57219);class n{constructor(e,t){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,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 storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},67482:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const h=s.ms??"0",c=h?+h.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(i,n,r,o,a,u,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,u,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>n,Cq:()=>i,_U:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((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,h=!Number.isNaN(new Date("technology 10").getTime())},75503:(e,t,s)=>{s.d(t,{E:()=>F,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),b.prune(),I.prune(),w.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(_(e,s))for(S.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;_(e,o)&&(s.leaf?t(r):y(e,o)?a(r,t):S.push(r))}s=S.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(S.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(_(e,r)){if(t.leaf||y(e,r))return!0;S.push(n)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new v([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(I.clear(),w.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],r=w.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),I.push(s),this._condense(I),this;o||s.leaf||!y(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(I.push(s),w.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new v(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new B([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));x(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);x(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);I.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=m(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,I);for(r.children.push(e),h(r,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}(n,I,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new v(o):new B(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=g(t,a),h=p(t)+p(a);l<i?(i=l,r=o,n=h<n?h:n):l===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=u(e,0,t,n),o=u(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(b.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else b.pushArray(s.children);s=b.pop()??null}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,n){n||(n=new v([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const S=new n.A,b=new n.A,I=new n.A,w=new n.A({deallocator:void 0});class F{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends F{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class v extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},14607:(e,t,s)=>{s.d(t,{B:()=>u,GP:()=>a,qg:()=>h});var i=s(799),n=s(73444);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(e=(0,n.JK)()){let t=(e=e.toLowerCase())in r;if(!t){const s=e.split("-");s.length>1&&s[0]in r&&(e=s[0],t=!0),t||(e="en")}const[s,i,o="#,##0.###"]=r[e];return{decimal:s,group:i,pattern:o}}function a(e,t){const s=o((t={...t}).locale);t.customs=s;const i=t.pattern||s.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,s){const i=(s=s||{}).customs.group,n=s.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===s.fractional&&(s.places=0),t.replace(a,function(e,t,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const i=t.split("."),n="string"==typeof s.places&&s.places.indexOf(",");let r=s.places;n?r=s.places.slice(n+1):+r>=0||(r=(i[1]||[]).length),s.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(i[1]||s.places){n&&(s.places=s.places.slice(0,Math.max(0,n)));const e=void 0!==s.places?s.places:i[1]&&i[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.slice(0,Math.max(0,Number(r))))}else o[1]&&o.pop();const l=i[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let h,c,d=i[0].lastIndexOf(",");if(-1!==d){h=i[0].length-d-1;const e=i[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(c=e.length-d-1)}const p=[];for(let e=o[0];e;){const t=e.length-h;p.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",c&&(h=c,c=void 0)}return o[0]=p.reverse().join(s.group||","),o.join(s.decimal||".")}(e,u[0],{decimal:n,group:i,places:s.places,round:s.round}))}(e,i,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),s=e.pattern||t.pattern,n=t.group,r=t.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 u=s.split(";");1===u.length&&u.push("-"+u[0]);const h=d(u,(t=>(t="(?:"+(0,i.Cj)(t,".")+")").replace(l,(t=>{const s={signed:!1,separator:e.strict?n:[n,""],fractional:e.fractional,decimal:r,exponent:!1},i=t.split(".");let o=e.places;1===i.length&&1!==a&&(i[1]="###"),1===i.length||0===o?s.fractional=!1:(void 0===o&&(o=e.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(s.fractional=!0),!e.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(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=c(e),s=d(e.fractional,(t=>{let s="";return t&&0!==e.places&&(s="\\"+e.decimal,e.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+e.places+"}"),s}),!0);let i=t+s;return s&&(i="(?:(?:"+i+")|(?:"+s+"))"),i+d(e.exponent,(t=>t?"([eE]"+c({signed:e.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:h.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function h(e,t){const s=u(t),i=new RegExp("^"+s.regexp+"$").exec(e);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 c(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,i.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const s=e.groupSize,n=e.groupSize2;if(n){const e="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*["+t+"]\\d{"+s+"})";return s-n>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*)"}),!0)}const d=(e,t,s)=>{if(!Array.isArray(e))return t(e);const i=[];for(let s=0;s<e.length;s++)i.push(t(e[s]));return p(i.join("|"),Boolean(s))},p=(e,t)=>"("+(t?"?:":"")+e+")"},36708:(e,t,s)=>{s.d(t,{C_:()=>d,OH:()=>m,Vh:()=>g,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>u}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,f)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(h),s(e)}const p=l(e,((e,s)=>{c(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{l(),r((0,o.NK)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},17136:(e,t,s)=>{s.d(t,{el:()=>I});var i=s(92602),n=s(49186),r=s(53966),o=s(39829),a=s(82799),l=s(80754),u=s(21325),h=s(28735),c=(s(59456),s(78888)),d=s(65864),p=s(2272),f=s(84952),m=s(92300);const g=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function y(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.A(e)}const s=(0,l.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/l,h=(o-n)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=h*i+n,a=u*i+r;s.push([o,a])}const e=(l+Math.floor(c-1)*t)/2,i=h*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return s&&(e=(0,l.kS)(e,s)),e}function S(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function b(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,l.r8)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.kd)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(y(e))for(const t of(0,l.r8)(r))e[n]=e[n].addRing(t);else if(_(e))for(const t of(0,l.r8)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function I(e,t,s){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let r,y,_,w,F,A,v,B,z=0;const N=[],M=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,y=(0,u.Vp)(r),_=r.isWebMercator,A=_?102100:4326,w=l.j7[A].maxX,F=l.j7[A].minX,v=l.j7[A].plus180Line,B=l.j7[A].minus180Line),y)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(S(t.clone(),w,F));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,w,F))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);M.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,l.kd)(e.xmin,F)*(2*w);let i=0===s?t.clone():(0,l.kS)(t.clone(),s);e.offset(s,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(v)&&r!==w?(z=r>z?r:z,i=x(i,_),N.push(i),M.push("cut")):e.intersects(B)&&n!==F?(z=r*(2*w)>z?r*(2*w):z,i=x(i,_,360),N.push(i),M.push("cut")):M.push(i)}else M.push(t.clone());else M.push(t);else M.push(t);let T=(0,l.kd)(z,w),E=-90;const R=T,C=new a.A;for(;T>0;){const e=360*T-180;C.addPath([[e,E],[e,-1*E]]),E*=-1,T--}if(N.length>0&&R>0){const t=b(N,await async function(e,t,s,i){const n=(0,p.Dl)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(r),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.A)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=r,t}))}}(n,N,C,s)),i=[],r=[];for(let s=0;s<M.length;s++){const n=M[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[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(_?(0,h.Gh)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,d.$B)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",o);return(0,m.V)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(_?(0,h.Gh)(o.shift()):o.shift())}return a}const O=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)O.push(t);else{const e=N.shift();O.push(!0===_?(0,h.Gh)(e):e)}}return O}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>u});var i=s(82799),n=s(16930),r=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},43334:(e,t,s)=>{s.d(t,{N3:()=>r,Om:()=>n});var i=s(92722);class n{constructor(e=null,t={},s,i){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const s=e.geometry?i.A.fromJSON(e.geometry):null,r=e.centroid?i.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(s,e.attributes,r,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function r(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new i(e.lengths,e.coords)}static fromRect(e){const[t,s,n,r]=e,o=n-t,a=r-s;return new i([5],[t,s,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const i=this.lengths[s];for(let s=0;s<i;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let i=0;for(const e of s){for(let s=1;s<e;s++)t[2*(i+s)]+=t[2*(i+s)-2],t[2*(i+s)+1]+=t[2*(i+s)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new i(this.lengths,e)):new i(Array.from(this.lengths),Array.from(s))}}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),l=s(19419),u=s(90708),h=s(6518),c=s(51441),d=s(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this.events=new r.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,s)=>{s.d(t,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,i.Q)(new r.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},40752:(e,t,s)=>{s.r(t),s.d(t,{default:()=>J}),s(59456);var i=s(78888),n=s(60999),r=s(67482),o=s(49186),a=s(53966),l=s(74887),u=s(84952),h=s(57251),c=s(7320),d=s(21325),p=s(28735),f=s(43334),m=s(92722),g=s(83221),y=s(31464),_=s(52158),x=s(14607),S=s(30524);function b(e,t,s){t=(0,S.rS)(t)?.toLowerCase(),s=(0,S.rS)(s)?.toLowerCase();const i=e.map((e=>e.toLowerCase())),n=t?e[i.indexOf(t)]:null,r=s?e[i.indexOf(s)]:null;return{longitudeFieldName:n||e[i.indexOf(w.find((e=>i.includes(e))))],latitudeFieldName:r||e[i.indexOf(I.find((e=>i.includes(e))))]}}const I=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],w=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],F=/^\s*"([\S\s]*)"\s*$/,A=/""/g,v="\n",B=[","," ",";","|","\t"];function*z(e,t,s){let i=0;for(;i<=e.length;){const n=e.indexOf(t,i),r=e.slice(i,n>-1?n:void 0);i+=r.length+t.length,s&&!r.trim()||(yield r)}}function N(e){const t=e.includes("\r\n")?"\r\n":v;return z(e,t,!0)}function M(e,t){return z(e,t,!1)}function T(e,t,s){e=e.trim(),t=t?.trim();const i=[],n=Array.from(new Set([s?.delimiter,...B])).filter((e=>null!=e));for(const s of n){const n=C(e,s).length,r=C(t,s).length??n;n>1&&i.push({weight:Math.min(n,r),delimiter:s})}const r=i.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of r){const i=b(R(e,t).names,s?.longitudeField,s?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:t,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*E(e,t,s,i=()=>Object.create(null)){const n=N(e);n.next();let r="",o="",a=0,l=i(),u=0;e:for(const e of n){const n=M(e,s);for(const e of n)if(r+=o+e,o="",a+=O(e),a%2==0){if(a>0){const e=F.exec(r);if(!e){l=i(),u=0,r="",a=0;continue e}l[t[u]]=e[1].replaceAll(A,'"'),u++}else l[t[u]]=r,u++;r="",a=0}else o=s;0===a?(yield l,l=i(),u=0):o=v}}function R(e,t){const s=C(e,t).filter((e=>null!=e)),i=s.map((e=>(0,S.rS)(e)));for(let e=i.length-1;e>=0;e--)i[e]||(i.splice(e,1),s.splice(e,1));return{names:i,aliases:s}}function C(e,t){if(!e?.length)return[];const s=[];let i="",n="",r=0;const o=M(e,t);for(const e of o)if(i+=n+e,n="",r+=O(e),r%2==0){if(r>0){const e=F.exec(i);e&&s.push(e[1].replaceAll(A,'"'))}else s.push(i);i="",r=0}else n=t;return s}function O(e){let t=0,s=0;for(s=e.indexOf('"',s);s>=0;)t++,s=e.indexOf('"',s+1);return t}function L(e,t,s,i,n){const r=[],o=E(e,s,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<s.length;e++){const t=s[e],o=i[e];if(t===n.longitudeFieldName||t===n.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(q(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,S._b)(e)})}}return r}function q(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=X(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.Cq)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const X=function(){const e=(0,x.B)(),t=new RegExp("^"+e.regexp+"$"),s=new RegExp("["+e.group+"\\s\\xa0]","g"),i=e.factor;return n=>{const r=t.exec(n);if(e.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(s,"").replace(e.decimal,"."),+o*e.factor}}();function k(e){return JSON.parse(JSON.stringify(e))}var j=s(64714),Y=s(95466),D=s(56400),P=s(16930);const G=(0,j.F0)("esriGeometryPoint"),Q=["csv"],V=[0,0];class ${constructor(e,t){this.x=e,this.y=t}}class J{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[s]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),i=function(e,t){const s=t.parsingOptions||{},i={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},n=i.layerDefinition={name:(0,u.e7)(t.url,Q)||"csv",dateFieldsTimeReference:{timeZoneIANA:D.n$},drawingInfo:G,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}}},r=N(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:h,locationInfo:c}=T(a,l,s);if(!h)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:s});if(!c)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:s});i.locationInfo=c,i.delimiter=h;const{names:d,aliases:p}=R(a,h),f=L(e,i.delimiter,d,p,i.locationInfo);if(s.fields?.length){const e=new Y.A(s.fields);for(const t of f){const s=e.get(t.name);s&&Object.assign(t,s)}}if(!f.some((e=>"esriFieldTypeOID"===e.type&&(n.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=e.name,f.unshift(e)}n.fields=f;const m=new Y.A(n.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=m.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=m.get(i.locationInfo.longitudeFieldName).name),n.timeInfo){const e=n.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(n.timeInfo=null)}return i}(s,e);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:r,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=r,a){const{start:e,end:t}=a;i.layerDefinition.timeInfo.timeExtent=[e,t]}return i}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const n=(0,u.An)(t);return(await(0,i.A)(n.path,{query:{...n.query,...s},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:s,extent:i,timeInfo:n}=e.layerDefinition,r=new g.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new _.d({fieldsIndex:Y.A.fromLayerJSON({fields:s,dateFieldsTimeReference:{timeZoneIANA:D.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:t,spatialReference:i.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:s}=this._locationInfo,{objectIdField:i,fieldsIndex:n,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=n.fields.filter((e=>e.name!==i)).map((e=>e.name));let g=0;const y={};for(const e of n.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,S.lD)(e);void 0!==t&&(y[e.name]=t)}const _=E(e,u,this._delimiter,(0,j.Vx)(y,i));for(const e of _){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[s]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[s]=u;for(const i in e)if(i!==t&&i!==s)if(n.isDateField(i))e[i]=(0,r._U)(e[i]);else if(n.isNumericField(i)){const t=X(e[i]);isNaN(t)?e[i]=null:e[i]=t}else null!=e[i]&&(e[i]=k(e[i]));e[i]=g,g++,a.push(new $(u,o)),l.push(e)}}if(!(0,d.aI)({wkid:4326},o))if((0,d.K8)(o))for(const e of a)[e.x,e.y]=(0,p.je)(e.x,e.y,V);else a=(0,h.projectMany)(c.g,a,P.A.WGS84,o,null,null);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:s}=a[e],n=l[e];n[i]=e+1,x.push(new f.Om(new m.A([],[t,s]),n,null,n[i]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=X(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,y.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714:(e,t,s)=>{s.d(t,{F0:()=>l,Vx:()=>c,e2:()=>p,f:()=>f});var i=s(44208),n=s(4718),r=s(99352),o=s(4071),a=s(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function c(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},4071:(e,t,s)=>{s.d(t,{$:()=>i,P:()=>n});const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},92300:(e,t,s)=>{s.d(t,{V:()=>r,X:()=>n});var i=s(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>r,lF:()=>a}),s(92602),s(70333);var i=s(4718),n=s(84952);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.An)(e):(0,i.o8)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a(e)));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(926)},93470:(e,t,s)=>{s.d(t,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={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},u={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}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9379,7136],{55359:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(57219);class n{constructor(e,t){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,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 storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},67482:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const h=s.ms??"0",c=h?+h.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(i,n,r,o,a,u,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,u,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>n,Cq:()=>i,_U:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((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,h=!Number.isNaN(new Date("technology 10").getTime())},75503:(e,t,s)=>{s.d(t,{E:()=>F,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),b.prune(),I.prune(),w.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(_(e,s))for(S.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;_(e,o)&&(s.leaf?t(r):y(e,o)?a(r,t):S.push(r))}s=S.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(S.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(_(e,r)){if(t.leaf||y(e,r))return!0;S.push(n)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new v([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(I.clear(),w.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],r=w.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),I.push(s),this._condense(I),this;o||s.leaf||!y(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(I.push(s),w.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new v(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new B([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));x(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);x(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);I.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=m(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,I);for(r.children.push(e),h(r,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}(n,I,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new v(o):new B(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=g(t,a),h=p(t)+p(a);l<i?(i=l,r=o,n=h<n?h:n):l===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=u(e,0,t,n),o=u(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(b.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else b.pushArray(s.children);s=b.pop()??null}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,n){n||(n=new v([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const S=new n.A,b=new n.A,I=new n.A,w=new n.A({deallocator:void 0});class F{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends F{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class v extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},14607:(e,t,s)=>{s.d(t,{B:()=>u,GP:()=>a,qg:()=>h});var i=s(799),n=s(73444);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(e=(0,n.JK)()){let t=(e=e.toLowerCase())in r;if(!t){const s=e.split("-");s.length>1&&s[0]in r&&(e=s[0],t=!0),t||(e="en")}const[s,i,o="#,##0.###"]=r[e];return{decimal:s,group:i,pattern:o}}function a(e,t){const s=o((t={...t}).locale);t.customs=s;const i=t.pattern||s.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,s){const i=(s=s||{}).customs.group,n=s.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===s.fractional&&(s.places=0),t.replace(a,function(e,t,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const i=t.split("."),n="string"==typeof s.places&&s.places.indexOf(",");let r=s.places;n?r=s.places.slice(n+1):+r>=0||(r=(i[1]||[]).length),s.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(i[1]||s.places){n&&(s.places=s.places.slice(0,Math.max(0,n)));const e=void 0!==s.places?s.places:i[1]&&i[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.slice(0,Math.max(0,Number(r))))}else o[1]&&o.pop();const l=i[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let h,c,d=i[0].lastIndexOf(",");if(-1!==d){h=i[0].length-d-1;const e=i[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(c=e.length-d-1)}const p=[];for(let e=o[0];e;){const t=e.length-h;p.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",c&&(h=c,c=void 0)}return o[0]=p.reverse().join(s.group||","),o.join(s.decimal||".")}(e,u[0],{decimal:n,group:i,places:s.places,round:s.round}))}(e,i,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),s=e.pattern||t.pattern,n=t.group,r=t.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 u=s.split(";");1===u.length&&u.push("-"+u[0]);const h=d(u,(t=>(t="(?:"+(0,i.Cj)(t,".")+")").replace(l,(t=>{const s={signed:!1,separator:e.strict?n:[n,""],fractional:e.fractional,decimal:r,exponent:!1},i=t.split(".");let o=e.places;1===i.length&&1!==a&&(i[1]="###"),1===i.length||0===o?s.fractional=!1:(void 0===o&&(o=e.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(s.fractional=!0),!e.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(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=c(e),s=d(e.fractional,(t=>{let s="";return t&&0!==e.places&&(s="\\"+e.decimal,e.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+e.places+"}"),s}),!0);let i=t+s;return s&&(i="(?:(?:"+i+")|(?:"+s+"))"),i+d(e.exponent,(t=>t?"([eE]"+c({signed:e.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:h.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function h(e,t){const s=u(t),i=new RegExp("^"+s.regexp+"$").exec(e);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 c(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,i.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const s=e.groupSize,n=e.groupSize2;if(n){const e="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*["+t+"]\\d{"+s+"})";return s-n>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*)"}),!0)}const d=(e,t,s)=>{if(!Array.isArray(e))return t(e);const i=[];for(let s=0;s<e.length;s++)i.push(t(e[s]));return p(i.join("|"),Boolean(s))},p=(e,t)=>"("+(t?"?:":"")+e+")"},36708:(e,t,s)=>{s.d(t,{C_:()=>d,OH:()=>m,Vh:()=>g,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>u}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,f)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(h),s(e)}const p=l(e,((e,s)=>{c(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{l(),r((0,o.NK)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},17136:(e,t,s)=>{s.d(t,{el:()=>I});var i=s(92602),n=s(49186),r=s(53966),o=s(39829),a=s(82799),l=s(80754),u=s(21325),h=s(28735),c=(s(59456),s(78888)),d=s(65864),p=s(2272),f=s(84952),m=s(92300);const g=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function y(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.A(e)}const s=(0,l.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/l,h=(o-n)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=h*i+n,a=u*i+r;s.push([o,a])}const e=(l+Math.floor(c-1)*t)/2,i=h*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return s&&(e=(0,l.kS)(e,s)),e}function S(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function b(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,l.r8)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.kd)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(y(e))for(const t of(0,l.r8)(r))e[n]=e[n].addRing(t);else if(_(e))for(const t of(0,l.r8)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function I(e,t,s){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let r,y,_,w,F,A,v,B,z=0;const N=[],M=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,y=(0,u.Vp)(r),_=r.isWebMercator,A=_?102100:4326,w=l.j7[A].maxX,F=l.j7[A].minX,v=l.j7[A].plus180Line,B=l.j7[A].minus180Line),y)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(S(t.clone(),w,F));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,w,F))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);M.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,l.kd)(e.xmin,F)*(2*w);let i=0===s?t.clone():(0,l.kS)(t.clone(),s);e.offset(s,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(v)&&r!==w?(z=r>z?r:z,i=x(i,_),N.push(i),M.push("cut")):e.intersects(B)&&n!==F?(z=r*(2*w)>z?r*(2*w):z,i=x(i,_,360),N.push(i),M.push("cut")):M.push(i)}else M.push(t.clone());else M.push(t);else M.push(t);let T=(0,l.kd)(z,w),E=-90;const R=T,C=new a.A;for(;T>0;){const e=360*T-180;C.addPath([[e,E],[e,-1*E]]),E*=-1,T--}if(N.length>0&&R>0){const t=b(N,await async function(e,t,s,i){const n=(0,p.Dl)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(r),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.A)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=r,t}))}}(n,N,C,s)),i=[],r=[];for(let s=0;s<M.length;s++){const n=M[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[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(_?(0,h.Gh)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,d.$B)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",o);return(0,m.V)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(_?(0,h.Gh)(o.shift()):o.shift())}return a}const O=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)O.push(t);else{const e=N.shift();O.push(!0===_?(0,h.Gh)(e):e)}}return O}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>u});var i=s(82799),n=s(16930),r=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},43334:(e,t,s)=>{s.d(t,{N3:()=>r,Om:()=>n});var i=s(92722);class n{constructor(e=null,t={},s,i){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const s=e.geometry?i.A.fromJSON(e.geometry):null,r=e.centroid?i.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(s,e.attributes,r,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function r(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new i(e.lengths,e.coords)}static fromRect(e){const[t,s,n,r]=e,o=n-t,a=r-s;return new i([5],[t,s,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const i=this.lengths[s];for(let s=0;s<i;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let i=0;for(const e of s){for(let s=1;s<e;s++)t[2*(i+s)]+=t[2*(i+s)-2],t[2*(i+s)+1]+=t[2*(i+s)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new i(this.lengths,e)):new i(Array.from(this.lengths),Array.from(s))}}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),l=s(19419),u=s(90708),h=s(6518),c=s(51441),d=s(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this.events=new r.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,s)=>{s.d(t,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,i.Q)(new r.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},40752:(e,t,s)=>{s.r(t),s.d(t,{default:()=>$}),s(59456);var i=s(78888),n=s(60999),r=s(67482),o=s(49186),a=s(53966),l=s(74887),u=s(84952),h=s(57251),c=s(7320),d=s(21325),p=s(28735),f=s(43334),m=s(92722),g=s(83221),y=s(31464),_=s(52158),x=s(14607),S=s(30524);function b(e,t,s){t=(0,S.rS)(t)?.toLowerCase(),s=(0,S.rS)(s)?.toLowerCase();const i=e.map((e=>e.toLowerCase())),n=t?e[i.indexOf(t)]:null,r=s?e[i.indexOf(s)]:null;return{longitudeFieldName:n||e[i.indexOf(w.find((e=>i.includes(e))))],latitudeFieldName:r||e[i.indexOf(I.find((e=>i.includes(e))))]}}const I=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],w=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],F=/^\s*"([\S\s]*)"\s*$/,A=/""/g,v=[","," ",";","|","\t"];function*B(e,t,s){let i=0;for(;i<=e.length;){const n=e.indexOf(t,i),r=e.slice(i,n>-1?n:void 0);i+=r.length+t.length,s&&!r.trim()||(yield r)}}function z(e){const t=e.includes("\r\n")?"\r\n":"\n";return B(e,t,!0)}function N(e,t){return B(e,t,!1)}function M(e,t,s){e=e.trim(),t=t?.trim();const i=[],n=Array.from(new Set([s?.delimiter,...v])).filter((e=>null!=e));for(const s of n){const n=R(e,s).length,r=R(t,s).length??n;n>1&&i.push({weight:Math.min(n,r),delimiter:s})}const r=i.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of r){const i=b(E(e,t).names,s?.longitudeField,s?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:t,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*T(e,t,s,i=()=>Object.create(null)){const n=z(e);n.next();let r="",o="",a=0,l=i(),u=0;e:for(const e of n){const n=N(e,s);for(const e of n)if(r+=o+e,o="",a+=C(e),a%2==0){if(a>0){const e=F.exec(r);if(!e){l=i(),u=0,r="",a=0;continue e}l[t[u]]=e[1].replaceAll(A,'"'),u++}else l[t[u]]=r,u++;r="",a=0}else o=s;0===a?(yield l,l=i(),u=0):o="\n"}}function E(e,t){const s=R(e,t).filter((e=>null!=e)),i=s.map((e=>(0,S.rS)(e)));for(let e=i.length-1;e>=0;e--)i[e]||(i.splice(e,1),s.splice(e,1));return{names:i,aliases:s}}function R(e,t){if(!e?.length)return[];const s=[];let i="",n="",r=0;const o=N(e,t);for(const e of o)if(i+=n+e,n="",r+=C(e),r%2==0){if(r>0){const e=F.exec(i);e&&s.push(e[1].replaceAll(A,'"'))}else s.push(i);i="",r=0}else n=t;return s}function C(e){let t=0,s=0;for(s=e.indexOf('"',s);s>=0;)t++,s=e.indexOf('"',s+1);return t}function O(e,t,s,i,n){const r=[],o=T(e,s,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<s.length;e++){const t=s[e],o=i[e];if(t===n.longitudeFieldName||t===n.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(L(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,S._b)(e)})}}return r}function L(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=q(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.Cq)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const q=function(){const e=(0,x.B)(),t=new RegExp("^"+e.regexp+"$"),s=new RegExp("["+e.group+"\\s\\xa0]","g"),i=e.factor;return n=>{const r=t.exec(n);if(e.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(s,"").replace(e.decimal,"."),+o*e.factor}}();function X(e){return JSON.parse(JSON.stringify(e))}var k=s(64714),j=s(95466),Y=s(56400),D=s(16930);const P=(0,k.F0)("esriGeometryPoint"),G=["csv"],Q=[0,0];class V{constructor(e,t){this.x=e,this.y=t}}class ${constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[s]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),i=function(e,t){const s=t.parsingOptions||{},i={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},n=i.layerDefinition={name:(0,u.e7)(t.url,G)||"csv",dateFieldsTimeReference:{timeZoneIANA:Y.n$},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}}},r=z(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:h,locationInfo:c}=M(a,l,s);if(!h)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:s});if(!c)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:s});i.locationInfo=c,i.delimiter=h;const{names:d,aliases:p}=E(a,h),f=O(e,i.delimiter,d,p,i.locationInfo);if(s.fields?.length){const e=new j.A(s.fields);for(const t of f){const s=e.get(t.name);s&&Object.assign(t,s)}}if(!f.some((e=>"esriFieldTypeOID"===e.type&&(n.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=e.name,f.unshift(e)}n.fields=f;const m=new j.A(n.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=m.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=m.get(i.locationInfo.longitudeFieldName).name),n.timeInfo){const e=n.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(n.timeInfo=null)}return i}(s,e);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:r,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=r,a){const{start:e,end:t}=a;i.layerDefinition.timeInfo.timeExtent=[e,t]}return i}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const n=(0,u.An)(t);return(await(0,i.A)(n.path,{query:{...n.query,...s},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:s,extent:i,timeInfo:n}=e.layerDefinition,r=new g.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new _.d({fieldsIndex:j.A.fromLayerJSON({fields:s,dateFieldsTimeReference:{timeZoneIANA:Y.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:t,spatialReference:i.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:s}=this._locationInfo,{objectIdField:i,fieldsIndex:n,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=n.fields.filter((e=>e.name!==i)).map((e=>e.name));let g=0;const y={};for(const e of n.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,S.lD)(e);void 0!==t&&(y[e.name]=t)}const _=T(e,u,this._delimiter,(0,k.Vx)(y,i));for(const e of _){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[s]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[s]=u;for(const i in e)if(i!==t&&i!==s)if(n.isDateField(i))e[i]=(0,r._U)(e[i]);else if(n.isNumericField(i)){const t=q(e[i]);isNaN(t)?e[i]=null:e[i]=t}else null!=e[i]&&(e[i]=X(e[i]));e[i]=g,g++,a.push(new V(u,o)),l.push(e)}}if(!(0,d.aI)({wkid:4326},o))if((0,d.K8)(o))for(const e of a)[e.x,e.y]=(0,p.je)(e.x,e.y,Q);else a=(0,h.projectMany)(c.g,a,D.A.WGS84,o,null,null);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:s}=a[e],n=l[e];n[i]=e+1,x.push(new f.Om(new m.A([],[t,s]),n,null,n[i]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=q(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,y.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714:(e,t,s)=>{s.d(t,{F0:()=>l,Vx:()=>c,e2:()=>p,f:()=>f});var i=s(44208),n=s(4718),r=s(99352),o=s(4071),a=s(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function c(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},4071:(e,t,s)=>{s.d(t,{$:()=>i,P:()=>n});const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},92300:(e,t,s)=>{s.d(t,{V:()=>r,X:()=>n});var i=s(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>r,lF:()=>a}),s(92602),s(70333);var i=s(4718),n=s(84952);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.An)(e):(0,i.o8)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a(e)));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(926)},93470:(e,t,s)=>{s.d(t,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={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},u={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}}}]);