@arcgis/core 5.1.0-next.50 → 5.1.0-next.52

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 (262) hide show
  1. package/applications/Components/imageryUtils.d.ts +6 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/001492854799c35b53bb.js +1 -0
  4. package/assets/esri/core/workers/chunks/004f991251f09b36fb09.js +1 -0
  5. package/assets/esri/core/workers/chunks/027d733a99f50cadcf22.js +1 -0
  6. package/assets/esri/core/workers/chunks/03d85a706669aaf24d49.js +1 -0
  7. package/assets/esri/core/workers/chunks/0450133e81bce4b48b84.js +1 -0
  8. package/assets/esri/core/workers/chunks/07e791530677f7e70f32.js +30 -0
  9. package/assets/esri/core/workers/chunks/085778ecd39f46324a6b.js +1 -0
  10. package/assets/esri/core/workers/chunks/08dce0019b52042b01fa.js +1 -0
  11. package/assets/esri/core/workers/chunks/0d8294982853308225da.js +1 -0
  12. package/assets/esri/core/workers/chunks/156aecac067213642aae.js +1 -0
  13. package/assets/esri/core/workers/chunks/{942e4d69b140bc2f97c9.js → 15a45e26964c2eb381a6.js} +1 -1
  14. package/assets/esri/core/workers/chunks/184e9147f7a2f0ae5915.js +1 -0
  15. package/assets/esri/core/workers/chunks/19f59a2a97c33ff92650.js +1 -0
  16. package/assets/esri/core/workers/chunks/{54420b66fd53d6e19ba5.js → 278eecd729bed2832702.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{74814678942a47fd48fb.js → 28ac3a75130fe2b57ac7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{a3174b23aabcef2fa98c.js → 29c91b5c9ddcea85f39a.js} +1 -1
  19. package/assets/esri/core/workers/chunks/2b7d020367cb4ebb3c3d.js +1 -0
  20. package/assets/esri/core/workers/chunks/30654845ca1334f1c206.js +1 -0
  21. package/assets/esri/core/workers/chunks/3104b10770903c265626.js +1 -0
  22. package/assets/esri/core/workers/chunks/33f00633131581e06328.js +1 -0
  23. package/assets/esri/core/workers/chunks/{32a51ce8e1a362115c89.js → 354b309c8225336bc1e5.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{569e4479707bc6881d97.js → 35dbe1eeb6932b03aea2.js} +1 -1
  25. package/assets/esri/core/workers/chunks/386435341e949f5573b4.js +2 -0
  26. package/assets/esri/core/workers/chunks/3874362bf7d43adc41bb.js +1 -0
  27. package/assets/esri/core/workers/chunks/38dc1c4b8721efd4a165.js +1 -0
  28. package/assets/esri/core/workers/chunks/39f3bea123f20c816ab2.js +1 -0
  29. package/assets/esri/core/workers/chunks/3fa5f102b6f77c523a76.js +1 -0
  30. package/assets/esri/core/workers/chunks/{a422cfe1e2afe0722acd.js → 3fcc8c455af56ae89030.js} +1 -1
  31. package/assets/esri/core/workers/chunks/42f3fdad1728433b3510.js +1 -0
  32. package/assets/esri/core/workers/chunks/436941ec88439667022e.js +1 -0
  33. package/assets/esri/core/workers/chunks/{25946077568ab14c7bfc.js → 440f76c397a813b0dcf9.js} +1 -1
  34. package/assets/esri/core/workers/chunks/4812482f28f7205b0938.js +1 -0
  35. package/assets/esri/core/workers/chunks/5317cbef0aac29761575.js +1 -0
  36. package/assets/esri/core/workers/chunks/54a9e17d6c0fef6a9146.js +1 -0
  37. package/assets/esri/core/workers/chunks/55985c9c48b8e1d1c634.js +1 -0
  38. package/assets/esri/core/workers/chunks/55edd712c6d2d044e550.js +1 -0
  39. package/assets/esri/core/workers/chunks/5a573fa1012092328b88.js +1 -0
  40. package/assets/esri/core/workers/chunks/5f06a57b4f7d7de16bbf.js +1 -0
  41. package/assets/esri/core/workers/chunks/60ad54e5707d4414d8b9.js +1 -0
  42. package/assets/esri/core/workers/chunks/{55070344f08ef0ed2a30.js → 60cee9a44929decd2474.js} +1 -1
  43. package/assets/esri/core/workers/chunks/63b9e4a7dad358605c38.js +1 -0
  44. package/assets/esri/core/workers/chunks/{d0adf059085ddf7151dd.js → 64845b1f53eca9db1229.js} +1 -1
  45. package/assets/esri/core/workers/chunks/66d4cbb35d0c290150bf.js +1 -0
  46. package/assets/esri/core/workers/chunks/677d3674cb2c0c05fb7e.js +1 -0
  47. package/assets/esri/core/workers/chunks/7100c9038739121c2c4b.js +1 -0
  48. package/assets/esri/core/workers/chunks/{6c49ac7888679b9f7823.js → 720a33a7f118d2769133.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{9f7b5749f3ceca8d5978.js → 7480bd6f892abf444cac.js} +31 -31
  50. package/assets/esri/core/workers/chunks/{3a7c02616d942c81257d.js → 792219a079c28bcdc003.js} +1 -1
  51. package/assets/esri/core/workers/chunks/794f604d4267e374f7dd.js +1 -0
  52. package/assets/esri/core/workers/chunks/7ae8f73c8e2afae98ecb.js +1 -0
  53. package/assets/esri/core/workers/chunks/7d4af7e2cb2f234e12eb.js +1 -0
  54. package/assets/esri/core/workers/chunks/807b12ace0099300b9b9.js +1 -0
  55. package/assets/esri/core/workers/chunks/{b98dd9fc9a7e3ff6bd49.js → 816a4b03f2ea49238a6c.js} +1 -1
  56. package/assets/esri/core/workers/chunks/842b442cc012d0797333.js +1 -0
  57. package/assets/esri/core/workers/chunks/8903ff28896bd6f34b0d.js +1 -0
  58. package/assets/esri/core/workers/chunks/89e9bc8789b100316136.js +1 -0
  59. package/assets/esri/core/workers/chunks/8afe32d3db9669f972bc.js +1 -0
  60. package/assets/esri/core/workers/chunks/91fd28f50477d16e294e.js +1 -0
  61. package/assets/esri/core/workers/chunks/{278409028bc5af45b507.js → 93ceb74ac88ef460fe5f.js} +1 -1
  62. package/assets/esri/core/workers/chunks/98011b93acf3d5f0b5a2.js +1 -0
  63. package/assets/esri/core/workers/chunks/{cd491c37ba1ac381178c.js → 987dc23fdc0a8c7150b9.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{25509953f19fbc4949a1.js → 992e74570b76f3f9e52e.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{b1c5f69bd1400e66c635.js → 9ae90a4b281d4103e8bb.js} +1 -1
  66. package/assets/esri/core/workers/chunks/9c7fd5db0813bdc38582.js +1 -0
  67. package/assets/esri/core/workers/chunks/9f272445c285ee9abb7b.js +1 -0
  68. package/assets/esri/core/workers/chunks/a2fee1611319665e6aed.js +1 -0
  69. package/assets/esri/core/workers/chunks/a644e30f65347ce846ed.js +1 -0
  70. package/assets/esri/core/workers/chunks/a64daa4945923a178fe5.js +1 -0
  71. package/assets/esri/core/workers/chunks/a85575a8d1da09280cd7.js +1 -0
  72. package/assets/esri/core/workers/chunks/ac4f7309a249132c22da.js +1 -0
  73. package/assets/esri/core/workers/chunks/aeb1900cfdd0e51cc5f8.js +1 -0
  74. package/assets/esri/core/workers/chunks/ba62f3aa811430787863.js +1 -0
  75. package/assets/esri/core/workers/chunks/{7b48c102a44606291f82.js → bb659dcd297b895830df.js} +1 -1
  76. package/assets/esri/core/workers/chunks/c03d0091a6f385b9ce8d.js +1 -0
  77. package/assets/esri/core/workers/chunks/c48d1ee37c207bfb0aac.js +1 -0
  78. package/assets/esri/core/workers/chunks/c4a9006cc6d2938570e0.js +1 -0
  79. package/assets/esri/core/workers/chunks/c692ea68509bddbf7b42.js +1 -0
  80. package/assets/esri/core/workers/chunks/{a4a4ce33de6432ba4dc3.js → c6a0e770c1a89d3b5913.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{b49b608c0d58a9b55fa2.js → cc1f3a2f281a2f6e0f94.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{73e384fd93cf22503d84.js → cdf6ad970dc1893dac58.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{b45fdc04d399d2849d63.js → daf65bccc45dc5c400ae.js} +1 -1
  84. package/assets/esri/core/workers/chunks/df3e79b56c37156e7895.js +1 -0
  85. package/assets/esri/core/workers/chunks/df8b80b17e371c9be4e6.js +1 -0
  86. package/assets/esri/core/workers/chunks/e77198f8ab47441423c5.js +1 -0
  87. package/assets/esri/core/workers/chunks/e786da40a1c87bed64ca.js +1 -0
  88. package/assets/esri/core/workers/chunks/e8aafef6342c50340a27.js +1 -0
  89. package/assets/esri/core/workers/chunks/ec00348d74e29f48613a.js +1 -0
  90. package/assets/esri/core/workers/chunks/{284ce99af7bdd73dc7e9.js → ec65c9c72507ef9a9cf9.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{cdec811b66d98e76be9e.js → eedeff8b344ff699b0b9.js} +1 -1
  92. package/assets/esri/core/workers/chunks/f4201e7dcae224d0caf0.js +1 -0
  93. package/assets/esri/core/workers/chunks/f4d31d96681b649ddc95.js +1 -0
  94. package/assets/esri/core/workers/chunks/{08d76c600926d7642a8b.js → f5fd59291cb161fdc05b.js} +1 -1
  95. package/assets/esri/core/workers/chunks/f7cc05fbfc97b4d36eba.js +1 -0
  96. package/assets/esri/core/workers/chunks/{6aba8c3bce5f68568e3a.js → f7fb121169b7e5a5adbc.js} +1 -1
  97. package/assets/esri/core/workers/chunks/f9d369a4683f88ee9d76.js +1 -0
  98. package/assets/esri/core/workers/chunks/fc534c94d55331578195.js +1 -0
  99. package/assets/esri/core/workers/chunks/{3e61e7805dc6ff284831.js → fdf8fe0f50a9ae548c16.js} +1 -1
  100. package/chunks/Fog.glsl.js +1 -1
  101. package/chunks/GlowBlur.glsl.js +2 -2
  102. package/chunks/GlowComposition.glsl.js +6 -6
  103. package/chunks/HUDMaterial.glsl.js +1 -1
  104. package/chunks/OITBlend.glsl.js +9 -9
  105. package/config.js +1 -1
  106. package/core/timeUtils.d.ts +68 -0
  107. package/geometry/support/aaBoundingBox.js +1 -1
  108. package/geometry/support/sphere.js +1 -1
  109. package/kernel.js +1 -1
  110. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  111. package/layers/raster/datasets/pixelReader.js +1 -1
  112. package/layers/support/Sublayer.d.ts +15 -0
  113. package/layers/support/Sublayer.js +1 -1
  114. package/package.json +3 -3
  115. package/support/revision.js +1 -1
  116. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  117. package/symbols/cim/utils.js +1 -1
  118. package/views/2d/engine/Stage.js +1 -1
  119. package/views/2d/engine/brushes.js +1 -1
  120. package/views/2d/engine/webgl/TileContainer.js +1 -1
  121. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  122. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +2 -0
  123. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +2 -0
  124. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +2 -0
  125. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTexture.js +2 -0
  126. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +2 -0
  127. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  128. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  132. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  133. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  134. package/views/2d/layers/MediaLayerView2D.js +1 -1
  135. package/views/2d/layers/TileLayerView2D.js +1 -1
  136. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  137. package/views/3d/layers/support/Tiles3DBVH.js +2 -0
  138. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  139. package/views/3d/support/ElevationRange.js +1 -1
  140. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  141. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
  142. package/views/3d/support/orientedBoundingBox.js +1 -1
  143. package/views/3d/terrain/TerrainRenderer.js +1 -1
  144. package/views/3d/terrain/TileCompositor.js +1 -1
  145. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  146. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
  147. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  148. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  149. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +1 -1
  150. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +5 -5
  151. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  152. package/views/3d/webgl-engine/effects/fboFormatUtils.js +2 -0
  153. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  154. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
  155. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  156. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  157. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  158. package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
  159. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  160. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  161. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  162. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  163. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  164. package/views/3d/webgl-engine/lib/Material.js +1 -1
  165. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  166. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  167. package/views/3d/webgl-engine/shaders/Dithering.glsl.js +1 -1
  168. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +3 -3
  169. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  170. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  171. package/views/3d/webgl.js +1 -1
  172. package/views/SceneView.js +1 -1
  173. package/views/SelectionManager.js +1 -1
  174. package/views/VideoView.js +1 -1
  175. package/views/selection/types.d.ts +92 -1
  176. package/views/support/selectionUtils.js +1 -1
  177. package/views/support/waitForResources.js +1 -1
  178. package/views/webgl/FramebufferObject.js +1 -1
  179. package/views/webgl/InstanceCounter.js +1 -1
  180. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  181. package/widgets/Editor/EditorViewModel.js +1 -1
  182. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  183. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +2 -2
  184. package/widgets/Editor/workflowUtils.js +1 -1
  185. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  186. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  187. package/widgets/LayerList/ListItemPanel.js +1 -1
  188. package/widgets/Legend/LegendViewModel.js +1 -1
  189. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  190. package/widgets/Sketch/SketchViewModel.js +1 -1
  191. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  192. package/widgets/support/SelectionList/LayerItem.js +1 -1
  193. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  194. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  195. package/assets/esri/core/workers/chunks/04b04548d4eb0941a01e.js +0 -1
  196. package/assets/esri/core/workers/chunks/06223d5d8281e5af14c5.js +0 -1
  197. package/assets/esri/core/workers/chunks/07bdcb622ea59fdbb3a6.js +0 -1
  198. package/assets/esri/core/workers/chunks/0d59f5cd3fdd7d6fd693.js +0 -1
  199. package/assets/esri/core/workers/chunks/0eb57ef4a1b387c951d6.js +0 -1
  200. package/assets/esri/core/workers/chunks/136859ef29a3269c4128.js +0 -1
  201. package/assets/esri/core/workers/chunks/1e018de43becf66cceaa.js +0 -1
  202. package/assets/esri/core/workers/chunks/236b4ab3da0bc8f788a2.js +0 -1
  203. package/assets/esri/core/workers/chunks/2379c64b0ca30814a815.js +0 -1
  204. package/assets/esri/core/workers/chunks/35d115bde474c380c791.js +0 -1
  205. package/assets/esri/core/workers/chunks/3f6ebd82551c2000912e.js +0 -1
  206. package/assets/esri/core/workers/chunks/4577df99c92c7ec0f9de.js +0 -1
  207. package/assets/esri/core/workers/chunks/4869e2f35aaf6b058281.js +0 -1
  208. package/assets/esri/core/workers/chunks/4b3545965b11a54184d4.js +0 -2
  209. package/assets/esri/core/workers/chunks/4c6fc6d19fe519ce7bfc.js +0 -1
  210. package/assets/esri/core/workers/chunks/58f47dea6d8665611eff.js +0 -1
  211. package/assets/esri/core/workers/chunks/5b2fe488a461bc433f59.js +0 -1
  212. package/assets/esri/core/workers/chunks/5c0b3c76a7bc971c61dc.js +0 -1
  213. package/assets/esri/core/workers/chunks/5df9d2a255c9d63ae7df.js +0 -1
  214. package/assets/esri/core/workers/chunks/5f53d7d6bc9b67b2f357.js +0 -1
  215. package/assets/esri/core/workers/chunks/5ffe664eda334ad73175.js +0 -1
  216. package/assets/esri/core/workers/chunks/64fd3561bc94570ee954.js +0 -1
  217. package/assets/esri/core/workers/chunks/650614a9e4871714c42e.js +0 -1
  218. package/assets/esri/core/workers/chunks/66e35e38aea978f91a0c.js +0 -1
  219. package/assets/esri/core/workers/chunks/696f645349249f26090c.js +0 -1
  220. package/assets/esri/core/workers/chunks/6d5bb00157e20ad90fc0.js +0 -1
  221. package/assets/esri/core/workers/chunks/70f0d66e5e6d5d2163f3.js +0 -1
  222. package/assets/esri/core/workers/chunks/768bbc910be6c65ac107.js +0 -1
  223. package/assets/esri/core/workers/chunks/76effcc35b3962cd5535.js +0 -1
  224. package/assets/esri/core/workers/chunks/777390e820b3824dc265.js +0 -1
  225. package/assets/esri/core/workers/chunks/7948d6f14ae44d346d88.js +0 -1
  226. package/assets/esri/core/workers/chunks/797bf402489b3677a5f7.js +0 -1
  227. package/assets/esri/core/workers/chunks/7a4cc1133e4410271b00.js +0 -1
  228. package/assets/esri/core/workers/chunks/7dba4b04c148f03fdf21.js +0 -1
  229. package/assets/esri/core/workers/chunks/87c9a1fc9f2a392b78f5.js +0 -1
  230. package/assets/esri/core/workers/chunks/88426877d625ea333143.js +0 -1
  231. package/assets/esri/core/workers/chunks/8967a02f394a63f11030.js +0 -1
  232. package/assets/esri/core/workers/chunks/8c210529a28addb94ea0.js +0 -1
  233. package/assets/esri/core/workers/chunks/8d3c508995253cbe083f.js +0 -1
  234. package/assets/esri/core/workers/chunks/8e18ac7b22d8dca1e1e2.js +0 -1
  235. package/assets/esri/core/workers/chunks/8e3cb1c584951c3d1eb7.js +0 -1
  236. package/assets/esri/core/workers/chunks/908f171b9c512d738dea.js +0 -1
  237. package/assets/esri/core/workers/chunks/922484b43803ab4e4319.js +0 -1
  238. package/assets/esri/core/workers/chunks/947a715b608c8affd812.js +0 -1
  239. package/assets/esri/core/workers/chunks/9bd68abc6b5b07b2add3.js +0 -1
  240. package/assets/esri/core/workers/chunks/9e55f97291062985560b.js +0 -1
  241. package/assets/esri/core/workers/chunks/a90883ff02c0cc6450c2.js +0 -1
  242. package/assets/esri/core/workers/chunks/ac9722a7897c994f11ab.js +0 -1
  243. package/assets/esri/core/workers/chunks/b1ac09d8fa340d194aa2.js +0 -1
  244. package/assets/esri/core/workers/chunks/c04c457f5295febb3c39.js +0 -1
  245. package/assets/esri/core/workers/chunks/cb2fbe585c0827eecf70.js +0 -1
  246. package/assets/esri/core/workers/chunks/cf74d1605ad2f21699e7.js +0 -1
  247. package/assets/esri/core/workers/chunks/d50e6681ecb9612e4528.js +0 -1
  248. package/assets/esri/core/workers/chunks/d6eddb94f5f2e9759bd0.js +0 -1
  249. package/assets/esri/core/workers/chunks/dcc3285e4ab2c38709bd.js +0 -1
  250. package/assets/esri/core/workers/chunks/e25bbd7cc553b1d2e208.js +0 -1
  251. package/assets/esri/core/workers/chunks/e72ca52d930afb5650af.js +0 -30
  252. package/assets/esri/core/workers/chunks/e96529e144c3268a04f7.js +0 -1
  253. package/assets/esri/core/workers/chunks/f379f94adbe79dc305a2.js +0 -1
  254. package/assets/esri/core/workers/chunks/f4e5163efa2a0567ee19.js +0 -1
  255. package/assets/esri/core/workers/chunks/f76833254f842fb0cd9a.js +0 -1
  256. package/assets/esri/core/workers/chunks/f9abae8d07002fe04a08.js +0 -1
  257. package/assets/esri/core/workers/chunks/ff6c4f8420140b9f9577.js +0 -1
  258. package/assets/esri/core/workers/chunks/ff75fb0fce51ac12e656.js +0 -1
  259. package/assets/esri/core/workers/chunks/ffe9fa5111c149ddef49.js +0 -1
  260. package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +0 -2
  261. package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +0 -2
  262. /package/assets/esri/core/workers/chunks/{4b3545965b11a54184d4.js.LICENSE.txt → 386435341e949f5573b4.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[148],{61893(e,t,r){r.d(t,{Z:()=>d,g:()=>h});var s=r(5482),i=r(69622),n=r(36563),o=r(17676),a=r(64108);class l{constructor(){this._resolver=Promise.withResolvers(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=1,this._cleanUp()},()=>{this._status=2,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return 1===this._status}isRejected(){return 2===this._status}isFulfilled(){return 0!==this._status}abort(){this._resolver.reject((0,o.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=Promise.withResolvers(),t=[...this._resolvingPromises,e.promise],r=this._allPromise=Promise.all(t);r.then(()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()},e=>{this.isFulfilled()||this._allPromise!==r||(0,o.zf)(e)||this._resolver.reject(e)}),e.resolve()}}const h=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this._promiseProps=new l,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return this._promiseProps.promise.then(()=>this).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}addResolvingTask(e){e&&!this._promiseProps.isFulfilled()&&(this.addHandles((0,n.rE)(e)),this._promiseProps.addResolvingPromise(e.promise))}};return r=(0,s.Cg)([(0,a.$)("esri.core.Promise")],r),r},d=h(i.A)},36708(e,t,r){r.d(t,{C_:()=>u,OH:()=>g,Vh:()=>m,on:()=>c,pc:()=>v,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),n=r(97768),o=r(17676),a=r(14012);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,f)}function d(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.xt)(d),r(e)}const p=l(e,(e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,i.hA)(()=>{p.remove(),c()}),d}function u(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{l(),n((0,o.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559);const g={sync:!0},m={initial:!0},v={sync:!0,initial:!0}},16494(e,t,r){r.d(t,{Nd:()=>a,W5:()=>o});var s=r(17632);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),n=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new s.I({whiteList:i,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(n.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)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 n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},50148(e,t,r){r.r(t),r.d(t,{default:()=>at});var s=r(70333),i=r(92602),n=r(11254),o=r(49186),a=r(65529),l=r(37955),h=r(4718),d=r(93637),c=r(17676),u=r(84952),p=r(5482),f=r(91429),g=r(64108);let m=class extends a.nJ{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,i=r?.owningSystemUrl,n=i?t.findServerInfo(i):null;!1===e||i&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,h.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,p.Cg)([(0,f.MZ)()],m.prototype,"creationTime",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"expires",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"isAdmin",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"oAuthState",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"resources",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"scope",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"ssl",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"token",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"tokenRefreshBuffer",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"userId",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"validity",void 0),m=(0,p.Cg)([(0,g.$)("esri.identity.Credential")],m);const v=m;var _=r(79783),y=r(4121);function w(e){return function(){const e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,y.eg)(e??document.body)}function S(e){return function(e){return`calcite-mode-${e}`}(w(e))}r(44208);var I=r(53966),A=r(97768),k=r(61893),U=r(36708),C=r(13069),P=r(62788),b=r(71429),x=r(16494);const T="http://www.w3.org/",R=`${T}2000/svg`,O=`${T}1999/xlink`;let N=[],M=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},D=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),j=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},E=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(D(e[s],t))return s;return-1},L=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(D(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},q=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},$=[],Z=!1,F=e=>{(e.children||[]).forEach(F),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{Z=!1,$.forEach(F),$.length=0},B=e=>{$.push(e),Z||(Z=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},H=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),B(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),B(e))},z=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)X(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(j(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===R?"href"===n?e.setAttributeNS(O,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=x.W5.sanitize(a):W(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let J,G=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)K(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),z(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},K=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),d=o.slice(n,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=M(s,{namespace:R})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,d):(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}G(i,e,s)}},X=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},Y=(e,t,r,s,i)=>{if(r===s)return!1;s=s||N;let n,o=(r=r||N).length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<o?r[l]:void 0,c=s[h];if(void 0!==a&&D(a,c))d=J(a,c,i)||d,l++;else{let a=E(r,c,l+1);if(a>=0){for(n=l;n<a;n++)H(r[n]),L(r,n,e,"removed");d=J(r[a],c,i)||d,l=a+1}else K(c,t,l<o?r[l].domNode:void 0,i),q(c),L(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)H(r[n]),L(r,n,e,"removed");return d};J=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=M(r,{namespace:R})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=Y(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(X(e,h,!1),X(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(j(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==o||W(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===R?"href"===o?e.setAttributeNS(O,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=x.W5.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):W(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}else{let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let Q=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,J(s,r,t)},domNode:e.domNode});const ee={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let te,re=e=>M(ee,e),se=(e,t,r)=>(r=re(r),K(t,e,void 0,r),Q(t,r)),ie=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),Q(t,r)),ne=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),Q(t,r)),oe=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),e.parentNode.removeChild(e),Q(t,r));te=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ae={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},le={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.startsWith("-")?e.style.setProperty(t,r):e.style[t]=r}},he=(e,t,r=!1)=>{let s=e;return t.forEach((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;r&&!n&&i!==t.length-1||(s=n)}),s};var de=r(91866),ce=r(2741);let ue;ue="components/assets";var pe=r(36563);const fe=Symbol("widget"),ge=Symbol("widget-test-data"),me=[],ve={},_e=new Map;function ye(e,t){let r=t.children;if(r?.length)for(let t=0;t<r.length;++t)r[t]=ye(e,r[t]);else r=me;const s=t.vnodeSelector;if(Ae(s)){const i=t.properties||ve,n=i.key||s,o={key:n,afterCreate:we,afterUpdate:Se,afterRemoved:Ie,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}};return{vnodeSelector:s.vnodeSelector,properties:o,children:void 0,text:void 0,domNode:null}}return t}function we(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,_e.set(e,o),o.afterCreate?.(o,e),s.addHandles((0,pe.hA)(()=>Ie(e))),queueMicrotask(()=>{o[ge].projector?.renderNow()})}function Se(e,t,r,{widgetProperties:s}){const i=_e.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Ie(e){const t=_e.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),_e.delete(e))}function Ae(e){return"function"==typeof e&&e[fe]}const ke=new Set;new Map;const Ue=new Map;function Ce(){Ue.clear()}function Pe(e){Ue.delete(e)}var be=r(98291),xe=r(76030);(()=>{const e=new Map;new ResizeObserver(t=>{Ce();for(const r of t)e.get(r.target)?.(r)})})();var Te=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Re=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Re(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=Te(i)),t.push(i))}};const Oe=function(...e){const t=be.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return be.A.release(t),r},Ne=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function Me(e,t,...r){return"function"!=typeof e||Ae(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Re(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var De;let je=0;function Ee(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?Ee(e[s],t[s]):e[s]=t[s]);return e}const Le=(e=>{let t;const r={...ae,...e},s=(n=r,{...le,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],d=[],c=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=he(a.getLastRender(),r,!0)}else n.reverse(),s=he(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),d.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=d[e]();i("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,d)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{c(se,e,t)},insertBefore:(e,t)=>{c(ie,e,t)},merge:(e,t)=>{c(ne,e,t)},replace:(e,t)=>{c(oe,e,t)},detach:e=>{for(let t=0;t<d.length;t++)if(d[t]===e)return d.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(Ce(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let qe=!1,$e=class extends((0,k.g)(a.nJ)){static{this[De]=!0}constructor(e,t){super(e,t),this._attached=!1,this._projector=Le,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=(0,c.sg)(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,_.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=Ee((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&I.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,pe.hA)()),de.qu||(0,de.Qu)((0,u.s2)((0,ce.s)("components/assets")));const r="esri-widget-uid-"+(0,C.lk)(),s=this.render.bind(this);this._trackingTarget=new b.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const i=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),n=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??i(),t=e.properties??={};if(t.key??=r,Ae(e.vnodeSelector)){if(!this.visible)return i()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let n=0;return e.children?.forEach(e=>{Ae(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${n++}`)}),ye(this,e)};this.render=()=>{if(qe)return n();let e=(t=this,Ue.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),qe=!0;try{e=(0,P.a)(this._trackingTarget,n)}catch(t){throw I.A.getLogger(this).error(t),t}finally{qe=!1}return e&&function(e,t){Ue.set(e,t)}(this,e),e};const o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){ke.add(e),e.finally(()=>ke.delete(e))}(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,A.pR)(this._trackingTarget),(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,Pe(this))}get container(){return this._get("container")}set container(e){this._get("container")||this._set("container",function(e){return"string"==typeof e?document.getElementById(e):e??null}(e))}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+je++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(De=fe,ge)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}removeContainer(){this._set("container",null)}scheduleRender(){this.destroyed||(Pe(this),this._projector.scheduleRender())}classes(...e){return Oe.apply(this,e)}renderNow(){Pe(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,U.wB)(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,l.wb)(e)&&this.addHandles(this._delegatedEventNames.map(t=>(0,l.on)(e,t,e=>{this.emit(t,e)})),"delegated-events")},U.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(c.jH),this.scheduleRender()};this.addHandles([(0,_.oQ)(e),(0,U.wB)(()=>this.uiStrings,e)]),this.addHandles((0,U.z7)(()=>this.container,e=>{this.destroyed||(e.closest("[arcgis-widget-wrapped]")||(this.topLayerDisabled=!0,this.announceDeprecation?.()),this._attach(e))},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,f.MZ)()],$e.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,f.MZ)({value:null})],$e.prototype,"container",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"icon",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"id",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"label",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"renderable",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"uiStrings",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"viewModel",void 0),(0,p.Cg)([(0,f.MZ)({value:!0})],$e.prototype,"visible",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"key",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"children",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterCreate",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterRemoved",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"topLayerDisabled",void 0),$e=(0,p.Cg)([(0,f.$K)("esri.widgets.Widget")],$e);const Ze=$e,Fe="esri-identity-modal",Ve={base:Fe,info:`${Fe}__info`,notice:`${Fe}__notice`};let Be=class extends Ze{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(7617),r.e(9597),r.e(5673)]).then(r.bind(r,15673)),dialog:()=>Promise.all([r.e(7617),r.e(9597),r.e(3620),r.e(8345)]).then(r.bind(r,18345)),input:()=>Promise.all([r.e(7617),r.e(9597),r.e(6364)]).then(r.bind(r,16364)),label:()=>Promise.all([r.e(7617),r.e(4387)]).then(r.bind(r,14387)),notice:()=>Promise.all([r.e(7617),r.e(9597),r.e(3620),r.e(883)]).then(r.bind(r,90883))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:n,resource:o,error:a}=this,{info:l,oAuthInfo:h,lblItem:d,invalidUser:c,noAuthService:u,lblUser:p,lblPwd:f,lblCancel:g,lblSigning:m,lblOk:v}=r;return Me("div",{class:this.classes(Ve.base,S(this.container))},Me("form",{bind:this,onsubmit:this._submit},Me("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",width:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Me("div",{class:Ve.info},(0,_.V2)(i?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${o||d})`})),a?Me("calcite-notice",{class:Ve.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Me("div",{slot:"message"},a.details?.httpStatus?c:u)):null,i?null:[Me("calcite-label",null,p,Me("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Me("calcite-label",null,f,Me("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Me("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"footer-end",type:"button"},g),Me("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e){await(0,xe.$m)((0,c.Mq)(void 0));const t=e();t&&("setFocus"in t&&"function"==typeof t.setFocus?await t.setFocus():t instanceof HTMLElement&&t.focus())}(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"container",void 0),(0,p.Cg)([(0,f.MZ)(),Ne("esri/t9n/common")],Be.prototype,"commonMessages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"error",void 0),(0,p.Cg)([(0,f.MZ)(),Ne("esri/identity/t9n/identity")],Be.prototype,"messages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"open",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"signingIn",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"title",null),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"resource",void 0),Be=(0,p.Cg)([(0,f.$K)("esri.identity.IdentityModal")],Be);const He=Be,ze="esriJSAPIOAuth";class We{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(ze,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,n.A)(e,{authMode:"anonymous",keepAlive:!0,method:"post",query:{f:"json",auth_token:this.refreshToken||this.token,client_id:t.appId,token_type_hint:this.refreshToken?"refresh_token":"access_token"}})}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(ze,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(ze);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}We.prototype.declaredClass="esri.identity.OAuthCredential";var Je,Ge=r(25482);let Ke=class extends Ge.o{static{Je=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Je.fromJSON(this.toJSON())}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"appId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"authNamespace",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"expiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"flowType",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"forceLogin",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"forceUserId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"locale",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"minTimeUntilExpiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popup",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popupCallbackUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popupWindowFeatures",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"portalUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"preserveUrlHash",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"userId",void 0),Ke=Je=(0,p.Cg)([(0,f.$K)("esri.identity.OAuthInfo")],Ke);const Xe=Ke;let Ye=class extends Ge.o{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"currentVersion",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"hasPortal",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"hasServer",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"owningTenant",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"webTierAuth",void 0),Ye=(0,p.Cg)([(0,f.$K)("esri.identity.ServerInfo")],Ye);const Qe=Ye;var et=r(39131);const tt={},rt=e=>{const t=new u.s0(e.owningSystemUrl).host,r=new u.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},st=(e,t)=>!!(rt(e)&&t&&t.some(t=>t.test(e.server)));let it=null,nt=null;try{it=window.localStorage,nt=window.sessionStorage}catch{}class ot extends a.a${constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,u.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer|3DTilesServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new Qe,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new v({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,h.oy)({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new Qe(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new Xe(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new v(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,i=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,a=Promise.withResolvers();if(t.signal&&(0,c.u7)(t.signal,()=>{n.abort()}),(0,c.u7)(n,()=>{a.reject(new o.A("identity-manager:user-aborted","ABORTED"))}),(0,c.G4)(n))return a.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=s?this.findCredential(e):null;let d;if(h&&498===r?.details?.httpStatus)h.destroy();else if(h)return d=new o.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(d),a.promise;const p=this._findCredential(e,t);if(p)return a.resolve(p),a.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return d=new o.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(d),a.promise;f=new Qe,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(i||(0,u.FX)(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===f.tokenServiceUrl))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,a,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new u.s0(this._appOrigin),a=e.shortLivedTokenValidity;let l,h,d,c,p,f,g,m;t&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),r&&(l=r.isAdmin,h=r.serverUrl,d=r.token,f=r.signal,g=r.ssl,e.customParameters=r.customParameters),l?c=e.adminTokenServiceUrl:(c=e.tokenServiceUrl,p=new u.s0(c.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!g&&"http"===i.scheme&&((0,u.FX)(i.uri,c,!0)||"https"===p.scheme&&i.host===p.host&&"7080"===i.port&&"7443"===p.port)&&(c=c.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:d,expiration:m,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:f};return s||(v.withCredentials=!1),(0,n.A)(c,v).then(r=>{const s=r.data;if(!s?.token)return new o.A("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return tt[i]||(tt[i]={}),t&&(tt[i][t.username]=t.password),s.validity=m,s})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then(i=>{let a;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))a=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};a=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};a=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,n.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new o.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw i.destroy(),new o.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new o.A("identity-manager:invalid-request","Bad request");return{credential:i}})}).then(e=>({credential:e.credential,viewOnly:s}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=Promise.withResolvers(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new o.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,c.u7)(r.signal,()=>{n()});const a=new He({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",n),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(n=>{i();const o=new v({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=Promise.withResolvers();const i=this._oAuthDfd;let n;s?.signal&&(0,c.u7)(s.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,u.$1)(e),a.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=n=null)}else a.codeVerifier=null;let l,h;this._getCodeChallenge(n).then(i=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,i);const o=new He({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",d),h=o.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,i)})});const d=()=>{p(),this._oAuthDfd=null,i.reject(new o.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,i=s&&st(t,this._legacyFed),n=t.webTierAuth,o=n&&this.normalizeWebTierAuth,a=tt[e.server],l=a?.[e.userId];let h,d=e.resources&&e.resources[0],c=s?this.findServerInfo(r):null,u={username:e.userId,password:l};if(n&&!o)return;s&&!c&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(c=e),!!c));const p=c?this.findCredential(c.server,e.userId):null;if(!s||p){if(!i){if(s)h={serverUrl:d,token:p?.token,ssl:p?.ssl};else if(o)u=null,h={ssl:e.ssl};else{if(!l){let r;return d&&(d=this._sanitizeUrl(d),e._enqueued=1,r=this._enqueue(d,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(h={isAdmin:!0})}return this.generateToken(s?c:t,s?null:u,h).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(st(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,l.on)(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=(0,u.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=(0,u.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=(0,u.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,n.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,u.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new o.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===h);if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(d.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,u.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,u.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new u.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,et.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,et.qG)(e),t=(0,et.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(i.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,u.S8)(e),(0,u.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new u.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some(e=>e.regex.test(t.uri));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||i.A.portalUrl&&(s=(0,u.FX)(t,i.A.portalUrl,!0)),s||(s=this._portals.some(e=>this._hasSameServerInstance(e,t.uri))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&rt(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,n.A)(e=s+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new u.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{const n=new v({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?it:nt,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const i=new v({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?it:nt,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new o.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,n.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,n.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some(t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,n.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,u.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new o.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=Promise.withResolvers()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),o.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,a,h)=>{const d=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,f=d.hasPortal&&this._findOAuthInfo(e.resUrl_);let g,m;if(i)t(new v({userId:i,server:d.server??void 0,token:a??void 0,expires:null!=h?Number(h):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,l.on)(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new v(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(o.A.fromJSON(e.data.error))))});(0,c.u7)(e.options_?.signal,()=>{s.remove()})}else if(f){let i=f._oAuthCred;if(!i){const e=new We(f,it),t=new We(f,nt);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,f._oAuthCred=i}if(i.isValid()){g=new v({userId:i.userId??void 0,server:d.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const n=f.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);n||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(d.server,i.refreshToken,i.appId).then(e=>(g.expires=Date.now()+1e3*e.expires_in,g.token=e.access_token,g)):Promise.resolve(g),e._pendingDfd.then(e=>n?this._exchangeToken(e.server,f.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)})):t(g)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(f.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,f,d).then(e=>{t(e)}).catch(r)}else{const s=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,d,f,e.options_).then(t,r):(m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(d.server,f.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(g=new v({userId:e.username,server:d.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(g)):s()}).catch(s):s()}}else if(p){if(this._checkProtocol(e.resUrl_,d,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,d,s).then(t,r)}}else m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l,h;if(n&&(o=n.token,a=n.error,l=n.prompt),h=this._findCredential(i,{token:o,resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(st(s,this._legacyFed)){const e=h.toJSON();e.server=s.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then(r=>{t(new v({userId:h?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:l})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?i():s()},()=>{e.sinfo_._restInfoPms=null;const t=new o.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()}):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;const e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,n.A)(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Xe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,n.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,u.FX)(s,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(s)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const a={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(a.force_login=!0),r.forceUserId&&r.userId&&(a.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),i.codeVerifier&&(a.code_challenge=s||i.codeVerifier,a.code_challenge_method=s?"S256":"plain");const h=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",d=h+"?"+(0,u.x0)(a);if(r.popup){const e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new o.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=(0,l.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new o.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:h,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){const e=(0,u.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),(0,u.a6)(e.path,e.query)}return r}}ot.prototype.declaredClass="esri.identity.IdentityManagerBase";const at=new ot;(0,s.Aq)(at)},79783(e,t,r){r.d(t,{ud:()=>w,JK:()=>S,oQ:()=>I,V2:()=>k});var s=r(2741),i=r(97770),n=r(73444),o=r(10838),a=r(18047),l=r(53966),h=r(93637),d=r(799);const c=()=>l.A.getLogger("esri.intl.substitute");function u(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return c().warn("missing format descriptor for key {key}"),f(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return c().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}var g=r(11254),m=r(49186);async function v(e){if(null!=y.fetchBundleAsset)return y.fetchBundleAsset(e);const t=await(0,g.A)(e,{responseType:"text"});return JSON.parse(t.data)}class _{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const i=t.exec(r);if(!i)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const n=i[1]?`${i[1]}/`:"",a=i[2],l=(0,o.xO)(s),h=`${n}${a}.json`,d=l?`${n}${a}_${l}.json`:h;let c;try{c=await v(e(d))}catch(t){if(d===h)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{c=await v(e(h))}catch(e){throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return c}(this.getAssetUrl,this.matcher,e,t)}}const y={},w=o.ud,S=n.JK,I=n.oQ,A=o.ao,k=function(e,t,r={}){const{format:s={}}=r;return(0,d.HC)(e,e=>function(e,t,r){let s,i;const n=e.indexOf(":");if(-1===n?s=e.trim():(s=e.slice(0,n).trim(),i=e.slice(n+1).trim()),!s)return"";const o=(0,h.wc)(s,t);if(null==o)return"";const a=(i?r?.[i]:null)??r?.[s];return a?u(o,a):i?p(o,i):f(o)}(e,t,s))};var U;A((U={pattern:"esri/",location:s.s},new _(U)))},18047(e,t,r){r.d(t,{Up:()=>l,ZV:()=>h,yx:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){const{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:s}=e;return{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:"auto"===s?"auto":"always"===s}}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const r=(0,s.lR)(),o=r&&i[r]||(0,s.QC)();n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ml)(()=>{n=new WeakMap,o={}}),new Map}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[262],{52106(e,t,r){r.d(t,{A:()=>M});var n,i,o=r(5482),s=r(37838),a=r(69540),l=r(51447),u=r(25482),c=r(53966),p=r(36708),h=r(24326),d=r(91429),f=r(12195),y=r(65864),m=r(50498),g=r(55156),w=r(60950),b=r(54339),v=r(94128),_=r(33910);function x(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends((0,a.OU)(u.o)){static{n=v.Z}static{i=this}constructor(e){super(e),this[n]=!0,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(c.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,w.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,g.I)(this.origin);if(e)return(0,b.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){const e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:x(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,p.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,p.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,o.Cg)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,y.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,d.MZ)({value:null})],M.prototype,"attributes",null),(0,o.Cg)([(0,d.MZ)({value:null,types:m.yR,json:{read:y.rS}})],M.prototype,"geometry",null),(0,o.Cg)([(0,d.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,o.Cg)([(0,d.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,o.Cg)([(0,d.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,o.Cg)([(0,d.MZ)({type:s.A,value:null})],M.prototype,"popupTemplate",null),(0,o.Cg)([(0,d.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,d.MZ)({value:null,types:_.Es})],M.prototype,"symbol",null),(0,o.Cg)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,o.Cg)([(0,d.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=i=(0,o.Cg)([(0,d.$K)("esri.Graphic")],M)},563(e,t,r){r.d(t,{QueueProcessor:()=>u,SharedConcurrency:()=>p});var n=r(97768),i=r(17676),o=r(9775),s=r(32587),a=r(76030),l=r(44794);class u{constructor(e){this._schedule=null,this._deferreds=new s.A,this._controllers=new s.A,this._processingItems=new s.A,this._pausedSignal=(0,l.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??h,this._queue=new o.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,n.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,r)=>e(r))}_get(e){const t=this._deferreds.get(e);return t?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const r=this._get(e);if(r)return r;const n=new AbortController,o=Promise.withResolvers(),s=t?(0,i.u7)(t,()=>n.abort()):null,a=(0,i.NY)(n.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),l(),o.reject((0,i.NK)())}),l=()=>{a.remove(),s?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,o),this._controllers.set(e,n),o.promise.then(l,l),this._queue.push(e),this._scheduleNext(),o.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,a._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const r=new AbortController,n=new c(e,r);this._processingItems.set(e,n),this.sharedConcurrency.current.value+=1;try{t=this.process(e,r.signal)}catch(e){this._processError(n,e)}(0,i.$X)(t)?(n.promise=t,t.then(e=>this._processResult(n,e),e=>this._processError(n,e))):this._processResult(n,t)}}class c{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class p{constructor(e){this.limit=e,this.current=(0,l.v)(0)}get full(){return this.current.value>=this.limit}}const h=new p(1/0)},32587(e,t,r){r.d(t,{A:()=>o});var n=r(62788),i=r(95488);class o{constructor(e){this._observable=new i.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,n.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._notify(),t}entries(){return(0,n.gc)(this._observable),this._map.entries()}forEach(e,t){(0,n.gc)(this._observable),this._map.forEach((r,n)=>e.call(t,r,n,this),t)}get(e){return(0,n.gc)(this._observable),this._map.get(e)}has(e){return(0,n.gc)(this._observable),this._map.has(e)}keys(){return(0,n.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const r of t){if(!this._map.has(r))continue;const t=this._map.get(r),n=e(t,r);n!==t&&this.set(r,n)}})}values(){return(0,n.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,n.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},46140(e,t,r){r.d(t,{A:()=>i});var n=r(49186);class i{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new i(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new n.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new n.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),l=parseInt(o,10);return new i(a,l,t)}}},6797(e,t,r){r.d(t,{Ui:()=>h});var n=r(69622),i=r(7762),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter(e=>!n.includes(e)),h=n.filter(e=>!i.includes(e)),d=n.filter(r=>i.includes(r)&&u(e,r)!==u(t,r)).concat(o,h).sort(),f=c(e);if(f&&s.has(f)&&d.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=a(e)&&a(t);for(const n of d){const i=u(e,n),o=u(t,n);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&c(i)===c(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=y?y.diff[n]=s:y={type:"partial",diff:{[n]:s}})}}return y}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},9093(e,t,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>i,vt:()=>n,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:n,fromValues:function(e,t,r,n,i,o,s,a,l,u,c,p,h,d,f,y){return[e,t,r,n,i,o,s,a,l,u,c,p,h,d,f,y]}},Symbol.toStringTag,{value:"Module"}))},35522(e,t,r){r.d(t,{$A:()=>T,Bw:()=>o,C:()=>s,Cc:()=>C,DI:()=>x,Il:()=>k,Io:()=>w,Ln:()=>g,Om:()=>A,Qr:()=>p,Re:()=>u,S8:()=>M,T9:()=>y,WQ:()=>l,Z0:()=>S,_S:()=>d,aI:()=>j,ei:()=>F,gL:()=>E,hG:()=>b,hZ:()=>a,hs:()=>m,jb:()=>N,jk:()=>f,lo:()=>z,lw:()=>c,m3:()=>v,oW:()=>P,t2:()=>q,tn:()=>h,uE:()=>G,xg:()=>Z,ze:()=>_});var n=r(51850),i=r(34304);function o(e){const t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function p(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function h(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function d(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function f(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function y(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function g(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function w(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}function b(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function v(e){const t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function _(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function x(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function M(e,t){const r=t[0],n=t[1],i=t[2];let o=r*r+n*n+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 A(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function T(e,t,r){const n=t[0],i=t[1],o=t[2],s=r[0],a=r[1],l=r[2];return e[0]=i*l-o*a,e[1]=o*s-n*l,e[2]=n*a-i*s,e}function C(e,t,r,n){const i=t[0],o=t[1],s=t[2];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=s+n*(r[2]-s),e}function S(e,t,r){const n=t[0],i=t[1],o=t[2];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12],e[1]=r[1]*n+r[5]*i+r[9]*o+r[13],e[2]=r[2]*n+r[6]*i+r[10]*o+r[14],e}function F(e,t,r){const n=t[0],i=t[1],o=t[2];return e[0]=n*r[0]+i*r[3]+o*r[6],e[1]=n*r[1]+i*r[4]+o*r[7],e[2]=n*r[2]+i*r[5]+o*r[8],e}function E(e,t,r){const n=r[0],i=r[1],o=r[2],s=r[3],a=t[0],l=t[1],u=t[2],c=i*u-o*l,p=o*a-n*u,h=n*l-i*a,d=i*h-o*p,f=o*c-n*h,y=n*p-i*c,m=2*s;return e[0]=a+c*m+2*d,e[1]=l+p*m+2*f,e[2]=u+h*m+2*y,e}const O=(0,n.vt)(),I=(0,n.vt)();function q(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function j(e,t){if(e===t)return!0;const r=e[0],n=e[1],o=e[2],s=t[0],a=t[1],l=t[2],u=(0,i.FD)();return Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-a)<=u*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(o-l)<=u*Math.max(1,Math.abs(o),Math.abs(l))}function P(e,t,r){const n=r[0]-t[0],i=r[1]-t[1],o=r[2]-t[2];let s=n*n+i*i+o*o;return s>0?(s=1/Math.sqrt(s),e[0]=n*s,e[1]=i*s,e[2]=o*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const N=u,R=c,$=p,Z=w,z=b,k=o,G=v;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:l,angle:function(e,t){M(O,e),M(I,t);const r=A(O,I);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,n,i,o){const s=1-o,a=s*s,l=o*o,u=a*s,c=3*o*a,p=3*l*s,h=l*o;return e[0]=t[0]*u+r[0]*c+n[0]*p+i[0]*h,e[1]=t[1]*u+r[1]*c+n[1]*p+i[1]*h,e[2]=t[2]*u+r[2]*c+n[2]*p+i[2]*h,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,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:s,cross:T,crossAndNormalize:function(e,t,r){const n=t[0],i=t[1],o=t[2],s=r[0],a=r[1],l=r[2],u=i*l-o*a,c=o*s-n*l,p=n*a-i*s,h=Math.sqrt(u*u+c*c+p*p);return e[0]=u/h,e[1]=c/h,e[2]=p/h,e},direction:P,dist:Z,distance:w,div:$,divide:p,dot:A,equals:j,exactEquals:q,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,r,n,i,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,u=s*(o-1),c=s*(3-2*o);return e[0]=t[0]*a+r[0]*l+n[0]*u+i[0]*c,e[1]=t[1]*a+r[1]*l+n[1]*u+i[1]*c,e[2]=t[2]*a+r[2]*l+n[2]*u+i[2]*c,e},inverse:x,len:k,length:o,lerp:C,max:y,min:f,mul:R,multiply:c,negate:_,normalize:M,random:function(e,t=1){const r=i.Ov,n=2*r()*Math.PI,o=2*r()-1,s=Math.sqrt(1-o*o)*t;return e[0]=Math.cos(n)*s,e[1]=Math.sin(n)*s,e[2]=o*t,e},rotateX:function(e,t,r,n){const i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[0],o[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),o[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateY:function(e,t,r,n){const i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),o[1]=i[1],o[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateZ:function(e,t,r,n){const i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),o[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),o[2]=i[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[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:m,scaleAndAdd:g,set:a,sign:d,sqrDist:z,sqrLen:G,squaredDistance:b,squaredLength:v,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:N,subtract:u,transformMat3:F,transformMat4:S,transformQuat:E},Symbol.toStringTag,{value:"Module"}))},44794(e,t,r){r.d(t,{v:()=>a});var n=r(4718),i=r(62788),o=r(95488);class s{constructor(e,t){this._observable=new o.I,this._value=e,this._equalityFunction=t}get value(){return(0,i.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=n.gh){return new s(e,t)}},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},83027(e,t,r){r.d(t,{h:()=>n});const n=r(29953).ho},4197(e,t,r){r.d(t,{Vj:()=>u,cj:()=>l,jh:()=>o,l5:()=>a,xm:()=>s});var n=r(34275),i=r(9093);function o(e){return e<=n.y9?new Array(e).fill(0):new Float64Array(e)}function s(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function a(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function l(e){return[...e]}function u(e){const t=(0,i.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},70328(e,t,r){r.d(t,{BI:()=>b,DC:()=>p,Ej:()=>d,Ie:()=>g,Jt:()=>w,Ne:()=>f,RF:()=>c,aI:()=>_,fA:()=>s,gE:()=>l,hZ:()=>m,iT:()=>h,is:()=>v,qv:()=>x,vI:()=>y,vY:()=>a,v_:()=>M,vt:()=>o,w1:()=>u}),r(35522);var n=r(5443),i=(r(19419),r(4197));function o(e=M){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,n,i,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=s,a}function a(e,t=o()){return function(e,t,r,n=o()){return m(n,x),function(e,t,r=0,n=t.length/3){let i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function l(e,t=(0,i.jh)(24)){const[r,n,o,s,a,l]=e;return t[0]=r,t[1]=n,t[2]=o,t[3]=r,t[4]=n,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=n,t[14]=o,t[15]=s,t[16]=n,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?m(e,x):o(x)}function w(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function v(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!v(e)||!v(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],M=[0,0,0,0,0,0];o()},55156(e,t,r){r.d(t,{I:()=>i,e:()=>n});const n=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&n in t?e[n]:void 0;var t}},99680(e,t,r){r.r(t),r.d(t,{default:()=>ne});var n=r(5482),i=r(37838),o=r(69540),s=r(7762),a=r(49186),l=r(44208),u=r(25728),c=r(93637),p=r(36708),h=r(10107),d=r(36005),f=r(64108),y=r(43937),m=r(5443),g=r(16930),w=r(55156),b=r(60950),v=r(89808),_=r(99959);const x=Symbol("isParquetGraphicOrigin");var M;class A extends _.A{get[(M=x,b.ym)](){return this.layer}get[w.e](){return this.layer}get[v.Q](){return this.layer}constructor(e){super(),this[M]=!0,this.type="parquet",this.layer=e}get id(){return this.layer.id}}var T=r(4146),C=r(92474),S=r(53966),F=r(17676),E=r(83027),O=r(42760),I=r(22671);let q=class extends C.x_{constructor(e){super(e),this.type="parquet"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._initialize(t)),Promise.resolve(this)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}setCustomParameters(e){this._proxy.setCustomParameters(e).catch(()=>{S.A.getLogger(this).warn("Failed to update customParameters")})}async updateFiles(e){await this._proxy.updateFiles(e)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._proxy.queryFeatures(e.toJSON(),{signal:t?.signal})}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,{signal:t?.signal});return I.A.fromJSON(r)}async queryObjectIds(e,t){return await this._proxy.queryObjectIds(e.toJSON(),{signal:t?.signal})}async queryFeatureCount(e,t){return this._proxy.queryFeatureCount(e.toJSON(),{signal:t?.signal})}async queryExtent(e,t){if(null==this.layer.geometryEncoding)return S.A.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(e.toJSON(),{signal:t?.signal});return{count:r.count,extent:m.A.fromJSON(r.extent)}}async _initialize(e){this._connection=await(0,E.h)("ParquetSourceWorker",{strategy:"dedicated",signal:e,registryTarget:this}),(0,F.Te)(e),this._proxy=this._connection.createInvokeProxy();const{layerDefinition:t,capabilities:r}=await this._proxy.load({urls:this.layer.urls.items,fields:this.layer.fields?.map(e=>e.toJSON()),geometryType:this.layer.geometryType?(0,O.sA)(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters});(0,F.Te)(e),this.sourceJSON=t,this.capabilities=r}};(0,n.Cg)([(0,h.MZ)()],q.prototype,"type",void 0),(0,n.Cg)([(0,h.MZ)({constructOnly:!0})],q.prototype,"layer",void 0),(0,n.Cg)([(0,h.MZ)()],q.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,h.MZ)()],q.prototype,"capabilities",void 0),q=(0,n.Cg)([(0,f.$)("esri.layers.graphics.sources.ParquetSource")],q);var j=r(63074),P=r(69208),N=r(87718),R=r(56658),$=r(16131),Z=r(32756),z=r(25036),k=r(10873),G=r(29005),L=r(20437),D=r(17036),J=r(30524),V=r(46499),U=r(39383),B=r(10427),K=r(16238),Y=r(41214),Q=r(61956),W=r(97159),H=r(30291);const X=(0,D.p)(),ee="__OBJECTID",te={types:{key:"type",base:null,typeMap:{wkb:K.A,location:B.A}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let re=class extends((0,R.J)((0,N.F)((0,j.dM)((0,Z.fY)((0,z.j)((0,$.q)((0,u.M)((0,P.d)((0,o.OU)(T.A)))))))))){constructor(e){super(e),this.copyright=null,this.definitionExpression=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new A(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=ee,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!(0,l.A)("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new s.A}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([(0,p.wB)(()=>this.urls,e=>this.source?.updateFiles(e.items)),(0,p.wB)(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,n){const i=e.filter(e=>!(e.name===ee&&"oid"===e.type)).map(e=>e.toJSON(n));(0,c.sM)(r,i,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){(0,J.yp)(e,this.fieldsIndex),this._set("renderer",e)}readUrls(e){return new s.A("files"===e.type?e.urls:[])}writeUrls(e,t,r,n){const i=[];if(e?.length){n={blockedRelativeUrls:n?.blockedRelativeUrls};for(let t of e)t=(0,W.t)(t,n),t&&i.push(t)}i.length?t.source={type:"files",urls:i}:n.messages?.push(new a.A("parquet-layer:missing-urls","Missing or empty 'urls'",{layer:this}))}createPopupTemplate(e){return(0,H.tn)(this,e)}createQuery(){const e=new Q.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){const t=new q({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),n=this.graphicOrigin;if(r?.features)for(const e of r.features)e.layer=e.sourceLayer=this,e.origin=n;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return Q.A.from(e)??this.createQuery()}async _load(e){const t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),(0,J.yp)(this.renderer,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=g.A.WGS84)}};(0,n.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1,write:!1}})],re.prototype,"capabilities",null),(0,n.Cg)([(0,h.MZ)({type:String})],re.prototype,"copyright",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0})],re.prototype,"defaultPopupTemplate",null),(0,n.Cg)([(0,h.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],re.prototype,"definitionExpression",void 0),(0,n.Cg)([(0,h.MZ)()],re.prototype,"displayOptimization",void 0),(0,n.Cg)([(0,h.MZ)({type:[L.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],re.prototype,"fields",void 0),(0,n.Cg)([(0,y.K)("fields")],re.prototype,"writeFields",null),(0,n.Cg)([(0,h.MZ)(X.fieldsIndex)],re.prototype,"fieldsIndex",void 0),(0,n.Cg)([(0,h.MZ)(te)],re.prototype,"geometryEncoding",void 0),(0,n.Cg)([(0,h.MZ)({type:m.A,json:{name:"extent"}})],re.prototype,"fullExtent",void 0),(0,n.Cg)([(0,h.MZ)({type:O.ye.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:O.ye.read},write:{writer:O.ye.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:O.ye.read}}}}})],re.prototype,"geometryType",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],re.prototype,"graphicOrigin",void 0),(0,n.Cg)([(0,h.MZ)(k.kF)],re.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,h.MZ)({type:[V.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.w},write:!0}})],re.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,h.MZ)(k.fV)],re.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,h.MZ)()],re.prototype,"file",void 0),(0,n.Cg)([(0,h.MZ)({type:String,readOnly:!0})],re.prototype,"objectIdField",void 0),(0,n.Cg)([(0,h.MZ)({type:["ParquetLayer"]})],re.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,h.MZ)(X.outFields)],re.prototype,"outFields",void 0),(0,n.Cg)([(0,h.MZ)(k.M6)],re.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,h.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],re.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,h.MZ)({types:Y.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],re.prototype,"renderer",null),(0,n.Cg)([(0,h.MZ)({type:q,readOnly:!0,cast:null,json:{read:!1}})],re.prototype,"source",void 0),(0,n.Cg)([(0,h.MZ)({type:g.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],re.prototype,"spatialReference",void 0),(0,n.Cg)([(0,h.MZ)({type:[G.A]})],re.prototype,"templates",void 0),(0,n.Cg)([(0,h.MZ)()],re.prototype,"title",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1},readOnly:!0})],re.prototype,"type",void 0),(0,n.Cg)([(0,h.MZ)({type:s.A.ofType(String),json:{name:"source",write:{isRequired:!0,ignoreOrigin:!0}}})],re.prototype,"urls",void 0),(0,n.Cg)([(0,d.w)("urls")],re.prototype,"readUrls",null),(0,n.Cg)([(0,y.K)("urls")],re.prototype,"writeUrls",null),re=(0,n.Cg)([(0,f.$)("esri.layers.ParquetLayer")],re);const ne=re},76369(e,t,r){r.d(t,{LF:()=>x,M9:()=>M});var n=r(49186),i=r(93637),o=r(40876),s=r(59247),a=r(27865);class l extends SyntaxError{constructor(e,t,r,n){super(e),this.expected=t,this.found=r,this.location=n,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const n=e.find(e=>e.source===this.location.source);n&&(r=n.text.split(/\r\n|\n|\r/g));const i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,s=this.location.source+":"+o.line+":"+o.column;if(r){const e=this.location.end,n="".padEnd(o.line.toString().length," "),a=r[i.line-1],l=(i.line===e.line?e.column:a.length+1)-i.column||1;t+="\n --\x3e "+s+"\n"+n+" |\n"+o.line+" | "+a+"\n"+n+" | "+"".padEnd(i.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const n=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function i(e){return n?e.replace(n,e=>"\\u{"+r(e)+"}"):e}function o(e){return i(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return i(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const a={literal:e=>'"'+o(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return a[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."}}function u(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=c(e);return t&&0!==t.length?t:null}const t=e.map(e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new n.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:c(e.value)}});t.sort((e,t)=>t.effects.length-e.effects.length);for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new n.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort((e,t)=>t.scale-e.scale),t}function c(e){let t;if(!e)return[];try{t=function(e,t){const r={},n=(t=void 0!==t?t:{}).grammarSource,i={start:_e};let o=_e;const s="none",a=")",u=",",c="(",p="%",h="px",d="cm",f="mm",y="in",m="pt",g="pc",w="deg",b="rad",v="grad",_="turn",x="#",M=".",A="e",T=/^[ \t\n\r]/,C=/^[a-z\-]/,S=/^[0-9a-fA-F]/,F=/^[+\-]/,E=/^[0-9]/,O=ge("none"),I=ye("none",!1),q=ye(")",!1),j=ye(",",!1),P=me([" ","\t","\n","\r"],!1,!1,!1),N=ge("function"),R=ye("(",!1),$=ge("identifier"),Z=me([["a","z"],"-"],!1,!1,!1),z=ge("percentage"),k=ye("%",!1),G=ge("length"),L=ye("px",!1),D=ye("cm",!1),J=ye("mm",!1),V=ye("in",!1),U=ye("pt",!1),B=ye("pc",!1),K=ge("angle"),Y=ye("deg",!1),Q=ye("rad",!1),W=ye("grad",!1),H=ye("turn",!1),X=ge("number"),ee=ge("color"),te=ye("#",!1),re=me([["0","9"],["a","f"],["A","F"]],!1,!1,!1),ne=me(["+","-"],!1,!1,!1),ie=me([["0","9"]],!1,!1,!1),oe=ye(".",!1),se=ye("e",!1);let ae=0|t.peg$currPos,le=ae;const ue=[{line:1,column:1}];let ce,pe=ae,he=t.peg$maxFailExpected||[],de=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in i))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=i[t.startRule]}function fe(){return e.substring(le,ae)}function ye(e,t){return{type:"literal",text:e,ignoreCase:t}}function me(e,t,r,n){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:n}}function ge(e){return{type:"other",description:e}}function we(t){let r,n=ue[t];if(n)return n;if(t>=ue.length)r=ue.length-1;else for(r=t;!ue[--r];);for(n=ue[r],n={line:n.line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return ue[t]=n,n}function be(e,t,r){const i=we(e),o=we(t);return{source:n,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}}}function ve(e){ae<pe||(ae>pe&&(pe=ae,he=[]),he.push(e))}function _e(){let e;return e=xe(),e===r&&(e=function(){let e,t;if(e=[],t=Me(),t!==r)for(;t!==r;)e.push(t),t=Me();else e=r;return e}()),e}function xe(){let t,n;return de++,t=ae,Te(),e.substr(ae,4)===s?(n=s,ae+=4):(n=r,0===de&&ve(I)),n!==r?(Te(),le=t,t=[]):(ae=t,t=r),de--,t===r&&0===de&&ve(O),t}function Me(){let t,n,i,o;return t=ae,Te(),n=function(){let t,n,i;return de++,t=ae,n=Ce(),n!==r?(40===e.charCodeAt(ae)?(i=c,ae++):(i=r,0===de&&ve(R)),i!==r?(le=t,t=n):(ae=t,t=r)):(ae=t,t=r),de--,t===r&&(n=r,0===de&&ve(N)),t}(),n!==r?(Te(),i=function(){let t,n,i,o,s,a,l,c;if(t=ae,n=Ae(),n!==r){for(i=[],o=ae,s=Te(),44===e.charCodeAt(ae)?(a=u,ae++):(a=r,0===de&&ve(j)),a===r&&(a=null),l=Te(),c=Ae(),c!==r?(s=[s,a,l,c],o=s):(ae=o,o=r);o!==r;)i.push(o),o=ae,s=Te(),44===e.charCodeAt(ae)?(a=u,ae++):(a=r,0===de&&ve(j)),a===r&&(a=null),l=Te(),c=Ae(),c!==r?(s=[s,a,l,c],o=s):(ae=o,o=r);le=t,t=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map(function(e){return e[3]})}(t))}(e,t):[e]}(n,i)}else ae=t,t=r;return t}(),i===r&&(i=null),Te(),41===e.charCodeAt(ae)?(o=a,ae++):(o=r,0===de&&ve(q)),o!==r?(Te(),le=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(n,i)):(ae=t,t=r)):(ae=t,t=r),t}function Ae(){let e,t;return e=ae,t=Se(),t===r&&(t=Fe(),t===r&&(t=Ee(),t===r&&(t=function(){let e,t;return de++,e=ae,Te(),t=Ie(),t!==r?(le=e,e=function(e){return{value:e,unit:null}}(t)):(ae=e,e=r),de--,e===r&&0===de&&ve(X),e}()))),t!==r&&(le=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===r&&(e=ae,t=Oe(),t!==r&&(le=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function Te(){let t,n;for(de++,t=[],n=e.charAt(ae),T.test(n)?ae++:(n=r,0===de&&ve(P));n!==r;)t.push(n),n=e.charAt(ae),T.test(n)?ae++:(n=r,0===de&&ve(P));return de--,t}function Ce(){let t,n,i;if(de++,t=ae,n=[],i=e.charAt(ae),C.test(i)?ae++:(i=r,0===de&&ve(Z)),i!==r)for(;i!==r;)n.push(i),i=e.charAt(ae),C.test(i)?ae++:(i=r,0===de&&ve(Z));else n=r;return n!==r&&(le=t,n=fe()),t=n,de--,t===r&&(n=r,0===de&&ve($)),t}function Se(){let t,n,i;return de++,t=ae,Te(),n=Ie(),n!==r?(37===e.charCodeAt(ae)?(i=p,ae++):(i=r,0===de&&ve(k)),i!==r?(le=t,t=function(e){return{value:e,unit:"%"}}(n)):(ae=t,t=r)):(ae=t,t=r),de--,t===r&&0===de&&ve(z),t}function Fe(){let t,n,i;return de++,t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===h?(i=h,ae+=2):(i=r,0===de&&ve(L)),i!==r?(le=t,t=function(e){return{value:e,unit:"px"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===d?(i=d,ae+=2):(i=r,0===de&&ve(D)),i!==r?(le=t,t=function(e){return{value:e,unit:"cm"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===f?(i=f,ae+=2):(i=r,0===de&&ve(J)),i!==r?(le=t,t=function(e){return{value:e,unit:"mm"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===y?(i=y,ae+=2):(i=r,0===de&&ve(V)),i!==r?(le=t,t=function(e){return{value:e,unit:"in"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===m?(i=m,ae+=2):(i=r,0===de&&ve(U)),i!==r?(le=t,t=function(e){return{value:e,unit:"pt"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===g?(i=g,ae+=2):(i=r,0===de&&ve(B)),i!==r?(le=t,t=function(e){return{value:e,unit:"pc"}}(n)):(ae=t,t=r)):(ae=t,t=r)))))),de--,t===r&&0===de&&ve(G),t}function Ee(){let t,n,i;return de++,t=ae,n=Ie(),n!==r?(e.substr(ae,3)===w?(i=w,ae+=3):(i=r,0===de&&ve(Y)),i!==r?(le=t,t=function(e){return{value:e,unit:"deg"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,n=Ie(),n!==r?(e.substr(ae,3)===b?(i=b,ae+=3):(i=r,0===de&&ve(Q)),i!==r?(le=t,t=function(e){return{value:e,unit:"rad"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,n=Ie(),n!==r?(e.substr(ae,4)===v?(i=v,ae+=4):(i=r,0===de&&ve(W)),i!==r?(le=t,t=function(e){return{value:e,unit:"grad"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,n=Ie(),n!==r?(e.substr(ae,4)===_?(i=_,ae+=4):(i=r,0===de&&ve(H)),i!==r?(le=t,t=function(e){return{value:e,unit:"turn"}}(n)):(ae=t,t=r)):(ae=t,t=r)))),de--,t===r&&(n=r,0===de&&ve(K)),t}function Oe(){let t,n,i,o;if(de++,t=ae,35===e.charCodeAt(ae)?(n=x,ae++):(n=r,0===de&&ve(te)),n!==r){if(i=[],o=e.charAt(ae),S.test(o)?ae++:(o=r,0===de&&ve(re)),o!==r)for(;o!==r;)i.push(o),o=e.charAt(ae),S.test(o)?ae++:(o=r,0===de&&ve(re));else i=r;i!==r?(le=t,t={type:"hex",value:fe()}):(ae=t,t=r)}else ae=t,t=r;return t===r&&(t=ae,n=Me(),n!==r&&(le=t,n=function(e){return{type:"function",value:e}}(n)),t=n,t===r&&(t=ae,n=Ce(),n!==r&&(le=t,n={type:"named",value:fe()}),t=n)),de--,t===r&&(n=r,0===de&&ve(ee)),t}function Ie(){let t,n,i,o,s,a,l,u;for(t=ae,n=e.charAt(ae),F.test(n)?ae++:(n=r,0===de&&ve(ne)),n===r&&(n=null),i=ae,o=[],s=e.charAt(ae),E.test(s)?ae++:(s=r,0===de&&ve(ie));s!==r;)o.push(s),s=e.charAt(ae),E.test(s)?ae++:(s=r,0===de&&ve(ie));if(46===e.charCodeAt(ae)?(s=M,ae++):(s=r,0===de&&ve(oe)),s!==r){if(a=[],l=e.charAt(ae),E.test(l)?ae++:(l=r,0===de&&ve(ie)),l!==r)for(;l!==r;)a.push(l),l=e.charAt(ae),E.test(l)?ae++:(l=r,0===de&&ve(ie));else a=r;a!==r?(o=[o,s,a],i=o):(ae=i,i=r)}else ae=i,i=r;if(i===r)if(i=[],o=e.charAt(ae),E.test(o)?ae++:(o=r,0===de&&ve(ie)),o!==r)for(;o!==r;)i.push(o),o=e.charAt(ae),E.test(o)?ae++:(o=r,0===de&&ve(ie));else i=r;if(i!==r){if(o=ae,101===e.charCodeAt(ae)?(s=A,ae++):(s=r,0===de&&ve(se)),s!==r){if(a=e.charAt(ae),F.test(a)?ae++:(a=r,0===de&&ve(ne)),a===r&&(a=null),l=[],u=e.charAt(ae),E.test(u)?ae++:(u=r,0===de&&ve(ie)),u!==r)for(;u!==r;)l.push(u),u=e.charAt(ae),E.test(u)?ae++:(u=r,0===de&&ve(ie));else l=r;l!==r?(s=[s,a,l],o=s):(ae=o,o=r)}else ae=o,o=r;o===r&&(o=null),le=t,t=parseFloat(fe())}else ae=t,t=r;return t}ce=o();const qe=ce!==r&&ae===e.length;function je(){throw ce!==r&&ae<e.length&&ve({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(he,pe<e.length?function(t=ae){const r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(pe):null,pe<e.length?be(pe,pe+1):be(pe,pe))}return t.peg$library?{peg$result:ce,peg$currPos:ae,peg$FAILED:r,peg$maxFailExpected:he,peg$maxFailPos:pe,peg$success:qe,peg$throw:qe?void 0:je}:qe?ce:void je()}(e)}catch(t){throw new n.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map(e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return p(e.parameters,1),1===e.parameters.length&&(t=m(e.parameters[0])),new s.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return p(e.parameters,1),1===e.parameters.length&&(t=m(e.parameters[0])),new s.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return p(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=f[e.unit]))throw new n.A("effect:type-error",`Expected <angle>, Actual: ${h(e)}`,{term:e})}(e),e.value*f[e.unit]||0}(e.parameters[0])),new s.Nd(t)}(e);case"blur":return function(e){let t=0;return p(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0]),d(t,e.parameters[0])),new s.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const i of e.parameters)if("color"===i.type){if(t.length&&Object.freeze(t),r)throw new n.A("effect:type-error","Accepts only one color",{});r=w(i)}else{const e=g(i);if(Object.isFrozen(t))throw new n.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&d(e,i)}if(t.length<2||t.length>3)throw new n.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new s.$b(t[0],t[1],t[2]||0,r||b("black"))}(e);case"bloom":return function(e){let t=1,r=0,n=0;return p(e.parameters,3),e.parameters[0]&&(t=m(e.parameters[0])),e.parameters[1]&&(r=g(e.parameters[1]),d(r,e.parameters[1])),e.parameters[2]&&(n=m(e.parameters[2])),new s.bv(t,r,n)}(e)}}catch(t){throw t.details.filter=e,t}throw new n.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e))}function p(e,t){if(e.length>t)throw new n.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function h(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in y)return"<length>";if(e.unit in f)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function d(e,t){if(e<0)throw new n.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const f={deg:1,grad:.9,rad:180/Math.PI,turn:360},y={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function m(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new n.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${h(e)}`,{term:e})}(e);const t=e.value;return d(t,e),"%"===e.unit?.01*t:t}function g(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=y[e.unit]))throw new n.A("effect:type-error",`Expected <length>, Actual: ${h(e)}`,{term:e})}(e),e.value*y[e.unit]||0}function w(e){switch(e.colorType){case"hex":return(0,o.j5)(e.value);case"named":return b(e.value);case"function":return function(e){if(p(e.parameters,4),v.test(e.name))return[m(e.parameters[0]),m(e.parameters[1]),m(e.parameters[2]),e.parameters[3]?m(e.parameters[3]):1];if(_.test(e.name))return(0,o.ay)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new n.A("effect:type-error",`Expected <double>, Actual: ${h(e)}`,{term:e})}(e),d(e.value,e),e.value}(e.parameters[0]),m(e.parameters[1]),m(e.parameters[2]),e.parameters[3]?m(e.parameters[3]):1);throw new n.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function b(e){if(!(0,o.V6)(e))throw new n.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,o.c4)(e)}const v=/^rgba?/i,_=/^hsla?/i;function x(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:A(r.value)});return t}return A(e)}(e)}catch(e){r?.messages?.push(e)}return null}function M(e,t,r,n){try{const n=function(e){const t=u(e);return t?(0,a.dw)(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}(e);(0,i.sM)(r,n,t)}catch(e){n.messages&&n.messages.push(e)}}function A(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[T(r,"amount")];break;case"blur":e=[T(r,"radius","pt")];break;case"hue-rotate":e=[T(r,"angle","deg")];break;case"drop-shadow":e=[T(r,"xoffset","pt"),T(r,"yoffset","pt"),T(r,"blurRadius","pt"),C(r,"color")];break;case"bloom":e=[T(r,"strength"),T(r,"radius","pt"),T(r,"threshold")]}const n=`${r.type}(${e.filter(Boolean).join(" ")})`;u(n),t.push(n)}return t.join(" ")}function T(e,t,r){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function C(e,t){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},54339(e,t,r){function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>n,r:()=>i})},63074(e,t,r){r.d(t,{LF:()=>u,dM:()=>c,sU:()=>a});var n=r(5482),i=r(91429),o=r(89317),s=r(76369);const a={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:o.K}},"portal-item":{read:!0,write:{layerContainerTypes:o.K}}}}},l={read:{reader:s.LF},write:{allowNull:!0,writer:s.M9,layerContainerTypes:o.K}},u={json:{read:!1,write:!1,origins:{"web-map":l,"portal-item":l}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,n.Cg)([(0,i.MZ)(a)],r.prototype,"blendMode",void 0),(0,n.Cg)([(0,i.MZ)(u)],r.prototype,"effect",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.BlendLayer")],r),r}},69208(e,t,r){r.d(t,{d:()=>o});var n=r(5482),i=r(91429);const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,n.Cg)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}},32756(e,t,r){r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>l});var n=r(5482),i=r(93637),o=r(91429),s=r(91880);function a(e,t,r){if(!e)return null;const n=e.find(e=>!!e.field);if(!n)return null;const i=new s.A;return i.read(n,r),[i]}const l={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,n){const o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,n.Cg)([(0,o.MZ)(l)],r.prototype,"orderBy",void 0),r=(0,n.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r}},25036(e,t,r){r.d(t,{j:()=>o});var n=r(5482),i=r(91429);const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,n.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,n.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,n.Cg)([(0,i.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}},29005(e,t,r){r.d(t,{A:()=>u});var n=r(5482),i=r(69540),o=r(66552),s=r(25482),a=r(91429);const l=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],u.prototype,"drawingTool",void 0),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,n.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],u)},91880(e,t,r){r.d(t,{A:()=>u});var n,i=r(5482),o=r(66552),s=r(25482),a=r(91429);const l=new o.J({asc:"ascending",desc:"descending"});let u=class extends s.o{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,i.Cg)([(0,a.MZ)({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],u.prototype,"order",void 0),u=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],u)},10427(e,t,r){r.d(t,{A:()=>a});var n=r(5482),i=r(69540),o=r(25482),s=r(91429);let a=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="location",this.xField=null,this.yField=null}};(0,n.Cg)([(0,s.MZ)({type:["location"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"xField",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"yField",void 0),a=(0,n.Cg)([(0,s.$K)("esri.layers.support.ParquetGeometryEncodingLocation")],a)},16238(e,t,r){r.d(t,{A:()=>a});var n=r(5482),i=r(69540),o=r(25482),s=r(91429);let a=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="wkb",this.field=null}};(0,n.Cg)([(0,s.MZ)({type:["wkb"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,n.Cg)([(0,s.MZ)({type:["counter-clockwise"],json:{write:!0}})],a.prototype,"orientation",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0),a=(0,n.Cg)([(0,s.$K)("esri.layers.support.ParquetGeometryEncodingWkb")],a)},17036(e,t,r){r.d(t,{p:()=>l});var n=r(44208),i=r(53966),o=r(20437),s=r(95466),a=r(30524);function l(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,n.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");i.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},32730(e,t,r){r.d(t,{BI:()=>d,D3:()=>p,XJ:()=>h,lc:()=>c,mX:()=>y,rU:()=>f,tH:()=>v});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i");function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function h(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function d(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function f(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(m);return t?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function y(e){let t;return e?(t=(0,n.HC)(e,e=>i+'$feature["'+e+'"]'+o),t=l.test(t)?t.replace(l,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replaceAll(s,'" + ').replaceAll(a,' + "')):t='""',t}const m=/^\s*\{([^}]+)\}\s*$/i,g=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,b=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=g.exec(e)||w.exec(e);return t?t[1]||t[3]:(t=b.exec(e),t?t[2]:null)}},54625(e,t,r){r.d(t,{i_:()=>i});var n=r(30524);function i(e,t,r){t=(0,n.rS)(t)?.toLowerCase(),r=(0,n.rS)(r)?.toLowerCase();const i=e.map(e=>e.toLowerCase()),a=t?e[i.indexOf(t)]:null,l=r?e[i.indexOf(r)]:null;return{longitudeFieldName:a||e[i.indexOf(s.find(e=>i.includes(e)))],latitudeFieldName:l||e[i.indexOf(o.find(e=>i.includes(e)))]}}const o=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],s=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},42760(e,t,r){r.d(t,{hG:()=>y,nc:()=>m,sA:()=>f,ye:()=>h}),r(7762);var n=r(49186),i=r(66552),o=r(16930),s=r(20437),a=r(30524),l=r(54625),u=r(10427),c=r(16238),p=r(63892);const h=new i.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"}),d=new Set(["uncompressed","snappy","gzip"]);function f(e){return h.toJSON(e)}function y(e){return h.fromJSON(e)}async function m(e,t={}){if(e.urls.length<1)throw new n.A("parquet:bad-input","At least one url must be specified",e);if(e.geometryType&&e.spatialReference&&e.geometryEncoding&&e.fields)return e;const r=await(0,p.DV)(e.urls.getItemAt(0),{getCustomParameters:()=>t.customParameters});for(const e of r.compressionCodecs())if(!d.has(e))throw new n.A("parquet:unsupported",`Compression codec ${e} is unsupported. Must be of type ${Array.from(d).join(",")}`);const i=(0,p.hD)(r),h={...e,file:r};if(null==h.fields&&(h.fields=r.fields(!1).map(e=>s.A.fromJSON({name:e.name,alias:e.name,type:e.type}))),null!=h.geometryEncoding){const e=h.geometryEncoding;switch(e.type){case"wkb":{const t=h.fields.find(t=>t.name===e.field);if(!t)throw new n.A("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==t.type)throw new n.A("parquet:unsupported",`Invalid field type for geometry encoding. Found ${t.type} but expected 'blob'`);break}case"location":for(const t of[e.xField,e.yField])if(null!=t){const e=h.fields.find(e=>e.name===t);if(!e)throw new n.A("parquet:unsupported",`Geometry encoding references field ${t} which does not exist`);if(!(0,a.WA)(e))throw new n.A("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}null==h.geometryEncoding&&(h.geometryEncoding=function(e,t){if(null!=e){const t=e.primary_column,r=e.columns[t];return new c.A({field:t,orientation:"counterclockwise"===r.orientation?"counter-clockwise":null})}const r=t.filter(e=>(0,a.WA)(e)).map(e=>e.name),n=(0,l.i_)(r);return n.latitudeFieldName&&n.longitudeFieldName?new u.A({xField:n.longitudeFieldName,yField:n.latitudeFieldName}):null}(i,h.fields));const f=(0,p.Xj)(r);if(f&&(h.displayOptimization=f),h.geometryEncoding)switch(h.geometryEncoding.type){case"location":null==h.spatialReference&&(h.spatialReference=o.A.WGS84),null==h.geometryType&&(h.geometryType="point");break;case"wkb":{if(!i)return h;const e=i.primary_column,t=i.columns[e];if(h.geometryType||(h.geometryType=function(e){const{geometry_types:t}=e,r=new Set;for(const e of t){const t=g(e);t&&r.add(t)}if(r.size>1)throw new n.A("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:r});return 1===r.size?r.values().next().value:void 0}(t)),h.spatialReference||(h.spatialReference=function(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?new o.A({wkid:t}):void 0}(t)),h.fields)for(const e of Object.keys(i.columns))h.fields=h.fields.filter(t=>t.name!==e)}}if(h.displayOptimization){const e=h.displayOptimization.index;if(!h.spatialReference&&e.wkid&&(h.spatialReference=new o.A({wkid:e.wkid})),!h.geometryType)switch(e.type){case"z":h.geometryType="point";break;case"xz":h.geometryType=e.geometryType}}return h}function g(e){switch(e){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}},39412(e,t,r){r.d(t,{N:()=>o});var n=r(2741);let i=null;async function o(){return i||(i=async function(){const e=await r.e(7733).then(r.bind(r,57733));return await e.default({module_or_path:(0,n.s)("esri/libs/parquet/pkg/bundle_bg.wasm")}),e}()),i}},63892(e,t,r){r.d(t,{DV:()=>y,Xj:()=>g,hD:()=>m});var n=r(11254),i=r(49186),o=r(44208),s=r(563),a=r(84952),l=r(39412);const u="parquet.v1",c=new s.QueueProcessor({concurrency:12,process:async e=>{const{data:t}=await(0,n.A)(e.url,e.options);return t}}),p=e=>async function(t,r,n,i){const s=e?.(),a={url:t,options:{responseType:"array-buffer",query:s??{},cacheMode:"no-store",useQueue:!0,headers:{range:`bytes=${r}-${n}`}}};if(!(0,o.A)("parquetlayer-cache-enabled"))return c.push(a);const l=new URL(t);l.searchParams.append("range",`${r}-${n}`);try{const e=await caches.open(`${u}:${t}`),r=await e.match(l);if(r)return await r.arrayBuffer();const n=await c.push(a);return await e.put(l,new Response(n,{headers:{"Content-Type":"application/octet-stream","Content-Length":n.byteLength.toString()}})),n}catch(e){return c.push(a)}},h=e=>async function(t){if((0,a.w8)(t)){const{data:e}=await(0,n.A)(t,{responseType:"blob"});return e.size}const{data:r}=await(0,n.A)(t,{responseType:"native",method:"head",query:e?.()}),i=r.headers.get("Content-Length");if(null==i)throw new Error("Unable to parse content length");const s=parseInt(i,10);if(!(0,o.A)("parquetlayer-cache-enabled"))return s;try{const e=`${u}:${t}`,n=new URL(t);n.searchParams.append("metadata","true");let i=await caches.open(e);const o=r.headers.get("etag")??r.headers.get("Last-Modified");if(null==o)return await caches.delete(e),s;const a=await i.match(n),l=await(a?.json());l?.tag!==o&&(await caches.delete(e),i=await caches.open(e));const c=JSON.stringify({tag:o});await i.put(n,new Response(c,{headers:{"Content-Type":"application/json","Content-Length":c.length.toString()}}))}catch(e){}return s};function d(e,t){switch(t){case"esriGeometryPoint":return e.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return e.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return e.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return e.GeometryType.Multipoint;default:throw new i.A("parquet",`Found unexpected GeometryType: ${t}`)}}function f(e,t){const r=e.GeometryInfo.new();t.geometry&&r.setGeometry(function(e,t){const r=t.encoding,n=d(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(r.type){case"wkb":return e.GeometryField.fromWkb(r.field,i,n);case"location":{const{yField:t,xField:o}=r;return e.GeometryField.fromLocation(t,o,i,n)}}}(e,t.geometry));const n=t.displayOptimization;if(n){const{index:t,parentColumn:i}=n,o=e=>null!=i?[i,e].join("."):e;if("z"===t.type){const n=e.DisplayOptimizationZBuilder.new();n.setCodeField(o(t.code)),n.setXColumn(o(t.xColumn)),n.setYColumn(o(t.yColumn)),n.setCooordinatePrecision(t.coordinatePrecision),n.setFullExtent(t.fullExtent),n.setSpatialReference(t.wkid,t.wkt),n.setHasZ(!!t.zColumn),n.setHasM(!!t.mColumn),r.setOptmizationZ(n)}if("xz"===t.type){const n=d(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(o(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(n),i.setSpatialReference(t.wkid,t.wkt),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const r of t.levels??[]){const[t,n]=r.transform.translate,[s,a]=r.transform.scale,l=new Float64Array([t,n]),u=new Float64Array([s,a]),c=o(r.column);i.addLevel(e.MultiscaleGeometryField.new(r.level,r.scale,c,l,u))}r.setOptmizationXZ(i)}}return r}async function y(e,t={}){const r=await(0,l.N)(),n=p(t.getCustomParameters),o=h(t.getCustomParameters),s=t.geometryInfo?f(r,t.geometryInfo):null;try{return await r.ParquetFile.fromUrl(e,n,o,s)}catch(e){throw new i.A("parquet","Failed to parse file",{error:e})}}function m(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function g(e){if(e.keyValueMetadata("esri"))throw new i.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const t=e.keyValueMetadata("geodisplay");if(null!=t)return JSON.parse(t);const r=e.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=r){const e=JSON.parse(r);for(const t of e.fields)if(null!=t.metadata&&"type"in t.metadata&&("xz"===t.metadata.type||"z"===t.metadata.type)){const e={parentColumn:t.name,index:t.metadata};if("xz"===e.index.type&&(e.index.geometryType=e.index.geometryType.toLowerCase(),"esri-pbf"===e.index.encoding&&(e.index.encoding="esriPBF"),"esriPBF"!==e.index.encoding))throw new i.A("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${e.index.encoding}`);return e}}return null}},73681(e,t,r){r.d(t,{n:()=>l});var n=r(49186),i=r(53966),o=r(46140),s=r(95466),a=r(55674);class l{static async from(e,t,r){const s=e.dictionary_version?o.A.parse(e.dictionary_version):null,c=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const d=await(0,a.xR)(e.expression,null,p);if(!d)throw new n.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!s||!s.greaterEqual(4,0);f&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});const y=new u(r,f);return new l(f,c,d,y)}constructor(e,t,r,n){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=n}get itemNames(){return this._itemNames}evaluate(e,t,r,n){try{return this._reader.bind(e,r,n),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},61760(e,t,r){r.d(t,{PU:()=>s,YW:()=>l,ex:()=>i,hv:()=>a,zp:()=>o}),r(34727);var n=r(90629);r(78955),r(91829);const i=2.4;function o(e){return(0,n.PN)(e*i)}function s(e){return(0,n.Lz)(e)/i}function a(e,t,r){const n=Math.sqrt(e**2+t**2)/r;return n>1?0:3/(Math.PI*r**2)*(1-n**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},22671(e,t,r){r.d(t,{A:()=>w});var n,i=r(5482),o=r(52106),s=r(66552),a=r(25482),l=r(4718),u=r(91429),c=r(16930),p=r(60408),h=r(65864),d=r(50498),f=r(20437),y=r(36005),m=r(43937);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=c.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((i-e)/r));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*o+n,e=>i-e*s,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=c.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=n);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}i.push(s)}return i}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(a[0]),i=r(a[1]),o.push([n,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,p.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,p.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,p.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,i.Cg)([(0,y.w)("features")],w.prototype,"readFeatures",null),(0,i.Cg)([(0,u.MZ)({type:[f.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i.Cg)([(0,u.MZ)({types:d.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,y.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,i.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){r.d(t,{K:()=>p,Q:()=>l});var n=r(5482),i=r(66552),o=r(53966),s=r(91429),a=r(93223);const l=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&c||r&&u||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,n.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},55674(e,t,r){r.d(t,{Ad:()=>d,Gj:()=>m,QY:()=>h,lL:()=>g,xR:()=>f});var n=r(66131),i=r(49186),o=(r(44208),r(44729)),s=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const p=["geometry","scale","timeProperties"];function h(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function d(e,t){return y.create(e,t,null,["$feature","$view"])}function f(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,n){const{arcade:o,Dictionary:s}=await(0,u.l)();let a;try{a=o.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=o.scriptUsesGeometryEngine(a);l&&await o.enableGeometrySupport(),await o.loadDependentModules(new Set,a,null,!1,l);const c={vars:n.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},p=o.compileScript(a,c);let h=null;null!=r&&(h=new s(r),h.immutable=!0);const d=new s;return d.immutable=!1,d.setField("scale",0),new y(e,o,a,p,t,d,h,s)}constructor(e,t,r,n,i,o,s,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=n,this._spatialReference=i,this._viewDict=o,this._configDict=s,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:o}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?n.lY.epochToArcadeDate(i,r):n.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=o?null!=r?n.lY.epochToArcadeDate(o,r):n.lY.unknownEpochToArcadeDate(o):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const n=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=n.fields,this._boundSchema.fieldsIndex=n,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return n.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?n.lY.unknownEpochToArcadeDate(t):n.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7005],{82534(t,n,e){function r(){return[0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3]]}e.d(n,{o8:()=>a,vt:()=>r,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:a,create:r,fromValues:function(t,n,e,r){return[t,n,e,r]}},Symbol.toStringTag,{value:"Module"}))},48163(t,n,e){function r(){return[0,0]}function a(t){return[t[0],t[1]]}function s(t,n){return[t,n]}function i(){return s(1,1)}function o(){return s(1,0)}function c(){return s(0,1)}e.d(n,{Un:()=>h,fA:()=>s,o8:()=>a,vt:()=>r});const h=i(),u=o(),f=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:u,UNIT_Y:f,ZEROS:[0,0],clone:a,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:s,ones:i,unitX:o,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},67026(t,n,e){e.d(n,{A6:()=>_,Xd:()=>u,Xr:()=>d,hZ:()=>v,lw:()=>f,t2:()=>A,x8:()=>h});var r=e(29242),a=e(82534),s=e(51850),i=e(34304),o=e(35522),c=e(78955);function h(t,n,e){e*=.5;const r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function u(t,n){const e=2*Math.acos(n[3]),r=Math.sin(e/2);return r>(0,i.FD)()?(t[0]=n[0]/r,t[1]=n[1]/r,t[2]=n[2]/r):(t[0]=1,t[1]=0,t[2]=0),e}function f(t,n,e){const r=n[0],a=n[1],s=n[2],i=n[3],o=e[0],c=e[1],h=e[2],u=e[3];return t[0]=r*u+i*o+a*h-s*c,t[1]=a*u+i*c+s*o-r*h,t[2]=s*u+i*h+r*c-a*o,t[3]=i*u-r*o-a*c-s*h,t}function l(t,n,e,r){const a=n[0],s=n[1],o=n[2],c=n[3];let h,u,f,l,d,m=e[0],_=e[1],M=e[2],v=e[3];return u=a*m+s*_+o*M+c*v,u<0&&(u=-u,m=-m,_=-_,M=-M,v=-v),1-u>(0,i.FD)()?(h=Math.acos(u),f=Math.sin(h),l=Math.sin((1-r)*h)/f,d=Math.sin(r*h)/f):(l=1-r,d=r),t[0]=l*a+d*m,t[1]=l*s+d*_,t[2]=l*o+d*M,t[3]=l*c+d*v,t}function d(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function m(t,n){const e=n[0]+n[4]+n[8];let r;if(e>0)r=Math.sqrt(e+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{let e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);const a=(e+1)%3,s=(e+2)%3;r=Math.sqrt(n[3*e+e]-n[3*a+a]-n[3*s+s]+1),t[e]=.5*r,r=.5/r,t[3]=(n[3*a+s]-n[3*s+a])*r,t[a]=(n[3*a+e]+n[3*e+a])*r,t[s]=(n[3*s+e]+n[3*e+s])*r}return t}function _(t,n,e,r){const a=.5*Math.PI/180;n*=a,e*=a,r*=a;const s=Math.sin(n),i=Math.cos(n),o=Math.sin(e),c=Math.cos(e),h=Math.sin(r),u=Math.cos(r);return t[0]=s*c*u-i*o*h,t[1]=i*o*u+s*c*h,t[2]=i*c*h-s*o*u,t[3]=i*c*u+s*o*h,t}const M=c.C,v=c.hZ,g=c.WQ,b=f,j=c.hs,P=c.Om,w=c.Cc,p=c.Bw,x=p,S=c.m3,I=S,q=c.S8,A=c.t2,z=c.aI,y=(0,s.vt)(),O=(0,s.fA)(1,0,0),C=(0,s.fA)(0,1,0),Q=(0,a.vt)(),N=(0,a.vt)(),V=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:g,calculateW:function(t,n){const e=n[0],r=n[1],a=n[2];return t[0]=e,t[1]=r,t[2]=a,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-a*a)),t},conjugate:d,copy:M,dot:P,equals:z,exactEquals:A,fromEuler:_,fromMat3:m,getAxisAngle:u,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,n){const e=n[0],r=n[1],a=n[2],s=n[3],i=e*e+r*r+a*a+s*s,o=i?1/i:0;return t[0]=-e*o,t[1]=-r*o,t[2]=-a*o,t[3]=s*o,t},len:x,length:p,lerp:w,mul:b,multiply:f,normalize:q,random:function(t){const n=i.Ov,e=n(),r=n(),a=n(),s=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=s*Math.sin(2*Math.PI*r),t[1]=s*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*a),t[3]=o*Math.cos(2*Math.PI*a),t},rotateX:function(t,n,e){e*=.5;const r=n[0],a=n[1],s=n[2],i=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=r*c+i*o,t[1]=a*c+s*o,t[2]=s*c-a*o,t[3]=i*c-r*o,t},rotateY:function(t,n,e){e*=.5;const r=n[0],a=n[1],s=n[2],i=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=r*c-s*o,t[1]=a*c+i*o,t[2]=s*c+r*o,t[3]=i*c-a*o,t},rotateZ:function(t,n,e){e*=.5;const r=n[0],a=n[1],s=n[2],i=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=r*c+a*o,t[1]=a*c-r*o,t[2]=s*c+i*o,t[3]=i*c-s*o,t},rotationTo:function(t,n,e){const r=(0,o.Om)(n,e);return r<-.999999?((0,o.$A)(y,O,n),(0,o.Il)(y)<1e-6&&(0,o.$A)(y,C,n),(0,o.S8)(y,y),h(t,y,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(y,n,e),t[0]=y[0],t[1]=y[1],t[2]=y[2],t[3]=1+r,q(t,t))},scale:j,set:v,setAxes:function(t,n,e,r){const a=V;return a[0]=e[0],a[3]=e[1],a[6]=e[2],a[1]=r[0],a[4]=r[1],a[7]=r[2],a[2]=-n[0],a[5]=-n[1],a[8]=-n[2],q(t,m(t,a))},setAxisAngle:h,slerp:l,sqlerp:function(t,n,e,r,a,s){return l(Q,n,a,s),l(N,e,r,s),l(t,Q,N,2*s*(1-s)),t},sqrLen:I,squaredLength:S,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},48353(t,n,e){e.d(n,{l:()=>h});var r=e(34727),a=e(58083),s=e(51850);function i(t,n,e){const r=Math.sin(t),a=Math.cos(t),s=Math.sin(n),i=Math.cos(n),o=e;return o[0]=-r,o[4]=-s*a,o[8]=i*a,o[12]=0,o[1]=a,o[5]=-s*r,o[9]=i*r,o[13]=0,o[2]=0,o[6]=i,o[10]=s,o[14]=0,o[3]=0,o[7]=0,o[11]=0,o[15]=1,o}var o=e(49208),c=e(21325);function h(t,n,e,r){const s=(0,o.Tp)(t,r);if(null==s)return!1;const h=s.source.spatialReferenceId,m=s.dest.spatialReferenceId;if(h===m&&!u(m)&&(0!==h||(0,c.aI)(t,r)))return(0,a.kN)(e,n),!0;if(u(m)){const t=o.w5[h][10],r=o.w5[10][m];return null!=t&&null!=r&&(t(n,0,l,0),r(l,0,d,0),i(f*l[0],f*l[1],e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}const _=u(h);if((3===m||11===m||2===m||5===m)&&(2===h||_||3===h||5===h)){const t=o.w5[h][10],r=o.w5[10][m];return null!=t&&null!=r&&(t(n,0,l,0),r(l,0,d,0),_?function(t,n,e){i(t,n,e),(0,a.mg)(e,e)}(f*l[0],f*l[1],e):(0,a.D_)(e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}return!1}function u(t){return 1===t||6===t||8===t||4===t}const f=(0,r.kU)(1),l=(0,s.vt)(),d=(0,s.vt)()},27921(t,n,e){e.d(n,{$Q:()=>j,C:()=>o,Cr:()=>u,O_:()=>h,Qj:()=>c,T7:()=>g,Tj:()=>b,lU:()=>f,mN:()=>P,vE:()=>w,vt:()=>i});var r=e(34727),a=e(35522),s=e(51850);function i(t=p){return[t[0],t[1],t[2],t[3]]}function o(t,n){return function(t,n,e,r,a=i()){return a[0]=t,a[1]=n,a[2]=e,a[3]=r,a}(n[0],n[1],n[2],n[3],t)}function c(t){return t}function h(t,n,e){const r=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],a=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return e[0]=n[0]*a,e[1]=n[1]*a,e[2]=n[2]*a,e[3]=-(e[0]*t[0]+e[1]*t[1]+e[2]*t[2]),e}function u(t,n,e,r=i()){const a=e[0]-n[0],s=e[1]-n[1],o=e[2]-n[2],c=t[0]-n[0],h=t[1]-n[1],u=t[2]-n[2],f=s*u-o*h,l=o*c-a*u,d=a*h-s*c,m=f*f+l*l+d*d,_=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=f*_,r[1]=l*_,r[2]=d*_,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function f(t,n,e,r=0,s=Math.floor(e*(1/3)),i=Math.floor(e*(2/3))){if(e<3)return!1;n(d,r);let o=s,c=!1;for(;o<e-1&&!c;)n(m,o),o++,c=!(0,a.t2)(d,m);if(!c)return!1;for(o=Math.max(o,i),c=!1;o<e&&!c;)n(_,o),o++,(0,a.Re)(M,d,m),(0,a.S8)(M,M),(0,a.Re)(v,m,_),(0,a.S8)(v,v),c=!(0,a.t2)(d,_)&&!(0,a.t2)(m,_)&&Math.abs((0,a.Om)(M,v))<l;return c?(u(d,m,_,t),!0):(0!==r||1!==s||2!==i)&&f(t,n,e,0,1,2)}e(78955),e(44280),e(32114),e(32728);const l=.99619469809,d=(0,s.vt)(),m=(0,s.vt)(),_=(0,s.vt)(),M=(0,s.vt)(),v=(0,s.vt)();function g(t,n,e){return function(t){return 0===t||1===t}(w(t,n.origin,n.vector,0,e))}function b(t,n){return P(t,n)>=0}function j(t,n){const e=(0,a.Om)(t,n.ray.direction),r=-P(t,n.ray.origin);if(r<0&&e>=0)return!1;if(e>-1e-6&&e<1e-6)return r>0;if((r<0||e<0)&&!(r<0&&e<0))return!0;const s=r/e;return e>0?s<n.c1&&(n.c1=s):s>n.c0&&(n.c0=s),n.c0<=n.c1}function P(t,n){return(0,a.Om)(t,n)+t[3]}function w(t,n,e,s,i){const o=(0,a.Om)(t,e),c=P(t,n);if(0===o)return c>=0?2:3;let h=-c/o;return 1&s&&(h=(0,r.qE)(h,0,1)),!(4&s)&&h<0||!(8&s)&&h>1?c>=0?2:3:((0,a.WQ)(i,n,(0,a.hs)(i,e,h)),c>=0?0:1)}const p=[0,0,1,0]},44280(t,n,e){e.d(n,{g7:()=>o,gr:()=>i});var r=e(34727),a=e(35522),s=e(51850);function i(t,n){return(0,a.Om)(t,n)/(0,a.Bw)(t)}function o(t,n){const e=(0,a.Om)(t,n)/((0,a.Bw)(t)*(0,a.Bw)(n));return-(0,r.XM)(e)}(0,s.vt)(),(0,s.vt)()},32114(t,n,e){e.d(n,{Rc:()=>d,J8:()=>m,rq:()=>f,Km:()=>l}),e(44208);var r=e(26390),a=e(29242),s=e(9093),i=e(82534),o=e(48163),c=e(51850),h=e(91829);class u{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new u(o.vt)}static createVec3f64(){return new u(c.vt)}static createVec4f64(){return new u(h.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(s.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const f=u.createVec3f64(),l=u.createVec4f64(),d=(u.createMat3f64(),u.createMat4f64()),m=u.createQuatf64()},32728(t,n,e){e.d(n,{YH:()=>i,nu:()=>o,wp:()=>s}),e(34727);var r=e(35522),a=e(51850);function s(t,n){const e=Math.sqrt(n[0]*n[0]+n[4]*n[4]+n[8]*n[8]),a=Math.sqrt(n[1]*n[1]+n[5]*n[5]+n[9]*n[9]),s=Math.sqrt(n[2]*n[2]+n[6]*n[6]+n[10]*n[10]);return(0,r.hZ)(t,e,a,s),t}function i(t,n,e){e=e||t;const a=(0,r.Om)(t,n);(0,r.hZ)(e,t[0]-a*n[0],t[1]-a*n[1],t[2]-a*n[2]),(0,r.S8)(e,e)}function o(t,n,e,s=(0,a.vt)()){const i=(0,r.Bw)(t),o=(0,r.Bw)(n),u=(0,r.Om)(t,n)/(i*o);if(u<.9999999999999999){const a=Math.acos(u),f=((1-e)*i+e*o)/Math.sin(a),l=f/i*Math.sin((1-e)*a),d=f/o*Math.sin(e*a);return(0,r.hs)(c,t,l),(0,r.hs)(h,n,d),(0,r.WQ)(s,c,h)}return(0,r.Cc)(s,t,n,e)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),h=(0,a.vt)()},57005(t,n,e){e.d(n,{ab:()=>bt,gm:()=>zt});var r=e(77690),a=e(29242),s=e(9093),i=e(67026),o=e(82534),c=e(35522),h=e(51850),u=e(78955),f=e(91829),l=e(73941),d=e(98764),m=e(48353),_=e(9762),M=e(49208),v=e(27921),g=e(21325),b=e(32114),j=e(48163),P=e(46610);const w=1e-6,p=(0,h.vt)(),x=(0,h.vt)();function S(t,n,e,r,a,s,i,o,c,h){return function(t,n,e){let r=vt(t.maxVert[0],t.minVert[0]),a=0;for(let n=1;n<7;++n){const e=vt(t.maxVert[n],t.minVert[n]);e>r&&(r=e,a=n)}dt(n,t.minVert[a]),dt(e,t.maxVert[a])}(t,r,a),vt(r,a)<w?1:(ft(i,r,a),_t(i,i),function(t,n,e,r){const{data:a,size:s}=t;let i=Number.NEGATIVE_INFINITY,o=0;for(let t=0;t<a.length;t+=s){V[0]=a[t]-n[0],V[1]=a[t+1]-n[1],V[2]=a[t+2]-n[2];const r=e[0]*V[0]+e[1]*V[1]+e[2]*V[2],s=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],c=V[0]*V[0]+V[1]*V[1]+V[2]*V[2]-r*r/s;c>i&&(i=c,o=t)}return dt(r,a,o),i}(n,r,i,s)<w?2:(ft(o,a,s),_t(o,o),ft(c,s,r),_t(c,c),mt(e,o,i),_t(e,e),X(n,e,i,o,c,h),0))}const I=(0,h.vt)(),q=(0,h.vt)(),A=(0,h.vt)(),z=(0,h.vt)(),y=(0,h.vt)(),O=(0,h.vt)(),C=(0,h.vt)(),Q=(0,h.vt)();function N(t,n,e,r,a,s,i,o,c){(function(t,n,e,r,a){!function(t,n,e,r,a){const{data:s,size:i}=t;dt(r,s),dt(a,r),e[0]=gt(Y,n),e[1]=e[0];for(let t=i;t<s.length;t+=i){const i=s[t]*n[0]+s[t+1]*n[1]+s[t+2]*n[2];i<e[0]&&(e[0]=i,dt(r,s,t)),i>e[1]&&(e[1]=i,dt(a,s,t))}}(t,n,T,a,r);const s=gt(e,n);T[1]-w<=s&&(r[0]=void 0),T[0]+w>=s&&(a[0]=void 0)})(t,n,e,I,q),void 0!==I[0]&&(ft(A,I,e),_t(A,A),ft(z,I,r),_t(z,z),ft(y,I,a),_t(y,y),mt(O,z,s),_t(O,O),mt(C,y,i),_t(C,C),mt(Q,A,o),_t(Q,Q),X(t,O,s,z,A,c),X(t,C,i,y,z,c),X(t,Q,o,A,y,c)),void 0!==q[0]&&(ft(A,q,e),_t(A,A),ft(z,q,r),_t(z,z),ft(y,q,a),_t(y,y),mt(O,z,s),_t(O,O),mt(C,y,i),_t(C,C),mt(Q,A,o),_t(Q,Q),X(t,O,s,z,A,c),X(t,C,i,y,z,c),X(t,Q,o,A,y,c))}const V=[0,0,0],T=(0,j.vt)(),Z=(0,h.vt)(),L=(0,h.vt)(),F=(0,h.vt)(),B=(0,h.vt)(),E=(0,h.vt)(),R=(0,h.vt)();function X(t,n,e,r,a,s){if(Mt(n)<w)return;mt(Z,e,n),mt(L,r,n),mt(F,a,n),W(t,n,T),E[1]=T[0],B[1]=T[1],R[1]=B[1]-E[1];const i=[e,r,a],o=[Z,L,F];for(let e=0;e<3;++e){W(t,i[e],T),E[0]=T[0],B[0]=T[1],W(t,o[e],T),E[2]=T[0],B[2]=T[1],R[0]=B[0]-E[0],R[2]=B[2]-E[2];const r=ht(R);r<s.quality&&(dt(s.b0,i[e]),dt(s.b1,n),dt(s.b2,o[e]),s.quality=r)}}const Y=(0,h.vt)();function W(t,n,e){const{data:r,size:a}=t;let s=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=n[0],c=n[1],h=n[2];for(let t=0;t<r.length;t+=a){const n=r[t]*o+r[t+1]*c+r[t+2]*h;s=Math.min(s,n),i=Math.max(i,n)}e[0]=s,e[1]=i}function D(t,n,e){e.center=t,e.halfSize=(0,c.hs)(n,n,.5),e.quaternion=o.zK}const k=(0,h.vt)(),H=(0,h.vt)(),K=(0,h.vt)(),G=(0,h.vt)(),U=(0,h.vt)(),$=(0,h.vt)();function J(t,n,e){dt(k,n),Math.abs(n[0])>Math.abs(n[1])&&Math.abs(n[0])>Math.abs(n[2])?k[0]=0:Math.abs(n[1])>Math.abs(n[2])?k[1]=0:k[2]=0,Mt(k)<w&&(k[0]=k[1]=k[2]=1),mt(H,n,k),_t(H,H),mt(K,n,H),_t(K,K),tt(t,n,H,K,G,U),ft($,U,G),it(n,H,K,G,U,$,e)}function tt(t,n,e,r,a,s){W(t,n,T),a[0]=T[0],s[0]=T[1],W(t,e,T),a[1]=T[0],s[1]=T[1],W(t,r,T),a[2]=T[0],s[2]=T[1]}const nt=(0,h.vt)(),et=(0,h.vt)(),rt=(0,h.vt)(),at=(0,a.fA)(1,0,0,0,1,0,0,0,1),st=(0,o.vt)();function it(t,n,e,r,a,s,i){at[0]=t[0],at[1]=t[1],at[2]=t[2],at[3]=n[0],at[4]=n[1],at[5]=n[2],at[6]=e[0],at[7]=e[1],at[8]=e[2],i.quaternion=function(t,n){const e=n[0]+n[4]+n[8];if(e>0){let r=Math.sqrt(e+1);t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r}else{let e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);const r=(e+1)%3,a=(e+2)%3;let s=Math.sqrt(n[3*e+e]-n[3*r+r]-n[3*a+a]+1);t[e]=.5*s,s=.5/s,t[3]=(n[3*r+a]-n[3*a+r])*s,t[r]=(n[3*r+e]+n[3*e+r])*s,t[a]=(n[3*a+e]+n[3*e+a])*s}return t}(st,at),ut(nt,r,a),lt(nt,nt,.5),lt(et,t,nt[0]),lt(rt,n,nt[1]),ut(et,et,rt),lt(rt,e,nt[2]),i.center=(0,c.WQ)(et,et,rt),i.halfSize=(0,c.hs)(nt,s,.5)}class ot{constructor(t){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let n=0;this.minProj=new Float64Array(this.buffer,n,7),n+=56,this.maxProj=new Float64Array(this.buffer,n,7),n+=56;for(let t=0;t<7;++t)this.minVert[t]=new Float64Array(this.buffer,n,3),n+=24;for(let t=0;t<7;++t)this.maxVert[t]=new Float64Array(this.buffer,n,3),n+=24;for(let t=0;t<7;++t)this.minProj[t]=Number.POSITIVE_INFINITY,this.maxProj[t]=Number.NEGATIVE_INFINITY;const e=new Array(7),r=new Array(7),{data:a,size:s}=t;for(let t=0;t<a.length;t+=s){let n=a[t];n<this.minProj[0]&&(this.minProj[0]=n,e[0]=t),n>this.maxProj[0]&&(this.maxProj[0]=n,r[0]=t),n=a[t+1],n<this.minProj[1]&&(this.minProj[1]=n,e[1]=t),n>this.maxProj[1]&&(this.maxProj[1]=n,r[1]=t),n=a[t+2],n<this.minProj[2]&&(this.minProj[2]=n,e[2]=t),n>this.maxProj[2]&&(this.maxProj[2]=n,r[2]=t),n=a[t]+a[t+1]+a[t+2],n<this.minProj[3]&&(this.minProj[3]=n,e[3]=t),n>this.maxProj[3]&&(this.maxProj[3]=n,r[3]=t),n=a[t]+a[t+1]-a[t+2],n<this.minProj[4]&&(this.minProj[4]=n,e[4]=t),n>this.maxProj[4]&&(this.maxProj[4]=n,r[4]=t),n=a[t]-a[t+1]+a[t+2],n<this.minProj[5]&&(this.minProj[5]=n,e[5]=t),n>this.maxProj[5]&&(this.maxProj[5]=n,r[5]=t),n=a[t]-a[t+1]-a[t+2],n<this.minProj[6]&&(this.minProj[6]=n,e[6]=t),n>this.maxProj[6]&&(this.maxProj[6]=n,r[6]=t)}for(let t=0;t<7;++t){let n=e[t];dt(this.minVert[t],a,n),n=r[t],dt(this.maxVert[t],a,n)}}}class ct{constructor(){this.b0=(0,h.fA)(1,0,0),this.b1=(0,h.fA)(0,1,0),this.b2=(0,h.fA)(0,0,1),this.quality=0}}function ht(t){return t[0]*t[1]+t[0]*t[2]+t[1]*t[2]}function ut(t,n,e){t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2]}function ft(t,n,e){t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2]}function lt(t,n,e){t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e}function dt(t,n,e=0){t[0]=n[e],t[1]=n[e+1],t[2]=n[e+2]}function mt(t,n,e){const r=n[0],a=n[1],s=n[2],i=e[0],o=e[1],c=e[2];t[0]=a*c-s*o,t[1]=s*i-r*c,t[2]=r*o-a*i}function _t(t,n){const e=n[0]*n[0]+n[1]*n[1]+n[2]*n[2];if(e>0){const r=1/Math.sqrt(e);t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r}}function Mt(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function vt(t,n){const e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function gt(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}class bt{constructor(t=h.uY,n=Yt,e=o.zK){this._data=[t[0],t[1],t[2],n[0],n[1],n[2],e[0],e[1],e[2],e[3]]}clone(){return bt.fromData(this._data)}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){const n=new bt;return n._copyFromData(t),n}static fromJSON(t){return new bt(t.center,t.halfSize,t.quaternion)}copy(t){this._copyFromData(t.data)}_copyFromData(t){for(let n=0;n<10;++n)this._data[n]=t[n]}get center(){return(0,c.hZ)(b.rq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}set center(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenter(t,n,e){this._data[0]=t,this._data[1]=n,this._data[2]=e}get halfSize(){return(0,c.hZ)(b.rq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}set halfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}get quaternion(){return(0,i.hZ)(b.J8.get(),this._data[6],this._data[7],this._data[8],this._data[9])}get quaternionConjugate(){return(0,i.hZ)(b.J8.get(),-this._data[6],-this._data[7],-this._data[8],this._data[9])}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}getQuaternionConjugate(t){return t[0]=-this._data[6],t[1]=-this._data[7],t[2]=-this._data[8],t[3]=this._data[9],t}set quaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){const n=this._data,e=(0,i.hZ)(jt,n[6],n[7],n[8],n[9]);for(let r=0;r<8;++r){const a=t[r];a[0]=(1&r?-1:1)*n[3],a[1]=(2&r?-1:1)*n[4],a[2]=(4&r?-1:1)*n[5],(0,c.gL)(a,a,e),a[0]+=n[0],a[1]+=n[1],a[2]+=n[2]}return t}getAxes(t){const n=this._data,e=(0,i.hZ)(jt,n[6],n[7],n[8],n[9]);return(0,c.gL)(t[0],[1,0,0],e),(0,c.gL)(t[1],[0,1,0],e),(0,c.gL)(t[2],[0,0,1],e),t}intersectsFrustum(t){const{centerX:n,centerY:e,centerZ:r}=this,a=t.planes;for(const t of a){const a=(0,v.Qj)(t),s=this.projectedRadius(a);if(n*a[0]+e*a[1]+r*a[2]+t[3]-s>0)return!1}const s=this.getAxes(Bt),i=t.points,o=this.halfSize;for(let t=0;t<3;++t){const a=s[t],h=-a[0]*n-a[1]*e-a[2]*r,u=o[t];let f=!0,l=!0;for(const t of i){const n=(0,c.Om)(t,a)+h;f&&=n>u,l&&=n<-u}if(f||l)return!1}if(this.getCorners(Ft).some(n=>t.intersectsPoint(n)))return!0;const h=Dt;for(let t=0;t<3;++t){const a=s[t];h[t]=a[0]*n+a[1]*e+a[2]*r}if(t.points.some(t=>(t=>{for(let n=0;n<3;++n){const e=s[n],r=o[n],a=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]-h[n];if(a>r||a<-r)return!1}return!0})(t)))return!0;const u=t.lines,f=Wt;for(let t=0;t<8;++t){const a=u[t].direction;for(const t of s){(0,c.$A)(f,a,t);const s=(0,c.Il)(f);if(!(s>0))continue;(0,c.hs)(f,f,1/s);const o=this.projectedRadius(f),h=f[0]*n+f[1]*e+f[2]*r,u=h-o,l=h+o;let d=!1,m=!1,_=!0;for(const t of i){const n=(0,c.Om)(f,t);if(n>l){if(m){_=!1;break}d=!0}else{if(!(n<u)){_=!1;break}if(d){_=!1;break}m=!0}}if(_)return!1}}return!0}intersectsFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}get radius(){const t=this._data[3],n=this._data[4],e=this._data[5];return Math.sqrt(t*t+n*n+e*e)}intersectsPoint(t){const n=this.getAxes(Bt),e=this.halfSize,{center:r}=this;for(let a=0;a<3;++a){const s=n[a],i=e[a],o=(0,c.Om)(s,t)-(0,c.Om)(s,r);if(o>i||o<-i)return!1}return!0}intersectSphere(t){const{center:n,radius:e}=t,r=this._data,a=r[3],s=r[4],i=r[5],o=a+s+i+e,c=r[0]-n[0];if(Math.abs(c)>o)return!1;const h=r[1]-n[1];if(Math.abs(h)>o)return!1;const u=r[2]-n[2];if(Math.abs(u)>o)return!1;const f=-r[6],l=-r[7],d=-r[8],m=l*u-d*h,_=d*c-f*u,M=f*h-l*c,v=l*M-d*_,g=d*m-f*M,b=f*_-l*m,j=2*r[9],P=Math.abs(c+m*j+2*v),w=Math.abs(h+_*j+2*g),p=Math.abs(u+M*j+2*b),x=P-Math.min(P,a),S=w-Math.min(w,s),I=p-Math.min(p,i);return x*x+S*S+I*I<=e*e}intersectSphereWithMBS(t,n=this.radius){const e=this._data,{center:r,radius:a}=t,s=n+a,i=e[0]-r[0];if(i>s)return!1;const o=e[1]-r[1];if(o>s)return!1;const c=e[2]-r[2];if(c>s)return!1;if(i*i+o*o+c*c>s*s)return!1;const h=-e[6],u=-e[7],f=-e[8],l=u*c-f*o,d=f*i-h*c,m=h*o-u*i,_=u*m-f*d,M=f*l-h*m,v=h*d-u*l,g=2*e[9],b=Math.abs(i+l*g+2*_),j=Math.abs(o+d*g+2*M),P=Math.abs(c+m*g+2*v),w=b-Math.min(b,e[3]),p=j-Math.min(j,e[4]),x=P-Math.min(P,e[5]);return w*w+p*p+x*x<a*a}intersectPlane(t){const n=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],e=this.projectedRadius((0,v.Qj)(t));return n>e?1:n<-e?-1:0}intersectRay(t,n,e=0){const r=this._data,a=jt;a[0]=-r[6],a[1]=-r[7],a[2]=-r[8],a[3]=r[9],pt[0]=t[0]-r[0],pt[1]=t[1]-r[1],pt[2]=t[2]-r[2];const s=(0,c.gL)(pt,pt,jt),i=(0,c.gL)(xt,n,jt);let o=-1/0,h=1/0;const u=this.getHalfSize(Tt);for(let t=0;t<3;t++){const n=s[t],r=i[t],a=u[t]+e;if(Math.abs(r)>1e-6){const t=(a-n)/r,e=(-a-n)/r;o=Math.max(o,Math.min(t,e)),h=Math.min(h,Math.max(t,e))}else if(n>a||n<-a)return!1}return o<=h}projectedArea(t,n,e,a){const s=this.getQuaternion(Pt);(0,i.Xr)(jt,s),pt[0]=t[0]-this._data[0],pt[1]=t[1]-this._data[1],pt[2]=t[2]-this._data[2],(0,c.gL)(pt,pt,jt);const o=this.getHalfSize(Tt),h=pt[0]<-o[0]?-1:pt[0]>o[0]?1:0,f=pt[1]<-o[1]?-1:pt[1]>o[1]?1:0,l=pt[2]<-o[2]?-1:pt[2]>o[2]?1:0,d=Math.abs(h)+Math.abs(f)+Math.abs(l);if(0===d)return 1/0;const m=1===d?4:6,_=6*(h+3*f+9*l+13);(0,r.I0)(Zt,s),(0,r.hs)(Zt,Zt,o);const M=this.getCenter(Nt);for(let t=0;t<m;t++){const e=At[_+t];(0,c.hZ)(pt,((1&e)<<1)-1,(2&e)-1,((4&e)>>1)-1),(0,c.ei)(pt,pt,Zt),(0,c.WQ)(St,M,pt),St[3]=1,(0,u.Z0)(St,St,n);const r=1/Math.max(1e-6,St[3]);qt[2*t]=St[0]*r,qt[2*t+1]=St[1]*r}const v=2*m-2;let g=qt[0]*(qt[3]-qt[v+1])+qt[v]*(qt[1]-qt[v-1]);for(let t=2;t<v;t+=2)g+=qt[t]*(qt[t+3]-qt[t-1]);return Math.abs(g)*e*a*.125}projectedRadius(t){const n=this.getQuaternion(Pt);return(0,i.Xr)(jt,n),(0,c.gL)(pt,t,jt),Math.abs(pt[0]*this._data[3])+Math.abs(pt[1]*this._data[4])+Math.abs(pt[2]*this._data[5])}minimumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]-this.projectedRadius((0,v.Qj)(t))}maximumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]+this.projectedRadius((0,v.Qj)(t))}toAaBoundingBox(t){const n=this.getQuaternion(Pt),e=(0,r.I0)(Zt,n),a=this._data[3]*Math.abs(e[0])+this._data[4]*Math.abs(e[3])+this._data[5]*Math.abs(e[6]),s=this._data[3]*Math.abs(e[1])+this._data[4]*Math.abs(e[4])+this._data[5]*Math.abs(e[7]),i=this._data[3]*Math.abs(e[2])+this._data[4]*Math.abs(e[5])+this._data[5]*Math.abs(e[8]);t[0]=this._data[0]-a,t[1]=this._data[1]-s,t[2]=this._data[2]-i,t[3]=this._data[0]+a,t[4]=this._data[1]+s,t[5]=this._data[2]+i}transform(t,n,e,r=0,a=(0,d.lO)(e),s=(0,d.lO)(n),o=(0,M.jd)(n,s)){if(e===a)n.isGeographic?function(t,n,e,r,a=(0,d.lO)(e)){const s=(0,l.tO)(e),o=1+Math.max(0,r)/(s.radius+t.centerZ);t.getCenter(Qt),Qt[2]+=r,(0,_.projectBuffer)(Qt,e,0,Qt,a,0),n.center=Qt;const h=t.getQuaternion(Pt);n.quaternion=h,(0,i.Xr)(jt,h),(0,c.hZ)(Et,0,0,1),(0,c.gL)(Et,Et,jt);const u=t.getHalfSize(Tt);(0,c.hZ)(Et,u[0]*Math.abs(Et[0]),u[1]*Math.abs(Et[1]),u[2]*Math.abs(Et[2])),(0,c.hs)(Et,Et,s.inverseFlattening),(0,c.WQ)(Et,u,Et),n.halfSize=(0,c.hs)(Et,Et,o)}(this,t,n,r,s):function(t,n,e,r,a=(0,d.lO)(e),s=(0,M.jd)(e,a)){t.getCorners(Ft),t.getCenter(Qt),Qt[2]+=r,(0,m.l)(e,Qt,Lt,a),n.setCenter(Lt[12],Lt[13],Lt[14]);const o=2*Math.sqrt(1+Lt[0]+Lt[5]+Lt[10]);jt[0]=(Lt[6]-Lt[9])/o,jt[1]=(Lt[8]-Lt[2])/o,jt[2]=(Lt[1]-Lt[4])/o,jt[3]=.25*o;const h=t.getQuaternion(Pt);n.quaternion=(0,i.lw)(jt,jt,h),(0,i.Xr)(jt,jt),(0,c.hZ)(Rt,0,0,0);const u=n.getCenter(Vt);for(const t of Ft)t[2]+=r,s(t,0,t,0),(0,c.jb)(Et,t,u),(0,c.gL)(Et,Et,jt),(0,c.tn)(Et,Et),(0,c.T9)(Rt,Rt,Et);n.halfSize=Rt}(this,t,n,r,s,o);else if(n.isGeographic&&(e.isWebMercator||(0,g.r1)(e)))!function(t,n,e,r,a){n.getCenter(Nt),Nt[2]+=a;const s=(0,d.lO)(e);(0,_.projectBuffer)(Nt,t,0,Nt,s,0),yt(s,n,Nt,e,r)}(n,this,e,t,r);else if(n.isWebMercator&&(0,g.r1)(e))!function(t,n,e,r,a){n.getCenter(Nt),Nt[2]+=a,yt(t,n,Nt,e,r)}(n,this,e,t,r);else{const a=this.getCenter(Nt);a[2]+=r,(0,_.projectBuffer)(a,n,0,a,e,0),t.center=a,this!==t&&(t.quaternion=this.getQuaternion(Pt),t.halfSize=this.getHalfSize(Tt))}}}const jt=(0,o.vt)(),Pt=(0,o.vt)(),wt=(0,o.vt)(),pt=(0,h.vt)(),xt=(0,h.vt)(),St=(0,f.vt)();function It(t,n=new bt){return function(t,n){const{data:e,size:r}=t,a=e.length/r;if(a<=0)return;const s=new ot(t);ut(p,s.minProj,s.maxProj),lt(p,p,.5),ft(x,s.maxProj,s.minProj);const i=ht(x),o=new ct;o.quality=i,a<14&&(t=new P.K(new Float64Array(s.buffer,112,42),3));const c=(0,h.vt)(),u=(0,h.vt)(),f=(0,h.vt)(),l=(0,h.vt)(),d=(0,h.vt)(),m=(0,h.vt)(),_=(0,h.vt)();switch(S(s,t,_,c,u,f,l,d,m,o)){case 1:return void D(p,x,n);case 2:return void J(t,l,n)}N(t,_,c,u,f,l,d,m,o),tt(t,o.b0,o.b1,o.b2,G,U);const M=(0,h.vt)();ft(M,U,G),o.quality=ht(M),o.quality<i?it(o.b0,o.b1,o.b2,G,U,M,n):D(p,x,n)}(t,n),n}const qt=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],At=(()=>{const t=new Int8Array(162);let n=0;const e=e=>{for(let r=0;r<e.length;r++)t[n+r]=e[r];n+=6};return e([6,2,3,1,5,4]),e([0,2,3,1,5,4]),e([0,2,3,7,5,4]),e([0,1,3,2,6,4]),e([0,1,3,2,0,0]),e([0,1,5,7,3,2]),e([0,1,3,7,6,4]),e([0,1,3,7,6,2]),e([0,1,5,7,6,2]),e([0,1,5,4,6,2]),e([0,1,5,4,0,0]),e([0,1,3,7,5,4]),e([0,2,6,4,0,0]),e([0,0,0,0,0,0]),e([1,3,7,5,0,0]),e([2,3,7,6,4,0]),e([2,3,7,6,0,0]),e([2,3,1,5,7,6]),e([0,1,5,7,6,2]),e([0,1,5,7,6,4]),e([0,1,3,7,6,4]),e([4,5,7,6,2,0]),e([4,5,7,6,0,0]),e([4,5,1,3,7,6]),e([0,2,3,7,5,4]),e([6,2,3,7,5,4]),e([6,2,3,1,5,4]),t})();function zt(t,n,e,r,a){const s=t.getQuaternion(Pt);a.quaternion=s,(0,i.Xr)(jt,s);const o=t.getCenter(Nt),u=t.getHalfSize(Tt);if(1===r){(0,c.gL)(Et,o,jt),(0,c.tn)(Rt,Et),(0,c.jk)(Xt,Rt,u),(0,c.jb)(Xt,Rt,Xt);const r=(0,c.Bw)(Xt);(0,c.WQ)(Xt,Rt,u);const s=(0,c.Bw)(Xt);if(r<e)a.center=o,(0,c.hZ)(Et,e,e,e),a.halfSize=(0,c.WQ)(Et,u,Et);else{const i=s>0?1+n/s:1,o=r>0?1+e/r:1,h=(o+i)/2,f=(o-i)/2;(0,c.hs)(Xt,Rt,f),a.halfSize=(0,c.Ln)(Xt,Xt,u,h),(0,c.hs)(Xt,Rt,h),(0,c.Ln)(Xt,Xt,u,f),(0,c._S)(Et,Et),(0,c.lw)(Et,Xt,Et);const l=t.getQuaternion(wt);a.center=(0,c.gL)(Et,Et,l)}}else{a.center=(0,c.Ln)(Et,o,h.Cb,(e+n)/2);const t=(0,c.gL)(Et,h.Cb,jt);(0,c.tn)(t,t),a.halfSize=(0,c.Ln)(Rt,u,t,(e-n)/2)}return a}function yt(t,n,e,a,s){const i=n.getQuaternion(Pt),o=(0,r.I0)(Zt,i),c=n.getHalfSize(Tt);for(let t=0;t<8;++t){for(let n=0;n<3;++n)Qt[n]=c[n]*(t&1<<n?-1:1);for(let n=0;n<3;++n){let r=e[n];for(let t=0;t<3;++t)r+=Qt[t]*o[3*t+n];Ot[3*t+n]=r}}(0,_.projectBuffer)(Ot,t,0,Ot,a,0,8),It(Ct,s)}const Ot=new Array(24),Ct=new P.K(Ot,3),Qt=(0,h.vt)(),Nt=(0,h.vt)(),Vt=(0,h.vt)(),Tt=(0,h.vt)(),Zt=(0,a.vt)(),Lt=(0,s.vt)(),Ft=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Bt=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],Et=(0,h.vt)(),Rt=(0,h.vt)(),Xt=(0,h.vt)(),Yt=(0,h.CN)(-1,-1,-1),Wt=(0,h.vt)(),Dt=[0,0,0]},46610(t,n,e){e.d(n,{K:()=>r,n:()=>a});class r{constructor(t,n,e=n){this.data=t,this.size=n,this.stride=e}}class a extends r{constructor(t,n,e,r=!1,a=e){super(t,e,a),this.indices=n,this.exclusive=r}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,8377],{61691(e,t,n){n.d(t,{G:()=>o});class o{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,n){n.d(t,{S:()=>r});var o=n(61691);class r extends o.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},4144(e,t,n){n.d(t,{Hh:()=>c,fz:()=>a,g7:()=>l,s1:()=>s,zo:()=>u});var o=n(76061),r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function c(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(9192)]).then(n.bind(n,9192)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorProject,t(r.p)}}function l(e,t){return i.execute(e,t,null)}function u(e,t){const n=i.executeMany(new o.S(e),t,null);return Array.from(n)}function a(){return i.supportsCurves()}},8377(e,t,n){n.r(t),n.d(t,{execute:()=>p,executeMany:()=>d,isLoaded:()=>m,load:()=>h});var o=n(4144),r=n(17499),i=n(60408);let s,c,l,u,a,f;function m(){return!!s&&(0,o.s1)()}async function h(){if(!m()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(7992)]).then(n.bind(n,83299)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6129)]).then(n.bind(n,86129)),(0,o.Hh)()]);s=e.fromGeometries,c=e.fromGeometry,l=e.fromSpatialReference,u=e.toGeometry,a=e.getSpatialReference,f=t.createProjectionTransformation}}function p(e,t,n){const s=c(e),a=l(t),m=f(s.getSpatialReference(),a,n),h=u((0,o.g7)(s.getGeometry(),m),a);return!n?.zConversionDisabled&&h&&!(0,i.uW)(h)&&e.spatialReference&&(0,r.gw)([h],e.spatialReference,t),h}function d(e,t,n){const[i,c]=s(e),m=l(t),h=f(c,m,n),p=(0,o.zo)(i,h).map(e=>u(e,m));if(!n?.zConversionDisabled&&p){const n=a(e);n&&(0,r.gw)(p,n,t)}return p}},17499(e,t,n){n.d(t,{gw:()=>s});var o=n(49186),r=n(60408),i=n(62815);function s(e,t,n){let o;for(const s of e)if(s&&(0,r.Pv)(s)&&!("vertexAttributes"in s)){if(!o){null==t.vcsWkid&&null==n.vcsWkid||l(t,n);const e="type"in s?s.type:(0,r.$B)(s);if(o=(0,i.N)(e,t,n),!o)return}o(s)}}class c extends o.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new c}},62815(e,t,n){n.d(t,{N:()=>c,d:()=>l});var o=n(86211),r=n(73941),i=n(21325),s=n(52006);function c(e,t,n){const o=l(t,n);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const n of e.curvePaths)for(const e of n){const n=(0,s.yP)(e);n.length>2&&(n[2]*=t)}if(e.paths)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const n of e.curveRings)for(const e of n){const n=(0,s.yP)(e);n.length>2&&(n[2]*=t)}if(e.rings)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}function l(e,t){return null==e||null==t||(e.vcsWkid??null)!==(t.vcsWkid??null)||(0,i.aI)(e,t)||(0,r.xP)(e)||(0,r.xP)(t)?1:(0,o.G9)(e)/(0,o.G9)(t)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,8377],{61691(e,t,n){n.d(t,{G:()=>o});class o{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,n){n.d(t,{S:()=>r});var o=n(61691);class r extends o.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},4144(e,t,n){n.d(t,{Hh:()=>c,fz:()=>a,g7:()=>l,s1:()=>s,zo:()=>u});var o=n(76061),r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function c(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(9192)]).then(n.bind(n,9192)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorProject,t(r.p)}}function l(e,t){return i.execute(e,t,null)}function u(e,t){const n=i.executeMany(new o.S(e),t,null);return Array.from(n)}function a(){return i.supportsCurves()}},8377(e,t,n){n.r(t),n.d(t,{execute:()=>p,executeMany:()=>d,isLoaded:()=>m,load:()=>h});var o=n(4144),r=n(17499),i=n(60408);let s,c,l,u,a,f;function m(){return!!s&&(0,o.s1)()}async function h(){if(!m()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(5611)]).then(n.bind(n,83299)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6129)]).then(n.bind(n,86129)),(0,o.Hh)()]);s=e.fromGeometries,c=e.fromGeometry,l=e.fromSpatialReference,u=e.toGeometry,a=e.getSpatialReference,f=t.createProjectionTransformation}}function p(e,t,n){const s=c(e),a=l(t),m=f(s.getSpatialReference(),a,n),h=u((0,o.g7)(s.getGeometry(),m),a);return!n?.zConversionDisabled&&h&&!(0,i.uW)(h)&&e.spatialReference&&(0,r.gw)([h],e.spatialReference,t),h}function d(e,t,n){const[i,c]=s(e),m=l(t),h=f(c,m,n),p=(0,o.zo)(i,h).map(e=>u(e,m));if(!n?.zConversionDisabled&&p){const n=a(e);n&&(0,r.gw)(p,n,t)}return p}},17499(e,t,n){n.d(t,{gw:()=>s});var o=n(49186),r=n(60408),i=n(62815);function s(e,t,n){let o;for(const s of e)if(s&&(0,r.Pv)(s)&&!("vertexAttributes"in s)){if(!o){null==t.vcsWkid&&null==n.vcsWkid||l(t,n);const e="type"in s?s.type:(0,r.$B)(s);if(o=(0,i.N)(e,t,n),!o)return}o(s)}}class c extends o.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new c}},62815(e,t,n){n.d(t,{N:()=>c,d:()=>l});var o=n(86211),r=n(73941),i=n(21325),s=n(52006);function c(e,t,n){const o=l(t,n);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const n of e.curvePaths)for(const e of n){const n=(0,s.yP)(e);n.length>2&&(n[2]*=t)}if(e.paths)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const n of e.curveRings)for(const e of n){const n=(0,s.yP)(e);n.length>2&&(n[2]*=t)}if(e.rings)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}function l(e,t){return null==e||null==t||(e.vcsWkid??null)!==(t.vcsWkid??null)||(0,i.aI)(e,t)||(0,r.xP)(e)||(0,r.xP)(t)?1:(0,o.G9)(e)/(0,o.G9)(t)}}}]);