@arcgis/core 6.0.0-next.25 → 6.0.0-next.27

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 (238) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{6f1d6453184e0a1530ad.js → 00580a68835aac653038.js} +22 -22
  3. package/assets/esri/core/workers/chunks/0363d29fc665d169ebc4.js +1 -0
  4. package/assets/esri/core/workers/chunks/037c67ef5c4398d5954d.js +1 -0
  5. package/assets/esri/core/workers/chunks/07b726a46864501b90a0.js +1 -0
  6. package/assets/esri/core/workers/chunks/0864da8f8f147016cf1c.js +1 -0
  7. package/assets/esri/core/workers/chunks/0bd04bcd4b2710838d48.js +1 -0
  8. package/assets/esri/core/workers/chunks/{768389f7f8dba6080df7.js → 0cc7fba402a93e6d2455.js} +2 -2
  9. package/assets/esri/core/workers/chunks/0cfdeb53fb7d5532cf01.js +1 -0
  10. package/assets/esri/core/workers/chunks/112ed86f812e4400a7e0.js +1 -0
  11. package/assets/esri/core/workers/chunks/177f353ce72133e2eeed.js +1 -0
  12. package/assets/esri/core/workers/chunks/1dc6f093028530a492e6.js +1 -0
  13. package/assets/esri/core/workers/chunks/2294254af2c6afb560ee.js +1 -0
  14. package/assets/esri/core/workers/chunks/23a4806b4cdf7cc32e4d.js +1 -0
  15. package/assets/esri/core/workers/chunks/2447d2e2a4a3ab8fcf94.js +1 -0
  16. package/assets/esri/core/workers/chunks/271ae7deccb94112c2df.js +1 -0
  17. package/assets/esri/core/workers/chunks/2df37a9a95ceebb87a5f.js +1 -0
  18. package/assets/esri/core/workers/chunks/2e00c155e447e4930442.js +1 -0
  19. package/assets/esri/core/workers/chunks/2e9a1673b1d51aa082b6.js +1 -0
  20. package/assets/esri/core/workers/chunks/344f5334ad95c7974349.js +1 -0
  21. package/assets/esri/core/workers/chunks/348f1def9cd2ddf92e87.js +1 -0
  22. package/assets/esri/core/workers/chunks/{8e4206068c6953bb7df2.js → 3a47fc97c400fca2c736.js} +1 -1
  23. package/assets/esri/core/workers/chunks/47c97640ec525676918b.js +1 -0
  24. package/assets/esri/core/workers/chunks/50763ea061d5fb3f2e49.js +1 -0
  25. package/assets/esri/core/workers/chunks/518ab22f80c3300bcfff.js +1 -0
  26. package/assets/esri/core/workers/chunks/58609bf94f72bc4f1952.js +1 -0
  27. package/assets/esri/core/workers/chunks/586a929bc037e23857af.js +1 -0
  28. package/assets/esri/core/workers/chunks/58d10e0b35968680fd9f.js +1 -0
  29. package/assets/esri/core/workers/chunks/59bc55880e6fd8ce20c0.js +1 -0
  30. package/assets/esri/core/workers/chunks/62a0abcf45a2bd14ecbe.js +1 -0
  31. package/assets/esri/core/workers/chunks/63c4412c16d8a44a5668.js +1 -0
  32. package/assets/esri/core/workers/chunks/6b4c3411f63a9ad9354c.js +1 -0
  33. package/assets/esri/core/workers/chunks/{f528ac5c648ca6a98582.js → 711cfb84659cb4437679.js} +1 -1
  34. package/assets/esri/core/workers/chunks/77463141652bf1ca6fb2.js +1 -0
  35. package/assets/esri/core/workers/chunks/7d3f7940815fa5dc244e.js +1 -0
  36. package/assets/esri/core/workers/chunks/914a0b5d9fef683cdf9c.js +1 -0
  37. package/assets/esri/core/workers/chunks/96f87c8efd4b11b37686.js +1 -0
  38. package/assets/esri/core/workers/chunks/97ec46605f16333144b7.js +1 -0
  39. package/assets/esri/core/workers/chunks/{7b482afb9fd1229f5707.js → 9934e8e19f94e9169eea.js} +1 -1
  40. package/assets/esri/core/workers/chunks/99f51d5d9da6e9bfc430.js +1 -0
  41. package/assets/esri/core/workers/chunks/9aebe876b1a2fb075f9c.js +1 -0
  42. package/assets/esri/core/workers/chunks/9c3db7a7c05fa0e81f0a.js +1 -0
  43. package/assets/esri/core/workers/chunks/a2cc53ad1a514167e4b8.js +1 -0
  44. package/assets/esri/core/workers/chunks/a33ba23aee3f8f40200f.js +1 -0
  45. package/assets/esri/core/workers/chunks/{45ba4aa87a4732198596.js → b13d8f4e4e80ef00b1bd.js} +1 -1
  46. package/assets/esri/core/workers/chunks/b3801d58c024224917df.js +1 -0
  47. package/assets/esri/core/workers/chunks/b3aa29589dcfb5b93106.js +1 -0
  48. package/assets/esri/core/workers/chunks/b3dbcf43f136ba2dadc5.js +1 -0
  49. package/assets/esri/core/workers/chunks/b9596d862da1ec342cd3.js +1 -0
  50. package/assets/esri/core/workers/chunks/bc1fcc9c897461e68e29.js +1 -0
  51. package/assets/esri/core/workers/chunks/{8b4e9fd88c0c313416d4.js → be04f40f8b403befd0ef.js} +1 -1
  52. package/assets/esri/core/workers/chunks/c29091fe157564cffcf7.js +1 -0
  53. package/assets/esri/core/workers/chunks/{150e7a7bd5df25693da7.js → c90388932a7825d9d933.js} +1 -1
  54. package/assets/esri/core/workers/chunks/ca21786e519c914fc9e1.js +1 -0
  55. package/assets/esri/core/workers/chunks/cdb5c26fed7d9a97db49.js +1 -0
  56. package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +1 -0
  57. package/assets/esri/core/workers/chunks/d63e181f0e48bde73395.js +1 -0
  58. package/assets/esri/core/workers/chunks/d77888c84a8b49478807.js +1 -0
  59. package/assets/esri/core/workers/chunks/d7f2f1708d2a2668676c.js +1 -0
  60. package/assets/esri/core/workers/chunks/ec1c4d66142b6efb0e8b.js +1 -0
  61. package/assets/esri/core/workers/chunks/ef2c3febcceedc44b3ac.js +1 -0
  62. package/assets/esri/core/workers/chunks/f08a2a262a3b55149396.js +1 -0
  63. package/assets/esri/core/workers/chunks/f2d56f5c15d5977e1d19.js +1 -0
  64. package/assets/esri/core/workers/chunks/ffe2077a9df7c838ea27.js +1 -0
  65. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  66. package/chunks/GlobalIllumination.glsl.js +15 -30
  67. package/chunks/RibbonLine.glsl.js +2 -2
  68. package/config.js +1 -1
  69. package/core/ReentrantObjectPool.js +1 -1
  70. package/core/memoryEstimations.js +1 -1
  71. package/core/workers/workers.js +2 -2
  72. package/core/workers.d.ts +1 -1
  73. package/form/elements/inputs.d.ts +126 -25
  74. package/form/elements/inputs.js +1 -1
  75. package/form/elements.d.ts +1 -0
  76. package/geometry/support/Indices.js +1 -1
  77. package/graphic/MapNotesGraphicOrigin.d.ts +1 -0
  78. package/kernel.js +1 -1
  79. package/layers/GeospatialPDFLayer.js +1 -1
  80. package/layers/MapNotesLayer.d.ts +3 -2
  81. package/layers/VectorTileLayer.d.ts +10 -1
  82. package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +2 -1
  83. package/layers/geospatialPDF/CIM2DLayerview.js +2 -0
  84. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  85. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  86. package/layers/mixins/SublayersOwner.js +1 -1
  87. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  88. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  89. package/layers/support/Sublayer.d.ts +2 -2
  90. package/layers/support/Sublayer.js +1 -1
  91. package/layers/support/SubtypeSublayer.js +1 -1
  92. package/layers/support/layerUtils.js +1 -1
  93. package/package.json +3 -3
  94. package/rest/support/AttributeBinsQuery.d.ts +3 -2
  95. package/rest/support/ImageGPSInfoParameters.d.ts +2 -1
  96. package/rest/support/OutDistance.d.ts +2 -1
  97. package/rest/support/Query.d.ts +3 -2
  98. package/rest/support/TopFeaturesQuery.d.ts +2 -1
  99. package/rest/support/types.d.ts +10 -1
  100. package/smartMapping/raster/renderers/flow.d.ts +2 -1
  101. package/smartMapping/renderers/color.d.ts +11 -8
  102. package/smartMapping/renderers/location.d.ts +7 -4
  103. package/smartMapping/renderers/predominance.d.ts +7 -4
  104. package/smartMapping/renderers/relationship.d.ts +7 -4
  105. package/smartMapping/renderers/size.d.ts +6 -4
  106. package/smartMapping/renderers/type.d.ts +7 -4
  107. package/smartMapping/renderers/types.d.ts +15 -0
  108. package/smartMapping/renderers/univariateColorSize.d.ts +4 -2
  109. package/smartMapping/symbology/flow.d.ts +2 -1
  110. package/smartMapping/symbology/types.d.ts +2 -1
  111. package/symbols/cim/CIMCursor.js +1 -1
  112. package/tables/elements.d.ts +1 -0
  113. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  114. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  115. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
  116. package/views/2d/engine/webgl/textureUtils.js +1 -1
  117. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  118. package/views/2d/layers/MediaLayerView2D.js +1 -1
  119. package/views/2d/layers/TileLayerView2D.js +1 -1
  120. package/views/3d/layers/GeospatialPDFLayerView3D.js +1 -1
  121. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  122. package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +1 -1
  123. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  124. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayerBase.js +1 -1
  125. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  126. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  127. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  128. package/views/3d/layers/graphics/Graphics3DGraphicCreationContext.js +1 -1
  129. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  130. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  131. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  132. package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +1 -1
  133. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  134. package/views/3d/layers/graphics/Labeler.js +1 -1
  135. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  136. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  137. package/views/3d/layers/support/featureReference.js +1 -1
  138. package/views/3d/terrain/PatchRenderData.js +1 -1
  139. package/views/3d/terrain/TerrainData.js +1 -1
  140. package/views/3d/terrain/TerrainRenderer.js +1 -1
  141. package/views/3d/terrain/TerrainSurface.js +1 -1
  142. package/views/3d/terrain/TextureFader.js +1 -1
  143. package/views/3d/terrain/TextureReference.js +1 -1
  144. package/views/3d/terrain/TileCompositor.js +1 -1
  145. package/views/3d/terrain/TileRenderInfo.js +1 -1
  146. package/views/3d/terrain/TileRenderer.js +1 -1
  147. package/views/3d/terrain/terrainUtils.js +1 -1
  148. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +25 -25
  149. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  150. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  151. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  152. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  153. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  154. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  155. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  156. package/views/3d/webgl-engine/lib/DirtyEvents.js +1 -1
  157. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  158. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  159. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  160. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  161. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  162. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  163. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  164. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  165. package/views/3d/webgl-engine/lib/geometryMemoryUtils.js +2 -0
  166. package/views/VideoView.js +1 -1
  167. package/views/selection/SelectionOperation.js +1 -1
  168. package/views/selection/types.d.ts +43 -3
  169. package/views/support/layerViewUtils.js +1 -1
  170. package/views/support/selectionUtils.js +1 -1
  171. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  172. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  173. package/widgets/OrientedImageryViewer.js +2 -2
  174. package/widgets/Print.js +1 -1
  175. package/widgets/support/SelectionList/GroupLayerItem.d.ts +6 -0
  176. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  177. package/widgets/support/SelectionList/ItemBase.js +1 -1
  178. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +6 -1
  179. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  180. package/widgets/support/SelectionToolbar.d.ts +8 -1
  181. package/widgets/support/SelectionToolbar.js +1 -1
  182. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  183. package/assets/esri/core/workers/chunks/0320cbd825f9a4222042.js +0 -1
  184. package/assets/esri/core/workers/chunks/067de1910190da228291.js +0 -1
  185. package/assets/esri/core/workers/chunks/09bd5df07eab80ae7b15.js +0 -1
  186. package/assets/esri/core/workers/chunks/164e74d586297946a717.js +0 -1
  187. package/assets/esri/core/workers/chunks/1c0c5cb13c2590aae906.js +0 -1
  188. package/assets/esri/core/workers/chunks/1c77de1e79860f8d2228.js +0 -1
  189. package/assets/esri/core/workers/chunks/24dac4970526a4e0ae63.js +0 -1
  190. package/assets/esri/core/workers/chunks/2acf2952cef69e382a35.js +0 -1
  191. package/assets/esri/core/workers/chunks/30dcf2cfb31cb70de7df.js +0 -1
  192. package/assets/esri/core/workers/chunks/371e2ddb88cc6b9a41e8.js +0 -1
  193. package/assets/esri/core/workers/chunks/42f6194633c2d879c8da.js +0 -1
  194. package/assets/esri/core/workers/chunks/44f90e75c1dc3d726a95.js +0 -1
  195. package/assets/esri/core/workers/chunks/4abd3753cd9b80e4d937.js +0 -1
  196. package/assets/esri/core/workers/chunks/4bb9a5f4ca944d3fc206.js +0 -1
  197. package/assets/esri/core/workers/chunks/4c389472b8cdb0c55154.js +0 -1
  198. package/assets/esri/core/workers/chunks/4d93bed14945e3d34d5c.js +0 -1
  199. package/assets/esri/core/workers/chunks/4e3f651ac76fcd53df2b.js +0 -1
  200. package/assets/esri/core/workers/chunks/505227797bcf2a1d908d.js +0 -1
  201. package/assets/esri/core/workers/chunks/58da3f8cf0f7f6a7e4fa.js +0 -1
  202. package/assets/esri/core/workers/chunks/5a19a9c3e01d3d415188.js +0 -1
  203. package/assets/esri/core/workers/chunks/5a830bc35adbedd33783.js +0 -1
  204. package/assets/esri/core/workers/chunks/6db0f8fe1402643fbe1a.js +0 -1
  205. package/assets/esri/core/workers/chunks/7124ad8dc5ad40dc66f3.js +0 -1
  206. package/assets/esri/core/workers/chunks/7446d0dfebf93e86c098.js +0 -1
  207. package/assets/esri/core/workers/chunks/7c631e2947243e2c9bde.js +0 -1
  208. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +0 -1
  209. package/assets/esri/core/workers/chunks/7fb7493f483cd9878bfa.js +0 -1
  210. package/assets/esri/core/workers/chunks/8e310e9cb9d84ac3ca2f.js +0 -1
  211. package/assets/esri/core/workers/chunks/950d4578dc450467404c.js +0 -1
  212. package/assets/esri/core/workers/chunks/99a0a434ea2162166754.js +0 -1
  213. package/assets/esri/core/workers/chunks/9afc87474cef1fc4fe4a.js +0 -1
  214. package/assets/esri/core/workers/chunks/9cbde13e536676767900.js +0 -1
  215. package/assets/esri/core/workers/chunks/9cd3fcb5fca6f9dbbcd8.js +0 -1
  216. package/assets/esri/core/workers/chunks/a025ee38d402504193df.js +0 -1
  217. package/assets/esri/core/workers/chunks/a4b822ee45810c4c292a.js +0 -1
  218. package/assets/esri/core/workers/chunks/a51576d84edca88e41dd.js +0 -1
  219. package/assets/esri/core/workers/chunks/ac24b4370dc7194a3107.js +0 -1
  220. package/assets/esri/core/workers/chunks/ace41659a5ca0e5abfc3.js +0 -1
  221. package/assets/esri/core/workers/chunks/b01804aa6c47a220a603.js +0 -1
  222. package/assets/esri/core/workers/chunks/b3273f847405799e3362.js +0 -1
  223. package/assets/esri/core/workers/chunks/ba3d5abff65aefcb8dee.js +0 -1
  224. package/assets/esri/core/workers/chunks/bca6b469940b7b954123.js +0 -1
  225. package/assets/esri/core/workers/chunks/c0d7ae314ebfad1e3791.js +0 -1
  226. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +0 -1
  227. package/assets/esri/core/workers/chunks/cd9aa950cb74b09008fe.js +0 -1
  228. package/assets/esri/core/workers/chunks/e0d9dc97985561320bd4.js +0 -1
  229. package/assets/esri/core/workers/chunks/e2775b4b753306dc8477.js +0 -1
  230. package/assets/esri/core/workers/chunks/eaddffcc7004101fc230.js +0 -1
  231. package/assets/esri/core/workers/chunks/ebbf425af348e6ede814.js +0 -1
  232. package/assets/esri/core/workers/chunks/efc53007cd2e4991d7d4.js +0 -1
  233. package/assets/esri/core/workers/chunks/f46e92c67986c8c09bdd.js +0 -1
  234. package/assets/esri/core/workers/chunks/f8bc474434fd365ab174.js +0 -1
  235. package/assets/esri/core/workers/chunks/f8d2225f333524ce1d88.js +0 -1
  236. package/assets/esri/core/workers/chunks/f95a1f878c9c1146180e.js +0 -1
  237. package/assets/esri/core/workers/chunks/fb37f0848196c28b7fd7.js +0 -1
  238. /package/assets/esri/core/workers/chunks/{768389f7f8dba6080df7.js.LICENSE.txt → 0cc7fba402a93e6d2455.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7237],{11006(t,e,i){function n(t,e,i,n,s){r(t,e,i||0,n||t.length-1,s||o)}function r(t,e,i,n,o){for(;n>i;){if(n-i>600){var l=n-i+1,h=e-i+1,a=Math.log(l),u=.5*Math.exp(2*a/3),f=.5*Math.sqrt(a*u*(l-u)/l)*(h-l/2<0?-1:1);r(t,e,Math.max(i,Math.floor(e-h*u/l+f)),Math.min(n,Math.floor(e+(l-h)*u/l+f)),o)}var c=t[e],d=i,y=n;for(s(t,i,e),o(t[n],c)>0&&s(t,i,n);d<y;){for(s(t,d,y),d++,y--;o(t[d],c)<0;)d++;for(;o(t[y],c)>0;)y--}0===o(t[i],c)?s(t,i,y):s(t,++y,n),y<=e&&(i=y+1),e<=y&&(n=y-1)}}function s(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function o(t,e){return t<e?-1:+(t>e)}i.d(e,{q:()=>n})},69540(t,e,i){var n=i(32198),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(88620),h=i(64108);const a=Symbol("ClonableMixin"),u=t=>{var e;let i=t,r=class extends i{constructor(){super(...arguments),this[e]=!0}static{e=a}clone(t){let e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");let i=e.metadata,n=e.store,r={},h=new Map;for(let e in i){let o=i[e],l=n?.originOf(e),a=o.clonable;if(o.readOnly||!1===a||7!==l&&0!==l&&5!==l&&4!==l)continue;let u=this[e],f=null;if("function"==typeof a)f=a(u,t);else if("reference"===a)f=u;else if(f=(0,s.TU)(u,t),null!=u&&null==f)continue;0===l?h.set(e,f):r[e]=f}let a=new(0,Object.getPrototypeOf(this).constructor)(r);if(h.size){let t=(0,l.oY)(a)?.store;if(t)for(let[e,i]of h)t.set(e,i,0)}return a}};return r=(0,n.Cg)([(0,h.$)("esri.core.Clonable")],r),r},f=u(r.A);i.d(e,["OU",0,u,"Pw",0,f])},67482(t,e,i){function n(t){return null!==r(t)}function r(t){return function(t){let e=s.exec(t);if(!e?.groups)return null;let i=e.groups,n=+i.year,r=i.month-1,o=+i.day,l=+(i.hours??"0"),h=+(i.minutes??"0"),a=+(i.seconds??"0");if(l>23||h>59||a>59)return null;let u,f=i.ms??"0",c=f?+f.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)u=Date.UTC(n,r,o,l,h,a,c);else{let t=+i.offsetHours,e=+i.offsetMinutes;u=6e4*("+"===i.offsetSign?-1:1)*(60*t+e)+Date.UTC(n,r,o,l,h,a,c)}return Number.isNaN(u)?null:u}(t)??function(t){let e=new Date(t),i=e.getTime();return Number.isNaN(i)?null:t.toLowerCase()===e.toUTCString().toLowerCase()?i:null}(t)??function(t){if(!o.test(t))return null;let e=new Date(t);return Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset()}(t)}i.d(e,{C:()=>n,_:()=>r});const s=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,o=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(t,e,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}i.d(e,{o8:()=>r,vt:()=>n});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(t,e,i,n,r,s,o,l,h,a,u,f,c,d,y,m){return[t,e,i,n,r,s,o,l,h,a,u,f,c,d,y,m]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,s])},35522(t,e,i){i.d(e,{$A:()=>T,Bw:()=>s,C:()=>o,Cc:()=>P,DI:()=>b,Io:()=>_,Ln:()=>g,Om:()=>I,Qr:()=>f,Re:()=>a,S8:()=>v,T9:()=>m,WQ:()=>h,Z0:()=>A,_S:()=>d,aI:()=>G,ei:()=>B,fw:()=>F,gL:()=>S,hG:()=>x,hZ:()=>l,hs:()=>p,jk:()=>y,lw:()=>u,m3:()=>M,oW:()=>O,t2:()=>Z,tn:()=>c,ze:()=>w});var n=i(51850),r=i(34304);function s(t){let e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function l(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function h(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function a(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function f(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function m(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function p(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function g(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t}function _(t,e){let i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(i*i+n*n+r*r)}function x(t,e){let i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return i*i+n*n+r*r}function M(t){let e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e=t){let i=e[0],n=e[1],r=e[2],s=i*i+n*n+r*r;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s),t}function I(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function T(t,e,i){let n=e[0],r=e[1],s=e[2],o=i[0],l=i[1],h=i[2];return t[0]=r*h-s*l,t[1]=s*o-n*h,t[2]=n*l-r*o,t}function P(t,e,i,n){let r=e[0],s=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=s+n*(i[1]-s),t[2]=o+n*(i[2]-o),t}function A(t,e,i){let n=e[0],r=e[1],s=e[2];return t[0]=i[0]*n+i[4]*r+i[8]*s+i[12],t[1]=i[1]*n+i[5]*r+i[9]*s+i[13],t[2]=i[2]*n+i[6]*r+i[10]*s+i[14],t}function B(t,e,i){let n=e[0],r=e[1],s=e[2];return t[0]=n*i[0]+r*i[3]+s*i[6],t[1]=n*i[1]+r*i[4]+s*i[7],t[2]=n*i[2]+r*i[5]+s*i[8],t}function S(t,e,i){return F(t,e,i[0],i[1],i[2],i[3])}function F(t,e,i,n,r,s){let o=e[0],l=e[1],h=e[2],a=n*h-r*l,u=r*o-i*h,f=i*l-n*o,c=n*f-r*u,d=r*a-i*f,y=i*u-n*a,m=2*s;return t[0]=o+a*m+2*c,t[1]=l+u*m+2*d,t[2]=h+f*m+2*y,t}const C=(0,n.vt)(),R=(0,n.vt)();function Z(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function G(t,e){if(t===e)return!0;let i=t[0],n=t[1],s=t[2],o=e[0],l=e[1],h=e[2],a=(0,r.FD)();return Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-l)<=a*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(s-h)<=a*Math.max(1,Math.abs(s),Math.abs(h))}function O(t,e,i){let n=i[0]-e[0],r=i[1]-e[1],s=i[2]-e[2],o=n*n+r*r+s*s;return o>0?(o=1/Math.sqrt(o),t[0]=n*o,t[1]=r*o,t[2]=s*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=a,q=u,N=f,Y=_,L=x,X=s,k=M;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:h,angle:function(t,e){v(C,t),v(R,e);let i=I(C,R);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(t,e,i,n,r,s){let o=1-s,l=o*o,h=s*s,a=l*o,u=3*s*l,f=3*h*o,c=h*s;return t[0]=e[0]*a+i[0]*u+n[0]*f+r[0]*c,t[1]=e[1]*a+i[1]*u+n[1]*f+r[1]*c,t[2]=e[2]*a+i[2]*u+n[2]*f+r[2]*c,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:o,cross:T,crossAndNormalize:function(t,e,i){let n=e[0],r=e[1],s=e[2],o=i[0],l=i[1],h=i[2],a=r*h-s*l,u=s*o-n*h,f=n*l-r*o,c=Math.sqrt(a*a+u*u+f*f);return t[0]=a/c,t[1]=u/c,t[2]=f/c,t},direction:O,dist:Y,distance:_,div:N,divide:f,dot:I,equals:G,exactEquals:Z,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,n,r,s){let o=s*s,l=o*(2*s-3)+1,h=o*(s-2)+s,a=o*(s-1),u=o*(3-2*s);return t[0]=e[0]*l+i[0]*h+n[0]*a+r[0]*u,t[1]=e[1]*l+i[1]*h+n[1]*a+r[1]*u,t[2]=e[2]*l+i[2]*h+n[2]*a+r[2]*u,t},inverse:b,len:X,length:s,lerp:P,max:m,min:y,mul:q,multiply:u,negate:w,normalize:v,random:function(t,e=1){let i=r.Ov,n=2*i()*Math.PI,s=2*i()-1,o=Math.sqrt(1-s*s)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=s*e,t},rotateX:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[0],s[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),s[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},rotateY:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),s[1]=r[1],s[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},rotateZ:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),s[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),s[2]=r[2],t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:p,scaleAndAdd:g,scaleTo:function(t,e){return p(t,t,e/X(t))},set:l,sign:d,sqrDist:L,sqrLen:k,squaredDistance:x,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:a,transformMat3:B,transformMat4:A,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:S,transformQuatValues:F},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,X,"jb",0,j,"lo",0,L,"uE",0,k])},75503(t,e,i){i.d(e,{wq:()=>l});var n=i(4576),r=i(21818),s=(i(44208),i(15142)),o=i(11006);class l{constructor(t=9,e){this._compareMinX=c,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),w.prune(),b.prune(),v.prune(),I.prune()}all(t){h(this._data,t)}search(t,e){let i=this._data,n=this._toBBox;if(x(t,i))for(w.clear();i;){for(let r=0,s=i.children.length;r<s;r++){let s=i.children[r],o=i.leaf?n(s):s;x(t,o)&&(i.leaf?e(s):_(t,o)?h(s,e):w.push(s))}i=w.pop()}}collides(t){let e=this._data,i=this._toBBox;if(!x(t,e))return!1;for(w.clear();e;){for(let n=0,r=e.children.length;n<r;n++){let r=e.children[n],s=e.leaf?i(r):r;if(x(t,s)){if(e.leaf||_(t,s))return!0;w.push(r)}}e=w.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){let t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(t){if(!t)return this;let e,i=this._data,s=null,o=0,l=!1,h=this._toBBox(t);for(v.clear(),I.clear();i||v.length>0;){if(i||(i=v.pop(),s=v.data[v.length-1],o=I.pop()??0,l=!0),i.leaf&&(e=(0,n.qh)(i.children,(0,r.z)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),v.push(i),this._condense(v),this;l||i.leaf||!_(i,h)?s?(o++,i=s.children[o],l=!1):i=null:(v.push(i),I.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,n){let r=i-e+1,s=this._maxEntries;if(r<=s){let n=new A(t.slice(e,i+1));return a(n,this._toBBox),n}n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(n-1)));let o=new B([]);o.height=n;let l=Math.ceil(r/s),h=l*Math.ceil(Math.sqrt(s));M(t,e,i,h,this._compareMinX);for(let r=e;r<=i;r+=h){let e=Math.min(r+h-1,i);M(t,r,e,l,this._compareMinY);for(let i=r;i<=e;i+=l){let r=Math.min(i+l-1,e);o.children.push(this._build(t,i,r,n-1))}}return a(o,this._toBBox),o}_insert(t,e,i){let n=this._toBBox,r=i?t:n(t);v.clear();let s=function(t,e,i,n){for(;n.push(e),!0!==e.leaf&&n.length-1!==i;){let i,n=1/0,r=1/0;for(let s=0,o=e.children.length;s<o;s++){let o=e.children[s],l=y(o),h=p(t,o)-l;h<r?(r=h,n=l<n?l:n,i=o):h===r&&l<n&&(n=l,i=o)}e=i||e.children[0]}return e}(r,this._data,e,v);for(s.children.push(t),f(s,r);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;!function(t,e,i){for(let n=i;n>=0;n--)f(e.data[n],t)}(r,v,e)}_split(t,e){let i=t.data[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);let s=this._chooseSplitIndex(i,r,n);if(!s)return;let o=i.children.splice(s,i.children.length-s),l=i.leaf?new A(o):new B(o);l.height=i.height,a(i,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(i,l)}_splitRoot(t,e){this._data=new B([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let n,r,s;n=r=1/0;for(let o=e;o<=i-e;o++){let e=u(t,0,o,this._toBBox),l=u(t,o,i,this._toBBox),h=g(e,l),a=y(e)+y(l);h<n?(n=h,s=o,r=a<r?a:r):h===n&&a<r&&(r=a,s=o)}return s}_chooseSplitAxis(t,e,i){let n=t.leaf?this._compareMinX:c,r=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);let r=this._toBBox,s=u(t,0,e,r),o=u(t,i-e,i,r),l=m(s)+m(o);for(let n=e;n<i-e;n++){let e=t.children[n];f(s,t.leaf?r(e):e),l+=m(s)}for(let n=i-e-1;n>=e;n--){let e=t.children[n];f(o,t.leaf?r(e):e),l+=m(o)}return l}_condense(t){for(let e=t.length-1;e>=0;e--){let i=t.data[e];if(0===i.children.length)if(e>0){let r=t.data[e-1],s=r.children;s.splice((0,n.qh)(s,i,s.length,r.indexHint),1)}else this.clear();else a(i,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function h(t,e){let i=t;for(b.clear();i;){if(!0===i.leaf)for(let t of i.children)e((0,r.z)(t));else b.pushArray(i.children);i=b.pop()??null}}function a(t,e){u(t,0,t.children.length,e,t)}function u(t,e,i,n,r){r||=new A([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=e;o<i;o++)s=t.children[o],f(r,t.leaf?n(s):s);return r}function f(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function g(t,e){let i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),s=Math.min(t.maxY,e.maxY);return Math.max(0,r-i)*Math.max(0,s-n)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function x(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,i,n,r){let s=[e,i];for(;s.length;){let e=s.pop(),i=s.pop();if(e-i<=n)continue;let l=i+Math.ceil((e-i)/n/2)*n;(0,o.q)(t,l,i,e,r),s.push(i,l,l,e)}}const w=new s.A,b=new s.A,v=new s.A,I=new s.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class B extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},69397(t,e,i){i.d(e,{Qf:()=>h,Qh:()=>o,lM:()=>s,ro:()=>a,rq:()=>u});var n=i(44208),r=i(34275);function s(t){if(!t)return 0;let e=f;for(let i in t)t.hasOwnProperty(i)&&(e+=l(t[i],!1));return e}function o(t){if(!t)return 0;if("number"==typeof t[0])return h(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let i=c;for(let n=0;n<e;n++)i+=l(t[n]);return i}(t);let e=f;for(let i in t)t.hasOwnProperty(i)&&(e+=l(t[i]));return e}function l(t,e=!0){switch(typeof t){case"object":return e?o(t):f;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function h(...t){return t.reduce((t,e)=>t+a(e),0)}function a(t,e=16){return t?(0,r.iu)(t)?t.byteLength+y:Array.isArray(t)?u(t,e):0:0}function u(t,e){return c+t.length*e}const f=32,c=16,d=(0,n.A)("ios")||!(0,n.A)("chrome")&&!(0,n.A)("opr")?8:4,y=145;i.d(e,["JY",0,d])},48526(t,e,i){i.d(e,{A:()=>p});var n,r=i(32198),s=i(4576),o=i(4718),l=i(91429),h=i(5443),a=i(91075),u=i(86738),f=i(16930),c=i(90634),d=i(47610),y=i(56993),m=i(43937);let p=n=class extends a.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:i,hasZ:n,spatialReference:r}=t;switch(e??=[],e?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=f.A.WGS84,{...t,hasM:i,hasZ:n,points:e,spatialReference:r}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let t=(0,c.ge)(this);return t?new h.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,o.o8)(this.points)}clone(){let{points:t,spatialReference:e,hasM:i,hasZ:r}=this;return new n({points:(0,o.o8)(t),spatialReference:e.clone(),hasM:i,hasZ:r})}equals(t){if(this===t)return!0;if(null==t)return!1;let e=this.spatialReference,i=t.spatialReference;return!(null!=e!=(null!=i)||null!=e&&null!=i&&!e.equals(i))&&(0,s.aI)(this.points,t.points,d.v6)}addPoint(t){return(0,y.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;let e=this.points[t],i={x:e[0],y:e[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=e[2],n=3),this.hasM&&(i.m=e[n]),new u.A(i)}removePoint(t){if(!this._validateInputs(t))return null;let e=new u.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)&&((0,y.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points")),this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,r.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r.Cg)([(0,l.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],p.prototype,"points",void 0),(0,r.Cg)([(0,m.K)("points")],p.prototype,"writePoints",null),p=n=(0,r.Cg)([(0,l.$K)("esri.geometry.Multipoint")],p),p.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,i){i.d(e,{A:()=>y});var n,r=i(32198),s=i(4718),o=i(91429),l=i(5443),h=i(91075),a=i(86738),u=i(16930),f=i(90634),c=i(56993),d=i(43937);let y=n=class extends h.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:i,hasZ:n,spatialReference:r}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=u.A.WGS84,{...t,hasM:i,hasZ:n,paths:e,spatialReference:r}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,s.o8)(t)}get extent(){let t=(0,f.Z3)(this),{spatialReference:e}=this;return t?new l.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,s.o8)(this.paths)}addPath(t){if(!t)return;let e=this.paths,i=e.length;if(function(t){return!Array.isArray(t[0])}(t)){let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e].toArray();e[i]=n}else e[i]=t.slice();return this.notifyChange("paths"),this}clone(){let t=new n;return t.spatialReference=this.spatialReference,t.paths=(0,s.o8)(this.paths),t.curvePaths=(0,s.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;let i=this.paths[t][e],n=this.hasZ,r=this.hasM;return n&&!r?new a.A(i[0],i[1],i[2],void 0,this.spatialReference):r&&!n?new a.A(i[0],i[1],void 0,i[2],this.spatialReference):n&&r?new a.A(i[0],i[1],i[2],i[3],this.spatialReference):new a.A(i[0],i[1],this.spatialReference)}insertPoint(t,e,i){return this._validateInputs(t,e,!0)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t].splice(e,0,i),this.notifyChange("paths")),this}removePath(t){if(!this._validateInputs(t,null))return null;let e=this.paths.splice(t,1)[0],i=this.spatialReference,n=e.map(t=>new a.A(t,i));return this.notifyChange("paths"),n}removePoint(t,e){if(!this._validateInputs(t,e))return null;let i=new a.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(t,e,i){return this._validateInputs(t,e)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t][e]=i,this.notifyChange("paths")),this}_validateInputs(t,e,i=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){let n=this.paths[t];if(i&&(e<0||e>n.length)||!i&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],y.prototype,"curvePaths",void 0),(0,r.Cg)([(0,d.K)("curvePaths")],y.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),(0,r.Cg)([(0,d.K)("paths")],y.prototype,"writePaths",null),y=n=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],y),y.prototype.toJSON.isDefaultToJSON=!0},4197(t,e,i){i.d(e,{Vj:()=>u,cj:()=>a,jh:()=>s,l5:()=>l,yH:()=>h});var n=i(34275),r=i(9093);function s(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function o(t){return((0,n.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function l(t,e,i){return Array.isArray(t)?t.slice(e,e+i):t.subarray(e,e+i)}function h(t,e){if(0===e.length)return o(t);if(0===t.length)return o(e);let i=s(t.length+e.length);for(let e=0;e<t.length;++e)i[e]=t[e];for(let n=0;n<e.length;++n)i[t.length+n]=e[n];return i}function a(t){return[...t]}function u(t){let e=(0,r.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},6774(t,e,i){i.d(e,{O3:()=>s,Ox:()=>o,bR:()=>n});class n{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new n(t[0],t[1])}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){let t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){let t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){let t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){let i=this.x,n=this.y;return this.x=i*t-n*e,this.y=i*e+n*t,this}rotateReverse(t,e){let i=this.x,n=this.y;return this.x=i*t+n*e,this.y=-i*e+n*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){let t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){let i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}class r{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class s{constructor(t,e,i,n=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=r,this._tileSize=512*n,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;let i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new n(t,e),this._firstPt=new n(t,e),this._dist=0}lineTo(t,e){let i,s,o,l,h,a,u,f,c=this._isIn(t,e),d=new n(t,e),y=n.distance(this._prevPt,d);if(c)this._prevIsIn?this._lineTo(t,e,!0):(i=this._prevPt,s=d,o=this._intersect(s,i),this._start=this._dist+y*(1-this._r),this._lineTo(o.x,o.y,!0),this._lineTo(s.x,s.y,!0));else if(this._prevIsIn)s=this._prevPt,i=d,o=this._intersect(s,i),this._lineTo(o.x,o.y,!0),this._lineTo(i.x,i.y,!1);else{let t=this._prevPt,e=d;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{let i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(l=(this._xmin-t.x)/(e.x-t.x),f=t.y+l*(e.y-t.y),f<this._ymin?a=!1:f>this._ymax?a=!0:i.push(new r(l,this._xmin,f))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(l=(this._xmax-t.x)/(e.x-t.x),f=t.y+l*(e.y-t.y),f<this._ymin?a=!1:f>this._ymax?a=!0:i.push(new r(l,this._xmax,f))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(l=(this._ymin-t.y)/(e.y-t.y),u=t.x+l*(e.x-t.x),u<=this._xmin?h=!1:u>=this._xmax?h=!0:i.push(new r(l,u,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(l=(this._ymax-t.y)/(e.y-t.y),u=t.x+l*(e.x-t.x),u<=this._xmin?h=!1:u>=this._xmax?h=!0:i.push(new r(l,u,this._ymax))),0===i.length)h?a?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):a?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+y*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+y*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=y,this._prevIsIn=c,this._prevPt=d}close(){if(this._line.length>2){let t=this._firstPt,e=this._prevPt;(t.x!==e.x||t.y!==e.y)&&this.lineTo(t.x,t.y);let i=this._line,n=i.length;for(;n>=4&&(i[0].x===i[1].x&&i[0].x===i[n-2].x||i[0].y===i[1].y&&i[0].y===i[n-2].y);)i.pop(),i[0].x=i[n-2].x,i[0].y=i[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&l.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw Error("Only valid for lines");this._pushLine();let t=this._lines,e=t.length;if(0===e)return null;let i=[];for(let n=0;n<e;n++)i.push({line:t[n],start:this._starts[n]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,r,s;if(e.x>=this._xmin&&e.x<=this._xmax)r=e.y<=this._ymin?this._ymin:this._ymax,s=(r-t.y)/(e.y-t.y),i=t.x+s*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,s=(i-t.x)/(e.x-t.x),r=t.y+s*(e.y-t.y);else{r=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;let n=(i-t.x)/(e.x-t.x),o=(r-t.y)/(e.y-t.y);n<o?(s=n,r=t.y+n*(e.y-t.y)):(s=o,i=t.x+o*(e.x-t.x))}return this._r=s,new n(i,r)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3===this._type?(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)),this._isH=!1,this._isV=!1):i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)))}_lineTo(t,e,i){let r,s;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(r=this._line[this._line.length-1],r.equals(t,e)))return;this._line.push(new n(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){r=this._line[this._line.length-1];let i=r.x===t,o=r.y===e;if(i&&o)return;this._isH&&i||this._isV&&o?(r.x=t,r.y=e,s=this._line[this._line.length-2],s.x===t&&s.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(s=this._line[this._line.length-2],this._isH=s.x===t,this._isV=s.y===e)):(this._isH=s.x===t,this._isV=s.y===e)):(this._line.push(new n(t,e)),this._isH=i,this._isV=o)}else this._line.push(new n(t,e))}}class o{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];let i=this._ratio;this._line.push(new n(t*i,e*i))}lineTo(t,e){let i=this._ratio;this._line.push(new n(t*i,e*i))}close(){let t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class l{static simplify(t,e,i){if(!i)return;let n=-e,r=t+e,s=-e,o=t+e,h=[],a=[],u=i.length;for(let t=0;t<u;++t){let e=i[t];if(!e||e.length<2)continue;let l,u=e[0],f=e.length;for(let i=1;i<f;++i)l=e[i],u.x===l.x&&(u.x<=n&&(u.y>l.y?(h.push(t),h.push(i),h.push(0),h.push(-1)):(a.push(t),a.push(i),a.push(0),a.push(-1))),u.x>=r&&(u.y<l.y?(h.push(t),h.push(i),h.push(1),h.push(-1)):(a.push(t),a.push(i),a.push(1),a.push(-1)))),u.y===l.y&&(u.y<=s&&(u.x<l.x?(h.push(t),h.push(i),h.push(2),h.push(-1)):(a.push(t),a.push(i),a.push(2),a.push(-1))),u.y>=o&&(u.x>l.x?(h.push(t),h.push(i),h.push(3),h.push(-1)):(a.push(t),a.push(i),a.push(3),a.push(-1)))),u=l}if(0===h.length||0===a.length)return;l.fillParent(i,a,h),l.fillParent(i,h,a);let f=[];l.calcDeltas(f,a,h),l.calcDeltas(f,h,a),l.addDeltas(f,i)}static fillParent(t,e,i){let n=i.length,r=e.length;for(let s=0;s<r;s+=4){let r=e[s],o=e[s+1],l=e[s+2],a=t[r][o-1],u=t[r][o],f=8092,c=-1;for(let e=0;e<n;e+=4){if(i[e+2]!==l)continue;let n=i[e],r=i[e+1],s=t[n][r-1],o=t[n][r];switch(l){case 0:case 1:if(h(a.y,s.y,o.y)&&h(u.y,s.y,o.y)){let t=Math.abs(o.y-s.y);t<f&&(f=t,c=e)}break;case 2:case 3:if(h(a.x,s.x,o.x)&&h(u.x,s.x,o.x)){let t=Math.abs(o.x-s.x);t<f&&(f=t,c=e)}}}e[s+3]=c}}static calcDeltas(t,e,i){let n=e.length;for(let r=0;r<n;r+=4){let n=l.calcDelta(r,e,i,[]);t.push(e[r]),t.push(e[r+1]),t.push(e[r+2]),t.push(n)}}static calcDelta(t,e,i,n){let r=e[t+3];if(-1===r)return 0;let s=n.length;return s>1&&n[s-2]===r?0:(n.push(r),l.calcDelta(r,i,e,n)+1)}static addDeltas(t,e){let i=t.length,n=0;for(let e=0;e<i;e+=4){let i=t[e+3];i>n&&(n=i)}for(let r=0;r<i;r+=4){let i=e[t[r]],s=t[r+1],o=n-t[r+3];switch(t[r+2]){case 0:i[s-1].x-=o,i[s].x-=o,1===s&&(i[i.length-1].x-=o),s===i.length-1&&(i[0].x-=o);break;case 1:i[s-1].x+=o,i[s].x+=o,1===s&&(i[i.length-1].x+=o),s===i.length-1&&(i[0].x+=o);break;case 2:i[s-1].y-=o,i[s].y-=o,1===s&&(i[i.length-1].y-=o),s===i.length-1&&(i[0].y-=o);break;case 3:i[s-1].y+=o,i[s].y+=o,1===s&&(i[i.length-1].y+=o),s===i.length-1&&(i[0].y+=o)}}}}const h=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},70328(t,e,i){i.d(e,{BI:()=>A,C:()=>o,DC:()=>c,Ej:()=>x,Ie:()=>T,Jt:()=>P,Lu:()=>w,Ne:()=>b,RF:()=>f,TF:()=>g,VL:()=>y,aI:()=>S,fA:()=>l,gE:()=>a,gX:()=>_,hZ:()=>I,iT:()=>d,is:()=>B,pg:()=>M,uJ:()=>p,vI:()=>v,vY:()=>h,vt:()=>s,w1:()=>u,yr:()=>m}),i(35522);var n=i(5443),r=(i(19419),i(4197));function s(t=C){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function l(t,e,i,n,r,o,l=s()){return l[0]=t,l[1]=e,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l}function h(t,e=s()){return function(t,e,i,n=s()){return I(n,F),function(t,e,i=0,n=e.length/3){let r=t[0],s=t[1],o=t[2],l=t[3],h=t[4],a=t[5];for(let t=0;t<n;t++)r=Math.min(r,e[i+3*t]),s=Math.min(s,e[i+3*t+1]),o=Math.min(o,e[i+3*t+2]),l=Math.max(l,e[i+3*t]),h=Math.max(h,e[i+3*t+1]),a=Math.max(a,e[i+3*t+2]);t[0]=r,t[1]=s,t[2]=o,t[3]=l,t[4]=h,t[5]=a}(n,t,e,i),n}(t,0,t.length/3,e)}function a(t,e=(0,r.jh)(24)){let[i,n,s,o,l,h]=t;return e[0]=i,e[1]=n,e[2]=s,e[3]=i,e[4]=n,e[5]=h,e[6]=i,e[7]=l,e[8]=s,e[9]=i,e[10]=l,e[11]=h,e[12]=o,e[13]=n,e[14]=s,e[15]=o,e[16]=n,e[17]=h,e[18]=o,e[19]=l,e[20]=s,e[21]=o,e[22]=l,e[23]=h,e}function u(t,e){return isFinite(t[2])||isFinite(t[5])?new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function f(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,n]){!function(t,e,i,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],n),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],n)}(t,e,i,n)}function y(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function p(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let e=y(t),i=p(t),n=m(t);return e*e+i*i+n*n}function _(t,e=[0,0,0]){return e[0]=t[0]+y(t)/2,e[1]=t[1]+m(t)/2,e[2]=t[2]+p(t)/2,e}function x(t,e=[0,0,0]){return e[0]=y(t),e[1]=m(t),e[2]=p(t),e}function M(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function w(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function b(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function v(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function I(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function T(t){return t?I(t,F):s(F)}function P(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function A(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=n,t[4]=r,t[5]=1/0,t}function B(t){return 6===t.length}function S(t,e,i){if(null==t||null==e)return t===e;if(!B(t)||!B(e))return!1;if(i){for(let n=0;n<t.length;n++)if(!i(t[n],e[n]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];s(),i.d(e,["qv",0,F,"v_",0,C])},60408(t,e,i){function n(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function r(t){return void 0!==t.points}function s(t){return void 0!==t.x&&void 0!==t.y}function o(t){return void 0!==t.paths||void 0!==t.curvePaths}function l(t){return void 0!==t.rings||void 0!==t.curveRings}function h(t){return"object"==typeof t&&"vertexAttributes"in t}function a(t){return t?s(t)?"esriGeometryPoint":o(t)?"esriGeometryPolyline":l(t)?"esriGeometryPolygon":n(t)?"esriGeometryEnvelope":r(t)?"esriGeometryMultipoint":null:null}function u(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function f(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}i.d(e,{$B:()=>a,Bi:()=>l,Pv:()=>u,Rg:()=>o,U9:()=>r,W0:()=>f,ZC:()=>n,fT:()=>s,uW:()=>h})},65864(t,e,i){i.d(e,{rS:()=>u,xD:()=>c});var n=i(5443),r=i(91075),s=i(48526),o=i(86738),l=i(39829),h=i(82799),a=i(60408);function u(t){return null==t?null:t instanceof r.A?t:(0,a.fT)(t)?o.A.fromJSON(t):(0,a.Rg)(t)?h.A.fromJSON(t):(0,a.Bi)(t)?l.A.fromJSON(t):(0,a.U9)(t)?s.A.fromJSON(t):(0,a.ZC)(t)?n.A.fromJSON(t):null}const f={esriGeometryPoint:o.A,esriGeometryPolyline:h.A,esriGeometryPolygon:l.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:s.A,esriGeometryMultiPatch:l.A};function c(t){return t&&f[t]||null}},43334(t,e,i){i.d(e,{N3:()=>l,Om:()=>o});var n=i(69397),r=i(27647),s=i(92722);class o{constructor(t,e,i,n,r=0,s=null,o=null){this.geometry=t,this.attributes=e,this.centroid=i,this.objectId=n,this.displayId=r,this.distance=s,this.vertexCount=o}static fromJSON(t){let e=t.geometry?s.A.fromJSON(t.geometry):null,i=t.centroid?s.A.fromJSON(t.centroid):null,n=t.objectId;return new o(e,t.attributes,i,n,void 0,t.distance,t.vertexCount)}weakClone(){return new o(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new o(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(t){return this.centroid??=(0,r.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(t){return!!t.geometry?.coords?.length}},58512(t,e,i){i.d(e,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let t=new n;return t.globalIdFieldName=this.globalIdFieldName,t.geohashFieldName=this.geohashFieldName,t.geometryProperties=this.geometryProperties,t.geometryType=this.geometryType,t.spatialReference=this.spatialReference,t.hasZ=this.hasZ,t.hasM=this.hasM,t.features=this.features,t.fields=this.fields,t.transform=this.transform,t.exceededTransferLimit=this.exceededTransferLimit,t.uniqueIdField=this.uniqueIdField,t.queryGeometry=this.queryGeometry,t.queryGeometryType=this.queryGeometryType,t}}},92722(t,e,i){i.d(e,{A:()=>r});var n=i(69397);class r{constructor(t=[],e=[],i=!1,n=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=i,this.hasM=n}static fromJSON({lengths:t,coords:e,hasZ:i,hasM:n}){return new r(t,e,i||!1,n||!1)}static fromRect([t,e,i,n]){let s=i-t,o=n-e;return new r([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,n.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let t=0,e=0;for(let i of this.lengths){if(i<3)continue;let{stride:n}=this,r=this.coords[n*e],s=this.coords[n*e+1];for(let o=1;o<i;o+=1){let i=n*(e+o),l=this.coords[i],h=this.coords[i+1];t+=-.5*(l-r)*(h+s),r=l,s=h}e+=i}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);let{stride:i}=this;for(let n of this.lengths){for(let r=0;r<n;r++){let n=i*(e+r);t(this.coords[n],this.coords[n+1])}e+=n}}deltaDecode(){let t=this.clone(),{coords:e,lengths:i}=t,n=0,{stride:r}=this;for(let t of i){for(let i=1;i<t;i++){let t=r*(n+i);e[t]+=e[t-r],e[t+1]+=e[t+1-r]}n+=t}return t}clone(t){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let e=Array.from(this.lengths),{stride:i,size:n}=this,s=this.coords.slice(0,n*i);return t?(t.set(s),new r(e,t,this.hasZ,this.hasM)):new r(e,Array.from(s),this.hasZ,this.hasM)}justXY(){let{stride:t,size:e}=this;if(2===t)return this;let i=Array(e*t);for(let e=0,n=0;e<i.length;e+=t)i[n++]=this.coords[e],i[n++]=this.coords[e+1];return new r(this.lengths,i,!1,!1)}}},27647(t,e,i){i.d(e,{Q:()=>s});var n=i(92722);function r(t,e){return t?e?4:3:e?3:2}function s(t){if(null==t||!t?.lengths.length)return null;let{lengths:e,coords:i,stride:r,hasZ:s,hasM:h}=t,a=new n.A([],[],s,!1),u=a.coords,f=[],c=s?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],d=0;for(let t of e){let e=o(c,i,d,t,s,h);e&&f.push(e),d+=t*r}if(f.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&s&&(i=t[4]-e[4]),i}),f.length){let t=6*f[0][2];u[0]=f[0][0]/t,u[1]=f[0][1]/t,s&&(t=6*f[0][4],u[2]=0===t?0:f[0][3]/t),(u[0]<c[0]||u[0]>c[1]||u[1]<c[2]||u[1]>c[3]||s&&(u[2]<c[4]||u[2]>c[5]))&&(u.length=0)}if(!u.length){let n=t.lengths[0]?l(i,0,e[0],s,h):null;if(!n)return null;u[0]=n[0],u[1]=n[1],s&&(u[2]=n[2]??0)}return a}function o(t,e,i,n,s,o){let l=r(s,o),h=i,a=i+l,u=0,f=0,c=0,d=0,y=0;for(let i=0,r=n-1;i<r;i++,h+=l,a+=l){let i=e[h],n=e[h+1],r=e[h+2],o=e[a],l=e[a+1],m=e[a+2],p=i*l-o*n;d+=p,u+=(i+o)*p,f+=(n+l)*p,s&&(p=i*m-o*r,c+=(r+m)*p,y+=p),i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i),n<t[2]&&(t[2]=n),n>t[3]&&(t[3]=n),s&&(r<t[4]&&(t[4]=r),r>t[5]&&(t[5]=r))}if(d>0&&(d*=-1),y>0&&(y*=-1),!d)return null;let m=[u,f,.5*d];return s&&(m[3]=c,m[4]=.5*y),m}function l(t,e,i,n,s){let o=r(n,s),l=e,c=e+o,d=0,y=0,m=0,p=0;for(let e=0,r=i-1;e<r;e++,l+=o,c+=o){let e=t[l],i=t[l+1],r=t[l+2],s=t[c],o=t[c+1],g=t[c+2],_=n?a(e,i,r,s,o,g):h(e,i,s,o);if(_)if(d+=_,n){let t=f(e,i,r,s,o,g);y+=_*t[0],m+=_*t[1],p+=_*t[2]}else{let t=u(e,i,s,o);y+=_*t[0],m+=_*t[1]}}return d>0?n?[y/d,m/d,p/d]:[y/d,m/d]:i>0?n?[t[e],t[e+1],t[e+2]]:[t[e],t[e+1]]:null}function h(t,e,i,n){let r=i-t,s=n-e;return Math.sqrt(r*r+s*s)}function a(t,e,i,n,r,s){let o=n-t,l=r-e,h=s-i;return Math.sqrt(o*o+l*l+h*h)}function u(t,e,i,n){return[t+.5*(i-t),e+.5*(n-e)]}function f(t,e,i,n,r,s){return[t+.5*(n-t),e+.5*(r-e),i+.5*(s-i)]}},6518(t,e,i){i.d(e,{F:()=>l});var n=i(44208),r=i(75503),s=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class l{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,n.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let t=Array(this._idByBounds.size),e=0;this._idByBounds.forEach((i,n)=>{t[e++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(t=>this._idByBounds.has(t))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let t=(0,s.Ie)();for(let e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){let e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,i){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,i)}(this._index,t,t=>e(this._idByBounds.get(t)))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){let e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(t,e,i){i.d(e,{A:()=>d});var n=i(4576),r=i(49186),s=i(65529),o=i(53966),l=i(70328),h=i(19419),a=i(90708),u=i(6518),f=i(37730);const c=(0,l.vt)();class d{constructor(t){this.geometryInfo=t,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=f.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach(e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;let[e,i,n,r]=this.fullBounds;return{xmin:e,ymin:i,xmax:n,ymax:r,spatialReference:t}}add(t){this._add(t),this._emitChanged()}addMany(t){for(let e of t)this._add(e);this._emitChanged()}upsertMany(t){let e=t.map(t=>this._upsert(t));return this._emitChanged(),e.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){let e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(let e of t){let t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(let i of t){let t=this._boundsStore.get(i.objectId);t&&e((0,l.Jt)(c,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach(e=>t(e))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,t=>{e(this._featuresById.get(t))})}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;let e=t.objectId;if(null==e)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:t}));let i,n=this._featuresById.get(e);n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),t.geometry?.coords?.length?(i=(0,a.jQ)(i??(0,h.vt)(),t.geometry),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0):(this._boundsStore.set(e,null),this._featuresById.set(e,t))}_upsert(t){let e=t?.objectId;if(null==e)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;let i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:s}=t;for(let t in s)i.attributes[t]=s[t];return n&&(i.geometry=n,this._boundsStore.set(e,(0,a.jQ)((0,h.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);let e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}},54339(t,e,i){function n(t,e){switch(e.type){case"object-id":case"unique-id-simple":return t.attributes[e.fieldName];case"unique-id-composite":{let i=[];for(let n of e.fieldNames)i.push(t.attributes[n]??null);return JSON.stringify(i)}}}function r(t,e){if("uniqueIdFields"in e&&e.uniqueIdFields?.length){if(1===e.uniqueIdFields.length)return t.attributes?.[e.uniqueIdFields[0]];let i=e.uniqueIdFields.map(e=>t.attributes?.[e]);return JSON.stringify(i)}return"objectIdField"in e&&e.objectIdField?t.attributes?.[e.objectIdField]:null}i.d(e,{W:()=>n,r:()=>r})},37730(t,e,i){var n=i(43334);const r={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e,i)=>new n.Om(e,t.attributes,null,t.objectId,t.displayId,t.distance,t.vertexCount),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};i.d(e,["T",0,r])},31464(t,e,i){i.d(e,{Cv:()=>d,Nk:()=>c,lK:()=>m});var n=i(4576),r=i(99917),s=i(60408),o=i(21325),l=i(28735);const h=[0,0];function a(t,e){let i=(0,o.K8)(t)?l.je:l.tD;if((0,s.fT)(e)){let t={x:0,y:0};return[t.x,t.y]=i(e.x,e.y,h),null!=e.z&&(t.z=e.z),null!=e.m&&(t.m=e.m),t}if((0,s.ZC)(e)){let t={xmin:0,ymin:0,xmax:0,ymax:0};return[t.xmin,t.ymin]=i(e.xmin,e.ymin,h),[t.xmax,t.ymax]=i(e.xmax,e.ymax,h),e.hasZ&&(t.zmin=e.zmin,t.zmax=e.zmax,t.hasZ=!0),e.hasM&&(t.mmin=e.mmin,t.mmax=e.mmax,t.hasM=!0),t}if((0,s.Bi)(e))return{rings:u(e.rings,i),hasM:e.hasM,hasZ:e.hasZ};if((0,s.Rg)(e))return{paths:u(e.paths,i),hasM:e.hasM,hasZ:e.hasZ};if((0,s.U9)(e))return{points:f(e.points,i),hasM:e.hasM,hasZ:e.hasZ};throw Error()}function u(t,e){let i=[];for(let n of t)i.push(f(n,e));return i}function f(t,e){let i=[];for(let n of t){let t=e(n[0],n[1],[0,0]);i.push(t),n.length>2&&t.push(n[2]),n.length>3&&t.push(n[3])}return i}async function c(t,e){if(!t||!e)return;let i=Array.isArray(t)?t.map(t=>null==t.geometry?null:t.geometry.spatialReference).filter(n.Ru):[t];await(0,r.initializeProjection)(i.map(t=>({source:t,dest:e})))}function d(t,e,i,n){if(!t)return null;if(i||(i=e,e=t.spatialReference),!(0,o.fn)(e)||!(0,o.fn)(i)||(0,o.aI)(e,i))return t;if((0,l.y7)(e,i)){let e=a(i,t);return e.spatialReference=i,e}let[s]=(0,r.projectMany)([t],e,i,n);return s}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(t,e,i,n){if(!t?.length||!e||!i||(0,o.aI)(e,i))return t;let r={geometries:t,inSpatialReference:e,outSpatialReference:i,options:n,resolve:Promise.withResolvers()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;let t=this._jobs.shift();if(!t)return;let e,{geometries:i,inSpatialReference:n,outSpatialReference:s,resolve:o,options:h}=t,u=i.filter(t=>null!=t);e=(0,l.y7)(n,s)&&null==h?.extendedParams?u.map(t=>a(s,t)):(0,r.projectMany)(u,n,s,h);let f=0,c=i.map(t=>null==t?null:e[f++]);o.resolve(c),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(t,e,i,n){return y.push(t,e,i,n)}},90708(t,e,i){i.d(e,{Ap:()=>A,B2:()=>p,DF:()=>b,Di:()=>Z,E2:()=>R,IE:()=>m,Nl:()=>X,PR:()=>T,Rk:()=>U,Ux:()=>O,Ye:()=>S,ZF:()=>N,aQ:()=>V,jH:()=>L,jQ:()=>D,kz:()=>k,oN:()=>G,q3:()=>Y,qN:()=>v,zv:()=>j});var n=i(49186),r=i(53966),s=i(97768),o=i(70328),l=i(19419),h=i(60408),a=i(43334),u=i(58512),f=i(92722),c=i(54339);const d=()=>r.A.getLogger("esri.layers.graphics.featureConversionUtils"),y={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function m({scale:t,translate:e},i){return Math.round((i-e[0])/t[0])}function p({scale:t,translate:e},i){return Math.round((e[1]-i)/t[1])}function g({scale:t,translate:e},i){return Math.round((i-e[0])/t[0])}function _({scale:t,translate:e},i){return Math.round((i-e[1])/t[1])}function x({scale:t,translate:e},i,n){return i*t[n]+e[n]}function M(t,e,i){return e&&(t.hasZ=!0),i&&(t.hasM=!0),t}function w(t,e,i,n){if(e&&n&&t!==i)return(e,i,n,r)=>{n[r++]=e[i++],n[r++]=e[i++],t?i++:n[r++]=0,n[r++]=e[i++]??0};let r=+!!i+2+ +!!n,s=r-((!t&&i?1:0)+(!e&&n?1:0));return(t,e,i,n)=>{for(let o=0;o<r;++o)i[n++]=o<s?t[e++]??0:0}}function b(t,e,i){if(!t)return null;let{coords:n,hasZ:r,hasM:s}=t,[o,l]=n,h=r?n[2]:0,a=s?n[+!!r+2]:0;return{x:o,y:l,z:e?h:void 0,m:i?a:void 0}}function v(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{x:n,y:r,z:s,m:o}=t,l=[n,r];return e&&l.push(s??0),i&&l.push(o??0),new f.A([],l,e,i)}function I(t,e,i){if(null==t)return null;let{coords:n,stride:r,hasZ:s,hasM:o}=t,l=w(s,o,e,i),h=[];for(let t=0;t<n.length;t+=r){let e=[];l(n,t,e,0),h.push(e)}return M({points:h},e,i)}function T(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{points:n,hasZ:r,hasM:s}=t,o=new f.A([n.length],[],e,i),{coords:l,stride:a}=o,u=0,c=w(r??!1,s??!1,e,i);for(let t of n)c(t,0,l,u),u+=a;return o}function P(t,e,i){if(!t)return null;let{coords:n,lengths:r,stride:s,hasZ:o,hasM:l}=t,h=0,a=w(o,l,e,i),u=[];for(let t of r){let e=[];for(let i=0;i<t;i++){let t=[];a(n,h,t,0),h+=s,e.push(t)}u.push(e)}return M({paths:u},e,i)}function A(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{paths:n,hasZ:r,hasM:s}=t,o=w(r??!1,s??!1,e,i),l=new f.A([],[],e,i),{lengths:a,coords:u,stride:c}=l,d=0;for(let t of n){for(let e of t)o(e,0,u,d),d+=c;a.push(t.length)}return l}function B(t,e,i){if(!t)return null;let{coords:n,lengths:r,stride:s,hasZ:o,hasM:l}=t,h=0,a=w(o,l,e,i),u=[];for(let t of r){let e=[];for(let i=0;i<t;i++){let t=[];a(n,h,t,0),h+=s,e.push(t)}u.push(e)}return M({rings:u},e,i)}function S(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{rings:n,hasZ:r,hasM:s}=t,o=new f.A([],[],e,i),{lengths:l,coords:a,stride:u}=o,c=0,d=w(r??!1,s??!1,e,i);for(let t of n){for(let e of t)d(e,0,a,c),c+=u;l.push(t.length)}return o}const F=[],C=[];function R(t,e,i,n,r){F[0]=t;let[s]=Z(C,F,e,i,n,r);return W(F),W(C),s}function Z(t,e,i,r,s,o){if(W(t),!i){for(let i of e){let e=(0,c.W)(i,o);t.push(new a.Om(null,i.attributes,null,e,void 0,i.distance,i.vertexCount))}return t}switch(i){case"esriGeometryPoint":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?v(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryMultipoint":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o}=s,l=(0,h.Pv)(e),u=(0,h.W0)(e);t.push(new a.Om(e?T(e,i&&l,n&&u):null,o,null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryPolyline":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?A(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?S(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`)),W(t)}return t}function G(t,e,i,n){C[0]=t,q(F,C,e,i,n);let r=F[0];return W(F),W(C),r}function O(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){return null==t?null:(0,h.fT)(t)?v(t,e,i):(0,h.Bi)(t)?S(t,e,i):(0,h.Rg)(t)?A(t,e,i):(0,h.U9)(t)?T(t,e,i):void d().error("convertFromGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`))}function j(t,e,i,r){if(null==t)return null;let s="coords"in t?t:t.geometry;if(null==s)return null;switch(e){case"esriGeometryPoint":return b(s,i,r);case"esriGeometryMultipoint":return I(s,i,r);case"esriGeometryPolyline":return P(s,i,r);case"esriGeometryPolygon":return B(s,i,r);default:return d().error("convertToGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`)),null}}function q(t,e,i,r,s){if(W(t),null==i)return function(t,e){for(let i of e)t.push({attributes:i.attributes});return t}(t,e);switch(i){case"esriGeometryPoint":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({attributes:s,geometry:b(r,i,n)});return t}(t,e,r,s);case"esriGeometryMultipoint":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({geometry:r&&I(r,i,n),attributes:s});return t}(t,e,r,s);case"esriGeometryPolyline":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({geometry:r&&P(r,i,n),attributes:s});return t}(t,e,r,s);case"esriGeometryPolygon":return function(t,e,i,n){for(let{geometry:r,attributes:s,centroid:o}of e){let e=B(r,i,n),l=b(o,!1,!1);t.push(o?{geometry:e,attributes:s,centroid:l}:{geometry:e,attributes:s})}return t}(t,e,r,s);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`))}return t}function N(t){let{spatialReference:e,transform:i,fields:n,hasM:r,hasZ:s,features:o,geometryType:l,exceededTransferLimit:h,queryGeometry:a,queryGeometryType:u}=t,f={features:q([],o,l,s,r),fields:n,geometryType:l,spatialReference:e,queryGeometry:j(a,u,s,r)};return i&&(f.transform=i),h&&(f.exceededTransferLimit=h),r&&(f.hasM=r),s&&(f.hasZ=s),f}function Y(t,e){let i=new u.A,{hasM:n,hasZ:r,features:s,spatialReference:o,geometryType:l,exceededTransferLimit:h,transform:a,fields:f,globalIdFieldName:c}=t;return f&&(i.fields=f),i.geometryType=l??null,i.spatialReference=o??null,s&&Z(i.features,s,l,r,n,e),h&&(i.exceededTransferLimit=h),n&&(i.hasM=n),r&&(i.hasZ=r),a&&(i.transform=a),c&&(i.globalIdFieldName=c),i}function L(t,e){let{geometryType:i,features:n}=e;if(!t)return e;for(let e=0;e<n.length;e++){let r=n[e],s=r.weakClone();s.geometry=X(r.geometry,i,t),s.centroid=X(r.centroid,"esriGeometryPoint",t),n[e]=s}return e.transform=t,e}function X(t,e,i,n,r,s=!1){if(null==t||!t?.coords.length)return null;let o=y[e],{coords:l,lengths:h,stride:a,hasZ:u,hasM:c}=t;n??=u,r??=c;let d=new f.A([],[],n,r),x=d.stride,M=w(u,c,n,r),b=0,v=[0,0,0,0].slice(x),I=s?g:m,T=s?_:p;function P(){M(l,b,v,0),b+=a,v[0]=I(i,v[0]),v[1]=T(i,v[1])}if(t.isPoint)return P(),d.coords.push(...v),d;let A=0;for(let t of h){if(t<o)continue;let e=1;P(),d.coords.push(...v);let[i,n]=v;for(let r=1;r<t;r++){P();let[t,r]=v;(i!==t||n!==r)&&(s||(v[0]-=i,v[1]-=n),d.coords.push(...v),i=t,n=r,e++)}e>=o?(d.lengths.push(e),A=d.coords.length):W(d.coords,A)}return W(d.coords,A),d.coords.length?d:null}function k(t,e,i,n=t.hasZ,r=t.hasM){if(!t.coords.length)return null;let s=y[e],{coords:o,lengths:l,stride:h,hasZ:a,hasM:u}=t,c=new f.A([],[],n,r),d=c.stride,m=w(a,u,n,r);if(t.isPoint)return m(o,0,c.coords,0),c;let p=0,g=i*i;for(let t of l){if(t<s){p+=t*h;continue}let e=c.coords.length/d,i=p,n=p+(t-1)*h;m(o,i,c.coords,c.coords.length),E(c.coords,o,h,g,m,i,n),m(o,n,c.coords,c.coords.length);let r=c.coords.length/d-e;r>=s?c.lengths.push(r):W(c.coords,e*d),p+=t*h}return c.coords.length?c:null}function z(t,e,i,n){let r=t[e],s=t[e+1],o=t[i],l=t[i+1],h=t[n],a=t[n+1],u=o,f=l,c=h-u,d=a-f;if(0!==c||0!==d){let t=((r-u)*c+(s-f)*d)/(c*c+d*d);t>1?(u=h,f=a):t>0&&(u+=c*t,f+=d*t)}return c=r-u,d=s-f,c*c+d*d}function E(t,e,i,n,r,s,o){let l,h=n,a=0;for(let t=s+i;t<o;t+=i)l=z(e,t,s,o),l>h&&(a=t,h=l);h>n&&(a-s>i&&E(t,e,i,n,r,s,a),r(e,a,t,t.length),o-a>i&&E(t,e,i,n,r,a,o))}function D(t,e){if(!e?.coords?.length)return null;let i=1/0,n=1/0,r=-1/0,s=-1/0,{coords:h,stride:a}=e;for(let t=0;t<h.length;t+=a){let e=h[t],o=h[t+1];i=Math.min(i,e),r=Math.max(r,e),n=Math.min(n,o),s=Math.max(s,o)}return(0,o.is)(t)?(0,o.BI)(t,i,n,r,s):(0,l.fA)(i,n,r,s,t),t}function V(t,e){let{coords:i,lengths:n,stride:r,hasZ:o,hasM:l}=t;if(!i.length)return void(n.length=0);(0,s.Lw)(e);let{originPosition:h,scale:a,translate:u}=e,f=$;f.originPosition=h;let c=f.scale;c[0]=a[0]??1,c[1]=-(a[1]??1),c[2]=a[2]??1,c[3]=a[3]??1;let d=f.translate;if(d[0]=u[0]??0,d[1]=u[1]??0,d[2]=u[2]??0,d[3]=u[3]??0,l&&!o&&(c[2]=c[3],d[2]=d[3]),!n.length){for(let t=0;t<r;++t)i[t]=x(f,i[t],t);return void(n.length=0)}let y=0;for(let t=0;t<n.length;t++){let e=n[t];n[t]=e;for(let t=0;t<r;++t)i[y+t]=x(f,i[y+t],t);let s=i[y],o=i[y+1];y+=r;for(let t=1;t<e;t++,y+=r){s+=i[y]*c[0],o+=i[y+1]*c[1],i[y]=s,i[y+1]=o;for(let t=2;t<r;++t)i[y+t]=x(f,i[y+t],t)}}}function J(t,e,i,n){let r=0,s=t[n*e],o=t[n*(e+1)];for(let l=1;l<i;l++){let i=s+t[n*(e+l)],h=o+t[n*(e+l)+1],a=(i-s)*(h+o);s=i,o=h,r+=a}return.5*r}function U(t,e){let{coords:i,lengths:n}=t,r=0,s=0;for(let t=0;t<n.length;t++){let o=n[t];s+=J(i,r,o,e),r+=o}return Math.abs(s)}function W(t,e=0){t.length!==e&&(t.length=e)}const $={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},85113(t,e,i){i.d(e,{BM:()=>T,bd:()=>P,sO:()=>I,xD:()=>f});var n=i(67482),r=i(49186),s=i(21325),o=i(90708),l=i(43334),h=i(92722),a=i(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function f(t){return u[t]}function*c(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(let e of t.features)e&&(yield e)}}function*d(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(let e of t.coordinates)yield*e;break;case"MultiPolygon":for(let e of t.coordinates)for(let t of e)yield*t}}function y(t){for(let e of t)if(e.length>2)return!0;return!1}function m(t){let e=0;for(let i=0;i<t.length;i++){let n=t[i],r=t[(i+1)%t.length];e+=n[0]*r[1]-r[0]*n[1]}return e<=0}function p(t){let e=t[0],i=t[t.length-1];(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2])&&t.push(e)}function g(t,e){let{coordinates:i,type:n}=t,r=e.hasZ??!1;switch(n){case"Point":return new h.A([],[...i],r,!1);case"LineString":return(0,o.Ap)({paths:[i],hasZ:!0},r,!1);case"MultiLineString":return(0,o.Ap)({paths:i,hasZ:!0},r,!1);case"MultiPoint":return(0,o.PR)({points:i,hasZ:!0},r,!1);case"Polygon":case"MultiPolygon":{let t=new h.A([],[],r,!1);for(let e of"Polygon"===n?[i]:i){_(t,e[0],r);for(let i=1;i<e.length;i++)x(t,e[i],r)}return t}}}function _(t,e,i){p(e),function(t){return!m(t)}(e)?w(t,e,i):M(t,e,i)}function x(t,e,i){p(e),function(t){return m(t)}(e)?w(t,e,i):M(t,e,i)}function M(t,e,i){for(let n of e)b(t,n,i);t.lengths.push(e.length)}function w(t,e,i){for(let n=e.length-1;n>=0;n--)b(t,e[n],i);t.lengths.push(e.length)}function b(t,[e,i,n],r){t.coords.push(e,i),r&&t.coords.push(n||0)}function v(t){switch(typeof t){case"string":return(0,n.C)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(t,e=4326){if(!t)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});let{crs:i}=t;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,s.oT)({wkid:e})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${e})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function T(t,e={}){let i,n=[],r=new Set,s=new Set,o=!1,l=null,h=!1,{geometryType:u=null}=e;for(let e of c(t)){let{geometry:t,properties:c,id:m}=e;if((!t||(u||=f(t.type),f(t.type)===u))&&(o||=y(d(t)),h||(h=null!=m,h&&(i=typeof m,c&&(l=Object.keys(c).filter(t=>c[t]===m)))),c&&l&&h&&null!=m&&(l.length>1?l=l.filter(t=>c[t]===m):1===l.length&&(l=c[l[0]]===m?l:[])),c))for(let t in c){if(r.has(t))continue;let e=v(c[t]);if("unknown"===e){s.add(t);continue}s.delete(t),r.add(t);let i=(0,a.rS)(t);i&&n.push({name:i,alias:t,type:e})}}let m=(0,a.rS)(1===l?.length&&l[0]||null)??void 0;if(m)for(let t of n)if(t.name===m&&(0,a.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:n,geometryType:u,hasZ:o,objectIdFieldName:m,objectIdFieldType:i,unknownFields:Array.from(s)}}function P(t,e){return Array.from(function*(t,e={}){let{geometryType:i,objectIdField:n}=e;for(let r of t){let{geometry:t,properties:s,id:o}=r;if(t&&f(t.type)!==i)continue;let h,a=s||{};n&&(h=a[n],null!=o&&!h&&(a[n]=h=o)),yield new l.Om(t&&g(t,e),a,null,h)}}(c(t),e))}},14289(t,e,i){i.r(e),i.d(e,{default:()=>B});var n=i(56507),r=i(17676),s=i(19419),o=i(21325),l=i(6774),h=i(90708),a=i(92722),u=i(83221),f=i(31464),c=i(85113);const d=new TextEncoder;class y{constructor(){this._bytes=[]}finish(){return new Uint8Array(this._bytes)}writeBooleanField(t,e){this._writeTag(t,0),this.writeVarint(+!!e)}writeDoubleField(t,e){this._writeTag(t,1);let i=new ArrayBuffer(8);new DataView(i).setFloat64(0,e,!0),this._writeBytes(new Uint8Array(i))}writeMessage(t,e,i){this._writeTag(t,2);let n=this._bytes.length;for(let t=0;t<5;t++)this._bytes.push(0);let r=this._bytes.length;e(i,this),this._writeMessageLength(n,this._bytes.length-r)}writeStringField(t,e){let i=d.encode(e);this._writeTag(t,2),this.writeVarint(i.byteLength),this._writeBytes(i)}writeSVarintField(t,e){this._writeTag(t,0),this.writeVarint(e<0?2*-e-1:2*e)}writeVarint(t){for(;t>127;)this._bytes.push(127&t|128),t=Math.floor(t/128);this._bytes.push(t)}writeVarintField(t,e){this._writeTag(t,0),this.writeVarint(e)}_writeBytes(t){for(let e of t)this._bytes.push(e)}_writeMessageLength(t,e){let i=0;for(;e>127;)this._bytes[t+i++]=127&e|128,e=Math.floor(e/128);this._bytes[t+i++]=e,this._bytes.splice(t+i,5-i)}_writeTag(t,e){this.writeVarint(t<<3|e)}}function m(t,e,i){let n=new y;return n.writeMessage(3,p,{cursor:e,extent:i,keyIndices:new Map,keys:[],name:t,valueIndices:new Map,values:[]}),Uint8Array.from(n.finish()).buffer}function p(t,e){for(e.writeVarintField(15,1),e.writeStringField(1,t.name),e.writeVarintField(5,t.extent);t.cursor.next();)e.writeMessage(2,g,t);for(let i of t.keys)e.writeStringField(3,i);for(let i of t.values)e.writeMessage(4,M,i)}function g(t,e){let i=t.cursor.getId();"number"==typeof i&&e.writeVarintField(1,i),e.writeMessage(2,_,t),e.writeVarintField(3,t.cursor.getType()),e.writeMessage(4,x,t.cursor)}function _(t,e){let i=t.cursor.getAttributes();if(i)for(let n of Object.keys(i)){let r=w(i[n]);if(null==r)continue;let s=t.keyIndices.get(n);s??(s=t.keys.length,t.keyIndices.set(n,s),t.keys.push(n));let o=`${typeof r}:${r}`,l=t.valueIndices.get(o);l??(l=t.values.length,t.valueIndices.set(o,l),t.values.push(r)),e.writeVarint(s),e.writeVarint(l)}}function x(t,e){let i=t.getType(),n=0,r=0;for(let s=0;s<t.getPathCount();s++){let o=t.getPathLength(s),l=1===i?o:1;e.writeVarint(b(1,l));let h=3===i?o-1:o;for(let o=0;o<h;o++){1===o&&1!==i&&e.writeVarint(b(2,h-1));let l=t.getX(s,o),a=t.getY(s,o);e.writeVarint(v(l-n)),e.writeVarint(v(a-r)),n=l,r=a}3===i&&e.writeVarint(b(7,1))}}function M(t,e){"string"==typeof t?e.writeStringField(1,t):"boolean"==typeof t?e.writeBooleanField(7,t):Number.isInteger(t)?t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t):e.writeDoubleField(3,t)}function w(t){return"string"==typeof t||"boolean"==typeof t||"number"==typeof t?t:null==t?null:JSON.stringify(t)??null}function b(t,e){return(e<<3)+(7&t)}function v(t){return t<<1^t>>31}const I=4096,T=20037508.342787,P=2*T,A=[{geometryType:"esriGeometryPolygon",vectorTileGeometryType:3},{geometryType:"esriGeometryPolyline",vectorTileGeometryType:2},{geometryType:"esriGeometryPoint",vectorTileGeometryType:1},{geometryType:"esriGeometryMultipoint",vectorTileGeometryType:1}];class B{constructor(){this._buffer=128,this._featureIds=new Map,this._name="",this._stores=[],this._tolerance=.375}destroy(){for(let{store:t}of this._stores)t.clear();this._featureIds.clear(),this._stores.length=0}async initialize({definition:t,name:e,requestOptions:i},s={}){if(null==t.data)throw Error(`GeoJSON source '${e}' must define a data property.`);if(!0===t.lineMetrics)throw Error("GeoJSON lineMetrics are not supported.");if(t.promoteId&&t.generateId)throw Error("GeoJSON promoteId and generateId cannot be used together.");let o="string"==typeof t.data?(await(0,n.A)(t.data,{...i,responseType:"json",signal:s.signal})).data:t.data;(0,r.Te)(s),(0,c.sO)(o),this.destroy(),this._buffer=t.buffer??128,this._name=e,this._tolerance=t.tolerance??.375;let l=0;for(let{geometryType:e,vectorTileGeometryType:i}of A){let n=(0,c.bd)(o,{geometryType:e,hasZ:!1}),r=S(o,e,t);if(0===n.length)continue;let s=new u.A({geometryType:e,hasM:!1,hasZ:!1}),h=[],a=0;for(let t of n){let i=F(t.geometry,e);i&&(t.objectId=l++,t.geometry=i,this._featureIds.set(t.objectId,r[a++]??null),h.push(t))}h.length>0&&(s.addMany(h),this._stores.push({geometryType:e,store:s,vectorTileGeometryType:i}))}return(0,r.Te)(s),{geometryTypes:["polygon","line","point"].filter(t=>this._stores.some(({vectorTileGeometryType:e})=>e===function(t){switch(t){case"polygon":return 3;case"line":return 2;case"point":return 1}}(t)))}}requestTile({col:t,level:e,row:i},n={}){(0,r.Te)(n);let s=this._getTileFeatures(e,i,t),o=s.length>0?m(this._name,new R(s),I):new ArrayBuffer(0);return(0,r.Te)(n),{result:o,transferList:[o]}}_getTileFeatures(t,e,i){let n=P/2**t,r=i*n-20037508.342787,o=T-e*n,l=n/I,h=this._buffer*l,a=this._tolerance*l,u=[];for(let t of[-40075016.685574,0,P]){let e=(0,s.fA)(r-h-t,o-n-h,r+n+h-t,o+h),i={scale:[l,-l,1,1],translate:[r-t,o,0,0]};for(let{geometryType:t,store:n,vectorTileGeometryType:r}of this._stores)n.forEachInBounds(e,e=>{let n=C(e,t,r,i,a,this._buffer);n&&u.push({attributes:e.attributes,geometry:n,id:this._featureIds.get(e.objectId),type:r})})}return u}}function S(t,e,i){let n=[],r="FeatureCollection"===t.type?t.features:[t];for(let t=0;t<r.length;t++){let s=r[t];if(!s.geometry||(0,c.xD)(s.geometry.type)!==e)continue;let o=i.promoteId?s.properties?.[i.promoteId]:!0===i.generateId?t:s.id;n.push("number"==typeof o||"string"==typeof o?o:null)}return n}function F(t,e){return t?(0,h.Ux)((0,f.Cv)((0,h.zv)(t,e,!1,!1),o.KK,o.ch))??null:null}function C(t,e,i,n,r,s){if(!t.geometry)return null;let o=r>0?(0,h.kz)(t.geometry,e,r,!1,!1):t.geometry;return function(t,e,i){if(!t)return null;let n=new l.O3(0,0,0,8,i/8);if(n.setExtent(I),n.reset(e),1===e)for(let e=0;e<t.size;e++){let i=e*t.stride;n.moveTo(t.coords[i],t.coords[i+1])}else{let i=0;for(let r of t.lengths){n.moveTo(t.coords[i],t.coords[i+1]);for(let e=1;e<r;e++){let r=i+e*t.stride;n.lineTo(t.coords[r],t.coords[r+1])}3===e&&n.close(),i+=r*t.stride}}let r=n.result();if(!r)return null;let s=1===e?[r.length]:r.map(t=>t.length),o=[];for(let t of r)for(let e of t)o.push(e.x,e.y);return new a.A(s,o)}((0,h.Nl)(o,e,n,!1,!1,!0),i,s)}class R{constructor(t){this._features=t,this._index=-1,this._pathOffsets=[]}get _feature(){return this._features[this._index]}destroy(){}getAttributes(){return this._feature.attributes}getId(){return this._feature.id}getPathCount(){return 1===this._feature.type?1:this._feature.geometry.lengths.length}getPathLength(t){return 1===this._feature.type?this._feature.geometry.size:this._feature.geometry.lengths[t]}getType(){return this._feature.type}getX(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)]}getY(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)+1]}next(){return!(++this._index>=this._features.length||(this._pathOffsets=function(t){let e=Array(t.lengths.length),i=0;for(let n=0;n<t.lengths.length;n++)e[n]=i,i+=t.lengths[n];return e}(this._feature.geometry),0))}_getCoordinateIndex(t,e){return(1===this._feature.type?e:this._pathOffsets[t]+e)*this._feature.geometry.stride}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[31,468,506,756,1150,1327,1550,1577,1666,1735,1948,2802,2994,3193,3708,4064,4791,4945,4988,5181,5223,5227,6027,6070,6556,6742,6810,7085,7992,8125,8298,8613,9074,9447,9672,9716,9820,9821],{83755(e,t,r){r.d(t,{executeIsSelfIntersecting:()=>u});var n=r(55537),s=r(39117),i=r(95213);const o=new(r(98783).O),a=new Set([5,6,7,10,11,12]);function u(e,t){let r=e.getGeometryType();if(r===n.G.enumMultiPoint){let t=e,r=new i.P,n=new i.P,s=t.getPointCount();for(let e=0;e<s;e++){t.getPointByVal(e,r);for(let i=e+1;i<s;i++)if(t.getPointByVal(i,n),r.equals(n))return!0}return!1}if(r===n.G.enumPolyline||r===n.G.enumPolygon){let r=new s.W;return!o.isSimple(e,t,!0,r,null)&&a.has(r.m_reason)}return!1}},6556(e,t,r){r.d(t,{executeNearestCoordinate:()=>a});var n=r(55537),s=r(95213),i=r(88885);const o=new(r(88194).O);function a(e,t){if(e.getGeometryType()===n.G.enumEnvelope){let t=new i.P;t.addEnvelope(e,!1),e=t}let r=o.getNearestCoordinate(e,t.getXY(),!0,!0);return r.isEmpty()?null:{coordinate:new s.P({pt:r.m_coordinate}),distance:r.m_distance,sideOfLine:0===r.m_distance?"straddle":r.m_bRightSide?"right":"left"}}},64064(e,t,r){r.d(t,{executeNearestVertex:()=>u});var n=r(55537),s=r(95213),i=r(88885);function o(e,t,r){if(e.getPointCount()<=0)return"left";let n=e.querySegmentIteratorAtVertex(r),s=n.hasPreviousSegment()?n.previousSegment():n.nextSegment();return function(e,t,r){let n=(t.x-e.x)*(r.y-e.y)-(r.x-e.x)*(t.y-e.y);return n>0?"left":n<0?"right":"straddle"}(s.getStartXY(),s.getEndXY(),t)}const a=new(r(88194).O);function u(e,t){if(e.getGeometryType()===n.G.enumEnvelope){let t=new i.P;t.addEnvelope(e,!1),e=t}let r=t.getXY(),u=a.getNearestVertex(e,r);if(u.isEmpty())return null;switch(e.getGeometryType()){case n.G.enumPoint:return{coordinate:e,distance:u.m_distance,sideOfLine:0===u.m_distance?"straddle":"left"};case n.G.enumMultiPoint:{let t=new s.P;return e.getPointByVal(u.m_vertexIndex,t),{coordinate:t,distance:u.m_distance,sideOfLine:0===u.m_distance?"straddle":"left"}}case n.G.enumPolyline:case n.G.enumPolygon:{let t=new s.P;return e.getPointByVal(u.m_vertexIndex,t),{coordinate:t,distance:u.m_distance,sideOfLine:o(e,r,u.m_vertexIndex)}}default:throw Error(`Unsupported geometry type: ${e.getGeometryType()}`)}}},88509(e,t,r){r.r(t),r.d(t,{executeBuffer:()=>v.execute,executeClip:()=>G.execute,executeConvexHull:()=>C.execute,executeCut:()=>M.execute,executeDensify:()=>D.execute,executeDifference:()=>w.execute,executeGeneralize:()=>E.execute,executeGeodesicBuffer:()=>g.execute,executeGeodeticArea:()=>d.execute,executeGeodeticDensify:()=>y.execute,executeGeodeticDistance:()=>p.execute,executeGeodeticLength:()=>x.execute,executeIntersection:()=>b.execute,executeIsSelfIntersecting:()=>R.executeIsSelfIntersecting,executeIsSimple:()=>I.isSimpleAsFeature,executeLabelPoint:()=>S.execute,executeMultiPartToSinglePart:()=>N.executeMany,executeNearestCoordinate:()=>O.executeNearestCoordinate,executeNearestVertex:()=>V.executeNearestVertex,executeOffset:()=>A.execute,executeRotate:()=>X.executeRotate,executeSimplify:()=>I.execute,executeSymmetricDifference:()=>T.execute,executeUnion:()=>q.executeMany,loadAll:()=>J,toGxSpatialReference:()=>Q});var n=r(14690),s=r(9447),i=r(39117),o=r(29821),a=r(22994),u=r(70468),l=r(70031),m=r(85181),h=r(39672),c=r(46810),f=r(22802),g=r(24988),d=r(86742),y=r(77085),p=r(29716),x=r(35223),_=r(78125),P=r(83299),v=r(15227),G=r(96027),C=r(91577),M=r(90756),D=r(91735),w=r(49074),E=r(70787),b=r(33708),S=r(54945),N=r(33193),A=r(66070),I=r(81150),T=r(68613),q=r(28298),R=r(83755),O=r(6556),V=r(64064),X=r(64791);const Y=new i.v,k=new l.OperatorIntersects,B=new c.OperatorTouches,Z=new o.OperatorCrosses,F=new f.OperatorWithin,L=new i.x,U=new m.OperatorOverlaps,z=new u.OperatorEquals,j=new h.OperatorRelate,K=new a.OperatorDistance,W=new s.OperatorCentroid2D;async function J(){await Promise.all([(0,g.load)(),(0,d.load)(),(0,y.load)(),(0,p.load)(),(0,x.load)()])}function Q(e){return(0,_.fromSpatialReference)(e)}const $={fromFlatGeometry:n.constructFromFlatGeometry,fromJsonGeometry:P.fromGeometryToGXGeometry,fromAccessorGeometry:_.fromGeometry,toJsonGeometry:function(e){return(0,P.toGeometry)(e,null)},toAccessorGeometry:function(e,t){return(0,_.toGeometry)(e,t)}};r.d(t,["centroid",0,W,"contains",0,L,"converter",0,$,"crosses",0,Z,"disjoint",0,Y,"distance",0,K,"equals",0,z,"intersects",0,k,"overlaps",0,U,"relate",0,j,"touches",0,B,"within",0,F])},64791(e,t,r){r.d(t,{executeRotate:()=>f});var n=r(55537),s=r(83661),i=r(88885),o=r(11878),a=r(61691);class u extends a.G{m_inputGeometryCursor;m_transformation;m_index;constructor(e,t,r){super(),this.m_index=-1,this.m_transformation=t.clone(),this.m_inputGeometryCursor=e}next(){let e;if(e=this.m_inputGeometryCursor.next()){(0,n.t)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID();let t=e.clone();return t.applyTransformation(this.m_transformation),t}return null}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}}var l=r(9447),m=r(34727);const h=new l.OperatorCentroid2D,c=new class{getOperatorType(){return 10303}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r){return new u(e,t,r)}execute(e,t,r){let n=e.clone();return n.applyTransformation(t),n}};function f(e,t,r,a){let u,l;if(u=null!=r&&null!=a?new s.P(r,a):h.execute(e,null),e.getGeometryType()===n.G.enumEnvelope){let t=new i.P;t.addEnvelope(e,!1),l=t}else l=e;let f=(new o.T).rotateAngleAbout((0,m.kU)(t),u);return c.execute(l,f,null)}},57694(e,t,r){r.d(t,{a:()=>o,c:()=>i});var n=r(55537),s=r(83661);function i(e,t){if(!e.isEmpty())switch(e.getGeometryType()){case n.G.enumPolygon:return a(e);case n.G.enumPolyline:return h(e.getImpl());case n.G.enumLine:case n.G.enumBezier:case n.G.enumEllipticArc:return function(e){let t=e.calculateLength2D();return 0===t?e.getStartXY():e.calculateWeightedCentroid2D().mul(1/t)}(e);case n.G.enumMultiPoint:return function(e){let t=new s.K(0),r=new s.K(0),n=e.getImpl(),i=n.getAttributeStreamRef(0),o=n.getPointCount(),a=new s.P;for(let e=0;e<o;e++)i.queryPoint2D(2*e,a),t.add(a.x),r.add(a.y);let u=new s.P;return u.setCoords(t.getResult(),r.getResult()),u.divThis(o)}(e);case n.G.enumEnvelope:return e.getCenterXY();case n.G.enumPoint:return e.getXY();default:return s.P.construct(NaN,NaN)}return s.P.construct(NaN,NaN)}function o(e,t){return a(e,t)}function a(e,t=-1){let r,n,i=new s.K(0),o=new s.K(0),a=e.getImpl(),h=a.hasNonLinearSegments(),c=a.getXY(0);if(-1===t){if(n=a.calculateArea2D(),0===n)return m(e);h&&(r=a.querySegmentIterator());for(let e=0,t=a.getPathCount();e<t;e++)u(c,a,e,i,o),h&&l(c,r,i,o)}else{if(n=a.calculateRingArea2D(t),0===n)return m(e,t);h&&(r=a.querySegmentIterator(),r.resetToPath(t)),u(c,a,t,i,o),h&&l(c,r,i,o)}let f=new s.P,g=new s.P;return f.setCoords(i.getResult(),o.getResult()),g.assign(f.mul(1/n).add(c)),g}function u(e,t,r,n,i){let o=t.getPathStart(r),a=t.getPathEnd(r);if(a-o<3)return;let u=t.getAttributeStreamRef(0),l=u.readPoint2D(2*o),m=u.readPoint2D(2*(o+1));m.subThis(l);let h=new s.K(0),c=t.hasNonLinearSegments(),f=new s.P;for(let e=o+2;e<a;e++){u.queryPoint2D(2*e,f),f.subThis(l);let t=.5*f.crossProduct(m);c&&h.add(t);let r=.3333333333333333*t;n.add((m.x+f.x)*r),i.add((m.y+f.y)*r),m.setCoordsPoint2D(f)}let g=c?h.getResult():t.calculateRingArea2D(r),d=l.sub(e).mul(g);n.add(d.x),i.add(d.y)}function l(e,t,r,s){let i;for(t.nextPath()||(0,n.d)("centroid");null!==(i=t.nextCurve());){let t=i.calculateWeightedAreaCentroid2D(e);r.add(t.x),s.add(t.y)}}function m(e,t=-1){return h(e.getImpl(),t)}function h(e,t=-1){let r=-1===t?e.calculateLength2D():e.calculatePathLength2D(t);if(0===r)return function(e,t=-1){if(-1!==t)return e.getXY(e.getPathStart(t));let r=new s.K(0),n=new s.K(0);for(let t=0;t<e.getPathCount();++t){let s=e.getXY(e.getPathStart(t));r.add(s.x),n.add(s.y)}return s.P.construct(r.getResult(),n.getResult()).mul(1/e.getPathCount())}(e,t);let n=new s.K(0),i=new s.K(0),o=e.querySegmentIterator();for(-1!==t&&o.resetToPath(t);o.nextPath();){let r=o.getPathIndex(),s=e.getXY(e.getPathStart(r));for(;o.hasNextSegment();){let e=o.nextSegment(),t=e.calculateLength2D();if(0===t)continue;let r=e.calculateWeightedCentroid2D().sub(s.mul(t));n.add(r.x),i.add(r.y)}let a=s.mul(e.calculatePathLength2D(r));if(n.add(a.x),i.add(a.y),-1!==t)break}let a=new s.P;return a.setCoords(n.getResult(),i.getResult()),a.mul(1/r)}},30921(e,t,r){r.d(t,{D:()=>P,m:()=>m,s:()=>p,w:()=>y});var n=r(32198),s=r(55537),i=r(88885),o=r(39117),a=r(83661),u=r(79187),l=r(95213);function m(){return{outPoint:new a.P,index:-1,t:NaN}}function h(e,t,r){return{outPoint:e.clone(),index:t,t:r}}function c(e,t,r,n){e.outPoint.assign(t),e.index=r,e.t=n}function f(e,t){e.outPoint.assign(t.outPoint),e.index=t.index,e.t=t.t}function g(e,t,r,n){e.index=r,e.t=n,t.queryCoord2D(e.t,e.outPoint)}function d(e,t){let r=m();f(r,e),f(e,t),f(t,r)}function y(e,t,r,n,i,a){if(e.getGeometryType()===s.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){let t=n.nextSegment();if(0!==(0,o.K)(e,t.getEndXY(),0))return c(i,t.getEndXY(),-1,NaN),c(a,t.getEndXY(),-1,NaN),!0}n.resetToFirstPath()}if(t.getGeometryType()===s.G.enumPolygon){for(;r.nextPath();)if(r.hasNextSegment()){let e=r.nextSegment();if(0!==(0,o.K)(t,e.getEndXY(),0))return c(i,e.getEndXY(),-1,NaN),c(a,e.getEndXY(),-1,NaN),!0}r.resetToFirstPath()}return!1}function p(e){let t=e.getPathCount(),r=(0,a.c)(e.getSegmentCount(),0),n=0;for(let s=0;s<t;++s){let t=n+e.getSegmentCountPath(s);for(let i=n,o=e.getPathStart(s);i<t;++i,++o)r[i]=o;n=t}return(0,i.s)(e.getPointCount(),r),r}function x(e,t){return!!Number.isNaN(t)||e<=t}function _(e){let t=new i.P;return t.addEnvelope(e,!1),t}class P{m_progressTracker;m_env2DgeometryA=null;m_env2DgeometryB=null;m_maxSqrDistance;m_maxDistance;m_progressCounter=0;m_bIsNearCalc;constructor(e,t){if(this.m_progressTracker=t,this.m_maxSqrDistance=e*e,this.m_maxDistance=e,this.m_bIsNearCalc=!1,this.m_maxDistance=Number.isNaN(this.m_maxDistance)?1/0:e,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let e=Math.sqrt(this.m_maxSqrDistance);for(;e<this.m_maxDistance;)this.m_maxSqrDistance*=1+2**-52,e=Math.sqrt(this.m_maxSqrDistance)}}calculate(e,t,r,n){if((e.getGeometryType()!==l.P.type||t.getGeometryType()!==l.P.type)&&(this.m_env2DgeometryA=new u.Envelope2D,this.m_env2DgeometryB=new u.Envelope2D,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!x(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return 1/0;let s=h(new a.P,(0,a.b)(),NaN),i=h(new a.P,(0,a.b)(),NaN),o=this._ExecuteBruteForce(e,t,s,i);return x(o,this.m_maxDistance)?(null!==r&&f(r,s),null!==n&&f(n,i),o):1/0}isNear(e,t){if(this.m_bIsNearCalc=!0,e.isEmpty()||t.isEmpty())return!1;if(e===t)return!0;let r=!0;if(e.getGeometryType()!==l.P.type&&e.getGeometryType()!==l.E.type||t.getGeometryType()!==l.P.type&&t.getGeometryType()!==l.E.type||(r=!1),r){if(this.m_env2DgeometryA=new u.Envelope2D,this.m_env2DgeometryB=new u.Envelope2D,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}let n=h(new a.P,(0,a.b)(),NaN),s=h(new a.P,(0,a.b)(),NaN);return this._ExecuteBruteForce(e,t,n,s)<=this.m_maxDistance}progress_(e=!1){}_ExecuteBruteForce(e,t,r,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.distancePointGeometry(e,t,r,n);case s.G.enumMultiPoint:return this.distanceMultipointGeometry(e,t,r,n);case s.G.enumEnvelope:return this.distanceEnvelopeGeometry(e,t,r,n);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathGeometry(e,t,r,n);default:return NaN}}distancePointGeometry(e,t,r,n){switch(t.getGeometryType()){case s.G.enumPoint:return this.distancePointPoint(e,t,r,n);case s.G.enumMultiPoint:return this.distancePointMultipoint(e,t,r,n);case s.G.enumPolyline:case s.G.enumPolygon:return this.distancePointMultipath(e,t,r,n);case s.G.enumEnvelope:return this.distancePointEnvelope(e,t,r,n);default:return NaN}}distancePointPoint(e,t,r,n){let s=e.getXY(),i=t.getXY();return c(r,s,0,0),c(n,i,0,0),Math.sqrt(a.P.sqrDistance(s,i))}distancePointMultipoint(e,t,r,n){let s=e.getXY(),i=this.m_maxSqrDistance,o=i,u=!1,l=t.getPointCount(),m=new a.P;for(let e=0;e<l;++e)if(t.queryXY(e,m),o=a.P.sqrDistance(s,m),this.m_bIsNearCalc){if(o<=i)return 0}else if(!(o>i)&&(!u&&o===i||o<i)&&(i=o,c(r,s,0,0),c(n,m,e,0),u=!0,0===i))return 0;return u?Math.sqrt(i):1/0}distancePointMultipath(e,t,r,n){let i=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),l=e.getXY();if(!i&&t.getGeometryType()===s.G.enumPolygon&&0!==(0,o.K)(t,l,0))return c(r,l,0,0),c(n,l,-1,NaN),0;t.getImpl().getAccelerators();let m=this.m_maxSqrDistance,h=m,f=-1,g=new u.Envelope2D,d=t.querySegmentIterator(),y=!1;for(;d.nextPath();)for(;d.hasNextSegment();){let e=d.nextSegment();e.queryEnvelope(g);let t=g.sqrDistance(l);if(t>m||!this.m_bIsNearCalc&&y&&t===m)continue;f=e.getClosestCoordinate(l,!1);let s=e.getCoord2D(f);if(h=a.P.sqrDistance(l,s),this.m_bIsNearCalc){if(h<=m)return 0}else{if(h>m)continue;if((!y||h<m)&&(m=h,c(r,l,0,0),c(n,s,d.getStartPointIndex(),f),y=!0,0===m))return 0}}return y?Math.sqrt(m):1/0}distancePointEnvelope(e,t,r,n){let s=e.getXY();c(r,s,0,0),c(n,s,-1,NaN);let i=t.asEnvelope2D();return i.contains(s)?0:Math.sqrt(i.sqrDistance(s,n.outPoint))}distanceMultipointGeometry(e,t,r,n){switch(t.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);let s=this.distancePointMultipoint(t,e,n,r);return this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumMultiPoint:return this.distanceMultipointMultipoint(e,t,r,n,1,1);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipointMultipath(e,t,r,n);case s.G.enumEnvelope:return this.distanceMultipointMultipath(e,_(t),r,n);default:return NaN}}distanceMultipointMultipoint(e,t,r,s,i,o){let u={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===i&&1===o){let n=Math.trunc((0,a.a)(Math.sqrt(e.getPointCount())+1,1,(0,a.i)())),i=Math.trunc((0,a.a)(Math.sqrt(t.getPointCount())+1,1,(0,a.i)()));if((n>=4||i>=4)&&this.distanceMultipointMultipoint(e,t,r,s,n,i)<=this.m_maxSqrDistance)return 0}let l=this.m_maxSqrDistance,m=[e],h=[t],f=this.swapGeometriesIfBGtA(m,h);f&&(this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o=(0,a.s)(i,i=o),d(r,s)),(0,n.mS)(u,(0,a.m)(()=>{d(r,s),this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!f),!1);let g=m[0].getImpl(),y=h[0].getImpl(),p=g.getPointCount(),x=y.getPointCount(),_=x>1,P=!1,v=new a.P,G=new a.P;for(let e=0;e<p;e+=i){if(g.queryXY(e,v),_){let e=this.m_env2DgeometryB.sqrDistance(v);if(this.m_bIsNearCalc){if(e>l)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(v)<=l)return 0}else if(e>=l)continue}for(let t=0;t<x;t+=o){y.queryXY(t,G);let n=a.P.sqrDistance(v,G);if(this.m_bIsNearCalc){if(n<=l)return 0}else if(!(n>l||P&&n===l)&&(!P||n<l)&&(c(r,v,e,0),c(s,G,t,0),P=!0,l=n,0===l))return P?Math.sqrt(l):1/0}}return P?Math.sqrt(l):1/0}catch(e){u.error=e,u.hasError=!0}finally{(0,n.hk)(u)}}distanceMultipointMultipath(e,t,r,n){let i=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&t.getGeometryType()===s.G.enumPolygon,l=t.querySegmentIterator();l.stripAttributes();let m=new u.Envelope2D,h=new a.P,f=this.m_maxSqrDistance,g=e.getImpl(),d=g.getPointCount(),y=d>1,p=!1;for(;l.nextPath();)for(;l.hasNextSegment();){let e=l.nextSegment();if(e.queryLooseEnvelope(m),y){let e=m.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(e>f)continue}else if(e>f||p&&e===f)continue}for(let s=0;s<d;s++){if(g.queryXY(s,h),i&&0!==(0,o.K)(t,h,0))return c(r,h,-1,NaN),c(n,h,s,0),0;{let e=m.sqrDistance(h);if(this.m_bIsNearCalc){if(e>f)continue}else if(e>f)continue}let a=e.getClosestCoordinate(h,!1),u=e.getCoord2D(a);h.subThis(u);let d=h.sqrLength();if(this.m_bIsNearCalc){if(d<=f)return 0}else if(!(d>f)&&(!p||d<f)&&(f=d,c(r,g.getXY(s),s,0),c(n,u,l.getStartPointIndex(),a),p=!0,0===f))return 0}i=!1}return p?Math.sqrt(f):1/0}distanceEnvelopeGeometry(e,t,r,n){switch(t.getGeometryType()){case s.G.enumPoint:return this.distancePointEnvelope(t,e,n,r);case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);let s=this.distanceMultipointMultipath(t,_(e),n,r);return this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(_(e),t,r,n);case s.G.enumEnvelope:return this.distanceEnvelopeEnvelope(e,t,r,n);default:return NaN}}distanceEnvelopeEnvelope(e,t,r,n){r.t=NaN,r.index=-1,n.t=NaN,n.index=-1;let s=e.asEnvelope2D(),i=t.asEnvelope2D();return Math.sqrt(s.sqrDistanceEnvelope(i,r.outPoint,n.outPoint))}distanceMultipathGeometry(e,t,r,n){switch(t.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);let s=this.distancePointMultipath(t,e,n,r);return this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);let s=this.distanceMultipointMultipath(t,e,n,r);return this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(e,t,r,n);case s.G.enumEnvelope:return this.distanceMultipathMultipath(e,_(t),r,n);default:return NaN}}distanceMultipathMultipath(e,t,r,s){let o={stack:[],error:void 0,hasError:!1};try{let l=[e],h=[t],c=this.swapGeometriesIfAGtB(l,h);c&&(this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),d(r,s)),(0,n.mS)(o,(0,a.m)(()=>{d(r,s),this.m_env2DgeometryB=(0,a.s)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!c),!1);let x=l[0],_=h[0],P=x.querySegmentIterator();P.stripAttributes();let v=_.querySegmentIterator();if(v.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){let e=Math.trunc((0,a.a)(Math.sqrt(x.getPointCount())+1,1,(0,a.i)())),t=Math.trunc((0,a.a)(Math.sqrt(x.getPointCount())+1,1,(0,a.i)()));if(this.distanceMultipointMultipoint(x,_,r,s,e,t)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){let e=m(),t=m();if(y(x,_,P,v,e,t))return f(r,e),f(s,t),0}let G=p(x),C=[],M=new i.S,D=new u.Envelope2D,w=new u.Envelope2D,E=new u.Envelope2D,b=this.m_maxSqrDistance,S=!0,N=!1;for(let e=0,t=G.length;e<t;++e){x.querySegment(G[e],M,!0);let t=M.get();if(t.queryEnvelope(D),!(D.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>b)){if(this.m_bIsNearCalc&&D.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=b)return 0;for(;v.nextPath();){if(this.progress_(),S)_.queryPathEnvelope(v.getPathIndex(),E),C[v.getPathIndex()]=E.clone();else if(D.sqrDistanceEnvelope(C[v.getPathIndex()],null,null)>b)continue;for(;v.hasNextSegment();){let n=v.nextSegment();if(n.queryEnvelope(w),D.sqrDistanceEnvelope(w,null,null)<=b){let i=!D.isIntersecting(w),o=[0],a=[0],u=t.distance(n,i,o,a);if(u*=u,this.m_bIsNearCalc&&u<=this.m_maxSqrDistance)return 0;if(u<b||u===b&&G[e]<r.index){if(N=!0,g(r,t,G[e],o[0]),g(s,n,v.getStartPointIndex(),a[0]),0===u)return 0;b=u}}}}v.resetToFirstPath(),S=!1}}return N?Math.sqrt(b):1/0}catch(e){o.error=e,o.hasError=!0}finally{(0,n.hk)(o)}}swapGeometriesIfAGtB(e,t){return(0,s.v)(e[0])>(0,s.v)(t[0])&&(t[0]=(0,a.s)(e[0],e[0]=t[0]),!0)}swapGeometriesIfBGtA(e,t){return this.swapGeometriesIfAGtB(t,e)}}},61691(e,t,r){r.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},9447(e,t,r){r.d(t,{OperatorCentroid2D:()=>s});var n=r(57694);class s{getOperatorType(){return 10205}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t){return(0,n.c)(e)}}},29821(e,t,r){r.d(t,{OperatorCrosses:()=>s});var n=r(39117);class s extends n.Z{getOperatorType(){return 6}execute(e,t,r,s){return(0,n._)(e,t,r,16,s)}}},22994(e,t,r){r.d(t,{OperatorDistance:()=>i});var n=r(55537),s=r(30921);class i{getOperatorType(){return 10100}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}execute(e,t,r){return this.executeEx(e,t,r,null,null,NaN)}executeEx(e,t,r,i,o,a){if(e.isEmpty()||t.isEmpty())return NaN;(0,n.t)(e),(0,n.t)(t);let u=e,l=t;Number.isNaN(a)&&(a=1/0);let m=new s.D(a,r).calculate(u,l,i,o);return Number.isFinite(m)?m:NaN}}},70468(e,t,r){r.d(t,{OperatorEquals:()=>s});var n=r(39117);class s extends n.Z{getOperatorType(){return 2}execute(e,t,r,s){return(0,n._)(e,t,r,3,s)}}},68375(e,t,r){r.d(t,{O:()=>u});var n=r(61691),s=r(55537),i=r(39117),o=r(79187),a=r(86870);class u{getOperatorType(){return 10111}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,s,o,a,u,m,h,c){if(m){let m=new l(e,t,r,n,s,o,a,u,c);return(new i.a5).executeMany(m,t,c,2)}return new l(e,t,r,n,s,o,a,u,c)}}class l extends n.G{m_inputGeoms;m_spatialReference;m_progressTracker;m_bufferer;m_distances;m_maxDeviation;m_miterLimit;m_maxVerticesInFullCircle;m_joins;m_caps;m_currentUnionEnvelope2D=new o.Envelope2D;m_index=-1;m_dindex=-1;constructor(e,t,r,n,s,i,o,u,l){super(),this.m_progressTracker=l,this.m_bufferer=new a.B(l),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=o,this.m_maxVerticesInFullCircle=u,this.m_joins=n,this.m_caps=s,this.m_miterLimit=i}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return(0,s.t)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}},70031(e,t,r){r.d(t,{OperatorIntersects:()=>s});var n=r(39117);class s extends n.Z{getOperatorType(){return 4}execute(e,t,r,s){return!(0,n._)(e,t,r,4,s)}}},85181(e,t,r){r.d(t,{OperatorOverlaps:()=>s});var n=r(39117);class s extends n.Z{getOperatorType(){return 9}execute(e,t,r,s){return(0,n._)(e,t,r,32,s)}}},88194(e,t,r){r.d(t,{O:()=>c});var n=r(55537),s=r(79187),i=r(83661),o=r(39117);function a(){return u(new i.P,-1,NaN)}function u(e,t,r){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:r,m_bRightSide:!1,isEmpty:l}}function l(){return Number.isNaN(this.m_distance)}function m(e,t,r=-1,a=-1){if(e.isEmpty())return 3;let u=e.getGeometryType();if((0,n.h)(u))return function(e,t,r,s){if(r>=0||s>=0)return(0,n.b)("");if(e.isDegenerate(0))return e.getStartXY().equals(t)?2:3;if(!e.isCurve()){let r=i.P.orientationRobust(t,e.getStartXY(),e.getEndXY());return r<0?1:r>0?0:2}let o=e.getClosestCoordinate(t,!1),a=e.getTangent(o),u=e.getCoord2D(o),l=i.P.orientationRobust(t,u,u.add(a));return l<0?1:l>0?0:2}(e,t,r,a);if(u===n.G.enumPolygon)return function(e,t,r,i){(r>=0||i>=0)&&(0,n.b)("");let a=new s.Envelope2D;e.queryEnvelope(a);let u=(0,o.K)(e,t,0);return 0===u?0:1===u?1:2}(e,t,r,a);if(u===n.G.enumPolyline)return function(e,t,r,s){(r<0&&s>=0||r>=0&&s<0)&&(0,n.b)("");let o=e.querySegmentIterator();if(r<0){let e=Number.MAX_VALUE,n=0;for(;o.nextPath();)for(;o.hasNextSegment();){let a=o.nextSegment(),u=a.getClosestCoordinate(t,!1),l=a.getCoord2D(u),m=i.P.sqrDistance(l,t);m<e?(n=1,r=o.getStartPointIndex(),s=o.getPathIndex(),e=m):m===e&&n++}if(0===n)return 3;if(1===n)return o.resetToVertex(r,s),m(o.nextSegment(),t)}let a=function(e,t,r,n){let s={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(s.i1=function(e,t,r){for(e.resetToVertex(t,r);e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();for(e.resetToVertex(t,r);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,r,n),-1!==s.i1){t.resetToVertex(s.i1,-1);let r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n),a=i.P.sqrDistance(o,e);{let t=o.clone();t.subThis(r.getStartXY());let n=e.clone();n.subThis(r.getStartXY()),s.bRight1=t.crossProduct(n)<0}if(s.i2=function(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2){t.resetToVertex(s.i2,-1);let r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n);if(i.P.sqrDistance(o,e)>a)s.i2=-1;else{let t=o.clone();t.subThis(r.getStartXY());let n=e.clone();n.subThis(r.getStartXY()),s.bRight2=t.crossProduct(n)<0}}if(-1===s.i2&&(s.i2=function(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2)){t.resetToVertex(s.i2,-1);let r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n);if(i.P.sqrDistance(o,e)>a)s.i2=-1;else{let t=o.clone();t.subThis(r.getStartXY());let n=e.clone();n.subThis(r.getStartXY()),s.bRight2=t.crossProduct(n)<0;let i=s.i1;s.i1=s.i2,s.i2=i;let a=s.bRight1;s.bRight1=s.bRight2,s.bRight2=a}}}return s}(t,o,r,s);if(-1!==a.i1&&-1===a.i2)return+!!a.bRight1;if(-1!==a.i1&&-1!==a.i2){if(a.bRight1===a.bRight2)return+!!a.bRight1;{o.resetToVertex(a.i1,-1);let e=o.nextSegment().getTangent(1);o.resetToVertex(a.i2,-1);let t=o.nextSegment().getTangent(0);return+(e.crossProduct(t)>=0)}}return o.resetToVertex(r,s),m(o.nextSegment(),t)}(e,t,r,a);if(u===n.G.enumEnvelope){let r=new s.Envelope2D;return e.queryEnvelope(r),r.contains(t)?r.containsExclusive(t)?1:2:0}return 3}var h=r(95213);class c{getOperatorType(){return 10500}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(e,t,r,s){if(t.isNAN()&&(0,n.b)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertex(e,t);case n.G.enumMultiPoint:return this.multiVertexGetNearestVertex(e,t);case n.G.enumPolyline:case n.G.enumPolygon:return this.multiPathGetNearestCoordinate(e,t,r,s);default:(0,n.a)("")}}getNearestVertex(e,t){if(t.isNAN()&&(0,n.b)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertex(e,t);case n.G.enumMultiPoint:case n.G.enumPolyline:case n.G.enumPolygon:return this.multiVertexGetNearestVertex(e,t);default:(0,n.a)("")}}getNearestVertices(e,t,r,s){if(0===s&&(0,n.b)(""),t.isNAN()&&(0,n.b)("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertices(e,t,r,s);case n.G.enumMultiPoint:case n.G.enumPolyline:case n.G.enumPolygon:return this.multiVertexGetNearestVertices(e,t,r,s);default:(0,n.a)("")}}multiPathGetNearestCoordinate(e,t,r,a){if(e.getGeometryType()===n.G.enumPolygon&&r){let r=new s.Envelope2D;e.queryEnvelope(r);let n,i=(0,h.d)(null,r,!1);if(n=a?(0,o.K)(e,t,0):(0,o.K)(e,t,i),0!==n){let e=u(t,-1,0);return a&&(e.m_bRightSide=!0),e}}let l=e.querySegmentIterator(),c=new i.P,f=-1,g=-1,d=Number.MAX_VALUE,y=0;for(;l.nextPath();)for(;l.hasNextSegment();){let e=l.nextSegment(),r=e.getClosestCoordinate(t,!1),n=e.getCoord2D(r),s=i.P.sqrDistance(n,t);s<d?(y=1,c.assign(n),f=l.getStartPointIndex(),g=l.getPathIndex(),d=s):s===d&&y++}-1===f&&(0,n.b)("");let p=u(c,f,Math.sqrt(d));if(a)if(e.getGeometryType()!==n.G.enumPolygon){let r=!1;if(y>1){let n=m(e,t,f,g);r=0!==n&&3!==n}else l.resetToVertex(f,g),r=0!==m(l.nextSegment(),t);p.m_bRightSide=r}else r||0!==(0,o.K)(e,t,0)&&(p.m_bRightSide=!0);return p}pointGetNearestVertex(e,t){let r=e.getXY();return u(r,0,i.P.distance(r,t))}multiVertexGetNearestVertex(e,t){let r=e.getAttributeStreamRef(0),n=e.getPointCount(),s=-1,o=new i.P,a=Number.MAX_VALUE,l=new i.P;for(let e=0;e<n;e++){r.queryPoint2D(2*e,l);let n=i.P.sqrDistance(l,t);n<a&&(o.assign(l),s=e,a=n)}return u(o,s,Math.sqrt(a))}pointGetNearestVertices(e,t,r,n){let s=[];if(0!==n){let n=r*r,o=e.getXY(),a=i.P.sqrDistance(o,t);a<=n&&s.push(u(o,0,Math.sqrt(a)))}return s}multiVertexGetNearestVertices(e,t,r,n){let s=[];if(0!==n){let o=e.getAttributeStreamRef(0),a=e.getPointCount();s.length=n+1;let l=r*r;for(let e=0;e<a;e++){let r=o.read(2*e),n=o.read(2*e+1),a=t.x-r,m=t.y-n,h=a*a+m*m;h<=l&&s.push(u(i.P.construct(r,n),e,Math.sqrt(h)))}s.sort((e,t)=>e.m_distance-t.m_distance)}return s.slice(0,n)}}},39672(e,t,r){r.d(t,{OperatorRelate:()=>s});var n=r(39117);class s{supportsCurves(){return!0}getOperatorType(){return 1}execute(e,t,r,s,i){return(0,n.$)(e,t,r,s,i)}isValidDE9IM(e){return 0===(0,n.a0)(e)}accelerateGeometry(e,t,r){return(0,n.a1)(e,t,r)}canAccelerateGeometry(e){return(0,n.a2)(e)}}},46810(e,t,r){r.d(t,{OperatorTouches:()=>s});var n=r(39117);class s extends n.Z{getOperatorType(){return 5}execute(e,t,r,s){return(0,n._)(e,t,r,8,s)}}},22802(e,t,r){r.d(t,{OperatorWithin:()=>s});var n=r(39117);class s extends n.Z{getOperatorType(){return 7}execute(e,t,r,s){return(0,n._)(e,t,r,2,s)}}},76061(e,t,r){r.d(t,{S:()=>s});var n=r(61691);class s extends n.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){let e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},69397(e,t,r){r.d(t,{Qf:()=>u,Qh:()=>o,lM:()=>i,ro:()=>l,rq:()=>m});var n=r(44208),s=r(34275);function i(e){if(!e)return 0;let t=h;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return m(e,8);let r=c;for(let n=0;n<t;n++)r+=a(e[n]);return r}(e);let t=h;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):h;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+l(t),0)}function l(e,t=16){return e?(0,s.iu)(e)?e.byteLength+g:Array.isArray(e)?m(e,t):0:0}function m(e,t){return c+e.length*t}const h=32,c=16,f=(0,n.A)("ios")||!(0,n.A)("chrome")&&!(0,n.A)("opr")?8:4,g=145;r.d(t,["JY",0,f])},87992(e,t,r){r.d(t,{JR:()=>M,ME:()=>v,MY:()=>w,NO:()=>P,Nh:()=>C,V2:()=>A,_s:()=>I,e6:()=>q,gh:()=>G,jm:()=>D,tr:()=>O,uX:()=>d});var n=r(32198),s=(r(69397),r(16930)),i=r(19419),o=r(60408),a=r(21325),u=r(513),l=r(50954),m=r(79567),h=r(52006),c=r(49663),f=r(46068),g=r(92722);class d{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:n,vertexZ:s,vertexM:i,partCount:o,partOffsets:a,partFlags:u,segmentFlags:l,segmentIndices:m,segmentParams:h,segmentCountArc:c,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=n,this.vertexZ=s,this.vertexM=i,this.partCount=o,this.partOffsets=a,this.partFlags=u,this.segmentFlags=l,this.segmentIndices=m,this.segmentParams=h,this.segmentCountArc=c,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){let{type:e,vertexCount:t,partCount:r,hasZ:n,hasM:s,segmentCountArc:i,segmentCountBezier:o}=this,a=A(e,t,r,n,s,this.hasCurves(),i,o);a.spatialReference=this.spatialReference;let{vertexXY:u,vertexZ:l,vertexM:m}=this;if(a.vertexXY.set(u.subarray(0,2*t),0),a.vertexZ?.set(l.subarray(0,t),0),a.vertexM?.set(m.subarray(0,t),0),this.isMultipart()){let{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,r+1)),a.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){let{segmentFlags:e,segmentIndices:r,segmentParams:n,segmentParamCount:s}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(r.subarray(0,t),0),a.segmentParams.set(n.subarray(0,s),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,a.aI)(this.spatialReference,e.spatialReference)||this.vertexCount!==e.vertexCount||this.partCount!==e.partCount||this.hasZ!==e.hasZ||this.hasM!==e.hasM||this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;let r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new y(this):[][Symbol.iterator]()}}class y{constructor(e){this.geometry=e,this.value=new p(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class p{constructor(e){this.geometry=e,this.index=-1,this._readVertex=S(e),this._segments=new x(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class x{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this.value=new _(e.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class _{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=S(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;let t=this.geometry.segmentParams,r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){let e=t[r++],n=t[r++],s=t[r++],i=t[r++];return{b:[this.end,[e,n],[s,i]]}}let n=t[r++],s=t[r++],i=t[r++],o=t[r++],a=t[r++],u=t[r++];r++,r++;let l=t[r++],m=t[r++];if(!(4&n)&&1===i)return{c:[this.end,[l,m]]};let h=2&n?0:1,c=1&n?0:1;return{a:[this.end,[a,u],h,c,o,s,i]}}}function P(e,t){let r={stack:[],error:void 0,hasError:!1};try{return t??=(0,i.Ie)(),(0,n.mS)(r,new E(e,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(t,function(e){let t,{vertexCount:r,vertexXY:s,vertexZ:o,vertexM:a}=e,u=b(e);if(e.hasCurves()){let r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,new E(e,["vertexZ","vertexM"]),!1);let s=(0,i.Ie)();for(let t of e.parts){let e=t.startVertex;for(let{curve:r}of t.segments)(0,m.e)(s,e,r),e=(0,h.yP)(r)}let[o,a,l,c]=s;t={xmin:o,ymin:a,xmax:l,ymax:c,spatialReference:u}}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}else{let e,n,i,o;e=n=1/0,i=o=-1/0;for(let t=0;t<r;++t){let r=s[2*t],a=s[2*t+1];e=Math.min(e,r),i=Math.max(i,r),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:i,ymax:o,spatialReference:u}}if(o){let e=1/0,r=-1/0;for(let t of o)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(a){let e=1/0,r=-1/0;for(let t of a)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}function v(e){let t,r,n;if((0,o.fT)(e)){n="point";let{x:s,y:i,z:o,m:a}=e,u=[s,i];null!=o&&u.push(o),null!=a&&u.push(a),r=[[u]],t=1}else(0,o.U9)(e)?(n="multipoint",r=[e.points],t=e.points.length):(0,o.Rg)(e)?(n="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(n="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,N(t[0],(0,h.yP)(t.at(-1)))&&--e),e),0));let s=A(n,t,n.includes("point")?0:r.length,(0,o.Pv)(e),(0,o.W0)(e),(0,h.Ed)(e)),{hasZ:i,hasM:a,vertexXY:u,vertexZ:l,vertexM:m}=s;function c(e){u[2*g]=e[0],u[2*g+1]=e[1],i&&(l[g]=e[2]),a&&(m[g]=e[f]),++g}s.spatialReference=e.spatialReference??void 0;let f=s.hasZ?3:2,g=0;if(!s.isMultipart()){if(!i&&!a){for(let[e,t]of r[0])u[2*g]=e,u[2*g+1]=t,++g;return s}for(let e of r[0])c(e);return s}let d="polygon"===n,{partOffsets:y}=s,p=0;if(!(0,h.Ed)(e)){for(let e of r){if(y[p++]=g,0===e.length)continue;let t=e.length;if(d&&N(e[0],e.at(-1))&&--t,i||a)for(let r=0;r<t;++r)c(e[r]);else for(let r=0;r<t;++r){let[t,n]=e[r];u[2*g]=t,u[2*g+1]=n,++g}}return y[p]=g,s}function x(e){let t=_+e;if(t<=(s.segmentParams?.length??0))return;let r=t*V;r=20*Math.ceil(r/20);let n=s.segmentParams;s.segmentParams=new Float64Array(r),null!=n&&s.segmentParams.set(n)}let _=0;for(let e of r){if(s.partOffsets[p++]=g,0===e.length)continue;let t=e[0],r=t;for(let t=1;t<e.length;++t){let n=e[t];c(r);let i=g-1;(0,h.wY)(n)?(x(10),++s.segmentCountArc,_=I(r,n,s,i,_),r=n.a[0]):(0,h.DA)(n)?(x(10),++s.segmentCountArc,_=T(r,n,s,i,_),r=n.a[0]):(0,h.aO)(n)?(x(10),++s.segmentCountArc,_=q(r,n,s,i,_),r=n.c[0]):(0,h.n1)(n)?(x(4),++s.segmentCountBezier,_=O(0,n,s,i,_),r=n.b[0]):r=n}d&&N(t,r)||c(r)}return s.partOffsets[p]=g,s}function G(e){let t=S(e),{vertexCount:r,partCount:n,hasZ:s,hasM:i}=e,o=b(e),a=0;if(!e.isMultipart()){if("point"===e.type){let[t,r]=e.vertexXY;return{x:t,y:r,z:e.vertexZ?.[0],m:e.vertexM?.[0],spatialReference:o}}let n=[];for(;a<r;)n.push(t(a++));return{points:n,spatialReference:o,hasZ:s,hasM:i}}if(!e.hasCurves()){let r=[];for(let s=0;s<n;++s){let n=!!(1&e.partFlags[s]),i=e.partOffsets[s+1],o=[];for(;a<i;)o.push(t(a++));n&&o.length>0&&o.push([...o[0]]),r.push(o)}return"polygon"===e.type?{rings:r,hasZ:s,hasM:i,spatialReference:o}:{paths:r,hasZ:s,hasM:i,spatialReference:o}}let u=[];for(let{segments:t,startVertex:r}of e.parts){let e=[r];for(let{curve:r}of t)e.push(r);u.push(e)}return"polygon"===e.type?{rings:[],curveRings:u,hasZ:s,hasM:i,spatialReference:o}:{paths:[],curvePaths:u,hasZ:s,hasM:i,spatialReference:o}}function C(e,{lengths:t,coords:r,hasZ:n,hasM:s},i){let o=e.includes("point")?0:t.length,a="polygon"===e,u="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,s??=!1;let l=A(e,u,o,n,s,!1,0,0);if(l.spatialReference=i??void 0,!l.isMultipart()){for(let e=0,t=0;e<u;++e)l.vertexXY[2*e]=r[t++],l.vertexXY[2*e+1]=r[t++],n&&(l.vertexZ[e]=r[t++]),s&&(l.vertexM[e]=r[t++]);return l}let m=2+Number(n)+Number(s),h=0,c=0;l.partOffsets[0]=0;for(let e of t){let t=l.partOffsets[c],i=t+e-Number(a);l.partOffsets[++c]=i;for(let e=t;e<i;++e)l.vertexXY[2*e]=r[h++],l.vertexXY[2*e+1]=r[h++],n&&(l.vertexZ[e]=r[h++]),s&&(l.vertexM[e]=r[h++]);a&&(h+=m)}return l}function M({type:e,vertexCount:t,vertexXY:r,vertexZ:n,vertexM:s,partCount:i,partOffsets:o,partFlags:a,hasZ:u,hasM:l}){let m=new g.A([],[],u,l);i=Math.max(i,1);let h=0;for(let e=0;e<i;++e){let i=o?.[e+1]??t,c=m.coords.length;for(let e=h;e<i;++e)m.coords.push(r[2*e],r[2*e+1]),u&&m.coords.push(n[e]),l&&m.coords.push(s[e]);if(a&&1&a[e]){let e=h;m.coords.push(r[2*e],r[2*e+1]),u&&m.coords.push(n[e]),l&&m.coords.push(s[e])}m.lengths.push((m.coords.length-c)/m.stride),h=i}return"point"===e&&(m.lengths.length=0),m}function D(...e){let t=new Set;for(let r of e){if(!r)continue;let e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(let r of e){let e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function w(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;let t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===r)&&(n=void 0);let s=e.getVCS();if(null==s)return{wkid:r,latestWkid:n,wkt:t};let i=s.isCustomWkid()?0:s.getOldID();if(i<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===i)&&(o=void 0),{wkid:r,wkt:t,latestWkid:n,vcsWkid:i,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new d({...e.toFlatGeometry(),spatialReference:t})}class E{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(let r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function b({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function S({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?n=>[e[2*n],e[2*n+1],t[n],r[n]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function N(e,t){return e.every((e,r)=>e===t[r])}function A(e,t,r,n,s,i,o,a){o??=0,a??=0;let u=new d({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a}),l=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(l+=Float64Array.BYTES_PER_ELEMENT*t),s&&(l+=Float64Array.BYTES_PER_ELEMENT*t),u.isMultipart()&&(l+=(r+1)*Int32Array.BYTES_PER_ELEMENT,l+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(l+=t*Int8Array.BYTES_PER_ELEMENT,l+=t*Int32Array.BYTES_PER_ELEMENT,l+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let m=new ArrayBuffer(l),h=0;return u.vertexXY=new Float64Array(m,h,2*t),h+=u.vertexXY.byteLength,n&&(u.vertexZ=new Float64Array(m,h,t),h+=u.vertexZ.byteLength),s&&(u.vertexM=new Float64Array(m,h,t),h+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(m,h,u.segmentParamCount),h+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(m,h,t),u.segmentIndices.fill(X),h+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(m,h,r+1),h+=u.partOffsets.byteLength,u.partFlags=new Int8Array(m,h,r+1),h+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,r).fill(1)),i&&(u.segmentFlags=new Int8Array(m,h,t),u.segmentFlags.fill(1),h+=u.segmentFlags.byteLength),u}function I(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;let[a,[u,l],m,h,c,g,d]=t.a,y=4;h||(y|=1),m||(y|=2);let p=(0,f.SW)(e,t),[x,_]=(0,f.Uk)(p,.5);return s[o++]=y,s[o++]=g,s[o++]=d,s[o++]=c,s[o++]=u,s[o++]=l,s[o++]=p.u2-p.u1,s[o++]=p.u1,s[o++]=x,s[o++]=_,o}function T(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;let a=(0,c.io)(e,t);return R(a,4,...(0,u.mq)(a,.5),s,o)}function q(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){return r[i]=4,n[i]=o,R((0,l.pM)(e,t),0,...t.c[1],s,o)}function R(e,t,r,n,s,i){let{cx:o,cy:a,thetaStart:u,thetaEnd:l,radius:m}=e;return u>l||(t|=1),Math.abs(l-u)<=Math.PI||(t|=2),s[i++]=t,s[i++]=m,s[i++]=1,s[i++]=0,s[i++]=o,s[i++]=a,s[i++]=l-u,s[i++]=u,s[i++]=r,s[i++]=n,i}function O(e,{b:[t,[r,n],[s,i]]},{segmentFlags:o,segmentIndices:a,segmentParams:u},l,m){return o[l]=2,a[l]=m,u[m++]=r,u[m++]=n,u[m++]=s,u[m++]=i,m}const V=1.61803,X=-1},15227(e,t,r){r.d(t,{execute:()=>h,yv:()=>c});var n=r(76061),s=r(61691),i=r(55537),o=r(39117),a=r(79187),u=r(86870);class l extends s.G{m_inputGeoms;m_spatialReference;m_progressTracker;m_bufferer;m_distances;m_maxDeviation;m_maxVerticesInFullCircle;m_currentUnionEnvelope2D=new a.Envelope2D;m_index=-1;m_dindex=-1;constructor(e,t,r,n,s,i,o){super(),this.m_progressTracker=o,this.m_bufferer=new u.B(o),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=n,this.m_maxVerticesInFullCircle=s}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return(0,i.t)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const m=new class{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,s){return this.executeManyEx(e,t,r,NaN,96,n,s)}execute(e,t,r,s){Number.isFinite(r)||(0,i.b)("Invalid distance for buffer operation");let o=new n.S([e]),a=[r],u=this.executeMany(o,t,a,!1,s).next();return u||(0,i.d)("null buffer output"),u}executeManyEx(e,t,r,n,s,a,u){if(void 0!==r.find(e=>!Number.isFinite(e))&&(0,i.b)("Invalid distance for buffer operation"),a){let i=new l(e,t,r,n,s,!1,u);return(new o.a5).executeMany(i,t,u,2)}return new l(e,t,r,n,s,!1,u)}};function h(e,t,r){return m.execute(e,t,r,null)}function c(e,t,r,s,i,o){let a=m.executeManyEx(new n.S(e),t,r,s,i,o,null);return Array.from(a)}},96027(e,t,r){r.d(t,{execute:()=>s}),r(76061);const n=new(r(31139).O);function s(e,t,r){return n.execute(e,t,r,null)}},91577(e,t,r){r.d(t,{execute:()=>g,qT:()=>y,zo:()=>d});var n=r(76061),s=r(61691),i=r(55537),o=r(95213),a=r(88885),u=r(79187);class l extends s.G{m_progressTracker;m_bMerge;m_bDone;m_inputGeometryCursor;m_index;constructor(e,t,r){super(),t||(0,i.b)(""),this.m_progressTracker=r,this.m_index=-1,this.m_bMerge=e,this.m_bDone=!1,this.m_inputGeometryCursor=t}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge){if(!this.m_bDone){let e=m(this.m_inputGeometryCursor);return this.m_bDone=!0,e}return null}if(!this.m_bDone){let e=this.m_inputGeometryCursor.next();if(null!==e)return(0,i.p)(e),(0,i.t)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),h(e);this.m_bDone=!0}return null}}function m(e,t){let r,n=new a.C;for(;r=e.next();)(0,i.p)(r),(0,i.t)(r),n.addGeometry(r);return n.getBoundingGeometry()}function h(e,t){if((0,i.t)(e),e.isEmpty())return e.createInstance();let r=e.getGeometryType();if((0,i.h)(r)){let t=e;if(t.isDegenerate(0)){let e=new o.P;return t.queryStart(e),e}if(t.getGeometryType()===i.G.enumLine){let r=new o.P,n=new a.a({vd:e.getDescription()});return t.queryStart(r),n.startPathPoint(r),t.queryEnd(r),n.lineToPoint(r),n}{let r=new a.a({vd:e.getDescription()});return r.addSegment(t,!0),h(r)}}if(r===i.G.enumEnvelope){let t=e,r=new u.Envelope2D;if(t.queryEnvelope(r),r.xmin===r.xmax&&r.ymin===r.ymax){let e=new o.P;return t.queryCornerByVal(0,e),e}if(r.xmin===r.xmax||r.ymin===r.ymax){let r=new o.P,n=new a.a({vd:e.getDescription()});return t.queryCornerByVal(0,r),n.startPathPoint(r),t.queryCornerByVal(1,r),n.lineToPoint(r),n}{let r=new a.P({vd:e.getDescription()});return r.addEnvelope(t,!1),r}}if(r===i.G.enumGeometryCollection)return m((0,a.g)(e,-1));if(c(e)){if(r===i.G.enumMultiPoint){let t=e,r=new o.P;return t.getPointByVal(0,r),r}return e}return(0,i.g)((0,i.i)(r)),(0,a.f)(e)}function c(e,t){if((0,i.t)(e),e.isEmpty())return!0;let r=e.getGeometryType();if(r===i.G.enumPoint)return!0;if(r===i.G.enumEnvelope){let t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,i.h)(r)){let t=e;if(t.isDegenerate(0))return!1;if(r===i.G.enumLine)return!0;let n=new a.a;return n.addSegment(t,!0),c(n)}if(r===i.G.enumMultiPoint)return 1===e.getPointCount();if(r===i.G.enumPolyline){let t=e;return!t.hasNonLinearSegments()&&1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(r===i.G.enumGeometryCollection){let t=e;return 1===t.getGeometryCount()&&c(t.getGeometry(0))}let n=e;return!(1!==n.getPathCount()||n.getPointCount()<3)&&(0,a.i)(n,0)}const f=new class{getOperatorType(){return 10102}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r){return new l(t,e,r)}execute(e,t){return h(e)}isConvex(e,t){if((0,i.t)(e),e.isEmpty())return!0;let r=e.getGeometryType();if(r===i.G.enumPoint)return!0;if(r===i.G.enumEnvelope){let t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,i.h)(r)){let t=e;return!t.getStartXY().equals(t.getEndXY())}if(r===i.G.enumMultiPoint)return 1===e.getPointCount();if(r===i.G.enumPolyline){let t=e;return 1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(r===i.G.enumGeometryCollection){let r=e;return 1===r.getGeometryCount()&&this.isConvex(r.getGeometry(0),t)}let n=e;return!(1!==n.getPathCount()||n.getPointCount()<3)&&(0,a.i)(n,0)}constructOrientedMinimumBoundingBox(e,t,r,n,s){(0,a.e)(e,t,r,n,s)}};function g(e){return f.execute(e,null)}function d(e,t){let r=f.executeMany(new n.S(e),t,null);return Array.from(r)}function y(e){return f.isConvex(e,null)}},90756(e,t,r){r.d(t,{execute:()=>c});var n=r(61691),s=r(55537),i=r(88885),o=r(95213),a=r(39117),u=a.U;function l(e,t){return{m_geometry:e,m_side:t}}class m extends n.G{m_bConsiderTouch;m_cuttee;m_cutter;m_tolerance;m_cutIndex=-1;m_cuts=[];m_progressTracker;constructor(e,t,r,n,s){super(),this.m_progressTracker=s,this.m_cuttee=t.clone(),this.m_cutter=new i.a({copy:r}),this.m_bConsiderTouch=e;let a=(0,o.g)(t,r);this.m_tolerance=(0,o.c)(n,a,!0)}next(){return-1===this.m_cutIndex&&this.generateCuts(),++this.m_cutIndex<this.m_cuts.length?this.m_cuts[this.m_cutIndex]:null}getGeometryID(){return this.m_cutIndex}tock(){return!0}getRank(){return 1}generateCuts(){switch(this.m_cuttee.getGeometryType()){case s.G.enumPolyline:this.generatePolylineCuts();break;case s.G.enumPolygon:this.generatePolygonCuts()}}generatePolylineCuts(){let e=new i.a,t=new i.a,r=new i.a;this.m_cuts.length=0,this.m_cuts.push(e),this.m_cuts.push(t);let n=[];!function(e,t,r,n,s,o){if(t.isEmpty()||r.isEmpty()){let e=l(t,0);return void s.push(e)}let m=[],h=new i.E;{let i=h.createGeometryUserIndex(),c=h.addGeometry(t),f=h.addGeometry(r),g=new a.a6(o),d=0,y=null;if(h.hasCurves()){y=new u;let e=h.getEnvelope2D(o);d=(0,a.N)(n.total());let t=(0,a.M)(n.total(),e);(0,a.Q)(h,t,n.total(),12e3,y,null,o)}h.dbgVerifyCurves(),g.setEditShapeCrackAndCluster(h,n),g.cut(e,i,c,f,m);for(let e of m){null!==y&&y.stitchCurves(h,e,d,!1);let t=l(h.getGeometry(e),(0,a.a7)(h.getGeometryUserIndex(e,i)));s.push(t)}null!==y&&y.clearStitcher(h)}}(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,n,this.m_progressTracker);for(let i=0;i<n.length;i++){let o=n[i];1===o.m_side?e.add(o.m_geometry,!1):2===o.m_side||4===o.m_side?t.add(o.m_geometry,!1):3===o.m_side?this.m_cuts.push(o.m_geometry):0===o.m_side?r.add(o.m_geometry,!1):(0,s.d)("")}!r.isEmpty()&&(!e.isEmpty()||!t.isEmpty()||this.m_cuts.length>=3)&&this.m_cuts.push(r),e.isEmpty()&&t.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}generatePolygonCuts(){let e=new i.P,t=new i.P,r=new i.P;this.m_cuts.length=0,this.m_cuts.push(e),this.m_cuts.push(t);let n=[];!function(e,t,r,n,s,o){if(t.isEmpty()||r.isEmpty()){let e=l(t,0);return void s.push(e)}let m=[],h=new i.E;{let e=h.createGeometryUserIndex(),c=h.addGeometry(t),f=h.addGeometry(r),g=new a.a6(o),d=0,y=null;if(h.hasCurves()){y=new u;let e=h.getEnvelope2D(o);d=(0,a.N)(n.total());let t=(0,a.M)(n.total(),e);(0,a.Q)(h,t,n.total(),12e3,y,null,o)}h.dbgVerifyCurves(),g.setEditShapeCrackAndCluster(h,n),g.cut(!1,e,c,f,m),null!==y&&y.stitchCurves(h,-1,d,!0);let p=h.getGeometry(c),x=new i.P,_=new i.P,P=[];for(let t=0;t<m.length;t++){let r=null;{let s=new i.E,u=s.addGeometry(p),l=s.addGeometry(h.getGeometry(m[t]));if(s.hasCurves()){let e=s.getEnvelope2D(o);d=(0,a.N)(n.total());let t=(0,a.M)(n.total(),e);(0,a.Q)(s,t,n.total(),12e3,y,null,o)}g.setEditShapeCrackAndCluster(s,n);let c=g.intersection(u,l);if(null!==y&&y.stitchCurves(s,-1,d,!0),r=s.getGeometry(c),r.isEmpty())continue;let f=h.getGeometryUserIndex(m[t],e);2===f?x.add(r,!1):1===f?_.add(r,!1):P.push(r)}{let e=new i.E,r=e.addGeometry(p),s=e.addGeometry(h.getGeometry(m[t]));if(e.hasCurves()){let t=e.getEnvelope2D(o);d=(0,a.N)(n.total());let r=(0,a.M)(n.total(),t);(0,a.Q)(e,r,n.total(),12e3,y,null,o)}g.setEditShapeCrackAndCluster(e,n);let u=g.difference(r,s);null!==y&&y.stitchCurves(e,-1,d,!0),p=e.getGeometry(u)}}if(!p.isEmpty()&&m.length>0&&P.push(p),x.isEmpty()&&_.isEmpty())return;if(!x.isEmpty()){let e=l(x,1);s.push(e)}if(!_.isEmpty()){let e=l(_,2);s.push(e)}for(let e=0,t=P.length;e<t;++e){let t=l(P[e],3);s.push(t)}}}(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,n,this.m_progressTracker);for(let i=0;i<n.length;i++){let o=n[i];1===o.m_side?e.add(o.m_geometry,!1):2===o.m_side?t.add(o.m_geometry,!1):3===o.m_side?this.m_cuts.push(o.m_geometry):0===o.m_side?r.add(o.m_geometry,!1):(0,s.d)("")}(0,s.g)(r.isEmpty()||1===n.length),e.isEmpty()&&t.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}}const h=new class{getOperatorType(){return 10005}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,s){return new m(e,t,r,n,s)}};function c(e,t,r){let n=h.execute(!0,e,t,r,null);return Array.from(n)}},91735(e,t,r){r.d(t,{execute:()=>s,f:()=>i}),r(76061);const n=new(r(5247).O);function s(e,t,r,s){return n.execute(e,t,r,s,null)}function i(){return n.supportsCurves()}},49074(e,t,r){r.d(t,{execute:()=>i,f:()=>o}),r(76061),r(55537);var n=r(39117);r(83661),r(88885),r(95213);const s=new n.a3;function i(e,t,r){return s.execute(e,t,r,null)}function o(){return s.supportsCurves()}},70787(e,t,r){r.d(t,{execute:()=>i,z:()=>o});var n=r(76061);const s=new(r(64523).O);function i(e,t,r){return s.execute(e,t,r,null)}function o(e,t,r){let i=s.executeMany(new n.S(e),t,r,null);return Array.from(i)}},24988(e,t,r){r.d(t,{execute:()=>a,load:()=>o,s1:()=>i}),r(76061);var n=r(83290);let s;function i(){return!!s&&(0,n.i)()}async function o(){if(!i()){let[e,t]=await Promise.all([Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(7444)]).then(()=>r(37444)),Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(5756)]).then(()=>r(15756)).then(({injectPe:e})=>e),(0,n.l)()]);s=new e.OperatorGeodesicBuffer,t(n.p)}}function a(e,t,r,n,i){return s.execute(e,t,r,n,i,!1,null)}},86742(e,t,r){r.d(t,{execute:()=>a,f:()=>u,load:()=>o,s:()=>i});var n=r(83290);let s;function i(){return!!s&&(0,n.i)()}async function o(){if(!i()){let[e,t]=await Promise.all([Promise.all([r.e(2024),r.e(6558)]).then(()=>r(6558)),r.e(3375).then(()=>r(15756)).then(({injectPe:e})=>e),(0,n.l)()]);s=new e.OperatorGeodeticArea,t(n.p)}}function a(e,t,r){return s.execute(e,t,r,null)}function u(){return s.supportsCurves()}},77085(e,t,r){r.d(t,{execute:()=>o,load:()=>i}),r(76061);var n=r(83290);let s;async function i(){if(!s||!(0,n.i)()){let[e,t]=await Promise.all([Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(1088)]).then(()=>r(31088)),Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(5756)]).then(()=>r(15756)).then(({injectPe:e})=>e),(0,n.l)()]);s=new e.OperatorGeodeticDensifyByLength,t(n.p)}}function o(e,t,r,n){return s.execute(e,t,r,n,null)}},29716(e,t,r){r.d(t,{execute:()=>a,f:()=>u,load:()=>o,s:()=>i});var n=r(83290);let s;function i(){return!!s&&(0,n.i)()}async function o(){if(!i()){let[e,t]=await Promise.all([Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(2024),r.e(3394)]).then(()=>r(12764)),Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(8344)]).then(()=>r(15756)).then(({injectPe:e})=>e),(0,n.l)()]);s=new e.OperatorGeodeticDistance,t(n.p)}}function a(e,t,r,n){return s.execute(e,t,r,n,null)}function u(){return s.supportsCurves()}},35223(e,t,r){r.d(t,{execute:()=>a,f:()=>u,load:()=>o,s:()=>i});var n=r(83290);let s;function i(){return!!s&&(0,n.i)()}async function o(){if(!i()){let[e,t]=await Promise.all([r.e(8879).then(()=>r(28879)),r.e(3375).then(()=>r(15756)).then(({injectPe:e})=>e),(0,n.l)()]);s=new e.OperatorGeodeticLength,t(n.p)}}function a(e,t,r){return s.execute(e,t,r,null)}function u(){return s.supportsCurves()}},33708(e,t,r){r.r(t),r.d(t,{accelerateGeometry:()=>o,execute:()=>a,executeMany:()=>u,supportsCurves:()=>l});var n=r(76061),s=(r(55537),r(39117));r(88885),r(95213);const i=new s.a4;function o(e,t){return i.accelerateGeometry(e,t,1)}function a(e,t,r){return i.execute(e,t,r,null)}function u(e,t,r,s){let o=i.executeMany(new n.S(e),new n.S([t]),r,null,s);return Array.from(o)}function l(){return i.supportsCurves()}},54945(e,t,r){r.d(t,{execute:()=>g}),r(76061);var n=r(61691),s=r(55537),i=r(95213),o=r(88885),a=r(79187),u=r(83661),l=r(39117),m=r(57694),h=r(88194);class c extends n.G{m_inputGeoms;m_index=-1;m_progressTracker;m_progressCounter=0;progress_(){}tock(){return!0}getRank(){return 1}constructor(e,t){super(),this.m_progressTracker=t,this.m_inputGeoms=e}next(){let e=this.m_inputGeoms.next();return e?((0,s.t)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.labelPoint(e)):null}getGeometryID(){return this.m_index}labelPoint(e){if(null===e&&(0,s.b)("null pointer is not allowed"),e.getGeometryType()===s.G.enumPoint)return e;if(e.isEmpty())return new i.P({vd:e.getDescription()});switch(e.getGeometryType()){case s.G.enumPolygon:return this.labelPointPolygon(e);case s.G.enumPolyline:return this.labelPointPolyline(e);case s.G.enumMultiPoint:return this.labelPointMultiPoint(e);case s.G.enumEnvelope:return this.labelPointEnvelope(e);default:(0,s.b)("geometry is not supported")}}labelPointPolygon(e){let t=new a.Envelope2D;e.queryEnvelope(t);let r=(0,i.c)(null,t,!0).total(),n=null,c=e;if(e.hasNonLinearSegments()){let t=new o.P({copy:e}),i=(0,l.aQ)(t,.25*r,r);(0,s.g)(i!==e),n=i,c=n}let f=0,g=0;for(let e=0,t=c.getPathCount();e<t;++e){let t=Math.abs(c.calculateRingArea2D(e));t>g&&(g=t,f=e)}let d=new u.P;if(Math.abs(g)<=2*r*r?d.setNAN():d.assign((0,m.a)(c,f)),Number.isNaN(d.x)){let e=new a.Envelope2D;return c.queryPathEnvelope(f,e),new i.P({pt:e.getCenter()})}if(c.getPointCount()<4)return new i.P({x:d.x,y:d.y});let y=u.P.getNAN(),p=[y.clone(),y.clone(),y.clone(),y.clone()],x=[NaN,NaN,NaN,NaN],_=[NaN,NaN,NaN,NaN],P=!1,v=(new h.O).getNearestCoordinate(c,d,!0,!1);if(0===v.m_distance&&(P=!0,p[0]=d,v=(new h.O).getNearestCoordinate(c,d,!1,!1),v.m_distance>.25*t.minDimension()*1.66666666))return new i.P({x:d.x,y:d.y});x[0]=v.m_distance,_[0]=0;let G=new u.P,C=!1,M=.25,D=-1,w=new a.Envelope2D;c.queryPathEnvelope(f,w);do{let e=NaN;if(p[1]=this.calculateParacentroid_(c,(0,u.r)(w.xmin,w.xmax,M),r),p[1].isNAN()||(v=(new h.O).getNearestCoordinate(c,p[1],!1,!1),e=v.m_distance),e>r&&1===(0,l.K)(c,p[1],r))C=!0,x[1]=e,_[1]=u.P.sqrDistance(p[1],d);else if(e>D&&(D=e,G.setCoordsPoint2D(p[1])),M-=.01,M<.1){if(!(D>=0))break;C=!0,x[1]=D,p[1]=G,_[1]=u.P.sqrDistance(p[1],d)}}while(!C);C=!1,M=.5,D=-1;let E=.01,b=1;do{let e=NaN;if(p[2]=this.calculateParacentroid_(c,(0,u.r)(w.xmin,w.xmax,M),r),p[2].isNAN()||(v=(new h.O).getNearestCoordinate(c,p[2],!1,!1),e=v.m_distance),e>r&&1===(0,l.K)(c,p[2],r))C=!0,x[2]=e,_[2]=u.P.sqrDistance(p[2],d);else if(e>D&&(D=e,G.setCoordsPoint2D(p[2])),M=.5+E*b,E+=.01,b*=-1,M<.3||M>.7){if(!(D>=0))break;C=!0,x[2]=D,p[2]=G,_[2]=u.P.sqrDistance(p[2],d)}}while(!C);C=!1,M=.75,D=-1;do{let e=NaN;if(p[3]=this.calculateParacentroid_(c,(0,u.r)(w.xmin,w.xmax,M),r),p[3].isNAN()||(v=(new h.O).getNearestCoordinate(c,p[3],!1,!1),e=v.m_distance),e>r&&1===(0,l.K)(c,p[3],r))C=!0,x[3]=e,_[3]=u.P.sqrDistance(p[3],d);else if(e>D&&(D=e,G.setCoordsPoint2D(p[3])),M+=.01,M>.9){if(!(D>=0))break;C=!0,x[3]=D,p[3]=G,_[3]=u.P.sqrDistance(p[3],d)}}while(!C);let S=[0,1,2,3],N=+!P;for(let e=N;e<4;e++)for(let e=N;e<3;e++){let t=_[e],r=_[e+1];if((0,u.t)(t,r)>0){let n=S[e];S[e]=S[e+1],S[e+1]=n,_[e]=r,_[e+1]=t}}let A=N,I=0,T=0;for(let e=N;e<4;e++){switch(e){case 0:T=2*x[S[e]];break;case 1:T=1.66666666*x[S[e]];break;case 2:T=1.33333333*x[S[e]];break;case 3:T=x[S[e]]}T>I&&(I=T,A=S[e])}return(0,s.g)(!p[A].isNAN()),new i.P({x:p[A].x,y:p[A].y})}labelPointPolyline(e){let t=new u.P;if(e.getPointCount()>2*e.getPathCount()){let r=-1,n=-Number.MAX_VALUE;for(let t=0,s=e.getPathCount();t<s;t++)if(e.getPathSize(t)>2){let s=e.calculatePathLength2D(t);s>n&&(n=s,r=t)}let s=e.getPathStart(r),i=e.getPathEnd(r),o=Math.trunc((s+i)/2);t.assign(e.getXY(o))}else{let r=-Number.MAX_VALUE,n=e.querySegmentIterator();for(;n.nextPath();)if(n.hasNextSegment()){let e=n.nextSegment(),s=e.calculateLength2D();s>r&&(r=s,t.assign(e.getCoord2D(e.lengthToT(.5*s))))}}return new i.P({x:t.x,y:t.y})}labelPointMultiPoint(e){let t=new a.Envelope2D;e.queryEnvelope(t);let r=t.getCenter(),n=(new h.O).getNearestCoordinate(e,r,!1,!1).m_coordinate;return new i.P({x:n.x,y:n.y})}labelPointEnvelope(e){let t=e.getCenterXY();return new i.P({x:t.x,y:t.y})}calculateParacentroid_(e,t,r){let n=new a.Envelope2D;e.queryEnvelope(n);let i=new u.P(t,0),l=Number.MAX_VALUE,m=Number.MAX_VALUE,h=!1,c=!1,f=new o.L;f.setStartXYCoords(i.x,n.ymin-1),f.setEndXYCoords(i.x,n.ymax+1);let g=new a.Envelope2D,d=new u.P,y=new u.P,p=(0,u.d)(u.P,2),x=e.querySegmentIterator();for(;x.nextPath();)for(;x.hasNextSegment();){let e=x.nextSegment();if(e.queryEnvelope(g),(0,s.g)(e.isMonotoneQuickAndDirty()),d.setCoordsPoint2D(f.getStartXY()),y.setCoordsPoint2D(f.getEndXY()),0===g.clipLine(d,y)||1!==f.intersect(e,p,null,null,r))continue;let t=p[0].y;l>m?t<l&&(l=t,h=!0):t<m&&(m=t,c=!0)}return h&&c?i.y=(l+m)/2:i.setNAN(),i}}const f=new class{getOperatorType(){return 10203}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t){return new c(e,t)}execute(e,t){return new c(null,t).labelPoint(e)}};function g(e){return f.execute(e,null)}},33193(e,t,r){r.d(t,{executeMany:()=>c});var n=r(76061),s=r(61691),i=r(88885),o=r(55537),a=r(79187),u=r(95213),l=r(39117);class m extends s.G{m_inputGeoms;m_spatialReference;m_progressTracker;m_currentGeometry;m_singlePartIndex;m_singlePartCount;m_polygonStart;m_index;m_options;constructor(e,t,r,n){super(),this.m_progressTracker=r,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_currentGeometry=null,this.m_singlePartIndex=-1,this.m_singlePartCount=-1,this.m_polygonStart=-1,this.m_index=-1,this.m_options=n}tock(){return!0}getRank(){return 1}next(){if(this.m_singlePartIndex===this.m_singlePartCount){let e=this.m_inputGeoms.next();if(null===e)return null;if((0,o.t)(e),e.getGeometryType()===o.G.enumPolygon)if(1===this.m_options)this.m_currentGeometry=(new l.J).execute(e,this.m_spatialReference,!1,this.m_progressTracker);else if(2===this.m_options)if(e.getPathCount()<2)this.m_currentGeometry=e;else{let t=e.getImpl().getIsSimple(0,[0]);if((0,u.i)(t))this.m_currentGeometry=e;else{let t=new i.E,r=t.addGeometry(e),n=null;if(t.hasCurves()){n=new l.U;let r=new a.Envelope2D;e.queryEnvelope(r);let s=(0,u.e)(null,e,!0),i=(0,l.M)(s.total(),r);(0,l.a8)(t,i,s.total(),12e3,null,n,null,this.m_progressTracker)}let s=t.createPathUserIndex();{let e=0;for(let n=t.getFirstPath(r);-1!==n;n=t.getNextPath(n))t.setPathUserIndex(n,s,e++)}let m=(0,l.a9)(t,r,this.m_progressTracker);(0,o.g)(m>=0);let h=[];for(let e=t.getFirstPath(r);-1!==e;e=t.getNextPath(e))h.push(e);h.sort((e,r)=>Math.abs(t.getPathUserIndex(e,m))-Math.abs(t.getPathUserIndex(r,m)));let c=e,f=new i.P({vd:e.getDescription()});f.reserveParts(c.getPointCount(),c.getPathCount());for(let e=0,r=h.length;e<r;e++){let r=h[e],n=t.getPathUserIndex(r,s),i=c.calculateRingArea2D(n)>0,o=t.getPathUserIndex(r,m)>=0;f.addPath(c,n,i===o)}this.m_currentGeometry=f}}else(0,o.b)("");else this.m_currentGeometry=e;this.m_singlePartCount=function(e){return e.isEmpty()?1:(0,l.aa)(e)}(this.m_currentGeometry),this.m_singlePartIndex=0,this.m_polygonStart=0,this.m_index=this.m_inputGeoms.getGeometryID()}let e=this.getSingleGeometry(this.m_singlePartIndex,this.m_singlePartCount,this.m_polygonStart,this.m_currentGeometry);return e.getGeometryType()===o.G.enumPolygon&&(this.m_polygonStart+=e.getPathCount()),this.m_singlePartIndex++,e}getGeometryID(){return this.m_index}getSingleGeometry(e,t,r,n){let s=null;switch(n.getGeometryType()){case o.G.enumMultiPoint:s=new u.P({vd:n.getDescription()}),n.isEmpty()||n.getPointByVal(e,s);break;case o.G.enumPolyline:if(1===t)s=n;else{s=n.createInstance(),s.getImpl().addPath(n.getImpl(),e,!0);let t=[0],r=n.getImpl().getIsSimple(0,t);s.getImpl().setIsSimple(r,t[0],!0)}break;case o.G.enumPolygon:if(1===t)s=n;else{s=n.createInstance();let e=s.getImpl(),t=n.getImpl(),i=t.getPathFlagsStreamRef(),o=r,a=t.getPathCount();do{e.addPath(t,o,!0),o++}while(o<a&&!(8&i.read(o)));e.getPathFlagsStreamRef().setBits(0,8);let u=[0],l=t.getIsSimple(0,u);e.setIsSimple(l,u[0],!0)}break;default:s=n}return s}}const h=new class{getOperatorType(){return 10700}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t,r,n=1){return new m(e,t,r,n)}};function c(e,t,r){let s=h.executeMany(new n.S(e),t,null,r);return Array.from(s)}},66070(e,t,r){r.d(t,{execute:()=>x,z:()=>_});var n=r(76061),s=r(61691),i=r(95213),o=r(55537),a=r(88885),u=r(83661),l=r(86870),m=r(68375);const h=1.4142135623730951,c=.017453292519943295,f=1024;class g{x;y;m_next;m_prev;z;m;type;static construct(e,t,r){let n=new g;return n.x=e.x,n.y=e.y,n.m_next=-1,n.m_prev=-1,n.z=t,n.m=r,n.type=0,n}clone(){let e=new g;return e.x=this.x,e.y=this.y,e.m_next=this.m_next,e.m_prev=this.m_prev,e.z=this.z,e.m=this.m,e.type=this.type,e}asPoint2D(){return new u.P(this.x,this.y)}}class d{m_progressTracker;m_inputGeometry;m_distance=-1;m_tolerance=-1;m_miterLimit=10;m_joins=0;m_progressCounter=0;m_options=0;m_bUseZ=!1;m_bUseM=!1;m_srcPts=[];m_srcPtCount=0;m_offsetPts=[];m_offsetPtCount=0;m_resultPath;m_a1=0;m_a2=0;constructor(e){this.m_progressTracker=e}constructOffset(){let e=this.m_inputGeometry.getGeometryType();if(e===o.G.enumLine)return this.offsetLine();if(e===o.G.enumEnvelope)return this.offsetEnvelope();if((0,o.h)(e)){let e=new a.a;return e.addSegment(this.m_inputGeometry,!0),this.m_inputGeometry=e,this.constructOffset()}if(e===o.G.enumPolyline){let e=new a.a;return this.offsetMultiPath(e),e}if(e===o.G.enumPolygon){if(1===this.m_options){let e;switch(this.m_joins){case 1:case 3:e=2;break;case 2:e=1;break;case 0:e=0;break;default:(0,o.g)(!1,"Invalid join type")}return(new m.O).executeMany(new n.S([this.m_inputGeometry]),null,[-1],e,1,this.m_miterLimit,this.m_tolerance,360,!1,0,null).next()}let e=new a.P;return this.offsetMultiPath(e),e}(0,o.a)("")}offsetLine(){let e=this.m_inputGeometry,t=e.getStartXY(),r=e.getEndXY(),n=new u.P;n.setSub(r,t),n.normalize(),n.leftPerpendicularThis(),n.scale(this.m_distance),t.addThis(n),r.addThis(n);let s=e.clone();return s.setStartXY(t),s.setEndXY(r),s}offsetEnvelope(){let e=this.m_inputGeometry;if(this.m_distance>0&&2!==this.m_joins){let t=new a.P;return t.addEnvelope(e,!1),this.m_inputGeometry=t,this.constructOffset()}let t=e.clone();return t.inflateCoords(this.m_distance,this.m_distance),t}progress(){}static buildPoint(e,t,r,n){n.x=e.x+t*Math.cos(r),n.y=e.y+t*Math.sin(r),n.type=e.type,n.z=e.z,n.m=e.m,n.m_next=-1,n.m_prev=-1}addPoint(e){this.m_offsetPts.push(e.clone()),this.m_offsetPtCount++}addPointEx(e,t){if(0===this.m_offsetPtCount)return void this.addPoint(e);let r=this.m_srcPtCount,n=this.m_srcPts[0===t?r-1:t-1],s=this.m_srcPts[t],i=d.dotSign(n,s,this.m_offsetPts[this.m_offsetPtCount-1],e);if(i>0)this.addPoint(e);else if(i<0)if(d.dotSign(n,s,s,this.m_offsetPts[this.m_offsetPtCount-1])>0){let s,i=new g;s=0===t?r-2:1===t?r-1:t-2;let o=this.m_srcPts[s],a=Math.atan2(n.y-o.y,n.x-o.x);if(d.buildPoint(n,this.m_distance,a-u.l,i),this.m_offsetPts[this.m_offsetPtCount-1]=i.clone(),1===this.m_joins||2===this.m_joins){i.x=.5*(i.x+n.x),i.y=.5*(i.y+n.y),this.addPoint(i),d.buildPoint(n,this.m_distance,this.m_a1+u.l,i);let e=i.clone();e.x=.5*(e.x+n.x),e.y=.5*(e.y+n.y),e.type|=256,this.addPoint(e),this.addPoint(i)}else d.buildPoint(n,this.m_distance,this.m_a1+u.l,i),i.type|=256,this.addPoint(i);this.addPointEx(e,t)}else{let e=new g;if(d.buildPoint(s,this.m_distance,this.m_a1+u.l,e),this.addPoint(e),1===this.m_joins||2===this.m_joins){e.x=.5*(e.x+s.x),e.y=.5*(e.y+s.y),this.addPoint(e),d.buildPoint(s,this.m_distance,this.m_a2-u.l,e);let t=e.clone();t.x=.5*(t.x+s.x),t.y=.5*(t.y+s.y),t.type|=256,this.addPoint(t),this.addPoint(e)}else d.buildPoint(s,this.m_distance,this.m_a2-u.l,e),e.type|=256,this.addPoint(e)}}buildOffset(){let e=new g,t=this.m_srcPtCount;this.m_offsetPtCount=0;let r=.5*this.m_tolerance,n=0,s=0;for(let i=0;i<t;i++){let o,a,l=this.m_srcPts[i],m=0===i?this.m_srcPts[t-1]:this.m_srcPts[i-1],g=i===t-1?this.m_srcPts[0]:this.m_srcPts[i+1],y=0;{let e=m.x-l.x,t=m.y-l.y,r=g.x-l.x,h=g.y-l.y;o=Math.atan2(t,e),a=Math.atan2(h,r),this.m_a1=o,this.m_a2=a,0===i&&(n=o,s=a),y=u.P.orientationRobust(l.asPoint2D(),m.asPoint2D(),g.asPoint2D())}let p=a;a<o&&(a+=u.n);let x=Math.abs(Math.abs(o-a)-Math.PI)<1e-8;if(x||y*this.m_distance>0)if(x||1!==this.m_joins&&2!==this.m_joins){let t=.5*(a-o),r=0===t?this.m_distance:this.m_distance/Math.abs(Math.sin(t));d.buildPoint(l,r,.5*(o+a),e),this.addPointEx(e,i)}else{d.buildPoint(l,this.m_distance,o+u.l,e),this.addPoint(e);let t=.001;e.x=l.x+(e.x-l.x)*t,e.y=l.y+(e.y-l.y)*t,this.addPoint(e),d.buildPoint(l,this.m_distance,a-u.l,e);let r=e.clone();r.x=l.x+(r.x-l.x)*t,r.y=l.y+(r.y-l.y)*t,r.type|=256,this.addPoint(r),this.addPoint(e)}else if(512&l.type){let t=1-r/Math.abs(this.m_distance),n=1,s=this.m_distance<0?-Math.PI:Math.PI;if(t>-1&&t<1){let e=2*Math.acos(t);e<c&&(e=c),n=Math.trunc(Math.PI/e+1.5),n>1&&(s/=n)}n<=1&&(n=2,s/=2);let m=o+u.l;d.buildPoint(l,this.m_distance,m,e),0===i&&(e.type|=f),this.addPointEx(e,i);let h=this.m_distance/Math.cos(s/2);for(m+=s/2,d.buildPoint(l,h,m,e),e.type|=f,this.addPoint(e);--n>0;)m+=s,d.buildPoint(l,h,m,e),e.type|=f,this.addPoint(e);d.buildPoint(l,this.m_distance,a-u.l,e),e.type|=f,this.addPoint(e)}else if(1===this.m_joins)d.buildPoint(l,this.m_distance,o+u.l,e),this.addPointEx(e,i),d.buildPoint(l,this.m_distance,a-u.l,e),this.addPoint(e);else if(0===this.m_joins){let t=1-r/Math.abs(this.m_distance),n=1,s=a-u.l-(o+u.l);if(t>-1&&t<1){let e=2*Math.acos(t);e<c&&(e=c),n=Math.trunc(Math.abs(s)/e+1.5),n>1&&(s/=n)}let m=this.m_distance/Math.cos(.5*s),h=o+u.l+.5*s;for(d.buildPoint(l,m,h,e),this.addPointEx(e,i);--n>0;)h+=s,d.buildPoint(l,m,h,e),this.addPoint(e)}else if(2===this.m_joins){let t=m.x-l.x,r=m.y-l.y,n=g.x-l.x,s=g.y-l.y,c=(t*n+r*s)/Math.sqrt(t*t+r*r)/Math.sqrt(n*n+s*s);if(c=Math.max(c,-1),c>1-1e-8){d.buildPoint(l,h*this.m_distance,a-.25*Math.PI,e),this.addPointEx(e,i),d.buildPoint(l,h*this.m_distance,a+.25*Math.PI,e),this.addPoint(e);continue}let f=Math.abs(this.m_distance/Math.sin(.5*Math.acos(c))),y=Math.abs(this.m_miterLimit*this.m_distance);if(f>y){let t=.5*(a-o),r=this.m_distance/Math.abs(Math.sin(t));d.buildPoint(l,r,.5*(o+a),e);let n=u.P.construct(e.x,e.y),s=u.P.construct(l.x,l.y),m=new u.P;m.setSub(n,s);let h=new u.P;h.setScaleAdd(y/m.length(),m,s);let c=Math.sqrt(f*f-this.m_distance*this.m_distance),g=(f-y)*Math.abs(this.m_distance)/c;this.m_distance>0?m.rightPerpendicularThis():m.leftPerpendicularThis(),m.scale(g/m.length());let p=new u.P;p.setAdd(h,m);let x=new u.P;x.setSub(h,m),e.x=p.x,e.y=p.y,this.addPointEx(e,i),e.x=x.x,e.y=x.y,this.addPoint(e);continue}let p=.5*(a-o),x=this.m_distance/Math.abs(Math.sin(p));d.buildPoint(l,x,.5*(o+a),e),this.addPointEx(e,i)}else{let t;if(a=p,this.m_distance>0?(a>o&&(a-=u.n),t=o-a<u.l):(a<o&&(a+=u.n),t=a-o<u.l),t){let t,r=this.m_distance*h;t=r<0?o+.25*Math.PI:o+3*Math.PI*.25,d.buildPoint(l,r,t,e),this.addPointEx(e,i),t=r<0?a-.25*Math.PI:a-3*Math.PI*.25,d.buildPoint(l,r,t,e),this.addPoint(e)}else{let t=.5*(a-o),r=this.m_distance/Math.abs(Math.sin(t));a<o&&(a+=u.n),d.buildPoint(l,r,(o+a)/2,e),this.addPointEx(e,i)}}}return this.m_a1=n,this.m_a2=s,this.addPointEx(this.m_offsetPts[0],0),this.m_offsetPts[0]=this.m_offsetPts[this.m_offsetPtCount-1].clone(),this.removeBadSegsFast()}removeBadSegsFast(){for(let e=0;e<this.m_offsetPtCount;e++){let t=this.m_offsetPts[e];t.m_next=e+1,t.m_prev=e-1}this.m_offsetPts[0].m_prev=this.m_offsetPtCount-2,this.m_offsetPts[this.m_offsetPtCount-2].m_next=0;let e=this.m_offsetPtCount,t=0;for(let r=0;r<e;r++)if(256&this.m_offsetPts[t].type){let r=this.m_offsetPts[t].m_next,n=this.deleteClosedSeg(t);if(-1===n){(0,o.g)(this.m_offsetPts[t].m_next===r);break}if(t>n){t=n,e=0;do{e++,t=this.m_offsetPts[t].m_next}while(t!==n)}t=n}else t=this.m_offsetPts[t].m_next;return this.compressOffsetArray(t),!0}deleteClosedSeg(e){let t=this.m_offsetPtCount-1,r=e;for(let n=1;n<=t-2&&(r=this.m_offsetPts[r].m_next,e!==r);n++){let t=r,s=e;for(let i=1;i<=n&&(s=this.m_offsetPts[s].m_prev,s!==e);i++){if(!(256&this.m_offsetPts[s].type||256&this.m_offsetPts[t].type)){let e=this.handleClosedIntersection(s,t);if(-1!==e)return e}if(t=this.m_offsetPts[t].m_prev,t===r)break}}return-1}handleClosedIntersection(e,t){let r=this.m_offsetPts[this.m_offsetPts[e].m_prev],n=this.m_offsetPts[e],s=this.m_offsetPts[this.m_offsetPts[t].m_prev],i=this.m_offsetPts[t];if(!this.sectGraphicRect(r,n,s,i))return-1;if(u.P.orientationRobustEx(r.asPoint2D(),n.asPoint2D(),s.asPoint2D(),i.asPoint2D())*this.m_distance<0){let o=this.findIntersection(r,n,s,i),a=!1;if(o[0]>=0){let l={pt:new g,bAtExistingPt:!1};if(o[0]>=0&&o[0]<=1&&(l.pt.x=(0,u.r)(r.x,n.x,o[0]),l.pt.y=(0,u.r)(r.y,n.y,o[0]),this.m_bUseZ&&(l.pt.z=(0,u.r)(s.z,i.z,o[1])),this.m_bUseM&&(l.pt.m=(0,u.r)(s.m,i.m,o[1])),0!==o[1]&&1!==o[1]||0!==o[0]&&1!==o[0]||(l.bAtExistingPt=!0),a=!((0===o[1]||1===o[1])&&o[0]>0&&o[0]<1||(0===o[0]||1===o[0])&&o[1]>0&&o[1]<1)),a&&!l.bAtExistingPt){let r=!1,i=l.pt.asPoint2D(),o=s.asPoint2D(),a=l.pt.asPoint2D(),m=this.m_offsetPts[e].m_prev;for(;;){if(u.P.getClosestCoordinate(o,a,i,!1)<1e-8){r=!1;break}if((a.y>i.y&&o.y<=i.y||a.y<i.y&&a.y<=i.y)&&u.P.orientationRobustEx(a,i,a,o)<0&&(r=!r),o.x=a.x,o.y=a.y,m=this.m_offsetPts[m].m_next,m===t)break;a.x=this.m_offsetPts[m].x,a.y=this.m_offsetPts[m].y}if(r)return-1;let h=this.m_offsetPts[e].m_prev;return l.pt.type=n.type,l.pt.m_next=t,l.pt.m_prev=h,this.m_offsetPts[e]=l.pt,this.m_offsetPts[t].m_prev=e,t}}}return-1}sectGraphicRect(e,t,r,n){return Math.max(e.x,t.x)>=Math.min(r.x,n.x)&&Math.max(r.x,n.x)>=Math.min(e.x,t.x)&&Math.max(e.y,t.y)>=Math.min(r.y,n.y)&&Math.max(r.y,n.y)>=Math.min(e.y,t.y)}findIntersection(e,t,r,n){let[s,i,o,u]=[e,t,r,n].map(e=>e.asPoint2D());if(s.equals(o))return[0,0];if(s.equals(u))return[0,1];if(i.equals(o))return[1,0];if(i.equals(u))return[1,1];let l=[];return 1===a.L.segmentIntersectRobust(s,i,o,u,1e-15,l)?l:[-1,-1]}compressOffsetArray(e){for(;this.m_offsetPts[e].m_prev<e;)e=this.m_offsetPts[e].m_prev;let t=0,r=e;do{let e=this.m_offsetPts[r].clone();this.m_offsetPts[t]=e,r=e.m_next,t++}while(r!==e);this.m_offsetPts[t]=this.m_offsetPts[0].clone(),this.m_offsetPtCount=t+1}addPart(e,t,r){if(!(t<2)){for(let r=0;r<t;r++){let t=this.m_offsetPts[e+r];if(r?this.m_bUseZ?this.m_resultPath.lineTo3DCoords(t.x,t.y,t.z):this.m_resultPath.lineToCoords(t.x,t.y):this.m_bUseZ?this.m_resultPath.startPath3DCoords(t.x,t.y,t.z):this.m_resultPath.startPathCoords(t.x,t.y),this.m_bUseM){let e=this.m_resultPath.getPointCount()-1;this.m_resultPath.setAttribute(2,e,0,t.m)}}r&&this.m_resultPath.closePathWithLine()}}offsetMultiPath(e){let t=(0,a.d)(this.m_inputGeometry,0,this.m_tolerance,0,this.m_progressTracker,12e3),r=t.querySegmentIterator();r.resetToFirstPath();let n=-1;for(;r.nextPath();)n++,this.offsetPath(t,n,e)}offsetPath(e,t,r){let n=e.getPathStart(t),s=e.getPathEnd(t);if(this.m_resultPath=r,e.isClosedPath(t)){let t=e.getXY(n);for(;s>n&&e.getXY(s-1).equals(t);)s--;if(s-n>=2){this.m_srcPtCount=s-n,this.m_srcPts.length=this.m_srcPtCount;for(let t=n;t<s;t++)this.progress(),this.m_srcPts[t-n]=g.construct(e.getXY(t),this.m_bUseZ?e.getAttributeAsDbl(1,t,0):0,this.m_bUseM?e.getAttributeAsDbl(2,t,0):0);this.buildOffset()&&this.addPart(0,this.m_offsetPtCount-1,!0)}}else{let t=e.getXY(n);for(;n<s-1&&e.getXY(n+1).equals(t);)n++;let r=e.getXY(s-1);for(;n<s-1&&e.getXY(s-2).equals(r);)s--;if(s-n>=2){this.m_srcPtCount=2*(s-n)-2,this.m_srcPts.length=this.m_srcPtCount;let r=g.construct(t,this.m_bUseZ?e.getAttributeAsDbl(1,n,0):0,this.m_bUseM?e.getAttributeAsDbl(2,n,0):0);r.type|=1536,this.m_srcPts[0]=r;let i=1,o=this.m_srcPtCount-1;for(let t=n+1;t<s-1;t++,i++,o--)this.progress(),r=g.construct(e.getXY(t),this.m_bUseZ?e.getAttributeAsDbl(1,t,0):0,this.m_bUseM?e.getAttributeAsDbl(2,t,0):0),this.m_srcPts[i]=r.clone(),r.type|=f,this.m_srcPts[o]=r.clone();if(r=g.construct(e.getXY(s-1),this.m_bUseZ?e.getAttributeAsDbl(1,s-1,0):0,this.m_bUseM?e.getAttributeAsDbl(2,s-1,0):0),r.type|=512,this.m_srcPts[i]=r.clone(),this.buildOffset())if(this.m_offsetPts.length>=2){let e=-1,t=-1,r=!!(this.m_offsetPts[this.m_offsetPtCount-1].type&f);r||(e=0);for(let n=1;n<this.m_offsetPtCount;n++){this.progress();let s=!!(this.m_offsetPts[n].type&f);s?r||(t=n-1,t-e+1>1&&this.addPart(e,t-e+1,!1)):r&&(e=n-1),r=s}r||(t=this.m_offsetPtCount-1,t-e+1>1&&this.addPart(e,t-e+1,!1))}else{let e=this.m_offsetPtCount-1;e-0>=1&&this.addPart(0,e-0+1,!1)}}}this.m_srcPts.length=0,this.m_srcPtCount=0,this.m_offsetPts.length=0,this.m_offsetPtCount=0}static dotSign(e,t,r,n){let s=t.x-e.x,i=t.y-e.y,o=n.x-r.x,a=n.y-r.y,l=(0,u.u)(s,i,o,a);return(0,u.h)(l)}}class y extends s.G{m_inputGeoms;m_spatialReference;m_progressTracker;m_distance;m_miterLimit;m_joins;m_flattenError;m_index;m_options;constructor(e,t,r,n,s,i,o,a){super(),this.m_progressTracker=o,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distance=r,this.m_joins=n,this.m_miterLimit=s,this.m_flattenError=i,this.m_options=a}tock(){return!0}getRank(){return 1}next(){if(!this.m_inputGeoms)return null;let e;for(;e=this.m_inputGeoms.next();)return this.m_index=this.m_inputGeoms.getGeometryID(),this.offset(e);return null}getGeometryID(){return this.m_index}offset(e){let t;return(0,o.t)(e),t=this.m_flattenError<=0?(0,i.e)(this.m_spatialReference,e,!0).total():this.m_flattenError,function(e,t,r,n,s,i,a){if(null===e&&(0,o.b)(""),e.getDimension()<1&&(0,o.b)(""),s>0||(0,o.b)(""),(0,o.t)(e),0===t||e.isEmpty())return e;let u=new d(a);return u.m_bUseZ=e.hasAttribute(1),u.m_bUseM=e.hasAttribute(2),u.m_inputGeometry=e,u.m_distance=t,u.m_tolerance=s,u.m_joins=r,u.m_miterLimit=n>1?n:1,u.m_miterLimit=(0,l.s)(u.m_miterLimit),u.m_progressCounter=0,u.m_options=i,u.constructOffset()}(e,this.m_distance,this.m_joins,this.m_miterLimit,t,this.m_options,this.m_progressTracker)}}const p=new class{getOperatorType(){return 10108}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t,r,n,s,i,o,a=0){return new y(e,t,r,n,s,i,o,a)}execute(e,t,r,n,s,i,o,a=0){return new y(null,t,r,n,s,i,o,a).offset(e)}};function x(e,t,r,n,s,i){return p.execute(e,t,r,n,s,i,null)}function _(e,t,r,s,i,o){let a=p.executeMany(new n.S(e),t,r,s,i,o,null);return Array.from(a)}},81150(e,t,r){r.d(t,{execute:()=>o,f:()=>l,isSimpleAsFeature:()=>u,z:()=>a});var n=r(76061),s=(r(55537),r(88885),r(39117));r(95213);const i=new s.J;function o(e,t,r){return i.execute(e,t,r,null)}function a(e,t,r){let s=i.executeMany(new n.S(e),t,r,null);return Array.from(s)}function u(e,t,r){return i.isSimpleAsFeature(e,t,r,null,null)}function l(){return i.supportsCurves()}},68613(e,t,r){r.d(t,{execute:()=>g});var n=r(76061),s=r(61691),i=r(55537),o=r(83661),a=r(88885),u=r(79187),l=r(95213),m=r(39117);function h(e,t,r,n){let s=e.getImpl().getAttributeStreamRef(0),i=e.getPointCount(),a=t.getXY(),m=e.createInstance(),h=(0,l.f)(r),c=new u.Envelope2D;if(e.queryEnvelope(c),c.inflateCoords(h,h),c.contains(a)){let r=h*h,n=!1,u=(0,o.c)(i,!1);for(let e=0;e<i;e++){let t=s.read(2*e),i=s.read(2*e+1),o=t-a.x,l=i-a.y;o*o+l*l<=r&&(n=!0,u[e]=!0)}if(n)for(let t=0;t<i;t++)u[t]||m.addPoints(e,t,t+1);else m.addPoints(e,0,i),m.add(t)}else m.addPoints(e,0,i),m.add(t);return m}class c extends s.G{m_inputGeoms;m_progressTracker;m_spatialReference;m_rightGeom;m_index;m_bEmpty;constructor(e,t,r,n){super(),this.m_progressTracker=n,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=r,this.m_rightGeom=t.next(),this.m_bEmpty=!this.m_rightGeom,(0,i.t)(this.m_rightGeom)}tock(){return!0}getRank(){return 1}next(){if(this.m_bEmpty)return null;let e=this.m_inputGeoms.next();return e?((0,i.t)(e),this.m_index=this.m_inputGeoms.getGeometryID(),function(e,t,r,n){let s=e.getDimension(),c=t.getDimension();if(s!==c)return s>c?e:t;if(e.isEmpty())return t;if(t.isEmpty())return e;let f=new u.Envelope2D,g=new u.Envelope2D,d=new u.Envelope2D;e.queryEnvelope(f),t.queryEnvelope(g),d.setCoords({env2D:f}),d.mergeEnvelope2D(g);let y=(0,l.c)(r,d,!0),p=e.getGeometryType(),x=t.getGeometryType();return p===i.G.enumPoint&&x===i.G.enumPoint?function(e,t,r){let n=(0,l.f)(r),s=n*n,i=e.getXY(),u=t.getXY(),m=new a.M({vd:e.getDescription()});return o.P.sqrDistance(i,u)>s&&(m.add(e),m.add(t)),m}(e,t,y):p===i.G.enumPoint&&x===i.G.enumMultiPoint?h(t,e,y):p===i.G.enumMultiPoint&&x===i.G.enumPoint?h(e,t,y):(0,m.aR)(e,t,r,n)}(e,this.m_rightGeom,this.m_spatialReference,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}const f=new class{getOperatorType(){return 10003}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n){return new c(e,t,r,n)}execute(e,t,r,s){let o=new n.S([e]),a=new n.S([t]),u=this.executeMany(o,a,r,s).next();return u||(0,i.d)("null output"),u}};function g(e,t,r){return f.execute(e,t,r,null)}},28298(e,t,r){r.d(t,{executeMany:()=>o});var n=r(76061),s=(r(55537),r(83661),r(88885),r(39117));r(95213);const i=new s.a5;function o(e,t){return i.executeMany(new n.S(e),t,null).next()}},78125(e,t,r){r.r(t),r.d(t,{fromExtent:()=>y,fromGeometry:()=>d,fromMultipoint:()=>p,fromPoint:()=>x,fromPolygon:()=>_,fromPolyline:()=>P,fromPolylineUsingImportOperator:()=>v,fromSpatialReference:()=>G,getSpatialReference:()=>g,toExtent:()=>M,toGeometry:()=>C,toMultipoint:()=>D,toPoint:()=>w,toPolygon:()=>E,toPolyline:()=>b});var n=r(83661),s=r(55537),i=r(95213),o=r(88885),a=r(5443),u=r(48526),l=r(86738),m=r(39829),h=r(82799),c=(r(90293),r(83299));const f="_gxVersion";function g(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function d(e){switch(e.type){case"point":return x(e);case"multipoint":return p(e);case"polyline":return P(e);case"polygon":return _(e);case"extent":return y(e);default:throw Error(`Unsupported geometry type: ${e.type}`)}}function y(e){if(!e.getCacheValue(f)){let t=new i.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function p(e){if(!e.getCacheValue(f)){let t=new o.M,r=new i.P,n=e.points,s=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,i=n.length;e<i;e++){let i=n[e];r.setXYCoords(i[0],i[1]),a&&r.setZ(i[2]??0),s&&r.setM(i[u]??NaN),t.add(r)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function x(e){if(!e.getCacheValue(f)){let t=new i.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function _(e){if(!e.getCacheValue(f)){let{curveRings:t,hasM:r,hasZ:n,rings:s}=e,i=(0,c.fromGeometryToGXGeometry)({curveRings:t,hasM:r,hasZ:n,rings:s});e.setCacheValue(f,i)}return e.getCacheValue(f)}function P(e){if(!e.getCacheValue(f)){let{curvePaths:t,hasM:r,hasZ:n,paths:s}=e,i=(0,c.fromGeometryToGXGeometry)({curvePaths:t,hasM:r,hasZ:n,paths:s});e.setCacheValue(f,i)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){let{curvePaths:t,hasM:r,hasZ:n,paths:s}=e,i=(0,c.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:r,hasZ:n,paths:s});e.setCacheValue(f,i)}return e.getCacheValue(f)}function G(e){return e.cache?(e.cache[f]??=(0,c.fromSpatialReference)(e),e.cache[f]):(0,c.fromSpatialReference)(e)}function C(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return w(e,t);case s.G.enumEnvelope:return M(e,t);case s.G.enumMultiPoint:return D(e,t);case s.G.enumPolyline:return b(e,t);case s.G.enumPolygon:return E(e,t)}return null}function M(e,t){if(e.isEmpty())return null;let r=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){let t=e.queryInterval(2,0);r.mmin=t.vmin,r.mmax=t.vmax}if(n.hasZ()){let t=e.queryInterval(1,0);r.zmin=t.vmin,r.zmax=t.vmax}return r.setCacheValue(f,e),r}function D(e,t){if(e.isEmpty())return null;let r=e.getDescription(),n=r.hasM(),s=r.hasZ(),o=[],a=new i.P;for(let t=0,r=e.getPointCount();t<r;t++){e.getPointByVal(t,a);let r=[a.getX(),a.getY()];s&&r.push(a.getZ()),n&&r.push(a.getM()),o.push(r)}let l=new u.A({hasM:n,hasZ:s,points:o,spatialReference:t});return l.setCacheValue(f,e),l}function w(e,t){if(e instanceof n.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;let r=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(r.m=e.getM()),s.hasZ()&&(r.z=e.getZ()),r.setCacheValue(f,e),r}function E(e,t){if(e.isEmpty())return null;let r=m.A.fromJSON({...(0,c.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(f,e),r}function b(e,t){if(e.isEmpty())return null;let r=h.A.fromJSON({...(0,c.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(f,e),r}},92722(e,t,r){r.d(t,{A:()=>s});var n=r(69397);class s{constructor(e=[],t=[],r=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:n}){return new s(e,t,r||!1,n||!1)}static fromRect([e,t,r,n]){let i=r-e,o=n-t;return new s([5],[e,t,i,0,0,o,-i,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((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:n}=this,s=this.coords[n*t],i=this.coords[n*t+1];for(let o=1;o<r;o+=1){let r=n*(t+o),a=this.coords[r],u=this.coords[r+1];e+=-.5*(a-s)*(u+i),s=a,i=u}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let n of this.lengths){for(let s=0;s<n;s++){let n=r*(t+s);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,n=0,{stride:s}=this;for(let e of r){for(let r=1;r<e;r++){let e=s*(n+r);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}n+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:n}=this,i=this.coords.slice(0,n*r);return e?(e.set(i),new s(t,e,this.hasZ,this.hasM)):new s(t,Array.from(i),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,n=0;t<r.length;t+=e)r[n++]=this.coords[t],r[n++]=this.coords[t+1];return new s(this.lengths,r,!1,!1)}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1484],{66344(t,e,i){i.d(e,{q:()=>o});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(t=10485760,e=.3){this._maxSize=t,this._maxClientSizeRatio=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(t){this._clients.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._clients.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(t,e){return this._db.get(t.id+e)?.size??0}put(t,e,i,s,a){e=t.id+e;let o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==i&&this._notifyRemove(e,o.entry,o.size,0)),s>this._maxSize)return void this._notifyRemove(e,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${e}`),void this._notifyRemove(e,i,0,0);let u=1+Math.max(a,-4)- -3;this._db.set(e,new n(i,s,u)),this._size+=s,t.size+=s,this._checkSize()}updateSize(t,e){e=t.id+e;let i=this._db.get(e);if(!i)return;this._size-=i.size,t.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){let t=this._notifyRemove(e,i.entry,r,1);if(!(null!=t&&t>0))return void this._db.delete(e);r=t}i.size=r,this._size+=r,t.size+=r,this._checkSize()}pop(t,e){e=t.id+e;let i=this._db.get(e);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(e),++this._hit,i.entry;++this._miss}get(t,e){e=t.id+e;let i=this._db.get(e);if(void 0!==i)return this._db.delete(e),i.lives=i.lifetime,this._db.set(e,i),++this._hit,i.entry;++this._miss}peek(t,e){let i=this._db.get(t.id+e);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},i=[];this._db.forEach((t,r)=>{let s=t.lifetime;i[s]=(i[s]||0)+t.size,this._clients.forEach(i=>{let{id:s,name:n}=i;if(r.startsWith(s)){let i=e[n]||0;e[n]=i+t.size}})});let r={};this._clients.forEach(t=>{let i=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){let s=e[i]||0;e[i]=s,r[i]=Math.round(100*t.hitRate)+"%"}else r[i]="0%"});let s=Object.keys(e);s.sort((t,i)=>e[i]-e[t]),s.forEach(i=>t[i]=Math.round(e[i]/2**20)+"MB / "+r[i]);for(let e=i.length-1;e>=0;--e){let r=i[e];r&&(t["Priority "+(e+-3-1)]=Math.round(r/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._clients.forEach(t=>t.resetHitRate())}clear(t){let e=t.id;this._db.forEach((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,0)),this._clients.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(let[e,i]of this._db)e.startsWith(t.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,i,r){let s=this._clients.get(t.split(a)[0])?.removeFunc,n=s?.(e,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._clients.forEach(t=>this._checkSizeLimits(this._maxClientSize,t)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){let i=e??this;if(i.size<=t)return;let r=e?.id,s=!0;for(;s;){s=!1;for(let[n,o]of this._db)if(0===o.lifetime&&(!r||n.startsWith(r))){let r=e??this._clients.get(n.split(a)[0]);if(this._purgeItem(n,o,r),i.size<=.9*t)return;s||=this._db.has(n)}}for(let[s,n]of this._db)if(!r||s.startsWith(r)){let r=e??this._clients.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*t)return}}_purgeItem(t,e,i){if(this._db.delete(t),e.lives<=1){this._size-=e.size,i&&(i.size-=e.size);let r=this._notifyRemove(t,e.entry,e.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),e.lives=e.lifetime,e.size=r,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}new s(0);class n{constructor(t,e,i){this.entry=t,this.size=e,this.lifetime=i,this.lives=i}}const a=":";class o{constructor(t,e){this.removeFunc=e,this.id="",this.name="",this.size=0,this._storage=new s(t,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,i=1){this._storage.put(this,t,e,i,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},9093(t,e,i){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}i.d(e,{o8:()=>s,vt:()=>r});const n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:s,create:r,fromValues:function(t,e,i,r,s,n,a,o,u,l,h,c,f,d,p,m){return[t,e,i,r,s,n,a,o,u,l,h,c,f,d,p,m]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,n])},35522(t,e,i){i.d(e,{$A:()=>P,Bw:()=>n,C:()=>a,Cc:()=>v,DI:()=>M,Io:()=>g,Ln:()=>y,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>I,T9:()=>m,WQ:()=>u,Z0:()=>F,_S:()=>d,aI:()=>A,ei:()=>b,fw:()=>C,gL:()=>R,hG:()=>x,hZ:()=>o,hs:()=>_,jk:()=>p,lw:()=>h,m3:()=>w,oW:()=>E,t2:()=>O,tn:()=>f,ze:()=>z});var r=i(51850),s=i(34304);function n(t){let e=t[0],i=t[1],r=t[2];return Math.sqrt(e*e+i*i+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,i,r){return t[0]=e,t[1]=i,t[2]=r,t}function u(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function l(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function h(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function c(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function f(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function m(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function _(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function y(t,e,i,r){return t[0]=e[0]+i[0]*r,t[1]=e[1]+i[1]*r,t[2]=e[2]+i[2]*r,t}function g(t,e){let i=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(i*i+r*r+s*s)}function x(t,e){let i=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return i*i+r*r+s*s}function w(t){let e=t[0],i=t[1],r=t[2];return e*e+i*i+r*r}function z(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function M(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function I(t,e=t){let i=e[0],r=e[1],s=e[2],n=i*i+r*r+s*s;return n>0&&(n=1/Math.sqrt(n),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function P(t,e,i){let r=e[0],s=e[1],n=e[2],a=i[0],o=i[1],u=i[2];return t[0]=s*u-n*o,t[1]=n*a-r*u,t[2]=r*o-s*a,t}function v(t,e,i,r){let s=e[0],n=e[1],a=e[2];return t[0]=s+r*(i[0]-s),t[1]=n+r*(i[1]-n),t[2]=a+r*(i[2]-a),t}function F(t,e,i){let r=e[0],s=e[1],n=e[2];return t[0]=i[0]*r+i[4]*s+i[8]*n+i[12],t[1]=i[1]*r+i[5]*s+i[9]*n+i[13],t[2]=i[2]*r+i[6]*s+i[10]*n+i[14],t}function b(t,e,i){let r=e[0],s=e[1],n=e[2];return t[0]=r*i[0]+s*i[3]+n*i[6],t[1]=r*i[1]+s*i[4]+n*i[7],t[2]=r*i[2]+s*i[5]+n*i[8],t}function R(t,e,i){return C(t,e,i[0],i[1],i[2],i[3])}function C(t,e,i,r,s,n){let a=e[0],o=e[1],u=e[2],l=r*u-s*o,h=s*a-i*u,c=i*o-r*a,f=r*c-s*h,d=s*l-i*c,p=i*h-r*l,m=2*n;return t[0]=a+l*m+2*f,t[1]=o+h*m+2*d,t[2]=u+c*m+2*p,t}const N=(0,r.vt)(),q=(0,r.vt)();function O(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function A(t,e){if(t===e)return!0;let i=t[0],r=t[1],n=t[2],a=e[0],o=e[1],u=e[2],l=(0,s.FD)();return Math.abs(i-a)<=l*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-u)<=l*Math.max(1,Math.abs(n),Math.abs(u))}function E(t,e,i){let r=i[0]-e[0],s=i[1]-e[1],n=i[2]-e[2],a=r*r+s*s+n*n;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=s*a,t[2]=n*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const T=l,G=h,k=c,Q=g,D=x,Z=n,B=w;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:function(t,e){I(N,t),I(q,e);let i=S(N,q);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(t,e,i,r,s,n){let a=1-n,o=a*a,u=n*n,l=o*a,h=3*n*o,c=3*u*a,f=u*n;return t[0]=e[0]*l+i[0]*h+r[0]*c+s[0]*f,t[1]=e[1]*l+i[1]*h+r[1]*c+s[1]*f,t[2]=e[2]*l+i[2]*h+r[2]*c+s[2]*f,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:a,cross:P,crossAndNormalize:function(t,e,i){let r=e[0],s=e[1],n=e[2],a=i[0],o=i[1],u=i[2],l=s*u-n*o,h=n*a-r*u,c=r*o-s*a,f=Math.sqrt(l*l+h*h+c*c);return t[0]=l/f,t[1]=h/f,t[2]=c/f,t},direction:E,dist:Q,distance:g,div:k,divide:c,dot:S,equals:A,exactEquals:O,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,r,s,n){let a=n*n,o=a*(2*n-3)+1,u=a*(n-2)+n,l=a*(n-1),h=a*(3-2*n);return t[0]=e[0]*o+i[0]*u+r[0]*l+s[0]*h,t[1]=e[1]*o+i[1]*u+r[1]*l+s[1]*h,t[2]=e[2]*o+i[2]*u+r[2]*l+s[2]*h,t},inverse:M,len:Z,length:n,lerp:v,max:m,min:p,mul:G,multiply:h,negate:z,normalize:I,random:function(t,e=1){let i=s.Ov,r=2*i()*Math.PI,n=2*i()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=n*e,t},rotateX:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[0],n[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),n[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},rotateY:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),n[1]=s[1],n[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},rotateZ:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),n[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),n[2]=s[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:_,scaleAndAdd:y,scaleTo:function(t,e){return _(t,t,e/Z(t))},set:o,sign:d,sqrDist:D,sqrLen:B,squaredDistance:x,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:T,subtract:l,transformMat3:b,transformMat4:F,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:R,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,Z,"jb",0,T,"lo",0,D,"uE",0,B])},69397(t,e,i){i.d(e,{Qf:()=>u,Qh:()=>a,lM:()=>n,ro:()=>l,rq:()=>h});var r=i(44208),s=i(34275);function n(t){if(!t)return 0;let e=c;for(let i in t)t.hasOwnProperty(i)&&(e+=o(t[i],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let i=f;for(let r=0;r<e;r++)i+=o(t[r]);return i}(t);let e=c;for(let i in t)t.hasOwnProperty(i)&&(e+=o(t[i]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+l(e),0)}function l(t,e=16){return t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?h(t,e):0:0}function h(t,e){return f+t.length*e}const c=32,f=16,d=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,p=145;i.d(e,["JY",0,d])},36745(t,e,i){i.d(e,{z:()=>o});var r=i(4718),s=i(51118),n=i(60408),a=i(92722);class o{static fromOptimized(t,e,i=1){return(new u).initialize(t,e,i)}static fromJSON(t){let[e,i]=h(t),r=(0,n.Pv)(t),s=(0,n.W0)(t);return(new c).initialize(e,i,r,s,1)}static fromOptimizedCIM(t,e,i=1){return(new f).initialize(t,e,i)}static fromJSONCIM(t,e=1){let[i,r]=h(t),s=(0,n.Pv)(t),a=(0,n.W0)(t);return(new d).initialize(i,r,s,a,e)}static fromFeatureSetReader(t){let e=t.readGeometryForDisplay(),i=t.geometryType;return e&&i?this.fromOptimized(e,i):null}static fromFeatureSetReaderCIM(t){let e=t.readGeometryForDisplay(),i=t.geometryType;return e&&i?this.fromOptimizedCIM(e,i):null}static createEmptyOptimized(t,e=!1,i=!1,r=1){return(new f).initialize(new a.A([],[],e,i),t,r)}static createEmptyJSON(t,e=!1,i=!1){return(new c).initialize([],t,e,i,1)}static createEmptyOptimizedCIM(t,e=!1,i=!1,r=1){return(new f).initialize(new a.A([],[],e,i),t,r)}static createEmptyJSONCIM(t,e=!1,i=!1,r=1){return(new d).initialize([],t,e,i,r)}asJSON(){let t=(0,s.x)(this),{hasZ:e,hasM:i}=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:i}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:i?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:i}:{paths:t,hasZ:e,hasM:i}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,i=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;let r=t,s=e;for(;this.nextPoint();)i+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return i+=(t-r)*(e+s),-.5*i}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,i){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=i,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){let 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(){let t=this._end,e=this._geometry.coords,i=this._pathOffset;return(new u).initialize(new a.A([this.pathSize],e.slice(i,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){let t=this._end,e=this._stride,i=this._geometry.coords,r=0;for(let s=this._pathOffset+e;s<t;s+=e){let t=i[s-e],n=i[s-e+1],a=i[s]-t,o=i[s+1]-n;r+=Math.sqrt(a*a+o*o)}return r}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(let 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){let e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){let 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(){let t=this._geometry.coords,e=this._pathOffset,i=this._end-this._stride;for(let r=0;r<this._stride;r++)if(t[e+r]!==t[i+r])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(){let{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(){let 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){let 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,i,r,s){return this._paths=t,this.geometryType=e,this.hasZ=i,this.hasM=r,this._pathIndex=this._pointIndex=-1,this.yFactor=s,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(){let t=this._currentPath.length,e=this._currentPath,i=0;for(let r=1;r<t;r++){let t=e[r-1],s=e[r],n=t[0],a=t[1],o=s[0]-n,u=s[1]-a;i+=Math.sqrt(o*o+u*u)}return i}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){let e=(0,s.x)(t);for(let t of e)this.pushPath(t)}asOptimized(){let{hasZ:t,hasM:e}=this,i=new a.A([],[],t,e),{coords:r,lengths:s}=i;if("esriGeometryPoint"===this.geometryType)r.push(...this._paths[0][0]),s.length=0;else for(let i of this._paths){for(let s of i)r.push(s[0]),r.push(s[1]*this.yFactor),t&&r.push(s[2]),e&&r.push(s[this._mIndex]);s.push(i.length)}return i}isClosed(){let t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}clone(){return(new c).initialize((0,r.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 f extends u{initialize(t,e,i){return super.initialize(t,e,i),this._controlPoints||=this._controlPoints=Array(this.totalSize).fill(void 0).map(t=>new Set),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){let t=(new f).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,i,r,s){return super.initialize(t,e,i,r,s)}clone(){return(new d).initialize((0,r.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]}}},4197(t,e,i){i.d(e,{Vj:()=>h,cj:()=>l,jh:()=>n,l5:()=>o,yH:()=>u});var r=i(34275),s=i(9093);function n(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function o(t,e,i){return Array.isArray(t)?t.slice(e,e+i):t.subarray(e,e+i)}function u(t,e){if(0===e.length)return a(t);if(0===t.length)return a(e);let i=n(t.length+e.length);for(let e=0;e<t.length;++e)i[e]=t[e];for(let r=0;r<e.length;++r)i[t.length+r]=e[r];return i}function l(t){return[...t]}function h(t){let e=(0,s.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},70328(t,e,i){i.d(e,{BI:()=>F,C:()=>a,DC:()=>f,Ej:()=>x,Ie:()=>P,Jt:()=>v,Lu:()=>z,Ne:()=>M,RF:()=>c,TF:()=>y,VL:()=>p,aI:()=>R,fA:()=>o,gE:()=>l,gX:()=>g,hZ:()=>S,iT:()=>d,is:()=>b,pg:()=>w,uJ:()=>_,vI:()=>I,vY:()=>u,vt:()=>n,w1:()=>h,yr:()=>m}),i(35522);var r=i(5443),s=(i(19419),i(4197));function n(t=N){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function o(t,e,i,r,s,a,o=n()){return o[0]=t,o[1]=e,o[2]=i,o[3]=r,o[4]=s,o[5]=a,o}function u(t,e=n()){return function(t,e,i,r=n()){return S(r,C),function(t,e,i=0,r=e.length/3){let s=t[0],n=t[1],a=t[2],o=t[3],u=t[4],l=t[5];for(let t=0;t<r;t++)s=Math.min(s,e[i+3*t]),n=Math.min(n,e[i+3*t+1]),a=Math.min(a,e[i+3*t+2]),o=Math.max(o,e[i+3*t]),u=Math.max(u,e[i+3*t+1]),l=Math.max(l,e[i+3*t+2]);t[0]=s,t[1]=n,t[2]=a,t[3]=o,t[4]=u,t[5]=l}(r,t,e,i),r}(t,0,t.length/3,e)}function l(t,e=(0,s.jh)(24)){let[i,r,n,a,o,u]=t;return e[0]=i,e[1]=r,e[2]=n,e[3]=i,e[4]=r,e[5]=u,e[6]=i,e[7]=o,e[8]=n,e[9]=i,e[10]=o,e[11]=u,e[12]=a,e[13]=r,e[14]=n,e[15]=a,e[16]=r,e[17]=u,e[18]=a,e[19]=o,e[20]=n,e[21]=a,e[22]=o,e[23]=u,e}function h(t,e){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,r]){!function(t,e,i,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],r)}(t,e,i,r)}function p(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function _(t){return t[2]>=t[5]?0:t[5]-t[2]}function y(t){let e=p(t),i=_(t),r=m(t);return e*e+i*i+r*r}function g(t,e=[0,0,0]){return e[0]=t[0]+p(t)/2,e[1]=t[1]+m(t)/2,e[2]=t[2]+_(t)/2,e}function x(t,e=[0,0,0]){return e[0]=p(t),e[1]=m(t),e[2]=_(t),e}function w(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function z(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function M(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function I(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function P(t){return t?S(t,C):n(C)}function v(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function F(t,e,i,r,s){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=r,t[4]=s,t[5]=1/0,t}function b(t){return 6===t.length}function R(t,e,i){if(null==t||null==e)return t===e;if(!b(t)||!b(e))return!1;if(i){for(let r=0;r<t.length;r++)if(!i(t[r],e[r]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],N=[0,0,0,0,0,0];n(),i.d(e,["qv",0,C,"v_",0,N])},78957(t,e,i){i.d(e,{d:()=>h,R:()=>z});class r{constructor(t=s){this._data=[],this._compare=t}get size(){return this._data.length}enqueue(t){if(null==t)return;let{_data:e,_compare:i}=this;e.push(t);let r=e.length-1>>>0,s=e[r];for(;r>0;){let t=r-1>>1,n=e[t];if(!(i(n,s)<=0))break;e[t]=s,e[r]=n,r=t}}dequeue(){let{_data:t,_compare:e}=this,i=t[0],r=t.pop();if(0===t.length)return i;t[0]=r;let s,n,a=0,o=t.length,u=t[0],l=null;for(;;){let i=2*a+1,r=2*a+2;if(l=null,i<o&&(s=t[i],e(s,u)>0&&(l=i)),r<o&&(n=t[r],(null===l&&e(n,u)<=0||null!==l&&e(n,s)<=0)&&(l=r)),null===l)break;t[a]=t[l],t[l]=u,a=l}return i}}const s=(t,e)=>t<e?-1:+(t>e);var n=i(19419),a=i(537),o=i(12359),u=i(95108),l=i(12176);function h(t){if(0===t.totalSize)return null;let e=(0,a.z8)(t);if(!e)return null;let i=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19,r=0,s=0;t.reset();for(let e=0;t.nextPath();e++){let i=t.getCurrentRingArea();i>s&&(s=i,r=e)}if(t.seekPath(r),0===t.pathSize)return null;t.seekPathStart();let u=(0,a.B$)(t);if(Math.abs(s)<=2*i*i)return[(u[0]+u[2])/2,(u[1]+u[3])/2];t.seekPathStart();let l=(0,o.w2)(t,(0,n.vt)());if(null===l)return null;if(t.totalPoints<4)return l;let h=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],p=[NaN,NaN,NaN,NaN],m=[NaN,NaN,NaN,NaN],_=!1,w=f(l,t,!0);0===w.distance&&(_=!0,h[0][0]=l[0],h[0][1]=l[1],w=f(l,t,!1)),p[0]=w.distance,m[0]=0;let z=[NaN,NaN],M=!1,I=.25,S=-1,P=NaN;do{if(P=NaN,h[1]=d(t,y(u[0],u[2],I),0,e),!isNaN(h[1][0])&&!isNaN(h[1][1])&&(w=f(h[1],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[1],t))M=!0,p[1]=P,m[1]=g(h[1],l);else if(!isNaN(P)&&P>S&&(S=P,z[0]=h[1][0],z[1]=h[1][1]),I-=.01,I<.1){if(!(S>=0))break;M=!0,p[1]=S,h[1][0]=z[0],h[1][1]=z[1],m[1]=g(h[1],l)}}while(!M);M=!1,I=.5,S=-1;let v=.01,F=1;do{if(P=NaN,h[2]=d(t,y(u[0],u[2],I),0,e),!isNaN(h[2][0])&&!isNaN(h[2][1])&&(w=f(h[2],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[2],t))M=!0,p[2]=P,m[2]=g(h[2],l);else if(!isNaN(P)&&P>S)S=P,z[0]=h[2][0],z[1]=h[2][1];else if(P>S&&(S=P,z[0]=h[2][0],z[1]=h[2][1]),I=.5+v*F,v+=.01,F*=-1,I<.3||I>.7){if(!(S>=0))break;M=!0,p[2]=S,h[2][0]=z[0],h[2][1]=z[1],m[2]=g(h[2],l)}}while(!M);M=!1,I=.75,S=-1;do{if(P=NaN,h[3]=d(t,y(u[0],u[2],I),0,e),!isNaN(h[3][0])&&!isNaN(h[3][1])&&(w=f(h[3],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[3],t))M=!0,p[3]=P,m[3]=g(h[3],l);else if(P>S&&(S=P,z[0]=h[3][0],z[1]=h[3][1]),I+=.01,I>.9){if(!(S>=0))break;M=!0,p[3]=S,h[3][0]=z[0],h[3][1]=z[1],m[3]=g(h[3],l)}}while(!M);let b,R=[0,1,2,3],C=+!_;for(let t=C;t<4;t++)for(let t=C;t<3;t++){let e=m[t],i=m[t+1];x(e,i)>0&&(b=R[t],R[t]=R[t+1],R[t+1]=b,m[t]=i,m[t+1]=e)}let N=C,q=0,O=0;for(let t=C;t<4;t++){switch(t){case 0:O=2*p[R[t]];break;case 1:O=1.66666666*p[R[t]];break;case 2:O=1.33333333*p[R[t]];break;case 3:O=p[R[t]]}O>q&&(q=O,N=R[t])}return h[N]}function c(t,e){let i,r,s,n,a=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(i=e.x,r=e.y;e.nextPoint();i=s,r=n)s=e.x,n=e.y,r>t[1]!=n>t[1]&&((s-i)*(t[1]-r)-(n-r)*(t[0]-i)>0?a++:a--);return 0!==a}function f(t,e,i){if(i&&c(t,e))return{coord:t,distance:0};let r=1/0,s=0,n=0,a=[0,0],o=[0,0],l=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(a[0]=e.x,a[1]=e.y;e.nextPoint();a=o){o=[e.x,e.y],(0,u.gR)(l,t,a,o);let i=g(t,l);i<r&&(r=i,s=l[0],n=l[1])}return{coord:[s,n],distance:Math.sqrt(r)}}function d(t,e,i,r){let s=[e,0],a=1/0,o=1/0,u=!1,h=!1,c=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],d=[0,0],_=[0,0],y=[[0,0],[0,0]],g=(0,n.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(y[0][0]=t.x,y[0][1]=t.y;t.nextPoint();y[0][0]=y[1][0],y[0][1]=y[1][1]){if(y[1][0]=t.x,y[1][1]=t.y,null===p(g,y)||(d[0]=c[0][0],d[1]=c[0][1],_[0]=c[1][0],_[1]=c[1][1],0===m(g,d,_))||!(0,l.Ql)(c[0],c[1],y[0],y[1],f))continue;let e=f[1];a>o?e<a&&(a=e,u=!0):e<o&&(o=e,h=!0)}return u&&h?s[1]=(a+o)/2:s[0]=s[1]=NaN,s}function p(t,e){if(e.length<2)return null;t||=(0,n.vt)();let[i,r]=e[0],[s,a]=e[1];return t[0]=Math.min(i,s),t[1]=Math.min(r,a),t[2]=Math.max(i,s),t[3]=Math.max(r,a),t}function m(t,e,i){let r=_(e,t),s=_(i,t),n=t[0],a=t[1],o=t[2],u=t[3];if(r&s)return 0;if(!(r|s))return 4;let l=!!r|(s?2:0);do{let l=i[0]-e[0],h=i[1]-e[1];if(l>h)3&r?(1&r?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(o-e[0])/l,e[0]=o),r=_(e,t)):3&s?(1&s?(i[1]+=h*(n-i[0])/l,i[0]=n):(i[1]+=h*(o-i[0])/l,i[0]=o),s=_(i,t)):r?(4&r?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(u-e[1])/h,e[1]=u),r=_(e,t)):(4&s?(i[0]+=l*(a-i[1])/h,i[1]=a):(i[0]+=l*(u-i[1])/h,i[1]=u),s=_(i,t));else if(12&r?(4&r?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(u-e[1])/h,e[1]=u),r=_(e,t)):12&s?(4&s?(i[0]+=l*(a-i[1])/h,i[1]=a):(i[0]+=l*(u-i[1])/h,i[1]=u),s=_(i,t)):r?(1&r?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(o-e[0])/l,e[0]=o),r=_(e,t)):(1&s?(i[1]+=h*(n-i[0])/l,i[0]=n):(i[1]+=h*(o-i[0])/l,i[0]=o),s=_(i,t)),r&s)return 0}while(r|s);return l}function _(t,e){return+(t[0]<e[0])|(t[0]>e[2])<<1|(t[1]<e[1])<<2|(t[1]>e[3])<<3}function y(t,e,i){return t+(e-t)*i}function g(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function x(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;let i=isNaN(t),r=isNaN(e);return i<r?-1:+(i>r)}class w{constructor(t,e,i,r){this.x=t,this.y=e,this.cellSize=i,this.distancefromCellCenter=(0,u.Xf)(t,e,r),this.maxDistanceToPolygon=this.distancefromCellCenter+this.cellSize*Math.SQRT2}}function z(t){if(!t.nextPath()||!t.pathSize)return null;let e=(0,a.B$)(t),i=e[2]-e[0],s=e[3]-e[1];if(0===i||0===s)return[e[0]+i/2,e[1]+s/2];let n=Math.max(Math.min(i,s)/100,1),u=new r((t,e)=>e.maxDistanceToPolygon-t.maxDistanceToPolygon),l=Math.min(i,s),h=l/2,c=0,f=0;for(c=e[0];c<e[2];c+=l)for(f=e[1];f<e[3];f+=l)u.enqueue(new w(c+h,f+h,h,t));t.reset(),t.nextPath();let d=(0,o.IK)(t);if(null===d)return null;let p,m=new w(d[0],d[1],0,t);for(;u.size>0;)p=u.dequeue(),p.distancefromCellCenter>m.distancefromCellCenter&&(m=p),p.maxDistanceToPolygon-m.distancefromCellCenter<=n||(h=p.cellSize/2,u.enqueue(new w(p.x-h,p.y-h,h,t)),u.enqueue(new w(p.x+h,p.y-h,h,t)),u.enqueue(new w(p.x-h,p.y+h,h,t)),u.enqueue(new w(p.x+h,p.y+h,h,t)));return[m.x,m.y]}},62815(t,e,i){i.d(e,{N:()=>o,d:()=>u});var r=i(86211),s=i(73941),n=i(21325),a=i(52006);function o(t,e,i){let r=u(e,i);if(1!==r)switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){null!=t?.z&&(t.z*=e)}(t,r);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t){if(t.curvePaths)for(let i of t.curvePaths)for(let t of i){let i=(0,a.yP)(t);i.length>2&&(i[2]*=e)}if(t.paths)for(let i of t.paths)for(let t of i)t.length>2&&(t[2]*=e)}}(t,r);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t){if(t.curveRings)for(let i of t.curveRings)for(let t of i){let i=(0,a.yP)(t);i.length>2&&(i[2]*=e)}if(t.rings)for(let i of t.rings)for(let t of i)t.length>2&&(t[2]*=e)}}(t,r);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(let i of t.points)i.length>2&&(i[2]*=e)}(t,r);case"extent":case"esriGeometryEnvelope":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,r);default:return}}function u(t,e){return null==t||null==e||(0,n.aI)(t,e)||(0,s.xP)(t)||(0,s.xP)(e)?1:(0,r.G9)(t)/(0,r.G9)(e)}},6557(t,e,i){i.r(e),i.d(e,{default:()=>j});var r=i(32198),s=i(21818),n=i(49186),a=i(71511),o=i(44208),u=i(53966),l=i(17676),h=i(563),c=i(39516),f=i(86211),d=i(16930),p=i(70328),m=i(19419),_=i(21325),y=i(53929),g=i(90708),x=i(29441),w=i(75752),z=i(99352),M=i(8384),I=i(58727),S=i(95031),P=i(24460),v=i(64714),F=i(17754),b=i(20437),R=i(95466),C=i(30524),N=i(50639),q=i(42760),O=i(76248),A=(i(98623),i(30661)),E=i(28923),T=i(44320),G=i(35258),k=i(16630);const Q=new A.Z,D="__OBJECTID",Z=8e3;class B{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);let e=await W(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;){let e=this._getOrCreateNextStream(t);if(null==e)return;this._pending.add(e.read(t))}}_getOrCreateNextStream(t){let e=this._resolvedCount>=8?8:2;if(this._fileIndex<this._files.length&&this._streams.length<e){let e=this._files[this._fileIndex++],i=new V(e.id,this._createFileStream(e,t));return this._streams.push(i),i}return this._getNextStream()}_getNextStream(){let t=this._streams.length;for(let e=0;e<t;e++){let i=(this._streamIndex+e)%t,r=this._streams[i];if(r.canRead)return this._streamIndex=(i+1)%t,r}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 W(t){return Promise.race(Array.from(t,async t=>({read:t,chunk:await t})))}class V{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{let e=await(await this._stream).next(t);return null==e?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:e}}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){let 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,S.M)(t.provider,null,()=>this._customParameters));let i,r=await this._provider.getMetadata(),s=await(0,q.nc)(r,{fields:t.fields?.map(t=>b.A.fromJSON(t)),geometryEncoding:t.geometryEncoding?(0,N.G)(t.geometryEncoding):null,geometryType:t.geometryType?(0,q.hG)(t.geometryType):null,displayOptimization:t.displayOptimization,spatialReference:e});if(this._hasZ=!!r?.hasZ,this._hasM=!!r?.hasM,!s.fields)throw new n.A("parquet:unsupported","Fields must be defined");if(s.spatialReference&&s.geometryType){if(!s.spatialReference)throw new n.A("parquet:unsupported","SpatialReference must be defined");if(!s.spatialReference.isGeographic&&!s.spatialReference.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");s.spatialReference.isGeographic&&!s.spatialReference.isWGS84&&(u.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:s.spatialReference}),s.spatialReference=d.A.WGS84),i={geometry:s.geometryEncoding?{geometryType:(0,q.sA)(s.geometryType),spatialReference:s.spatialReference.toJSON(),encoding:s.geometryEncoding.toJSON()}:null,displayOptimization:s.displayOptimization}}this.setCustomParameters(t.customParameters),this._displayOptimization=s.displayOptimization,await this._provider.updateGeometryInfo(i),this._capabilities=rt(await this._getFileStatistics(),this._hasZ,this._hasM);let a=await this._provider.getFiles();if(!a.length)return{layerDefinition:{},capabilities:rt(null,this._hasZ,this._hasM)};let o=await a[0].file;s.file=o;let{fields:l}=s;if(null==l)throw new n.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",l);l.push(new b.A({name:D,type:"oid",alias:D}));for(let t of l){let e=o.getColumnId(t.name);null!=e&&(this._indexMap[t.name]=e)}let h=R.A.fromLayerJSON({fields:l.map(t=>t.toJSON()),dateFieldsTimeReference:{timeZoneIANA:"UTC"}});this._fieldsIndex=h;let c=(0,q.sA)(s.geometryType??"point");return this._metadata=G.i.createFeature({fieldsIndex:h.toJSON(),geometryType:c,hasZ:this._hasZ,hasM:this._hasM,featureIdInfo:{type:"object-id",fieldName:D},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:s.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:"UTC"}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:c,featureIdInfo:{type:"object-id",fieldName:D},hasM:this._hasM,hasZ:this._hasZ,spatialReference:s.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=r?.extent?r.extent:await this._tryDeriveParquetFullExtent(s),{capabilities:this._capabilities,layerDefinition:{fields:s.fields?.map(t=>t.toJSON()),drawingInfo:(0,v.F0)(c),extent:this._fullExtent??void 0,geometryType:c,hasZ:this._hasZ,hasM:this._hasM,geometryEncoding:s.geometryEncoding?.toJSON(),displayOptimization:s.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(let{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};let e=(0,S.M)(t,this._provider.getGeometryInfo(),()=>this._customParameters);await this._updateProvider(e)}async getDiagnosticsSnapshot(){let 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){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),function(t){return!!(t.objectIds?.length||t.outStatistics||t.orderByFields?.length||t.returnDistinctValues)}(i)||(i.resultRecordCount=i.resultRecordCount?Math.min(i.resultRecordCount,Z):Z,i.resultOffset=i.resultOffset??0),i.outStatistics?this._queryStatistics(i,e):(i.returnDistinctValues&&(i.returnGeometry=void 0),(await this._enqueueQuery(i,e)).createQueryResponse())}async queryFeatureCount(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),H(i)||i.returnDistinctValues||i.groupByFieldsForStatistics?.length||i.outStatistics?.length?(i.returnDistinctValues||(i.outFields=void 0),i.returnGeometry=void 0,(await this._enqueueQuery(i,e)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),H(i)?(i.resultRecordCount=i.resultRecordCount?Math.min(i.resultRecordCount,8e3):8e3,i.resultOffset=i.resultOffset??0,i.returnGeometry=void 0,i.outFields=void 0,i.returnDistinctValues=void 0,(await this._enqueueQuery(i,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){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);if(this._validateQuery(i),this._fullExtent&&!H(i))return{count:await this._getFeatureCount(),extent:this._fullExtent};let r=(0,s.z)(this._metadata.spatialReference);i.returnGeometry=!0,i.outFields=void 0;let n=(0,p.hZ)((0,p.vt)(),p.qv),a=(0,p.vt)(),o=await this._enqueueQuery(i,e),u=0;for(let t of o.items)t.getBounds(a)&&((0,p.RF)(n,a),u+=1);return{count:u,extent:(0,w.Wc)(n,r,i.outSR?(0,s.z)(i.outSR):r.toJSON(),r,!1)}}async queryStream(t,e){if(!e.signal)throw Error("InternalError: AbortSignal must be passed");let i=await this._getCandidateFiles(t),r=new B(i,async(e,i)=>{let r=await e.file,s=await this._createParquetDisplayQuery(r,e.id,t);return r.executeQuery(s,Z,i)}),s=this._streamIdCounter++,n=(0,l.NY)(e.signal,t=>{let e=this._streams.get(s);null!=e&&(e.handle.remove(),this._streams.delete(s))});return this._streams.set(s,{stream:r,handle:n}),s}async getStreamNext(t,e){if(!e.signal)throw Error("InternalError: AbortSignal must be passed");let i=this._streams.get(t);if(!i)return{result:null};let r=await i.stream.next(e.signal);if(null==r)return i.handle.remove(),this._streams.delete(t),{result:null};let s=r.chunk.serialize().buffer,n={fileId:r.fileId,buffer:s};return s instanceof ArrayBuffer?{result:n,transferList:[s]}:{result:n}}async getStreamNextFeatures(t,e){let{result:i}=await this.getStreamNext(t,e);if(null==i)return null;let r=(await(0,O.N)()).ParquetChunk.deserialize(new Uint8Array(i.buffer)),s=new k.s(this._metadata,this._indexMap,r,i.fileId),n=[];for(;s.next();){let t=(0,g.zv)(s.readGeometryWorldSpace(),s.geometryType,s.hasZ,s.hasM),e=s.readAttributes();n.push({attributes:e,geometry:t})}return{features:n}}async createPatch(t,e,i,r,s){if(!s.signal)throw Error("InternalError: AbortSignal must be passed");return(await(await(await this._getFileInfoById(t)).file).createChunkPatch(e,i,r,s.signal)).serialize().buffer}async _updateProvider(t){let 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){let e=await this._provider.getFiles(),i=await this._getSpatialFilePruning(t);if(null==i)return e;let r=e.filter(t=>this._mayIncludeFileForSpatialPruning(t,i));return"xz"===i.type?function(t,e){return t.slice().sort((t,i)=>{let r=it(t,e),s=it(i,e);return r===s?0:r<s?-1:1})}(r,i):r}async _queryStatistics(t,e){let i=await(0,I.T2)({...t},null,this._queryEngineParams.spatialReference);if(i.returnGeometry=void 0,function(t,e){return!!t.outStatistics?.length&&!H(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":{let i=e.get(t.onStatisticField);return null!=i&&(0,C.WA)(i)}default:return!1}}(t,e))}(i,this._fieldsIndex)){let t=await this._getStatisticsFromFiles(i);if(t)return t}return(await this._enqueueQuery(i,e)).createQueryResponse()}async _getStatisticsFromFiles(t){let e=await this._provider.getFiles(),i={},r=[];for(let s of t.outStatistics??[]){let t=X(s,e);if(!t.available)return null;i[s.outStatisticFieldName]=t.value,r.push(Y(s,this._fieldsIndex))}return{fields:r,features:[{attributes:i}]}}async _getSpatialFilePruning(t){if("tile"!==t.type&&("arcade"!==t.type||null==t.extent))return null;let e=this._displayOptimization?.index;if(null==e)return null;let i=t.outSpatialReference.wkid;if(null==e.wkid||null==i)return null;let r=e.wkid,s=await(0,O.N)();switch(e.type){case"xz":return{type:"xz",fieldName:(0,y.FG)(e.code),intersects:(n,a)=>s.queryIntersectsXZStatistics(e.fullExtent,t.extent,i,r,e.maxLevel,n,a)};case"z":return{type:"xy",xFieldName:(0,y.FG)(e.xColumn),yFieldName:(0,y.FG)(e.yColumn),intersects:(e,n,a,o)=>s.queryIntersectsXYStatistics(t.extent,i,r,e,n,a,o)}}}_mayIncludeFileForSpatialPruning(t,e){switch(e.type){case"xz":{let i=et(t,e);return"null-only"!==i?.type&&("bounds"!==i?.type||e.intersects(i.minValue,i.maxValue))}case"xy":{let i=t.statistics.statistics.get(e.xFieldName),r=t.statistics.statistics.get(e.yFieldName);return"null-only"!==i?.type&&"null-only"!==r?.type&&("bounds"!==i?.type||"bounds"!==r?.type||e.intersects(i.minValue,i.maxValue,r.minValue,r.maxValue))}}}async _tryDeriveParquetFullExtent(t){if(!t.spatialReference)return null;if(null==this._fullExtent&&"location"===t.geometryEncoding?.type){let e=await this._provider.getFiles(),{xField:i,yField:s}=t.geometryEncoding,n=(0,p.hZ)((0,p.vt)(),p.qv),a=!1;for(let t of e){let e=await t.file;for(let t of e.rowGroups()){let e={stack:[],error:void 0,hasError:!1};try{let o=(0,r.mS)(e,t.columnDescriptorForAttribute(i),!1),u=(0,r.mS)(e,t.columnDescriptorForAttribute(s),!1),l=(0,P.Hk)(o),h=(0,P.Hk)(u);if("bounds"===l?.type&&"bounds"===h?.type){let t=[l.minValue,h.minValue,l.maxValue,h.maxValue];(0,p.DC)(n,t),a=!0}t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,r.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){let e=await this._provider.getFiles();for(let i of e)if(i.id===t)return i;throw 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,i,r,s){let n=(await(0,O.N)()).Query.new();null!=i&&n.setPreFilterStart(i),null!=r&&n.setPreFilterCount(r),null!=s&&n.setPostFilterCount(s);let a=await this._getRequiredFields(t);n.setOutFields(a),(t.geometry||t.returnGeometry)&&n.setReturnGeometry(!0),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM);let o=this._tryGetGeneralizedGeometryResolution(t);null!=o&&n.setSourceResolution(o);let u=t.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=u.wkid;if(t.geometry&&((0,_.K8)(u)||(0,_.oT)(u))){let e=(0,m.C)((0,m.vt)(),m.qv);for(let i of(0,w.qo)(t.geometry))(0,m.DC)(e,i);n.setOutSpatialReference(l),n.setExtent({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]})}if(t.where){let{id:i,file:r}=e;await this._setWhereClause(n,await r,i,t.where)}return n}async _createParquetDisplayQuery(t,e,i){let r=(await(0,O.N)()).Query.new();if("tile"===i.type){r.setExtent(i.extent),r.setQuantizationTransform(i.transform);let t=this._sourceResolution(i.resolution,i.outSpatialReference);null!=t&&r.setSourceResolution(t)}else"arcade"===i.type&&null!=i.extent&&r.setExtent(i.extent);return r.setOutFields(i.outFields.filter(t=>null!=this._indexMap[t])),r.setOutSpatialReference(i.outSpatialReference.wkid),r.setReturnGeometry(i.returnGeometry),r.setReturnZ(i.returnZ),r.setReturnM(i.returnM),i.where&&await this._setWhereClause(r,t,e,i.where),r}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,i,r){let s=this._indexMap,a=this._fieldsIndex,o={getAttribute(t,r){let n=s[r];if(null==n){if("__OBJECTID"===a.get(r)?.name){let e=t.row+t.rowGroupStart;return(0,F.xb)(i,e)}return null}let o=a.get(r);return(0,y.LC)(e,t.rowGroup,t.row,n,o.type)}},u=await(0,c.GP)(r,this._fieldsIndex);if(!u.isStandardized)throw new n.A("sql-parse-error","expression is not standardized");let l=u.fieldNames.map(t=>a.get(t)).filter(t=>t&&null!=this._indexMap[t?.name]);t.setWhere(r),t.setWhereEvaluator((t,e,i)=>u.testFeatureCompiled({rowGroup:t,row:e,rowGroupStart:i},o,null)),t.setWhereFields(l.map(t=>t.name))}async*_streamFeatures(t,e,i,r,s){let n=await this._provider.getFiles(),a=0;for(let o of n){let n=a,u=a+o.statistics.rowCount;if(a+=o.statistics.rowCount,null!=e&&e>=u)continue;let l=null==e?null:Math.max(e-n,0),h=i;if(null!=i){let t=e??0,r=t+i;h=Math.max(Math.min(r,u)-Math.max(t,n),0)}if(0===h)continue;let c=await this._createParquetQuery(t,o,l,h,r),f=await(await o.file).executeQuery(c,Z),d=async()=>{let t=await f.next(s);if(!t)return null;let e=new k.s(this._metadata,this._indexMap,t,o.id);return tt([new E.j(e,null,0,!1)],this._queryEngineParams)},p=await d();for(;null!=p;)yield p,p=await d()}}async _queryFeaturesWithQueryEnginePagination(t,e){let i=[],r=this._streamFeatures(t,null,null,null,e),s=await r.next();for(;!s.done;){let n=await s.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(let t of n)i.push(t);s=await r.next()}return i}async _queryFeaturesWithUpfrontPagination(t,e){let i,r,s,n=t.resultOffset??0,a=t.resultRecordCount??Z;!function(t){for(let e in t){let i=e;if(J(i)&&null!==t[i])return!0}return!1}(t)?(n&&=(i=n,0),r=t.resultRecordCount):function(t){for(let e in t){let i=e;if(U(i)&&null!==t[i])return!0}return!1}(t)||(s=n+a);let o=[],u=this._streamFeatures(t,i,r,s,e),l=await u.next();for(;!l.done&&a>0;){let i=await l.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(let t of i)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){let i=new Map;for(let e of t.objectIds){let t=(0,F.wY)(e),r=(0,F.gE)(e),s=i.get(t);s||(s=[],i.set(t,s)),s.push(r)}let r=[];for(let[s,n]of i.entries()){let i=await this._executeFileIdQuery(t,s,n,e);for(let t of i)r.push(t)}return new M.G(r,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.");let i=!!t.orderByFields?.length||!!t.outStatistics?.length||!!t.returnDistinctValues,r=i?await this._queryFeaturesWithQueryEnginePagination(t,e):await this._queryFeaturesWithUpfrontPagination(t,e);return i||(t.resultOffset=0),new M.G(r,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,i,r){let s=new Set(await this._getRequiredFields(t));if(t.where){let e=await(0,c.GP)(t.where,this._fieldsIndex);for(let t of e.fieldNames){let e=this._fieldsIndex.get(t);e&&null!=this._indexMap[e.name]&&s.add(e.name)}}let n=(await(0,O.N)()).Query.new();n.setOutFields(Array.from(s)),n.setReturnGeometry(!!t.returnGeometry),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM),n.setIds(new Uint32Array(i));let a=await(await this._getFile(e)).executeQuery(n,Z,r),o=await a.next(r),u=0,l=[];for(;null!=o;){let t=new k.s(this._metadata,this._indexMap,o,e),i=new E.j(t,null,u++,!1);l.push(i),o=await a.next(r)}return tt(l,this._queryEngineParams).executeQueryForOpaqueFeatures(t,r)}async _getRequiredFields(t){let e=new Set;if(t.outStatistics)for(let i of(0,x.g9)(this._fieldsIndex,t.outStatistics,t.groupByFieldsForStatistics))e.add(i);else if(t.outFields)for(let i of t.outFields)e.add(i);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;let e=t.outSR??this._queryEngineParams.spatialReference;if(!(0,_.K8)(e)&&!(0,_.oT)(e))return null;let i=t.quantizationParameters?.tolerance??t.maxAllowableOffset;return i?this._sourceResolution(i,e):null}_sourceResolution(t,e){let i=this._queryEngineParams.spatialReference,r=(0,f.GA)(e)/(0,f.GA)(i)*t;return!Number.isFinite(r)||r<=0?null:r}}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":case"resultOffset":case"resultRecordCount":return!0;default:return!1}}function J(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 U(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 H(t){for(let e in t){let i=e;if(L(i)&&null!==t[i])return!0}return!1}function Y(t,e){let i="exceedslimit"===t.statisticType?null:e.get(t.onStatisticField),r="min"!==t.statisticType&&"max"!==t.statisticType||"esriFieldTypeDate"!==i?.type?"esriFieldTypeDouble":i.type;return{name:t.outStatisticFieldName,alias:t.outStatisticFieldName,type:r}}function X(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 i=0;for(let r of e){let e=r.statistics.statistics.get(t.onStatisticField);if(null==e||null==e.nullCount)return{available:!1,value:null};i+=r.statistics.rowCount-e.nullCount}return{available:!0,value:i}}(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,i){if("min"!==t.statisticType&&"max"!==t.statisticType)return{available:!1,value:null};let r=null,s="min"===t.statisticType?"minValue":"maxValue";for(let n of e){let 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":{let t=K(e[s]);if(null==t)return{available:!1,value:null};r=null==r?t:i(r,t);break}}}return{available:!0,value:r}}function K(t){return"number"==typeof t&&Number.isFinite(t)?t:null}function tt(t,e){let i=new T.I;for(let e of t)i.insert(e);return new w.do({...e,featureStore:i})}function et(t,e){return t.statistics.statistics.get(e.fieldName)??null}function it(t,e){let i=et(t,e);return"bounds"===i?.type?i.maxValue-i.minValue:1/0}function rt(t,e,i){let r=t?.featureCount,s=!1;return null!=r&&r<(0,o.A)("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:i,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:{...z.F,maxRecordCount:Z,supportsOrderBy:s,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}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7992],{69397(t,e,r){r.d(e,{Qf:()=>o,Qh:()=>a,lM:()=>i,ro:()=>l,rq:()=>u});var s=r(44208),n=r(34275);function i(t){if(!t)return 0;let e=f;for(let r in t)t.hasOwnProperty(r)&&(e+=h(t[r],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let r=g;for(let s=0;s<e;s++)r+=h(t[s]);return r}(t);let e=f;for(let r in t)t.hasOwnProperty(r)&&(e+=h(t[r]));return e}function h(t,e=!0){switch(typeof t){case"object":return e?a(t):f;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+l(e),0)}function l(t,e=16){return t?(0,n.iu)(t)?t.byteLength+c:Array.isArray(t)?u(t,e):0:0}function u(t,e){return g+t.length*e}const f=32,g=16,m=(0,s.A)("ios")||!(0,s.A)("chrome")&&!(0,s.A)("opr")?8:4,c=145;r.d(e,["JY",0,m])},87992(t,e,r){r.d(e,{JR:()=>A,ME:()=>C,MY:()=>Z,NO:()=>M,Nh:()=>O,V2:()=>w,_s:()=>Y,e6:()=>I,gh:()=>E,jm:()=>P,tr:()=>X,uX:()=>x});var s=r(32198),n=(r(69397),r(16930)),i=r(19419),a=r(60408),h=r(21325),o=r(513),l=r(50954),u=r(79567),f=r(52006),g=r(49663),m=r(46068),c=r(92722);class x{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:h,partFlags:o,segmentFlags:l,segmentIndices:u,segmentParams:f,segmentCountArc:g,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=h,this.partFlags=o,this.segmentFlags=l,this.segmentIndices=u,this.segmentParams=f,this.segmentCountArc=g,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?64+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){let{type:t,vertexCount:e,partCount:r,hasZ:s,hasM:n,segmentCountArc:i,segmentCountBezier:a}=this,h=w(t,e,r,s,n,this.hasCurves(),i,a);h.spatialReference=this.spatialReference;let{vertexXY:o,vertexZ:l,vertexM:u}=this;if(h.vertexXY.set(o.subarray(0,2*e),0),h.vertexZ?.set(l.subarray(0,e),0),h.vertexM?.set(u.subarray(0,e),0),this.isMultipart()){let{partOffsets:t,partFlags:e}=this;h.partFlags.set(e.subarray(0,r+1)),h.partOffsets.set(t.subarray(0,r+1))}if(this.hasCurves()){let{segmentFlags:t,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;h.segmentFlags.set(t.subarray(0,e),0),h.segmentIndices.set(r.subarray(0,e),0),h.segmentParams.set(s.subarray(0,n),0)}return h}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!(0,h.aI)(this.spatialReference,t.spatialReference)||this.vertexCount!==t.vertexCount||this.partCount!==t.partCount||this.hasZ!==t.hasZ||this.hasM!==t.hasM||this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;let r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let e=0;e<this.vertexCount;++e)if(r(this.vertexXY[2*e],t.vertexXY[2*e])||r(this.vertexXY[2*e+1],t.vertexXY[2*e+1]))return!1;if(this.hasZ)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexZ[e],t.vertexZ[e]))return!1;if(this.hasM)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexM[e],t.vertexM[e]))return!1;for(let e=0;e<this.partCount;++e)if(this.partFlags[e]!==t.partFlags[e]||this.partOffsets[e]!==t.partOffsets[e])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new p(this):[][Symbol.iterator]()}}class p{constructor(t){this.geometry=t,this.value=new d(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(t){this.geometry=t,this.index=-1,this._readVertex=_(t),this._segments=new v(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class v{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this.value=new y(t.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class y{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=_(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;let e=this.geometry.segmentParams,r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){let t=e[r++],s=e[r++],n=e[r++],i=e[r++];return{b:[this.end,[t,s],[n,i]]}}let s=e[r++],n=e[r++],i=e[r++],a=e[r++],h=e[r++],o=e[r++];r++,r++;let l=e[r++],u=e[r++];if(!(4&s)&&1===i)return{c:[this.end,[l,u]]};let f=2&s?0:1,g=1&s?0:1;return{a:[this.end,[h,o],f,g,a,n,i]}}}function M(t,e){let r={stack:[],error:void 0,hasError:!1};try{return e??=(0,i.Ie)(),(0,s.mS)(r,new S(t,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(e,function(t){let e,{vertexCount:r,vertexXY:n,vertexZ:a,vertexM:h}=t,o=F(t);if(t.hasCurves()){let r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,new S(t,["vertexZ","vertexM"]),!1);let n=(0,i.Ie)();for(let e of t.parts){let t=e.startVertex;for(let{curve:r}of e.segments)(0,u.e)(n,t,r),t=(0,f.yP)(r)}let[a,h,l,g]=n;e={xmin:a,ymin:h,xmax:l,ymax:g,spatialReference:o}}catch(t){r.error=t,r.hasError=!0}finally{(0,s.hk)(r)}}else{let t,s,i,a;t=s=1/0,i=a=-1/0;for(let e=0;e<r;++e){let r=n[2*e],h=n[2*e+1];t=Math.min(t,r),i=Math.max(i,r),s=Math.min(s,h),a=Math.max(a,h)}e={xmin:t,ymin:s,xmax:i,ymax:a,spatialReference:o}}if(a){let t=1/0,r=-1/0;for(let e of a)t=Math.min(t,e),r=Math.max(r,e);e.zmin=t,e.zmax=r}if(h){let t=1/0,r=-1/0;for(let e of h)t=Math.min(t,e),r=Math.max(r,e);e.mmin=t,e.mmax=r}return e}(t)),e}catch(t){r.error=t,r.hasError=!0}finally{(0,s.hk)(r)}}function C(t){let e,r,s;if((0,a.fT)(t)){s="point";let{x:n,y:i,z:a,m:h}=t,o=[n,i];null!=a&&o.push(a),null!=h&&o.push(h),r=[[o]],e=1}else(0,a.U9)(t)?(s="multipoint",r=[t.points],e=t.points.length):(0,a.Rg)(t)?(s="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(s="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>(0===e.length||(t+=e.length,b(e[0],(0,f.yP)(e.at(-1)))&&--t),t),0));let n=w(s,e,s.includes("point")?0:r.length,(0,a.Pv)(t),(0,a.W0)(t),(0,f.Ed)(t)),{hasZ:i,hasM:h,vertexXY:o,vertexZ:l,vertexM:u}=n;function g(t){o[2*c]=t[0],o[2*c+1]=t[1],i&&(l[c]=t[2]),h&&(u[c]=t[m]),++c}n.spatialReference=t.spatialReference??void 0;let m=n.hasZ?3:2,c=0;if(!n.isMultipart()){if(!i&&!h){for(let[t,e]of r[0])o[2*c]=t,o[2*c+1]=e,++c;return n}for(let t of r[0])g(t);return n}let x="polygon"===s,{partOffsets:p}=n,d=0;if(!(0,f.Ed)(t)){for(let t of r){if(p[d++]=c,0===t.length)continue;let e=t.length;if(x&&b(t[0],t.at(-1))&&--e,i||h)for(let r=0;r<e;++r)g(t[r]);else for(let r=0;r<e;++r){let[e,s]=t[r];o[2*c]=e,o[2*c+1]=s,++c}}return p[d]=c,n}function v(t){let e=y+t;if(e<=(n.segmentParams?.length??0))return;let r=e*k;r=20*Math.ceil(r/20);let s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let y=0;for(let t of r){if(n.partOffsets[d++]=c,0===t.length)continue;let e=t[0],r=e;for(let e=1;e<t.length;++e){let s=t[e];g(r);let i=c-1;(0,f.wY)(s)?(v(10),++n.segmentCountArc,y=Y(r,s,n,i,y),r=s.a[0]):(0,f.DA)(s)?(v(10),++n.segmentCountArc,y=R(r,s,n,i,y),r=s.a[0]):(0,f.aO)(s)?(v(10),++n.segmentCountArc,y=I(r,s,n,i,y),r=s.c[0]):(0,f.n1)(s)?(v(4),++n.segmentCountBezier,y=X(0,s,n,i,y),r=s.b[0]):r=s}x&&b(e,r)||g(r)}return n.partOffsets[d]=c,n}function E(t){let e=_(t),{vertexCount:r,partCount:s,hasZ:n,hasM:i}=t,a=F(t),h=0;if(!t.isMultipart()){if("point"===t.type){let[e,r]=t.vertexXY;return{x:e,y:r,z:t.vertexZ?.[0],m:t.vertexM?.[0],spatialReference:a}}let s=[];for(;h<r;)s.push(e(h++));return{points:s,spatialReference:a,hasZ:n,hasM:i}}if(!t.hasCurves()){let r=[];for(let n=0;n<s;++n){let s=!!(1&t.partFlags[n]),i=t.partOffsets[n+1],a=[];for(;h<i;)a.push(e(h++));s&&a.length>0&&a.push([...a[0]]),r.push(a)}return"polygon"===t.type?{rings:r,hasZ:n,hasM:i,spatialReference:a}:{paths:r,hasZ:n,hasM:i,spatialReference:a}}let o=[];for(let{segments:e,startVertex:r}of t.parts){let t=[r];for(let{curve:r}of e)t.push(r);o.push(t)}return"polygon"===t.type?{rings:[],curveRings:o,hasZ:n,hasM:i,spatialReference:a}:{paths:[],curvePaths:o,hasZ:n,hasM:i,spatialReference:a}}function O(t,{lengths:e,coords:r,hasZ:s,hasM:n},i){let a=t.includes("point")?0:e.length,h="polygon"===t,o="point"===t?1:e.reduce((t,e)=>t+e,0)-(h?a:0);s??=!1,n??=!1;let l=w(t,o,a,s,n,!1,0,0);if(l.spatialReference=i??void 0,!l.isMultipart()){for(let t=0,e=0;t<o;++t)l.vertexXY[2*t]=r[e++],l.vertexXY[2*t+1]=r[e++],s&&(l.vertexZ[t]=r[e++]),n&&(l.vertexM[t]=r[e++]);return l}let u=2+Number(s)+Number(n),f=0,g=0;l.partOffsets[0]=0;for(let t of e){let e=l.partOffsets[g],i=e+t-Number(h);l.partOffsets[++g]=i;for(let t=e;t<i;++t)l.vertexXY[2*t]=r[f++],l.vertexXY[2*t+1]=r[f++],s&&(l.vertexZ[t]=r[f++]),n&&(l.vertexM[t]=r[f++]);h&&(f+=u)}return l}function A({type:t,vertexCount:e,vertexXY:r,vertexZ:s,vertexM:n,partCount:i,partOffsets:a,partFlags:h,hasZ:o,hasM:l}){let u=new c.A([],[],o,l);i=Math.max(i,1);let f=0;for(let t=0;t<i;++t){let i=a?.[t+1]??e,g=u.coords.length;for(let t=f;t<i;++t)u.coords.push(r[2*t],r[2*t+1]),o&&u.coords.push(s[t]),l&&u.coords.push(n[t]);if(h&&1&h[t]){let t=f;u.coords.push(r[2*t],r[2*t+1]),o&&u.coords.push(s[t]),l&&u.coords.push(n[t])}u.lengths.push((u.coords.length-g)/u.stride),f=i}return"point"===t&&(u.lengths.length=0),u}function P(...t){let e=new Set;for(let r of t){if(!r)continue;let t=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(let r of t){let t=r?.buffer;t&&e.add(t)}}return Array.from(e)}function Z(t,e){return"getSpatialReference"in t&&(e=function(t){if(null==t)return;let e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let s=t.getLatestID();(s<=0||s===r)&&(s=void 0);let n=t.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:e};let i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:e};let a=t.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:e,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}(t.getSpatialReference()),t=t.getGeometry()),new x({...t.toFlatGeometry(),spatialReference:e})}class S{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(let r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function F({spatialReference:t}){return t instanceof n.A?t.toJSON():t}function _({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?s=>[t[2*s],t[2*s+1],e[s],r[s]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function b(t,e){return t.every((t,r)=>t===e[r])}function w(t,e,r,s,n,i,a,h){a??=0,h??=0;let o=new x({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:h}),l=2*Float64Array.BYTES_PER_ELEMENT*e;s&&(l+=Float64Array.BYTES_PER_ELEMENT*e),n&&(l+=Float64Array.BYTES_PER_ELEMENT*e),o.isMultipart()&&(l+=(r+1)*Int32Array.BYTES_PER_ELEMENT,l+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(l+=e*Int8Array.BYTES_PER_ELEMENT,l+=e*Int32Array.BYTES_PER_ELEMENT,l+=o.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let u=new ArrayBuffer(l),f=0;return o.vertexXY=new Float64Array(u,f,2*e),f+=o.vertexXY.byteLength,s&&(o.vertexZ=new Float64Array(u,f,e),f+=o.vertexZ.byteLength),n&&(o.vertexM=new Float64Array(u,f,e),f+=o.vertexM.byteLength),i&&(o.segmentParams=new Float64Array(u,f,o.segmentParamCount),f+=o.segmentParams.byteLength,o.segmentIndices=new Int32Array(u,f,e),o.segmentIndices.fill(N),f+=o.segmentIndices.byteLength),o.isMultipart()&&(o.partOffsets=new Int32Array(u,f,r+1),f+=o.partOffsets.byteLength,o.partFlags=new Int8Array(u,f,r+1),f+=o.partFlags.byteLength,"polygon"===o.type&&o.partFlags.subarray(0,r).fill(1)),i&&(o.segmentFlags=new Int8Array(u,f,e),o.segmentFlags.fill(1),f+=o.segmentFlags.byteLength),o}function Y(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;let[h,[o,l],u,f,g,c,x]=e.a,p=4;f||(p|=1),u||(p|=2);let d=(0,m.SW)(t,e),[v,y]=(0,m.Uk)(d,.5);return n[a++]=p,n[a++]=c,n[a++]=x,n[a++]=g,n[a++]=o,n[a++]=l,n[a++]=d.u2-d.u1,n[a++]=d.u1,n[a++]=v,n[a++]=y,a}function R(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;let h=(0,g.io)(t,e);return V(h,4,...(0,o.mq)(h,.5),n,a)}function I(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){return r[i]=4,s[i]=a,V((0,l.pM)(t,e),0,...e.c[1],n,a)}function V(t,e,r,s,n,i){let{cx:a,cy:h,thetaStart:o,thetaEnd:l,radius:u}=t;return o>l||(e|=1),Math.abs(l-o)<=Math.PI||(e|=2),n[i++]=e,n[i++]=u,n[i++]=1,n[i++]=0,n[i++]=a,n[i++]=h,n[i++]=l-o,n[i++]=o,n[i++]=r,n[i++]=s,i}function X(t,{b:[e,[r,s],[n,i]]},{segmentFlags:a,segmentIndices:h,segmentParams:o},l,u){return a[l]=2,h[l]=u,o[u++]=r,o[u++]=s,o[u++]=n,o[u++]=i,u}const k=1.61803,N=-1},92722(t,e,r){r.d(e,{A:()=>n});var s=r(69397);class n{constructor(t=[],e=[],r=!1,s=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:s}){return new n(t,e,r||!1,s||!1)}static fromRect([t,e,r,s]){let i=r-t,a=s-e;return new n([5],[t,e,i,0,0,a,-i,0,0,-a])}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,s.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let t=0,e=0;for(let r of this.lengths){if(r<3)continue;let{stride:s}=this,n=this.coords[s*e],i=this.coords[s*e+1];for(let a=1;a<r;a+=1){let r=s*(e+a),h=this.coords[r],o=this.coords[r+1];t+=-.5*(h-n)*(o+i),n=h,i=o}e+=r}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);let{stride:r}=this;for(let s of this.lengths){for(let n=0;n<s;n++){let s=r*(e+n);t(this.coords[s],this.coords[s+1])}e+=s}}deltaDecode(){let t=this.clone(),{coords:e,lengths:r}=t,s=0,{stride:n}=this;for(let t of r){for(let r=1;r<t;r++){let t=n*(s+r);e[t]+=e[t-n],e[t+1]+=e[t+1-n]}s+=t}return t}clone(t){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let e=Array.from(this.lengths),{stride:r,size:s}=this,i=this.coords.slice(0,s*r);return t?(t.set(i),new n(e,t,this.hasZ,this.hasM)):new n(e,Array.from(i),this.hasZ,this.hasM)}justXY(){let{stride:t,size:e}=this;if(2===t)return this;let r=Array(e*t);for(let e=0,s=0;e<r.length;e+=t)r[s++]=this.coords[e],r[s++]=this.coords[e+1];return new n(this.lengths,r,!1,!1)}}}}]);