@arcgis/core 5.2.0-next.74 → 5.2.0-next.76

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 (489) hide show
  1. package/arcgisGlobal.d.ts +1 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/013c9cc198736a72f7f2.js +1 -0
  4. package/assets/esri/core/workers/chunks/0194244a3f437ad74045.js +1 -0
  5. package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +1 -0
  6. package/assets/esri/core/workers/chunks/{4dcd4a052b40047a9230.js → 08cac27df6c216ae1995.js} +1 -1
  7. package/assets/esri/core/workers/chunks/08ec5461af74356e7570.js +1 -0
  8. package/assets/esri/core/workers/chunks/0909816f13d25cacf250.js +1 -0
  9. package/assets/esri/core/workers/chunks/0933203eee15ea50e123.js +1 -0
  10. package/assets/esri/core/workers/chunks/0d9fe49812554e7d7ba7.js +1 -0
  11. package/assets/esri/core/workers/chunks/{0e81c6d4f1c81f9b0a1b.js → 1142f8e9c80207d6bdae.js} +1 -1
  12. package/assets/esri/core/workers/chunks/16929524565a677db4dc.js +1 -0
  13. package/assets/esri/core/workers/chunks/16a04fc184728d66e6e1.js +1 -0
  14. package/assets/esri/core/workers/chunks/177c3b23c1cbd4737049.js +1 -0
  15. package/assets/esri/core/workers/chunks/18e0e993c0c39c962e61.js +1 -0
  16. package/assets/esri/core/workers/chunks/1a467da4c0b33f655199.js +1 -0
  17. package/assets/esri/core/workers/chunks/1ef28d4457c8c943ad19.js +1 -0
  18. package/assets/esri/core/workers/chunks/20b54e7872d967f3be32.js +1 -0
  19. package/assets/esri/core/workers/chunks/{5f31b375971ab067121e.js → 21f763694a41968ac21a.js} +1 -1
  20. package/assets/esri/core/workers/chunks/230925079cee040a8d77.js +1 -0
  21. package/assets/esri/core/workers/chunks/2501d9459f6d14c797e5.js +1 -0
  22. package/assets/esri/core/workers/chunks/257f1e8316877f611e11.js +1 -0
  23. package/assets/esri/core/workers/chunks/270ed3070d118edb3f37.js +1 -0
  24. package/assets/esri/core/workers/chunks/2740f755c3a322cbd477.js +1 -0
  25. package/assets/esri/core/workers/chunks/2e7c830b5b1fe406169f.js +1 -0
  26. package/assets/esri/core/workers/chunks/2f4ed8a63d57636a4ebe.js +1 -0
  27. package/assets/esri/core/workers/chunks/{31d19bb72a9e79b30070.js → 30818b5ff0ce51b25d6f.js} +1 -1
  28. package/assets/esri/core/workers/chunks/315031323e11a18154e3.js +1 -0
  29. package/assets/esri/core/workers/chunks/393f79843d5a78c1cc37.js +1 -0
  30. package/assets/esri/core/workers/chunks/3b5c5356353f1a2303a0.js +1 -0
  31. package/assets/esri/core/workers/chunks/3c28e2040cb4fb716eaa.js +1 -0
  32. package/assets/esri/core/workers/chunks/{99e3aa4832ed87474ab4.js → 44857a76be2c0ac65bb9.js} +1 -1
  33. package/assets/esri/core/workers/chunks/44a786aba84918f2b247.js +1 -0
  34. package/assets/esri/core/workers/chunks/{3e2b4e734aa20a308f3e.js → 46e56fac44e0fd26ba1d.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{4491dc227c28e2ab4f8e.js → 484b251fbcbffcb58323.js} +1 -1
  36. package/assets/esri/core/workers/chunks/48e2d0bfb62e1f4f2ad9.js +1 -0
  37. package/assets/esri/core/workers/chunks/4945d6b0ca1812864185.js +1 -0
  38. package/assets/esri/core/workers/chunks/{7f2f2a92dce3f68e579b.js → 4b54444c04fbd6f42c18.js} +1 -1
  39. package/assets/esri/core/workers/chunks/4c82f5f23004f905a18f.js +1 -0
  40. package/assets/esri/core/workers/chunks/4d7a3b3aaf876da0891b.js +1 -0
  41. package/assets/esri/core/workers/chunks/4f8ce5887102971bfa34.js +2 -0
  42. package/assets/esri/core/workers/chunks/50b08415e072a49bc572.js +1 -0
  43. package/assets/esri/core/workers/chunks/{186bedc377cc97731ca2.js → 532e3a59888e4cc13bd3.js} +2 -2
  44. package/assets/esri/core/workers/chunks/53eed0941a39b56cc034.js +1 -0
  45. package/assets/esri/core/workers/chunks/{1a3afee3ecd806b4aa81.js → 552d6aecc7d88d16227b.js} +1 -1
  46. package/assets/esri/core/workers/chunks/56e6d8c4a9ed893ce951.js +1 -0
  47. package/assets/esri/core/workers/chunks/57159bcac86d660dcceb.js +1 -0
  48. package/assets/esri/core/workers/chunks/58026fc30d8a0ded4102.js +1 -0
  49. package/assets/esri/core/workers/chunks/59598023c0aea62a6297.js +1 -0
  50. package/assets/esri/core/workers/chunks/5bf2ce280ea35ea4c96b.js +1 -0
  51. package/assets/esri/core/workers/chunks/5fd2aa0be03dfb494efa.js +1 -0
  52. package/assets/esri/core/workers/chunks/619aa1381296172ff47b.js +1 -0
  53. package/assets/esri/core/workers/chunks/62f37d1075390a177ae9.js +1 -0
  54. package/assets/esri/core/workers/chunks/{2baa16ec8559e77c226f.js → 64a1ffc221e5b63b43fb.js} +1 -1
  55. package/assets/esri/core/workers/chunks/65d1e338612e59063eba.js +1 -0
  56. package/assets/esri/core/workers/chunks/680dd7b7638465eb33de.js +1 -0
  57. package/assets/esri/core/workers/chunks/69b0dcd7bcd8ec42e2c3.js +1 -0
  58. package/assets/esri/core/workers/chunks/6c740c411b085d2d08c4.js +1 -0
  59. package/assets/esri/core/workers/chunks/6c982779d6d47ec99899.js +1 -0
  60. package/assets/esri/core/workers/chunks/6dddd3df31961b9fda12.js +1 -0
  61. package/assets/esri/core/workers/chunks/{1ca04ecf010e68863014.js → 6e45ecf359bce3417f5d.js} +1 -1
  62. package/assets/esri/core/workers/chunks/702b2381acf4d1f90094.js +1 -0
  63. package/assets/esri/core/workers/chunks/{a52c88e2d837b525ff6c.js → 71ee7c51d2c60a180f1e.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{ad1d06a91121ebfe9162.js → 755b2d883fba90c4e688.js} +2 -2
  65. package/assets/esri/core/workers/chunks/75fc0b1db8e2e3fd2458.js +1 -0
  66. package/assets/esri/core/workers/chunks/{9e25f715cda59c686a4c.js → 792303e4090c0c70c4ff.js} +1 -1
  67. package/assets/esri/core/workers/chunks/79429c8be5da85713200.js +1 -0
  68. package/assets/esri/core/workers/chunks/7b470d6ad182548b9e95.js +1 -0
  69. package/assets/esri/core/workers/chunks/7d8eb4dbea1916320f74.js +1 -0
  70. package/assets/esri/core/workers/chunks/83e54166ba634ec2bd89.js +1717 -0
  71. package/assets/esri/core/workers/chunks/841c81c280114412c95b.js +1 -0
  72. package/assets/esri/core/workers/chunks/87eaed6fdabd482d142e.js +1 -0
  73. package/assets/esri/core/workers/chunks/88d5541679e77117bf03.js +1 -0
  74. package/assets/esri/core/workers/chunks/894ebc64b698e5d7604b.js +1 -0
  75. package/assets/esri/core/workers/chunks/8a36b999cbd65dd2f16c.js +1 -0
  76. package/assets/esri/core/workers/chunks/8ae3a6ddc87bf8315583.js +1 -0
  77. package/assets/esri/core/workers/chunks/{67f54586156d1ab80257.js → 8b980c6b92cc4ea68ede.js} +1 -1
  78. package/assets/esri/core/workers/chunks/8d9a7fa14489897780d3.js +1 -0
  79. package/assets/esri/core/workers/chunks/8e225dd0319672103561.js +1 -0
  80. package/assets/esri/core/workers/chunks/9199300ffd225a1bbef1.js +1 -0
  81. package/assets/esri/core/workers/chunks/94b9a61b4dbb83425a78.js +1 -0
  82. package/assets/esri/core/workers/chunks/98613fded899c59f34a4.js +1 -0
  83. package/assets/esri/core/workers/chunks/{9ca59077712e45ef4d56.js → 9c3e6325dc60bcaf44d7.js} +1 -1
  84. package/assets/esri/core/workers/chunks/9e1392a0c608a13ab036.js +1 -0
  85. package/assets/esri/core/workers/chunks/9e2e4d197a7a57c2a691.js +1 -0
  86. package/assets/esri/core/workers/chunks/{d03e7be74c57c3dbf003.js → a014c17fc210620da738.js} +2 -2
  87. package/assets/esri/core/workers/chunks/{8302bffd28cc6720e0fe.js → a19be304219808268039.js} +2 -2
  88. package/assets/esri/core/workers/chunks/{bd311c85437743cf7d2f.js → a4e4fa4dd1a122bbf7cd.js} +1 -1
  89. package/assets/esri/core/workers/chunks/a5240c8a47842138f31f.js +1 -0
  90. package/assets/esri/core/workers/chunks/a69c10bfd632a5546b34.js +1 -0
  91. package/assets/esri/core/workers/chunks/{b6d26d9738c0787acc38.js → a6a2a4a2bae0d327d7ed.js} +1 -1
  92. package/assets/esri/core/workers/chunks/a7727a2377470d586ff9.js +1 -0
  93. package/assets/esri/core/workers/chunks/a91c1d782346a9c7e1ef.js +1 -0
  94. package/assets/esri/core/workers/chunks/{6cd6d0cfd313f0475d98.js → ac59218847e5ef4c4160.js} +1 -1
  95. package/assets/esri/core/workers/chunks/ac87be2210f868524996.js +1 -0
  96. package/assets/esri/core/workers/chunks/aed16c3e26652960ad3f.js +1 -0
  97. package/assets/esri/core/workers/chunks/b084829a3fd709dc47a8.js +1 -0
  98. package/assets/esri/core/workers/chunks/{05f6887805d92da03122.js → b24fc7eeda580ef020d2.js} +1 -1
  99. package/assets/esri/core/workers/chunks/b37a20c5c4a4686257d4.js +1 -0
  100. package/assets/esri/core/workers/chunks/{a0a1f0bd3648738354a6.js → b4abf82b8ac974a55ae1.js} +1 -1
  101. package/assets/esri/core/workers/chunks/b950ddafba8125c84a5b.js +1 -0
  102. package/assets/esri/core/workers/chunks/b9d1bb106737a05290e1.js +1 -0
  103. package/assets/esri/core/workers/chunks/bab5f4b2424b487b87ac.js +1 -0
  104. package/assets/esri/core/workers/chunks/bad2c7219e95750906e1.js +1 -0
  105. package/assets/esri/core/workers/chunks/bbc6b270d2032189107c.js +1 -0
  106. package/assets/esri/core/workers/chunks/{faa55265020591fd2224.js → bc0395777c5c1adb1ddb.js} +1 -1
  107. package/assets/esri/core/workers/chunks/bc6e488f5fbd50f9f3d0.js +1 -0
  108. package/assets/esri/core/workers/chunks/bd7d87d175ba933ab2ce.js +1 -0
  109. package/assets/esri/core/workers/chunks/{859dd86c921053bf03a1.js → c17dda6fadb8bfad0d51.js} +1 -1
  110. package/assets/esri/core/workers/chunks/c1e5ffe9a251be5a0744.js +1 -0
  111. package/assets/esri/core/workers/chunks/{94368a097e6190ce3c7a.js → c37b28f200b704ae6002.js} +1 -1
  112. package/assets/esri/core/workers/chunks/ca6652c6304ad0e37e8f.js +1 -0
  113. package/assets/esri/core/workers/chunks/{762be5d3e6aeaea33f74.js → cef02ed3942c010da2e8.js} +1 -1
  114. package/assets/esri/core/workers/chunks/cff6390b863361eaeeed.js +1 -0
  115. package/assets/esri/core/workers/chunks/d2172583ee6e481a66aa.js +1 -0
  116. package/assets/esri/core/workers/chunks/d520d407043bc52e5410.js +1 -0
  117. package/assets/esri/core/workers/chunks/da0ef984509057ec8507.js +1 -0
  118. package/assets/esri/core/workers/chunks/dbdd96e558936955acdb.js +1 -0
  119. package/assets/esri/core/workers/chunks/ddd8f6154e265dbb6f9f.js +1 -0
  120. package/assets/esri/core/workers/chunks/de601f0d5a2a282d2efd.js +1 -0
  121. package/assets/esri/core/workers/chunks/de927b1460bc384f5b87.js +1 -0
  122. package/assets/esri/core/workers/chunks/de9a1cce70581920f248.js +1 -0
  123. package/assets/esri/core/workers/chunks/dff932682d6386a861ce.js +1 -0
  124. package/assets/esri/core/workers/chunks/{2c31648a4b95275516ee.js → e227eb44cd139fe2bc1b.js} +1 -1
  125. package/assets/esri/core/workers/chunks/e4e5a171a4874c5af4a4.js +1 -0
  126. package/assets/esri/core/workers/chunks/{fdca9873914b9dbd9244.js → e59101f1d060d0a30a65.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{ddb92c815d17c67a45e6.js → e5d114f2b57d2b8e2f1c.js} +1 -1
  128. package/assets/esri/core/workers/chunks/e89e6eea380ca2c13b64.js +1 -0
  129. package/assets/esri/core/workers/chunks/e9d352d030dcad1619a6.js +1 -0
  130. package/assets/esri/core/workers/chunks/{3de6e54b6ed0feae1940.js → eae51e827f629ab37207.js} +1 -1
  131. package/assets/esri/core/workers/chunks/eee1fd629619021ea279.js +1 -0
  132. package/assets/esri/core/workers/chunks/ef47a5da641cb0d33fdf.js +1 -0
  133. package/assets/esri/core/workers/chunks/f35e749bb5be39880cbe.js +1 -0
  134. package/assets/esri/core/workers/chunks/{3dff36f6de181d9dcdc5.js → f40e4433e7608d0962a6.js} +1 -1
  135. package/assets/esri/core/workers/chunks/f4aa6e90200f61e623e5.js +1 -0
  136. package/assets/esri/core/workers/chunks/ff578f0ca68d652fece5.js +1 -0
  137. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  138. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  139. package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
  140. package/chunks/GaussianSplat.glsl.js +8 -8
  141. package/chunks/GaussianSplatShadow.glsl.js +4 -5
  142. package/chunks/HeatmapDensity.glsl.js +5 -5
  143. package/chunks/OccludedGeometryDepth.glsl.js +5 -0
  144. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  145. package/chunks/bundle2.js +1 -1
  146. package/chunks/lyr3DMain.js +1 -1
  147. package/chunks/lyr3DWorker.js +1 -1
  148. package/config.js +1 -1
  149. package/core/importUtils.js +2 -0
  150. package/geometry/geometryEngine.js +1 -1
  151. package/geometry/operators/importUtils.js +2 -0
  152. package/geometry/support/centroid.js +1 -1
  153. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  154. package/geometry/support/extentUtils.js +1 -1
  155. package/geometry/support/frustum.js +1 -1
  156. package/geometry/support/normalizeUtils.d.ts +17 -15
  157. package/geometry/support/normalizeUtils.js +1 -1
  158. package/kernel.js +1 -1
  159. package/layers/FeatureLayer.d.ts +1 -1
  160. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  161. package/layers/graphics/data/QueryEngine.js +1 -1
  162. package/layers/graphics/data/QueryEngineResult.js +1 -1
  163. package/layers/graphics/data/projectionSupport.js +1 -1
  164. package/layers/graphics/data/queryUtils.js +1 -1
  165. package/layers/graphics/hydratedFeatures.js +1 -1
  166. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  167. package/package.json +2 -2
  168. package/portal/schemas/definitions.js +1 -1
  169. package/rest/geoprocessor/utils.js +1 -1
  170. package/rest/identify.js +1 -1
  171. package/rest/imageService.js +1 -1
  172. package/rest/query/operations/query.js +1 -1
  173. package/rest/query/operations/queryAttributeBins.js +1 -1
  174. package/rest/query/operations/queryPivot.js +1 -1
  175. package/rest/query/operations/queryTopFeatures.js +1 -1
  176. package/support/revision.js +1 -1
  177. package/symbols/cim/CIMEffects.js +1 -1
  178. package/symbols/cim/animationUtils.js +1 -1
  179. package/symbols/cim/cimAnalyzer.js +1 -1
  180. package/symbols/cim/effects/EffectCircularSector.js +1 -1
  181. package/symbols/cim/utils.js +1 -1
  182. package/views/2d/engine/BitmapTile.js +1 -1
  183. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  184. package/views/2d/engine/flow/styles/Particles.js +1 -1
  185. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  186. package/views/2d/engine/imagery/RasterTile.js +1 -1
  187. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  188. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  189. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  190. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  191. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  192. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  193. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  194. package/views/2d/engine/webgl/Painter.js +1 -1
  195. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  196. package/views/2d/engine/webgl/TileContainer.js +1 -1
  197. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  198. package/views/2d/engine/webgl/animations/infos.js +1 -1
  199. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  200. package/views/2d/engine/webgl/normalizedTileUtils.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  202. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  203. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  213. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  216. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
  217. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  218. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  219. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  220. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  221. package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +1 -1
  222. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  223. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  224. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  225. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  226. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  227. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  228. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  229. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  230. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  231. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  232. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  233. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  234. package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
  235. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  236. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
  237. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  238. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  239. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  240. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
  241. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  242. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  243. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  244. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  245. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
  246. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  247. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/Tile.js +1 -1
  248. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
  249. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileInfo.js +1 -1
  250. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +1 -1
  251. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
  252. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  253. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  254. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/MagDirShader.js +1 -1
  255. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.js +1 -1
  256. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +1 -1
  257. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +1 -1
  258. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +1 -1
  259. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +1 -1
  260. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +1 -1
  261. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +1 -1
  262. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +1 -1
  263. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  264. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  265. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  266. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
  267. package/views/2d/engine/webgl/shaderGraph/techniques/utility/DebugOverlayTechnique.js +1 -1
  268. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  269. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  270. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  271. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  272. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  273. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  274. package/views/2d/engine/webgl/shaderGraph/types.js +2 -0
  275. package/views/2d/engine/webgl/shaderGraph/uniformBufferUtils.js +2 -0
  276. package/views/2d/layers/MediaLayerView2D.js +1 -1
  277. package/views/2d/layers/TileLayerView2D.js +1 -1
  278. package/views/2d/layers/support/DisplayGL.js +1 -1
  279. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  280. package/views/2d/viewpointUtils.js +1 -1
  281. package/views/3d/environment/EnvironmentManager.js +1 -1
  282. package/views/3d/interactive/Manipulator3D.js +1 -1
  283. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  284. package/views/3d/interactive/manipulatorUtils.js +1 -1
  285. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  286. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  287. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  288. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  289. package/views/3d/layers/MediaLayerView3D.js +1 -1
  290. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  291. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  292. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  293. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  294. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  295. package/views/3d/support/flow/geometryUtils.js +1 -1
  296. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  297. package/views/3d/support/hitTest.js +1 -1
  298. package/views/3d/support/renderInfoUtils/line.js +1 -1
  299. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  300. package/views/3d/terrain/DrapedZ.js +2 -0
  301. package/views/3d/terrain/OverlayRenderer.js +1 -1
  302. package/views/3d/terrain/TileCompositor.js +1 -1
  303. package/views/3d/webgl/RenderCamera.js +1 -1
  304. package/views/3d/webgl/RenderNode.js +1 -1
  305. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +2 -2
  306. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +2 -2
  307. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +8 -3
  308. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
  309. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +2 -0
  310. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +2 -0
  311. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechnique.js +2 -0
  312. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechniqueConfiguration.js +2 -0
  313. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClear.glsl.js +2 -0
  314. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClearTechnique.js +2 -0
  315. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastMaskTechnique.js +2 -0
  316. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastRenderer.js +2 -0
  317. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualize.glsl.js +2 -0
  318. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechnique.js +2 -0
  319. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechniqueConfiguration.js +2 -0
  320. package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
  321. package/views/3d/webgl-engine/lib/PositionReader.js +1 -1
  322. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  323. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  324. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
  325. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  326. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  327. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  328. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  329. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  330. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  331. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  332. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +28 -21
  333. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
  334. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  335. package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +2 -0
  336. package/views/3d/webgl-engine/shaders/OccludedGeometryDepthTechnique.js +2 -0
  337. package/views/VideoView.js +1 -1
  338. package/views/selection/SelectionOperation.js +1 -1
  339. package/views/webgl/RenderingContext.js +1 -1
  340. package/views/webgl/UniformBufferLayout.js +1 -1
  341. package/views/webgl/UniformBufferObject.js +1 -1
  342. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +20 -6
  343. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  344. package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.d.ts +100 -0
  345. package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.js +2 -0
  346. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  347. package/widgets/BatchAttributeForm/inputs/support/multipleChoiceInputUtils.js +1 -1
  348. package/widgets/BatchAttributeForm.js +1 -1
  349. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  350. package/widgets/OrientedImageryViewer.js +1 -1
  351. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  352. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  353. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  354. package/widgets/support/SelectionList/GroupLayerItem.d.ts +8 -1
  355. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  356. package/widgets/support/SelectionList/LayerItem.d.ts +8 -1
  357. package/widgets/support/SelectionList/LayerItem.js +1 -1
  358. package/widgets/support/SelectionList/SelectionListViewModel.d.ts +29 -1
  359. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  360. package/widgets/support/SelectionList.js +1 -1
  361. package/widgets/support/SelectionToolbar.js +1 -1
  362. package/assets/esri/core/workers/chunks/01c92e68fb17cf2d0e08.js +0 -1
  363. package/assets/esri/core/workers/chunks/02dd79beb13eff6be85e.js +0 -1
  364. package/assets/esri/core/workers/chunks/0823961e5d0bdedbf8cf.js +0 -2
  365. package/assets/esri/core/workers/chunks/0aedeb837399d3f92e4a.js +0 -1
  366. package/assets/esri/core/workers/chunks/0bf644f93c180a2bc2f8.js +0 -705
  367. package/assets/esri/core/workers/chunks/0dbf31a663b5220a3136.js +0 -1
  368. package/assets/esri/core/workers/chunks/0df660dfd941cff3ea1d.js +0 -1
  369. package/assets/esri/core/workers/chunks/1119a33245138e7b3914.js +0 -1
  370. package/assets/esri/core/workers/chunks/1418c03c4ab87f7ab5f4.js +0 -1
  371. package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +0 -1
  372. package/assets/esri/core/workers/chunks/193aed69de2dec4f36b6.js +0 -1
  373. package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +0 -1
  374. package/assets/esri/core/workers/chunks/264fd750691d517ab1f3.js +0 -1
  375. package/assets/esri/core/workers/chunks/2791f3fe16ca5ee2f39a.js +0 -1
  376. package/assets/esri/core/workers/chunks/2a2ed7bd44010f24c2dd.js +0 -1
  377. package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +0 -1
  378. package/assets/esri/core/workers/chunks/2d45daacec0d5ed38782.js +0 -1
  379. package/assets/esri/core/workers/chunks/2e44978ee677aa23163d.js +0 -256
  380. package/assets/esri/core/workers/chunks/2ea3ca68cfa4d34e8f3b.js +0 -1
  381. package/assets/esri/core/workers/chunks/2f81047790c4890ae625.js +0 -1
  382. package/assets/esri/core/workers/chunks/32f5112c848efec6c33b.js +0 -1
  383. package/assets/esri/core/workers/chunks/35fd2f765d2cb3f59a22.js +0 -1462
  384. package/assets/esri/core/workers/chunks/3bc2943035391b44d4cf.js +0 -29
  385. package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +0 -1
  386. package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +0 -1
  387. package/assets/esri/core/workers/chunks/45ccca01db0027b9dc16.js +0 -1
  388. package/assets/esri/core/workers/chunks/4710f21b138a2c9a0345.js +0 -1
  389. package/assets/esri/core/workers/chunks/4abd54518e35050feb90.js +0 -1
  390. package/assets/esri/core/workers/chunks/4b5bd0c9a55ea2998601.js +0 -1
  391. package/assets/esri/core/workers/chunks/4c2794687aea172775a0.js +0 -1
  392. package/assets/esri/core/workers/chunks/4cf2b0558a4acc141429.js +0 -1
  393. package/assets/esri/core/workers/chunks/4d9bde9f66817a92ceca.js +0 -1
  394. package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +0 -1
  395. package/assets/esri/core/workers/chunks/509aecafbc629bee1c15.js +0 -1
  396. package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +0 -1
  397. package/assets/esri/core/workers/chunks/553be2bd69bd311477ea.js +0 -1
  398. package/assets/esri/core/workers/chunks/5600fc334d20c4f0c83d.js +0 -1
  399. package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +0 -1
  400. package/assets/esri/core/workers/chunks/5bf4ab72b9634b06cc5d.js +0 -1
  401. package/assets/esri/core/workers/chunks/5e3d5347223f0111f40f.js +0 -1
  402. package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +0 -1
  403. package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +0 -1
  404. package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +0 -1
  405. package/assets/esri/core/workers/chunks/64176f7ae719289a2f79.js +0 -1
  406. package/assets/esri/core/workers/chunks/6f58cb9dffe8016397a2.js +0 -1
  407. package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +0 -1
  408. package/assets/esri/core/workers/chunks/76b573143d1a65fdbcb6.js +0 -1
  409. package/assets/esri/core/workers/chunks/7aaa051b51a8e34bbfb0.js +0 -1
  410. package/assets/esri/core/workers/chunks/7b5b66ae79e0287e3ade.js +0 -1
  411. package/assets/esri/core/workers/chunks/7e373d9c98ce910db9d2.js +0 -1
  412. package/assets/esri/core/workers/chunks/7f91e45156bbe88f9a62.js +0 -1
  413. package/assets/esri/core/workers/chunks/86a4057572755b403548.js +0 -1
  414. package/assets/esri/core/workers/chunks/877594b6db08da98acd7.js +0 -1
  415. package/assets/esri/core/workers/chunks/8a48a6760c33ed50b650.js +0 -1
  416. package/assets/esri/core/workers/chunks/8d21e2dabc5165f1c8ca.js +0 -1
  417. package/assets/esri/core/workers/chunks/903e1cd8b76eff19ebdf.js +0 -1
  418. package/assets/esri/core/workers/chunks/917c11cb40a7742d7f98.js +0 -1
  419. package/assets/esri/core/workers/chunks/91d133c04ca764d74934.js +0 -1
  420. package/assets/esri/core/workers/chunks/92c4464b67fce6cea134.js +0 -1
  421. package/assets/esri/core/workers/chunks/947f1ea4dbc3e3419ecc.js +0 -1
  422. package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +0 -1
  423. package/assets/esri/core/workers/chunks/96cec8a02ca96175d602.js +0 -1
  424. package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +0 -1
  425. package/assets/esri/core/workers/chunks/9902fcd2070c8eb6d043.js +0 -1
  426. package/assets/esri/core/workers/chunks/9b76c8974424a1908e86.js +0 -1
  427. package/assets/esri/core/workers/chunks/9be6827e5756031a56c1.js +0 -1
  428. package/assets/esri/core/workers/chunks/a101152066dd56259619.js +0 -1
  429. package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +0 -1
  430. package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +0 -1
  431. package/assets/esri/core/workers/chunks/a2a2c7e274fb32fecffa.js +0 -1
  432. package/assets/esri/core/workers/chunks/a3bf8aa81ee398da5b52.js +0 -1
  433. package/assets/esri/core/workers/chunks/a9053ad0f4e8c4705665.js +0 -1
  434. package/assets/esri/core/workers/chunks/afeeb11b39e140303b5a.js +0 -1
  435. package/assets/esri/core/workers/chunks/b1a175b3b2d1a7ddde8e.js +0 -1
  436. package/assets/esri/core/workers/chunks/b33d870cbfa238762c5e.js +0 -1
  437. package/assets/esri/core/workers/chunks/b3b53cf0a3a30164d337.js +0 -1
  438. package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +0 -1
  439. package/assets/esri/core/workers/chunks/b858adff7043683fe41c.js +0 -1
  440. package/assets/esri/core/workers/chunks/b984b808d383974ca3d8.js +0 -1
  441. package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +0 -1
  442. package/assets/esri/core/workers/chunks/bff75cc7413bf0d319db.js +0 -1
  443. package/assets/esri/core/workers/chunks/c02ae1d40c1fe95ae6c5.js +0 -1
  444. package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +0 -1
  445. package/assets/esri/core/workers/chunks/c1a4d499a30f3d80567b.js +0 -1
  446. package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +0 -1
  447. package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +0 -1
  448. package/assets/esri/core/workers/chunks/c46f79d5b7712adbbd1c.js +0 -1
  449. package/assets/esri/core/workers/chunks/c53b2be005721591e29b.js +0 -1
  450. package/assets/esri/core/workers/chunks/c82ab4f0908290e70ee9.js +0 -1
  451. package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +0 -1
  452. package/assets/esri/core/workers/chunks/c873383e7dae35dc1a61.js +0 -1
  453. package/assets/esri/core/workers/chunks/cc5ec6e99aa09342c704.js +0 -1
  454. package/assets/esri/core/workers/chunks/cd892c9603710d6130a9.js +0 -1
  455. package/assets/esri/core/workers/chunks/cf360767310fb45660a8.js +0 -1
  456. package/assets/esri/core/workers/chunks/d021775cf747556660a5.js +0 -1
  457. package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +0 -1
  458. package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +0 -1
  459. package/assets/esri/core/workers/chunks/d79ce047afbc034f6008.js +0 -1
  460. package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +0 -1
  461. package/assets/esri/core/workers/chunks/dbc9249dae41096d750d.js +0 -1
  462. package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +0 -1
  463. package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +0 -1
  464. package/assets/esri/core/workers/chunks/ebfb3cdc0df15eb05d75.js +0 -1
  465. package/assets/esri/core/workers/chunks/ec1841e6e498d54012eb.js +0 -1
  466. package/assets/esri/core/workers/chunks/ed1de8b7406269e217b9.js +0 -29
  467. package/assets/esri/core/workers/chunks/f1727b4a32cb6f36a5e6.js +0 -1
  468. package/assets/esri/core/workers/chunks/f2ab8e49c7f17f488aa8.js +0 -1
  469. package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +0 -1
  470. package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +0 -1
  471. package/chunks/geometryEngineBase.js +0 -2
  472. package/geometry/geometryAdapters/json.js +0 -2
  473. package/geometry/geometryEngineJSON.js +0 -2
  474. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +0 -2
  475. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +0 -2
  476. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +0 -2
  477. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +0 -2
  478. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +0 -2
  479. package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +0 -2
  480. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +0 -2
  481. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +0 -2
  482. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +0 -2
  483. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +0 -2
  484. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +0 -2
  485. /package/assets/esri/core/workers/chunks/{0823961e5d0bdedbf8cf.js.LICENSE.txt → 4f8ce5887102971bfa34.js.LICENSE.txt} +0 -0
  486. /package/assets/esri/core/workers/chunks/{186bedc377cc97731ca2.js.LICENSE.txt → 532e3a59888e4cc13bd3.js.LICENSE.txt} +0 -0
  487. /package/assets/esri/core/workers/chunks/{ad1d06a91121ebfe9162.js.LICENSE.txt → 755b2d883fba90c4e688.js.LICENSE.txt} +0 -0
  488. /package/assets/esri/core/workers/chunks/{d03e7be74c57c3dbf003.js.LICENSE.txt → a014c17fc210620da738.js.LICENSE.txt} +0 -0
  489. /package/assets/esri/core/workers/chunks/{8302bffd28cc6720e0fe.js.LICENSE.txt → a19be304219808268039.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3825],{32488(t,e,r){r.d(e,{A:()=>k});const i=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],n=["آ","أ","إ","ا"],s=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],c=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],h=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],m=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],d=["ء","ف"],g=["غ","ي"],p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],y=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],S=10,M=11,C=12,b=18,_=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],x=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],w=[[b,b,b,b,b,b,b,b,b,6,5,6,8,5,b,b,b,b,b,b,b,b,b,b,b,b,b,b,5,5,5,6,8,4,4,M,M,M,4,4,4,4,4,S,9,S,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,b,b,b,b,b,b,5,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,9,4,M,M,M,M,4,4,4,4,0,4,4,b,4,4,M,M,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,1,C,1,C,C,1,C,C,1,C,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,M,M,7,9,7,4,4,C,C,C,C,C,C,C,C,C,C,C,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,3,3,3,3,3,3,3,3,3,3,M,3,3,7,7,7,C,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,C,C,C,C,C,C,C,3,4,C,C,C,C,C,C,7,7,C,C,4,C,C,C,C,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,C,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,C,C,C,C,C,C,C,C,C,C,C,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,C,C,C,C,C,C,C,C,C,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,b,b,b,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,M,M,M,M,M,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,b,b,b,b,b,4,4,4,4,4,b,b,b,b,b,b,2,0,4,4,2,2,2,2,2,2,S,S,4,4,4,0,2,2,2,2,2,2,2,2,2,2,S,S,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,C,1,1,1,1,1,1,1,1,1,1,S,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,C,C,C,C,C,C,C,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,M,4,4,S,S,4,4,4,4,4,M,M,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,b],[4,4,4,M,M,M,4,4,4,4,4,S,9,S,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,M,M,4,4,4,M,M,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class k{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,r){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,r){Y=[],Z=[];for(let i=0;i<r;i++)t[i]=i,e[i]=i,Y[i]=i}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,r))return t;e=this.inputFormat,r=this.outputFormat;let i=t;const a=j,h=W(e.charAt(1)),f=W(r.charAt(1)),d=(e.startsWith("I")?"L":e.charAt(0))+h,g=(r.startsWith("I")?"L":r.charAt(0))+f,p=e.charAt(2)+r.charAt(2);a.defInFormat=d,a.defOutFormat=g,a.defSwap=p;const y=I(t,d,g,p,a);let S=!1;return"R"===r.charAt(1)?S=!0:"C"!==r.charAt(1)&&"D"!==r.charAt(1)||(S="rtl"===this.checkContextual(y)),this.sourceToTarget=Y,this.targetToSource=function(t){const e=new Array(t.length);for(let r=0;r<t.length;r++)e[t[r]]=r;return e}(this.sourceToTarget),q=this.targetToSource,i=e.charAt(3)===r.charAt(3)?y:"S"===r.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const r=(e=String(e)).split("");let i=0,n=1,a=r.length;t||(i=r.length-1,n=-1,a=1);const h=function(t,e,r,i){let n=0;const a=[];let h=0;for(let f=e;f*r<i;f+=r)if(A(t[f])||N(t[f])){if("ل"===t[f]&&E(t,f+r,r,i)){t[f]=V(t[f+r],0===n?s:o),f+=r,$(t,f,r,i),a[h]=f,h++,n=0;continue}const e=t[f];1===n?t[f]=F(t,f+r,r,i)?O(t[f]):H(t[f],c):!0===F(t,f+r,r,i)?t[f]=H(t[f],u):t[f]=H(t[f],l),N(e)||(n=1),!0===G(e)&&(n=0)}else n=0;return a}(r,i,n,a);let f="";for(let e=0;e<r.length;e++)v(h,h.length,e)>-1?(X(q,e,!t,-1),Y.splice(e,1)):f+=r[e];return f}(S,y):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let r="";const i=(t=String(t)).split("");for(let s=0;s<t.length;s++){let o=!1;if(i[s]>="ﹰ"&&i[s]<"\ufeff"){const a=t.charCodeAt(s);i[s]>="ﻵ"&&i[s]<="ﻼ"?(e?(s>0&&" "===i[s-1]?r=r.slice(0,-1)+"ل":(r+="ل",o=!0),r+=n[(a-65269)/2]):(r+=n[(a-65269)/2],r+="ل",s+1<t.length&&" "===i[s+1]?s++:o=!0),o&&(X(q,s,!0,1),Y.splice(s,0,Y[s]))):r+=m[a-65136]}else r+=i[s]}return r}(y,S),this.sourceToTarget=Y,this.targetToSource=q,this.levels=Z,i}_inputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=P(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return rt.test(t)}}function I(t,e,r,i,n){const s=function(t,e,r){if(void 0===e.inFormat&&(e.inFormat=r.defInFormat),void 0===e.outFormat&&(e.outFormat=r.defOutFormat),void 0===e.swap&&(e.swap=r.defSwap),e.inFormat===e.outFormat)return e;const i=e.inFormat.slice(0,1),n=e.outFormat.slice(0,1);let s,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(s=P(t),o="ltr"===s||"rtl"===s?s.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=i+o),a.startsWith("C")&&(s=P(t),"rtl"===s?a="RTL":"ltr"===s?(s=function(t){const e=t.split("");return e.reverse(),P(e.join(""))}(t),a=s.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=n+a),e}(t,{inFormat:e,outFormat:r,swap:i},n);if(s.inFormat===s.outFormat)return t;e=s.inFormat,r=s.outFormat,i=s.swap;const o=e.slice(0,1),a=e.slice(1,4),l=r.slice(0,1),c=r.slice(1,4);if(n.inFormat=e,n.outFormat=r,n.swap=i,"L"===o&&"VLTR"===r){if("LTR"===a)return n.dir=Q,L(t,n);if("RTL"===a)return n.dir=tt,L(t,n)}if("V"===o&&"V"===l)return n.dir="RTL"===a?tt:Q,z(t,n);if("L"===o&&"VRTL"===r)return"LTR"===a?(n.dir=Q,t=L(t,n)):(n.dir=tt,t=L(t,n)),z(t);if("VLTR"===e&&"LLTR"===r)return n.dir=Q,L(t,n);if("V"===o&&"L"===l&&a!==c)return t=z(t),"RTL"===a?I(t,"LLTR","VLTR",i,n):I(t,"LRTL","VRTL",i,n);if("VRTL"===e&&"LRTL"===r)return I(t,"LRTL","VRTL",i,n);if("L"===o&&"L"===l){const e=n.swap;return n.swap=e.slice(0,1)+"N","RTL"===a?(n.dir=tt,t=L(t,n),n.swap="N"+e.slice(1,3),n.dir=Q,t=L(t,n)):(n.dir=Q,t=L(t,n),n.swap="N"+e.slice(1,3),t=I(t,"VLTR","LRTL",n.swap,n)),t}return t}function P(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function L(t,e){const r=t.split(""),i=[];return T(r,i,e),function(t,e,r){if(0!==r.hiLevel&&r.swap[0]!==r.swap[1])for(let r=0;r<t.length;r++)1===e[r]&&(t[r]=U(t[r]))}(r,i,e),D(2,r,i,e),D(1,r,i,e),Z=i,r.join("")}function T(t,e,r){const i=t.length,n=r.dir?y:p;let s=0,o=-1;const a=[],l=[];r.hiLevel=r.dir,r.lastArabic=!1,r.hasUbatAl=!1,r.hasUbatB=!1,r.hasUbatS=!1;for(let e=0;e<i;e++)a[e]=R(t[e]);for(let c=0;c<i;c++){const i=s,h=B(t,a,l,c,r);l[c]=h,s=n[i][h];const u=240&s;s&=15;const f=n[s][J];if(e[c]=f,u>0)if(16===u){for(let t=o;t<c;t++)e[t]=1;o=-1}else o=-1;if(n[s][K])-1===o&&(o=c);else if(o>-1){for(let t=o;t<c;t++)e[t]=f;o=-1}5===a[c]&&(e[c]=0),r.hiLevel|=f}r.hasUbatS&&function(t,e,r,i){for(let n=0;n<r;n++)if(6===t[n]){e[n]=i.dir;for(let r=n-1;r>=0&&8===t[r];r--)e[r]=i.dir}}(a,e,i,r)}function R(t){const e=t.charCodeAt(0),r=x[e>>8];return r<100?r:w[r-100][255&e]}function z(t,e){const r=t.split("");if(e){const t=[];T(r,t,e),Z=t}return r.reverse(),Y.reverse(),r.join("")}function v(t,e,r){for(let i=0;i<e;i++)if(t[i]===r)return i;return-1}function A(t){for(let e=0;e<d.length;e++)if(t>=d[e]&&t<=g[e])return!0;return!1}function F(t,e,r,i){for(;e*r<i&&N(t[e]);)e+=r;return!!(e*r<i&&A(t[e]))}function E(t,e,r,i){for(;e*r<i&&N(t[e]);)e+=r;let s=" ";if(!(e*r<i))return!1;s=t[e];for(let t=0;t<n.length;t++)if(n[t]===s)return!0;return!1}function D(t,e,r,i){if(i.hiLevel<t)return;if(1===t&&i.dir===tt&&!i.hasUbatB)return e.reverse(),void Y.reverse();const n=e.length;let s,o,a,l,c,h=0;for(;h<n;){if(r[h]>=t){for(s=h+1;s<n&&r[s]>=t;)s++;for(o=h,a=s-1;o<a;o++,a--)l=e[o],e[o]=e[a],e[a]=l,c=Y[o],Y[o]=Y[a],Y[a]=c;h=s}h++}}function B(t,e,r,i,n){const s=e[i];return{UBAT_L:()=>(n.lastArabic=!1,0),UBAT_R:()=>(n.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>n.lastArabic?3:2,UBAT_AL:()=>(n.lastArabic=!0,n.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,s;return i<1||i+1>=e.length||2!==(t=r[i-1])&&3!==t||2!==(s=e[i+1])&&3!==s?4:(n.lastArabic&&(s=3),s===t?s:4)},UBAT_ES:()=>2===(i>0?r[i-1]:5)&&i+1<e.length&&2===e[i+1]?2:4,UBAT_ET:()=>{if(i>0&&2===r[i-1])return 2;if(n.lastArabic)return 4;let t=i+1;const s=e.length;for(;t<s&&11===e[t];)t++;return t<s&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===n.inFormat){const r=e.length;let n=i+1;for(;n<r&&12===e[n];)n++;if(n<r){const r=t[i].charCodeAt(0),s=r>=1425&&r<=2303||64286===r,o=e[n];if(s&&(1===o||7===o))return 1}}return i<1||5===e[i-1]?4:r[i-1]},UBAT_B:()=>(n.lastArabic=!0,n.hasUbatB=!0,n.dir),UBAT_S:()=>(n.hasUbatS=!0,4),UBAT_LRE:()=>(n.lastArabic=!1,4),UBAT_RLE:()=>(n.lastArabic=!1,4),UBAT_LRO:()=>(n.lastArabic=!1,4),UBAT_RLO:()=>(n.lastArabic=!1,4),UBAT_PDF:()=>(n.lastArabic=!1,4),UBAT_BN:()=>4}[_[s]]()}function U(t){let e,r=0,n=i.length-1;for(;r<=n;)if(e=Math.floor((r+n)/2),t<i[e][0])n=e-1;else{if(!(t>i[e][0]))return i[e][1];r=e+1}return t}function G(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function O(t){for(let e=0;e<a.length;e++)if(t===a[e])return h[e];return t}function H(t,e){for(let r=0;r<a.length;r++)if(t===a[r])return e[r];return t}function N(t){return t>="ً"&&t<="ٕ"}function W(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function $(t,e,r,i){for(;e*r<i&&N(t[e]);)e+=r;return e*r<i&&(t[e]=" ",!0)}function V(t,e){for(let r=0;r<n.length;r++)if(t===n[r])return e[r];return t}function X(t,e,r,i){for(let n=0;n<t.length;n++)(t[n]>e||!r&&t[n]===e)&&(t[n]+=i)}let Y=[],q=[],Z=[];const j={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},J=5,K=6,Q=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,rt=/[\u0591-\u06ff\ufb1d-\ufefc]/},6371(t,e,r){r.d(e,{y:()=>n});const i=new(r(32488).A);function n(t,e=!0){if(!i.hasBidiChar(t))return[t,!1,{...i}];let r;r="rtl"===i.checkContextual(t)?"IDNNN":"ICNNN";const n=e?"VLYSN":"VLYNN";return[i.bidiTransform(t,r,n),!0,{...i}]}},40804(t,e,r){function i(t,e=0){let r=0;for(let i=0;i<4;i++)r+=t[e+i]*n[i];return r}r(34727);const n=[1/256,1/65536,1/16777216,1/4294967296];i(new Uint8ClampedArray([255,255,255,255])),i(new Uint8ClampedArray([255,255,255,0]))},56512(t,e,r){function i(t){let e,r,i=[],n=!1;return function(...s){return n&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}(s,i)||(r=t.apply(this,s),e=this,i=s,n=!0),r}}r.d(e,{B:()=>i})},69397(t,e,r){r.d(e,{Qf:()=>a,Qh:()=>s,lM:()=>n});var i=r(34275);function n(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function s(t){if(!t)return 0;if("number"==typeof t[0])return a(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return l(t,8);let r=h;for(let i=0;i<e;i++)r+=o(t[i]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?s(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...t){return t.reduce((t,e)=>t+(e?(0,i.iu)(e)?e.byteLength+u:Array.isArray(e)?l(e,16):0:0),0)}function l(t,e){return h+t.length*e}const c=32,h=16,u=145},93146(t,e,r){r.d(e,{z:()=>n});class i{constructor(t){this._import=t,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async t=>(this.module=t,t))),this._promise}}function n(t){return new i(async()=>{const e=await t();return!1===e.isLoaded?.()&&await e.load(),e})}},31411(t,e,r){r.d(e,{GS:()=>w,gh:()=>I});var i=r(49186),n=r(56512),s=r(65864),o=r(4305),a=r(50954),l=r(52006),c=r(49663),h=r(46068),u=r(15507);const f=1e-6,m=[0,0];function d(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class g{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:r,maxSegmentsPerCurve:i,minSegmentsPerCurve:n}){const s=r*r,o=e*e,a=1/i,l=this.interpolate(0),c=this.interpolate(1);(0,u.kb)(this.curveStart,l)>f&&t.push(l),this.initialize(l,c);const h=1/n;for(let t=n-1;t>0;t--){const e=t*h;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<a||(0===s||!isFinite(s)||(0,u.kb)(this.arcStart,this.arcEnd)<s)&&(0===o||!isFinite(o)||this.getDeviation2()<o)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,u.kb)(this.curveEnd,c)>f&&t.push([...this.curveEnd]),t}}class p extends g{constructor(t,e){const[r,i,n]=e.b;super(t,r),this._controlPointsStack=[],this._curveControlPoints=[i,n],this._arcControlPoints=[i,n],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:r,tStart:i,tEnd:n}=this,[s,o]=this._arcControlPoints,a=(t-i)/(n-i),l=(0,u.RS)([],e,s,a),c=(0,u.RS)(m,s,o,a),h=(0,u.RS)([],o,r,a),f=(0,u.RS)([],l,c,a),d=(0,u.RS)([],c,h,a),g=(0,u.RS)([],f,d,a);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([d,h]),this.tEndStack.push(t),this.arcEndStack.push(g),this._arcControlPoints[0]=l,this._arcControlPoints[1]=f,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:r}=this,[i,n]=this._curveControlPoints;return(0,o.B4)(e,i,n,r,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[r,i]=this._arcControlPoints;return Math.max((0,u.yE)(r,t,e),(0,u.yE)(i,t,e))}}class y extends g{constructor(t,e){const[r]=e.a;super(t,r),this._derivedEllipse=(0,h.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,h.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,u.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function S(t,e,r,{cx:i,cy:n,radius:s,thetaStart:o,thetaEnd:a,isInvalid:l},{maxDeviation:c,maxSegmentLength:h,maxSegmentsPerCurve:m,minSegmentsPerCurve:d}){if(l)return t.push([...r]),t;const g=2*s,p=[i+s*Math.cos(o),n+s*Math.sin(o)],y=[i+s*Math.cos(a),n+s*Math.sin(a)];(0,u.kb)(e,p)>f&&t.push(p);const S=Math.abs(a-o),M=h>0&&h<g?2*Math.asin(h/g):S,C=c>0&&c<=s?2*Math.acos(1-c/s):S,b=Math.min(M,C),_=Math.min(m,Math.max(d,Math.ceil(Math.abs(S/b)))),x=1/_;for(let e=1;e<_;e++){const r=e*x,l=o*(1-r)+a*r;t.push([i+s*Math.cos(l),n+s*Math.sin(l)])}return t.push(y),(0,u.kb)(r,y)>f&&t.push([...r]),t}function M(t,e,r,i){return new p(e,r).densify(t,i)}function C(t,e,r,i){const n=(0,a.pM)(e,r),[s]=r.c;return S(t,e,s,n,i)}function b(t,e,r,i){const n=(0,c.io)(e,r),[s]=r.a;return S(t,e,s,n,i)}function _(t,e,r,i){const[n,s,o,a,l,c,h]=r.a;return 0===c||0===h?(t.push([...n]),t):new y(e,r).densify(t,i)}function x(t,e,r,i){return(0,l.Xq)(r)?(t.push([...r]),t):(0,l.n1)(r)?M(t,e,r,i):(0,l.aO)(r)?C(t,e,r,i):(0,l.DA)(r)?b(t,e,r,i):_(t,e,r,i)}function w(t,e={}){if(!(0,l.Ed)(t))return t;const r=d(e),i=(0,l.FD)(t),n=[];for(const t of i){const e=[];for(let i=0;i<t.length-1;i++){const n=i+1,s=[...(0,l.yP)(t[i])];0===i&&e.push(s),x(e,s,t[n],r)}n.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:n,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:n,spatialReference:t.spatialReference}}const k=(0,n.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(t,e,n){const o=new Set(e);return await async function(t,e,n){let s=null;for(const o of t)if(o&&(0,l.Ed)(o)&&null==o.spatialReference.xyTolerance&&(0,l.V8)(o,e)){const t=o.spatialReference;if(!t)throw new i.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=P(t);if(n.has(e))o.spatialReference=n.get(e);else{s||(s=await Promise.all([r.e(9187),r.e(8885),r.e(5756),r.e(3299),r.e(1550)]).then(r.bind(r,78125)));const a=s.fromSpatialReference(t),l=a?.getTolerance();if(null==l)throw new i.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=o.spatialReference.clone();c.read({xyTolerance:l}),o.spatialReference=c,n.set(e,c)}}}(t,o,n),t.map(t=>{if(!t||!(0,l.Ed)(t))return t;const r=t.spatialReference.xyTolerance;if(null==r)return t;const i=k(r);return(0,s.rS)(function(t,e,r){if(!(0,l.Ed)(t))return t;const i=new Set(e),n=d(r),s=(0,l.FD)(t),o=[];let a=!1;for(const t of s){const e=[];for(let r=0;r<t.length-1;r++){const s=r+1,o=[...(0,l.yP)(t[r])];0===r&&e.push(o);const c=t[s];(0,l.Xq)(c)?e.push([...c]):(0,l.n1)(c)&&!i.has("cubic-bezier")?M(e,o,c,n):(0,l.aO)(c)&&!i.has("circular-arc")?C(e,o,c,n):(0,l.DA)(c)&&!i.has("elliptic-arc")?b(e,o,c,n):(0,l.wY)(c)&&!i.has("elliptic-arc")?_(e,o,c,n):(e.push((0,l.tk)(c)),a=!0)}o.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...a?{curvePaths:o}:{paths:o}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...a?{curveRings:o}:{rings:o}}}(t,e,i))})}function P(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},92722(t,e,r){r.d(e,{A:()=>n});var i=r(69397);class n{constructor(t=[],e=[],r=!1,i=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=i}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:i}){return new n(t,e,r||!1,i||!1)}static fromRect([t,e,r,i]){const s=r-t,o=i-e;return new n([5],[t,e,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,i.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const r of this.lengths){if(r<3)continue;const{stride:i}=this;let n=this.coords[i*e],s=this.coords[i*e+1];for(let o=1;o<r;o+=1){const r=i*(e+o),a=this.coords[r],l=this.coords[r+1];t+=-.5*(a-n)*(l+s),n=a,s=l}e+=r}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:r}=this;for(const i of this.lengths){for(let n=0;n<i;n++){const i=r*(e+n);t(this.coords[i],this.coords[i+1])}e+=i}}deltaDecode(){const t=this.clone(),{coords:e,lengths:r}=t;let i=0;const{stride:n}=this;for(const t of r){for(let r=1;r<t;r++){const t=n*(i+r);e[t]+=e[t-n],e[t+1]+=e[t+1-n]}i+=t}return t}clone(t){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:r,size:i}=this,s=this.coords.slice(0,i*r);return t?(t.set(s),new n(e,t,this.hasZ,this.hasM)):new n(e,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const r=new Array(e*t);for(let e=0,i=0;e<r.length;e+=t)r[i++]=this.coords[e],r[i++]=this.coords[e+1];return new n(this.lengths,r,!1,!1)}}},5427(t,e,r){r.r(e),r.d(e,{CIMSymbolHelper:()=>st,CIMSymbolInflatedSizeHelper:()=>nt,capTypeToEnum:()=>at,forEachSymbolLayer:()=>ot,slsDashToTemplateArray:()=>gt,symbolToCIM:()=>et});var i=r(6371),n=r(4718),s=r(53966),o=r(87811),a=r(90629),l=r(19419),c=r(537),h=r(52006),u=r(31411),f=r(11831),m=r(35833),d=r(98939),g=r(57582),p=(r(44208),r(34727)),y=r(93687),S=r(36745),M=r(12359),C=(r(12176),r(60408));class b{applyColorSubstitution(t,e){if(!e)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:r,height:i}=t,n=this._rasterizationCanvas,s=n.getContext("2d",{willReadFrequently:!0});t!==n&&(n.width=r,n.height=i,s.drawImage(t,0,0,r,i));const o=s.getImageData(0,0,r,i).data;if(e)for(const t of e)if(t&&t.oldColor&&4===t.oldColor.length&&t.newColor&&4===t.newColor.length){const[e,r,i,n]=t.oldColor,[s,a,l,c]=t.newColor;if(e===s&&r===a&&i===l&&n===c)continue;for(let t=0;t<o.length;t+=4)e===o[t]&&r===o[t+1]&&i===o[t+2]&&n===o[t+3]&&(o[t]=s,o[t+1]=a,o[t+2]=l,o[t+3]=c)}const a=new ImageData(o,r,i);return s.putImageData(a,0,0),n}tintImageData(t,e){if(!e||e.length<4)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:r,height:i}=t,n=this._rasterizationCanvas,s=n.getContext("2d",{willReadFrequently:!0});t!==n&&(n.width=r,n.height=i,s.drawImage(t,0,0,r,i));const o=s.getImageData(0,0,r,i),a=new Uint8Array(o.data),l=[e[0]/255,e[1]/255,e[2]/255,e[3]/255];for(let t=0;t<a.length;t+=4)a[t]*=l[0],a[t+1]*=l[1],a[t+2]*=l[2],a[t+3]*=l[3];const c=new ImageData(new Uint8ClampedArray(a.buffer),r,i);return s.putImageData(c,0,0),n}}var _=r(26937),x=r(28076);function w(t){const e=t.getFrame(0);if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement)return e;const r=document.createElement("canvas");r.width=t.width,r.height=t.height;const i=r.getContext("2d");return e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0),r}function k(t,e=0){if(0===e)return t;const r=Math.cos(e),i=Math.sin(e),[n,s]=t;return[n*r+s*-i,n*i+s*r]}var I=r(44589);class P{constructor(t=0,e=0,r=0,i=0){this.x=t,this.y=e,this.width=r,this.height=i}static fromExtent(t){return new P(t.xmin,-t.ymax,t.xmax-t.xmin,t.ymax-t.ymin)}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}var L=r(69754);function T(t){return`rgb(${t.slice(0,3).toString()})`}function R(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}r(5760);class z{constructor(t){t&&(this._textRasterizationCanvas=t)}rasterizeRichText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d",{willReadFrequently:!0}),n=this._layoutRichTextRuns(i,t,e);this._parameters=e,this._lineHeight=Math.max(...n.map(t=>t.height),this._measureLineHeight(e));const{decoration:s,weight:o}=e.font;this._lineThroughWidthOffset=s&&"line-through"===s?.1*this._lineHeight:0;const a=null!=e.backgroundColor||null!=e.borderLine,l=a?8:0,c=Math.max(...n.map(t=>t.width),0)+2*l,h=n.reduce((t,e)=>t+e.height,0)+2*l;if(r.width=c+2*this._lineThroughWidthOffset,r.height=h,0===r.width||0===r.height)return r.width=r.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:r};this._renderedWidth=c,this._renderedHeight=h,this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._lineThroughWidthOffset*=e.pixelRatio;const u=(e.outline&&e.outline.color)??[0,0,0,0],f=e.color??[0,0,0,0],m=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=R(f),this._outlineStyle=R(u),this._haloStyle=T(m);const d=this._renderedOutlineSize,g=this._renderedHaloSize;i.save(),i.clearRect(0,0,r.width,r.height);const p=l*e.pixelRatio,y=F("left",this._renderedWidth-2*p,g+d)+p,S=g+d+p;let M=this._lineThroughWidthOffset,C=0;if(a){i.save();const t=e.backgroundColor??[0,0,0,0],n=e.borderLine?.color??[0,0,0,0],s=2*(e.borderLine?.size??0);i.fillStyle=R(t),i.strokeStyle=R(n),i.lineWidth=s,i.fillRect(0,0,r.width,r.height),i.strokeRect(0,0,r.width,r.height),i.restore()}C+=S,M+=y,g>0&&this._renderRichTextOutline(i,n,M,C,e,this._renderedHaloSize+this._renderedOutlineSize),d>0&&this._renderRichTextOutline(i,n,M,C,e,this._renderedOutlineSize);for(const t of n){let r=M;"center"===e.horizontalAlignment?r+=(this._renderedWidth-2*p-t.width)/2:"right"===e.horizontalAlignment&&(r+=this._renderedWidth-2*p-t.width-g-d);let n=r;for(const e of t.segments)v(i,e.parameters,"left",e.characterSpacing),g>0&&(i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",this._renderRichTextSegment(i,e,n,C,"fill"),i.globalCompositeOperation="source-over"),i.fillStyle=R(e.parameters.color??f),this._renderRichTextSegment(i,e,n,C,"fill"),n+=e.width;if(s&&"none"!==s){const e=this._renderedWidth;this._renderedWidth=t.width,i.textAlign="left",this._renderDecoration(i,r,C,s,o),this._renderedWidth=e}C+=t.height}i.restore();const b=this._renderedWidth+2*this._lineThroughWidthOffset,_=this._renderedHeight,x=i.getImageData(0,0,b,_),w=new Uint8Array(x.data);if(e.premultiplyColors){let t;for(let e=0;e<w.length;e+=4)t=w[e+3]/255,w[e]=w[e]*t,w[e+1]=w[e+1]*t,w[e+2]=w[e+2]*t}let k,I;switch(e.horizontalAlignment){case"left":k=-.5;break;case"right":k=.5;break;default:k=0}switch(e.verticalAlignment){case"bottom":I=-.5;break;case"top":I=.5;break;case"baseline":I=-1/6;break;default:I=0}return{size:[b,_],image:new Uint32Array(w.buffer),sdf:!1,simplePattern:!1,anchorX:k,anchorY:I,canvas:r}}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d",{willReadFrequently:!0});v(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const{decoration:n,weight:s}=e.font;this._lineThroughWidthOffset=n&&"line-through"===n?.1*this._lineHeight:0;const o=null!=e.backgroundColor||null!=e.borderLine,a=o?8:0,l=this._computeTextWidth(i,e)+2*a,c=this._lineHeight*this._textLines.length+2*a;if(r.width=l+2*this._lineThroughWidthOffset,r.height=c,0===r.width||0===r.height)return r.width=r.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:r};this._renderedLineHeight=Math.round(this._lineHeight),this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._renderedWidth=l,this._renderedHeight=c,this._lineThroughWidthOffset*=e.pixelRatio;const h=(e.outline&&e.outline.color)??[0,0,0,0],u=e.color??[0,0,0,0],f=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=R(u),this._outlineStyle=R(h),this._haloStyle=T(f);const m=this._renderedLineHeight,d=this._renderedOutlineSize,g=this._renderedHaloSize;i.save(),i.clearRect(0,0,r.width,r.height),v(i,e);const p=a*e.pixelRatio,y=F(i.textAlign,this._renderedWidth-2*p,this._renderedHaloSize+this._renderedOutlineSize)+p,S=g+d+p,M=g>0;let C=this._lineThroughWidthOffset,b=0;if(o){i.save();const t=e.backgroundColor??[0,0,0,0],n=e.borderLine?.color??[0,0,0,0],s=2*(e.borderLine?.size??0);i.fillStyle=R(t),i.strokeStyle=R(n),i.lineWidth=s,i.fillRect(0,0,r.width,r.height),i.strokeRect(0,0,r.width,r.height),i.restore()}M&&this._renderHalo(i,y,S,C,b,e),d>0&&this._renderOutline(i,y,S,C,b,e),b+=S,C+=y;for(const t of this._textLines)M?(i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",i.fillText(t,C,b),i.globalCompositeOperation="source-over",i.fillStyle=this._fillStyle,i.fillText(t,C,b)):(i.fillStyle=this._fillStyle,i.fillText(t,C,b)),n&&"none"!==n&&this._renderDecoration(i,C,b,n,s),b+=m;i.restore();const _=this._renderedWidth+2*this._lineThroughWidthOffset,x=this._renderedHeight,w=i.getImageData(0,0,_,x),k=new Uint8Array(w.data);if(e.premultiplyColors){let t;for(let e=0;e<k.length;e+=4)t=k[e+3]/255,k[e]=k[e]*t,k[e+1]=k[e+1]*t,k[e+2]=k[e+2]*t}let I,P;switch(e.horizontalAlignment){case"left":I=-.5;break;case"right":I=.5;break;default:I=0}switch(e.verticalAlignment){case"bottom":P=-.5;break;case"top":P=.5;break;case"baseline":P=-1/6;break;default:P=0}return{size:[_,x],image:new Uint32Array(k.buffer),sdf:!1,simplePattern:!1,anchorX:I,anchorY:P,canvas:r}}_renderHalo(t,e,r,i,n,s){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,c=l.getContext("2d");c.clearRect(0,0,o,a),v(c,s);const{decoration:h,weight:u}=s.font;c.fillStyle=this._haloStyle,c.strokeStyle=this._haloStyle,c.lineJoin="round",this._renderOutlineNative(c,e,r,h,u,this._renderedHaloSize+this._renderedOutlineSize),t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,i,n,o,a),t.globalAlpha=1}_renderOutline(t,e,r,i,n,s){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,c=l.getContext("2d");c.clearRect(0,0,o,a),v(c,s);const{decoration:h,weight:u}=s.font;c.fillStyle=this._outlineStyle,c.strokeStyle=this._outlineStyle,c.lineJoin="round",this._renderOutlineNative(c,e,r,h,u,this._renderedOutlineSize),t.globalAlpha=this._parameters.outline.color[3],t.drawImage(l,0,0,o,a,i,n,o,a),t.globalAlpha=1}_renderOutlineNative(t,e,r,i,n,s){const o=this._renderedLineHeight;for(const a of this._textLines){const l=2*s,c=5,h=.1;for(let s=0;s<c;s++){const o=(1-(c-1)*h+s*h)*l;t.lineWidth=o,t.strokeText(a,e,r),i&&"none"!==i&&this._renderDecoration(t,e,r,i,n,o)}r+=o}}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d");v(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const n=this._computeTextWidth(i,e),s=this._lineHeight*this._textLines.length;return r.width=n,r.height=s,[n*e.pixelRatio,s*e.pixelRatio]}computeRichTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas.getContext("2d"),i=this._layoutRichTextRuns(r,t,e),n=Math.max(...i.map(t=>t.width),0),s=i.reduce((t,e)=>t+e.height,0);return[n*e.pixelRatio,s*e.pixelRatio]}_renderRichTextOutline(t,e,r,i,n,s){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,c=l.getContext("2d");c.clearRect(0,0,o,a),c.fillStyle=s===this._renderedOutlineSize?this._outlineStyle:this._haloStyle,c.strokeStyle=c.fillStyle,c.lineJoin="round";let h=i;for(const t of e){let e=r;"center"===n.horizontalAlignment?e+=(this._renderedWidth-t.width)/2:"right"===n.horizontalAlignment&&(e+=this._renderedWidth-t.width-this._renderedHaloSize-this._renderedOutlineSize);let i=e;for(const e of t.segments){v(c,e.parameters,"left",e.characterSpacing);const t=2*s,r=5,n=.1;for(let s=0;s<r;s++){const o=1-(r-1)*n+s*n;c.lineWidth=o*t,this._renderRichTextSegment(c,e,i,h,"stroke")}i+=e.width}if(n.font.decoration&&"none"!==n.font.decoration){const r=this._renderedWidth;this._renderedWidth=t.width,c.textAlign="left",this._renderDecoration(c,e,h,n.font.decoration,n.font.weight,2*s),this._renderedWidth=r}h+=t.height}s===this._renderedOutlineSize?t.globalAlpha=this._parameters.outline.color[3]:t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,this._lineThroughWidthOffset,0,o,a),t.globalAlpha=1}_layoutRichTextRuns(t,e,r){const i=[{segments:[],width:0,height:this._measureLineHeight(r)}];for(const n of e){const e=n.text.split(/\r?\n/),s=A(r,n);for(let o=0;o<e.length;o++){const a=e[o],l=i[i.length-1];if(a.length>0){const e=this._measureRichTextSegmentWidth(t,a,s,n.characterSpacing);l.segments.push({text:a,width:e,parameters:s,characterSpacing:n.characterSpacing}),l.width+=e,l.height=Math.max(l.height,this._measureLineHeight(s))}o<e.length-1&&i.push({segments:[],width:0,height:this._measureLineHeight(r)})}}return i}_measureTextWidthWithSpacing(t,e,r,i){const n=this._parameters,s=this._textLines;this._parameters=r,this._textLines=[e],v(t,r,"left",i);const o=this._computeTextWidth(t,r);return this._parameters=n,this._textLines=s,o}_measureRichTextSegmentWidth(t,e,r,i){return this._measureTextWidthWithSpacing(t,e,r,i)}_renderRichTextSegment(t,e,r,i,n){"fill"===n?t.fillText(e.text,r,i):t.strokeText(e.text,r,i)}_measureLineHeight(t){const e=this._parameters;this._parameters=t;const r=this._computeLineHeight();return this._parameters=e,r}_computeTextWidth(t,e){let r=0;for(const e of this._textLines)r=Math.max(r,t.measureText(e).width);const i=e.font;return("italic"===i.style||"oblique"===i.style||"string"==typeof i.weight&&("bold"===i.weight||"bolder"===i.weight)||"number"==typeof i.weight&&i.weight>600)&&(r+=.3*t.measureText("w").width),r+=2*(0,a.Lz)(this._parameters.halo.size),Math.round(r)}_computeLineHeightBase(){return 1.275*this._parameters.size}_computeLineHeight(){let t=this._computeLineHeightBase();const e=this._parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*(0,a.Lz)(this._parameters.halo.size))}_renderDecoration(t,e,r,i,n,s){let o=.9*this._lineHeight;const a="bold"===n?.06:"bolder"===n?.09:.04;switch(t.textAlign){case"center":e-=this._renderedWidth/2;break;case"right":e-=this._renderedWidth}const l=t.textBaseline;if("underline"===i)switch(o=.9*this._computeLineHeightBase(),l){case"top":r+=o;break;case"middle":r+=o/2}else if("line-through"===i)switch(l){case"top":r+=o/1.5;break;case"middle":r+=o/3}const c=s?1.5*s:Math.ceil(o*a);t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=c,t.moveTo(e-this._lineThroughWidthOffset,r),t.lineTo(e+this._renderedWidth+2*this._lineThroughWidthOffset,r),t.stroke(),t.restore()}}function v(t,e,r,i=0){const n=Math.max(e.size,.5),s=e.font,o=`${s.style} ${s.weight} ${(0,a.Lz)(n).toFixed(1)}px ${s.family}, sans-serif`;t.font=o,t.textBaseline="top",function(t,e){t.letterSpacing=e>0?`${e}em`:"0px"}(t,i);let l=r??"left";if(!r)switch(e.horizontalAlignment){case"left":default:l="left";break;case"right":l="right";break;case"center":l="center"}t.textAlign=l}function A(t,e){return{...t,color:e.color??t.color,font:{...t.font,family:e.font.family??t.font.family,style:e.font.style??t.font.style,weight:e.font.weight??t.font.weight},size:e.fontSize}}function F(t,e,r){return"center"===t?.5*e:"right"===t?e-r:r}var E=r(93397),D=r(75434),B=r(69221);const U=Math.PI/180,G=()=>s.A.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class O{constructor(t){this._t=t}static createIdentity(){return new O([1,0,0,0,1,0])}clone(){const t=this._t;return new O(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new O([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new O([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new O([e,-r,0,r,e,0])}rotate(t){return O.multiply(this,O.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const i=t._t,n=e._t,s=i[0]*n[0]+i[3]*n[1],o=i[1]*n[0]+i[4]*n[1],a=i[2]*n[0]+i[5]*n[1]+n[2],l=i[0]*n[3]+i[3]*n[4],c=i[1]*n[3]+i[4]*n[4],h=i[2]*n[3]+i[5]*n[4]+n[5],u=r._t;return u[0]=s,u[1]=o,u[2]=a,u[3]=l,u[4]=c,u[5]=h,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new O([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,i=(t[2]*t[3]-t[0]*t[5])*e,n=t[4]*e,s=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new O([n,s,r,o,a,i])}}class H{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._textScaling=[],this._geomUnitsPerPoint=1,this._placementPool=new y.A(()=>new d.W,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||O.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1),this._textScaling.push(1)}setTransform(t,e){this._transfos=[t||O.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)],this._textScaling=[1]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}scaleText(t){return t*this._textScaling[this._textScaling.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}reverseScaleText(t){return t/this._textScaling[this._textScaling.length-1]}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e=!1,r=1){const i=e?t.scaleRatio():1;O.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i),this._textScaling.push(this._textScaling[this._textScaling.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1),this._textScaling.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const i=t.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),i=(0,E.ll)(t);let n=new m.kT(S.z.fromJSONCIM(e));for(const s of t){const t=(0,_.A)(s);t&&(n=t.execute(n,s,{geomUnitsPerPoint:r,tileKey:null,maxInflateSize:i,scale:null,spatialReference:e.spatialReference,preventClipping:!1}))}return n}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const i=t[r];if(!i||!1===i.enable)continue;const n=i.effects;if(n&&n.length>0){const t=this.executeEffects(n,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=function(t,e,r){let i=(0,E.$w)(t.separation,x.D.CIMHatchFill.separation)*r,n=(0,E.$w)(t.rotation);if(0===i)return null;i<0&&(i=-i);let s=0;const o=.5*i;for(;s>o;)s-=i;for(;s<-o;)s+=i;const a=(0,l.vt)();(0,c.Rg)(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const h=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;n>180;)n-=180;for(;n<0;)n+=180;const u=Math.cos(n*U),f=Math.sin(n*U),m=-i*f,d=i*u;let g,p,y,S;s=(0,E.$w)(t.offsetX)*r*f-(0,E.$w)(t.offsetY)*r*u,g=y=Number.MAX_VALUE,p=S=-Number.MAX_VALUE;for(const t of h){const e=t[0],r=t[1],i=u*e+f*r,n=-f*e+u*r;g=Math.min(g,i),y=Math.min(y,n),p=Math.max(p,i),S=Math.max(S,n)}y=Math.floor(y/i)*i;let M=u*g-f*y-m*s/i,C=f*g+u*y-d*s/i,b=u*p-f*y-m*s/i,_=f*p+u*y-d*s/i;const w=1+Math.round((S-y)/i),k=[];for(let t=0;t<w;t++)M+=m,C+=d,b+=m,_+=d,k.push([[M,C],[b,_]]);return{paths:k}}(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const i=(0,_.c)(r);if(i){const n="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;n&&this.pushClipPath(e);const s=i.execute(S.z.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(s){let e=null;for(;(e=s.next())&&(this.drawMarker(t,e),!this._earlyReturn););}n&&this.popClipPath()}}else{const r=this._placementPool.acquire();if((0,C.fT)(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if((0,C.Bi)(e)){const i=(0,M.l8)(e);i&&([r.tx,r.ty]=i,this.drawMarker(t,r))}else if((0,C.Rg)(e)){for(const i of e.paths)for(const e of i)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const i of e.points)if(r.tx=i[0],r.ty=i[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),i=(0,E.$w)(t.size,x.D.CIMPictureMarker.size);if(null==r||i<=0)return;const n=r.width,s=r.height;if(!n||!s)return;const o=n/s,a=(0,E.$w)(t.scaleX,1),l=O.createIdentity(),c=t.anchorPoint;if(c){let e=c.x,r=c.y;"Absolute"!==t.anchorPointUnits&&(e*=i*o*a,r*=i),l.translate(-e,-r)}let h=(0,E.$w)(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&l.rotate(h*U);let u=(0,E.$w)(t.offsetX),f=(0,E.$w)(t.offsetY);if(u||f){if(this._mapRotation){const t=U*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=u*r+f*e;u=u*e-f*r,f=i}l.translate(u,f)}const m=this.geomUnitsPerPoint();1!==m&&l.scale(m,m);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l),this.drawImage(t,i),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const i=(0,E.$w)(t.size,x.D.CIMVectorMarker.size),n=t.frame,s=n?n.ymax-n.ymin:0,o=i&&s?i/s:1,a=O.createIdentity();n&&a.translate(.5*-(n.xmax+n.xmin),.5*-(n.ymax+n.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?n&&(e*=n.xmax-n.xmin,r*=n.ymax-n.ymin):(e/=o,r/=o),a.translate(-e,-r)}1!==o&&a.scale(o,o);let c=(0,E.$w)(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&a.rotate(c*U);let h=(0,E.$w)(t.offsetX),u=(0,E.$w)(t.offsetY);if(h||u){if(this._mapRotation){const t=U*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=h*r+u*e;h=h*e-u*r,u=i}a.translate(h,u)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const m=e.getAngle();m&&a.rotate(m),a.translate(e.tx,e.ty);const d=t.scaleSymbolsProportionally?1:o;this.push(a,t.scaleSymbolsProportionally,d);for(const t of r){t?.symbol&&t.geometry||G().error("Invalid marker graphic",t);let e=t.textString;if("number"==typeof e&&(e=e.toString()),this.drawSymbol(t.symbol,t.geometry,e),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!(0,C.fT)(e))return;if((0,E.$w)(t.height,x.D.CIMTextSymbol.height)<=0)return;const i=O.createIdentity();let n=(0,E.$w)(t.angle);n=-n,n&&i.rotate(n*U);const s=(0,E.$w)(t.offsetX),o=(0,E.$w)(t.offsetY);(s||o)&&i.translate(s,o);const a=this.geomUnitsPerPoint();1!==a&&i.scale(a,a),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}}class N extends H{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new P(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,l.fA)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,C.Bi)(t))this._processPath(t.rings,0);else if((0,C.Rg)(t))this._processPath(t.paths,0);else if((0,C.ZC)(t)){const e=V(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const i=Math.max(.5*this.transformSize((0,E.$w)(r,x.D.CIMSolidStroke.width)),.25);if((0,C.Bi)(t))this._processPath(t.rings,i);else if((0,C.Rg)(t))this._processPath(t.paths,i);else if((0,C.ZC)(t)){const e=V(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){(0,C.Bi)(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,i=(0,E.$w)(t.scaleX,1);let n=i*e,s=e;const o=this._resourceManager.getResource(r);if(null!=o){const t=o.height/o.width;n=i*(e?t>1?e:e/t:o.width),s=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-n/2,-s/2]),0),this._merge(this.transformPt([-n/2,s/2]),0),this._merge(this.transformPt([n/2,-s/2]),0),this._merge(this.transformPt([n/2,s/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new z);const r=X(t),i=(0,L.Z)({textString:e,font:r.font,symbol:t,supportsRichText:(0,L.q)(e)});let[n,s]=i?this._textRasterizer.computeRichTextSize(i,r):this._textRasterizer.computeTextSize(e,r);n=(0,a.PN)(n),s=(0,a.PN)(s);const o=this.transformSize(1)*this.reverseTransformScalar(1);n*=o,s*=o;const l=t.horizontalAlignment??x.D.CIMTextSymbol.horizontalalignment,c=t.verticalAlignment??x.D.CIMTextSymbol.verticalalignment;let h=0;switch(l){case"Left":h=n/2;break;case"Right":h=-n/2}let u=0;switch(c){case"Bottom":u=s/2;break;case"Top":u=-s/2;break;case"Baseline":u=s/6}this._merge(this.transformPt([-n/2+h,-s/2+u]),0),this._merge(this.transformPt([-n/2+h,s/2+u]),0),this._merge(this.transformPt([n/2+h,-s/2+u]),0),this._merge(this.transformPt([n/2+h,s/2+u]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let i=1;i<t;i++)this._merge(this.transformPt(r[i]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class W extends H{constructor(t,e,r,i){super(e,r),this._applyAdditionalRenderProps=i,this._colorSubstitutionHelper=new b,this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,C.Bi)(t))this._buildPath(t.rings,!0);else if((0,C.Rg)(t))this._buildPath(t.paths,!0);else if((0,C.ZC)(t))this._buildPath(V(t).rings,!0);else{if(!(0,C.U9)(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,i,n,s){if(!t||!e||0===r)return;if((0,C.Bi)(t))this._buildPath(t.rings,!0);else if((0,C.Rg)(t))this._buildPath(t.paths,!1);else{if(!(0,C.ZC)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(V(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(r),.5),this._setCapStyle(i),this._setJoinStyle(n),o.miterLimit=s,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,C.Bi)(t))this._buildPath(t.rings,!0);else if((0,C.Rg)(t))this._buildPath(t.paths,!0);else{if(!(0,C.ZC)(t))return;this._buildPath(V(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:i,tintColor:n}=t,s=(0,E.$w)(t.scaleX,1),o=this._resourceManager.getResource(i);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const c=(0,E.UE)(i)||"src"in o&&(0,E.UE)(o.src);let h="getFrame"in o?w(o):o;r&&(h=this._colorSubstitutionHelper.applyColorSubstitution(h,r)),this._applyAdditionalRenderProps&&!c&&n&&(h=this._colorSubstitutionHelper.tintImageData(h,n));const u=this.transformPt([0,0]),[f,m]=this.getTransformAngle(),d=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:s*d*f,m12:s*d*m,m21:-d*m,m22:d*f,m41:u[0],m42:u[1]}),g.drawImage(h,-a/2,-l/2,a,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new z);const r=X(t,this.transformSize((0,a.PN)(1))),i=(0,L.Z)({textString:e,font:r.font,symbol:t,supportsRichText:(0,L.q)(e)}),n=i?this._textRasterizer.rasterizeRichText(i,r):this._textRasterizer.rasterizeText(e,r);if(!n)return;const{size:s,anchorX:o,anchorY:l,canvas:c}=n,h=s[0]*(o+.5),u=s[1]*(l-.5),f=this._ctx,m=this.transformPt([0,0]),[d,g]=this.getTransformAngle();f.save(),f.setTransform({m11:1*d,m12:1*g,m21:-1*g,m22:1*d,m41:m[0]-1*h,m42:m[1]+1*u}),f.drawImage(c,0,0),f.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:i,offsetX:n,offsetY:s,rotation:o,scaleX:a,tintColor:l,url:c}=e;const h=this._resourceManager.getResource(c);if(null==h)return;if((0,C.Bi)(t))this._buildPath(t.rings,!0);else if((0,C.Rg)(t))this._buildPath(t.paths,!0);else if((0,C.ZC)(t))this._buildPath(V(t).rings,!0);else{if(!(0,C.U9)(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const u=this._ctx,f=(0,E.UE)(c)||"src"in h&&(0,E.UE)(h.src);let m,d="getFrame"in h?w(h):h;if(r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),m=u.createPattern(d,"repeat");const t=this.transformSize(1);o||(o=0),n?n*=t:n=0,s?s*=t:s=0,i&&(i*=t);const e=i?i/h.height:1,r=a&&i?a*i/h.width:1;if(0!==o||1!==e||1!==r||0!==n||0!==s){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(n,s).scaleSelf(r,e,1),m.setTransform(t)}}else m=u.createPattern(d,"repeat");u.save(),u.fillStyle=m,u.fill("evenodd"),u.restore()}drawPictureStroke(t,e){if(!t)return;let{colorSubstitutions:r,capStyle:i,joinStyle:s,miterLimit:o,tintColor:l,url:c,width:h}=e;const u=this._resourceManager.getResource(c);if(null==u)return;let f;if((0,C.Bi)(t))f=t.rings;else if((0,C.Rg)(t))f=t.paths;else{if(!(0,C.ZC)(t))return(0,C.U9)(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=V(t).rings}h||(h=u.width);const m=(0,E.UE)(c)||"src"in u&&(0,E.UE)(u.src);let d="getFrame"in u?w(u):u;r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps&&(m||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const g=Math.max(this.transformSize((0,a.Lz)(h)),.5),p=g/d.width,y=this._ctx,S=y.createPattern(d,"repeat-y");let M,b;y.save(),this._setCapStyle(i),this._setJoinStyle(s),void 0!==o&&(y.miterLimit=o),y.lineWidth=g;for(let t of f)if(t=(0,n.o8)(t),Y(t),t&&!(t.length<=1)){M=this.transformPt(t[0]);for(let e=1;e<t.length;e++){b=this.transformPt(t[e]);const r=$(M,b),i=new DOMMatrix;i.translateSelf(0,M[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-r),S.setTransform(i),y.strokeStyle=S,y.beginPath(),y.moveTo(M[0],M[1]),y.lineTo(b[0],b[1]),y.stroke(),M=b}}y.restore()}drawGradientFill(t,e){if(!t)return;let r;if((0,C.Bi)(t))r=t.rings;else if((0,C.Rg)(t))r=t.paths;else{if(!(0,C.ZC)(t))return void G().error("Unable to draw gradient fill");r=V(t).rings}this._buildPath(r,!0);const{angle:i,gradientMethod:n,gradientSize:s,gradientSizeUnits:o}=e,c=x.D.CIMGradientFill,h=e.gradientType??c.gradientType,u=-(0,p.kU)(i??0),f=(0,l.Ie)();for(const t of r){const e=t?t.length:0;if(e>1)for(let r=0;r<e;r++){let e=this.transformPt(t[r]);"Linear"!==n&&"Rectangular"!==n||(e=k(e,-u)),(0,l.tK)(f,e)}}const[m,d,g,y]=f,S=this._ctx;switch(S.save(),n){case"Buffered":G().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(d+y)/2,r="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,c.gradientSize)*(g-m),[i,n]="Discrete"===h?[g,g-r]:[m+r,m],l=k([i,t],u),f=k([n,t],u),p=S.createLinearGradient(l[0],l[1],f[0],f[1]);(0,I.AH)(p,e),S.fillStyle=p,S.fill("evenodd");break}case"Circular":{const t=(0,l.gX)(f),r=(0,l.ib)(f)/2,i="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,c.gradientSize)*r,[n,u]="Discrete"===h?[r,r-i]:[i,0],m=S.createRadialGradient(t[0],t[1],n,t[0],t[1],u);(0,I.AH)(m,e),S.fillStyle=m,S.fill("evenodd");break}case"Rectangular":{const r=(0,l.gX)(f),i=r[0],n=r[1],p=k(r,u),M=(r,i,n,s,o,a,l,c)=>{S.save(),this.pushClipPath(t);const h=k([o,a],u),f=k([l,c],u);S.beginPath(),S.moveTo(p[0],p[1]),S.lineTo(h[0],h[1]),S.lineTo(f[0],f[1]),S.lineTo(p[0],p[1]),S.clip();const m=k([r,i],u),d=k([n,s],u),g=S.createLinearGradient(m[0],m[1],d[0],d[1]);(0,I.AH)(g,e),S.fillStyle=g,S.fill("evenodd"),S.restore()};let C="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,c.gradientSize)*((0,l.VL)(f)/2),[b,_]="Discrete"===h?[g,g-C]:[i+C,i];M(b,n,_,n,g,d,g,y),[b,_]="Discrete"===h?[m,m+C]:[i-C,i],M(b,n,_,n,m,y,m,d),C="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,c.gradientSize)*((0,l.uJ)(f)/2);let[x,w]="Discrete"===h?[y,y-C]:[n+C,n];M(i,x,i,w,g,y,m,y),[x,w]="Discrete"===h?[d,d+C]:[n-C,n],M(i,x,i,w,m,d,g,d);break}}S.restore()}drawGradientStroke(t,e){const{capStyle:r,gradientMethod:i,gradientSize:s,gradientSizeUnits:o,joinStyle:l,miterLimit:c,width:h}=e;if(!t||0===h)return;let u;if((0,C.Bi)(t))u=t.rings;else if((0,C.Rg)(t))u=t.paths;else{if(!(0,C.ZC)(t))return void G().error("Unable to draw gradient stroke");u=V(t).rings}const f=e.gradientType??x.D.CIMGradientStroke.gradientType,m=Math.max(this.transformSize((0,a.Lz)(h)),.5),d=this._ctx;let g,p;d.save(),this._setCapStyle(r),this._setJoinStyle(l),void 0!==c&&(d.miterLimit=c),d.lineWidth=m;for(let t of u){if(t=(0,n.o8)(t),Y(t),!t||t.length<=1)continue;let r=0;g=this.transformPt(t[0]);for(let e=1;e<t.length;e++){p=this.transformPt(t[e]);const i=p[0]-g[0],n=p[1]-g[1];r+=Math.sqrt(i*i+n*n),g=p}const l="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,x.D.CIMGradientStroke.gradientSize)*("AcrossLine"===i?m:r);let c=0;g=this.transformPt(t[0]);for(let n=1;n<t.length;n++){p=this.transformPt(t[n]);const s=p[0]-g[0],o=p[1]-g[1],a=Math.sqrt(s*s+o*o);let h,u,y,S;switch(i){case"AcrossLine":{const[t,e]=k([s/a,o/a],-Math.PI/2),r=m/2,i="Discrete"===f?r:l-r;h=(g[0]+p[0])/2+t*i,u=(g[1]+p[1])/2+e*i,y=h-t*l,S=u-e*l;break}case"AlongLine":{const t=s/a,e=o/a;"Discrete"===f?(h=g[0]-t*c,u=g[1]-e*c,y=h+t*l,S=u+e*l):(y=g[0]+t*(r-c),S=g[1]+e*(r-c),h=y-t*l,u=S-e*l);break}default:return G().error("Unrecognized gradient method:",i),void d.restore()}const M=d.createLinearGradient(h,u,y,S);(0,I.AH)(M,e),d.strokeStyle=M,d.beginPath(),d.moveTo(g[0],g[1]),d.lineTo(p[0],p[1]),d.stroke(),c+=a,g=p}}d.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const i of t){const t=i?i.length:0;if(t>1){let n=this.transformPt(i[0]);r.moveTo(n[0],n[1]);for(let e=1;e<t;e++)n=this.transformPt(i[e]),r.lineTo(n[0],n[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function $(t,e){const r=e[0]-t[0],i=e[1]-t[1];return 180/Math.PI*Math.atan2(i,r)}const V=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null;function X(t,e=1){const r=(0,E.DW)(t),i=(0,E._d)(t.fontStyleName),n=t.fontFamilyName??g.Vb,{weight:s,style:o}=i,a=e*(t.height||5),l=(0,E.Bu)(t.horizontalAlignment),c=(0,E.Nl)(t.verticalAlignment),h=(0,E.pM)(t),u=(0,E.pM)(t.haloSymbol),f=null!=u?e*(t.haloSize??0):0,m=(0,E._1)(t.symbol),d=e*((0,E.xo)(t.symbol)||0),p="CIMBackgroundCallout"===t.callout?.type?t.callout.backgroundSymbol:null,y=(0,E.pM)(p),S=(0,E.xo)(p),M=(0,E._1)(p);return{color:h,size:a,horizontalAlignment:l,verticalAlignment:c,font:{family:n,style:(0,E.pV)(o),weight:(0,E.Kn)(s),decoration:r},outline:{size:d||0,color:m},halo:{size:f||0,color:u,style:o},backgroundColor:y,borderLine:null!=S&&null!=M?{size:S,color:M}:null,pixelRatio:1,premultiplyColors:!0}}function Y(t){let e,r,i,n,s,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],r=t[a][1]-o[1],n=0!==e?r/e:Math.PI/2,void 0!==i&&Math.abs(n-i)<=1e-4?(t.splice(a-1,1),o=s):(s=o,o=t[a],a++),i=n}var q=r(59868),Z=r(13195);const j=Math.PI,J=j/2,K=Math.PI/180,Q=96/72,tt=()=>s.A.getLogger("esri.symbols.cim.CIMSymbolHelper");function et(t){let e;switch(t.type){case"cim":return t.data;case"web-style":return t;case"simple-marker":{const r=st.fromSimpleMarker(t);if(!r)throw new Error("InternalError: Cannot convert symbol to CIM");e=r;break}case"picture-marker":e=st.fromPictureMarker(t);break;case"simple-line":e=st.fromSimpleLineSymbol(t);break;case"simple-fill":e=st.fromSimpleFillSymbol(t);break;case"picture-fill":e=st.fromPictureFillSymbol(t);break;case"text":e=st.fromTextSymbol(t)}return{type:"CIMSymbolReference",symbol:e}}function rt(t,e,r){switch(e.type){case"CIMSymbolReference":return rt(t,e.symbol,r);case"CIMPointSymbol":null==r&&(r={x:0,y:0}),t.drawSymbol(e,r);break;case"CIMLineSymbol":null==r&&(r={paths:[[[0,0],[10,0]]]}),t.drawSymbol(e,r);break;case"CIMPolygonSymbol":null==r&&(r={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]}),t.drawSymbol(e,r);break;case"CIMTextSymbol":{const r={x:0,y:0};t.drawSymbol(e,r);break}case"CIMVectorMarker":{const r=new d.W;t.drawMarker(e,r);break}}return t.envelope()}function it(t){if(!t)return 0;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(t.offset??0);default:return 0}}class nt{static getSymbolInflateSize(t,e,r,i,n){return t||(t=[0,0,0,0]),e?this._getInflateSize(t,e,r,i,n):t}static safeSize(t){const e=Math.max(Math.abs(t[0]),Math.abs(t[2])),r=Math.max(Math.abs(t[1]),Math.abs(t[3]));return Math.sqrt(e*e+r*r)}static _vectorMarkerBounds(t,e,r,i){let n=!0;const s=(0,l.vt)();if(e?.markerGraphics)for(const o of e.markerGraphics){const e=[0,0,0,0];o.geometry&&((0,c.Rg)(s,o.geometry),e[0]=0,e[1]=0,e[2]=0,e[3]=0,this.getSymbolInflateSize(e,o.symbol,r,0,i),s[0]+=e[0],s[1]+=e[1],s[2]+=e[2],s[3]+=e[3],n?(t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],n=!1):(t[0]=Math.min(t[0],s[0]),t[1]=Math.min(t[1],s[1]),t[2]=Math.max(t[2],s[2]),t[3]=Math.max(t[3],s[3])))}return t}static _getInflateSize(t,e,r,i,n){if(function(t){return void 0!==t.symbolLayers}(e)){const s=this._getLayersInflateSize(t,e.symbolLayers,r,i,n),o=(0,E.ll)(e.effects);return o>0&&(s[0]-=o,s[1]-=o,s[2]+=o,s[3]+=o),s}return this._getTextInflatedSize(t,e,n)}static _getLayersInflateSize(t,e,r,i,n){let s=!0;if(!e)return t;for(const o of e){if(!o)continue;let e=[0,0,0,0];switch(o.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=o;let r=t.width;null!=r&&("Square"===t.capStyle||"Miter"===t.joinStyle?r/=1.4142135623730951:r/=2,e[0]=-r,e[1]=-r,e[2]=r,e[3]=r);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const t=o;if("CIMVectorMarker"===o.type){const t=o;if(e=this._vectorMarkerBounds(e,t,r,n),t.frame){const r=(t.frame.xmin+t.frame.xmax)/2,i=(t.frame.ymin+t.frame.ymax)/2;if(e[0]-=r,e[1]-=i,e[2]-=r,e[3]-=i,null!=t.size){const r=t.size/(t.frame.ymax-t.frame.ymin);e[0]*=r,e[1]*=r,e[2]*=r,e[3]*=r}}}else if("CIMPictureMarker"===o.type){const i=o,n=r.getResource(i.url);let s=1;if(null!=n&&n.height&&(s=n.width/n.height),null!=t.size){const r=t.size/2,n=t.size*s*(i.scaleX??1)/2;e=[-n,-r,n,r]}}else if(null!=t.size){const r=t.size/2;e=[-r,-r,r,r]}if(t.anchorPoint){let r,i;"Absolute"===t.anchorPointUnits?(r=t.anchorPoint.x,i=t.anchorPoint.y):(r=t.anchorPoint.x*(e[2]-e[0]),i=t.anchorPoint.y*(e[3]-e[1]));const n=1.25*Math.sqrt(r*r+i*i);e[0]-=n,e[1]-=n,e[2]+=n,e[3]+=n}let s=(0,E.$w)(t.rotation);if(t.rotateClockwise&&(s=-s),i&&(s-=i),s){const t=K*s,r=Math.cos(t),i=Math.sin(t),n=(0,l.vt)([Z.MG,Z.MG,-Z.MG,-Z.MG]);(0,l.tK)(n,[e[0]*r-e[1]*i,e[0]*i+e[1]*r]),(0,l.tK)(n,[e[0]*r-e[3]*i,e[0]*i+e[3]*r]),(0,l.tK)(n,[e[2]*r-e[1]*i,e[2]*i+e[1]*r]),(0,l.tK)(n,[e[2]*r-e[3]*i,e[2]*i+e[3]*r]),e=n}let a=(0,E.$w)(t.offsetX),c=(0,E.$w)(t.offsetY);if(i){const t=K*i,e=Math.cos(t),r=Math.sin(t),n=a*r+c*e;a=a*e-c*r,c=n}e[0]+=a,e[1]+=c,e[2]+=a,e[3]+=c;const h=it(t.markerPlacement);h>0&&(e[0]-=h,e[1]-=h,e[2]+=h,e[3]+=h);break}}const a=(0,E.ll)(o.effects);a>0&&(e[0]-=a,e[1]-=a,e[2]+=a,e[3]+=a),s?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],s=!1):(t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]))}return t}static _getTextInflatedSize(t,e,r){const i=(0,B.hV)(e.height??x.D.CIMTextSymbol.height);if(t[0]=-i/2,t[1]=-i/2,t[2]=i/2,t[3]=i/2,!r)return t;const n=r.get(e);if(!n)return t;if(!function(t){return"glyphs"===t.type?t.glyphs.length>0:t.runs.some(t=>t.glyphs.glyphs.length>0)}(n.glyphMosaicItems))return t;const{lineGapType:s,lineGap:o}=e,a=s?((t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}})(s,o??0,i):0,l=e.horizontalAlignment??x.D.CIMTextSymbol.horizontalalignment,c=e.verticalAlignment??x.D.CIMTextSymbol.verticalalignment,h="CIMBackgroundCallout"===e.callout?.type,u=(0,D.tA)(n.glyphMosaicItems,{scale:i/24,angle:(0,E.$w)(e.angle),xOffset:(0,E.$w)(e.offsetX),yOffset:(0,E.$w)(e.offsetY),horizontalAlignment:l,verticalAlignment:c,maxLineWidth:(0,B.Lu)(e.lineWidth),lineHeight:29*Math.max(.25,Math.min(a||1,4)),decoration:e.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:h}).boundsT,f=Math.sqrt(u.width*u.width+u.height*u.height);return t[0]-=u.x+f,t[1]-=u.y-f,t[2]+=u.x+f,t[3]+=-u.y+f,t}}class st{static getEnvelope(t,e,r,i){if(!t)return null;const n=new N(r,i);if(Array.isArray(t)){let r;for(const i of t)r?r.union(rt(n,i,e)):r=rt(n,i,e);return r}return rt(n,t,e)}static getTextureInfo(t,e,r,i,n){const s=i??this.getEnvelope(t,null,e);if(!s)return[0,0,0,0,1];const o=Math.max(s.width,s.height)*Q;let a=null!=n?Math.max(n/o,1):1;a*=Q,s.x*=a,s.y*=a,s.width*=a,s.height*=a,s.width=Math.max(Math.ceil(s.x+s.width)-Math.floor(s.x),1)-1,s.height=Math.max(Math.ceil(s.y+s.height)-Math.floor(s.y),1)-1;let l=s.x+.5*s.width,c=s.y+.5*s.height;return l+=s.x-Math.floor(s.x),c+=s.y-Math.floor(s.y),i||(s.width+=r,s.height+=r,l+=r/2,c+=r/2),[s.width,s.height,l,c,a]}static getTextureAnchor(t,e,r){const[i,n,s,o,a]=this.getTextureInfo(t,e,2,null,r);return[-s/i,-o/n,n/a*Q]}static rasterize(t,e,r,i,n=!0,s){const[o,a,l,c,h]=this.getTextureInfo(e,i,2,r,s);t.width=o,t.height=a;const u=t.getContext("2d",{willReadFrequently:!0}),f=O.createScale(h,-h);f.translate(.5*o-l,.5*a+c);const m=new W(u,i,f);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};m.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new d.W;m.drawMarker(e,t);break}}const g=u.getImageData(0,0,t.width,t.height),p=new Uint8Array(g.data);if(n){let t;for(let e=0;e<p.length;e+=4)t=p[e+3]/255,p[e]=p[e]*t,p[e+1]=p[e+1]*t,p[e+2]=p[e+2]*t}return[p,t.width,t.height,-l/o,-c/a]}static fromTextSymbol(t){const{text:e}=t;return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:st.createCIMTextSymbolfromTextSymbol(t),textString:e}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:r,width:i,xoffset:n,xscale:s,yoffset:o,yscale:a}=t,l=[],c={type:"CIMPolygonSymbol",symbolLayers:l};if(r){const t=St(r);t&&l.push(t)}let h=t.url;"esriPFS"===t.type&&t.imageData&&(h=t.imageData);const u="angle"in t?t.angle??0:0,f=(i??0)*(s||1),m=(e??0)*(a||1);return l.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:h,height:m,width:f,offsetX:(0,E.$w)(n),offsetY:(0,E.$w)(o),rotation:(0,E.$w)(-u),colorSubstitutions:null}),c}static fromSimpleFillSymbol(t){const{color:e,style:r,outline:i}=t,s=[],o={type:"CIMPolygonSymbol",symbolLayers:s};if(i){const t=St(i);t&&s.push(t)}if(r&&"solid"!==r&&"none"!==r&&"esriSFSSolid"!==r&&"esriSFSNull"!==r){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:ut(e),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let i=0;const o=(0,a.PN)(yt(r)?8:10);switch(r){case"vertical":case"esriSFSVertical":i=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":i=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":i=45;break;case"cross":case"esriSFSCross":i=0}s.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:i,separation:o}),"cross"===r||"esriSFSCross"===r?s.push({type:"CIMHatchFill",lineSymbol:(0,n.o8)(t),offsetX:0,offsetY:0,rotation:90,separation:o}):"diagonal-cross"!==r&&"esriSFSDiagonalCross"!==r||s.push({type:"CIMHatchFill",lineSymbol:(0,n.o8)(t),offsetX:0,offsetY:0,rotation:45,separation:o})}else!r||"solid"!==r&&"esriSFSSolid"!==r||s.push({type:"CIMSolidFill",enable:!0,color:ut(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:r,join:i,marker:n,miterLimit:s,style:o,width:a}=t;let l=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(l=[{type:"CIMGeometricEffectDashes",dashTemplate:gt(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const c=[];if(n){let t;switch(n.placement){case"begin-end":t="Both";break;case"begin":t="JustBegin";break;case"end":t="JustEnd";break;default:t="None"}const e=st.fromSimpleMarker(n,a,r).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:t,offsetAlongLine:0},c.push(e)}return c.push({type:"CIMSolidStroke",color:"none"!==o&&"esriSLSNull"!==o?ut(r):[0,0,0,0],capStyle:at(e),joinStyle:lt(i),miterLimit:s,width:a,effects:l}),{type:"CIMLineSymbol",symbolLayers:c}}static fromPictureMarker(t){const{angle:e,height:r,width:i,xoffset:n,yoffset:s}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:r,width:i,offsetX:(0,E.$w)(n),offsetY:(0,E.$w)(s),rotation:(0,E.$w)(-e)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:e,color:r,font:n,haloColor:s,haloSize:o,horizontalAlignment:a,kerning:l,lineWidth:c,text:h,verticalAlignment:u,xoffset:f,yoffset:m,backgroundColor:d,borderLineColor:g,borderLineSize:p}=t;let y,S,M,C,b,_;n&&(y=n.family,S=n.style,M=n.weight,C=n.size,b=n.decoration);let x=!1;return h&&(x=(0,i.y)(h)[1]),(d||p)&&(_={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(d)},{type:"CIMSolidStroke",enable:!0,color:ut(g),width:p??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:e,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:y||"Arial",fontStyleName:ft(S,M),fontType:0,haloSize:o,height:C,hinting:1,horizontalAlignment:ct(a??"center"),kerning:l,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:c,offsetX:(0,E.$w)(f),offsetY:(0,E.$w)(m),strikethrough:"line-through"===b,underline:"underline"===b,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(r)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(s)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:x?1:0,verticalAlignment:ht(u??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:_}}static createPictureMarkerRasterizationParam(t){const{angle:e,height:r,width:i,xoffset:n,yoffset:s}=t,o=t.url??t.source?.url??t.source?.imageData;return o?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:r,width:i,offsetX:(0,E.$w)(n),offsetY:(0,E.$w)(s),rotation:(0,E.$w)(-e)}}:null}static createPictureFillRasterizationParam(t){const{width:e,height:r,xoffset:i,yoffset:n,url:s}=t;return s?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:s,width:e,height:r,offsetX:(0,E.$w)(i),offsetY:(0,E.$w)(n),rotation:0}}:null}static fromSimpleMarker(t,e,r){const{style:i}=t,n=t.color??r;if("path"===i||"esriSMSPath"===i){const e=[];if("outline"in t&&t.outline){const r=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:r.width,color:ut(r.color),path:t.path})}e.push({type:"CIMSolidFill",enable:!0,color:ut(n),path:t.path});const[r,i]=pt("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-(0,E.$w)(t.angle),size:(0,E.$w)(t.size||6),offsetX:(0,E.$w)(t.xoffset),offsetY:(0,E.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:r,markerGraphics:[{type:"CIMMarkerGraphic",geometry:i,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const s=[];let o,a,l=t.size;if("outline"in t&&t.outline&&"none"!==t.outline.style&&"esriSLSNull"!==t.outline.style){const e=t.outline,r="solid"!==e.style&&"esriSLSSolid"!==e.style;[o,a]=r?pt(i,t.size):pt(i);const n=e.width??q.A7.width;if(r){const e=n/t.size,r=(o.xmax-o.xmin)*e/2,i=(o.ymax-o.ymin)*e/2;o.xmin-=r,o.xmax+=r,o.ymin-=i,o.ymax+=i,l&&(l+=n)}const c="cross"!==t.style&&"x"!==t.style||"dot"===t?.outline.style||"short-dot"===t?.outline.style?"HalfGap":"FullPattern",h=r?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:gt(e.style,null).map(t=>e.width&&e.width>0?t*e.width:t),lineDashEnding:c,controlPointEnding:"FullPattern"}]:void 0;s.push({type:"CIMSolidStroke",capStyle:r?"Round":"Butt",enable:!0,width:n,color:ut(e.color),effects:h})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style?[o,a]=pt(i):([o,a]=pt(i),s.push({type:"CIMSolidStroke",enable:!0,width:e,color:ut(n)}));s.push({type:"CIMSolidFill",enable:!0,color:ut(n)});const c={type:"CIMPolygonSymbol",symbolLayers:s};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,E.$w)(-t.angle),size:(0,E.$w)(l||6*e),offsetX:(0,E.$w)(t.xoffset),offsetY:(0,E.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:c}]}]}}static fromCIMHatchFill(t,e){const r=e*(t.separation??x.D.CIMHatchFill.separation),i=r/2,s=(0,n.o8)(t.lineSymbol);s.symbolLayers?.forEach(t=>{switch(t.type){case"CIMSolidStroke":null!=t.width&&(t.width*=e),t.effects?.forEach(t=>{if("CIMGeometricEffectDashes"===t.type){const r=t.dashTemplate;t.dashTemplate=r?.map(t=>t*e)}});break;case"CIMVectorMarker":{null!=t.size&&(t.size*=e);const r=t.markerPlacement;null!=r&&"placementTemplate"in r&&(r.placementTemplate=r.placementTemplate.map(t=>t*e));break}}});let o=this._getLineSymbolPeriod(s)||4;for(;o<4;)o*=2;const a=o/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-a,xmax:a,ymin:-i,ymax:i},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-a,0],[a,0]]]},symbol:s}],size:r}}static async normalizeSymbolAndFetchResources(t,e,r=null){if(!t)return;const i=[];if("effects"in t&&t.effects)for(const e of t.effects)i.push((0,m.ai)(e));async function n(t){if("CIMTextSymbol"!==t.type)return;const{fontFamilyName:r,fontStyleName:i}=t;if("calcitewebcoreicons"===r?.toLowerCase())return;const{style:n,weight:s}=(0,E._d)(i),o=(0,E.DW)(t),a=new f.A({family:r,style:n,weight:s,decoration:o});try{await e.loadFont(a)}catch{tt().error(`Unsupported font ${r} in CIM symbol`)}}i.push(n(t)),ot(t,t=>{if(t.effects)for(const e of t.effects)i.push((0,m.ai)(e));if("CIMVectorMarker"===t.type){for(const e of t.markerGraphics)(0,h.Ed)(e.geometry)&&(e.geometry=(0,u.GS)(e.geometry,{maxDeviation:.01}));t.markerPlacement&&i.push((0,m.g1)(t.markerPlacement))}"url"in t&&t.url&&i.push(e.fetchResource(t.url,{signal:r})),"symbol"in t&&i.push(n(t.symbol))}),await Promise.all(i)}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers)if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;switch(e.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=this._getPlacementRepeat(e.markerPlacement);if(t)return t}}}}return 0}static _getEffectsRepeat(t){if(t)for(const e of t)if(e)switch(e.type){case"CIMGeometricEffectDashes":{const t=e.dashTemplate;if(t&&t.length){let e=0;for(const r of t)e+=r;return 1&t.length&&(e*=2),e}break}case"CIMGeometricEffectWave":return e.period;default:tt().error(`unsupported geometric effect type ${e.type}`)}return 0}static _getPlacementRepeat(t){if(t)switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const e=t.placementTemplate;if(e&&e.length){let t=0;for(const r of e)t+=+r;return 1&e.length&&(t*=2),t}break}}return 0}static fromCIMInsidePolygon(t){const e=t.markerPlacement,r={...t};r.markerPlacement=null,r.anchorPoint=null;const i=Math.abs(e.stepX),n=Math.abs(e.stepY),s=(e.randomness??100)/100;let l,c,h,u;if("Random"===e.gridType){const t=(0,a.PN)(1024),r=Math.max(Math.floor(t/i),1),f=Math.max(Math.floor(t/n),1);l=r*i/2,c=f*n/2,h=2*c;const m=new o.A(e.seed),d=s*i/1.5,g=s*n/1.5;u=[];for(let t=0;t<r;t++)for(let e=0;e<f;e++){const r=t*i-l+d*(.5-m.getFloat()),s=e*n-c+g*(.5-m.getFloat());u.push({x:r,y:s}),0===t&&u.push({x:r+2*l,y:s}),0===e&&u.push({x:r,y:s+2*c})}}else!0===e.shiftOddRows?(l=i/2,c=n,h=2*n,u=[{x:-l,y:0},{x:l,y:0},{x:0,y:c},{x:0,y:-c}]):(l=i/2,c=n/2,h=n,u=[{x:-i,y:0},{x:0,y:-n},{x:-i,y:-n},{x:0,y:0},{x:i,y:0},{x:0,y:n},{x:i,y:n},{x:-i,y:n},{x:i,y:-n}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-l,xmax:l,ymin:-c,ymax:c},markerGraphics:u.map(t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[r]}})),size:h}}}function ot(t,e){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const r=t.symbolLayers;if(!r)return;for(const t of r)if(e(t),"CIMVectorMarker"===t.type){const r=t.markerGraphics;if(!r)continue;for(const t of r)if(t){const r=t.symbol;r&&ot(r,e)}}break}}}const at=t=>{if(!t)return"Butt";switch(t){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},lt=t=>{if(!t)return"Miter";switch(t){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},ct=t=>{if(null==t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center";case"justify":return"Justify"}},ht=t=>{if(null==t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},ut=t=>{if(!t)return[0,0,0,0];const{r:e,g:r,b:i,a:n}=t;return[e,r,i,255*n]},ft=(t,e)=>{const r=mt(e),i=dt(t);return r&&i?`${r}-${i}`:`${r}${i}`},mt=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},dt=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},gt=(t,e)=>{const r=.001,i="butt"===e;switch(t){case"dash":case"esriSLSDash":return i?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return i?[4,3,1,3]:[3,4,r,4];case"dot":case"esriSLSDot":return i?[1,3]:[r,4];case"long-dash":case"esriSLSLongDash":return i?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return i?[8,3,1,3]:[7,4,r,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return i?[8,3,1,3,1,3]:[7,4,r,4,r,4];case"short-dash":case"esriSLSShortDash":return i?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return i?[4,1,1,1]:[3,2,r,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return i?[4,1,1,1,1,1]:[3,2,r,2,r,2];case"short-dot":case"esriSLSShortDot":return i?[1,1]:[r,2];case"solid":case"esriSLSSolid":case"none":return tt().error("Unexpected: style does not require rasterization"),[0,0];default:return tt().error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},pt=(t,e=100)=>{const r=e/2;let i,n;const s=t;if("circle"===s||"esriSMSCircle"===s){const t=.25;let e=Math.acos(1-t/r),s=Math.ceil(j/e/4);0===s&&(s=1),e=J/s,s*=4;const o=[];o.push([r,0]);for(let t=1;t<s;t++)o.push([r*Math.cos(t*e),-r*Math.sin(t*e)]);o.push([r,0]),i={rings:[o]},n={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("cross"===s||"esriSMSCross"===s){const t=0;i={paths:[[[t,r],[t,-r]],[[r,t],[-r,t]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("diamond"===s||"esriSMSDiamond"===s)i={rings:[[[-r,0],[0,r],[r,0],[0,-r],[-r,0]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("square"===s||"esriSMSSquare"===s)i={rings:[[[-r,-r],[-r,r],[r,r],[r,-r],[-r,-r]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("x"===s||"esriSMSX"===s)i={paths:[[[r,r],[-r,-r]],[[r,-r],[-r,r]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("triangle"===s||"esriSMSTriangle"===s){const t=.5773502691896257*e,r=-t,s=2/3*e,o=s-e;i={rings:[[[r,o],[0,s],[t,o],[r,o]]]},n={xmin:r,ymin:o,xmax:t,ymax:s}}else"arrow"===s&&(i={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r});return[n,i]},yt=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t;function St(t){if(!t)return null;let e=null;const{cap:r,color:i,join:n,miterLimit:s,style:o,width:a}=t;return"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(e=[{type:"CIMGeometricEffectDashes",dashTemplate:gt(o,r),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==o&&"none"!==o?ut(i):[0,0,0,0],capStyle:at(r),joinStyle:lt(n),miterLimit:s,width:a,effects:e}}},28076(t,e,r){var i=r(13337);const n={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:i.h.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:i.h.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCircularSector:{radius:25,startangle:0,endangle:45},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distancealong:100,movementtype:"Distance"}};r.d(e,["D",0,n])},44589(t,e,r){r.d(e,{AH:()=>a}),r(40804);var i=r(53966),n=(r(34727),r(35521),r(28076));const s=()=>i.A.getLogger("esri.symbols.cim.rasterizingUtils");let o;function a(t,e){const{colorRamp:r,gradientType:i}=e,s=l(r),a="CIMFixedColorRamp"===r.type;if("Continuous"===i&&!a)return c(t,s);const h=e.interval??n.D.CIMGradientFill.interval;if(a)return c(t,function(t,e){const r=[],i=(t.length-1)/(e-1);for(let n=0;n<e;n++){const s=t[Math.round(n*i)].color;r.push({offset:n/e,color:s}),r.push({offset:(n+1)/e,color:s})}return r}(s,h));const u=[];o??=document.createElement("canvas"),function(t,e,r,i,n){const s=r+2*n;t.width=s,t.height=i;const o=(n+1)/s,a=t.getContext("2d",{willReadFrequently:!0});if(e.length>0){const t=a.createLinearGradient(0,0,s,i);c(t,e,o),a.fillStyle=t}else a.fillStyle="rgba(128, 128, 128, 1)";a.fillRect(0,0,s,i)}(o,s,h,1,0);const f=o.getContext("2d").getImageData(0,0,h,1).data;for(let t=0,e=0;t<h;t++,e=4*t){const r=[f[e+0],f[e+1],f[e+2],f[e+3]];u.push({offset:t/h,color:r}),u.push({offset:(t+1)/h,color:r})}return c(t,u)}function l(t){const e=[];switch(t.type){case"CIMPolarContinuousColorRamp":case"CIMLinearContinuousColorRamp":{"CIMPolarContinuousColorRamp"===t.type&&s().warnOnce("CIMPolarContinuousColorRamp is currently unsupported. Falling back to CIMLinearContinuousColorRamp.");const r=t;e.push({offset:0,color:[r.fromColor[0],r.fromColor[1],r.fromColor[2],r.fromColor[3]/255]}),e.push({offset:1,color:[r.toColor[0],r.toColor[1],r.toColor[2],r.toColor[3]/255]});break}case"CIMFixedColorRamp":{const r=t,i=1/(r.colors.length-1);let n=0;for(const t of r.colors)e.push({offset:n,color:[t[0],t[1],t[2],t[3]/255]}),n+=i;break}case"CIMMultipartColorRamp":{const r=t,i=r.weights.reduce((t,e)=>t+e,0);let n=0;for(let t=0;t<r.colorRamps.length;t++){const s=r.colorRamps[t],o=r.weights[t],a=l(s);for(const t of a)e.push({offset:(n+t.offset*o)/i,color:t.color});n+=o}break}default:s().error(`Color ramp "${t.type}" currently unsupported.`)}return e}function c(t,e,r=0){for(const{offset:i,color:n}of e)t.addColorStop(Math.min(Math.max(i,r),1-r),`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]})`)}},13337(t,e,r){r.d(e,["h",0,{Relative:0,Absolute:1}])},93397(t,e,r){r.d(e,{Bu:()=>x,DW:()=>M,FH:()=>L,FM:()=>a,Kn:()=>y,Kq:()=>O,MM:()=>u,Nl:()=>w,O2:()=>k,YC:()=>R,YF:()=>I,_1:()=>b,_d:()=>S,_h:()=>o,bs:()=>T,e6:()=>c,gQ:()=>s,jn:()=>m,lW:()=>h,ll:()=>F,mA:()=>f,oI:()=>H,pM:()=>C,pV:()=>p,pk:()=>v,rB:()=>A,xo:()=>_,yX:()=>G,zb:()=>P,zr:()=>d});var i=r(28076);function n(t){let e=t.length;for(;e--;)if(!" /-,\n".includes(t.charAt(e)))return!1;return!0}function s(t,e){const r=[];let i=0,s=-1;do{if(s=t.indexOf("[",i),s>=i){if(s>i){const e=t.slice(i,s);r.push([e,null,n(e)])}if(i=s+1,s=t.indexOf("]",i),s>=i){if(s>i){const n=e[t.slice(i,s)];n&&r.push([null,n,!1])}i=s+1}}}while(-1!==s);if(i<t.length){const e=t.slice(i);r.push([e,null,n(e)])}return r}function o(t,e,r){let i="",n=null;for(const r of e){const[e,s,o]=r;if(null!=e&&""!==e)o?n=e:(null!=n&&(i+=n,n=null),i+=e);else{const e=t.readAttribute(s);null!=e&&""!==e&&(null!==n&&(i+=n,n=null),i+=e)}}return l(i,r)}function a(t,e,r,i){let n="",s=null;for(const i of e){const[e,o,a]=i;if(null!=e&&""!==e)a?s=e:(null!=s&&(n+=s,s=null),n+=e);else{let e=o;null!=r&&(e=z(o,r));const i=t.attributes[e];null!=i&&""!==i&&(null!=s&&(n+=s,s=null),n+=i)}}return l(n,i)}function l(t,e){switch("string"!=typeof t&&(t=String(t)),e){case"LowerCase":return t.toLowerCase();case"Allcaps":return t.toUpperCase();default:return t}}function c(t){return t?[t[0],t[1],t[2],t[3]/255]:[0,0,0,0]}function h(t){return t.data?.symbol??null}function u(t){return"CIMVectorMarker"===t.type||"CIMPictureMarker"===t.type||"CIMBarChartMarker"===t.type||"CIMCharacterMarker"===t.type||"CIMPieChartMarker"===t.type||"CIMStackedBarChartMarker"===t.type}function f(t){return"CIMGradientStroke"===t.type||"CIMPictureStroke"===t.type||"CIMSolidStroke"===t.type}function m(t){return null!=t&&("CIMGradientFill"===t.type||"CIMHatchFill"===t.type||"CIMPictureFill"===t.type||"CIMSolidFill"===t.type||"CIMWaterFill"===t.type)}function d(t){return null!=t&&("CIMMarkerPlacementAlongLineRandomSize"===t.type||"CIMMarkerPlacementAlongLineSameSize"===t.type||"CIMMarkerPlacementAlongLineVariableSize"===t.type||"CIMMarkerPlacementAtExtremities"===t.type||"CIMMarkerPlacementAtMeasuredUnits"===t.type||"CIMMarkerPlacementAtRatioPositions"===t.type||"CIMMarkerPlacementOnLine"===t.type||"CIMMarkerPlacementOnVertices"===t.type)}const g=(t,e=0)=>null==t||isNaN(t)?e:t;function p(t){if(!t)return"normal";switch(t.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function y(t){if(!t)return"normal";switch(t.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function S(t){let e="normal",r="normal";if(t){const i=t.toLowerCase();i.includes("italic")?e="italic":i.includes("oblique")&&(e="oblique"),i.includes("bold")?r="bold":i.includes("light")&&(r="lighter")}return{style:e,weight:r}}function M(t){return t.underline?"underline":t.strikethrough?"line-through":"none"}function C(t){if(!t)return null;switch(t.type){case"CIMPolygonSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=C(e);if(null!=t)return t}break;case"CIMTextSymbol":return C(t.symbol);case"CIMSolidFill":return t.color}return null}function b(t){if(t)switch(t.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const e=t.symbolLayers;if(e)for(const t of e){const e=b(t);if(null!=e)return e}break}case"CIMTextSymbol":return b(t.symbol);case"CIMSolidStroke":return t.color}}function _(t){if(t)switch(t.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=_(e);if(void 0!==t)return t}break;case"CIMTextSymbol":return _(t.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return t.width}}function x(t){switch(t){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function w(t){switch(t){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function k(t){return(t?Object.keys(t):[]).map(e=>({name:e,alias:e,type:"string"==typeof t[e]?"esriFieldTypeString":"esriFieldTypeDouble"}))}function I(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}function P(t,e,r,i,n,s,o=!0){const{infos:a}=s;let l=1,c=0,h=0,u=0,f=1;for(const{absoluteAnchorPoint:t,offsetX:e,offsetY:r,rotation:i,size:n,frameHeight:s,rotateClockWise:m,scaleSymbolsProportionally:d}of a)f=t?1:l,h=B(e,r,c,f,h),u=D(e,r,c,f,u),s&&(d||o)&&(l*=n/s),c=U(i,m,c);const m=B(i,n,c,f,h),d=D(i,n,c,f,u);return{size:t*l,rotation:U(e,r,c),offsetX:m,offsetY:d}}function L(t){return t?.dashTemplate&&(t.dashTemplate=function(t){return"string"==typeof t?function(t){return t.split(" ").map(t=>Number(t))}(t):t}(t.dashTemplate)),t}function T(t){if(null==t)return"Normal";switch(t.type){case"CIMTextSymbol":return t.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const e=t.symbolLayers;if(!e)return"Normal";for(const t of e)if("CIMVectorMarker"===t.type)return T(t)}break;case"CIMVectorMarker":{const e=t.markerGraphics;if(!e)return"Normal";for(const t of e)if(t.symbol)return T(t.symbol)}}return"Normal"}function R(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let e=0;if(t.symbolLayers)for(const r of t.symbolLayers)if(r)switch(r.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=r.size??i.D.CIMVectorMarker.size;t>e&&(e=t);break}}return e}case"CIMLineSymbol":case"CIMPolygonSymbol":{let e=0;if(t.symbolLayers)for(const r of t.symbolLayers)if(r)switch(r.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=r.width;null!=t&&t>e&&(e=t);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(r.markerPlacement&&d(r.markerPlacement)){const t=r.size??i.D.CIMVectorMarker.size;t>e&&(e=t)}break;case"CIMPictureFill":{const t=r.height;null!=t&&t>e&&(e=t)}}return e}}}function z(t,e){if(null!==e){const r=e.get(t);return r?r.name:t}return t}function v(t){return t.map(t=>({...t,propertyName:I(t.propertyName)}))}function A(t){const e={};for(const r in t){const i=t[r];e[I(r)]=i}return e}function F(t){if(!t)return 0;let e=0;for(const r of t)e+=E(r);return e}function E(t){if(!t)return 0;if(O(t))return t.inflateSize??256;switch(t.type){case"CIMGeometricEffectArrow":return Math.abs(.5*t.width);case"CIMGeometricEffectBuffer":return Math.abs(t.size);case"CIMGeometricEffectCircularSector":return Math.abs(t.radius??25);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(t.length);case"CIMGeometricEffectJog":return Math.abs(.5*t.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(g(t.offsetX)),Math.abs(g(t.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(t.offset);case"CIMGeometricEffectRadial":return Math.abs(t.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(t.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(t.fromWidth),Math.abs(t.toWidth));case"CIMGeometricEffectWave":return Math.abs(t.amplitude);case"CIMGeometricEffectDonut":return Math.abs(t.width)}}function D(t,e,r,i,n){const s=r*Math.PI/180;if(s){const r=Math.cos(s);return(Math.sin(s)*t+r*e)*i+n}return e*i+n}function B(t,e,r,i,n){const s=r*Math.PI/180;return s?(Math.cos(s)*t-Math.sin(s)*e)*i+n:t*i+n}function U(t,e,r){return e?r-t:r+t}function G(t,e){return Math.max(Math.min((t??e)/100,1),0)}function O(t){return t.type.startsWith("Private")}function H(t){return null!=t&&function(t){return"setControlPoint"in t&&"getControlPoint"in t&&"setControlPointAt"in t&&"getControlPointAt"in t}(t)?t:void 0}r.d(e,["$w",0,g,"UE",0,t=>t.includes("data:image/svg+xml")])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4583],{9775(t,e,s){s.d(e,{A:()=>n});var i=s(62788),r=s(95488);class n{constructor(t=t=>t.values().next().value){this._peeker=t,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let t;for(t of this._items);return t}peek(){if(0!==this.length)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return(0,i.gc)(this._observable),this._items.has(t)}pop(){if(0===this.length)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(0===this.length)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const e=this.length;return this._items.forEach(e=>{t(e)||this._items.delete(e)}),e!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},69397(t,e,s){s.d(e,{Qf:()=>o,Qh:()=>n,lM:()=>r});var i=s(34275);function r(t){if(!t)return 0;let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=a(t[s],!1));return e}function n(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let s=h;for(let i=0;i<e;i++)s+=a(t[i]);return s}(t);let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=a(t[s]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?n(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...t){return t.reduce((t,e)=>t+(e?(0,i.iu)(e)?e.byteLength+c:Array.isArray(e)?u(e,16):0:0),0)}function u(t,e){return h+t.length*e}const l=32,h=16,c=145},36745(t,e,s){s.d(e,{z:()=>o});var i=s(4718),r=s(51118),n=s(60408),a=s(92722);class o{static fromOptimized(t,e,s=1){return(new u).initialize(t,e,s)}static fromJSON(t){const[e,s]=h(t),i=(0,n.Pv)(t),r=(0,n.W0)(t);return(new c).initialize(e,s,i,r,1)}static fromOptimizedCIM(t,e,s=1){return(new p).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[s,i]=h(t),r=(0,n.Pv)(t),a=(0,n.W0)(t);return(new d).initialize(s,i,r,a,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new p).initialize(new a.A([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new c).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new p).initialize(new a.A([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new d).initialize([],t,e,s,i)}asJSON(){const t=(0,r.x)(this),{hasZ:e,hasM:s}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:s}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:s?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:s}:{paths:t,hasZ:e,hasM:s}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,r=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+r),-.5*s}invertY(){this.yFactor*=-1}}class u extends o{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new u).initialize(new a.A([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let r=this._pathOffset+e;r<t;r+=e){const t=s[r-e],n=s[r-e+1],a=s[r]-t,o=s[r+1]-n;i+=Math.sqrt(a*a+o*o)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new u).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function h(t){return(0,n.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,n.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,n.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,n.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class c extends o{initialize(t,e,s,i,r){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=r,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],r=e[i],n=t[0],a=t[1],o=r[0]-n,u=r[1]-a;s+=Math.sqrt(o*o+u*u)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new c).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,r.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new a.A([],[],t,e),{coords:i,lengths:r}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),r.length=0;else for(const s of this._paths){for(const r of s)i.push(r[0]),i.push(r[1]*this.yFactor),t&&i.push(r[2]),e&&i.push(r[this._mIndex]);r.push(s.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new c).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class p extends u{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new p).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends c{initialize(t,e,s,i,r){return super.initialize(t,e,s,i,r)}clone(){return(new d).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},32011(t,e,s){s.d(e,{d:()=>u});var i=s(19419),r=s(537),n=s(12359),a=s(95108),o=s(12176);function u(t){if(0===t.totalSize)return null;const e=(0,r.z8)(t);if(!e)return null;const s=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let a=0,o=0;t.reset();for(let e=0;t.nextPath();e++){const s=t.getCurrentRingArea();s>o&&(o=s,a=e)}if(t.seekPath(a),0===t.pathSize)return null;t.seekPathStart();const u=(0,r.B$)(t);if(Math.abs(o)<=2*s*s)return[(u[0]+u[2])/2,(u[1]+u[3])/2];t.seekPathStart();const p=(0,n.w2)(t,(0,i.vt)());if(null===p)return null;if(t.totalPoints<4)return p;const d=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],f=[NaN,NaN,NaN,NaN],g=[NaN,NaN,NaN,NaN];let x=!1,w=h(p,t,!0);0===w.distance&&(x=!0,d[0][0]=p[0],d[0][1]=p[1],w=h(p,t,!1)),f[0]=w.distance,g[0]=0;const I=[NaN,NaN];let P=!1,F=.25,S=-1,v=NaN;do{if(v=NaN,d[1]=c(t,y(u[0],u[2],F),0,e),isNaN(d[1][0])||isNaN(d[1][1])||(w=h(d[1],t,!1),v=w.distance),!isNaN(v)&&v>s&&l(d[1],t))P=!0,f[1]=v,g[1]=_(d[1],p);else if(!isNaN(v)&&v>S&&(S=v,I[0]=d[1][0],I[1]=d[1][1]),F-=.01,F<.1){if(!(S>=0))break;P=!0,f[1]=S,d[1][0]=I[0],d[1][1]=I[1],g[1]=_(d[1],p)}}while(!P);P=!1,F=.5,S=-1;let b=.01,N=1;do{if(v=NaN,d[2]=c(t,y(u[0],u[2],F),0,e),isNaN(d[2][0])||isNaN(d[2][1])||(w=h(d[2],t,!1),v=w.distance),!isNaN(v)&&v>s&&l(d[2],t))P=!0,f[2]=v,g[2]=_(d[2],p);else if(!isNaN(v)&&v>S)S=v,I[0]=d[2][0],I[1]=d[2][1];else if(v>S&&(S=v,I[0]=d[2][0],I[1]=d[2][1]),F=.5+b*N,b+=.01,N*=-1,F<.3||F>.7){if(!(S>=0))break;P=!0,f[2]=S,d[2][0]=I[0],d[2][1]=I[1],g[2]=_(d[2],p)}}while(!P);P=!1,F=.75,S=-1;do{if(v=NaN,d[3]=c(t,y(u[0],u[2],F),0,e),isNaN(d[3][0])||isNaN(d[3][1])||(w=h(d[3],t,!1),v=w.distance),!isNaN(v)&&v>s&&l(d[3],t))P=!0,f[3]=v,g[3]=_(d[3],p);else if(v>S&&(S=v,I[0]=d[3][0],I[1]=d[3][1]),F+=.01,F>.9){if(!(S>=0))break;P=!0,f[3]=S,d[3][0]=I[0],d[3][1]=I[1],g[3]=_(d[3],p)}}while(!P);const O=[0,1,2,3],C=x?0:1;let z;for(let t=C;t<4;t++)for(let t=C;t<3;t++){const e=g[t],s=g[t+1];m(e,s)>0&&(z=O[t],O[t]=O[t+1],O[t+1]=z,g[t]=s,g[t+1]=e)}let R=C,q=0,M=0;for(let t=C;t<4;t++){switch(t){case 0:M=2*f[O[t]];break;case 1:M=1.66666666*f[O[t]];break;case 2:M=1.33333333*f[O[t]];break;case 3:M=f[O[t]]}M>q&&(q=M,R=O[t])}return d[R]}function l(t,e){let s,i,r,n,a=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(s=e.x,i=e.y;e.nextPoint();s=r,i=n)r=e.x,n=e.y,i>t[1]!=n>t[1]&&((r-s)*(t[1]-i)-(n-i)*(t[0]-s)>0?a++:a--);return 0!==a}function h(t,e,s){if(s&&l(t,e))return{coord:t,distance:0};let i=1/0,r=0,n=0,o=[0,0],u=[0,0];const h=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(o[0]=e.x,o[1]=e.y;e.nextPoint();o=u){u=[e.x,e.y],(0,a.gR)(h,t,o,u);const s=_(t,h);s<i&&(i=s,r=h[0],n=h[1])}return{coord:[r,n],distance:Math.sqrt(i)}}function c(t,e,s,r){const n=[e,0];let a=1/0,u=1/0,l=!1,h=!1;const c=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],y=[0,0],_=[0,0],m=[[0,0],[0,0]],g=(0,i.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(m[0][0]=t.x,m[0][1]=t.y;t.nextPoint();m[0][0]=m[1][0],m[0][1]=m[1][1]){if(m[1][0]=t.x,m[1][1]=t.y,null===p(g,m))continue;if(y[0]=c[0][0],y[1]=c[0][1],_[0]=c[1][0],_[1]=c[1][1],0===d(g,y,_))continue;if(!(0,o.Ql)(c[0],c[1],m[0],m[1],f))continue;const e=f[1];a>u?e<a&&(a=e,l=!0):e<u&&(u=e,h=!0)}return l&&h?n[1]=(a+u)/2:n[0]=n[1]=NaN,n}function p(t,e){if(e.length<2)return null;t||(t=(0,i.vt)());const[s,r]=e[0],[n,a]=e[1];return t[0]=Math.min(s,n),t[1]=Math.min(r,a),t[2]=Math.max(s,n),t[3]=Math.max(r,a),t}function d(t,e,s){let i=f(e,t),r=f(s,t);const n=t[0],a=t[1],o=t[2],u=t[3];if(i&r)return 0;if(!(i|r))return 4;const l=(i?1:0)|(r?2:0);do{const l=s[0]-e[0],h=s[1]-e[1];if(l>h)3&i?(1&i?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(o-e[0])/l,e[0]=o),i=f(e,t)):3&r?(1&r?(s[1]+=h*(n-s[0])/l,s[0]=n):(s[1]+=h*(o-s[0])/l,s[0]=o),r=f(s,t)):i?(4&i?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(u-e[1])/h,e[1]=u),i=f(e,t)):(4&r?(s[0]+=l*(a-s[1])/h,s[1]=a):(s[0]+=l*(u-s[1])/h,s[1]=u),r=f(s,t));else if(12&i?(4&i?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(u-e[1])/h,e[1]=u),i=f(e,t)):12&r?(4&r?(s[0]+=l*(a-s[1])/h,s[1]=a):(s[0]+=l*(u-s[1])/h,s[1]=u),r=f(s,t)):i?(1&i?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(o-e[0])/l,e[0]=o),i=f(e,t)):(1&r?(s[1]+=h*(n-s[0])/l,s[0]=n):(s[1]+=h*(o-s[0])/l,s[0]=o),r=f(s,t)),i&r)return 0}while(i|r);return l}function f(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function y(t,e,s){return t+(e-t)*s}function _(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function m(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const s=isNaN(t),i=isNaN(e);return s<i?-1:s>i?1:0}},62815(t,e,s){s.d(e,{N:()=>o,d:()=>u});var i=s(86211),r=s(73941),n=s(21325),a=s(52006);function o(t,e,s){const i=u(e,s);if(1!==i)switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){null!=t?.z&&(t.z*=e)}(t,i);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t){if(t.curvePaths)for(const s of t.curvePaths)for(const t of s){const s=(0,a.yP)(t);s.length>2&&(s[2]*=e)}if(t.paths)for(const s of t.paths)for(const t of s)t.length>2&&(t[2]*=e)}}(t,i);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t){if(t.curveRings)for(const s of t.curveRings)for(const t of s){const s=(0,a.yP)(t);s.length>2&&(s[2]*=e)}if(t.rings)for(const s of t.rings)for(const t of s)t.length>2&&(t[2]*=e)}}(t,i);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(const s of t.points)s.length>2&&(s[2]*=e)}(t,i);case"extent":case"esriGeometryEnvelope":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,i);default:return}}function u(t,e){return null==t||null==e||(0,n.aI)(t,e)||(0,r.xP)(t)||(0,r.xP)(e)?1:(0,i.G9)(t)/(0,i.G9)(e)}},6557(t,e,s){s.r(e),s.d(e,{default:()=>j});var i=s(5482),r=s(21818),n=s(49186),a=s(71511),o=s(44208),u=s(53966),l=s(17676),h=s(563),c=s(39516),p=s(86211),d=s(16930),f=s(70328),y=s(19419),_=s(21325),m=s(90708),g=s(29441),x=s(75752),w=s(99352),I=s(8384),P=s(58727),F=s(95031),S=s(24460),v=s(64714),b=s(17754),N=s(20437),O=s(95466),C=s(30524),z=s(50639),R=s(42760),q=s(39412),M=s(63892),A=s(30661),T=s(28923),E=s(44320),G=s(35258),k=s(16630);const Q=new A.Z,Z="__OBJECTID",D=new TextDecoder,B=8e3;class W{constructor(t,e){this._files=t,this._createFileStream=e,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(t){for(await this._fill(t);this._pending.size>0;){(0,l.Te)(t),await this._fill(t);const e=await V(this._pending);if(this._pending.delete(e.read),this._resolvedCount++,null!=e.chunk)return e.chunk}return null}async _fill(t){for(this._removeDone();this._pending.size<8;){const e=this._getOrCreateNextStream(t);if(null==e)return;this._pending.add(e.read(t))}}_getOrCreateNextStream(t){const e=this._resolvedCount>=8?8:2;if(this._fileIndex<this._files.length&&this._streams.length<e){const e=this._files[this._fileIndex++],s=new J(e.id,this._createFileStream(e,t));return this._streams.push(s),s}return this._getNextStream()}_getNextStream(){const t=this._streams.length;for(let e=0;e<t;e++){const s=(this._streamIndex+e)%t,i=this._streams[s];if(i.canRead)return this._streamIndex=(s+1)%t,i}return null}_removeDone(){let t=this._streamIndex;for(let e=this._streams.length-1;e>=0;e--)this._streams[e].done&&(this._streams.splice(e,1),e<t&&t--);this._streamIndex=this._streams.length>0?t%this._streams.length:0}}function V(t){return Promise.race(Array.from(t,async t=>({read:t,chunk:await t})))}class J{constructor(t,e){this._fileId=t,this._stream=e,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(t){this._readCount++;try{const e=await this._stream,s=await e.next(t);return null==s?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:s}}finally{this._readCount--}}}class j{constructor(){this._hasZ=!1,this._hasM=!1,this._queue=new h.QueueProcessor({concurrency:4,process:(t,e)=>this._executeQuery(t,e)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={},this._handles=new a.A}async load(t){const e=t.spatialReference?d.A.fromJSON(t.spatialReference):void 0;if(e&&!e.isWGS84&&!e.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=t.customParameters,this._loadParameters=t,await this._updateProvider((0,F.M)(t.provider,null,()=>this._customParameters));const s=await this._provider.getMetadata(),i=await(0,R.nc)(s,{fields:t.fields?.map(t=>N.A.fromJSON(t)),geometryEncoding:t.geometryEncoding?(0,z.G)(t.geometryEncoding):null,geometryType:t.geometryType?(0,R.hG)(t.geometryType):null,displayOptimization:t.displayOptimization,spatialReference:e});if(this._hasZ=!!s?.hasZ,this._hasM=!!s?.hasM,!i.fields)throw new n.A("parquet:unsupported","Fields must be defined");let r;if(i.spatialReference&&i.geometryType){if(!i.spatialReference)throw new n.A("parquet:unsupported","SpatialReference must be defined");if(!i.spatialReference.isGeographic&&!i.spatialReference.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");i.spatialReference.isGeographic&&!i.spatialReference.isWGS84&&(u.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:i.spatialReference}),i.spatialReference=d.A.WGS84),r={geometry:i.geometryEncoding?{geometryType:(0,R.sA)(i.geometryType),spatialReference:i.spatialReference.toJSON(),encoding:i.geometryEncoding.toJSON()}:null,displayOptimization:i.displayOptimization}}this.setCustomParameters(t.customParameters),this._displayOptimization=i.displayOptimization,await this._provider.updateGeometryInfo(r),this._capabilities=rt(await this._getFileStatistics(),this._hasZ,this._hasM);const a=await this._provider.getFiles();if(!a.length)return{layerDefinition:{},capabilities:rt(null,this._hasZ,this._hasM)};const o=await a[0].file;i.file=o;const{fields:l}=i;if(null==l)throw new n.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",l);l.push(new N.A({name:Z,type:"oid",alias:Z}));for(const t of l){const e=o.getColumnId(t.name);null!=e&&(this._indexMap[t.name]=e)}const h=new O.A(l.map(t=>t.toJSON()));this._fieldsIndex=h;const c=(0,R.sA)(i.geometryType??"point");return this._metadata=G.i.createFeature({fieldsIndex:h.toJSON(),geometryType:c,hasZ:this._hasZ,hasM:this._hasM,featureIdInfo:{type:"object-id",fieldName:Z},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:i.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:c,featureIdInfo:{type:"object-id",fieldName:Z},hasM:this._hasM,hasZ:this._hasZ,spatialReference:i.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=s?.extent?s.extent:await this._tryDeriveParquetFullExtent(i),{capabilities:this._capabilities,layerDefinition:{fields:i.fields?.map(t=>t.toJSON()),drawingInfo:(0,v.F0)(c),extent:this._fullExtent??void 0,geometryType:c,geometryEncoding:i.geometryEncoding?.toJSON(),displayOptimization:i.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(const{handle:t}of this._streams.values())t.remove();this._streams.clear(),this._indexMap={},this._handles.removeAll()}async reload(t){this.destroy(),await this.load(t)}set remoteClient(t){this._source=t.createInvokeProxy("")}setCustomParameters(t){this._customParameters=t}getIndexMap(){return this._indexMap}async updateFileProvider(t){this._loadParameters={...this._loadParameters,provider:t};const e=(0,F.M)(t,this._provider.getGeometryInfo(),()=>this._customParameters);await this._updateProvider(e)}async getDiagnosticsSnapshot(){const t=await this._provider.getFiles();return{files:await Promise.all(t.map(t=>t.getDiagnosticsSnapshot()))}}async getColumnIndex(t){return(await this._getFileInfoById(t.fileId)).getColumnIndex(t.rowGroupIndex,t.columnIndex)}async getOffsetIndex(t){return(await this._getFileInfoById(t.fileId)).getOffsetIndex(t.rowGroupIndex,t.columnIndex)}async queryFeatures(t,e){const s=await(0,P.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),function(t){return!!(t.objectIds?.length||t.outStatistics||t.orderByFields?.length||t.returnDistinctValues)}(s)||(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,B):B,s.resultOffset=s.resultOffset??0),s.outStatistics?this._queryStatistics(s,e):(s.returnDistinctValues&&(s.returnGeometry=void 0),(await this._enqueueQuery(s,e)).createQueryResponse())}async queryFeatureCount(t,e){const s=await(0,P.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),Y(s)?(s.outFields=void 0,s.returnGeometry=void 0,(await this._enqueueQuery(s,e)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(t,e){const s=await(0,P.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),Y(s)?(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,8e3):8e3,s.resultOffset=s.resultOffset??0,s.returnGeometry=void 0,s.outFields=void 0,(await this._enqueueQuery(s,e)).items.map(t=>t.getObjectId())):Array.from({length:await this._getFeatureCount()},(t,e)=>e)}async queryAttributeBins(t,e={}){throw new n.A("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(t,e){const s=await(0,P.T2)(t,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!Y(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=(0,r.z)(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const n=(0,f.hZ)((0,f.vt)(),f.qv),a=(0,f.vt)(),o=await this._enqueueQuery(s,e);let u=0;for(const t of o.items)t.getBounds(a)&&((0,f.RF)(n,a),u+=1);return{count:u,extent:(0,x.Wc)(n,i,s.outSR?(0,r.z)(s.outSR):i.toJSON(),i,!1)}}async queryStream(t,e){if(!e.signal)throw new Error("InternalError: AbortSignal must be passed");const s=await this._getCandidateFiles(t),i=new W(s,async(e,s)=>{const i=await e.file,r=await this._createParquetDisplayQuery(i,e.id,t);return i.executeQuery(r,B,s)}),r=this._streamIdCounter++,n=(0,l.NY)(e.signal,t=>{const e=this._streams.get(r);null!=e&&(e.handle.remove(),this._streams.delete(r))});return this._streams.set(r,{stream:i,handle:n}),r}async getStreamNext(t,e){if(!e.signal)throw new Error("InternalError: AbortSignal must be passed");const s=this._streams.get(t);if(!s)return{result:null};const i=await s.stream.next(e.signal);if(null==i)return s.handle.remove(),this._streams.delete(t),{result:null};const r=i.chunk.serialize().buffer,n={fileId:i.fileId,buffer:r};return r instanceof ArrayBuffer?{result:n,transferList:[r]}:{result:n}}async getStreamNextFeatures(t,e){const{result:s}=await this.getStreamNext(t,e);if(null==s)return null;const i=(await(0,q.N)()).ParquetChunk.deserialize(new Uint8Array(s.buffer)),r=new k.s(this._metadata,this._indexMap,i,s.fileId),n=[];for(;r.next();){const t=(0,m.zv)(r.readGeometryWorldSpace(),r.geometryType,r.hasZ,r.hasM),e=r.readAttributes();n.push({attributes:e,geometry:t})}return{features:n}}async createPatch(t,e,s,i,r){if(!r.signal)throw new Error("InternalError: AbortSignal must be passed");const n=await this._getFileInfoById(t),a=await n.file;return(await a.createChunkPatch(e,s,i,r.signal)).serialize().buffer}async _updateProvider(t){const e=this._provider;this._handles.removeAll(),this._provider=t,this._handles.add([t.events.on("rangeRead",t=>{this._source.onRangeRead(t)}),t.events.on("sourceChanged",async()=>{await this.reload(this._loadParameters),await this._source.onSourceChange()})]),await(e?.destroy())}async _getCandidateFiles(t){const e=await this._provider.getFiles(),s=await this._getSpatialFilePruning(t);if(null==s)return e;const i=e.filter(t=>this._mayIncludeFileForSpatialPruning(t,s));return"xz"===s.type?function(t,e){return t.slice().sort((t,s)=>{const i=it(t,e),r=it(s,e);return i===r?0:i<r?-1:1})}(i,s):i}async _queryStatistics(t,e){const s=await(0,P.T2)({...t},null,this._queryEngineParams.spatialReference);if(s.returnGeometry=void 0,function(t,e){return!!t.outStatistics?.length&&!Y(t)&&!t.groupByFieldsForStatistics?.length&&!t.orderByFields?.length&&!t.returnDistinctValues&&!t.returnAggIds&&t.outStatistics.every(t=>function(t,e){switch(t.statisticType){case"count":return"1"===t.onStatisticField||null!=e.get(t.onStatisticField);case"min":case"max":{const s=e.get(t.onStatisticField);return null!=s&&(0,C.WA)(s)}default:return!1}}(t,e))}(s,this._fieldsIndex)){const t=await this._getStatisticsFromFiles(s);if(t)return t}return(await this._enqueueQuery(s,e)).createQueryResponse()}async _getStatisticsFromFiles(t){const e=await this._provider.getFiles(),s={},i=[];for(const r of t.outStatistics??[]){const t=K(r,e);if(!t.available)return null;s[r.outStatisticFieldName]=t.value,i.push(X(r,this._fieldsIndex))}return{fields:i,features:[{attributes:s}]}}async _getSpatialFilePruning(t){if("tile"!==t.type&&("arcade"!==t.type||null==t.extent))return null;const e=this._displayOptimization,s=e?.index;if(null==s)return null;const i=t.outSpatialReference.wkid;if(null==s.wkid||null==i)return null;const r=s.wkid,n=await(0,q.N)();switch(s.type){case"xz":return{type:"xz",fieldName:(0,M.FG)(s.code),intersects:(e,a)=>n.queryIntersectsXZStatistics(s.fullExtent,t.extent,i,r,s.maxLevel,e,a)};case"z":return{type:"xy",xFieldName:(0,M.FG)(s.xColumn),yFieldName:(0,M.FG)(s.yColumn),intersects:(e,s,a,o)=>n.queryIntersectsXYStatistics(t.extent,i,r,e,s,a,o)}}}_mayIncludeFileForSpatialPruning(t,e){switch(e.type){case"xz":{const s=st(t,e);return"null-only"!==s?.type&&("bounds"!==s?.type||e.intersects(s.minValue,s.maxValue))}case"xy":{const s=t.statistics.statistics.get(e.xFieldName),i=t.statistics.statistics.get(e.yFieldName);return"null-only"!==s?.type&&"null-only"!==i?.type&&("bounds"!==s?.type||"bounds"!==i?.type||e.intersects(s.minValue,s.maxValue,i.minValue,i.maxValue))}}}async _tryDeriveParquetFullExtent(t){if(!t.spatialReference)return null;if(null==this._fullExtent&&"location"===t.geometryEncoding?.type){const e=await this._provider.getFiles(),{xField:s,yField:r}=t.geometryEncoding,n=(0,f.hZ)((0,f.vt)(),f.qv);let a=!1;for(const t of e){const e=await t.file;for(const t of e.rowGroups()){const e={stack:[],error:void 0,hasError:!1};try{const o=(0,i.mS)(e,t.columnDescriptorForAttribute(s),!1),u=(0,i.mS)(e,t.columnDescriptorForAttribute(r),!1),l=(0,S.Hk)(o),h=(0,S.Hk)(u);if("bounds"===l?.type&&"bounds"===h?.type){const t=[l.minValue,h.minValue,l.maxValue,h.maxValue];(0,f.DC)(n,t),a=!0}t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}}return a?{xmin:n[0],ymin:n[1],xmax:n[3],ymax:n[4],spatialReference:t.spatialReference?.toJSON()}:null}return null}async _getFileInfoById(t){const e=await this._provider.getFiles();for(const s of e)if(s.id===t)return s;throw new Error(`InternalError: File ${t} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(t){return(await this._getFileInfoById(t)).file}async _createParquetQuery(t,e,s,i,r){const n=(await(0,q.N)()).Query.new();null!=s&&n.setPreFilterStart(s),null!=i&&n.setPreFilterCount(i),null!=r&&n.setPostFilterCount(r);const a=await this._getRequiredFields(t);n.setOutFields(a),(t.geometry||t.returnGeometry)&&n.setReturnGeometry(!0),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM);const o=this._tryGetGeneralizedGeometryResolution(t);null!=o&&n.setSourceResolution(o);const u=t.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=u.wkid;if(t.geometry&&((0,_.K8)(u)||(0,_.oT)(u))){const e=(0,y.C)((0,y.vt)(),y.qv);for(const s of(0,x.qo)(t.geometry))(0,y.DC)(e,s);n.setOutSpatialReference(l),n.setExtent({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]})}if(t.where){const{id:s,file:i}=e;await this._setWhereClause(n,await i,s,t.where)}return n}async _createParquetDisplayQuery(t,e,s){const i=(await(0,q.N)()).Query.new();if("tile"===s.type){i.setExtent(s.extent),i.setQuantizationTransform(s.transform);const t=this._sourceResolution(s.resolution,s.outSpatialReference);null!=t&&i.setSourceResolution(t)}else"arcade"===s.type&&null!=s.extent&&i.setExtent(s.extent);return i.setOutFields(s.outFields.filter(t=>null!=this._indexMap[t])),i.setOutSpatialReference(s.outSpatialReference.wkid),i.setReturnGeometry(s.returnGeometry),i.setReturnZ(s.returnZ),i.setReturnM(s.returnM),s.where&&await this._setWhereClause(i,t,e,s.where),i}async _getFeatureCount(){return(await this._provider.getFiles()).map(t=>t.statistics.rowCount).reduce((t,e)=>t+e,0)}async _getByteLength(){return(await this._provider.getFiles()).map(t=>t.statistics.byteSize).reduce((t,e)=>t+e,0)}_validateQuery(t){if(!this._capabilities.query.supportsStatistics&&t.outStatistics)throw new n.A("parquet:unsupported","Statistics queries are not supported",{query:t});if(!this._capabilities.query.supportsOrderBy&&t.orderByFields?.length)throw new n.A("parquet:unsupported","Queries using orderBy are not supported",{query:t});if(!this._capabilities.query.supportsDistinct&&t.returnDistinctValues)throw new n.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:t})}async _setWhereClause(t,e,s,i){const r=this._indexMap,a=this._fieldsIndex,o={getAttribute(t,i){const n=r[i];if(null==n){const e=a.get(i);if("__OBJECTID"===e?.name){const e=t.row+t.rowGroupStart;return(0,b.xb)(s,e)}return null}const o=e.readAttribute(t.rowGroup,t.row,n);if(null==o)return null;const u=a.get(i);return"esriFieldTypeString"===u.type||"esriFieldTypeDateOnly"===u.type||"esriFieldTypeTimeOnly"===u.type||"esriFieldTypeTimestampOffset"===u.type?D.decode(o):o}},u=await(0,c.GP)(i,this._fieldsIndex);if(!u.isStandardized)throw new n.A("sql-parse-error","expression is not standardized");const l=u.fieldNames.map(t=>a.get(t)).filter(t=>t&&null!=this._indexMap[t?.name]);t.setWhere(i),t.setWhereEvaluator((t,e,s)=>u.testFeatureCompiled({rowGroup:t,row:e,rowGroupStart:s},o,null)),t.setWhereFields(l.map(t=>t.name))}async*_streamFeatures(t,e,s,i,r){const n=await this._provider.getFiles();let a=0;for(const o of n){const n=a,u=a+o.statistics.rowCount;if(a+=o.statistics.rowCount,null!=e&&e>=u)continue;const l=null!=e?Math.max(e-n,0):null;let h=s;if(null!=s){const t=e??0,i=t+s,r=Math.max(t,n),a=Math.min(i,u);h=Math.max(a-r,0)}if(0===h)continue;const c=await this._createParquetQuery(t,o,l,h,i),p=await o.file,d=await p.executeQuery(c,B),f=async()=>{const t=await d.next(r);if(!t)return null;const e=new k.s(this._metadata,this._indexMap,t,o.id);return et([new T.j(e,null,0,!1)],this._queryEngineParams)};let y=await f();for(;null!=y;)yield y,y=await f()}}async _queryFeaturesWithQueryEnginePagination(t,e){const s=[],i=this._streamFeatures(t,null,null,null,e);let r=await i.next();for(;!r.done;){const n=await r.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(const t of n)s.push(t);r=await i.next()}return s}async _queryFeaturesWithUpfrontPagination(t,e){let s,i,r,n=t.resultOffset??0,a=t.resultRecordCount??B;!function(t){for(const e in t){const s=e;if(L(s)&&null!==t[s])return!0}return!1}(t)?(n&&(s=n,n=0),i=t.resultRecordCount):function(t){for(const e in t){const s=e;if(H(s)&&null!==t[s])return!0}return!1}(t)||(r=n+a);const o=[],u=this._streamFeatures(t,s,i,r,e);let l=await u.next();for(;!l.done&&a>0;){const s=await l.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(const t of s)if(n>0)n--;else if(o.push(t),--a<=0)return o;l=await u.next()}return o}_enqueueQuery(t,e){return this._queue.push(t,e)}async _executeQuery(t,e){if(t.objectIds?.length){const s=new Map;for(const e of t.objectIds){const t=(0,b.wY)(e),i=(0,b.gE)(e);let r=s.get(t);r||(r=[],s.set(t,r)),r.push(i)}const i=[];for(const[r,n]of s.entries()){const s=await this._executeFileIdQuery(t,r,n,e);for(const t of s)i.push(t)}return new I.G(i,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:Q,featureIdInfo:this._queryEngineParams.featureIdInfo})}if("1=1"===t.where&&(t.where=null),t.resultOffset??=0,t.resultRecordCount??=await this._getFeatureCount(),t.resultRecordCount>2e7&&(!this._displayOptimization||!t.geometry))throw new n.A("parquet:cannot-execute-query","Unable to execute query, dataset is too large.");const s=!!t.orderByFields?.length||!!t.outStatistics?.length||!!t.returnDistinctValues,i=s?await this._queryFeaturesWithQueryEnginePagination(t,e):await this._queryFeaturesWithUpfrontPagination(t,e);return s||(t.resultOffset=0),new I.G(i,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:Q,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(t,e,s,i){const r=await this._getRequiredFields(t),n=(await(0,q.N)()).Query.new();n.setOutFields(r),n.setReturnGeometry(!!t.returnGeometry),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM),n.setIds(new Uint32Array(s));const a=await this._getFile(e),o=await a.executeQuery(n,B,i);let u=await o.next(i),l=0;const h=[];for(;null!=u;){const t=new k.s(this._metadata,this._indexMap,u,e),s=new T.j(t,null,l++,!1);h.push(s),u=await o.next(i)}return et(h,this._queryEngineParams).executeQueryForOpaqueFeatures(t,i)}async _getRequiredFields(t){const e=new Set;if(t.outStatistics)for(const s of(0,g.g9)(this._fieldsIndex,t.outStatistics,t.groupByFieldsForStatistics))e.add(s);else if(t.outFields)for(const s of t.outFields)e.add(s);return(e.has("*")?this._fieldsIndex.fields.map(t=>t.name):Array.from(e)).filter(t=>null!=this._indexMap[t])}_tryGetGeneralizedGeometryResolution(t){if(!this._displayOptimization)return null;const e=t.outSR??this._queryEngineParams.spatialReference;if(!(0,_.K8)(e)&&!(0,_.oT)(e))return null;const s=t.quantizationParameters?.tolerance??t.maxAllowableOffset;return s?this._sourceResolution(s,e):null}_sourceResolution(t,e){const s=this._queryEngineParams.spatialReference,i=t*((0,p.GA)(e)/(0,p.GA)(s));return!Number.isFinite(i)||i<=0?null:i}}function U(t){switch(t){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":case"resultOffset":case"resultRecordCount":return!0;default:return!1}}function L(t){switch(t){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":return!0;default:return!1}}function H(t){switch(t){case"fullText":case"having":case"timeExtent":return!0;case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"resultOffset":case"geometry":case"resultRecordCount":return!1}return!1}function Y(t){for(const e in t){const s=e;if(U(s)&&null!==t[s])return!0}return!1}function X(t,e){const s="exceedslimit"!==t.statisticType?e.get(t.onStatisticField):null,i="min"!==t.statisticType&&"max"!==t.statisticType||"esriFieldTypeDate"!==s?.type?"esriFieldTypeDouble":s.type;return{name:t.outStatisticFieldName,alias:t.outStatisticFieldName,type:i}}function K(t,e){switch(t.statisticType){case"count":return function(t,e){if("count"!==t.statisticType)return{available:!1,value:null};if("1"===t.onStatisticField)return{available:!0,value:e.reduce((t,e)=>t+e.statistics.rowCount,0)};let s=0;for(const i of e){const e=i.statistics.statistics.get(t.onStatisticField);if(null==e||null==e.nullCount)return{available:!1,value:null};s+=i.statistics.rowCount-e.nullCount}return{available:!0,value:s}}(t,e);case"min":return $(t,e,Math.min);case"max":return $(t,e,Math.max);default:return{available:!1,value:null}}}function $(t,e,s){if("min"!==t.statisticType&&"max"!==t.statisticType)return{available:!1,value:null};let i=null;const r="min"===t.statisticType?"minValue":"maxValue";for(const n of e){const e=n.statistics.statistics.get(t.onStatisticField);if(null==e)return{available:!1,value:null};switch(e.type){case"null-only":continue;case"unknown":return{available:!1,value:null};case"bounds":{const t=tt(e[r]);if(null==t)return{available:!1,value:null};i=null==i?t:s(i,t);break}}}return{available:!0,value:i}}function tt(t){return"number"==typeof t&&Number.isFinite(t)?t:null}function et(t,e){const s=new E.I;for(const e of t)s.insert(e);return new x.do({...e,featureStore:s})}function st(t,e){return t.statistics.statistics.get(e.fieldName)??null}function it(t,e){const s=st(t,e);return"bounds"!==s?.type?Number.POSITIVE_INFINITY:s.maxValue-s.minValue}function rt(t,e,s){const i=t?.featureCount;let r=!1;return null!=i&&i<(0,o.A)("parquetlayer-full-query-feature-count")&&(r=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:s,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...w.F,maxRecordCount:B,supportsOrderBy:r,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4583],{9775(t,e,s){s.d(e,{A:()=>n});var i=s(62788),r=s(95488);class n{constructor(t=t=>t.values().next().value){this._peeker=t,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let t;for(t of this._items);return t}peek(){if(0!==this.length)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return(0,i.gc)(this._observable),this._items.has(t)}pop(){if(0===this.length)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(0===this.length)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const e=this.length;return this._items.forEach(e=>{t(e)||this._items.delete(e)}),e!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},69397(t,e,s){s.d(e,{Qf:()=>o,Qh:()=>n,lM:()=>r});var i=s(34275);function r(t){if(!t)return 0;let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=a(t[s],!1));return e}function n(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let s=h;for(let i=0;i<e;i++)s+=a(t[i]);return s}(t);let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=a(t[s]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?n(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...t){return t.reduce((t,e)=>t+(e?(0,i.iu)(e)?e.byteLength+c:Array.isArray(e)?u(e,16):0:0),0)}function u(t,e){return h+t.length*e}const l=32,h=16,c=145},36745(t,e,s){s.d(e,{z:()=>o});var i=s(4718),r=s(51118),n=s(60408),a=s(92722);class o{static fromOptimized(t,e,s=1){return(new u).initialize(t,e,s)}static fromJSON(t){const[e,s]=h(t),i=(0,n.Pv)(t),r=(0,n.W0)(t);return(new c).initialize(e,s,i,r,1)}static fromOptimizedCIM(t,e,s=1){return(new p).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[s,i]=h(t),r=(0,n.Pv)(t),a=(0,n.W0)(t);return(new d).initialize(s,i,r,a,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new p).initialize(new a.A([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new c).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new p).initialize(new a.A([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new d).initialize([],t,e,s,i)}asJSON(){const t=(0,r.x)(this),{hasZ:e,hasM:s}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:s}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:s?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:s}:{paths:t,hasZ:e,hasM:s}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,r=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+r),-.5*s}invertY(){this.yFactor*=-1}}class u extends o{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new u).initialize(new a.A([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let r=this._pathOffset+e;r<t;r+=e){const t=s[r-e],n=s[r-e+1],a=s[r]-t,o=s[r+1]-n;i+=Math.sqrt(a*a+o*o)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new u).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function h(t){return(0,n.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,n.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,n.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,n.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class c extends o{initialize(t,e,s,i,r){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=r,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],r=e[i],n=t[0],a=t[1],o=r[0]-n,u=r[1]-a;s+=Math.sqrt(o*o+u*u)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new c).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,r.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new a.A([],[],t,e),{coords:i,lengths:r}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),r.length=0;else for(const s of this._paths){for(const r of s)i.push(r[0]),i.push(r[1]*this.yFactor),t&&i.push(r[2]),e&&i.push(r[this._mIndex]);r.push(s.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new c).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class p extends u{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new p).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends c{initialize(t,e,s,i,r){return super.initialize(t,e,s,i,r)}clone(){return(new d).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},32011(t,e,s){s.d(e,{d:()=>u});var i=s(19419),r=s(537),n=s(12359),a=s(95108),o=s(12176);function u(t){if(0===t.totalSize)return null;const e=(0,r.z8)(t);if(!e)return null;const s=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let a=0,o=0;t.reset();for(let e=0;t.nextPath();e++){const s=t.getCurrentRingArea();s>o&&(o=s,a=e)}if(t.seekPath(a),0===t.pathSize)return null;t.seekPathStart();const u=(0,r.B$)(t);if(Math.abs(o)<=2*s*s)return[(u[0]+u[2])/2,(u[1]+u[3])/2];t.seekPathStart();const p=(0,n.w2)(t,(0,i.vt)());if(null===p)return null;if(t.totalPoints<4)return p;const d=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],f=[NaN,NaN,NaN,NaN],g=[NaN,NaN,NaN,NaN];let x=!1,w=h(p,t,!0);0===w.distance&&(x=!0,d[0][0]=p[0],d[0][1]=p[1],w=h(p,t,!1)),f[0]=w.distance,g[0]=0;const I=[NaN,NaN];let P=!1,F=.25,S=-1,v=NaN;do{if(v=NaN,d[1]=c(t,y(u[0],u[2],F),0,e),isNaN(d[1][0])||isNaN(d[1][1])||(w=h(d[1],t,!1),v=w.distance),!isNaN(v)&&v>s&&l(d[1],t))P=!0,f[1]=v,g[1]=_(d[1],p);else if(!isNaN(v)&&v>S&&(S=v,I[0]=d[1][0],I[1]=d[1][1]),F-=.01,F<.1){if(!(S>=0))break;P=!0,f[1]=S,d[1][0]=I[0],d[1][1]=I[1],g[1]=_(d[1],p)}}while(!P);P=!1,F=.5,S=-1;let b=.01,N=1;do{if(v=NaN,d[2]=c(t,y(u[0],u[2],F),0,e),isNaN(d[2][0])||isNaN(d[2][1])||(w=h(d[2],t,!1),v=w.distance),!isNaN(v)&&v>s&&l(d[2],t))P=!0,f[2]=v,g[2]=_(d[2],p);else if(!isNaN(v)&&v>S)S=v,I[0]=d[2][0],I[1]=d[2][1];else if(v>S&&(S=v,I[0]=d[2][0],I[1]=d[2][1]),F=.5+b*N,b+=.01,N*=-1,F<.3||F>.7){if(!(S>=0))break;P=!0,f[2]=S,d[2][0]=I[0],d[2][1]=I[1],g[2]=_(d[2],p)}}while(!P);P=!1,F=.75,S=-1;do{if(v=NaN,d[3]=c(t,y(u[0],u[2],F),0,e),isNaN(d[3][0])||isNaN(d[3][1])||(w=h(d[3],t,!1),v=w.distance),!isNaN(v)&&v>s&&l(d[3],t))P=!0,f[3]=v,g[3]=_(d[3],p);else if(v>S&&(S=v,I[0]=d[3][0],I[1]=d[3][1]),F+=.01,F>.9){if(!(S>=0))break;P=!0,f[3]=S,d[3][0]=I[0],d[3][1]=I[1],g[3]=_(d[3],p)}}while(!P);const O=[0,1,2,3],C=x?0:1;let z;for(let t=C;t<4;t++)for(let t=C;t<3;t++){const e=g[t],s=g[t+1];m(e,s)>0&&(z=O[t],O[t]=O[t+1],O[t+1]=z,g[t]=s,g[t+1]=e)}let R=C,q=0,M=0;for(let t=C;t<4;t++){switch(t){case 0:M=2*f[O[t]];break;case 1:M=1.66666666*f[O[t]];break;case 2:M=1.33333333*f[O[t]];break;case 3:M=f[O[t]]}M>q&&(q=M,R=O[t])}return d[R]}function l(t,e){let s,i,r,n,a=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(s=e.x,i=e.y;e.nextPoint();s=r,i=n)r=e.x,n=e.y,i>t[1]!=n>t[1]&&((r-s)*(t[1]-i)-(n-i)*(t[0]-s)>0?a++:a--);return 0!==a}function h(t,e,s){if(s&&l(t,e))return{coord:t,distance:0};let i=1/0,r=0,n=0,o=[0,0],u=[0,0];const h=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(o[0]=e.x,o[1]=e.y;e.nextPoint();o=u){u=[e.x,e.y],(0,a.gR)(h,t,o,u);const s=_(t,h);s<i&&(i=s,r=h[0],n=h[1])}return{coord:[r,n],distance:Math.sqrt(i)}}function c(t,e,s,r){const n=[e,0];let a=1/0,u=1/0,l=!1,h=!1;const c=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],y=[0,0],_=[0,0],m=[[0,0],[0,0]],g=(0,i.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(m[0][0]=t.x,m[0][1]=t.y;t.nextPoint();m[0][0]=m[1][0],m[0][1]=m[1][1]){if(m[1][0]=t.x,m[1][1]=t.y,null===p(g,m))continue;if(y[0]=c[0][0],y[1]=c[0][1],_[0]=c[1][0],_[1]=c[1][1],0===d(g,y,_))continue;if(!(0,o.Ql)(c[0],c[1],m[0],m[1],f))continue;const e=f[1];a>u?e<a&&(a=e,l=!0):e<u&&(u=e,h=!0)}return l&&h?n[1]=(a+u)/2:n[0]=n[1]=NaN,n}function p(t,e){if(e.length<2)return null;t||(t=(0,i.vt)());const[s,r]=e[0],[n,a]=e[1];return t[0]=Math.min(s,n),t[1]=Math.min(r,a),t[2]=Math.max(s,n),t[3]=Math.max(r,a),t}function d(t,e,s){let i=f(e,t),r=f(s,t);const n=t[0],a=t[1],o=t[2],u=t[3];if(i&r)return 0;if(!(i|r))return 4;const l=(i?1:0)|(r?2:0);do{const l=s[0]-e[0],h=s[1]-e[1];if(l>h)3&i?(1&i?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(o-e[0])/l,e[0]=o),i=f(e,t)):3&r?(1&r?(s[1]+=h*(n-s[0])/l,s[0]=n):(s[1]+=h*(o-s[0])/l,s[0]=o),r=f(s,t)):i?(4&i?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(u-e[1])/h,e[1]=u),i=f(e,t)):(4&r?(s[0]+=l*(a-s[1])/h,s[1]=a):(s[0]+=l*(u-s[1])/h,s[1]=u),r=f(s,t));else if(12&i?(4&i?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(u-e[1])/h,e[1]=u),i=f(e,t)):12&r?(4&r?(s[0]+=l*(a-s[1])/h,s[1]=a):(s[0]+=l*(u-s[1])/h,s[1]=u),r=f(s,t)):i?(1&i?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(o-e[0])/l,e[0]=o),i=f(e,t)):(1&r?(s[1]+=h*(n-s[0])/l,s[0]=n):(s[1]+=h*(o-s[0])/l,s[0]=o),r=f(s,t)),i&r)return 0}while(i|r);return l}function f(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function y(t,e,s){return t+(e-t)*s}function _(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function m(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const s=isNaN(t),i=isNaN(e);return s<i?-1:s>i?1:0}},62815(t,e,s){s.d(e,{N:()=>o,d:()=>u});var i=s(86211),r=s(73941),n=s(21325),a=s(52006);function o(t,e,s){const i=u(e,s);if(1!==i)switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){null!=t?.z&&(t.z*=e)}(t,i);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t){if(t.curvePaths)for(const s of t.curvePaths)for(const t of s){const s=(0,a.yP)(t);s.length>2&&(s[2]*=e)}if(t.paths)for(const s of t.paths)for(const t of s)t.length>2&&(t[2]*=e)}}(t,i);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t){if(t.curveRings)for(const s of t.curveRings)for(const t of s){const s=(0,a.yP)(t);s.length>2&&(s[2]*=e)}if(t.rings)for(const s of t.rings)for(const t of s)t.length>2&&(t[2]*=e)}}(t,i);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(const s of t.points)s.length>2&&(s[2]*=e)}(t,i);case"extent":case"esriGeometryEnvelope":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,i);default:return}}function u(t,e){return null==t||null==e||(0,n.aI)(t,e)||(0,r.xP)(t)||(0,r.xP)(e)?1:(0,i.G9)(t)/(0,i.G9)(e)}},6557(t,e,s){s.r(e),s.d(e,{default:()=>j});var i=s(5482),r=s(21818),n=s(49186),a=s(71511),o=s(44208),u=s(53966),l=s(17676),h=s(563),c=s(39516),p=s(86211),d=s(16930),f=s(70328),y=s(19419),_=s(21325),m=s(90708),g=s(29441),x=s(56390),w=s(99352),I=s(8384),P=s(58727),F=s(95031),S=s(24460),v=s(64714),b=s(17754),N=s(20437),O=s(95466),C=s(30524),z=s(50639),R=s(42760),q=s(39412),M=s(63892),A=s(30661),T=s(28923),E=s(44320),G=s(35258),k=s(16630);const Q=new A.Z,Z="__OBJECTID",D=new TextDecoder,B=8e3;class W{constructor(t,e){this._files=t,this._createFileStream=e,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(t){for(await this._fill(t);this._pending.size>0;){(0,l.Te)(t),await this._fill(t);const e=await V(this._pending);if(this._pending.delete(e.read),this._resolvedCount++,null!=e.chunk)return e.chunk}return null}async _fill(t){for(this._removeDone();this._pending.size<8;){const e=this._getOrCreateNextStream(t);if(null==e)return;this._pending.add(e.read(t))}}_getOrCreateNextStream(t){const e=this._resolvedCount>=8?8:2;if(this._fileIndex<this._files.length&&this._streams.length<e){const e=this._files[this._fileIndex++],s=new J(e.id,this._createFileStream(e,t));return this._streams.push(s),s}return this._getNextStream()}_getNextStream(){const t=this._streams.length;for(let e=0;e<t;e++){const s=(this._streamIndex+e)%t,i=this._streams[s];if(i.canRead)return this._streamIndex=(s+1)%t,i}return null}_removeDone(){let t=this._streamIndex;for(let e=this._streams.length-1;e>=0;e--)this._streams[e].done&&(this._streams.splice(e,1),e<t&&t--);this._streamIndex=this._streams.length>0?t%this._streams.length:0}}function V(t){return Promise.race(Array.from(t,async t=>({read:t,chunk:await t})))}class J{constructor(t,e){this._fileId=t,this._stream=e,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(t){this._readCount++;try{const e=await this._stream,s=await e.next(t);return null==s?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:s}}finally{this._readCount--}}}class j{constructor(){this._hasZ=!1,this._hasM=!1,this._queue=new h.QueueProcessor({concurrency:4,process:(t,e)=>this._executeQuery(t,e)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={},this._handles=new a.A}async load(t){const e=t.spatialReference?d.A.fromJSON(t.spatialReference):void 0;if(e&&!e.isWGS84&&!e.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=t.customParameters,this._loadParameters=t,await this._updateProvider((0,F.M)(t.provider,null,()=>this._customParameters));const s=await this._provider.getMetadata(),i=await(0,R.nc)(s,{fields:t.fields?.map(t=>N.A.fromJSON(t)),geometryEncoding:t.geometryEncoding?(0,z.G)(t.geometryEncoding):null,geometryType:t.geometryType?(0,R.hG)(t.geometryType):null,displayOptimization:t.displayOptimization,spatialReference:e});if(this._hasZ=!!s?.hasZ,this._hasM=!!s?.hasM,!i.fields)throw new n.A("parquet:unsupported","Fields must be defined");let r;if(i.spatialReference&&i.geometryType){if(!i.spatialReference)throw new n.A("parquet:unsupported","SpatialReference must be defined");if(!i.spatialReference.isGeographic&&!i.spatialReference.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");i.spatialReference.isGeographic&&!i.spatialReference.isWGS84&&(u.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:i.spatialReference}),i.spatialReference=d.A.WGS84),r={geometry:i.geometryEncoding?{geometryType:(0,R.sA)(i.geometryType),spatialReference:i.spatialReference.toJSON(),encoding:i.geometryEncoding.toJSON()}:null,displayOptimization:i.displayOptimization}}this.setCustomParameters(t.customParameters),this._displayOptimization=i.displayOptimization,await this._provider.updateGeometryInfo(r),this._capabilities=rt(await this._getFileStatistics(),this._hasZ,this._hasM);const a=await this._provider.getFiles();if(!a.length)return{layerDefinition:{},capabilities:rt(null,this._hasZ,this._hasM)};const o=await a[0].file;i.file=o;const{fields:l}=i;if(null==l)throw new n.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",l);l.push(new N.A({name:Z,type:"oid",alias:Z}));for(const t of l){const e=o.getColumnId(t.name);null!=e&&(this._indexMap[t.name]=e)}const h=new O.A(l.map(t=>t.toJSON()));this._fieldsIndex=h;const c=(0,R.sA)(i.geometryType??"point");return this._metadata=G.i.createFeature({fieldsIndex:h.toJSON(),geometryType:c,hasZ:this._hasZ,hasM:this._hasM,featureIdInfo:{type:"object-id",fieldName:Z},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:i.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:c,featureIdInfo:{type:"object-id",fieldName:Z},hasM:this._hasM,hasZ:this._hasZ,spatialReference:i.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=s?.extent?s.extent:await this._tryDeriveParquetFullExtent(i),{capabilities:this._capabilities,layerDefinition:{fields:i.fields?.map(t=>t.toJSON()),drawingInfo:(0,v.F0)(c),extent:this._fullExtent??void 0,geometryType:c,geometryEncoding:i.geometryEncoding?.toJSON(),displayOptimization:i.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(const{handle:t}of this._streams.values())t.remove();this._streams.clear(),this._indexMap={},this._handles.removeAll()}async reload(t){this.destroy(),await this.load(t)}set remoteClient(t){this._source=t.createInvokeProxy("")}setCustomParameters(t){this._customParameters=t}getIndexMap(){return this._indexMap}async updateFileProvider(t){this._loadParameters={...this._loadParameters,provider:t};const e=(0,F.M)(t,this._provider.getGeometryInfo(),()=>this._customParameters);await this._updateProvider(e)}async getDiagnosticsSnapshot(){const t=await this._provider.getFiles();return{files:await Promise.all(t.map(t=>t.getDiagnosticsSnapshot()))}}async getColumnIndex(t){return(await this._getFileInfoById(t.fileId)).getColumnIndex(t.rowGroupIndex,t.columnIndex)}async getOffsetIndex(t){return(await this._getFileInfoById(t.fileId)).getOffsetIndex(t.rowGroupIndex,t.columnIndex)}async queryFeatures(t,e){const s=await(0,P.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),function(t){return!!(t.objectIds?.length||t.outStatistics||t.orderByFields?.length||t.returnDistinctValues)}(s)||(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,B):B,s.resultOffset=s.resultOffset??0),s.outStatistics?this._queryStatistics(s,e):(s.returnDistinctValues&&(s.returnGeometry=void 0),(await this._enqueueQuery(s,e)).createQueryResponse())}async queryFeatureCount(t,e){const s=await(0,P.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),Y(s)?(s.outFields=void 0,s.returnGeometry=void 0,(await this._enqueueQuery(s,e)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(t,e){const s=await(0,P.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),Y(s)?(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,8e3):8e3,s.resultOffset=s.resultOffset??0,s.returnGeometry=void 0,s.outFields=void 0,(await this._enqueueQuery(s,e)).items.map(t=>t.getObjectId())):Array.from({length:await this._getFeatureCount()},(t,e)=>e)}async queryAttributeBins(t,e={}){throw new n.A("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(t,e){const s=await(0,P.T2)(t,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!Y(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=(0,r.z)(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const n=(0,f.hZ)((0,f.vt)(),f.qv),a=(0,f.vt)(),o=await this._enqueueQuery(s,e);let u=0;for(const t of o.items)t.getBounds(a)&&((0,f.RF)(n,a),u+=1);return{count:u,extent:(0,x.Wc)(n,i,s.outSR?(0,r.z)(s.outSR):i.toJSON(),i,!1)}}async queryStream(t,e){if(!e.signal)throw new Error("InternalError: AbortSignal must be passed");const s=await this._getCandidateFiles(t),i=new W(s,async(e,s)=>{const i=await e.file,r=await this._createParquetDisplayQuery(i,e.id,t);return i.executeQuery(r,B,s)}),r=this._streamIdCounter++,n=(0,l.NY)(e.signal,t=>{const e=this._streams.get(r);null!=e&&(e.handle.remove(),this._streams.delete(r))});return this._streams.set(r,{stream:i,handle:n}),r}async getStreamNext(t,e){if(!e.signal)throw new Error("InternalError: AbortSignal must be passed");const s=this._streams.get(t);if(!s)return{result:null};const i=await s.stream.next(e.signal);if(null==i)return s.handle.remove(),this._streams.delete(t),{result:null};const r=i.chunk.serialize().buffer,n={fileId:i.fileId,buffer:r};return r instanceof ArrayBuffer?{result:n,transferList:[r]}:{result:n}}async getStreamNextFeatures(t,e){const{result:s}=await this.getStreamNext(t,e);if(null==s)return null;const i=(await(0,q.N)()).ParquetChunk.deserialize(new Uint8Array(s.buffer)),r=new k.s(this._metadata,this._indexMap,i,s.fileId),n=[];for(;r.next();){const t=(0,m.zv)(r.readGeometryWorldSpace(),r.geometryType,r.hasZ,r.hasM),e=r.readAttributes();n.push({attributes:e,geometry:t})}return{features:n}}async createPatch(t,e,s,i,r){if(!r.signal)throw new Error("InternalError: AbortSignal must be passed");const n=await this._getFileInfoById(t),a=await n.file;return(await a.createChunkPatch(e,s,i,r.signal)).serialize().buffer}async _updateProvider(t){const e=this._provider;this._handles.removeAll(),this._provider=t,this._handles.add([t.events.on("rangeRead",t=>{this._source.onRangeRead(t)}),t.events.on("sourceChanged",async()=>{await this.reload(this._loadParameters),await this._source.onSourceChange()})]),await(e?.destroy())}async _getCandidateFiles(t){const e=await this._provider.getFiles(),s=await this._getSpatialFilePruning(t);if(null==s)return e;const i=e.filter(t=>this._mayIncludeFileForSpatialPruning(t,s));return"xz"===s.type?function(t,e){return t.slice().sort((t,s)=>{const i=it(t,e),r=it(s,e);return i===r?0:i<r?-1:1})}(i,s):i}async _queryStatistics(t,e){const s=await(0,P.T2)({...t},null,this._queryEngineParams.spatialReference);if(s.returnGeometry=void 0,function(t,e){return!!t.outStatistics?.length&&!Y(t)&&!t.groupByFieldsForStatistics?.length&&!t.orderByFields?.length&&!t.returnDistinctValues&&!t.returnAggIds&&t.outStatistics.every(t=>function(t,e){switch(t.statisticType){case"count":return"1"===t.onStatisticField||null!=e.get(t.onStatisticField);case"min":case"max":{const s=e.get(t.onStatisticField);return null!=s&&(0,C.WA)(s)}default:return!1}}(t,e))}(s,this._fieldsIndex)){const t=await this._getStatisticsFromFiles(s);if(t)return t}return(await this._enqueueQuery(s,e)).createQueryResponse()}async _getStatisticsFromFiles(t){const e=await this._provider.getFiles(),s={},i=[];for(const r of t.outStatistics??[]){const t=K(r,e);if(!t.available)return null;s[r.outStatisticFieldName]=t.value,i.push(X(r,this._fieldsIndex))}return{fields:i,features:[{attributes:s}]}}async _getSpatialFilePruning(t){if("tile"!==t.type&&("arcade"!==t.type||null==t.extent))return null;const e=this._displayOptimization,s=e?.index;if(null==s)return null;const i=t.outSpatialReference.wkid;if(null==s.wkid||null==i)return null;const r=s.wkid,n=await(0,q.N)();switch(s.type){case"xz":return{type:"xz",fieldName:(0,M.FG)(s.code),intersects:(e,a)=>n.queryIntersectsXZStatistics(s.fullExtent,t.extent,i,r,s.maxLevel,e,a)};case"z":return{type:"xy",xFieldName:(0,M.FG)(s.xColumn),yFieldName:(0,M.FG)(s.yColumn),intersects:(e,s,a,o)=>n.queryIntersectsXYStatistics(t.extent,i,r,e,s,a,o)}}}_mayIncludeFileForSpatialPruning(t,e){switch(e.type){case"xz":{const s=st(t,e);return"null-only"!==s?.type&&("bounds"!==s?.type||e.intersects(s.minValue,s.maxValue))}case"xy":{const s=t.statistics.statistics.get(e.xFieldName),i=t.statistics.statistics.get(e.yFieldName);return"null-only"!==s?.type&&"null-only"!==i?.type&&("bounds"!==s?.type||"bounds"!==i?.type||e.intersects(s.minValue,s.maxValue,i.minValue,i.maxValue))}}}async _tryDeriveParquetFullExtent(t){if(!t.spatialReference)return null;if(null==this._fullExtent&&"location"===t.geometryEncoding?.type){const e=await this._provider.getFiles(),{xField:s,yField:r}=t.geometryEncoding,n=(0,f.hZ)((0,f.vt)(),f.qv);let a=!1;for(const t of e){const e=await t.file;for(const t of e.rowGroups()){const e={stack:[],error:void 0,hasError:!1};try{const o=(0,i.mS)(e,t.columnDescriptorForAttribute(s),!1),u=(0,i.mS)(e,t.columnDescriptorForAttribute(r),!1),l=(0,S.Hk)(o),h=(0,S.Hk)(u);if("bounds"===l?.type&&"bounds"===h?.type){const t=[l.minValue,h.minValue,l.maxValue,h.maxValue];(0,f.DC)(n,t),a=!0}t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}}return a?{xmin:n[0],ymin:n[1],xmax:n[3],ymax:n[4],spatialReference:t.spatialReference?.toJSON()}:null}return null}async _getFileInfoById(t){const e=await this._provider.getFiles();for(const s of e)if(s.id===t)return s;throw new Error(`InternalError: File ${t} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(t){return(await this._getFileInfoById(t)).file}async _createParquetQuery(t,e,s,i,r){const n=(await(0,q.N)()).Query.new();null!=s&&n.setPreFilterStart(s),null!=i&&n.setPreFilterCount(i),null!=r&&n.setPostFilterCount(r);const a=await this._getRequiredFields(t);n.setOutFields(a),(t.geometry||t.returnGeometry)&&n.setReturnGeometry(!0),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM);const o=this._tryGetGeneralizedGeometryResolution(t);null!=o&&n.setSourceResolution(o);const u=t.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=u.wkid;if(t.geometry&&((0,_.K8)(u)||(0,_.oT)(u))){const e=(0,y.C)((0,y.vt)(),y.qv);for(const s of(0,x.qo)(t.geometry))(0,y.DC)(e,s);n.setOutSpatialReference(l),n.setExtent({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]})}if(t.where){const{id:s,file:i}=e;await this._setWhereClause(n,await i,s,t.where)}return n}async _createParquetDisplayQuery(t,e,s){const i=(await(0,q.N)()).Query.new();if("tile"===s.type){i.setExtent(s.extent),i.setQuantizationTransform(s.transform);const t=this._sourceResolution(s.resolution,s.outSpatialReference);null!=t&&i.setSourceResolution(t)}else"arcade"===s.type&&null!=s.extent&&i.setExtent(s.extent);return i.setOutFields(s.outFields.filter(t=>null!=this._indexMap[t])),i.setOutSpatialReference(s.outSpatialReference.wkid),i.setReturnGeometry(s.returnGeometry),i.setReturnZ(s.returnZ),i.setReturnM(s.returnM),s.where&&await this._setWhereClause(i,t,e,s.where),i}async _getFeatureCount(){return(await this._provider.getFiles()).map(t=>t.statistics.rowCount).reduce((t,e)=>t+e,0)}async _getByteLength(){return(await this._provider.getFiles()).map(t=>t.statistics.byteSize).reduce((t,e)=>t+e,0)}_validateQuery(t){if(!this._capabilities.query.supportsStatistics&&t.outStatistics)throw new n.A("parquet:unsupported","Statistics queries are not supported",{query:t});if(!this._capabilities.query.supportsOrderBy&&t.orderByFields?.length)throw new n.A("parquet:unsupported","Queries using orderBy are not supported",{query:t});if(!this._capabilities.query.supportsDistinct&&t.returnDistinctValues)throw new n.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:t})}async _setWhereClause(t,e,s,i){const r=this._indexMap,a=this._fieldsIndex,o={getAttribute(t,i){const n=r[i];if(null==n){const e=a.get(i);if("__OBJECTID"===e?.name){const e=t.row+t.rowGroupStart;return(0,b.xb)(s,e)}return null}const o=e.readAttribute(t.rowGroup,t.row,n);if(null==o)return null;const u=a.get(i);return"esriFieldTypeString"===u.type||"esriFieldTypeDateOnly"===u.type||"esriFieldTypeTimeOnly"===u.type||"esriFieldTypeTimestampOffset"===u.type?D.decode(o):o}},u=await(0,c.GP)(i,this._fieldsIndex);if(!u.isStandardized)throw new n.A("sql-parse-error","expression is not standardized");const l=u.fieldNames.map(t=>a.get(t)).filter(t=>t&&null!=this._indexMap[t?.name]);t.setWhere(i),t.setWhereEvaluator((t,e,s)=>u.testFeatureCompiled({rowGroup:t,row:e,rowGroupStart:s},o,null)),t.setWhereFields(l.map(t=>t.name))}async*_streamFeatures(t,e,s,i,r){const n=await this._provider.getFiles();let a=0;for(const o of n){const n=a,u=a+o.statistics.rowCount;if(a+=o.statistics.rowCount,null!=e&&e>=u)continue;const l=null!=e?Math.max(e-n,0):null;let h=s;if(null!=s){const t=e??0,i=t+s,r=Math.max(t,n),a=Math.min(i,u);h=Math.max(a-r,0)}if(0===h)continue;const c=await this._createParquetQuery(t,o,l,h,i),p=await o.file,d=await p.executeQuery(c,B),f=async()=>{const t=await d.next(r);if(!t)return null;const e=new k.s(this._metadata,this._indexMap,t,o.id);return et([new T.j(e,null,0,!1)],this._queryEngineParams)};let y=await f();for(;null!=y;)yield y,y=await f()}}async _queryFeaturesWithQueryEnginePagination(t,e){const s=[],i=this._streamFeatures(t,null,null,null,e);let r=await i.next();for(;!r.done;){const n=await r.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(const t of n)s.push(t);r=await i.next()}return s}async _queryFeaturesWithUpfrontPagination(t,e){let s,i,r,n=t.resultOffset??0,a=t.resultRecordCount??B;!function(t){for(const e in t){const s=e;if(L(s)&&null!==t[s])return!0}return!1}(t)?(n&&(s=n,n=0),i=t.resultRecordCount):function(t){for(const e in t){const s=e;if(H(s)&&null!==t[s])return!0}return!1}(t)||(r=n+a);const o=[],u=this._streamFeatures(t,s,i,r,e);let l=await u.next();for(;!l.done&&a>0;){const s=await l.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(const t of s)if(n>0)n--;else if(o.push(t),--a<=0)return o;l=await u.next()}return o}_enqueueQuery(t,e){return this._queue.push(t,e)}async _executeQuery(t,e){if(t.objectIds?.length){const s=new Map;for(const e of t.objectIds){const t=(0,b.wY)(e),i=(0,b.gE)(e);let r=s.get(t);r||(r=[],s.set(t,r)),r.push(i)}const i=[];for(const[r,n]of s.entries()){const s=await this._executeFileIdQuery(t,r,n,e);for(const t of s)i.push(t)}return new I.G(i,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:Q,featureIdInfo:this._queryEngineParams.featureIdInfo})}if("1=1"===t.where&&(t.where=null),t.resultOffset??=0,t.resultRecordCount??=await this._getFeatureCount(),t.resultRecordCount>2e7&&(!this._displayOptimization||!t.geometry))throw new n.A("parquet:cannot-execute-query","Unable to execute query, dataset is too large.");const s=!!t.orderByFields?.length||!!t.outStatistics?.length||!!t.returnDistinctValues,i=s?await this._queryFeaturesWithQueryEnginePagination(t,e):await this._queryFeaturesWithUpfrontPagination(t,e);return s||(t.resultOffset=0),new I.G(i,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:Q,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(t,e,s,i){const r=await this._getRequiredFields(t),n=(await(0,q.N)()).Query.new();n.setOutFields(r),n.setReturnGeometry(!!t.returnGeometry),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM),n.setIds(new Uint32Array(s));const a=await this._getFile(e),o=await a.executeQuery(n,B,i);let u=await o.next(i),l=0;const h=[];for(;null!=u;){const t=new k.s(this._metadata,this._indexMap,u,e),s=new T.j(t,null,l++,!1);h.push(s),u=await o.next(i)}return et(h,this._queryEngineParams).executeQueryForOpaqueFeatures(t,i)}async _getRequiredFields(t){const e=new Set;if(t.outStatistics)for(const s of(0,g.g9)(this._fieldsIndex,t.outStatistics,t.groupByFieldsForStatistics))e.add(s);else if(t.outFields)for(const s of t.outFields)e.add(s);return(e.has("*")?this._fieldsIndex.fields.map(t=>t.name):Array.from(e)).filter(t=>null!=this._indexMap[t])}_tryGetGeneralizedGeometryResolution(t){if(!this._displayOptimization)return null;const e=t.outSR??this._queryEngineParams.spatialReference;if(!(0,_.K8)(e)&&!(0,_.oT)(e))return null;const s=t.quantizationParameters?.tolerance??t.maxAllowableOffset;return s?this._sourceResolution(s,e):null}_sourceResolution(t,e){const s=this._queryEngineParams.spatialReference,i=t*((0,p.GA)(e)/(0,p.GA)(s));return!Number.isFinite(i)||i<=0?null:i}}function U(t){switch(t){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":case"resultOffset":case"resultRecordCount":return!0;default:return!1}}function L(t){switch(t){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":return!0;default:return!1}}function H(t){switch(t){case"fullText":case"having":case"timeExtent":return!0;case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"resultOffset":case"geometry":case"resultRecordCount":return!1}return!1}function Y(t){for(const e in t){const s=e;if(U(s)&&null!==t[s])return!0}return!1}function X(t,e){const s="exceedslimit"!==t.statisticType?e.get(t.onStatisticField):null,i="min"!==t.statisticType&&"max"!==t.statisticType||"esriFieldTypeDate"!==s?.type?"esriFieldTypeDouble":s.type;return{name:t.outStatisticFieldName,alias:t.outStatisticFieldName,type:i}}function K(t,e){switch(t.statisticType){case"count":return function(t,e){if("count"!==t.statisticType)return{available:!1,value:null};if("1"===t.onStatisticField)return{available:!0,value:e.reduce((t,e)=>t+e.statistics.rowCount,0)};let s=0;for(const i of e){const e=i.statistics.statistics.get(t.onStatisticField);if(null==e||null==e.nullCount)return{available:!1,value:null};s+=i.statistics.rowCount-e.nullCount}return{available:!0,value:s}}(t,e);case"min":return $(t,e,Math.min);case"max":return $(t,e,Math.max);default:return{available:!1,value:null}}}function $(t,e,s){if("min"!==t.statisticType&&"max"!==t.statisticType)return{available:!1,value:null};let i=null;const r="min"===t.statisticType?"minValue":"maxValue";for(const n of e){const e=n.statistics.statistics.get(t.onStatisticField);if(null==e)return{available:!1,value:null};switch(e.type){case"null-only":continue;case"unknown":return{available:!1,value:null};case"bounds":{const t=tt(e[r]);if(null==t)return{available:!1,value:null};i=null==i?t:s(i,t);break}}}return{available:!0,value:i}}function tt(t){return"number"==typeof t&&Number.isFinite(t)?t:null}function et(t,e){const s=new E.I;for(const e of t)s.insert(e);return new x.do({...e,featureStore:s})}function st(t,e){return t.statistics.statistics.get(e.fieldName)??null}function it(t,e){const s=st(t,e);return"bounds"!==s?.type?Number.POSITIVE_INFINITY:s.maxValue-s.minValue}function rt(t,e,s){const i=t?.featureCount;let r=!1;return null!=i&&i<(0,o.A)("parquetlayer-full-query-feature-count")&&(r=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:s,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...w.F,maxRecordCount:B,supportsOrderBy:r,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);